@iai-lib/any-chat-widget 0.1.0-alpha.18 → 0.1.0-alpha.20
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 +496 -497
- package/dist/any-chat-widget.umd.js +39 -39
- package/dist/types/main.d.ts +1 -1
- package/dist/types/modules/five9/five9Manager.d.ts +1 -1
- package/dist/types/modules/iaiChatWidget/functionCallHandlers/tourScheduler.d.ts +1 -1
- package/dist/types/modules/iaiChatWidget/functionCallHandlers/transferToLiveAgent.d.ts +3 -3
- package/dist/types/modules/iaiChatWidget/iaiChatWidget.d.ts +2 -2
- package/dist/types/types/sdk.d.ts +1 -2
- package/package.json +5 -5
|
@@ -7,24 +7,113 @@ var zt = (s, e, t) => (ai(s, e, "read from private field"), t ? t.call(s) : e.ge
|
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
|
9
9
|
}, Te = (s, e, t, i) => (ai(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
|
|
10
|
+
function gn(s) {
|
|
11
|
+
if (Array.isArray(s)) {
|
|
12
|
+
for (var e = 0, t = Array(s.length); e < s.length; e++)
|
|
13
|
+
t[e] = s[e];
|
|
14
|
+
return t;
|
|
15
|
+
} else
|
|
16
|
+
return Array.from(s);
|
|
17
|
+
}
|
|
18
|
+
var Zs = !1;
|
|
19
|
+
if (typeof window < "u") {
|
|
20
|
+
var oi = {
|
|
21
|
+
get passive() {
|
|
22
|
+
Zs = !0;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
window.addEventListener("testPassive", null, oi), window.removeEventListener("testPassive", null, oi);
|
|
26
|
+
}
|
|
27
|
+
var Wt = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), He = [], Ft = !1, Ii = -1, pt = void 0, Le = void 0, mt = void 0, Mi = function(s) {
|
|
28
|
+
return He.some(function(e) {
|
|
29
|
+
return !!(e.options.allowTouchMove && e.options.allowTouchMove(s));
|
|
30
|
+
});
|
|
31
|
+
}, Ds = function(s) {
|
|
32
|
+
var e = s || window.event;
|
|
33
|
+
return Mi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
34
|
+
}, yn = function(s) {
|
|
35
|
+
if (mt === void 0) {
|
|
36
|
+
var e = !!s && s.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
|
|
37
|
+
if (e && t > 0) {
|
|
38
|
+
var i = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
39
|
+
mt = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
pt === void 0 && (pt = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
43
|
+
}, vn = function() {
|
|
44
|
+
mt !== void 0 && (document.body.style.paddingRight = mt, mt = void 0), pt !== void 0 && (document.body.style.overflow = pt, pt = void 0);
|
|
45
|
+
}, bn = function() {
|
|
46
|
+
return window.requestAnimationFrame(function() {
|
|
47
|
+
if (Le === void 0) {
|
|
48
|
+
Le = {
|
|
49
|
+
position: document.body.style.position,
|
|
50
|
+
top: document.body.style.top,
|
|
51
|
+
left: document.body.style.left
|
|
52
|
+
};
|
|
53
|
+
var s = window, e = s.scrollY, t = s.scrollX, i = s.innerHeight;
|
|
54
|
+
document.body.style.position = "fixed", document.body.style.top = -e, document.body.style.left = -t, setTimeout(function() {
|
|
55
|
+
return window.requestAnimationFrame(function() {
|
|
56
|
+
var n = i - window.innerHeight;
|
|
57
|
+
n && e >= i && (document.body.style.top = -(e + n));
|
|
58
|
+
});
|
|
59
|
+
}, 300);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}, wn = function() {
|
|
63
|
+
if (Le !== void 0) {
|
|
64
|
+
var s = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
65
|
+
document.body.style.position = Le.position, document.body.style.top = Le.top, document.body.style.left = Le.left, window.scrollTo(e, s), Le = void 0;
|
|
66
|
+
}
|
|
67
|
+
}, _n = function(s) {
|
|
68
|
+
return s ? s.scrollHeight - s.scrollTop <= s.clientHeight : !1;
|
|
69
|
+
}, xn = function(s, e) {
|
|
70
|
+
var t = s.targetTouches[0].clientY - Ii;
|
|
71
|
+
return Mi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || _n(e) && t < 0 ? Ds(s) : (s.stopPropagation(), !0);
|
|
72
|
+
}, kn = function(s, e) {
|
|
73
|
+
if (!s) {
|
|
74
|
+
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (!He.some(function(i) {
|
|
78
|
+
return i.targetElement === s;
|
|
79
|
+
})) {
|
|
80
|
+
var t = {
|
|
81
|
+
targetElement: s,
|
|
82
|
+
options: e || {}
|
|
83
|
+
};
|
|
84
|
+
He = [].concat(gn(He), [t]), Wt ? bn() : yn(e), Wt && (s.ontouchstart = function(i) {
|
|
85
|
+
i.targetTouches.length === 1 && (Ii = i.targetTouches[0].clientY);
|
|
86
|
+
}, s.ontouchmove = function(i) {
|
|
87
|
+
i.targetTouches.length === 1 && xn(i, s);
|
|
88
|
+
}, Ft || (document.addEventListener("touchmove", Ds, Zs ? { passive: !1 } : void 0), Ft = !0));
|
|
89
|
+
}
|
|
90
|
+
}, ci = function(s) {
|
|
91
|
+
if (!s) {
|
|
92
|
+
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
He = He.filter(function(e) {
|
|
96
|
+
return e.targetElement !== s;
|
|
97
|
+
}), Wt && (s.ontouchstart = null, s.ontouchmove = null, Ft && He.length === 0 && (document.removeEventListener("touchmove", Ds, Zs ? { passive: !1 } : void 0), Ft = !1)), Wt ? wn() : vn();
|
|
98
|
+
};
|
|
10
99
|
/**
|
|
11
100
|
* @license
|
|
12
101
|
* Copyright 2019 Google LLC
|
|
13
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
103
|
*/
|
|
15
|
-
const Ut = globalThis,
|
|
16
|
-
let
|
|
104
|
+
const Ut = globalThis, Ls = Ut.ShadowRoot && (Ut.ShadyCSS === void 0 || Ut.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, zs = Symbol(), di = /* @__PURE__ */ new WeakMap();
|
|
105
|
+
let Ni = class {
|
|
17
106
|
constructor(s, e, t) {
|
|
18
|
-
if (this._$cssResult$ = !0, t !==
|
|
107
|
+
if (this._$cssResult$ = !0, t !== zs)
|
|
19
108
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
20
109
|
this.cssText = s, this.t = e;
|
|
21
110
|
}
|
|
22
111
|
get styleSheet() {
|
|
23
112
|
let s = this.o;
|
|
24
113
|
const e = this.t;
|
|
25
|
-
if (
|
|
114
|
+
if (Ls && s === void 0) {
|
|
26
115
|
const t = e !== void 0 && e.length === 1;
|
|
27
|
-
t && (s =
|
|
116
|
+
t && (s = di.get(e)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), t && di.set(e, s));
|
|
28
117
|
}
|
|
29
118
|
return s;
|
|
30
119
|
}
|
|
@@ -32,7 +121,7 @@ let Ii = class {
|
|
|
32
121
|
return this.cssText;
|
|
33
122
|
}
|
|
34
123
|
};
|
|
35
|
-
const
|
|
124
|
+
const En = (s) => new Ni(typeof s == "string" ? s : s + "", void 0, zs), ot = (s, ...e) => {
|
|
36
125
|
const t = s.length === 1 ? s[0] : e.reduce((i, n, r) => i + ((a) => {
|
|
37
126
|
if (a._$cssResult$ === !0)
|
|
38
127
|
return a.cssText;
|
|
@@ -40,30 +129,30 @@ const gn = (s) => new Ii(typeof s == "string" ? s : s + "", void 0, Ds), ot = (s
|
|
|
40
129
|
return a;
|
|
41
130
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
42
131
|
})(n) + s[r + 1], s[0]);
|
|
43
|
-
return new
|
|
44
|
-
},
|
|
45
|
-
if (
|
|
132
|
+
return new Ni(t, s, zs);
|
|
133
|
+
}, Tn = (s, e) => {
|
|
134
|
+
if (Ls)
|
|
46
135
|
s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
47
136
|
else
|
|
48
137
|
for (const t of e) {
|
|
49
138
|
const i = document.createElement("style"), n = Ut.litNonce;
|
|
50
139
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = t.cssText, s.appendChild(i);
|
|
51
140
|
}
|
|
52
|
-
},
|
|
141
|
+
}, li = Ls ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
|
|
53
142
|
let t = "";
|
|
54
143
|
for (const i of e.cssRules)
|
|
55
144
|
t += i.cssText;
|
|
56
|
-
return
|
|
145
|
+
return En(t);
|
|
57
146
|
})(s) : s;
|
|
58
147
|
/**
|
|
59
148
|
* @license
|
|
60
149
|
* Copyright 2017 Google LLC
|
|
61
150
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
151
|
*/
|
|
63
|
-
const { is:
|
|
152
|
+
const { is: Sn, defineProperty: Cn, getOwnPropertyDescriptor: $n, getOwnPropertyNames: An, getOwnPropertySymbols: On, getPrototypeOf: In } = Object, it = globalThis, ui = it.trustedTypes, Mn = ui ? ui.emptyScript : "", hi = it.reactiveElementPolyfillSupport, ft = (s, e) => s, Vt = { toAttribute(s, e) {
|
|
64
153
|
switch (e) {
|
|
65
154
|
case Boolean:
|
|
66
|
-
s = s ?
|
|
155
|
+
s = s ? Mn : null;
|
|
67
156
|
break;
|
|
68
157
|
case Object:
|
|
69
158
|
case Array:
|
|
@@ -88,7 +177,7 @@ const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnProperty
|
|
|
88
177
|
}
|
|
89
178
|
}
|
|
90
179
|
return t;
|
|
91
|
-
} },
|
|
180
|
+
} }, Us = (s, e) => !Sn(s, e), pi = { attribute: !0, type: String, converter: Vt, reflect: !1, hasChanged: Us };
|
|
92
181
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), it.litPropertyMetadata ?? (it.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
93
182
|
class Qe extends HTMLElement {
|
|
94
183
|
static addInitializer(e) {
|
|
@@ -97,14 +186,14 @@ class Qe extends HTMLElement {
|
|
|
97
186
|
static get observedAttributes() {
|
|
98
187
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
99
188
|
}
|
|
100
|
-
static createProperty(e, t =
|
|
189
|
+
static createProperty(e, t = pi) {
|
|
101
190
|
if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
102
191
|
const i = Symbol(), n = this.getPropertyDescriptor(e, i, t);
|
|
103
|
-
n !== void 0 &&
|
|
192
|
+
n !== void 0 && Cn(this.prototype, e, n);
|
|
104
193
|
}
|
|
105
194
|
}
|
|
106
195
|
static getPropertyDescriptor(e, t, i) {
|
|
107
|
-
const { get: n, set: r } =
|
|
196
|
+
const { get: n, set: r } = $n(this.prototype, e) ?? { get() {
|
|
108
197
|
return this[t];
|
|
109
198
|
}, set(a) {
|
|
110
199
|
this[t] = a;
|
|
@@ -117,19 +206,19 @@ class Qe extends HTMLElement {
|
|
|
117
206
|
}, configurable: !0, enumerable: !0 };
|
|
118
207
|
}
|
|
119
208
|
static getPropertyOptions(e) {
|
|
120
|
-
return this.elementProperties.get(e) ??
|
|
209
|
+
return this.elementProperties.get(e) ?? pi;
|
|
121
210
|
}
|
|
122
211
|
static _$Ei() {
|
|
123
|
-
if (this.hasOwnProperty(
|
|
212
|
+
if (this.hasOwnProperty(ft("elementProperties")))
|
|
124
213
|
return;
|
|
125
|
-
const e =
|
|
214
|
+
const e = In(this);
|
|
126
215
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
127
216
|
}
|
|
128
217
|
static finalize() {
|
|
129
|
-
if (this.hasOwnProperty(
|
|
218
|
+
if (this.hasOwnProperty(ft("finalized")))
|
|
130
219
|
return;
|
|
131
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
132
|
-
const t = this.properties, i = [...
|
|
220
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ft("properties"))) {
|
|
221
|
+
const t = this.properties, i = [...An(t), ...On(t)];
|
|
133
222
|
for (const n of i)
|
|
134
223
|
this.createProperty(n, t[n]);
|
|
135
224
|
}
|
|
@@ -152,9 +241,9 @@ class Qe extends HTMLElement {
|
|
|
152
241
|
if (Array.isArray(e)) {
|
|
153
242
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
154
243
|
for (const n of i)
|
|
155
|
-
t.unshift(
|
|
244
|
+
t.unshift(li(n));
|
|
156
245
|
} else
|
|
157
|
-
e !== void 0 && t.push(
|
|
246
|
+
e !== void 0 && t.push(li(e));
|
|
158
247
|
return t;
|
|
159
248
|
}
|
|
160
249
|
static _$Eu(e, t) {
|
|
@@ -184,7 +273,7 @@ class Qe extends HTMLElement {
|
|
|
184
273
|
}
|
|
185
274
|
createRenderRoot() {
|
|
186
275
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
187
|
-
return
|
|
276
|
+
return Tn(e, this.constructor.elementStyles), e;
|
|
188
277
|
}
|
|
189
278
|
connectedCallback() {
|
|
190
279
|
var e;
|
|
@@ -209,7 +298,7 @@ class Qe extends HTMLElement {
|
|
|
209
298
|
var i;
|
|
210
299
|
const n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
211
300
|
if (r !== void 0 && n.reflect === !0) {
|
|
212
|
-
const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter :
|
|
301
|
+
const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Vt).toAttribute(t, n.type);
|
|
213
302
|
this._$Em = e, a == null ? this.removeAttribute(r) : this.setAttribute(r, a), this._$Em = null;
|
|
214
303
|
}
|
|
215
304
|
}
|
|
@@ -217,13 +306,13 @@ class Qe extends HTMLElement {
|
|
|
217
306
|
var i;
|
|
218
307
|
const n = this.constructor, r = n._$Eh.get(e);
|
|
219
308
|
if (r !== void 0 && this._$Em !== r) {
|
|
220
|
-
const a = n.getPropertyOptions(r), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter :
|
|
309
|
+
const a = n.getPropertyOptions(r), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : Vt;
|
|
221
310
|
this._$Em = r, this[r] = o.fromAttribute(t, a.type), this._$Em = null;
|
|
222
311
|
}
|
|
223
312
|
}
|
|
224
313
|
requestUpdate(e, t, i) {
|
|
225
314
|
if (e !== void 0) {
|
|
226
|
-
if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ??
|
|
315
|
+
if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ?? Us)(this[e], t))
|
|
227
316
|
return;
|
|
228
317
|
this.P(e, t, i);
|
|
229
318
|
}
|
|
@@ -301,39 +390,39 @@ class Qe extends HTMLElement {
|
|
|
301
390
|
firstUpdated(e) {
|
|
302
391
|
}
|
|
303
392
|
}
|
|
304
|
-
Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, Qe[
|
|
393
|
+
Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, Qe[ft("elementProperties")] = /* @__PURE__ */ new Map(), Qe[ft("finalized")] = /* @__PURE__ */ new Map(), hi == null || hi({ ReactiveElement: Qe }), (it.reactiveElementVersions ?? (it.reactiveElementVersions = [])).push("2.0.4");
|
|
305
394
|
/**
|
|
306
395
|
* @license
|
|
307
396
|
* Copyright 2017 Google LLC
|
|
308
397
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
309
398
|
*/
|
|
310
|
-
const
|
|
311
|
-
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
312
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
313
|
-
function
|
|
399
|
+
const Kt = globalThis, Jt = Kt.trustedTypes, mi = Jt ? Jt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Hs = "$lit$", we = `lit$${(Math.random() + "").slice(9)}$`, Bs = "?" + we, Nn = `<${Bs}>`, We = document, vt = () => We.createComment(""), bt = (s) => s === null || typeof s != "object" && typeof s != "function", Pi = Array.isArray, ji = (s) => Pi(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", As = `[
|
|
400
|
+
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fi = /-->/g, gi = />/g, Ze = RegExp(`>|${As}(?:([^\\s"'>=/]+)(${As}*=${As}*(?:[^
|
|
401
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), yi = /'/g, vi = /"/g, Ri = /^(?:script|style|textarea|title)$/i, Pn = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), D = Pn(1), le = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), bi = /* @__PURE__ */ new WeakMap(), ze = We.createTreeWalker(We, 129);
|
|
402
|
+
function Zi(s, e) {
|
|
314
403
|
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
|
315
404
|
throw Error("invalid template strings array");
|
|
316
|
-
return
|
|
405
|
+
return mi !== void 0 ? mi.createHTML(e) : e;
|
|
317
406
|
}
|
|
318
|
-
const
|
|
407
|
+
const Di = (s, e) => {
|
|
319
408
|
const t = s.length - 1, i = [];
|
|
320
409
|
let n, r = e === 2 ? "<svg>" : "", a = ut;
|
|
321
410
|
for (let o = 0; o < t; o++) {
|
|
322
411
|
const c = s[o];
|
|
323
412
|
let l, h, p = -1, d = 0;
|
|
324
413
|
for (; d < c.length && (a.lastIndex = d, h = a.exec(c), h !== null); )
|
|
325
|
-
d = a.lastIndex, a === ut ? h[1] === "!--" ? a =
|
|
414
|
+
d = a.lastIndex, a === ut ? h[1] === "!--" ? a = fi : h[1] !== void 0 ? a = gi : h[2] !== void 0 ? (Ri.test(h[2]) && (n = RegExp("</" + h[2], "g")), a = Ze) : h[3] !== void 0 && (a = Ze) : a === Ze ? h[0] === ">" ? (a = n ?? ut, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, l = h[1], a = h[3] === void 0 ? Ze : h[3] === '"' ? vi : yi) : a === vi || a === yi ? a = Ze : a === fi || a === gi ? a = ut : (a = Ze, n = void 0);
|
|
326
415
|
const w = a === Ze && s[o + 1].startsWith("/>") ? " " : "";
|
|
327
|
-
r += a === ut ? c +
|
|
416
|
+
r += a === ut ? c + Nn : p >= 0 ? (i.push(l), c.slice(0, p) + Hs + c.slice(p) + we + w) : c + we + (p === -2 ? o : w);
|
|
328
417
|
}
|
|
329
|
-
return [
|
|
418
|
+
return [Zi(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
|
|
330
419
|
};
|
|
331
420
|
class wt {
|
|
332
421
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
333
422
|
let n;
|
|
334
423
|
this.parts = [];
|
|
335
424
|
let r = 0, a = 0;
|
|
336
|
-
const o = e.length - 1, c = this.parts, [l, h] =
|
|
425
|
+
const o = e.length - 1, c = this.parts, [l, h] = Di(e, t);
|
|
337
426
|
if (this.el = wt.createElement(l, i), ze.currentNode = this.el.content, t === 2) {
|
|
338
427
|
const p = this.el.content.firstChild;
|
|
339
428
|
p.replaceWith(...p.childNodes);
|
|
@@ -342,22 +431,22 @@ class wt {
|
|
|
342
431
|
if (n.nodeType === 1) {
|
|
343
432
|
if (n.hasAttributes())
|
|
344
433
|
for (const p of n.getAttributeNames())
|
|
345
|
-
if (p.endsWith(
|
|
434
|
+
if (p.endsWith(Hs)) {
|
|
346
435
|
const d = h[a++], w = n.getAttribute(p).split(we), N = /([.?@])?(.*)/.exec(d);
|
|
347
|
-
c.push({ type: 1, index: r, name: N[2], strings: w, ctor: N[1] === "." ?
|
|
436
|
+
c.push({ type: 1, index: r, name: N[2], strings: w, ctor: N[1] === "." ? zi : N[1] === "?" ? Ui : N[1] === "@" ? Hi : jt }), n.removeAttribute(p);
|
|
348
437
|
} else
|
|
349
438
|
p.startsWith(we) && (c.push({ type: 6, index: r }), n.removeAttribute(p));
|
|
350
|
-
if (
|
|
439
|
+
if (Ri.test(n.tagName)) {
|
|
351
440
|
const p = n.textContent.split(we), d = p.length - 1;
|
|
352
441
|
if (d > 0) {
|
|
353
|
-
n.textContent =
|
|
442
|
+
n.textContent = Jt ? Jt.emptyScript : "";
|
|
354
443
|
for (let w = 0; w < d; w++)
|
|
355
444
|
n.append(p[w], vt()), ze.nextNode(), c.push({ type: 2, index: ++r });
|
|
356
445
|
n.append(p[d], vt());
|
|
357
446
|
}
|
|
358
447
|
}
|
|
359
448
|
} else if (n.nodeType === 8)
|
|
360
|
-
if (n.data ===
|
|
449
|
+
if (n.data === Bs)
|
|
361
450
|
c.push({ type: 2, index: r });
|
|
362
451
|
else {
|
|
363
452
|
let p = -1;
|
|
@@ -380,7 +469,7 @@ function Fe(s, e, t = s, i) {
|
|
|
380
469
|
const o = bt(e) ? void 0 : e._$litDirective$;
|
|
381
470
|
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = a : t._$Cl = a), a !== void 0 && (e = Fe(s, a._$AS(s, e.values), a, i)), e;
|
|
382
471
|
}
|
|
383
|
-
class
|
|
472
|
+
class Li {
|
|
384
473
|
constructor(e, t) {
|
|
385
474
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
386
475
|
}
|
|
@@ -397,7 +486,7 @@ class Zi {
|
|
|
397
486
|
for (; c !== void 0; ) {
|
|
398
487
|
if (a === c.index) {
|
|
399
488
|
let l;
|
|
400
|
-
c.type === 2 ? l = new ct(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new
|
|
489
|
+
c.type === 2 ? l = new ct(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new Bi(r, this, e)), this._$AV.push(l), c = i[++o];
|
|
401
490
|
}
|
|
402
491
|
a !== (c == null ? void 0 : c.index) && (r = ze.nextNode(), a++);
|
|
403
492
|
}
|
|
@@ -429,7 +518,7 @@ class ct {
|
|
|
429
518
|
return this._$AB;
|
|
430
519
|
}
|
|
431
520
|
_$AI(e, t = this) {
|
|
432
|
-
e = Fe(this, e, t), bt(e) ? e === B || e == null || e === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : e !== this._$AH && e !== le && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) :
|
|
521
|
+
e = Fe(this, e, t), bt(e) ? e === B || e == null || e === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : e !== this._$AH && e !== le && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ji(e) ? this.k(e) : this._(e);
|
|
433
522
|
}
|
|
434
523
|
S(e) {
|
|
435
524
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -442,20 +531,20 @@ class ct {
|
|
|
442
531
|
}
|
|
443
532
|
$(e) {
|
|
444
533
|
var t;
|
|
445
|
-
const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = wt.createElement(
|
|
534
|
+
const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = wt.createElement(Zi(n.h, n.h[0]), this.options)), n);
|
|
446
535
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
|
|
447
536
|
this._$AH.p(i);
|
|
448
537
|
else {
|
|
449
|
-
const a = new
|
|
538
|
+
const a = new Li(r, this), o = a.u(this.options);
|
|
450
539
|
a.p(i), this.T(o), this._$AH = a;
|
|
451
540
|
}
|
|
452
541
|
}
|
|
453
542
|
_$AC(e) {
|
|
454
|
-
let t =
|
|
455
|
-
return t === void 0 &&
|
|
543
|
+
let t = bi.get(e.strings);
|
|
544
|
+
return t === void 0 && bi.set(e.strings, t = new wt(e)), t;
|
|
456
545
|
}
|
|
457
546
|
k(e) {
|
|
458
|
-
|
|
547
|
+
Pi(this._$AH) || (this._$AH = [], this._$AR());
|
|
459
548
|
const t = this._$AH;
|
|
460
549
|
let i, n = 0;
|
|
461
550
|
for (const r of e)
|
|
@@ -501,7 +590,7 @@ class jt {
|
|
|
501
590
|
e === B ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
502
591
|
}
|
|
503
592
|
}
|
|
504
|
-
class
|
|
593
|
+
class zi extends jt {
|
|
505
594
|
constructor() {
|
|
506
595
|
super(...arguments), this.type = 3;
|
|
507
596
|
}
|
|
@@ -509,7 +598,7 @@ class Di extends jt {
|
|
|
509
598
|
this.element[this.name] = e === B ? void 0 : e;
|
|
510
599
|
}
|
|
511
600
|
}
|
|
512
|
-
class
|
|
601
|
+
class Ui extends jt {
|
|
513
602
|
constructor() {
|
|
514
603
|
super(...arguments), this.type = 4;
|
|
515
604
|
}
|
|
@@ -517,7 +606,7 @@ class Li extends jt {
|
|
|
517
606
|
this.element.toggleAttribute(this.name, !!e && e !== B);
|
|
518
607
|
}
|
|
519
608
|
}
|
|
520
|
-
class
|
|
609
|
+
class Hi extends jt {
|
|
521
610
|
constructor(e, t, i, n, r) {
|
|
522
611
|
super(e, t, i, n, r), this.type = 5;
|
|
523
612
|
}
|
|
@@ -532,7 +621,7 @@ class zi extends jt {
|
|
|
532
621
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
533
622
|
}
|
|
534
623
|
}
|
|
535
|
-
class
|
|
624
|
+
class Bi {
|
|
536
625
|
constructor(e, t, i) {
|
|
537
626
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
538
627
|
}
|
|
@@ -543,9 +632,9 @@ class Ui {
|
|
|
543
632
|
Fe(this, e);
|
|
544
633
|
}
|
|
545
634
|
}
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
635
|
+
const jn = { P: Hs, A: we, C: Bs, M: 1, L: Di, R: Li, D: ji, V: Fe, I: ct, H: jt, N: Ui, U: Hi, B: zi, F: Bi }, wi = Kt.litHtmlPolyfillSupport;
|
|
636
|
+
wi == null || wi(wt, ct), (Kt.litHtmlVersions ?? (Kt.litHtmlVersions = [])).push("3.1.2");
|
|
637
|
+
const Rn = (s, e, t) => {
|
|
549
638
|
const i = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
550
639
|
let n = i._$litPart$;
|
|
551
640
|
if (n === void 0) {
|
|
@@ -570,7 +659,7 @@ let Q = class extends Qe {
|
|
|
570
659
|
}
|
|
571
660
|
update(s) {
|
|
572
661
|
const e = this.render();
|
|
573
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do =
|
|
662
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do = Rn(e, this.renderRoot, this.renderOptions);
|
|
574
663
|
}
|
|
575
664
|
connectedCallback() {
|
|
576
665
|
var s;
|
|
@@ -584,18 +673,17 @@ let Q = class extends Qe {
|
|
|
584
673
|
return le;
|
|
585
674
|
}
|
|
586
675
|
};
|
|
587
|
-
var
|
|
588
|
-
Q._$litElement$ = !0, Q.finalized = !0, (
|
|
589
|
-
const
|
|
590
|
-
|
|
676
|
+
var _i;
|
|
677
|
+
Q._$litElement$ = !0, Q.finalized = !0, (_i = globalThis.litElementHydrateSupport) == null || _i.call(globalThis, { LitElement: Q });
|
|
678
|
+
const xi = globalThis.litElementPolyfillSupport;
|
|
679
|
+
xi == null || xi({ LitElement: Q });
|
|
591
680
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
|
592
|
-
const Ne = ot`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-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}.resize{resize:both}.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-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #3B82F6);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}.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}}`;
|
|
593
681
|
/**
|
|
594
682
|
* @license
|
|
595
683
|
* Copyright 2017 Google LLC
|
|
596
684
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
597
685
|
*/
|
|
598
|
-
const
|
|
686
|
+
const Ne = (s) => (e, t) => {
|
|
599
687
|
t !== void 0 ? t.addInitializer(() => {
|
|
600
688
|
customElements.define(s, e);
|
|
601
689
|
}) : customElements.define(s, e);
|
|
@@ -605,7 +693,7 @@ const Pe = (s) => (e, t) => {
|
|
|
605
693
|
* Copyright 2017 Google LLC
|
|
606
694
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
607
695
|
*/
|
|
608
|
-
const
|
|
696
|
+
const Zn = { attribute: !0, type: String, converter: Vt, reflect: !1, hasChanged: Us }, Dn = (s = Zn, e, t) => {
|
|
609
697
|
const { kind: i, metadata: n } = t;
|
|
610
698
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
611
699
|
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(t.name, s), i === "accessor") {
|
|
@@ -627,7 +715,7 @@ const An = { attribute: !0, type: String, converter: Wt, reflect: !1, hasChanged
|
|
|
627
715
|
throw Error("Unsupported decorator location: " + i);
|
|
628
716
|
};
|
|
629
717
|
function W(s) {
|
|
630
|
-
return (e, t) => typeof t == "object" ?
|
|
718
|
+
return (e, t) => typeof t == "object" ? Dn(s, e, t) : ((i, n, r) => {
|
|
631
719
|
const a = n.hasOwnProperty(r);
|
|
632
720
|
return n.constructor.createProperty(r, a ? { ...i, wrapped: !0 } : i), a ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
633
721
|
})(s, e, t);
|
|
@@ -645,13 +733,13 @@ function dt(s) {
|
|
|
645
733
|
* Copyright 2017 Google LLC
|
|
646
734
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
647
735
|
*/
|
|
648
|
-
const
|
|
736
|
+
const ki = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
|
|
649
737
|
/**
|
|
650
738
|
* @license
|
|
651
739
|
* Copyright 2017 Google LLC
|
|
652
740
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
653
741
|
*/
|
|
654
|
-
function
|
|
742
|
+
function Ln(s, e) {
|
|
655
743
|
return (t, i, n) => {
|
|
656
744
|
const r = (a) => {
|
|
657
745
|
var o;
|
|
@@ -666,12 +754,12 @@ function In(s, e) {
|
|
|
666
754
|
this[c] = l;
|
|
667
755
|
} };
|
|
668
756
|
})();
|
|
669
|
-
return
|
|
757
|
+
return ki(t, i, { get() {
|
|
670
758
|
let c = a.call(this);
|
|
671
759
|
return c === void 0 && (c = r(this), (c !== null || this.hasUpdated) && o.call(this, c)), c;
|
|
672
760
|
} });
|
|
673
761
|
}
|
|
674
|
-
return
|
|
762
|
+
return ki(t, i, { get() {
|
|
675
763
|
return r(this);
|
|
676
764
|
} });
|
|
677
765
|
};
|
|
@@ -703,7 +791,7 @@ let ls = class {
|
|
|
703
791
|
* Copyright 2018 Google LLC
|
|
704
792
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
705
793
|
*/
|
|
706
|
-
const
|
|
794
|
+
const Ei = ds(class extends ls {
|
|
707
795
|
constructor(s) {
|
|
708
796
|
var e;
|
|
709
797
|
if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2)
|
|
@@ -735,7 +823,7 @@ const xi = ds(class extends ls {
|
|
|
735
823
|
* Copyright 2018 Google LLC
|
|
736
824
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
737
825
|
*/
|
|
738
|
-
const
|
|
826
|
+
const Wi = "important", zn = " !" + Wi, tt = ds(class extends ls {
|
|
739
827
|
constructor(s) {
|
|
740
828
|
var e;
|
|
741
829
|
if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "style" || ((e = s.strings) == null ? void 0 : e.length) > 2)
|
|
@@ -757,13 +845,73 @@ const Hi = "important", Mn = " !" + Hi, tt = ds(class extends ls {
|
|
|
757
845
|
const n = e[i];
|
|
758
846
|
if (n != null) {
|
|
759
847
|
this.ft.add(i);
|
|
760
|
-
const r = typeof n == "string" && n.endsWith(
|
|
761
|
-
i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ?
|
|
848
|
+
const r = typeof n == "string" && n.endsWith(zn);
|
|
849
|
+
i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ? Wi : "") : t[i] = n;
|
|
762
850
|
}
|
|
763
851
|
}
|
|
764
852
|
return le;
|
|
765
853
|
}
|
|
766
854
|
});
|
|
855
|
+
var Un = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
856
|
+
function Fi(s) {
|
|
857
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
858
|
+
}
|
|
859
|
+
var Ws = {};
|
|
860
|
+
(function(s) {
|
|
861
|
+
function e(o) {
|
|
862
|
+
o && o.options && clearTimeout(o.options.timer);
|
|
863
|
+
}
|
|
864
|
+
function t(o, c, l, h) {
|
|
865
|
+
var p = { timer: void 0, lastArgs: [] }, d = function() {
|
|
866
|
+
for (var w = this, N = [], U = 0; U < arguments.length; U++)
|
|
867
|
+
N[U] = arguments[U];
|
|
868
|
+
p.lastArgs = N, p.timer ? clearTimeout(p.timer) : c && l.apply(this, p.lastArgs), p.timer = setTimeout(function() {
|
|
869
|
+
c || l.apply(w, p.lastArgs), p.timer = void 0;
|
|
870
|
+
}, o);
|
|
871
|
+
};
|
|
872
|
+
return h && (d = d.bind(h)), d.options = p, d;
|
|
873
|
+
}
|
|
874
|
+
function i(o, c, l, h) {
|
|
875
|
+
var p;
|
|
876
|
+
Object.defineProperty(l, h, { configurable: !0, enumerable: !1, get: function() {
|
|
877
|
+
return p;
|
|
878
|
+
}, set: function(d) {
|
|
879
|
+
p = t(o, c, d, this);
|
|
880
|
+
} });
|
|
881
|
+
}
|
|
882
|
+
function n(o, c, l) {
|
|
883
|
+
var h = l.value;
|
|
884
|
+
return l.value = t(o, c, h), l;
|
|
885
|
+
}
|
|
886
|
+
function r(o, c) {
|
|
887
|
+
for (var l = [], h = 2; h < arguments.length; h++)
|
|
888
|
+
l[h - 2] = arguments[h];
|
|
889
|
+
if (l.length === 0)
|
|
890
|
+
throw new Error("function applied debounce decorator should be a method");
|
|
891
|
+
if (l.length === 1)
|
|
892
|
+
throw new Error("method applied debounce decorator should have valid name");
|
|
893
|
+
var p = l[0], d = l[1], w = l.length === 3 && l[2] ? l[2] : Object.getOwnPropertyDescriptor(p, d);
|
|
894
|
+
if (w)
|
|
895
|
+
return n(o, c, w);
|
|
896
|
+
i(o, c, p, d);
|
|
897
|
+
}
|
|
898
|
+
function a() {
|
|
899
|
+
for (var o = [], c = 0; c < arguments.length; c++)
|
|
900
|
+
o[c] = arguments[c];
|
|
901
|
+
var l = 500, h = !1;
|
|
902
|
+
if (o.length && (typeof o[0] == "number" || typeof o[0] == "object" && o[0].leading !== void 0)) {
|
|
903
|
+
typeof o[0] == "number" && (l = o[0]);
|
|
904
|
+
var p = void 0;
|
|
905
|
+
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() {
|
|
906
|
+
for (var d = [], w = 0; w < arguments.length; w++)
|
|
907
|
+
d[w] = arguments[w];
|
|
908
|
+
return r.apply(void 0, [l, h].concat(d));
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
return r.apply(void 0, [l, h].concat(o));
|
|
912
|
+
}
|
|
913
|
+
Object.defineProperty(s, "__esModule", { value: !0 }), s.cancel = e, s.debounce = a;
|
|
914
|
+
})(Ws);
|
|
767
915
|
var j;
|
|
768
916
|
(function(s) {
|
|
769
917
|
s.assertEqual = (n) => n;
|
|
@@ -867,7 +1015,7 @@ const f = j.arrayToEnum([
|
|
|
867
1015
|
"invalid_intersection_types",
|
|
868
1016
|
"not_multiple_of",
|
|
869
1017
|
"not_finite"
|
|
870
|
-
]),
|
|
1018
|
+
]), Hn = (s) => JSON.stringify(s, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
871
1019
|
class ne extends Error {
|
|
872
1020
|
constructor(e) {
|
|
873
1021
|
super(), this.issues = [], this.addIssue = (i) => {
|
|
@@ -980,14 +1128,14 @@ const _t = (s, e) => {
|
|
|
980
1128
|
}
|
|
981
1129
|
return { message: t };
|
|
982
1130
|
};
|
|
983
|
-
let
|
|
984
|
-
function
|
|
985
|
-
|
|
1131
|
+
let Vi = _t;
|
|
1132
|
+
function Bn(s) {
|
|
1133
|
+
Vi = s;
|
|
986
1134
|
}
|
|
987
|
-
function
|
|
988
|
-
return
|
|
1135
|
+
function qt() {
|
|
1136
|
+
return Vi;
|
|
989
1137
|
}
|
|
990
|
-
const
|
|
1138
|
+
const Gt = (s) => {
|
|
991
1139
|
const { data: e, path: t, errorMaps: i, issueData: n } = s, r = [...t, ...n.path || []], a = {
|
|
992
1140
|
...n,
|
|
993
1141
|
path: r
|
|
@@ -1001,16 +1149,16 @@ const Jt = (s) => {
|
|
|
1001
1149
|
path: r,
|
|
1002
1150
|
message: n.message || o
|
|
1003
1151
|
};
|
|
1004
|
-
},
|
|
1152
|
+
}, Wn = [];
|
|
1005
1153
|
function g(s, e) {
|
|
1006
|
-
const t =
|
|
1154
|
+
const t = Gt({
|
|
1007
1155
|
issueData: e,
|
|
1008
1156
|
data: s.data,
|
|
1009
1157
|
path: s.path,
|
|
1010
1158
|
errorMaps: [
|
|
1011
1159
|
s.common.contextualErrorMap,
|
|
1012
1160
|
s.schemaErrorMap,
|
|
1013
|
-
|
|
1161
|
+
qt(),
|
|
1014
1162
|
_t
|
|
1015
1163
|
// then global default map
|
|
1016
1164
|
].filter((i) => !!i)
|
|
@@ -1058,7 +1206,7 @@ class J {
|
|
|
1058
1206
|
}
|
|
1059
1207
|
const C = Object.freeze({
|
|
1060
1208
|
status: "aborted"
|
|
1061
|
-
}),
|
|
1209
|
+
}), Ki = (s) => ({ status: "dirty", value: s }), G = (s) => ({ status: "valid", value: s }), Ns = (s) => s.status === "aborted", Ps = (s) => s.status === "dirty", xt = (s) => s.status === "valid", Yt = (s) => typeof Promise < "u" && s instanceof Promise;
|
|
1062
1210
|
var _;
|
|
1063
1211
|
(function(s) {
|
|
1064
1212
|
s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
@@ -1071,7 +1219,7 @@ class ue {
|
|
|
1071
1219
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1072
1220
|
}
|
|
1073
1221
|
}
|
|
1074
|
-
const
|
|
1222
|
+
const Ti = (s, e) => {
|
|
1075
1223
|
if (xt(e))
|
|
1076
1224
|
return { success: !0, data: e.value };
|
|
1077
1225
|
if (!s.common.issues.length)
|
|
@@ -1129,7 +1277,7 @@ class I {
|
|
|
1129
1277
|
}
|
|
1130
1278
|
_parseSync(e) {
|
|
1131
1279
|
const t = this._parse(e);
|
|
1132
|
-
if (
|
|
1280
|
+
if (Yt(t))
|
|
1133
1281
|
throw new Error("Synchronous parse encountered promise.");
|
|
1134
1282
|
return t;
|
|
1135
1283
|
}
|
|
@@ -1157,7 +1305,7 @@ class I {
|
|
|
1157
1305
|
data: e,
|
|
1158
1306
|
parsedType: Ce(e)
|
|
1159
1307
|
}, r = this._parseSync({ data: e, path: n.path, parent: n });
|
|
1160
|
-
return
|
|
1308
|
+
return Ti(n, r);
|
|
1161
1309
|
}
|
|
1162
1310
|
async parseAsync(e, t) {
|
|
1163
1311
|
const i = await this.safeParseAsync(e, t);
|
|
@@ -1177,8 +1325,8 @@ class I {
|
|
|
1177
1325
|
parent: null,
|
|
1178
1326
|
data: e,
|
|
1179
1327
|
parsedType: Ce(e)
|
|
1180
|
-
}, n = this._parse({ data: e, path: i.path, parent: i }), r = await (
|
|
1181
|
-
return
|
|
1328
|
+
}, n = this._parse({ data: e, path: i.path, parent: i }), r = await (Yt(n) ? n : Promise.resolve(n));
|
|
1329
|
+
return Ti(i, r);
|
|
1182
1330
|
}
|
|
1183
1331
|
refine(e, t) {
|
|
1184
1332
|
const i = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
|
|
@@ -1242,7 +1390,7 @@ class I {
|
|
|
1242
1390
|
});
|
|
1243
1391
|
}
|
|
1244
1392
|
brand() {
|
|
1245
|
-
return new
|
|
1393
|
+
return new qi({
|
|
1246
1394
|
typeName: T.ZodBranded,
|
|
1247
1395
|
type: this,
|
|
1248
1396
|
...A(this._def)
|
|
@@ -1250,7 +1398,7 @@ class I {
|
|
|
1250
1398
|
}
|
|
1251
1399
|
catch(e) {
|
|
1252
1400
|
const t = typeof e == "function" ? e : () => e;
|
|
1253
|
-
return new
|
|
1401
|
+
return new ts({
|
|
1254
1402
|
...A(this._def),
|
|
1255
1403
|
innerType: this,
|
|
1256
1404
|
catchValue: t,
|
|
@@ -1268,7 +1416,7 @@ class I {
|
|
|
1268
1416
|
return Rt.create(this, e);
|
|
1269
1417
|
}
|
|
1270
1418
|
readonly() {
|
|
1271
|
-
return
|
|
1419
|
+
return is.create(this);
|
|
1272
1420
|
}
|
|
1273
1421
|
isOptional() {
|
|
1274
1422
|
return this.safeParse(void 0).success;
|
|
@@ -1277,11 +1425,11 @@ class I {
|
|
|
1277
1425
|
return this.safeParse(null).success;
|
|
1278
1426
|
}
|
|
1279
1427
|
}
|
|
1280
|
-
const
|
|
1428
|
+
const Fn = /^c[^\s-]{8,}$/i, Vn = /^[a-z][a-z0-9]*$/, Kn = /^[0-9A-HJKMNP-TV-Z]{26}$/, Jn = /^[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, qn = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Gn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1281
1429
|
let Os;
|
|
1282
|
-
const
|
|
1283
|
-
function
|
|
1284
|
-
return !!((e === "v4" || !e) &&
|
|
1430
|
+
const Yn = /^(((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}))$/, Xn = /^(([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})))$/, Qn = (s) => s.precision ? s.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}Z$`) : s.precision === 0 ? s.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$") : s.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$");
|
|
1431
|
+
function er(s, e) {
|
|
1432
|
+
return !!((e === "v4" || !e) && Yn.test(s) || (e === "v6" || !e) && Xn.test(s));
|
|
1285
1433
|
}
|
|
1286
1434
|
class ie extends I {
|
|
1287
1435
|
_parse(e) {
|
|
@@ -1336,37 +1484,37 @@ class ie extends I {
|
|
|
1336
1484
|
message: n.message
|
|
1337
1485
|
}), t.dirty());
|
|
1338
1486
|
} else if (n.kind === "email")
|
|
1339
|
-
|
|
1487
|
+
qn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1340
1488
|
validation: "email",
|
|
1341
1489
|
code: m.invalid_string,
|
|
1342
1490
|
message: n.message
|
|
1343
1491
|
}), t.dirty());
|
|
1344
1492
|
else if (n.kind === "emoji")
|
|
1345
|
-
Os || (Os = new RegExp(
|
|
1493
|
+
Os || (Os = new RegExp(Gn, "u")), Os.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1346
1494
|
validation: "emoji",
|
|
1347
1495
|
code: m.invalid_string,
|
|
1348
1496
|
message: n.message
|
|
1349
1497
|
}), t.dirty());
|
|
1350
1498
|
else if (n.kind === "uuid")
|
|
1351
|
-
|
|
1499
|
+
Jn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1352
1500
|
validation: "uuid",
|
|
1353
1501
|
code: m.invalid_string,
|
|
1354
1502
|
message: n.message
|
|
1355
1503
|
}), t.dirty());
|
|
1356
1504
|
else if (n.kind === "cuid")
|
|
1357
|
-
|
|
1505
|
+
Fn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1358
1506
|
validation: "cuid",
|
|
1359
1507
|
code: m.invalid_string,
|
|
1360
1508
|
message: n.message
|
|
1361
1509
|
}), t.dirty());
|
|
1362
1510
|
else if (n.kind === "cuid2")
|
|
1363
|
-
|
|
1511
|
+
Vn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1364
1512
|
validation: "cuid2",
|
|
1365
1513
|
code: m.invalid_string,
|
|
1366
1514
|
message: n.message
|
|
1367
1515
|
}), t.dirty());
|
|
1368
1516
|
else if (n.kind === "ulid")
|
|
1369
|
-
|
|
1517
|
+
Kn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1370
1518
|
validation: "ulid",
|
|
1371
1519
|
code: m.invalid_string,
|
|
1372
1520
|
message: n.message
|
|
@@ -1398,11 +1546,11 @@ class ie extends I {
|
|
|
1398
1546
|
code: m.invalid_string,
|
|
1399
1547
|
validation: { endsWith: n.value },
|
|
1400
1548
|
message: n.message
|
|
1401
|
-
}), t.dirty()) : n.kind === "datetime" ?
|
|
1549
|
+
}), t.dirty()) : n.kind === "datetime" ? Qn(n).test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1402
1550
|
code: m.invalid_string,
|
|
1403
1551
|
validation: "datetime",
|
|
1404
1552
|
message: n.message
|
|
1405
|
-
}), t.dirty()) : n.kind === "ip" ?
|
|
1553
|
+
}), t.dirty()) : n.kind === "ip" ? er(e.data, n.version) || (i = this._getOrReturnCtx(e, i), g(i, {
|
|
1406
1554
|
validation: "ip",
|
|
1407
1555
|
code: m.invalid_string,
|
|
1408
1556
|
message: n.message
|
|
@@ -1584,7 +1732,7 @@ ie.create = (s) => {
|
|
|
1584
1732
|
...A(s)
|
|
1585
1733
|
});
|
|
1586
1734
|
};
|
|
1587
|
-
function
|
|
1735
|
+
function tr(s, e) {
|
|
1588
1736
|
const t = (s.toString().split(".")[1] || "").length, i = (e.toString().split(".")[1] || "").length, n = t > i ? t : i, r = parseInt(s.toFixed(n).replace(".", "")), a = parseInt(e.toFixed(n).replace(".", ""));
|
|
1589
1737
|
return r % a / Math.pow(10, n);
|
|
1590
1738
|
}
|
|
@@ -1623,7 +1771,7 @@ class Ae extends I {
|
|
|
1623
1771
|
inclusive: n.inclusive,
|
|
1624
1772
|
exact: !1,
|
|
1625
1773
|
message: n.message
|
|
1626
|
-
}), i.dirty()) : n.kind === "multipleOf" ?
|
|
1774
|
+
}), i.dirty()) : n.kind === "multipleOf" ? tr(e.data, n.value) !== 0 && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1627
1775
|
code: m.not_multiple_of,
|
|
1628
1776
|
multipleOf: n.value,
|
|
1629
1777
|
message: n.message
|
|
@@ -1984,7 +2132,7 @@ Ve.create = (s) => new Ve({
|
|
|
1984
2132
|
typeName: T.ZodDate,
|
|
1985
2133
|
...A(s)
|
|
1986
2134
|
});
|
|
1987
|
-
class
|
|
2135
|
+
class Xt extends I {
|
|
1988
2136
|
_parse(e) {
|
|
1989
2137
|
if (this._getType(e) !== f.symbol) {
|
|
1990
2138
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1997,7 +2145,7 @@ class Gt extends I {
|
|
|
1997
2145
|
return G(e.data);
|
|
1998
2146
|
}
|
|
1999
2147
|
}
|
|
2000
|
-
|
|
2148
|
+
Xt.create = (s) => new Xt({
|
|
2001
2149
|
typeName: T.ZodSymbol,
|
|
2002
2150
|
...A(s)
|
|
2003
2151
|
});
|
|
@@ -2047,7 +2195,7 @@ nt.create = (s) => new nt({
|
|
|
2047
2195
|
typeName: T.ZodAny,
|
|
2048
2196
|
...A(s)
|
|
2049
2197
|
});
|
|
2050
|
-
class
|
|
2198
|
+
class Be extends I {
|
|
2051
2199
|
constructor() {
|
|
2052
2200
|
super(...arguments), this._unknown = !0;
|
|
2053
2201
|
}
|
|
@@ -2055,7 +2203,7 @@ class He extends I {
|
|
|
2055
2203
|
return G(e.data);
|
|
2056
2204
|
}
|
|
2057
2205
|
}
|
|
2058
|
-
|
|
2206
|
+
Be.create = (s) => new Be({
|
|
2059
2207
|
typeName: T.ZodUnknown,
|
|
2060
2208
|
...A(s)
|
|
2061
2209
|
});
|
|
@@ -2073,7 +2221,7 @@ xe.create = (s) => new xe({
|
|
|
2073
2221
|
typeName: T.ZodNever,
|
|
2074
2222
|
...A(s)
|
|
2075
2223
|
});
|
|
2076
|
-
class
|
|
2224
|
+
class Qt extends I {
|
|
2077
2225
|
_parse(e) {
|
|
2078
2226
|
if (this._getType(e) !== f.undefined) {
|
|
2079
2227
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2086,7 +2234,7 @@ class Yt extends I {
|
|
|
2086
2234
|
return G(e.data);
|
|
2087
2235
|
}
|
|
2088
2236
|
}
|
|
2089
|
-
|
|
2237
|
+
Qt.create = (s) => new Qt({
|
|
2090
2238
|
typeName: T.ZodVoid,
|
|
2091
2239
|
...A(s)
|
|
2092
2240
|
});
|
|
@@ -2444,7 +2592,7 @@ class H extends I {
|
|
|
2444
2592
|
});
|
|
2445
2593
|
}
|
|
2446
2594
|
keyof() {
|
|
2447
|
-
return
|
|
2595
|
+
return Ji(j.objectKeys(this.shape));
|
|
2448
2596
|
}
|
|
2449
2597
|
}
|
|
2450
2598
|
H.create = (s, e) => new H({
|
|
@@ -2759,7 +2907,7 @@ class $t extends I {
|
|
|
2759
2907
|
});
|
|
2760
2908
|
}
|
|
2761
2909
|
}
|
|
2762
|
-
class
|
|
2910
|
+
class es extends I {
|
|
2763
2911
|
get keySchema() {
|
|
2764
2912
|
return this._def.keyType;
|
|
2765
2913
|
}
|
|
@@ -2801,7 +2949,7 @@ class Xt extends I {
|
|
|
2801
2949
|
}
|
|
2802
2950
|
}
|
|
2803
2951
|
}
|
|
2804
|
-
|
|
2952
|
+
es.create = (s, e, t) => new es({
|
|
2805
2953
|
valueType: e,
|
|
2806
2954
|
keyType: s,
|
|
2807
2955
|
typeName: T.ZodMap,
|
|
@@ -2884,13 +3032,13 @@ class st extends I {
|
|
|
2884
3032
|
received: t.parsedType
|
|
2885
3033
|
}), C;
|
|
2886
3034
|
function i(o, c) {
|
|
2887
|
-
return
|
|
3035
|
+
return Gt({
|
|
2888
3036
|
data: o,
|
|
2889
3037
|
path: t.path,
|
|
2890
3038
|
errorMaps: [
|
|
2891
3039
|
t.common.contextualErrorMap,
|
|
2892
3040
|
t.schemaErrorMap,
|
|
2893
|
-
|
|
3041
|
+
qt(),
|
|
2894
3042
|
_t
|
|
2895
3043
|
].filter((l) => !!l),
|
|
2896
3044
|
issueData: {
|
|
@@ -2900,13 +3048,13 @@ class st extends I {
|
|
|
2900
3048
|
});
|
|
2901
3049
|
}
|
|
2902
3050
|
function n(o, c) {
|
|
2903
|
-
return
|
|
3051
|
+
return Gt({
|
|
2904
3052
|
data: o,
|
|
2905
3053
|
path: t.path,
|
|
2906
3054
|
errorMaps: [
|
|
2907
3055
|
t.common.contextualErrorMap,
|
|
2908
3056
|
t.schemaErrorMap,
|
|
2909
|
-
|
|
3057
|
+
qt(),
|
|
2910
3058
|
_t
|
|
2911
3059
|
].filter((l) => !!l),
|
|
2912
3060
|
issueData: {
|
|
@@ -2948,7 +3096,7 @@ class st extends I {
|
|
|
2948
3096
|
args(...e) {
|
|
2949
3097
|
return new st({
|
|
2950
3098
|
...this._def,
|
|
2951
|
-
args: he.create(e).rest(
|
|
3099
|
+
args: he.create(e).rest(Be.create())
|
|
2952
3100
|
});
|
|
2953
3101
|
}
|
|
2954
3102
|
returns(e) {
|
|
@@ -2965,8 +3113,8 @@ class st extends I {
|
|
|
2965
3113
|
}
|
|
2966
3114
|
static create(e, t, i) {
|
|
2967
3115
|
return new st({
|
|
2968
|
-
args: e || he.create([]).rest(
|
|
2969
|
-
returns: t ||
|
|
3116
|
+
args: e || he.create([]).rest(Be.create()),
|
|
3117
|
+
returns: t || Be.create(),
|
|
2970
3118
|
typeName: T.ZodFunction,
|
|
2971
3119
|
...A(i)
|
|
2972
3120
|
});
|
|
@@ -3007,7 +3155,7 @@ Ot.create = (s, e) => new Ot({
|
|
|
3007
3155
|
typeName: T.ZodLiteral,
|
|
3008
3156
|
...A(e)
|
|
3009
3157
|
});
|
|
3010
|
-
function
|
|
3158
|
+
function Ji(s, e) {
|
|
3011
3159
|
return new Ie({
|
|
3012
3160
|
values: s,
|
|
3013
3161
|
typeName: T.ZodEnum,
|
|
@@ -3062,7 +3210,7 @@ class Ie extends I {
|
|
|
3062
3210
|
return Ie.create(this.options.filter((t) => !e.includes(t)));
|
|
3063
3211
|
}
|
|
3064
3212
|
}
|
|
3065
|
-
Ie.create =
|
|
3213
|
+
Ie.create = Ji;
|
|
3066
3214
|
class It extends I {
|
|
3067
3215
|
_parse(e) {
|
|
3068
3216
|
const t = j.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(e);
|
|
@@ -3243,7 +3391,7 @@ Mt.create = (s, e) => new Mt({
|
|
|
3243
3391
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
3244
3392
|
...A(e)
|
|
3245
3393
|
});
|
|
3246
|
-
class
|
|
3394
|
+
class ts extends I {
|
|
3247
3395
|
_parse(e) {
|
|
3248
3396
|
const { ctx: t } = this._processInputParams(e), i = {
|
|
3249
3397
|
...t,
|
|
@@ -3258,7 +3406,7 @@ class Qt extends I {
|
|
|
3258
3406
|
...i
|
|
3259
3407
|
}
|
|
3260
3408
|
});
|
|
3261
|
-
return
|
|
3409
|
+
return Yt(n) ? n.then((r) => ({
|
|
3262
3410
|
status: "valid",
|
|
3263
3411
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
3264
3412
|
get error() {
|
|
@@ -3280,13 +3428,13 @@ class Qt extends I {
|
|
|
3280
3428
|
return this._def.innerType;
|
|
3281
3429
|
}
|
|
3282
3430
|
}
|
|
3283
|
-
|
|
3431
|
+
ts.create = (s, e) => new ts({
|
|
3284
3432
|
innerType: s,
|
|
3285
3433
|
typeName: T.ZodCatch,
|
|
3286
3434
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3287
3435
|
...A(e)
|
|
3288
3436
|
});
|
|
3289
|
-
class
|
|
3437
|
+
class ss extends I {
|
|
3290
3438
|
_parse(e) {
|
|
3291
3439
|
if (this._getType(e) !== f.nan) {
|
|
3292
3440
|
const t = this._getOrReturnCtx(e);
|
|
@@ -3299,12 +3447,12 @@ class es extends I {
|
|
|
3299
3447
|
return { status: "valid", value: e.data };
|
|
3300
3448
|
}
|
|
3301
3449
|
}
|
|
3302
|
-
|
|
3450
|
+
ss.create = (s) => new ss({
|
|
3303
3451
|
typeName: T.ZodNaN,
|
|
3304
3452
|
...A(s)
|
|
3305
3453
|
});
|
|
3306
|
-
const
|
|
3307
|
-
class
|
|
3454
|
+
const sr = Symbol("zod_brand");
|
|
3455
|
+
class qi extends I {
|
|
3308
3456
|
_parse(e) {
|
|
3309
3457
|
const { ctx: t } = this._processInputParams(e), i = t.data;
|
|
3310
3458
|
return this._def.type._parse({
|
|
@@ -3327,7 +3475,7 @@ class Rt extends I {
|
|
|
3327
3475
|
path: i.path,
|
|
3328
3476
|
parent: i
|
|
3329
3477
|
});
|
|
3330
|
-
return n.status === "aborted" ? C : n.status === "dirty" ? (t.dirty(),
|
|
3478
|
+
return n.status === "aborted" ? C : n.status === "dirty" ? (t.dirty(), Ki(n.value)) : this._def.out._parseAsync({
|
|
3331
3479
|
data: n.value,
|
|
3332
3480
|
path: i.path,
|
|
3333
3481
|
parent: i
|
|
@@ -3357,33 +3505,33 @@ class Rt extends I {
|
|
|
3357
3505
|
});
|
|
3358
3506
|
}
|
|
3359
3507
|
}
|
|
3360
|
-
class
|
|
3508
|
+
class is extends I {
|
|
3361
3509
|
_parse(e) {
|
|
3362
3510
|
const t = this._def.innerType._parse(e);
|
|
3363
3511
|
return xt(t) && (t.value = Object.freeze(t.value)), t;
|
|
3364
3512
|
}
|
|
3365
3513
|
}
|
|
3366
|
-
|
|
3514
|
+
is.create = (s, e) => new is({
|
|
3367
3515
|
innerType: s,
|
|
3368
3516
|
typeName: T.ZodReadonly,
|
|
3369
3517
|
...A(e)
|
|
3370
3518
|
});
|
|
3371
|
-
const
|
|
3519
|
+
const Gi = (s, e = {}, t) => s ? nt.create().superRefine((i, n) => {
|
|
3372
3520
|
var r, a;
|
|
3373
3521
|
if (!s(i)) {
|
|
3374
3522
|
const o = typeof e == "function" ? e(i) : typeof e == "string" ? { message: e } : e, c = (a = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && a !== void 0 ? a : !0, l = typeof o == "string" ? { message: o } : o;
|
|
3375
3523
|
n.addIssue({ code: "custom", ...l, fatal: c });
|
|
3376
3524
|
}
|
|
3377
|
-
}) : nt.create(),
|
|
3525
|
+
}) : nt.create(), ir = {
|
|
3378
3526
|
object: H.lazycreate
|
|
3379
3527
|
};
|
|
3380
3528
|
var T;
|
|
3381
3529
|
(function(s) {
|
|
3382
3530
|
s.ZodString = "ZodString", s.ZodNumber = "ZodNumber", s.ZodNaN = "ZodNaN", s.ZodBigInt = "ZodBigInt", s.ZodBoolean = "ZodBoolean", s.ZodDate = "ZodDate", s.ZodSymbol = "ZodSymbol", s.ZodUndefined = "ZodUndefined", s.ZodNull = "ZodNull", s.ZodAny = "ZodAny", s.ZodUnknown = "ZodUnknown", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray", s.ZodObject = "ZodObject", s.ZodUnion = "ZodUnion", s.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", s.ZodIntersection = "ZodIntersection", s.ZodTuple = "ZodTuple", s.ZodRecord = "ZodRecord", s.ZodMap = "ZodMap", s.ZodSet = "ZodSet", s.ZodFunction = "ZodFunction", s.ZodLazy = "ZodLazy", s.ZodLiteral = "ZodLiteral", s.ZodEnum = "ZodEnum", s.ZodEffects = "ZodEffects", s.ZodNativeEnum = "ZodNativeEnum", s.ZodOptional = "ZodOptional", s.ZodNullable = "ZodNullable", s.ZodDefault = "ZodDefault", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodReadonly";
|
|
3383
3531
|
})(T || (T = {}));
|
|
3384
|
-
const
|
|
3532
|
+
const nr = (s, e = {
|
|
3385
3533
|
message: `Input not instance of ${s.name}`
|
|
3386
|
-
}) =>
|
|
3534
|
+
}) => Gi((t) => t instanceof s, e), Yi = ie.create, Xi = Ae.create, rr = ss.create, ar = Oe.create, Qi = kt.create, or = Ve.create, cr = Xt.create, dr = Et.create, lr = Tt.create, ur = nt.create, hr = Be.create, pr = xe.create, mr = Qt.create, fr = re.create, gr = H.create, yr = H.strictCreate, vr = St.create, br = us.create, wr = Ct.create, _r = he.create, xr = $t.create, kr = es.create, Er = Ke.create, Tr = st.create, Sr = At.create, Cr = Ot.create, $r = Ie.create, Ar = It.create, Or = rt.create, Si = ae.create, Ir = _e.create, Mr = Je.create, Nr = ae.createWithPreprocess, Pr = Rt.create, jr = () => Yi().optional(), Rr = () => Xi().optional(), Zr = () => Qi().optional(), Dr = {
|
|
3387
3535
|
string: (s) => ie.create({ ...s, coerce: !0 }),
|
|
3388
3536
|
number: (s) => Ae.create({ ...s, coerce: !0 }),
|
|
3389
3537
|
boolean: (s) => kt.create({
|
|
@@ -3392,23 +3540,23 @@ const qn = (s, e = {
|
|
|
3392
3540
|
}),
|
|
3393
3541
|
bigint: (s) => Oe.create({ ...s, coerce: !0 }),
|
|
3394
3542
|
date: (s) => Ve.create({ ...s, coerce: !0 })
|
|
3395
|
-
},
|
|
3543
|
+
}, Lr = C;
|
|
3396
3544
|
var b = /* @__PURE__ */ Object.freeze({
|
|
3397
3545
|
__proto__: null,
|
|
3398
3546
|
defaultErrorMap: _t,
|
|
3399
|
-
setErrorMap:
|
|
3400
|
-
getErrorMap:
|
|
3401
|
-
makeIssue:
|
|
3402
|
-
EMPTY_PATH:
|
|
3547
|
+
setErrorMap: Bn,
|
|
3548
|
+
getErrorMap: qt,
|
|
3549
|
+
makeIssue: Gt,
|
|
3550
|
+
EMPTY_PATH: Wn,
|
|
3403
3551
|
addIssueToContext: g,
|
|
3404
3552
|
ParseStatus: J,
|
|
3405
3553
|
INVALID: C,
|
|
3406
|
-
DIRTY:
|
|
3554
|
+
DIRTY: Ki,
|
|
3407
3555
|
OK: G,
|
|
3408
3556
|
isAborted: Ns,
|
|
3409
3557
|
isDirty: Ps,
|
|
3410
3558
|
isValid: xt,
|
|
3411
|
-
isAsync:
|
|
3559
|
+
isAsync: Yt,
|
|
3412
3560
|
get util() {
|
|
3413
3561
|
return j;
|
|
3414
3562
|
},
|
|
@@ -3423,13 +3571,13 @@ var b = /* @__PURE__ */ Object.freeze({
|
|
|
3423
3571
|
ZodBigInt: Oe,
|
|
3424
3572
|
ZodBoolean: kt,
|
|
3425
3573
|
ZodDate: Ve,
|
|
3426
|
-
ZodSymbol:
|
|
3574
|
+
ZodSymbol: Xt,
|
|
3427
3575
|
ZodUndefined: Et,
|
|
3428
3576
|
ZodNull: Tt,
|
|
3429
3577
|
ZodAny: nt,
|
|
3430
|
-
ZodUnknown:
|
|
3578
|
+
ZodUnknown: Be,
|
|
3431
3579
|
ZodNever: xe,
|
|
3432
|
-
ZodVoid:
|
|
3580
|
+
ZodVoid: Qt,
|
|
3433
3581
|
ZodArray: re,
|
|
3434
3582
|
ZodObject: H,
|
|
3435
3583
|
ZodUnion: St,
|
|
@@ -3437,7 +3585,7 @@ var b = /* @__PURE__ */ Object.freeze({
|
|
|
3437
3585
|
ZodIntersection: Ct,
|
|
3438
3586
|
ZodTuple: he,
|
|
3439
3587
|
ZodRecord: $t,
|
|
3440
|
-
ZodMap:
|
|
3588
|
+
ZodMap: es,
|
|
3441
3589
|
ZodSet: Ke,
|
|
3442
3590
|
ZodFunction: st,
|
|
3443
3591
|
ZodLazy: At,
|
|
@@ -3450,62 +3598,62 @@ var b = /* @__PURE__ */ Object.freeze({
|
|
|
3450
3598
|
ZodOptional: _e,
|
|
3451
3599
|
ZodNullable: Je,
|
|
3452
3600
|
ZodDefault: Mt,
|
|
3453
|
-
ZodCatch:
|
|
3454
|
-
ZodNaN:
|
|
3455
|
-
BRAND:
|
|
3456
|
-
ZodBranded:
|
|
3601
|
+
ZodCatch: ts,
|
|
3602
|
+
ZodNaN: ss,
|
|
3603
|
+
BRAND: sr,
|
|
3604
|
+
ZodBranded: qi,
|
|
3457
3605
|
ZodPipeline: Rt,
|
|
3458
|
-
ZodReadonly:
|
|
3459
|
-
custom:
|
|
3606
|
+
ZodReadonly: is,
|
|
3607
|
+
custom: Gi,
|
|
3460
3608
|
Schema: I,
|
|
3461
3609
|
ZodSchema: I,
|
|
3462
|
-
late:
|
|
3610
|
+
late: ir,
|
|
3463
3611
|
get ZodFirstPartyTypeKind() {
|
|
3464
3612
|
return T;
|
|
3465
3613
|
},
|
|
3466
|
-
coerce:
|
|
3467
|
-
any:
|
|
3468
|
-
array:
|
|
3469
|
-
bigint:
|
|
3470
|
-
boolean:
|
|
3471
|
-
date:
|
|
3472
|
-
discriminatedUnion:
|
|
3473
|
-
effect:
|
|
3474
|
-
enum:
|
|
3475
|
-
function:
|
|
3476
|
-
instanceof:
|
|
3477
|
-
intersection:
|
|
3478
|
-
lazy:
|
|
3479
|
-
literal:
|
|
3480
|
-
map:
|
|
3481
|
-
nan:
|
|
3482
|
-
nativeEnum:
|
|
3483
|
-
never:
|
|
3484
|
-
null:
|
|
3485
|
-
nullable:
|
|
3486
|
-
number:
|
|
3487
|
-
object:
|
|
3488
|
-
oboolean:
|
|
3489
|
-
onumber:
|
|
3490
|
-
optional:
|
|
3491
|
-
ostring:
|
|
3492
|
-
pipeline:
|
|
3493
|
-
preprocess:
|
|
3494
|
-
promise:
|
|
3495
|
-
record:
|
|
3496
|
-
set:
|
|
3497
|
-
strictObject:
|
|
3498
|
-
string:
|
|
3499
|
-
symbol:
|
|
3500
|
-
transformer:
|
|
3501
|
-
tuple:
|
|
3502
|
-
undefined:
|
|
3503
|
-
union:
|
|
3504
|
-
unknown:
|
|
3505
|
-
void:
|
|
3506
|
-
NEVER:
|
|
3614
|
+
coerce: Dr,
|
|
3615
|
+
any: ur,
|
|
3616
|
+
array: fr,
|
|
3617
|
+
bigint: ar,
|
|
3618
|
+
boolean: Qi,
|
|
3619
|
+
date: or,
|
|
3620
|
+
discriminatedUnion: br,
|
|
3621
|
+
effect: Si,
|
|
3622
|
+
enum: $r,
|
|
3623
|
+
function: Tr,
|
|
3624
|
+
instanceof: nr,
|
|
3625
|
+
intersection: wr,
|
|
3626
|
+
lazy: Sr,
|
|
3627
|
+
literal: Cr,
|
|
3628
|
+
map: kr,
|
|
3629
|
+
nan: rr,
|
|
3630
|
+
nativeEnum: Ar,
|
|
3631
|
+
never: pr,
|
|
3632
|
+
null: lr,
|
|
3633
|
+
nullable: Mr,
|
|
3634
|
+
number: Xi,
|
|
3635
|
+
object: gr,
|
|
3636
|
+
oboolean: Zr,
|
|
3637
|
+
onumber: Rr,
|
|
3638
|
+
optional: Ir,
|
|
3639
|
+
ostring: jr,
|
|
3640
|
+
pipeline: Pr,
|
|
3641
|
+
preprocess: Nr,
|
|
3642
|
+
promise: Or,
|
|
3643
|
+
record: xr,
|
|
3644
|
+
set: Er,
|
|
3645
|
+
strictObject: yr,
|
|
3646
|
+
string: Yi,
|
|
3647
|
+
symbol: cr,
|
|
3648
|
+
transformer: Si,
|
|
3649
|
+
tuple: _r,
|
|
3650
|
+
undefined: dr,
|
|
3651
|
+
union: vr,
|
|
3652
|
+
unknown: hr,
|
|
3653
|
+
void: mr,
|
|
3654
|
+
NEVER: Lr,
|
|
3507
3655
|
ZodIssueCode: m,
|
|
3508
|
-
quotelessJson:
|
|
3656
|
+
quotelessJson: Hn,
|
|
3509
3657
|
ZodError: ne
|
|
3510
3658
|
});
|
|
3511
3659
|
const hs = b.object({
|
|
@@ -3567,155 +3715,7 @@ const hs = b.object({
|
|
|
3567
3715
|
b.function().returns(b.union([b.any(), b.promise(b.any())]))
|
|
3568
3716
|
).default({})
|
|
3569
3717
|
}).default({})
|
|
3570
|
-
});
|
|
3571
|
-
function Ir(s) {
|
|
3572
|
-
if (Array.isArray(s)) {
|
|
3573
|
-
for (var e = 0, t = Array(s.length); e < s.length; e++)
|
|
3574
|
-
t[e] = s[e];
|
|
3575
|
-
return t;
|
|
3576
|
-
} else
|
|
3577
|
-
return Array.from(s);
|
|
3578
|
-
}
|
|
3579
|
-
var Hs = !1;
|
|
3580
|
-
if (typeof window < "u") {
|
|
3581
|
-
var Ti = {
|
|
3582
|
-
get passive() {
|
|
3583
|
-
Hs = !0;
|
|
3584
|
-
}
|
|
3585
|
-
};
|
|
3586
|
-
window.addEventListener("testPassive", null, Ti), window.removeEventListener("testPassive", null, Ti);
|
|
3587
|
-
}
|
|
3588
|
-
var ss = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Be = [], is = !1, Yi = -1, mt = void 0, Le = void 0, ft = void 0, Xi = function(s) {
|
|
3589
|
-
return Be.some(function(e) {
|
|
3590
|
-
return !!(e.options.allowTouchMove && e.options.allowTouchMove(s));
|
|
3591
|
-
});
|
|
3592
|
-
}, Bs = function(s) {
|
|
3593
|
-
var e = s || window.event;
|
|
3594
|
-
return Xi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
3595
|
-
}, Mr = function(s) {
|
|
3596
|
-
if (ft === void 0) {
|
|
3597
|
-
var e = !!s && s.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
|
|
3598
|
-
if (e && t > 0) {
|
|
3599
|
-
var i = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
3600
|
-
ft = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
mt === void 0 && (mt = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
3604
|
-
}, Nr = function() {
|
|
3605
|
-
ft !== void 0 && (document.body.style.paddingRight = ft, ft = void 0), mt !== void 0 && (document.body.style.overflow = mt, mt = void 0);
|
|
3606
|
-
}, Pr = function() {
|
|
3607
|
-
return window.requestAnimationFrame(function() {
|
|
3608
|
-
if (Le === void 0) {
|
|
3609
|
-
Le = {
|
|
3610
|
-
position: document.body.style.position,
|
|
3611
|
-
top: document.body.style.top,
|
|
3612
|
-
left: document.body.style.left
|
|
3613
|
-
};
|
|
3614
|
-
var s = window, e = s.scrollY, t = s.scrollX, i = s.innerHeight;
|
|
3615
|
-
document.body.style.position = "fixed", document.body.style.top = -e, document.body.style.left = -t, setTimeout(function() {
|
|
3616
|
-
return window.requestAnimationFrame(function() {
|
|
3617
|
-
var n = i - window.innerHeight;
|
|
3618
|
-
n && e >= i && (document.body.style.top = -(e + n));
|
|
3619
|
-
});
|
|
3620
|
-
}, 300);
|
|
3621
|
-
}
|
|
3622
|
-
});
|
|
3623
|
-
}, jr = function() {
|
|
3624
|
-
if (Le !== void 0) {
|
|
3625
|
-
var s = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
3626
|
-
document.body.style.position = Le.position, document.body.style.top = Le.top, document.body.style.left = Le.left, window.scrollTo(e, s), Le = void 0;
|
|
3627
|
-
}
|
|
3628
|
-
}, Rr = function(s) {
|
|
3629
|
-
return s ? s.scrollHeight - s.scrollTop <= s.clientHeight : !1;
|
|
3630
|
-
}, Zr = function(s, e) {
|
|
3631
|
-
var t = s.targetTouches[0].clientY - Yi;
|
|
3632
|
-
return Xi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Rr(e) && t < 0 ? Bs(s) : (s.stopPropagation(), !0);
|
|
3633
|
-
}, Dr = function(s, e) {
|
|
3634
|
-
if (!s) {
|
|
3635
|
-
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
3636
|
-
return;
|
|
3637
|
-
}
|
|
3638
|
-
if (!Be.some(function(i) {
|
|
3639
|
-
return i.targetElement === s;
|
|
3640
|
-
})) {
|
|
3641
|
-
var t = {
|
|
3642
|
-
targetElement: s,
|
|
3643
|
-
options: e || {}
|
|
3644
|
-
};
|
|
3645
|
-
Be = [].concat(Ir(Be), [t]), ss ? Pr() : Mr(e), ss && (s.ontouchstart = function(i) {
|
|
3646
|
-
i.targetTouches.length === 1 && (Yi = i.targetTouches[0].clientY);
|
|
3647
|
-
}, s.ontouchmove = function(i) {
|
|
3648
|
-
i.targetTouches.length === 1 && Zr(i, s);
|
|
3649
|
-
}, is || (document.addEventListener("touchmove", Bs, Hs ? { passive: !1 } : void 0), is = !0));
|
|
3650
|
-
}
|
|
3651
|
-
}, Si = function(s) {
|
|
3652
|
-
if (!s) {
|
|
3653
|
-
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
3654
|
-
return;
|
|
3655
|
-
}
|
|
3656
|
-
Be = Be.filter(function(e) {
|
|
3657
|
-
return e.targetElement !== s;
|
|
3658
|
-
}), ss && (s.ontouchstart = null, s.ontouchmove = null, is && Be.length === 0 && (document.removeEventListener("touchmove", Bs, Hs ? { passive: !1 } : void 0), is = !1)), ss ? jr() : Nr();
|
|
3659
|
-
}, Lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3660
|
-
function Qi(s) {
|
|
3661
|
-
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3662
|
-
}
|
|
3663
|
-
var Ws = {};
|
|
3664
|
-
(function(s) {
|
|
3665
|
-
function e(o) {
|
|
3666
|
-
o && o.options && clearTimeout(o.options.timer);
|
|
3667
|
-
}
|
|
3668
|
-
function t(o, c, l, h) {
|
|
3669
|
-
var p = { timer: void 0, lastArgs: [] }, d = function() {
|
|
3670
|
-
for (var w = this, N = [], U = 0; U < arguments.length; U++)
|
|
3671
|
-
N[U] = arguments[U];
|
|
3672
|
-
p.lastArgs = N, p.timer ? clearTimeout(p.timer) : c && l.apply(this, p.lastArgs), p.timer = setTimeout(function() {
|
|
3673
|
-
c || l.apply(w, p.lastArgs), p.timer = void 0;
|
|
3674
|
-
}, o);
|
|
3675
|
-
};
|
|
3676
|
-
return h && (d = d.bind(h)), d.options = p, d;
|
|
3677
|
-
}
|
|
3678
|
-
function i(o, c, l, h) {
|
|
3679
|
-
var p;
|
|
3680
|
-
Object.defineProperty(l, h, { configurable: !0, enumerable: !1, get: function() {
|
|
3681
|
-
return p;
|
|
3682
|
-
}, set: function(d) {
|
|
3683
|
-
p = t(o, c, d, this);
|
|
3684
|
-
} });
|
|
3685
|
-
}
|
|
3686
|
-
function n(o, c, l) {
|
|
3687
|
-
var h = l.value;
|
|
3688
|
-
return l.value = t(o, c, h), l;
|
|
3689
|
-
}
|
|
3690
|
-
function r(o, c) {
|
|
3691
|
-
for (var l = [], h = 2; h < arguments.length; h++)
|
|
3692
|
-
l[h - 2] = arguments[h];
|
|
3693
|
-
if (l.length === 0)
|
|
3694
|
-
throw new Error("function applied debounce decorator should be a method");
|
|
3695
|
-
if (l.length === 1)
|
|
3696
|
-
throw new Error("method applied debounce decorator should have valid name");
|
|
3697
|
-
var p = l[0], d = l[1], w = l.length === 3 && l[2] ? l[2] : Object.getOwnPropertyDescriptor(p, d);
|
|
3698
|
-
if (w)
|
|
3699
|
-
return n(o, c, w);
|
|
3700
|
-
i(o, c, p, d);
|
|
3701
|
-
}
|
|
3702
|
-
function a() {
|
|
3703
|
-
for (var o = [], c = 0; c < arguments.length; c++)
|
|
3704
|
-
o[c] = arguments[c];
|
|
3705
|
-
var l = 500, h = !1;
|
|
3706
|
-
if (o.length && (typeof o[0] == "number" || typeof o[0] == "object" && o[0].leading !== void 0)) {
|
|
3707
|
-
typeof o[0] == "number" && (l = o[0]);
|
|
3708
|
-
var p = void 0;
|
|
3709
|
-
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() {
|
|
3710
|
-
for (var d = [], w = 0; w < arguments.length; w++)
|
|
3711
|
-
d[w] = arguments[w];
|
|
3712
|
-
return r.apply(void 0, [l, h].concat(d));
|
|
3713
|
-
};
|
|
3714
|
-
}
|
|
3715
|
-
return r.apply(void 0, [l, h].concat(o));
|
|
3716
|
-
}
|
|
3717
|
-
Object.defineProperty(s, "__esModule", { value: !0 }), s.cancel = e, s.debounce = a;
|
|
3718
|
-
})(Ws);
|
|
3718
|
+
}), Pe = ot`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-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}.resize{resize:both}.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-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #3B82F6);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}.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}}`;
|
|
3719
3719
|
var zr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Zt = (s, e, t, i) => {
|
|
3720
3720
|
for (var n = i > 1 ? void 0 : i ? Ur(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
3721
3721
|
(a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
|
|
@@ -3724,17 +3724,17 @@ var zr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Zt = (s, e
|
|
|
3724
3724
|
let qe = class extends Q {
|
|
3725
3725
|
constructor() {
|
|
3726
3726
|
super(...arguments), this.isOpen = !0, this.onResizeHandler = () => {
|
|
3727
|
-
this.isOpen && window.innerWidth < 768 ?
|
|
3727
|
+
this.isOpen && window.innerWidth < 768 ? kn(this) : ci(this);
|
|
3728
3728
|
};
|
|
3729
3729
|
}
|
|
3730
3730
|
connectedCallback() {
|
|
3731
3731
|
super.connectedCallback(), this.cleanOptions = hs.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
|
|
3732
3732
|
}
|
|
3733
3733
|
disconnectedCallback() {
|
|
3734
|
-
super.disconnectedCallback(),
|
|
3734
|
+
super.disconnectedCallback(), ci(this), window.removeEventListener("resize", this.onResizeHandler);
|
|
3735
3735
|
}
|
|
3736
3736
|
render() {
|
|
3737
|
-
const s = this.cleanOptions.config.placement !== "left", e =
|
|
3737
|
+
const s = this.cleanOptions.config.placement !== "left", e = Ei({
|
|
3738
3738
|
fixed: !0,
|
|
3739
3739
|
"bottom-0": !0,
|
|
3740
3740
|
"w-full": this.isOpen,
|
|
@@ -3744,7 +3744,7 @@ let qe = class extends Q {
|
|
|
3744
3744
|
"md:bottom-8": !0,
|
|
3745
3745
|
"md:w-fit": !0,
|
|
3746
3746
|
"md:h-fit": !0
|
|
3747
|
-
}), t =
|
|
3747
|
+
}), t = Ei({
|
|
3748
3748
|
"mt-4": !0,
|
|
3749
3749
|
"px-8": !0,
|
|
3750
3750
|
"pb-8": !0,
|
|
@@ -3790,7 +3790,7 @@ let qe = class extends Q {
|
|
|
3790
3790
|
this.isOpen = !this.isOpen, this.onResizeHandler();
|
|
3791
3791
|
}
|
|
3792
3792
|
};
|
|
3793
|
-
qe.styles = [
|
|
3793
|
+
qe.styles = [Pe];
|
|
3794
3794
|
Zt([
|
|
3795
3795
|
W({ type: Object })
|
|
3796
3796
|
], qe.prototype, "options", 2);
|
|
@@ -3798,17 +3798,17 @@ Zt([
|
|
|
3798
3798
|
dt()
|
|
3799
3799
|
], qe.prototype, "isOpen", 2);
|
|
3800
3800
|
Zt([
|
|
3801
|
-
|
|
3801
|
+
Ln("iai-chat")
|
|
3802
3802
|
], qe.prototype, "chatWindow", 2);
|
|
3803
3803
|
Zt([
|
|
3804
3804
|
Ws.debounce(250)
|
|
3805
3805
|
], qe.prototype, "onResizeHandler", 2);
|
|
3806
3806
|
qe = Zt([
|
|
3807
|
-
|
|
3807
|
+
Ne("iai-chat-popup")
|
|
3808
3808
|
], qe);
|
|
3809
3809
|
const Fs = "https://ai-dev.anyonehome.xyz";
|
|
3810
3810
|
async function Hr(s, e = {}) {
|
|
3811
|
-
return
|
|
3811
|
+
return (await fetch(`${Fs}/threads`, {
|
|
3812
3812
|
method: "POST",
|
|
3813
3813
|
headers: {
|
|
3814
3814
|
"Content-Type": "application/json"
|
|
@@ -3817,7 +3817,7 @@ async function Hr(s, e = {}) {
|
|
|
3817
3817
|
})).json();
|
|
3818
3818
|
}
|
|
3819
3819
|
async function Br(s, e) {
|
|
3820
|
-
return
|
|
3820
|
+
return (await fetch(`${Fs}/threads/${s}/messages`, {
|
|
3821
3821
|
method: "POST",
|
|
3822
3822
|
headers: {
|
|
3823
3823
|
"Content-Type": "application/json"
|
|
@@ -3826,7 +3826,7 @@ async function Br(s, e) {
|
|
|
3826
3826
|
})).json();
|
|
3827
3827
|
}
|
|
3828
3828
|
async function Wr(s, e, t, i = !1) {
|
|
3829
|
-
return
|
|
3829
|
+
return (await fetch(`${Fs}/threads/${s}/functions/${e}`, {
|
|
3830
3830
|
method: "POST",
|
|
3831
3831
|
headers: {
|
|
3832
3832
|
"Content-Type": "application/json"
|
|
@@ -3995,7 +3995,7 @@ class Vr {
|
|
|
3995
3995
|
);
|
|
3996
3996
|
return { messages: i, functions: n };
|
|
3997
3997
|
} catch (t) {
|
|
3998
|
-
throw console.error(t), new Error("There was an error sending the message");
|
|
3998
|
+
throw console.error("Error sending message:", t), new Error("There was an error sending the message");
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
4001
|
setTyping(e, t = !1) {
|
|
@@ -4026,7 +4026,9 @@ class Vr {
|
|
|
4026
4026
|
), this.setTyping(!1), n.forEach((r) => this._emitter.emit("functionCall", r)), { messages: i, functions: n };
|
|
4027
4027
|
}
|
|
4028
4028
|
simulateDelay(e) {
|
|
4029
|
-
return this.options.simulateDelays ? new Promise((t) =>
|
|
4029
|
+
return this.options.simulateDelays ? new Promise((t) => {
|
|
4030
|
+
setTimeout(t, e);
|
|
4031
|
+
}) : Promise.resolve();
|
|
4030
4032
|
}
|
|
4031
4033
|
get assistantId() {
|
|
4032
4034
|
return this._assistantId;
|
|
@@ -4070,22 +4072,6 @@ class Vr {
|
|
|
4070
4072
|
});
|
|
4071
4073
|
}
|
|
4072
4074
|
}
|
|
4073
|
-
function Kr(s) {
|
|
4074
|
-
return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4075
|
-
var i = s.get(e);
|
|
4076
|
-
i ? i.push(t) : s.set(e, [t]);
|
|
4077
|
-
}, off: function(e, t) {
|
|
4078
|
-
var i = s.get(e);
|
|
4079
|
-
i && (t ? i.splice(i.indexOf(t) >>> 0, 1) : s.set(e, []));
|
|
4080
|
-
}, emit: function(e, t) {
|
|
4081
|
-
var i = s.get(e);
|
|
4082
|
-
i && i.slice().map(function(n) {
|
|
4083
|
-
n(t);
|
|
4084
|
-
}), (i = s.get("*")) && i.slice().map(function(n) {
|
|
4085
|
-
n(e, t);
|
|
4086
|
-
});
|
|
4087
|
-
} };
|
|
4088
|
-
}
|
|
4089
4075
|
/**
|
|
4090
4076
|
* @license
|
|
4091
4077
|
* Copyright 2021 Google LLC
|
|
@@ -4099,12 +4085,12 @@ function $e(s, e, t) {
|
|
|
4099
4085
|
* Copyright 2020 Google LLC
|
|
4100
4086
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4101
4087
|
*/
|
|
4102
|
-
const { I:
|
|
4088
|
+
const { I: Kr } = jn, Ci = () => document.createComment(""), ht = (s, e, t) => {
|
|
4103
4089
|
var i;
|
|
4104
4090
|
const n = s._$AA.parentNode, r = e === void 0 ? s._$AB : e._$AA;
|
|
4105
4091
|
if (t === void 0) {
|
|
4106
4092
|
const a = n.insertBefore(Ci(), r), o = n.insertBefore(Ci(), r);
|
|
4107
|
-
t = new
|
|
4093
|
+
t = new Kr(a, o, s, s.options);
|
|
4108
4094
|
} else {
|
|
4109
4095
|
const a = t._$AB.nextSibling, o = t._$AM, c = o !== s;
|
|
4110
4096
|
if (c) {
|
|
@@ -4120,7 +4106,7 @@ const { I: Jr } = Cn, Ci = () => document.createComment(""), ht = (s, e, t) => {
|
|
|
4120
4106
|
}
|
|
4121
4107
|
}
|
|
4122
4108
|
return t;
|
|
4123
|
-
}, De = (s, e, t = s) => (s._$AI(e, t), s),
|
|
4109
|
+
}, De = (s, e, t = s) => (s._$AI(e, t), s), Jr = {}, qr = (s, e = Jr) => s._$AH = e, Gr = (s) => s._$AH, Is = (s) => {
|
|
4124
4110
|
var e;
|
|
4125
4111
|
(e = s._$AP) == null || e.call(s, !1, !0);
|
|
4126
4112
|
let t = s._$AA;
|
|
@@ -4140,7 +4126,7 @@ const $i = (s, e, t) => {
|
|
|
4140
4126
|
for (let n = e; n <= t; n++)
|
|
4141
4127
|
i.set(s[n], n);
|
|
4142
4128
|
return i;
|
|
4143
|
-
},
|
|
4129
|
+
}, Yr = ds(class extends ls {
|
|
4144
4130
|
constructor(s) {
|
|
4145
4131
|
if (super(s), s.type !== cs.CHILD)
|
|
4146
4132
|
throw Error("repeat() can only be used in text expressions");
|
|
@@ -4158,7 +4144,7 @@ const $i = (s, e, t) => {
|
|
|
4158
4144
|
return this.dt(s, e, t).values;
|
|
4159
4145
|
}
|
|
4160
4146
|
update(s, [e, t, i]) {
|
|
4161
|
-
const n =
|
|
4147
|
+
const n = Gr(s), { values: r, keys: a } = this.dt(e, t, i);
|
|
4162
4148
|
if (!Array.isArray(n))
|
|
4163
4149
|
return this.ut = a, r;
|
|
4164
4150
|
const o = this.ut ?? (this.ut = []), c = [];
|
|
@@ -4197,9 +4183,26 @@ const $i = (s, e, t) => {
|
|
|
4197
4183
|
const U = n[p++];
|
|
4198
4184
|
U !== null && Is(U);
|
|
4199
4185
|
}
|
|
4200
|
-
return this.ut = a,
|
|
4186
|
+
return this.ut = a, qr(s, c), le;
|
|
4201
4187
|
}
|
|
4202
|
-
})
|
|
4188
|
+
});
|
|
4189
|
+
function Xr(s) {
|
|
4190
|
+
return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4191
|
+
var i = s.get(e);
|
|
4192
|
+
i ? i.push(t) : s.set(e, [t]);
|
|
4193
|
+
}, off: function(e, t) {
|
|
4194
|
+
var i = s.get(e);
|
|
4195
|
+
i && (t ? i.splice(i.indexOf(t) >>> 0, 1) : s.set(e, []));
|
|
4196
|
+
}, emit: function(e, t) {
|
|
4197
|
+
var i = s.get(e);
|
|
4198
|
+
i && i.slice().map(function(n) {
|
|
4199
|
+
n(t);
|
|
4200
|
+
}), (i = s.get("*")) && i.slice().map(function(n) {
|
|
4201
|
+
n(e, t);
|
|
4202
|
+
});
|
|
4203
|
+
} };
|
|
4204
|
+
}
|
|
4205
|
+
const Nt = D`
|
|
4203
4206
|
<svg
|
|
4204
4207
|
xmlns="http://www.w3.org/2000/svg"
|
|
4205
4208
|
viewBox="0 0 24 24"
|
|
@@ -4260,7 +4263,7 @@ var sa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ke = (s, e
|
|
|
4260
4263
|
}, Oi = (s, e, t, i) => (en(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), Se, Bt;
|
|
4261
4264
|
let oe = class extends Q {
|
|
4262
4265
|
constructor() {
|
|
4263
|
-
super(), Ai(this, Se, void 0), Ai(this, Bt, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter =
|
|
4266
|
+
super(), Ai(this, Se, void 0), Ai(this, Bt, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Xr(), this._emitter.on("*", (s, e) => this.dispatchEvent(
|
|
4264
4267
|
new CustomEvent(`iai-chat-${s.toString()}`, {
|
|
4265
4268
|
bubbles: !0,
|
|
4266
4269
|
// Allow events to be reached through other elements
|
|
@@ -4286,7 +4289,12 @@ let oe = class extends Q {
|
|
|
4286
4289
|
console.warn(`No function call handler found for ${n}`);
|
|
4287
4290
|
return;
|
|
4288
4291
|
}
|
|
4289
|
-
a.call(this, {
|
|
4292
|
+
a.call(this, {
|
|
4293
|
+
id: i,
|
|
4294
|
+
params: r,
|
|
4295
|
+
html: D,
|
|
4296
|
+
chatWindow: this
|
|
4297
|
+
});
|
|
4290
4298
|
}), this.chatManager.on("typing", (i) => {
|
|
4291
4299
|
this.showTyping = i;
|
|
4292
4300
|
}), this.chatManager.on("inputDisabled", (i) => {
|
|
@@ -4351,7 +4359,7 @@ let oe = class extends Q {
|
|
|
4351
4359
|
<div id="chat-container" class="flex-1 overflow-y-auto p-4 flex flex-col gap-2">
|
|
4352
4360
|
${this.chatMessage({ id: "intro-message", role: "assistant", content: this.cleanOptions.config.welcomeMessage })}
|
|
4353
4361
|
|
|
4354
|
-
${
|
|
4362
|
+
${Yr(this.messages, (t) => t.id, (t, i) => D`
|
|
4355
4363
|
<div>
|
|
4356
4364
|
${this.nameLabel(i)}
|
|
4357
4365
|
${this.chatMessage(t)}
|
|
@@ -4489,7 +4497,7 @@ let oe = class extends Q {
|
|
|
4489
4497
|
};
|
|
4490
4498
|
Se = /* @__PURE__ */ new WeakMap();
|
|
4491
4499
|
Bt = /* @__PURE__ */ new WeakMap();
|
|
4492
|
-
oe.styles = [
|
|
4500
|
+
oe.styles = [Pe, ot`
|
|
4493
4501
|
.header {
|
|
4494
4502
|
background-color: var(--iai-chat-i-header-bg);
|
|
4495
4503
|
color: var(--iai-chat-i-header-fg);
|
|
@@ -4531,7 +4539,7 @@ ke([
|
|
|
4531
4539
|
Ws.debounce(1)
|
|
4532
4540
|
], oe.prototype, "scrollChatToBottom", 1);
|
|
4533
4541
|
oe = ke([
|
|
4534
|
-
|
|
4542
|
+
Ne("iai-chat")
|
|
4535
4543
|
], oe);
|
|
4536
4544
|
var tn = { exports: {} };
|
|
4537
4545
|
(function(s) {
|
|
@@ -5296,7 +5304,7 @@ var tn = { exports: {} };
|
|
|
5296
5304
|
})();
|
|
5297
5305
|
})(tn);
|
|
5298
5306
|
var na = tn.exports;
|
|
5299
|
-
const ra = /* @__PURE__ */
|
|
5307
|
+
const ra = /* @__PURE__ */ Fi(na);
|
|
5300
5308
|
var aa = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, Vs = (s, e, t, i) => {
|
|
5301
5309
|
for (var n = i > 1 ? void 0 : i ? oa(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
5302
5310
|
(a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
|
|
@@ -5340,7 +5348,7 @@ let Pt = class extends Q {
|
|
|
5340
5348
|
`;
|
|
5341
5349
|
}
|
|
5342
5350
|
};
|
|
5343
|
-
Pt.styles = [
|
|
5351
|
+
Pt.styles = [Pe];
|
|
5344
5352
|
Vs([
|
|
5345
5353
|
W({ type: String })
|
|
5346
5354
|
], Pt.prototype, "src", 2);
|
|
@@ -5348,7 +5356,7 @@ Vs([
|
|
|
5348
5356
|
W({ type: Boolean })
|
|
5349
5357
|
], Pt.prototype, "showCloseButton", 2);
|
|
5350
5358
|
Pt = Vs([
|
|
5351
|
-
|
|
5359
|
+
Ne("iai-chat-iframe")
|
|
5352
5360
|
], Pt);
|
|
5353
5361
|
var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, lt = (s, e, t, i) => {
|
|
5354
5362
|
for (var n = i > 1 ? void 0 : i ? da(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
@@ -5401,7 +5409,7 @@ let Me = class extends Q {
|
|
|
5401
5409
|
`;
|
|
5402
5410
|
}
|
|
5403
5411
|
};
|
|
5404
|
-
Me.styles = [
|
|
5412
|
+
Me.styles = [Pe, ot`
|
|
5405
5413
|
.header {
|
|
5406
5414
|
background-color: var(--iai-chat-i-iframe-modal-header-bg);
|
|
5407
5415
|
color: var(--iai-chat-i-iframe-modal-header-fg);
|
|
@@ -5424,7 +5432,7 @@ lt([
|
|
|
5424
5432
|
W({ type: Boolean })
|
|
5425
5433
|
], Me.prototype, "showHeader", 2);
|
|
5426
5434
|
Me = lt([
|
|
5427
|
-
|
|
5435
|
+
Ne("iai-chat-iframe-modal")
|
|
5428
5436
|
], Me);
|
|
5429
5437
|
/**
|
|
5430
5438
|
* @license
|
|
@@ -5456,7 +5464,7 @@ var sn = { exports: {} };
|
|
|
5456
5464
|
(function(s, e) {
|
|
5457
5465
|
(function(t, i) {
|
|
5458
5466
|
s.exports = i();
|
|
5459
|
-
})(
|
|
5467
|
+
})(Un, function() {
|
|
5460
5468
|
function t(o) {
|
|
5461
5469
|
return o.replace(/\\([(){}[\]#*+\-.!_\\])/g, function(c, l) {
|
|
5462
5470
|
return String.fromCharCode(1, n.indexOf(l) + r);
|
|
@@ -5516,7 +5524,7 @@ var sn = { exports: {} };
|
|
|
5516
5524
|
});
|
|
5517
5525
|
})(sn);
|
|
5518
5526
|
var ua = sn.exports;
|
|
5519
|
-
const ha = /* @__PURE__ */
|
|
5527
|
+
const ha = /* @__PURE__ */ Fi(ua);
|
|
5520
5528
|
var pa = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, nn = (s, e, t, i) => {
|
|
5521
5529
|
for (var n = i > 1 ? void 0 : i ? ma(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
5522
5530
|
(a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
|
|
@@ -5539,7 +5547,7 @@ let ns = class extends Q {
|
|
|
5539
5547
|
`;
|
|
5540
5548
|
}
|
|
5541
5549
|
};
|
|
5542
|
-
ns.styles = [
|
|
5550
|
+
ns.styles = [Pe, ot`
|
|
5543
5551
|
.message {
|
|
5544
5552
|
background-color: var(--iai-chat-i-message-assistant-bg);
|
|
5545
5553
|
color: var(--iai-chat-i-message-assistant-fg);
|
|
@@ -5573,7 +5581,7 @@ nn([
|
|
|
5573
5581
|
W({ type: String })
|
|
5574
5582
|
], ns.prototype, "content", 2);
|
|
5575
5583
|
ns = nn([
|
|
5576
|
-
|
|
5584
|
+
Ne("iai-chat-message-assistant")
|
|
5577
5585
|
], ns);
|
|
5578
5586
|
async function fa(s, e) {
|
|
5579
5587
|
const { type: t, params: i } = s, n = e[t];
|
|
@@ -5594,7 +5602,6 @@ let Ge = class extends Q {
|
|
|
5594
5602
|
if (super.connectedCallback(), this.enhancedContent)
|
|
5595
5603
|
try {
|
|
5596
5604
|
this.contentHtmlTemplate = await fa(this.enhancedContent, this.options.handlers.enhancedContent);
|
|
5597
|
-
return;
|
|
5598
5605
|
} catch (s) {
|
|
5599
5606
|
console.warn("Error processing enhanced content", s);
|
|
5600
5607
|
}
|
|
@@ -5609,7 +5616,7 @@ let Ge = class extends Q {
|
|
|
5609
5616
|
`;
|
|
5610
5617
|
}
|
|
5611
5618
|
};
|
|
5612
|
-
Ge.styles = [
|
|
5619
|
+
Ge.styles = [Pe];
|
|
5613
5620
|
Dt([
|
|
5614
5621
|
W({ type: Object })
|
|
5615
5622
|
], Ge.prototype, "options", 2);
|
|
@@ -5623,7 +5630,7 @@ Dt([
|
|
|
5623
5630
|
W()
|
|
5624
5631
|
], Ge.prototype, "contentHtmlTemplate", 2);
|
|
5625
5632
|
Ge = Dt([
|
|
5626
|
-
|
|
5633
|
+
Ne("iai-chat-message-system")
|
|
5627
5634
|
], Ge);
|
|
5628
5635
|
var va = Object.defineProperty, ba = Object.getOwnPropertyDescriptor, rn = (s, e, t, i) => {
|
|
5629
5636
|
for (var n = i > 1 ? void 0 : i ? ba(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
@@ -5644,7 +5651,7 @@ let rs = class extends Q {
|
|
|
5644
5651
|
`;
|
|
5645
5652
|
}
|
|
5646
5653
|
};
|
|
5647
|
-
rs.styles = [
|
|
5654
|
+
rs.styles = [Pe, ot`
|
|
5648
5655
|
.message {
|
|
5649
5656
|
background-color: var(--iai-chat-i-message-user-bg);
|
|
5650
5657
|
color: var(--iai-chat-i-message-user-fg);
|
|
@@ -5654,7 +5661,7 @@ rn([
|
|
|
5654
5661
|
W({ type: String })
|
|
5655
5662
|
], rs.prototype, "content", 2);
|
|
5656
5663
|
rs = rn([
|
|
5657
|
-
|
|
5664
|
+
Ne("iai-chat-message-user")
|
|
5658
5665
|
], rs);
|
|
5659
5666
|
var wa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, ps = (s, e, t, i) => {
|
|
5660
5667
|
for (var n = i > 1 ? void 0 : i ? _a(e, t) : e, r = s.length - 1, a; r >= 0; r--)
|
|
@@ -5667,7 +5674,12 @@ let at = class extends Q {
|
|
|
5667
5674
|
}
|
|
5668
5675
|
render() {
|
|
5669
5676
|
const {
|
|
5670
|
-
openChatButton: {
|
|
5677
|
+
openChatButton: {
|
|
5678
|
+
width: s,
|
|
5679
|
+
height: e,
|
|
5680
|
+
imageSrc: t,
|
|
5681
|
+
cta: i
|
|
5682
|
+
},
|
|
5671
5683
|
placement: n
|
|
5672
5684
|
} = this.options.config, r = tt({ alignItems: n !== "left" ? "end" : "start" }), a = tt({ width: s, height: e });
|
|
5673
5685
|
return D`
|
|
@@ -5708,7 +5720,7 @@ let at = class extends Q {
|
|
|
5708
5720
|
this.dispatchEvent(new CustomEvent("toggle-chat"));
|
|
5709
5721
|
}
|
|
5710
5722
|
};
|
|
5711
|
-
at.styles = [
|
|
5723
|
+
at.styles = [Pe, ot`
|
|
5712
5724
|
.button {
|
|
5713
5725
|
background-color: var(--iai-chat-i-ocb-bg);
|
|
5714
5726
|
color: var(--iai-chat-i-ocb-fg);
|
|
@@ -5724,7 +5736,7 @@ ps([
|
|
|
5724
5736
|
dt()
|
|
5725
5737
|
], at.prototype, "isCtaOpen", 2);
|
|
5726
5738
|
at = ps([
|
|
5727
|
-
|
|
5739
|
+
Ne("iai-chat-open-chat-button")
|
|
5728
5740
|
], at);
|
|
5729
5741
|
function xa(s) {
|
|
5730
5742
|
return s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -5756,20 +5768,52 @@ class ka {
|
|
|
5756
5768
|
(e = this.widget) == null || e.remove(), this.widget = null;
|
|
5757
5769
|
}
|
|
5758
5770
|
}
|
|
5759
|
-
|
|
5760
|
-
(
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5771
|
+
function Ea(s) {
|
|
5772
|
+
return async function({ id: t, params: i, chatWindow: n }) {
|
|
5773
|
+
n.setInputDisabled(!0);
|
|
5774
|
+
const r = {
|
|
5775
|
+
...i.guestCardId && { guestCardId: i.guestCardId },
|
|
5776
|
+
...i.customerFirstName && { firstName: i.customerFirstName },
|
|
5777
|
+
...i.customerLastName && { lastName: i.customerLastName },
|
|
5778
|
+
...i.customerEmail && { email: i.customerEmail },
|
|
5779
|
+
...i.customerPhoneNumber && { phone: i.customerPhoneNumber },
|
|
5780
|
+
...i.desiredMoveInDate && { moveInDate: i.desiredMoveInDate }
|
|
5781
|
+
}, a = document.createElement("iai-chat-iframe-modal");
|
|
5782
|
+
a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
|
|
5783
|
+
const o = () => {
|
|
5784
|
+
a.remove(), window.removeEventListener("beforeunload", h), n.setInputDisabled(!1);
|
|
5785
|
+
}, c = async ({ detail: p }) => {
|
|
5786
|
+
if (p.type !== "tourScheduled")
|
|
5787
|
+
return;
|
|
5788
|
+
const { tourType: d, tourDate: w, tourTime: N } = p;
|
|
5789
|
+
o(), n.addMessage({
|
|
5790
|
+
role: "system",
|
|
5791
|
+
content: "Your tour has been scheduled!"
|
|
5792
|
+
}), await n.sendFunctionCallResponse(t, {
|
|
5793
|
+
status: "scheduled",
|
|
5794
|
+
tourType: d,
|
|
5795
|
+
tourDate: w,
|
|
5796
|
+
tourTime: N
|
|
5797
|
+
}, !0);
|
|
5798
|
+
}, l = async () => {
|
|
5799
|
+
o(), n.addMessage({
|
|
5800
|
+
role: "system",
|
|
5801
|
+
content: "Tour Scheduler Closed"
|
|
5802
|
+
}), await n.sendFunctionCallResponse(t, {
|
|
5803
|
+
status: "canceled"
|
|
5804
|
+
}, !0);
|
|
5805
|
+
}, h = async () => {
|
|
5806
|
+
o(), n.addMessage({
|
|
5807
|
+
role: "system",
|
|
5808
|
+
content: "Tour Scheduler Closed"
|
|
5809
|
+
});
|
|
5810
|
+
};
|
|
5811
|
+
a.addEventListener("message-received", c), a.addEventListener("close", l), window.addEventListener("beforeunload", h), document.body.appendChild(a), n.addMessage({
|
|
5812
|
+
role: "system",
|
|
5813
|
+
content: "Tour Scheduler Opened"
|
|
5814
|
+
});
|
|
5815
|
+
};
|
|
5816
|
+
}
|
|
5773
5817
|
function on(s) {
|
|
5774
5818
|
return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
5775
5819
|
var i = s.get(e);
|
|
@@ -5786,7 +5830,7 @@ function on(s) {
|
|
|
5786
5830
|
});
|
|
5787
5831
|
} };
|
|
5788
5832
|
}
|
|
5789
|
-
class
|
|
5833
|
+
class Ta {
|
|
5790
5834
|
constructor(e) {
|
|
5791
5835
|
this.chatWsUrl = e, this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), this.reconnectCodes = /* @__PURE__ */ new Set([
|
|
5792
5836
|
1006
|
|
@@ -5817,9 +5861,23 @@ class Ea {
|
|
|
5817
5861
|
this.disconnect(), this._emitter.all.clear();
|
|
5818
5862
|
}
|
|
5819
5863
|
}
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5864
|
+
var as;
|
|
5865
|
+
((s) => {
|
|
5866
|
+
((e) => {
|
|
5867
|
+
e.TEXT = "TEXT";
|
|
5868
|
+
})(s.MessageType || (s.MessageType = {})), ((e) => {
|
|
5869
|
+
e.DELIVERED = "DELIVERED", e.READ = "READ", e.FAILED = "FAILED";
|
|
5870
|
+
})(s.AcknowledgeType || (s.AcknowledgeType = {})), ((e) => {
|
|
5871
|
+
e.GENERIC = "GENERIC", e.SMS = "SMS", e.RCS = "RCS", e.FACEBOOK = "FACEBOOK", e.TWITTER = "TWITTER", e.WHATSAPP = "WHATSAPP", e.WECHAT = "WECHAT", e.QQMOBILE = "QQMOBILE", e.APPLE_BUSINESS_CHAT = "APPLE_BUSINESS_CHAT", e.SKYPE = "SKYPE", e.SNAPCHAT = "SNAPCHAT", e.VIBER = "VIBER", e.LINE = "LINE", e.TELEGRAM = "TELEGRAM", e.KAKAO = "KAKAO";
|
|
5872
|
+
})(s.ContentType || (s.ContentType = {})), ((e) => {
|
|
5873
|
+
e.SYSTEM = "SYSTEM", e.USER = "USER";
|
|
5874
|
+
})(s.ConversationEventOrigin || (s.ConversationEventOrigin = {})), ((e) => {
|
|
5875
|
+
e.PENDING = "PENDING", e.ACTIVE = "ACTIVE", e.TERMINATED = "TERMINATED";
|
|
5876
|
+
})(s.ConversationStatus || (s.ConversationStatus = {}));
|
|
5877
|
+
})(as || (as = {}));
|
|
5878
|
+
const Sa = as.AcknowledgeType, Ca = "Anyone Home", $a = "IB Chat Leasing - Development";
|
|
5879
|
+
let Aa = "https://five9.ah.inhabit.work";
|
|
5880
|
+
const Oa = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
|
|
5823
5881
|
var be, Ue;
|
|
5824
5882
|
const yt = class yt {
|
|
5825
5883
|
constructor() {
|
|
@@ -5848,7 +5906,7 @@ const yt = class yt {
|
|
|
5848
5906
|
"Content-Type": "application/json",
|
|
5849
5907
|
Accept: "application/json"
|
|
5850
5908
|
},
|
|
5851
|
-
body: JSON.stringify({ tenantName:
|
|
5909
|
+
body: JSON.stringify({ tenantName: Ca })
|
|
5852
5910
|
});
|
|
5853
5911
|
return Te(this, be, await e.json()), zt(this, be);
|
|
5854
5912
|
}
|
|
@@ -5869,7 +5927,7 @@ const yt = class yt {
|
|
|
5869
5927
|
if (!this.conversationId)
|
|
5870
5928
|
throw new Error("Conversation not started");
|
|
5871
5929
|
this.five9WebSocket && this.five9WebSocket.destroy();
|
|
5872
|
-
const e = new
|
|
5930
|
+
const e = new Ta(`${Oa}/conversations/${this.conversationId}/ws`);
|
|
5873
5931
|
e.on("*", (t, i) => {
|
|
5874
5932
|
this._emitter.emit(t, i);
|
|
5875
5933
|
}), e.on("conversationCreated", (t) => {
|
|
@@ -5891,7 +5949,7 @@ const yt = class yt {
|
|
|
5891
5949
|
messages: [
|
|
5892
5950
|
{
|
|
5893
5951
|
messageId: t.messageId,
|
|
5894
|
-
type:
|
|
5952
|
+
type: Sa.READ
|
|
5895
5953
|
}
|
|
5896
5954
|
]
|
|
5897
5955
|
});
|
|
@@ -5921,7 +5979,7 @@ const yt = class yt {
|
|
|
5921
5979
|
async getMetadata() {
|
|
5922
5980
|
if (!this.sessionToken)
|
|
5923
5981
|
throw new Error("Session not created");
|
|
5924
|
-
return
|
|
5982
|
+
return this.authenticatedFetch("/auth/metadata", {
|
|
5925
5983
|
method: "GET"
|
|
5926
5984
|
});
|
|
5927
5985
|
}
|
|
@@ -5935,9 +5993,9 @@ const yt = class yt {
|
|
|
5935
5993
|
});
|
|
5936
5994
|
const i = {
|
|
5937
5995
|
...e,
|
|
5938
|
-
campaignName:
|
|
5996
|
+
campaignName: $a,
|
|
5939
5997
|
tenantId: this.tenantId,
|
|
5940
|
-
callbackUrl:
|
|
5998
|
+
callbackUrl: Aa
|
|
5941
5999
|
};
|
|
5942
6000
|
console.log("body", i);
|
|
5943
6001
|
const n = await this.authenticatedFetch("/conversations", {
|
|
@@ -6020,7 +6078,7 @@ let os = yt;
|
|
|
6020
6078
|
function gt(s) {
|
|
6021
6079
|
return `any-${s || "main"}-chatSession`;
|
|
6022
6080
|
}
|
|
6023
|
-
async function
|
|
6081
|
+
async function Ia({
|
|
6024
6082
|
id: s,
|
|
6025
6083
|
params: e,
|
|
6026
6084
|
chatWindow: t,
|
|
@@ -6135,9 +6193,7 @@ function cn(s, e) {
|
|
|
6135
6193
|
s.addMessage({
|
|
6136
6194
|
role: "system",
|
|
6137
6195
|
content: "The chat has ended"
|
|
6138
|
-
}), s.setInputDisabled(!0), localStorage.removeItem(
|
|
6139
|
-
gt(s.cleanOptions.config.historyKey)
|
|
6140
|
-
);
|
|
6196
|
+
}), s.setInputDisabled(!0), localStorage.removeItem(gt(s.cleanOptions.config.historyKey));
|
|
6141
6197
|
}
|
|
6142
6198
|
), e.on("message", (r) => {
|
|
6143
6199
|
switch (r.from) {
|
|
@@ -6165,68 +6221,11 @@ function cn(s, e) {
|
|
|
6165
6221
|
content: r.detail.message
|
|
6166
6222
|
}), await e.sendMessage(r.detail.message);
|
|
6167
6223
|
}, i = async () => {
|
|
6168
|
-
console.log("destroyed fired"), e.destroy(), s.removeEventListener(
|
|
6169
|
-
"iai-chat-send-user-message",
|
|
6170
|
-
t
|
|
6171
|
-
), s.removeEventListener("iai-chat-reset", n), s.removeEventListener(
|
|
6172
|
-
"iai-chat-destroy",
|
|
6173
|
-
i
|
|
6174
|
-
);
|
|
6224
|
+
console.log("destroyed fired"), e.destroy(), s.removeEventListener("iai-chat-send-user-message", t), s.removeEventListener("iai-chat-reset", n), s.removeEventListener("iai-chat-destroy", i);
|
|
6175
6225
|
}, n = async () => {
|
|
6176
|
-
console.log("reset fired"), await e.terminateConversation(), await i(), localStorage.removeItem(
|
|
6177
|
-
gt(s.cleanOptions.config.historyKey)
|
|
6178
|
-
);
|
|
6179
|
-
};
|
|
6180
|
-
s.addEventListener(
|
|
6181
|
-
"iai-chat-send-user-message",
|
|
6182
|
-
t
|
|
6183
|
-
), s.addEventListener("iai-chat-reset", n), s.addEventListener("iai-chat-destroy", i);
|
|
6184
|
-
}
|
|
6185
|
-
function Ia(s) {
|
|
6186
|
-
return async function({ id: t, params: i, chatWindow: n }) {
|
|
6187
|
-
n.setInputDisabled(!0);
|
|
6188
|
-
const r = {
|
|
6189
|
-
...i.guestCardId && { guestCardId: i.guestCardId },
|
|
6190
|
-
...i.customerFirstName && { firstName: i.customerFirstName },
|
|
6191
|
-
...i.customerLastName && { lastName: i.customerLastName },
|
|
6192
|
-
...i.customerEmail && { email: i.customerEmail },
|
|
6193
|
-
...i.customerPhoneNumber && { phone: i.customerPhoneNumber },
|
|
6194
|
-
...i.desiredMoveInDate && { moveInDate: i.desiredMoveInDate }
|
|
6195
|
-
}, a = document.createElement("iai-chat-iframe-modal");
|
|
6196
|
-
a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
|
|
6197
|
-
const o = () => {
|
|
6198
|
-
a.remove(), window.removeEventListener("beforeunload", h), n.setInputDisabled(!1);
|
|
6199
|
-
}, c = async ({ detail: p }) => {
|
|
6200
|
-
if (p.type !== "tourScheduled")
|
|
6201
|
-
return;
|
|
6202
|
-
const { tourType: d, tourDate: w, tourTime: N } = p;
|
|
6203
|
-
o(), n.addMessage({
|
|
6204
|
-
role: "system",
|
|
6205
|
-
content: "Your tour has been scheduled!"
|
|
6206
|
-
}), await n.sendFunctionCallResponse(t, {
|
|
6207
|
-
status: "scheduled",
|
|
6208
|
-
tourType: d,
|
|
6209
|
-
tourDate: w,
|
|
6210
|
-
tourTime: N
|
|
6211
|
-
}, !0);
|
|
6212
|
-
}, l = async () => {
|
|
6213
|
-
o(), n.addMessage({
|
|
6214
|
-
role: "system",
|
|
6215
|
-
content: "Tour Scheduler Closed"
|
|
6216
|
-
}), await n.sendFunctionCallResponse(t, {
|
|
6217
|
-
status: "canceled"
|
|
6218
|
-
}, !0);
|
|
6219
|
-
}, h = async () => {
|
|
6220
|
-
o(), n.addMessage({
|
|
6221
|
-
role: "system",
|
|
6222
|
-
content: "Tour Scheduler Closed"
|
|
6223
|
-
});
|
|
6224
|
-
};
|
|
6225
|
-
a.addEventListener("message-received", c), a.addEventListener("close", l), window.addEventListener("beforeunload", h), document.body.appendChild(a), n.addMessage({
|
|
6226
|
-
role: "system",
|
|
6227
|
-
content: "Tour Scheduler Opened"
|
|
6228
|
-
});
|
|
6226
|
+
console.log("reset fired"), await e.terminateConversation(), await i(), localStorage.removeItem(gt(s.cleanOptions.config.historyKey));
|
|
6229
6227
|
};
|
|
6228
|
+
s.addEventListener("iai-chat-send-user-message", t), s.addEventListener("iai-chat-reset", n), s.addEventListener("iai-chat-destroy", i);
|
|
6230
6229
|
}
|
|
6231
6230
|
class Na {
|
|
6232
6231
|
constructor(e, t) {
|
|
@@ -6234,7 +6233,7 @@ class Na {
|
|
|
6234
6233
|
assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
|
|
6235
6234
|
...e
|
|
6236
6235
|
});
|
|
6237
|
-
i.handlers.functionCalls.transferToLiveAgent =
|
|
6236
|
+
i.handlers.functionCalls.transferToLiveAgent = Ia, i.handlers.functionCalls.showScheduleTourWidget = Ea(t.schedulerUrl), this.chatWidget = new ka(i);
|
|
6238
6237
|
const n = localStorage.getItem(gt(i.config.historyKey));
|
|
6239
6238
|
if (n) {
|
|
6240
6239
|
const r = os.deserialize(n);
|