@iai-lib/any-chat-widget 0.1.0-alpha.13 → 0.1.0-alpha.15

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.
@@ -1,30 +1,30 @@
1
- var ri = (s, e, t) => {
1
+ var ai = (s, e, t) => {
2
2
  if (!e.has(s))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var Zt = (s, e, t) => (ri(s, e, "read from private field"), t ? t.call(s) : e.get(s)), $s = (s, e, t) => {
5
+ var zt = (s, e, t) => (ai(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Cs = (s, e, t) => {
6
6
  if (e.has(s))
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
- }, Se = (s, e, t, i) => (ri(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
9
+ }, Te = (s, e, t, i) => (ai(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
10
10
  /**
11
11
  * @license
12
12
  * Copyright 2019 Google LLC
13
13
  * SPDX-License-Identifier: BSD-3-Clause
14
14
  */
15
- const Lt = globalThis, Rs = Lt.ShadowRoot && (Lt.ShadyCSS === void 0 || Lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Zs = Symbol(), ai = /* @__PURE__ */ new WeakMap();
16
- let Oi = class {
15
+ const Ut = globalThis, Zs = Ut.ShadowRoot && (Ut.ShadyCSS === void 0 || Ut.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ls = Symbol(), oi = /* @__PURE__ */ new WeakMap();
16
+ let Ii = class {
17
17
  constructor(s, e, t) {
18
- if (this._$cssResult$ = !0, t !== Zs)
18
+ if (this._$cssResult$ = !0, t !== Ls)
19
19
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
20
  this.cssText = s, this.t = e;
21
21
  }
22
22
  get styleSheet() {
23
23
  let s = this.o;
24
24
  const e = this.t;
25
- if (Rs && s === void 0) {
25
+ if (Zs && s === void 0) {
26
26
  const t = e !== void 0 && e.length === 1;
27
- t && (s = ai.get(e)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), t && ai.set(e, s));
27
+ t && (s = oi.get(e)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), t && oi.set(e, s));
28
28
  }
29
29
  return s;
30
30
  }
@@ -32,7 +32,7 @@ let Oi = class {
32
32
  return this.cssText;
33
33
  }
34
34
  };
35
- const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s, ...e) => {
35
+ const gn = (s) => new Ii(typeof s == "string" ? s : s + "", void 0, Ls), ot = (s, ...e) => {
36
36
  const t = s.length === 1 ? s[0] : e.reduce((i, n, r) => i + ((a) => {
37
37
  if (a._$cssResult$ === !0)
38
38
  return a.cssText;
@@ -40,16 +40,16 @@ const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s
40
40
  return a;
41
41
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
42
42
  })(n) + s[r + 1], s[0]);
43
- return new Oi(t, s, Zs);
43
+ return new Ii(t, s, Ls);
44
44
  }, yn = (s, e) => {
45
- if (Rs)
45
+ if (Zs)
46
46
  s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
47
47
  else
48
48
  for (const t of e) {
49
- const i = document.createElement("style"), n = Lt.litNonce;
49
+ const i = document.createElement("style"), n = Ut.litNonce;
50
50
  n !== void 0 && i.setAttribute("nonce", n), i.textContent = t.cssText, s.appendChild(i);
51
51
  }
52
- }, oi = Rs ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
52
+ }, ci = Zs ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
53
53
  let t = "";
54
54
  for (const i of e.cssRules)
55
55
  t += i.cssText;
@@ -60,10 +60,10 @@ const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s
60
60
  * Copyright 2017 Google LLC
61
61
  * SPDX-License-Identifier: BSD-3-Clause
62
62
  */
63
- const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnPropertyNames: _n, getOwnPropertySymbols: xn, getPrototypeOf: kn } = Object, tt = globalThis, ci = tt.trustedTypes, Tn = ci ? ci.emptyScript : "", di = tt.reactiveElementPolyfillSupport, lt = (s, e) => s, Ut = { toAttribute(s, e) {
63
+ const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnPropertyNames: _n, getOwnPropertySymbols: xn, getPrototypeOf: kn } = Object, it = globalThis, di = it.trustedTypes, Sn = di ? di.emptyScript : "", li = it.reactiveElementPolyfillSupport, pt = (s, e) => s, Ft = { toAttribute(s, e) {
64
64
  switch (e) {
65
65
  case Boolean:
66
- s = s ? Tn : null;
66
+ s = s ? Sn : null;
67
67
  break;
68
68
  case Object:
69
69
  case Array:
@@ -88,16 +88,16 @@ const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnProperty
88
88
  }
89
89
  }
90
90
  return t;
91
- } }, Ls = (s, e) => !vn(s, e), li = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged: Ls };
92
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), tt.litPropertyMetadata ?? (tt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
93
- class Ge extends HTMLElement {
91
+ } }, Ds = (s, e) => !vn(s, e), ui = { attribute: !0, type: String, converter: Ft, reflect: !1, hasChanged: Ds };
92
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), it.litPropertyMetadata ?? (it.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
93
+ class Qe extends HTMLElement {
94
94
  static addInitializer(e) {
95
95
  this._$Ei(), (this.l ?? (this.l = [])).push(e);
96
96
  }
97
97
  static get observedAttributes() {
98
98
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
99
99
  }
100
- static createProperty(e, t = li) {
100
+ static createProperty(e, t = ui) {
101
101
  if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
102
102
  const i = Symbol(), n = this.getPropertyDescriptor(e, i, t);
103
103
  n !== void 0 && bn(this.prototype, e, n);
@@ -117,18 +117,18 @@ class Ge extends HTMLElement {
117
117
  }, configurable: !0, enumerable: !0 };
118
118
  }
119
119
  static getPropertyOptions(e) {
120
- return this.elementProperties.get(e) ?? li;
120
+ return this.elementProperties.get(e) ?? ui;
121
121
  }
122
122
  static _$Ei() {
123
- if (this.hasOwnProperty(lt("elementProperties")))
123
+ if (this.hasOwnProperty(pt("elementProperties")))
124
124
  return;
125
125
  const e = kn(this);
126
126
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
127
127
  }
128
128
  static finalize() {
129
- if (this.hasOwnProperty(lt("finalized")))
129
+ if (this.hasOwnProperty(pt("finalized")))
130
130
  return;
131
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(lt("properties"))) {
131
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(pt("properties"))) {
132
132
  const t = this.properties, i = [..._n(t), ...xn(t)];
133
133
  for (const n of i)
134
134
  this.createProperty(n, t[n]);
@@ -152,9 +152,9 @@ class Ge extends HTMLElement {
152
152
  if (Array.isArray(e)) {
153
153
  const i = new Set(e.flat(1 / 0).reverse());
154
154
  for (const n of i)
155
- t.unshift(oi(n));
155
+ t.unshift(ci(n));
156
156
  } else
157
- e !== void 0 && t.push(oi(e));
157
+ e !== void 0 && t.push(ci(e));
158
158
  return t;
159
159
  }
160
160
  static _$Eu(e, t) {
@@ -209,7 +209,7 @@ class Ge extends HTMLElement {
209
209
  var i;
210
210
  const n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
211
211
  if (r !== void 0 && n.reflect === !0) {
212
- const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Ut).toAttribute(t, n.type);
212
+ const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Ft).toAttribute(t, n.type);
213
213
  this._$Em = e, a == null ? this.removeAttribute(r) : this.setAttribute(r, a), this._$Em = null;
214
214
  }
215
215
  }
@@ -217,13 +217,13 @@ class Ge extends HTMLElement {
217
217
  var i;
218
218
  const n = this.constructor, r = n._$Eh.get(e);
219
219
  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 : Ut;
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 : Ft;
221
221
  this._$Em = r, this[r] = o.fromAttribute(t, a.type), this._$Em = null;
222
222
  }
223
223
  }
224
224
  requestUpdate(e, t, i) {
225
225
  if (e !== void 0) {
226
- if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ?? Ls)(this[e], t))
226
+ if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ?? Ds)(this[e], t))
227
227
  return;
228
228
  this.P(e, t, i);
229
229
  }
@@ -301,63 +301,63 @@ class Ge extends HTMLElement {
301
301
  firstUpdated(e) {
302
302
  }
303
303
  }
304
- Ge.elementStyles = [], Ge.shadowRootOptions = { mode: "open" }, Ge[lt("elementProperties")] = /* @__PURE__ */ new Map(), Ge[lt("finalized")] = /* @__PURE__ */ new Map(), di == null || di({ ReactiveElement: Ge }), (tt.reactiveElementVersions ?? (tt.reactiveElementVersions = [])).push("2.0.4");
304
+ Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, Qe[pt("elementProperties")] = /* @__PURE__ */ new Map(), Qe[pt("finalized")] = /* @__PURE__ */ new Map(), li == null || li({ ReactiveElement: Qe }), (it.reactiveElementVersions ?? (it.reactiveElementVersions = [])).push("2.0.4");
305
305
  /**
306
306
  * @license
307
307
  * Copyright 2017 Google LLC
308
308
  * SPDX-License-Identifier: BSD-3-Clause
309
309
  */
310
- const Ht = globalThis, Bt = Ht.trustedTypes, ui = Bt ? Bt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, zs = "$lit$", we = `lit$${(Math.random() + "").slice(9)}$`, Ds = "?" + we, Sn = `<${Ds}>`, He = document, gt = () => He.createComment(""), yt = (s) => s === null || typeof s != "object" && typeof s != "function", Ii = Array.isArray, Mi = (s) => Ii(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Es = `[
311
- \f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, hi = /-->/g, pi = />/g, je = RegExp(`>|${Es}(?:([^\\s"'>=/]+)(${Es}*=${Es}*(?:[^
312
- \f\r"'\`<>=]|("|')|))|$)`, "g"), mi = /'/g, fi = /"/g, Ni = /^(?:script|style|textarea|title)$/i, $n = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), z = $n(1), le = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), gi = /* @__PURE__ */ new WeakMap(), Le = He.createTreeWalker(He, 129);
313
- function Pi(s, e) {
310
+ const Vt = globalThis, Wt = Vt.trustedTypes, hi = Wt ? Wt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, zs = "$lit$", we = `lit$${(Math.random() + "").slice(9)}$`, Us = "?" + we, Tn = `<${Us}>`, Fe = document, vt = () => Fe.createComment(""), bt = (s) => s === null || typeof s != "object" && typeof s != "function", Mi = Array.isArray, Ni = (s) => Mi(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", As = `[
311
+ \f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pi = /-->/g, mi = />/g, Ze = RegExp(`>|${As}(?:([^\\s"'>=/]+)(${As}*=${As}*(?:[^
312
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), fi = /'/g, gi = /"/g, Pi = /^(?:script|style|textarea|title)$/i, $n = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), L = $n(1), le = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), yi = /* @__PURE__ */ new WeakMap(), ze = Fe.createTreeWalker(Fe, 129);
313
+ function ji(s, e) {
314
314
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
315
315
  throw Error("invalid template strings array");
316
- return ui !== void 0 ? ui.createHTML(e) : e;
316
+ return hi !== void 0 ? hi.createHTML(e) : e;
317
317
  }
318
- const ji = (s, e) => {
318
+ const Ri = (s, e) => {
319
319
  const t = s.length - 1, i = [];
320
- let n, r = e === 2 ? "<svg>" : "", a = ct;
320
+ let n, r = e === 2 ? "<svg>" : "", a = ut;
321
321
  for (let o = 0; o < t; o++) {
322
322
  const c = s[o];
323
323
  let l, h, p = -1, d = 0;
324
324
  for (; d < c.length && (a.lastIndex = d, h = a.exec(c), h !== null); )
325
- d = a.lastIndex, a === ct ? h[1] === "!--" ? a = hi : h[1] !== void 0 ? a = pi : h[2] !== void 0 ? (Ni.test(h[2]) && (n = RegExp("</" + h[2], "g")), a = je) : h[3] !== void 0 && (a = je) : a === je ? h[0] === ">" ? (a = n ?? ct, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, l = h[1], a = h[3] === void 0 ? je : h[3] === '"' ? fi : mi) : a === fi || a === mi ? a = je : a === hi || a === pi ? a = ct : (a = je, n = void 0);
326
- const b = a === je && s[o + 1].startsWith("/>") ? " " : "";
327
- r += a === ct ? c + Sn : p >= 0 ? (i.push(l), c.slice(0, p) + zs + c.slice(p) + we + b) : c + we + (p === -2 ? o : b);
325
+ d = a.lastIndex, a === ut ? h[1] === "!--" ? a = pi : h[1] !== void 0 ? a = mi : h[2] !== void 0 ? (Pi.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] === '"' ? gi : fi) : a === gi || a === fi ? a = Ze : a === pi || a === mi ? a = ut : (a = Ze, n = void 0);
326
+ const b = a === Ze && s[o + 1].startsWith("/>") ? " " : "";
327
+ r += a === ut ? c + Tn : p >= 0 ? (i.push(l), c.slice(0, p) + zs + c.slice(p) + we + b) : c + we + (p === -2 ? o : b);
328
328
  }
329
- return [Pi(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
329
+ return [ji(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
330
330
  };
331
- class vt {
331
+ class wt {
332
332
  constructor({ strings: e, _$litType$: t }, i) {
333
333
  let n;
334
334
  this.parts = [];
335
335
  let r = 0, a = 0;
336
- const o = e.length - 1, c = this.parts, [l, h] = ji(e, t);
337
- if (this.el = vt.createElement(l, i), Le.currentNode = this.el.content, t === 2) {
336
+ const o = e.length - 1, c = this.parts, [l, h] = Ri(e, t);
337
+ if (this.el = wt.createElement(l, i), ze.currentNode = this.el.content, t === 2) {
338
338
  const p = this.el.content.firstChild;
339
339
  p.replaceWith(...p.childNodes);
340
340
  }
341
- for (; (n = Le.nextNode()) !== null && c.length < o; ) {
341
+ for (; (n = ze.nextNode()) !== null && c.length < o; ) {
342
342
  if (n.nodeType === 1) {
343
343
  if (n.hasAttributes())
344
344
  for (const p of n.getAttributeNames())
345
345
  if (p.endsWith(zs)) {
346
346
  const d = h[a++], b = n.getAttribute(p).split(we), N = /([.?@])?(.*)/.exec(d);
347
- c.push({ type: 1, index: r, name: N[2], strings: b, ctor: N[1] === "." ? Zi : N[1] === "?" ? Li : N[1] === "@" ? zi : Mt }), n.removeAttribute(p);
347
+ c.push({ type: 1, index: r, name: N[2], strings: b, ctor: N[1] === "." ? Li : N[1] === "?" ? Di : N[1] === "@" ? zi : jt }), n.removeAttribute(p);
348
348
  } else
349
349
  p.startsWith(we) && (c.push({ type: 6, index: r }), n.removeAttribute(p));
350
- if (Ni.test(n.tagName)) {
350
+ if (Pi.test(n.tagName)) {
351
351
  const p = n.textContent.split(we), d = p.length - 1;
352
352
  if (d > 0) {
353
- n.textContent = Bt ? Bt.emptyScript : "";
353
+ n.textContent = Wt ? Wt.emptyScript : "";
354
354
  for (let b = 0; b < d; b++)
355
- n.append(p[b], gt()), Le.nextNode(), c.push({ type: 2, index: ++r });
356
- n.append(p[d], gt());
355
+ n.append(p[b], vt()), ze.nextNode(), c.push({ type: 2, index: ++r });
356
+ n.append(p[d], vt());
357
357
  }
358
358
  }
359
359
  } else if (n.nodeType === 8)
360
- if (n.data === Ds)
360
+ if (n.data === Us)
361
361
  c.push({ type: 2, index: r });
362
362
  else {
363
363
  let p = -1;
@@ -368,19 +368,19 @@ class vt {
368
368
  }
369
369
  }
370
370
  static createElement(e, t) {
371
- const i = He.createElement("template");
371
+ const i = Fe.createElement("template");
372
372
  return i.innerHTML = e, i;
373
373
  }
374
374
  }
375
- function Be(s, e, t = s, i) {
375
+ function Ve(s, e, t = s, i) {
376
376
  var n, r;
377
377
  if (e === le)
378
378
  return e;
379
379
  let a = i !== void 0 ? (n = t._$Co) == null ? void 0 : n[i] : t._$Cl;
380
- const o = yt(e) ? void 0 : e._$litDirective$;
381
- return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = a : t._$Cl = a), a !== void 0 && (e = Be(s, a._$AS(s, e.values), a, i)), e;
380
+ const o = bt(e) ? void 0 : e._$litDirective$;
381
+ return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = a : t._$Cl = a), a !== void 0 && (e = Ve(s, a._$AS(s, e.values), a, i)), e;
382
382
  }
383
- class Ri {
383
+ class Zi {
384
384
  constructor(e, t) {
385
385
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
386
386
  }
@@ -391,17 +391,17 @@ class Ri {
391
391
  return this._$AM._$AU;
392
392
  }
393
393
  u(e) {
394
- const { el: { content: t }, parts: i } = this._$AD, n = ((e == null ? void 0 : e.creationScope) ?? He).importNode(t, !0);
395
- Le.currentNode = n;
396
- let r = Le.nextNode(), a = 0, o = 0, c = i[0];
394
+ const { el: { content: t }, parts: i } = this._$AD, n = ((e == null ? void 0 : e.creationScope) ?? Fe).importNode(t, !0);
395
+ ze.currentNode = n;
396
+ let r = ze.nextNode(), a = 0, o = 0, c = i[0];
397
397
  for (; c !== void 0; ) {
398
398
  if (a === c.index) {
399
399
  let l;
400
- c.type === 2 ? l = new at(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new Di(r, this, e)), this._$AV.push(l), c = i[++o];
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 Ui(r, this, e)), this._$AV.push(l), c = i[++o];
401
401
  }
402
- a !== (c == null ? void 0 : c.index) && (r = Le.nextNode(), a++);
402
+ a !== (c == null ? void 0 : c.index) && (r = ze.nextNode(), a++);
403
403
  }
404
- return Le.currentNode = He, n;
404
+ return ze.currentNode = Fe, n;
405
405
  }
406
406
  p(e) {
407
407
  let t = 0;
@@ -409,7 +409,7 @@ class Ri {
409
409
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
410
410
  }
411
411
  }
412
- class at {
412
+ class ct {
413
413
  get _$AU() {
414
414
  var e;
415
415
  return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
@@ -429,7 +429,7 @@ class at {
429
429
  return this._$AB;
430
430
  }
431
431
  _$AI(e, t = this) {
432
- e = Be(this, e, t), yt(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) : Mi(e) ? this.k(e) : this._(e);
432
+ e = Ve(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) : Ni(e) ? this.k(e) : this._(e);
433
433
  }
434
434
  S(e) {
435
435
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -438,28 +438,28 @@ class at {
438
438
  this._$AH !== e && (this._$AR(), this._$AH = this.S(e));
439
439
  }
440
440
  _(e) {
441
- this._$AH !== B && yt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(He.createTextNode(e)), this._$AH = e;
441
+ this._$AH !== B && bt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Fe.createTextNode(e)), this._$AH = e;
442
442
  }
443
443
  $(e) {
444
444
  var t;
445
- const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = vt.createElement(Pi(n.h, n.h[0]), this.options)), n);
445
+ const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = wt.createElement(ji(n.h, n.h[0]), this.options)), n);
446
446
  if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
447
447
  this._$AH.p(i);
448
448
  else {
449
- const a = new Ri(r, this), o = a.u(this.options);
449
+ const a = new Zi(r, this), o = a.u(this.options);
450
450
  a.p(i), this.T(o), this._$AH = a;
451
451
  }
452
452
  }
453
453
  _$AC(e) {
454
- let t = gi.get(e.strings);
455
- return t === void 0 && gi.set(e.strings, t = new vt(e)), t;
454
+ let t = yi.get(e.strings);
455
+ return t === void 0 && yi.set(e.strings, t = new wt(e)), t;
456
456
  }
457
457
  k(e) {
458
- Ii(this._$AH) || (this._$AH = [], this._$AR());
458
+ Mi(this._$AH) || (this._$AH = [], this._$AR());
459
459
  const t = this._$AH;
460
460
  let i, n = 0;
461
461
  for (const r of e)
462
- n === t.length ? t.push(i = new at(this.S(gt()), this.S(gt()), this, this.options)) : i = t[n], i._$AI(r), n++;
462
+ n === t.length ? t.push(i = new ct(this.S(vt()), this.S(vt()), this, this.options)) : i = t[n], i._$AI(r), n++;
463
463
  n < t.length && (this._$AR(i && i._$AB.nextSibling, n), t.length = n);
464
464
  }
465
465
  _$AR(e = this._$AA.nextSibling, t) {
@@ -474,7 +474,7 @@ class at {
474
474
  this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
475
475
  }
476
476
  }
477
- class Mt {
477
+ class jt {
478
478
  get tagName() {
479
479
  return this.element.tagName;
480
480
  }
@@ -488,12 +488,12 @@ class Mt {
488
488
  const r = this.strings;
489
489
  let a = !1;
490
490
  if (r === void 0)
491
- e = Be(this, e, t, 0), a = !yt(e) || e !== this._$AH && e !== le, a && (this._$AH = e);
491
+ e = Ve(this, e, t, 0), a = !bt(e) || e !== this._$AH && e !== le, a && (this._$AH = e);
492
492
  else {
493
493
  const o = e;
494
494
  let c, l;
495
495
  for (e = r[0], c = 0; c < r.length - 1; c++)
496
- l = Be(this, o[i + c], t, c), l === le && (l = this._$AH[c]), a || (a = !yt(l) || l !== this._$AH[c]), l === B ? e = B : e !== B && (e += (l ?? "") + r[c + 1]), this._$AH[c] = l;
496
+ l = Ve(this, o[i + c], t, c), l === le && (l = this._$AH[c]), a || (a = !bt(l) || l !== this._$AH[c]), l === B ? e = B : e !== B && (e += (l ?? "") + r[c + 1]), this._$AH[c] = l;
497
497
  }
498
498
  a && !n && this.j(e);
499
499
  }
@@ -501,7 +501,7 @@ class Mt {
501
501
  e === B ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
502
502
  }
503
503
  }
504
- class Zi extends Mt {
504
+ class Li extends jt {
505
505
  constructor() {
506
506
  super(...arguments), this.type = 3;
507
507
  }
@@ -509,7 +509,7 @@ class Zi extends Mt {
509
509
  this.element[this.name] = e === B ? void 0 : e;
510
510
  }
511
511
  }
512
- class Li extends Mt {
512
+ class Di extends jt {
513
513
  constructor() {
514
514
  super(...arguments), this.type = 4;
515
515
  }
@@ -517,12 +517,12 @@ class Li extends Mt {
517
517
  this.element.toggleAttribute(this.name, !!e && e !== B);
518
518
  }
519
519
  }
520
- class zi extends Mt {
520
+ class zi extends jt {
521
521
  constructor(e, t, i, n, r) {
522
522
  super(e, t, i, n, r), this.type = 5;
523
523
  }
524
524
  _$AI(e, t = this) {
525
- if ((e = Be(this, e, t, 0) ?? B) === le)
525
+ if ((e = Ve(this, e, t, 0) ?? B) === le)
526
526
  return;
527
527
  const i = this._$AH, n = e === B && i !== B || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== B && (i === B || n);
528
528
  n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
@@ -532,7 +532,7 @@ class zi extends Mt {
532
532
  typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
533
533
  }
534
534
  }
535
- class Di {
535
+ class Ui {
536
536
  constructor(e, t, i) {
537
537
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
538
538
  }
@@ -540,17 +540,17 @@ class Di {
540
540
  return this._$AM._$AU;
541
541
  }
542
542
  _$AI(e) {
543
- Be(this, e);
543
+ Ve(this, e);
544
544
  }
545
545
  }
546
- const En = { P: zs, A: we, C: Ds, M: 1, L: ji, R: Ri, D: Mi, V: Be, I: at, H: Mt, N: Li, U: zi, B: Zi, F: Di }, yi = Ht.litHtmlPolyfillSupport;
547
- yi == null || yi(vt, at), (Ht.litHtmlVersions ?? (Ht.litHtmlVersions = [])).push("3.1.2");
546
+ const En = { P: zs, A: we, C: Us, M: 1, L: Ri, R: Zi, D: Ni, V: Ve, I: ct, H: jt, N: Di, U: zi, B: Li, F: Ui }, vi = Vt.litHtmlPolyfillSupport;
547
+ vi == null || vi(wt, ct), (Vt.litHtmlVersions ?? (Vt.litHtmlVersions = [])).push("3.1.2");
548
548
  const Cn = (s, e, t) => {
549
549
  const i = (t == null ? void 0 : t.renderBefore) ?? e;
550
550
  let n = i._$litPart$;
551
551
  if (n === void 0) {
552
552
  const r = (t == null ? void 0 : t.renderBefore) ?? null;
553
- i._$litPart$ = n = new at(e.insertBefore(gt(), r), r, void 0, t ?? {});
553
+ i._$litPart$ = n = new ct(e.insertBefore(vt(), r), r, void 0, t ?? {});
554
554
  }
555
555
  return n._$AI(s), n;
556
556
  };
@@ -559,7 +559,7 @@ const Cn = (s, e, t) => {
559
559
  * Copyright 2017 Google LLC
560
560
  * SPDX-License-Identifier: BSD-3-Clause
561
561
  */
562
- let Q = class extends Ge {
562
+ let Q = class extends Qe {
563
563
  constructor() {
564
564
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
565
565
  }
@@ -584,18 +584,18 @@ let Q = class extends Ge {
584
584
  return le;
585
585
  }
586
586
  };
587
- var vi;
588
- Q._$litElement$ = !0, Q.finalized = !0, (vi = globalThis.litElementHydrateSupport) == null || vi.call(globalThis, { LitElement: Q });
589
- const bi = globalThis.litElementPolyfillSupport;
590
- bi == null || bi({ LitElement: Q });
587
+ var bi;
588
+ Q._$litElement$ = !0, Q.finalized = !0, (bi = globalThis.litElementHydrateSupport) == null || bi.call(globalThis, { LitElement: Q });
589
+ const wi = globalThis.litElementPolyfillSupport;
590
+ wi == null || wi({ LitElement: Q });
591
591
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
592
- const Ie = rt`*,: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}.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-6{width:1.5rem}.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))}.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}}`;
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
593
  /**
594
594
  * @license
595
595
  * Copyright 2017 Google LLC
596
596
  * SPDX-License-Identifier: BSD-3-Clause
597
597
  */
598
- const Me = (s) => (e, t) => {
598
+ const Pe = (s) => (e, t) => {
599
599
  t !== void 0 ? t.addInitializer(() => {
600
600
  customElements.define(s, e);
601
601
  }) : customElements.define(s, e);
@@ -605,7 +605,7 @@ const Me = (s) => (e, t) => {
605
605
  * Copyright 2017 Google LLC
606
606
  * SPDX-License-Identifier: BSD-3-Clause
607
607
  */
608
- const An = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged: Ls }, On = (s = An, e, t) => {
608
+ const An = { attribute: !0, type: String, converter: Ft, reflect: !1, hasChanged: Ds }, On = (s = An, e, t) => {
609
609
  const { kind: i, metadata: n } = t;
610
610
  let r = globalThis.litPropertyMetadata.get(n);
611
611
  if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(t.name, s), i === "accessor") {
@@ -626,7 +626,7 @@ const An = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged
626
626
  }
627
627
  throw Error("Unsupported decorator location: " + i);
628
628
  };
629
- function J(s) {
629
+ function F(s) {
630
630
  return (e, t) => typeof t == "object" ? On(s, e, t) : ((i, n, r) => {
631
631
  const a = n.hasOwnProperty(r);
632
632
  return n.constructor.createProperty(r, a ? { ...i, wrapped: !0 } : i), a ? Object.getOwnPropertyDescriptor(n, r) : void 0;
@@ -637,15 +637,15 @@ function J(s) {
637
637
  * Copyright 2017 Google LLC
638
638
  * SPDX-License-Identifier: BSD-3-Clause
639
639
  */
640
- function ot(s) {
641
- return J({ ...s, state: !0, attribute: !1 });
640
+ function dt(s) {
641
+ return F({ ...s, state: !0, attribute: !1 });
642
642
  }
643
643
  /**
644
644
  * @license
645
645
  * Copyright 2017 Google LLC
646
646
  * SPDX-License-Identifier: BSD-3-Clause
647
647
  */
648
- const wi = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
648
+ const _i = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
649
649
  /**
650
650
  * @license
651
651
  * Copyright 2017 Google LLC
@@ -666,12 +666,12 @@ function In(s, e) {
666
666
  this[c] = l;
667
667
  } };
668
668
  })();
669
- return wi(t, i, { get() {
669
+ return _i(t, i, { get() {
670
670
  let c = a.call(this);
671
671
  return c === void 0 && (c = r(this), (c !== null || this.hasUpdated) && o.call(this, c)), c;
672
672
  } });
673
673
  }
674
- return wi(t, i, { get() {
674
+ return _i(t, i, { get() {
675
675
  return r(this);
676
676
  } });
677
677
  };
@@ -681,8 +681,8 @@ function In(s, e) {
681
681
  * Copyright 2017 Google LLC
682
682
  * SPDX-License-Identifier: BSD-3-Clause
683
683
  */
684
- const as = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, os = (s) => (...e) => ({ _$litDirective$: s, values: e });
685
- let cs = class {
684
+ const cs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ds = (s) => (...e) => ({ _$litDirective$: s, values: e });
685
+ let ls = class {
686
686
  constructor(s) {
687
687
  }
688
688
  get _$AU() {
@@ -703,10 +703,10 @@ let cs = class {
703
703
  * Copyright 2018 Google LLC
704
704
  * SPDX-License-Identifier: BSD-3-Clause
705
705
  */
706
- const _i = os(class extends cs {
706
+ const xi = ds(class extends ls {
707
707
  constructor(s) {
708
708
  var e;
709
- if (super(s), s.type !== as.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2)
709
+ if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2)
710
710
  throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
711
711
  }
712
712
  render(s) {
@@ -735,10 +735,10 @@ const _i = os(class extends cs {
735
735
  * Copyright 2018 Google LLC
736
736
  * SPDX-License-Identifier: BSD-3-Clause
737
737
  */
738
- const Ui = "important", Mn = " !" + Ui, ut = os(class extends cs {
738
+ const Hi = "important", Mn = " !" + Hi, tt = ds(class extends ls {
739
739
  constructor(s) {
740
740
  var e;
741
- if (super(s), s.type !== as.ATTRIBUTE || s.name !== "style" || ((e = s.strings) == null ? void 0 : e.length) > 2)
741
+ if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "style" || ((e = s.strings) == null ? void 0 : e.length) > 2)
742
742
  throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
743
743
  }
744
744
  render(s) {
@@ -758,7 +758,7 @@ const Ui = "important", Mn = " !" + Ui, ut = os(class extends cs {
758
758
  if (n != null) {
759
759
  this.ft.add(i);
760
760
  const r = typeof n == "string" && n.endsWith(Mn);
761
- i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ? Ui : "") : t[i] = n;
761
+ i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ? Hi : "") : t[i] = n;
762
762
  }
763
763
  }
764
764
  return le;
@@ -800,14 +800,14 @@ var j;
800
800
  }
801
801
  s.joinValues = i, s.jsonStringifyReplacer = (n, r) => typeof r == "bigint" ? r.toString() : r;
802
802
  })(j || (j = {}));
803
- var Os;
803
+ var Ms;
804
804
  (function(s) {
805
805
  s.mergeShapes = (e, t) => ({
806
806
  ...e,
807
807
  ...t
808
808
  // second overwrites first
809
809
  });
810
- })(Os || (Os = {}));
810
+ })(Ms || (Ms = {}));
811
811
  const f = j.arrayToEnum([
812
812
  "string",
813
813
  "nan",
@@ -924,7 +924,7 @@ class ne extends Error {
924
924
  }
925
925
  }
926
926
  ne.create = (s) => new ne(s);
927
- const bt = (s, e) => {
927
+ const _t = (s, e) => {
928
928
  let t;
929
929
  switch (s.code) {
930
930
  case m.invalid_type:
@@ -980,14 +980,14 @@ const bt = (s, e) => {
980
980
  }
981
981
  return { message: t };
982
982
  };
983
- let Hi = bt;
983
+ let Bi = _t;
984
984
  function Pn(s) {
985
- Hi = s;
985
+ Bi = s;
986
986
  }
987
- function Ft() {
988
- return Hi;
987
+ function Kt() {
988
+ return Bi;
989
989
  }
990
- const Vt = (s) => {
990
+ const Jt = (s) => {
991
991
  const { data: e, path: t, errorMaps: i, issueData: n } = s, r = [...t, ...n.path || []], a = {
992
992
  ...n,
993
993
  path: r
@@ -1003,21 +1003,21 @@ const Vt = (s) => {
1003
1003
  };
1004
1004
  }, jn = [];
1005
1005
  function g(s, e) {
1006
- const t = Vt({
1006
+ const t = Jt({
1007
1007
  issueData: e,
1008
1008
  data: s.data,
1009
1009
  path: s.path,
1010
1010
  errorMaps: [
1011
1011
  s.common.contextualErrorMap,
1012
1012
  s.schemaErrorMap,
1013
- Ft(),
1014
- bt
1013
+ Kt(),
1014
+ _t
1015
1015
  // then global default map
1016
1016
  ].filter((i) => !!i)
1017
1017
  });
1018
1018
  s.common.issues.push(t);
1019
1019
  }
1020
- class K {
1020
+ class J {
1021
1021
  constructor() {
1022
1022
  this.value = "valid";
1023
1023
  }
@@ -1043,7 +1043,7 @@ class K {
1043
1043
  key: await n.key,
1044
1044
  value: await n.value
1045
1045
  });
1046
- return K.mergeObjectSync(e, i);
1046
+ return J.mergeObjectSync(e, i);
1047
1047
  }
1048
1048
  static mergeObjectSync(e, t) {
1049
1049
  const i = {};
@@ -1058,7 +1058,7 @@ class K {
1058
1058
  }
1059
1059
  const E = Object.freeze({
1060
1060
  status: "aborted"
1061
- }), Bi = (s) => ({ status: "dirty", value: s }), Y = (s) => ({ status: "valid", value: s }), Is = (s) => s.status === "aborted", Ms = (s) => s.status === "dirty", wt = (s) => s.status === "valid", Wt = (s) => typeof Promise < "u" && s instanceof Promise;
1061
+ }), Fi = (s) => ({ status: "dirty", value: s }), Y = (s) => ({ status: "valid", value: s }), Ns = (s) => s.status === "aborted", Ps = (s) => s.status === "dirty", xt = (s) => s.status === "valid", qt = (s) => typeof Promise < "u" && s instanceof Promise;
1062
1062
  var _;
1063
1063
  (function(s) {
1064
1064
  s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
@@ -1071,8 +1071,8 @@ class ue {
1071
1071
  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
1072
  }
1073
1073
  }
1074
- const xi = (s, e) => {
1075
- if (wt(e))
1074
+ const ki = (s, e) => {
1075
+ if (xt(e))
1076
1076
  return { success: !0, data: e.value };
1077
1077
  if (!s.common.issues.length)
1078
1078
  throw new Error("Validation failed but no issues detected.");
@@ -1116,7 +1116,7 @@ class I {
1116
1116
  }
1117
1117
  _processInputParams(e) {
1118
1118
  return {
1119
- status: new K(),
1119
+ status: new J(),
1120
1120
  ctx: {
1121
1121
  common: e.parent.common,
1122
1122
  data: e.data,
@@ -1129,7 +1129,7 @@ class I {
1129
1129
  }
1130
1130
  _parseSync(e) {
1131
1131
  const t = this._parse(e);
1132
- if (Wt(t))
1132
+ if (qt(t))
1133
1133
  throw new Error("Synchronous parse encountered promise.");
1134
1134
  return t;
1135
1135
  }
@@ -1157,7 +1157,7 @@ class I {
1157
1157
  data: e,
1158
1158
  parsedType: Ee(e)
1159
1159
  }, r = this._parseSync({ data: e, path: n.path, parent: n });
1160
- return xi(n, r);
1160
+ return ki(n, r);
1161
1161
  }
1162
1162
  async parseAsync(e, t) {
1163
1163
  const i = await this.safeParseAsync(e, t);
@@ -1177,8 +1177,8 @@ class I {
1177
1177
  parent: null,
1178
1178
  data: e,
1179
1179
  parsedType: Ee(e)
1180
- }, n = this._parse({ data: e, path: i.path, parent: i }), r = await (Wt(n) ? n : Promise.resolve(n));
1181
- return xi(i, r);
1180
+ }, n = this._parse({ data: e, path: i.path, parent: i }), r = await (qt(n) ? n : Promise.resolve(n));
1181
+ return ki(i, r);
1182
1182
  }
1183
1183
  refine(e, t) {
1184
1184
  const i = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
@@ -1196,7 +1196,7 @@ class I {
1196
1196
  _refinement(e) {
1197
1197
  return new ae({
1198
1198
  schema: this,
1199
- typeName: S.ZodEffects,
1199
+ typeName: T.ZodEffects,
1200
1200
  effect: { type: "refinement", refinement: e }
1201
1201
  });
1202
1202
  }
@@ -1207,7 +1207,7 @@ class I {
1207
1207
  return _e.create(this, this._def);
1208
1208
  }
1209
1209
  nullable() {
1210
- return We.create(this, this._def);
1210
+ return Je.create(this, this._def);
1211
1211
  }
1212
1212
  nullish() {
1213
1213
  return this.nullable().optional();
@@ -1216,45 +1216,45 @@ class I {
1216
1216
  return re.create(this, this._def);
1217
1217
  }
1218
1218
  promise() {
1219
- return it.create(this, this._def);
1219
+ return rt.create(this, this._def);
1220
1220
  }
1221
1221
  or(e) {
1222
- return Tt.create([this, e], this._def);
1222
+ return $t.create([this, e], this._def);
1223
1223
  }
1224
1224
  and(e) {
1225
- return St.create(this, e, this._def);
1225
+ return Et.create(this, e, this._def);
1226
1226
  }
1227
1227
  transform(e) {
1228
1228
  return new ae({
1229
1229
  ...A(this._def),
1230
1230
  schema: this,
1231
- typeName: S.ZodEffects,
1231
+ typeName: T.ZodEffects,
1232
1232
  effect: { type: "transform", transform: e }
1233
1233
  });
1234
1234
  }
1235
1235
  default(e) {
1236
1236
  const t = typeof e == "function" ? e : () => e;
1237
- return new Ot({
1237
+ return new Mt({
1238
1238
  ...A(this._def),
1239
1239
  innerType: this,
1240
1240
  defaultValue: t,
1241
- typeName: S.ZodDefault
1241
+ typeName: T.ZodDefault
1242
1242
  });
1243
1243
  }
1244
1244
  brand() {
1245
- return new Vi({
1246
- typeName: S.ZodBranded,
1245
+ return new Wi({
1246
+ typeName: T.ZodBranded,
1247
1247
  type: this,
1248
1248
  ...A(this._def)
1249
1249
  });
1250
1250
  }
1251
1251
  catch(e) {
1252
1252
  const t = typeof e == "function" ? e : () => e;
1253
- return new Yt({
1253
+ return new Qt({
1254
1254
  ...A(this._def),
1255
1255
  innerType: this,
1256
1256
  catchValue: t,
1257
- typeName: S.ZodCatch
1257
+ typeName: T.ZodCatch
1258
1258
  });
1259
1259
  }
1260
1260
  describe(e) {
@@ -1265,10 +1265,10 @@ class I {
1265
1265
  });
1266
1266
  }
1267
1267
  pipe(e) {
1268
- return Nt.create(this, e);
1268
+ return Rt.create(this, e);
1269
1269
  }
1270
1270
  readonly() {
1271
- return Xt.create(this);
1271
+ return ts.create(this);
1272
1272
  }
1273
1273
  isOptional() {
1274
1274
  return this.safeParse(void 0).success;
@@ -1277,8 +1277,8 @@ class I {
1277
1277
  return this.safeParse(null).success;
1278
1278
  }
1279
1279
  }
1280
- const Rn = /^c[^\s-]{8,}$/i, Zn = /^[a-z][a-z0-9]*$/, Ln = /^[0-9A-HJKMNP-TV-Z]{26}$/, zn = /^[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, Dn = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Un = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1281
- let Cs;
1280
+ const Rn = /^c[^\s-]{8,}$/i, Zn = /^[a-z][a-z0-9]*$/, Ln = /^[0-9A-HJKMNP-TV-Z]{26}$/, Dn = /^[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, zn = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Un = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1281
+ let Os;
1282
1282
  const Hn = /^(((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}))$/, Bn = /^(([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})))$/, Fn = (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$");
1283
1283
  function Vn(s, e) {
1284
1284
  return !!((e === "v4" || !e) && Hn.test(s) || (e === "v6" || !e) && Bn.test(s));
@@ -1297,7 +1297,7 @@ class ie extends I {
1297
1297
  //
1298
1298
  ), E;
1299
1299
  }
1300
- const t = new K();
1300
+ const t = new J();
1301
1301
  let i;
1302
1302
  for (const n of this._def.checks)
1303
1303
  if (n.kind === "min")
@@ -1336,19 +1336,19 @@ class ie extends I {
1336
1336
  message: n.message
1337
1337
  }), t.dirty());
1338
1338
  } else if (n.kind === "email")
1339
- Dn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1339
+ zn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1340
1340
  validation: "email",
1341
1341
  code: m.invalid_string,
1342
1342
  message: n.message
1343
1343
  }), t.dirty());
1344
1344
  else if (n.kind === "emoji")
1345
- Cs || (Cs = new RegExp(Un, "u")), Cs.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1345
+ Os || (Os = new RegExp(Un, "u")), Os.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1346
1346
  validation: "emoji",
1347
1347
  code: m.invalid_string,
1348
1348
  message: n.message
1349
1349
  }), t.dirty());
1350
1350
  else if (n.kind === "uuid")
1351
- zn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1351
+ Dn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1352
1352
  validation: "uuid",
1353
1353
  code: m.invalid_string,
1354
1354
  message: n.message
@@ -1579,7 +1579,7 @@ ie.create = (s) => {
1579
1579
  var e;
1580
1580
  return new ie({
1581
1581
  checks: [],
1582
- typeName: S.ZodString,
1582
+ typeName: T.ZodString,
1583
1583
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1584
1584
  ...A(s)
1585
1585
  });
@@ -1588,7 +1588,7 @@ function Wn(s, e) {
1588
1588
  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
1589
  return r % a / Math.pow(10, n);
1590
1590
  }
1591
- class Ce extends I {
1591
+ class Ae extends I {
1592
1592
  constructor() {
1593
1593
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1594
1594
  }
@@ -1602,7 +1602,7 @@ class Ce extends I {
1602
1602
  }), E;
1603
1603
  }
1604
1604
  let t;
1605
- const i = new K();
1605
+ const i = new J();
1606
1606
  for (const n of this._def.checks)
1607
1607
  n.kind === "int" ? j.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), g(t, {
1608
1608
  code: m.invalid_type,
@@ -1646,7 +1646,7 @@ class Ce extends I {
1646
1646
  return this.setLimit("max", e, !1, _.toString(t));
1647
1647
  }
1648
1648
  setLimit(e, t, i, n) {
1649
- return new Ce({
1649
+ return new Ae({
1650
1650
  ...this._def,
1651
1651
  checks: [
1652
1652
  ...this._def.checks,
@@ -1660,7 +1660,7 @@ class Ce extends I {
1660
1660
  });
1661
1661
  }
1662
1662
  _addCheck(e) {
1663
- return new Ce({
1663
+ return new Ae({
1664
1664
  ...this._def,
1665
1665
  checks: [...this._def.checks, e]
1666
1666
  });
@@ -1754,13 +1754,13 @@ class Ce extends I {
1754
1754
  return Number.isFinite(t) && Number.isFinite(e);
1755
1755
  }
1756
1756
  }
1757
- Ce.create = (s) => new Ce({
1757
+ Ae.create = (s) => new Ae({
1758
1758
  checks: [],
1759
- typeName: S.ZodNumber,
1759
+ typeName: T.ZodNumber,
1760
1760
  coerce: (s == null ? void 0 : s.coerce) || !1,
1761
1761
  ...A(s)
1762
1762
  });
1763
- class Ae extends I {
1763
+ class Oe extends I {
1764
1764
  constructor() {
1765
1765
  super(...arguments), this.min = this.gte, this.max = this.lte;
1766
1766
  }
@@ -1774,7 +1774,7 @@ class Ae extends I {
1774
1774
  }), E;
1775
1775
  }
1776
1776
  let t;
1777
- const i = new K();
1777
+ const i = new J();
1778
1778
  for (const n of this._def.checks)
1779
1779
  n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), g(t, {
1780
1780
  code: m.too_small,
@@ -1808,7 +1808,7 @@ class Ae extends I {
1808
1808
  return this.setLimit("max", e, !1, _.toString(t));
1809
1809
  }
1810
1810
  setLimit(e, t, i, n) {
1811
- return new Ae({
1811
+ return new Oe({
1812
1812
  ...this._def,
1813
1813
  checks: [
1814
1814
  ...this._def.checks,
@@ -1822,7 +1822,7 @@ class Ae extends I {
1822
1822
  });
1823
1823
  }
1824
1824
  _addCheck(e) {
1825
- return new Ae({
1825
+ return new Oe({
1826
1826
  ...this._def,
1827
1827
  checks: [...this._def.checks, e]
1828
1828
  });
@@ -1879,16 +1879,16 @@ class Ae extends I {
1879
1879
  return e;
1880
1880
  }
1881
1881
  }
1882
- Ae.create = (s) => {
1882
+ Oe.create = (s) => {
1883
1883
  var e;
1884
- return new Ae({
1884
+ return new Oe({
1885
1885
  checks: [],
1886
- typeName: S.ZodBigInt,
1886
+ typeName: T.ZodBigInt,
1887
1887
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1888
1888
  ...A(s)
1889
1889
  });
1890
1890
  };
1891
- class _t extends I {
1891
+ class kt extends I {
1892
1892
  _parse(e) {
1893
1893
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
1894
1894
  const t = this._getOrReturnCtx(e);
@@ -1901,12 +1901,12 @@ class _t extends I {
1901
1901
  return Y(e.data);
1902
1902
  }
1903
1903
  }
1904
- _t.create = (s) => new _t({
1905
- typeName: S.ZodBoolean,
1904
+ kt.create = (s) => new kt({
1905
+ typeName: T.ZodBoolean,
1906
1906
  coerce: (s == null ? void 0 : s.coerce) || !1,
1907
1907
  ...A(s)
1908
1908
  });
1909
- class Fe extends I {
1909
+ class We extends I {
1910
1910
  _parse(e) {
1911
1911
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
1912
1912
  const n = this._getOrReturnCtx(e);
@@ -1922,7 +1922,7 @@ class Fe extends I {
1922
1922
  code: m.invalid_date
1923
1923
  }), E;
1924
1924
  }
1925
- const t = new K();
1925
+ const t = new J();
1926
1926
  let i;
1927
1927
  for (const n of this._def.checks)
1928
1928
  n.kind === "min" ? e.data.getTime() < n.value && (i = this._getOrReturnCtx(e, i), g(i, {
@@ -1946,7 +1946,7 @@ class Fe extends I {
1946
1946
  };
1947
1947
  }
1948
1948
  _addCheck(e) {
1949
- return new Fe({
1949
+ return new We({
1950
1950
  ...this._def,
1951
1951
  checks: [...this._def.checks, e]
1952
1952
  });
@@ -1978,13 +1978,13 @@ class Fe extends I {
1978
1978
  return e != null ? new Date(e) : null;
1979
1979
  }
1980
1980
  }
1981
- Fe.create = (s) => new Fe({
1981
+ We.create = (s) => new We({
1982
1982
  checks: [],
1983
1983
  coerce: (s == null ? void 0 : s.coerce) || !1,
1984
- typeName: S.ZodDate,
1984
+ typeName: T.ZodDate,
1985
1985
  ...A(s)
1986
1986
  });
1987
- class Kt extends I {
1987
+ class Yt extends I {
1988
1988
  _parse(e) {
1989
1989
  if (this._getType(e) !== f.symbol) {
1990
1990
  const t = this._getOrReturnCtx(e);
@@ -1997,11 +1997,11 @@ class Kt extends I {
1997
1997
  return Y(e.data);
1998
1998
  }
1999
1999
  }
2000
- Kt.create = (s) => new Kt({
2001
- typeName: S.ZodSymbol,
2000
+ Yt.create = (s) => new Yt({
2001
+ typeName: T.ZodSymbol,
2002
2002
  ...A(s)
2003
2003
  });
2004
- class xt extends I {
2004
+ class St extends I {
2005
2005
  _parse(e) {
2006
2006
  if (this._getType(e) !== f.undefined) {
2007
2007
  const t = this._getOrReturnCtx(e);
@@ -2014,11 +2014,11 @@ class xt extends I {
2014
2014
  return Y(e.data);
2015
2015
  }
2016
2016
  }
2017
- xt.create = (s) => new xt({
2018
- typeName: S.ZodUndefined,
2017
+ St.create = (s) => new St({
2018
+ typeName: T.ZodUndefined,
2019
2019
  ...A(s)
2020
2020
  });
2021
- class kt extends I {
2021
+ class Tt extends I {
2022
2022
  _parse(e) {
2023
2023
  if (this._getType(e) !== f.null) {
2024
2024
  const t = this._getOrReturnCtx(e);
@@ -2031,11 +2031,11 @@ class kt extends I {
2031
2031
  return Y(e.data);
2032
2032
  }
2033
2033
  }
2034
- kt.create = (s) => new kt({
2035
- typeName: S.ZodNull,
2034
+ Tt.create = (s) => new Tt({
2035
+ typeName: T.ZodNull,
2036
2036
  ...A(s)
2037
2037
  });
2038
- class st extends I {
2038
+ class nt extends I {
2039
2039
  constructor() {
2040
2040
  super(...arguments), this._any = !0;
2041
2041
  }
@@ -2043,11 +2043,11 @@ class st extends I {
2043
2043
  return Y(e.data);
2044
2044
  }
2045
2045
  }
2046
- st.create = (s) => new st({
2047
- typeName: S.ZodAny,
2046
+ nt.create = (s) => new nt({
2047
+ typeName: T.ZodAny,
2048
2048
  ...A(s)
2049
2049
  });
2050
- class De extends I {
2050
+ class He extends I {
2051
2051
  constructor() {
2052
2052
  super(...arguments), this._unknown = !0;
2053
2053
  }
@@ -2055,8 +2055,8 @@ class De extends I {
2055
2055
  return Y(e.data);
2056
2056
  }
2057
2057
  }
2058
- De.create = (s) => new De({
2059
- typeName: S.ZodUnknown,
2058
+ He.create = (s) => new He({
2059
+ typeName: T.ZodUnknown,
2060
2060
  ...A(s)
2061
2061
  });
2062
2062
  class xe extends I {
@@ -2070,10 +2070,10 @@ class xe extends I {
2070
2070
  }
2071
2071
  }
2072
2072
  xe.create = (s) => new xe({
2073
- typeName: S.ZodNever,
2073
+ typeName: T.ZodNever,
2074
2074
  ...A(s)
2075
2075
  });
2076
- class Jt extends I {
2076
+ class Gt extends I {
2077
2077
  _parse(e) {
2078
2078
  if (this._getType(e) !== f.undefined) {
2079
2079
  const t = this._getOrReturnCtx(e);
@@ -2086,8 +2086,8 @@ class Jt extends I {
2086
2086
  return Y(e.data);
2087
2087
  }
2088
2088
  }
2089
- Jt.create = (s) => new Jt({
2090
- typeName: S.ZodVoid,
2089
+ Gt.create = (s) => new Gt({
2090
+ typeName: T.ZodVoid,
2091
2091
  ...A(s)
2092
2092
  });
2093
2093
  class re extends I {
@@ -2126,9 +2126,9 @@ class re extends I {
2126
2126
  exact: !1,
2127
2127
  message: n.maxLength.message
2128
2128
  }), i.dirty()), t.common.async)
2129
- return Promise.all([...t.data].map((a, o) => n.type._parseAsync(new ue(t, a, t.path, o)))).then((a) => K.mergeArray(i, a));
2129
+ return Promise.all([...t.data].map((a, o) => n.type._parseAsync(new ue(t, a, t.path, o)))).then((a) => J.mergeArray(i, a));
2130
2130
  const r = [...t.data].map((a, o) => n.type._parseSync(new ue(t, a, t.path, o)));
2131
- return K.mergeArray(i, r);
2131
+ return J.mergeArray(i, r);
2132
2132
  }
2133
2133
  get element() {
2134
2134
  return this._def.type;
@@ -2160,15 +2160,15 @@ re.create = (s, e) => new re({
2160
2160
  minLength: null,
2161
2161
  maxLength: null,
2162
2162
  exactLength: null,
2163
- typeName: S.ZodArray,
2163
+ typeName: T.ZodArray,
2164
2164
  ...A(e)
2165
2165
  });
2166
- function Xe(s) {
2166
+ function et(s) {
2167
2167
  if (s instanceof H) {
2168
2168
  const e = {};
2169
2169
  for (const t in s.shape) {
2170
2170
  const i = s.shape[t];
2171
- e[t] = _e.create(Xe(i));
2171
+ e[t] = _e.create(et(i));
2172
2172
  }
2173
2173
  return new H({
2174
2174
  ...s._def,
@@ -2177,8 +2177,8 @@ function Xe(s) {
2177
2177
  } else
2178
2178
  return s instanceof re ? new re({
2179
2179
  ...s._def,
2180
- type: Xe(s.element)
2181
- }) : s instanceof _e ? _e.create(Xe(s.unwrap())) : s instanceof We ? We.create(Xe(s.unwrap())) : s instanceof he ? he.create(s.items.map((e) => Xe(e))) : s;
2180
+ type: et(s.element)
2181
+ }) : s instanceof _e ? _e.create(et(s.unwrap())) : s instanceof Je ? Je.create(et(s.unwrap())) : s instanceof he ? he.create(s.items.map((e) => et(e))) : s;
2182
2182
  }
2183
2183
  class H extends I {
2184
2184
  constructor() {
@@ -2252,7 +2252,7 @@ class H extends I {
2252
2252
  });
2253
2253
  }
2254
2254
  return c;
2255
- }).then((c) => K.mergeObjectSync(t, c)) : K.mergeObjectSync(t, o);
2255
+ }).then((c) => J.mergeObjectSync(t, c)) : J.mergeObjectSync(t, o);
2256
2256
  }
2257
2257
  get shape() {
2258
2258
  return this._def.shape();
@@ -2325,7 +2325,7 @@ class H extends I {
2325
2325
  ...this._def.shape(),
2326
2326
  ...e._def.shape()
2327
2327
  }),
2328
- typeName: S.ZodObject
2328
+ typeName: T.ZodObject
2329
2329
  });
2330
2330
  }
2331
2331
  // merge<
@@ -2415,7 +2415,7 @@ class H extends I {
2415
2415
  * @deprecated
2416
2416
  */
2417
2417
  deepPartial() {
2418
- return Xe(this);
2418
+ return et(this);
2419
2419
  }
2420
2420
  partial(e) {
2421
2421
  const t = {};
@@ -2444,31 +2444,31 @@ class H extends I {
2444
2444
  });
2445
2445
  }
2446
2446
  keyof() {
2447
- return Fi(j.objectKeys(this.shape));
2447
+ return Vi(j.objectKeys(this.shape));
2448
2448
  }
2449
2449
  }
2450
2450
  H.create = (s, e) => new H({
2451
2451
  shape: () => s,
2452
2452
  unknownKeys: "strip",
2453
2453
  catchall: xe.create(),
2454
- typeName: S.ZodObject,
2454
+ typeName: T.ZodObject,
2455
2455
  ...A(e)
2456
2456
  });
2457
2457
  H.strictCreate = (s, e) => new H({
2458
2458
  shape: () => s,
2459
2459
  unknownKeys: "strict",
2460
2460
  catchall: xe.create(),
2461
- typeName: S.ZodObject,
2461
+ typeName: T.ZodObject,
2462
2462
  ...A(e)
2463
2463
  });
2464
2464
  H.lazycreate = (s, e) => new H({
2465
2465
  shape: s,
2466
2466
  unknownKeys: "strip",
2467
2467
  catchall: xe.create(),
2468
- typeName: S.ZodObject,
2468
+ typeName: T.ZodObject,
2469
2469
  ...A(e)
2470
2470
  });
2471
- class Tt extends I {
2471
+ class $t extends I {
2472
2472
  _parse(e) {
2473
2473
  const { ctx: t } = this._processInputParams(e), i = this._def.options;
2474
2474
  function n(r) {
@@ -2536,13 +2536,13 @@ class Tt extends I {
2536
2536
  return this._def.options;
2537
2537
  }
2538
2538
  }
2539
- Tt.create = (s, e) => new Tt({
2539
+ $t.create = (s, e) => new $t({
2540
2540
  options: s,
2541
- typeName: S.ZodUnion,
2541
+ typeName: T.ZodUnion,
2542
2542
  ...A(e)
2543
2543
  });
2544
- const zt = (s) => s instanceof Et ? zt(s.schema) : s instanceof ae ? zt(s.innerType()) : s instanceof Ct ? [s.value] : s instanceof Oe ? s.options : s instanceof At ? Object.keys(s.enum) : s instanceof Ot ? zt(s._def.innerType) : s instanceof xt ? [void 0] : s instanceof kt ? [null] : null;
2545
- class ds extends I {
2544
+ const Ht = (s) => s instanceof At ? Ht(s.schema) : s instanceof ae ? Ht(s.innerType()) : s instanceof Ot ? [s.value] : s instanceof Ie ? s.options : s instanceof It ? Object.keys(s.enum) : s instanceof Mt ? Ht(s._def.innerType) : s instanceof St ? [void 0] : s instanceof Tt ? [null] : null;
2545
+ class us extends I {
2546
2546
  _parse(e) {
2547
2547
  const { ctx: t } = this._processInputParams(e);
2548
2548
  if (t.parsedType !== f.object)
@@ -2586,7 +2586,7 @@ class ds extends I {
2586
2586
  static create(e, t, i) {
2587
2587
  const n = /* @__PURE__ */ new Map();
2588
2588
  for (const r of t) {
2589
- const a = zt(r.shape[e]);
2589
+ const a = Ht(r.shape[e]);
2590
2590
  if (!a)
2591
2591
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2592
2592
  for (const o of a) {
@@ -2595,8 +2595,8 @@ class ds extends I {
2595
2595
  n.set(o, r);
2596
2596
  }
2597
2597
  }
2598
- return new ds({
2599
- typeName: S.ZodDiscriminatedUnion,
2598
+ return new us({
2599
+ typeName: T.ZodDiscriminatedUnion,
2600
2600
  discriminator: e,
2601
2601
  options: t,
2602
2602
  optionsMap: n,
@@ -2604,14 +2604,14 @@ class ds extends I {
2604
2604
  });
2605
2605
  }
2606
2606
  }
2607
- function Ns(s, e) {
2607
+ function js(s, e) {
2608
2608
  const t = Ee(s), i = Ee(e);
2609
2609
  if (s === e)
2610
2610
  return { valid: !0, data: s };
2611
2611
  if (t === f.object && i === f.object) {
2612
2612
  const n = j.objectKeys(e), r = j.objectKeys(s).filter((o) => n.indexOf(o) !== -1), a = { ...s, ...e };
2613
2613
  for (const o of r) {
2614
- const c = Ns(s[o], e[o]);
2614
+ const c = js(s[o], e[o]);
2615
2615
  if (!c.valid)
2616
2616
  return { valid: !1 };
2617
2617
  a[o] = c.data;
@@ -2622,7 +2622,7 @@ function Ns(s, e) {
2622
2622
  return { valid: !1 };
2623
2623
  const n = [];
2624
2624
  for (let r = 0; r < s.length; r++) {
2625
- const a = s[r], o = e[r], c = Ns(a, o);
2625
+ const a = s[r], o = e[r], c = js(a, o);
2626
2626
  if (!c.valid)
2627
2627
  return { valid: !1 };
2628
2628
  n.push(c.data);
@@ -2631,13 +2631,13 @@ function Ns(s, e) {
2631
2631
  } else
2632
2632
  return t === f.date && i === f.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
2633
2633
  }
2634
- class St extends I {
2634
+ class Et extends I {
2635
2635
  _parse(e) {
2636
2636
  const { status: t, ctx: i } = this._processInputParams(e), n = (r, a) => {
2637
- if (Is(r) || Is(a))
2637
+ if (Ns(r) || Ns(a))
2638
2638
  return E;
2639
- const o = Ns(r.value, a.value);
2640
- return o.valid ? ((Ms(r) || Ms(a)) && t.dirty(), { status: t.value, value: o.data }) : (g(i, {
2639
+ const o = js(r.value, a.value);
2640
+ return o.valid ? ((Ps(r) || Ps(a)) && t.dirty(), { status: t.value, value: o.data }) : (g(i, {
2641
2641
  code: m.invalid_intersection_types
2642
2642
  }), E);
2643
2643
  };
@@ -2663,10 +2663,10 @@ class St extends I {
2663
2663
  }));
2664
2664
  }
2665
2665
  }
2666
- St.create = (s, e, t) => new St({
2666
+ Et.create = (s, e, t) => new Et({
2667
2667
  left: s,
2668
2668
  right: e,
2669
- typeName: S.ZodIntersection,
2669
+ typeName: T.ZodIntersection,
2670
2670
  ...A(t)
2671
2671
  });
2672
2672
  class he extends I {
@@ -2697,7 +2697,7 @@ class he extends I {
2697
2697
  const o = this._def.items[a] || this._def.rest;
2698
2698
  return o ? o._parse(new ue(i, r, i.path, a)) : null;
2699
2699
  }).filter((r) => !!r);
2700
- return i.common.async ? Promise.all(n).then((r) => K.mergeArray(t, r)) : K.mergeArray(t, n);
2700
+ return i.common.async ? Promise.all(n).then((r) => J.mergeArray(t, r)) : J.mergeArray(t, n);
2701
2701
  }
2702
2702
  get items() {
2703
2703
  return this._def.items;
@@ -2714,12 +2714,12 @@ he.create = (s, e) => {
2714
2714
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2715
2715
  return new he({
2716
2716
  items: s,
2717
- typeName: S.ZodTuple,
2717
+ typeName: T.ZodTuple,
2718
2718
  rest: null,
2719
2719
  ...A(e)
2720
2720
  });
2721
2721
  };
2722
- class $t extends I {
2722
+ class Ct extends I {
2723
2723
  get keySchema() {
2724
2724
  return this._def.keyType;
2725
2725
  }
@@ -2740,26 +2740,26 @@ class $t extends I {
2740
2740
  key: r._parse(new ue(i, o, i.path, o)),
2741
2741
  value: a._parse(new ue(i, i.data[o], i.path, o))
2742
2742
  });
2743
- return i.common.async ? K.mergeObjectAsync(t, n) : K.mergeObjectSync(t, n);
2743
+ return i.common.async ? J.mergeObjectAsync(t, n) : J.mergeObjectSync(t, n);
2744
2744
  }
2745
2745
  get element() {
2746
2746
  return this._def.valueType;
2747
2747
  }
2748
2748
  static create(e, t, i) {
2749
- return t instanceof I ? new $t({
2749
+ return t instanceof I ? new Ct({
2750
2750
  keyType: e,
2751
2751
  valueType: t,
2752
- typeName: S.ZodRecord,
2752
+ typeName: T.ZodRecord,
2753
2753
  ...A(i)
2754
- }) : new $t({
2754
+ }) : new Ct({
2755
2755
  keyType: ie.create(),
2756
2756
  valueType: e,
2757
- typeName: S.ZodRecord,
2757
+ typeName: T.ZodRecord,
2758
2758
  ...A(t)
2759
2759
  });
2760
2760
  }
2761
2761
  }
2762
- class qt extends I {
2762
+ class Xt extends I {
2763
2763
  get keySchema() {
2764
2764
  return this._def.keyType;
2765
2765
  }
@@ -2801,13 +2801,13 @@ class qt extends I {
2801
2801
  }
2802
2802
  }
2803
2803
  }
2804
- qt.create = (s, e, t) => new qt({
2804
+ Xt.create = (s, e, t) => new Xt({
2805
2805
  valueType: e,
2806
2806
  keyType: s,
2807
- typeName: S.ZodMap,
2807
+ typeName: T.ZodMap,
2808
2808
  ...A(t)
2809
2809
  });
2810
- class Ve extends I {
2810
+ class Ke extends I {
2811
2811
  _parse(e) {
2812
2812
  const { status: t, ctx: i } = this._processInputParams(e);
2813
2813
  if (i.parsedType !== f.set)
@@ -2846,13 +2846,13 @@ class Ve extends I {
2846
2846
  return i.common.async ? Promise.all(o).then((c) => a(c)) : a(o);
2847
2847
  }
2848
2848
  min(e, t) {
2849
- return new Ve({
2849
+ return new Ke({
2850
2850
  ...this._def,
2851
2851
  minSize: { value: e, message: _.toString(t) }
2852
2852
  });
2853
2853
  }
2854
2854
  max(e, t) {
2855
- return new Ve({
2855
+ return new Ke({
2856
2856
  ...this._def,
2857
2857
  maxSize: { value: e, message: _.toString(t) }
2858
2858
  });
@@ -2864,14 +2864,14 @@ class Ve extends I {
2864
2864
  return this.min(1, e);
2865
2865
  }
2866
2866
  }
2867
- Ve.create = (s, e) => new Ve({
2867
+ Ke.create = (s, e) => new Ke({
2868
2868
  valueType: s,
2869
2869
  minSize: null,
2870
2870
  maxSize: null,
2871
- typeName: S.ZodSet,
2871
+ typeName: T.ZodSet,
2872
2872
  ...A(e)
2873
2873
  });
2874
- class Qe extends I {
2874
+ class st extends I {
2875
2875
  constructor() {
2876
2876
  super(...arguments), this.validate = this.implement;
2877
2877
  }
@@ -2884,14 +2884,14 @@ class Qe extends I {
2884
2884
  received: t.parsedType
2885
2885
  }), E;
2886
2886
  function i(o, c) {
2887
- return Vt({
2887
+ return Jt({
2888
2888
  data: o,
2889
2889
  path: t.path,
2890
2890
  errorMaps: [
2891
2891
  t.common.contextualErrorMap,
2892
2892
  t.schemaErrorMap,
2893
- Ft(),
2894
- bt
2893
+ Kt(),
2894
+ _t
2895
2895
  ].filter((l) => !!l),
2896
2896
  issueData: {
2897
2897
  code: m.invalid_arguments,
@@ -2900,14 +2900,14 @@ class Qe extends I {
2900
2900
  });
2901
2901
  }
2902
2902
  function n(o, c) {
2903
- return Vt({
2903
+ return Jt({
2904
2904
  data: o,
2905
2905
  path: t.path,
2906
2906
  errorMaps: [
2907
2907
  t.common.contextualErrorMap,
2908
2908
  t.schemaErrorMap,
2909
- Ft(),
2910
- bt
2909
+ Kt(),
2910
+ _t
2911
2911
  ].filter((l) => !!l),
2912
2912
  issueData: {
2913
2913
  code: m.invalid_return_type,
@@ -2916,7 +2916,7 @@ class Qe extends I {
2916
2916
  });
2917
2917
  }
2918
2918
  const r = { errorMap: t.common.contextualErrorMap }, a = t.data;
2919
- if (this._def.returns instanceof it) {
2919
+ if (this._def.returns instanceof rt) {
2920
2920
  const o = this;
2921
2921
  return Y(async function(...c) {
2922
2922
  const l = new ne([]), h = await o._def.args.parseAsync(c, r).catch((d) => {
@@ -2946,13 +2946,13 @@ class Qe extends I {
2946
2946
  return this._def.returns;
2947
2947
  }
2948
2948
  args(...e) {
2949
- return new Qe({
2949
+ return new st({
2950
2950
  ...this._def,
2951
- args: he.create(e).rest(De.create())
2951
+ args: he.create(e).rest(He.create())
2952
2952
  });
2953
2953
  }
2954
2954
  returns(e) {
2955
- return new Qe({
2955
+ return new st({
2956
2956
  ...this._def,
2957
2957
  returns: e
2958
2958
  });
@@ -2964,15 +2964,15 @@ class Qe extends I {
2964
2964
  return this.parse(e);
2965
2965
  }
2966
2966
  static create(e, t, i) {
2967
- return new Qe({
2968
- args: e || he.create([]).rest(De.create()),
2969
- returns: t || De.create(),
2970
- typeName: S.ZodFunction,
2967
+ return new st({
2968
+ args: e || he.create([]).rest(He.create()),
2969
+ returns: t || He.create(),
2970
+ typeName: T.ZodFunction,
2971
2971
  ...A(i)
2972
2972
  });
2973
2973
  }
2974
2974
  }
2975
- class Et extends I {
2975
+ class At extends I {
2976
2976
  get schema() {
2977
2977
  return this._def.getter();
2978
2978
  }
@@ -2981,12 +2981,12 @@ class Et extends I {
2981
2981
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2982
2982
  }
2983
2983
  }
2984
- Et.create = (s, e) => new Et({
2984
+ At.create = (s, e) => new At({
2985
2985
  getter: s,
2986
- typeName: S.ZodLazy,
2986
+ typeName: T.ZodLazy,
2987
2987
  ...A(e)
2988
2988
  });
2989
- class Ct extends I {
2989
+ class Ot extends I {
2990
2990
  _parse(e) {
2991
2991
  if (e.data !== this._def.value) {
2992
2992
  const t = this._getOrReturnCtx(e);
@@ -3002,19 +3002,19 @@ class Ct extends I {
3002
3002
  return this._def.value;
3003
3003
  }
3004
3004
  }
3005
- Ct.create = (s, e) => new Ct({
3005
+ Ot.create = (s, e) => new Ot({
3006
3006
  value: s,
3007
- typeName: S.ZodLiteral,
3007
+ typeName: T.ZodLiteral,
3008
3008
  ...A(e)
3009
3009
  });
3010
- function Fi(s, e) {
3011
- return new Oe({
3010
+ function Vi(s, e) {
3011
+ return new Ie({
3012
3012
  values: s,
3013
- typeName: S.ZodEnum,
3013
+ typeName: T.ZodEnum,
3014
3014
  ...A(e)
3015
3015
  });
3016
3016
  }
3017
- class Oe extends I {
3017
+ class Ie extends I {
3018
3018
  _parse(e) {
3019
3019
  if (typeof e.data != "string") {
3020
3020
  const t = this._getOrReturnCtx(e), i = this._def.values;
@@ -3056,14 +3056,14 @@ class Oe extends I {
3056
3056
  return e;
3057
3057
  }
3058
3058
  extract(e) {
3059
- return Oe.create(e);
3059
+ return Ie.create(e);
3060
3060
  }
3061
3061
  exclude(e) {
3062
- return Oe.create(this.options.filter((t) => !e.includes(t)));
3062
+ return Ie.create(this.options.filter((t) => !e.includes(t)));
3063
3063
  }
3064
3064
  }
3065
- Oe.create = Fi;
3066
- class At extends I {
3065
+ Ie.create = Vi;
3066
+ class It extends I {
3067
3067
  _parse(e) {
3068
3068
  const t = j.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(e);
3069
3069
  if (i.parsedType !== f.string && i.parsedType !== f.number) {
@@ -3088,12 +3088,12 @@ class At extends I {
3088
3088
  return this._def.values;
3089
3089
  }
3090
3090
  }
3091
- At.create = (s, e) => new At({
3091
+ It.create = (s, e) => new It({
3092
3092
  values: s,
3093
- typeName: S.ZodNativeEnum,
3093
+ typeName: T.ZodNativeEnum,
3094
3094
  ...A(e)
3095
3095
  });
3096
- class it extends I {
3096
+ class rt extends I {
3097
3097
  unwrap() {
3098
3098
  return this._def.type;
3099
3099
  }
@@ -3112,9 +3112,9 @@ class it extends I {
3112
3112
  })));
3113
3113
  }
3114
3114
  }
3115
- it.create = (s, e) => new it({
3115
+ rt.create = (s, e) => new rt({
3116
3116
  type: s,
3117
- typeName: S.ZodPromise,
3117
+ typeName: T.ZodPromise,
3118
3118
  ...A(e)
3119
3119
  });
3120
3120
  class ae extends I {
@@ -3122,7 +3122,7 @@ class ae extends I {
3122
3122
  return this._def.schema;
3123
3123
  }
3124
3124
  sourceType() {
3125
- return this._def.schema._def.typeName === S.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3125
+ return this._def.schema._def.typeName === T.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3126
3126
  }
3127
3127
  _parse(e) {
3128
3128
  const { status: t, ctx: i } = this._processInputParams(e), n = this._def.effect || null, r = {
@@ -3174,27 +3174,27 @@ class ae extends I {
3174
3174
  path: i.path,
3175
3175
  parent: i
3176
3176
  });
3177
- if (!wt(a))
3177
+ if (!xt(a))
3178
3178
  return a;
3179
3179
  const o = n.transform(a.value, r);
3180
3180
  if (o instanceof Promise)
3181
3181
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3182
3182
  return { status: t.value, value: o };
3183
3183
  } else
3184
- return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((a) => wt(a) ? Promise.resolve(n.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
3184
+ return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((a) => xt(a) ? Promise.resolve(n.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
3185
3185
  j.assertNever(n);
3186
3186
  }
3187
3187
  }
3188
3188
  ae.create = (s, e, t) => new ae({
3189
3189
  schema: s,
3190
- typeName: S.ZodEffects,
3190
+ typeName: T.ZodEffects,
3191
3191
  effect: e,
3192
3192
  ...A(t)
3193
3193
  });
3194
3194
  ae.createWithPreprocess = (s, e, t) => new ae({
3195
3195
  schema: e,
3196
3196
  effect: { type: "preprocess", transform: s },
3197
- typeName: S.ZodEffects,
3197
+ typeName: T.ZodEffects,
3198
3198
  ...A(t)
3199
3199
  });
3200
3200
  class _e extends I {
@@ -3207,10 +3207,10 @@ class _e extends I {
3207
3207
  }
3208
3208
  _e.create = (s, e) => new _e({
3209
3209
  innerType: s,
3210
- typeName: S.ZodOptional,
3210
+ typeName: T.ZodOptional,
3211
3211
  ...A(e)
3212
3212
  });
3213
- class We extends I {
3213
+ class Je extends I {
3214
3214
  _parse(e) {
3215
3215
  return this._getType(e) === f.null ? Y(null) : this._def.innerType._parse(e);
3216
3216
  }
@@ -3218,12 +3218,12 @@ class We extends I {
3218
3218
  return this._def.innerType;
3219
3219
  }
3220
3220
  }
3221
- We.create = (s, e) => new We({
3221
+ Je.create = (s, e) => new Je({
3222
3222
  innerType: s,
3223
- typeName: S.ZodNullable,
3223
+ typeName: T.ZodNullable,
3224
3224
  ...A(e)
3225
3225
  });
3226
- class Ot extends I {
3226
+ class Mt extends I {
3227
3227
  _parse(e) {
3228
3228
  const { ctx: t } = this._processInputParams(e);
3229
3229
  let i = t.data;
@@ -3237,13 +3237,13 @@ class Ot extends I {
3237
3237
  return this._def.innerType;
3238
3238
  }
3239
3239
  }
3240
- Ot.create = (s, e) => new Ot({
3240
+ Mt.create = (s, e) => new Mt({
3241
3241
  innerType: s,
3242
- typeName: S.ZodDefault,
3242
+ typeName: T.ZodDefault,
3243
3243
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
3244
3244
  ...A(e)
3245
3245
  });
3246
- class Yt extends I {
3246
+ class Qt extends I {
3247
3247
  _parse(e) {
3248
3248
  const { ctx: t } = this._processInputParams(e), i = {
3249
3249
  ...t,
@@ -3258,7 +3258,7 @@ class Yt extends I {
3258
3258
  ...i
3259
3259
  }
3260
3260
  });
3261
- return Wt(n) ? n.then((r) => ({
3261
+ return qt(n) ? n.then((r) => ({
3262
3262
  status: "valid",
3263
3263
  value: r.status === "valid" ? r.value : this._def.catchValue({
3264
3264
  get error() {
@@ -3280,13 +3280,13 @@ class Yt extends I {
3280
3280
  return this._def.innerType;
3281
3281
  }
3282
3282
  }
3283
- Yt.create = (s, e) => new Yt({
3283
+ Qt.create = (s, e) => new Qt({
3284
3284
  innerType: s,
3285
- typeName: S.ZodCatch,
3285
+ typeName: T.ZodCatch,
3286
3286
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
3287
3287
  ...A(e)
3288
3288
  });
3289
- class Gt extends I {
3289
+ class es extends I {
3290
3290
  _parse(e) {
3291
3291
  if (this._getType(e) !== f.nan) {
3292
3292
  const t = this._getOrReturnCtx(e);
@@ -3299,12 +3299,12 @@ class Gt extends I {
3299
3299
  return { status: "valid", value: e.data };
3300
3300
  }
3301
3301
  }
3302
- Gt.create = (s) => new Gt({
3303
- typeName: S.ZodNaN,
3302
+ es.create = (s) => new es({
3303
+ typeName: T.ZodNaN,
3304
3304
  ...A(s)
3305
3305
  });
3306
3306
  const Kn = Symbol("zod_brand");
3307
- class Vi extends I {
3307
+ class Wi extends I {
3308
3308
  _parse(e) {
3309
3309
  const { ctx: t } = this._processInputParams(e), i = t.data;
3310
3310
  return this._def.type._parse({
@@ -3317,7 +3317,7 @@ class Vi extends I {
3317
3317
  return this._def.type;
3318
3318
  }
3319
3319
  }
3320
- class Nt extends I {
3320
+ class Rt extends I {
3321
3321
  _parse(e) {
3322
3322
  const { status: t, ctx: i } = this._processInputParams(e);
3323
3323
  if (i.common.async)
@@ -3327,7 +3327,7 @@ class Nt extends I {
3327
3327
  path: i.path,
3328
3328
  parent: i
3329
3329
  });
3330
- return n.status === "aborted" ? E : n.status === "dirty" ? (t.dirty(), Bi(n.value)) : this._def.out._parseAsync({
3330
+ return n.status === "aborted" ? E : n.status === "dirty" ? (t.dirty(), Fi(n.value)) : this._def.out._parseAsync({
3331
3331
  data: n.value,
3332
3332
  path: i.path,
3333
3333
  parent: i
@@ -3350,127 +3350,127 @@ class Nt extends I {
3350
3350
  }
3351
3351
  }
3352
3352
  static create(e, t) {
3353
- return new Nt({
3353
+ return new Rt({
3354
3354
  in: e,
3355
3355
  out: t,
3356
- typeName: S.ZodPipeline
3356
+ typeName: T.ZodPipeline
3357
3357
  });
3358
3358
  }
3359
3359
  }
3360
- class Xt extends I {
3360
+ class ts extends I {
3361
3361
  _parse(e) {
3362
3362
  const t = this._def.innerType._parse(e);
3363
- return wt(t) && (t.value = Object.freeze(t.value)), t;
3363
+ return xt(t) && (t.value = Object.freeze(t.value)), t;
3364
3364
  }
3365
3365
  }
3366
- Xt.create = (s, e) => new Xt({
3366
+ ts.create = (s, e) => new ts({
3367
3367
  innerType: s,
3368
- typeName: S.ZodReadonly,
3368
+ typeName: T.ZodReadonly,
3369
3369
  ...A(e)
3370
3370
  });
3371
- const Wi = (s, e = {}, t) => s ? st.create().superRefine((i, n) => {
3371
+ const Ki = (s, e = {}, t) => s ? nt.create().superRefine((i, n) => {
3372
3372
  var r, a;
3373
3373
  if (!s(i)) {
3374
3374
  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
3375
  n.addIssue({ code: "custom", ...l, fatal: c });
3376
3376
  }
3377
- }) : st.create(), Jn = {
3377
+ }) : nt.create(), Jn = {
3378
3378
  object: H.lazycreate
3379
3379
  };
3380
- var S;
3380
+ var T;
3381
3381
  (function(s) {
3382
3382
  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
- })(S || (S = {}));
3383
+ })(T || (T = {}));
3384
3384
  const qn = (s, e = {
3385
3385
  message: `Input not instance of ${s.name}`
3386
- }) => Wi((t) => t instanceof s, e), Ki = ie.create, Ji = Ce.create, Yn = Gt.create, Gn = Ae.create, qi = _t.create, Xn = Fe.create, Qn = Kt.create, er = xt.create, tr = kt.create, sr = st.create, ir = De.create, nr = xe.create, rr = Jt.create, ar = re.create, or = H.create, cr = H.strictCreate, dr = Tt.create, lr = ds.create, ur = St.create, hr = he.create, pr = $t.create, mr = qt.create, fr = Ve.create, gr = Qe.create, yr = Et.create, vr = Ct.create, br = Oe.create, wr = At.create, _r = it.create, ki = ae.create, xr = _e.create, kr = We.create, Tr = ae.createWithPreprocess, Sr = Nt.create, $r = () => Ki().optional(), Er = () => Ji().optional(), Cr = () => qi().optional(), Ar = {
3386
+ }) => Ki((t) => t instanceof s, e), Ji = ie.create, qi = Ae.create, Yn = es.create, Gn = Oe.create, Yi = kt.create, Xn = We.create, Qn = Yt.create, er = St.create, tr = Tt.create, sr = nt.create, ir = He.create, nr = xe.create, rr = Gt.create, ar = re.create, or = H.create, cr = H.strictCreate, dr = $t.create, lr = us.create, ur = Et.create, hr = he.create, pr = Ct.create, mr = Xt.create, fr = Ke.create, gr = st.create, yr = At.create, vr = Ot.create, br = Ie.create, wr = It.create, _r = rt.create, Si = ae.create, xr = _e.create, kr = Je.create, Sr = ae.createWithPreprocess, Tr = Rt.create, $r = () => Ji().optional(), Er = () => qi().optional(), Cr = () => Yi().optional(), Ar = {
3387
3387
  string: (s) => ie.create({ ...s, coerce: !0 }),
3388
- number: (s) => Ce.create({ ...s, coerce: !0 }),
3389
- boolean: (s) => _t.create({
3388
+ number: (s) => Ae.create({ ...s, coerce: !0 }),
3389
+ boolean: (s) => kt.create({
3390
3390
  ...s,
3391
3391
  coerce: !0
3392
3392
  }),
3393
- bigint: (s) => Ae.create({ ...s, coerce: !0 }),
3394
- date: (s) => Fe.create({ ...s, coerce: !0 })
3393
+ bigint: (s) => Oe.create({ ...s, coerce: !0 }),
3394
+ date: (s) => We.create({ ...s, coerce: !0 })
3395
3395
  }, Or = E;
3396
3396
  var w = /* @__PURE__ */ Object.freeze({
3397
3397
  __proto__: null,
3398
- defaultErrorMap: bt,
3398
+ defaultErrorMap: _t,
3399
3399
  setErrorMap: Pn,
3400
- getErrorMap: Ft,
3401
- makeIssue: Vt,
3400
+ getErrorMap: Kt,
3401
+ makeIssue: Jt,
3402
3402
  EMPTY_PATH: jn,
3403
3403
  addIssueToContext: g,
3404
- ParseStatus: K,
3404
+ ParseStatus: J,
3405
3405
  INVALID: E,
3406
- DIRTY: Bi,
3406
+ DIRTY: Fi,
3407
3407
  OK: Y,
3408
- isAborted: Is,
3409
- isDirty: Ms,
3410
- isValid: wt,
3411
- isAsync: Wt,
3408
+ isAborted: Ns,
3409
+ isDirty: Ps,
3410
+ isValid: xt,
3411
+ isAsync: qt,
3412
3412
  get util() {
3413
3413
  return j;
3414
3414
  },
3415
3415
  get objectUtil() {
3416
- return Os;
3416
+ return Ms;
3417
3417
  },
3418
3418
  ZodParsedType: f,
3419
3419
  getParsedType: Ee,
3420
3420
  ZodType: I,
3421
3421
  ZodString: ie,
3422
- ZodNumber: Ce,
3423
- ZodBigInt: Ae,
3424
- ZodBoolean: _t,
3425
- ZodDate: Fe,
3426
- ZodSymbol: Kt,
3427
- ZodUndefined: xt,
3428
- ZodNull: kt,
3429
- ZodAny: st,
3430
- ZodUnknown: De,
3422
+ ZodNumber: Ae,
3423
+ ZodBigInt: Oe,
3424
+ ZodBoolean: kt,
3425
+ ZodDate: We,
3426
+ ZodSymbol: Yt,
3427
+ ZodUndefined: St,
3428
+ ZodNull: Tt,
3429
+ ZodAny: nt,
3430
+ ZodUnknown: He,
3431
3431
  ZodNever: xe,
3432
- ZodVoid: Jt,
3432
+ ZodVoid: Gt,
3433
3433
  ZodArray: re,
3434
3434
  ZodObject: H,
3435
- ZodUnion: Tt,
3436
- ZodDiscriminatedUnion: ds,
3437
- ZodIntersection: St,
3435
+ ZodUnion: $t,
3436
+ ZodDiscriminatedUnion: us,
3437
+ ZodIntersection: Et,
3438
3438
  ZodTuple: he,
3439
- ZodRecord: $t,
3440
- ZodMap: qt,
3441
- ZodSet: Ve,
3442
- ZodFunction: Qe,
3443
- ZodLazy: Et,
3444
- ZodLiteral: Ct,
3445
- ZodEnum: Oe,
3446
- ZodNativeEnum: At,
3447
- ZodPromise: it,
3439
+ ZodRecord: Ct,
3440
+ ZodMap: Xt,
3441
+ ZodSet: Ke,
3442
+ ZodFunction: st,
3443
+ ZodLazy: At,
3444
+ ZodLiteral: Ot,
3445
+ ZodEnum: Ie,
3446
+ ZodNativeEnum: It,
3447
+ ZodPromise: rt,
3448
3448
  ZodEffects: ae,
3449
3449
  ZodTransformer: ae,
3450
3450
  ZodOptional: _e,
3451
- ZodNullable: We,
3452
- ZodDefault: Ot,
3453
- ZodCatch: Yt,
3454
- ZodNaN: Gt,
3451
+ ZodNullable: Je,
3452
+ ZodDefault: Mt,
3453
+ ZodCatch: Qt,
3454
+ ZodNaN: es,
3455
3455
  BRAND: Kn,
3456
- ZodBranded: Vi,
3457
- ZodPipeline: Nt,
3458
- ZodReadonly: Xt,
3459
- custom: Wi,
3456
+ ZodBranded: Wi,
3457
+ ZodPipeline: Rt,
3458
+ ZodReadonly: ts,
3459
+ custom: Ki,
3460
3460
  Schema: I,
3461
3461
  ZodSchema: I,
3462
3462
  late: Jn,
3463
3463
  get ZodFirstPartyTypeKind() {
3464
- return S;
3464
+ return T;
3465
3465
  },
3466
3466
  coerce: Ar,
3467
3467
  any: sr,
3468
3468
  array: ar,
3469
3469
  bigint: Gn,
3470
- boolean: qi,
3470
+ boolean: Yi,
3471
3471
  date: Xn,
3472
3472
  discriminatedUnion: lr,
3473
- effect: ki,
3473
+ effect: Si,
3474
3474
  enum: br,
3475
3475
  function: gr,
3476
3476
  instanceof: qn,
@@ -3483,21 +3483,21 @@ var w = /* @__PURE__ */ Object.freeze({
3483
3483
  never: nr,
3484
3484
  null: tr,
3485
3485
  nullable: kr,
3486
- number: Ji,
3486
+ number: qi,
3487
3487
  object: or,
3488
3488
  oboolean: Cr,
3489
3489
  onumber: Er,
3490
3490
  optional: xr,
3491
3491
  ostring: $r,
3492
- pipeline: Sr,
3493
- preprocess: Tr,
3492
+ pipeline: Tr,
3493
+ preprocess: Sr,
3494
3494
  promise: _r,
3495
3495
  record: pr,
3496
3496
  set: fr,
3497
3497
  strictObject: cr,
3498
- string: Ki,
3498
+ string: Ji,
3499
3499
  symbol: Qn,
3500
- transformer: ki,
3500
+ transformer: Si,
3501
3501
  tuple: hr,
3502
3502
  undefined: er,
3503
3503
  union: dr,
@@ -3508,7 +3508,7 @@ var w = /* @__PURE__ */ Object.freeze({
3508
3508
  quotelessJson: Nn,
3509
3509
  ZodError: ne
3510
3510
  });
3511
- const ls = w.object({
3511
+ const hs = w.object({
3512
3512
  assistantId: w.string(),
3513
3513
  params: w.record(w.any()).default({}),
3514
3514
  config: w.object({
@@ -3573,37 +3573,37 @@ function Ir(s) {
3573
3573
  } else
3574
3574
  return Array.from(s);
3575
3575
  }
3576
- var Us = !1;
3576
+ var Hs = !1;
3577
3577
  if (typeof window < "u") {
3578
3578
  var Ti = {
3579
3579
  get passive() {
3580
- Us = !0;
3580
+ Hs = !0;
3581
3581
  }
3582
3582
  };
3583
3583
  window.addEventListener("testPassive", null, Ti), window.removeEventListener("testPassive", null, Ti);
3584
3584
  }
3585
- var Qt = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Ue = [], es = !1, Yi = -1, ht = void 0, Ze = void 0, pt = void 0, Gi = function(s) {
3586
- return Ue.some(function(e) {
3585
+ 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, Gi = -1, mt = void 0, De = void 0, ft = void 0, Xi = function(s) {
3586
+ return Be.some(function(e) {
3587
3587
  return !!(e.options.allowTouchMove && e.options.allowTouchMove(s));
3588
3588
  });
3589
- }, Hs = function(s) {
3589
+ }, Bs = function(s) {
3590
3590
  var e = s || window.event;
3591
- return Gi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
3591
+ return Xi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
3592
3592
  }, Mr = function(s) {
3593
- if (pt === void 0) {
3593
+ if (ft === void 0) {
3594
3594
  var e = !!s && s.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
3595
3595
  if (e && t > 0) {
3596
3596
  var i = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
3597
- pt = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
3597
+ ft = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
3598
3598
  }
3599
3599
  }
3600
- ht === void 0 && (ht = document.body.style.overflow, document.body.style.overflow = "hidden");
3600
+ mt === void 0 && (mt = document.body.style.overflow, document.body.style.overflow = "hidden");
3601
3601
  }, Nr = function() {
3602
- pt !== void 0 && (document.body.style.paddingRight = pt, pt = void 0), ht !== void 0 && (document.body.style.overflow = ht, ht = void 0);
3602
+ ft !== void 0 && (document.body.style.paddingRight = ft, ft = void 0), mt !== void 0 && (document.body.style.overflow = mt, mt = void 0);
3603
3603
  }, Pr = function() {
3604
3604
  return window.requestAnimationFrame(function() {
3605
- if (Ze === void 0) {
3606
- Ze = {
3605
+ if (De === void 0) {
3606
+ De = {
3607
3607
  position: document.body.style.position,
3608
3608
  top: document.body.style.top,
3609
3609
  left: document.body.style.left
@@ -3618,46 +3618,46 @@ var Qt = typeof window < "u" && window.navigator && window.navigator.platform &&
3618
3618
  }
3619
3619
  });
3620
3620
  }, jr = function() {
3621
- if (Ze !== void 0) {
3621
+ if (De !== void 0) {
3622
3622
  var s = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
3623
- document.body.style.position = Ze.position, document.body.style.top = Ze.top, document.body.style.left = Ze.left, window.scrollTo(e, s), Ze = void 0;
3623
+ document.body.style.position = De.position, document.body.style.top = De.top, document.body.style.left = De.left, window.scrollTo(e, s), De = void 0;
3624
3624
  }
3625
3625
  }, Rr = function(s) {
3626
3626
  return s ? s.scrollHeight - s.scrollTop <= s.clientHeight : !1;
3627
3627
  }, Zr = function(s, e) {
3628
- var t = s.targetTouches[0].clientY - Yi;
3629
- return Gi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Rr(e) && t < 0 ? Hs(s) : (s.stopPropagation(), !0);
3628
+ var t = s.targetTouches[0].clientY - Gi;
3629
+ return Xi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Rr(e) && t < 0 ? Bs(s) : (s.stopPropagation(), !0);
3630
3630
  }, Lr = function(s, e) {
3631
3631
  if (!s) {
3632
3632
  console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
3633
3633
  return;
3634
3634
  }
3635
- if (!Ue.some(function(i) {
3635
+ if (!Be.some(function(i) {
3636
3636
  return i.targetElement === s;
3637
3637
  })) {
3638
3638
  var t = {
3639
3639
  targetElement: s,
3640
3640
  options: e || {}
3641
3641
  };
3642
- Ue = [].concat(Ir(Ue), [t]), Qt ? Pr() : Mr(e), Qt && (s.ontouchstart = function(i) {
3643
- i.targetTouches.length === 1 && (Yi = i.targetTouches[0].clientY);
3642
+ Be = [].concat(Ir(Be), [t]), ss ? Pr() : Mr(e), ss && (s.ontouchstart = function(i) {
3643
+ i.targetTouches.length === 1 && (Gi = i.targetTouches[0].clientY);
3644
3644
  }, s.ontouchmove = function(i) {
3645
3645
  i.targetTouches.length === 1 && Zr(i, s);
3646
- }, es || (document.addEventListener("touchmove", Hs, Us ? { passive: !1 } : void 0), es = !0));
3646
+ }, is || (document.addEventListener("touchmove", Bs, Hs ? { passive: !1 } : void 0), is = !0));
3647
3647
  }
3648
- }, Si = function(s) {
3648
+ }, $i = function(s) {
3649
3649
  if (!s) {
3650
3650
  console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
3651
3651
  return;
3652
3652
  }
3653
- Ue = Ue.filter(function(e) {
3653
+ Be = Be.filter(function(e) {
3654
3654
  return e.targetElement !== s;
3655
- }), Qt && (s.ontouchstart = null, s.ontouchmove = null, es && Ue.length === 0 && (document.removeEventListener("touchmove", Hs, Us ? { passive: !1 } : void 0), es = !1)), Qt ? jr() : Nr();
3656
- }, zr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3657
- function Xi(s) {
3655
+ }), 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();
3656
+ }, Dr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3657
+ function Qi(s) {
3658
3658
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3659
3659
  }
3660
- var Bs = {};
3660
+ var Fs = {};
3661
3661
  (function(s) {
3662
3662
  function e(o) {
3663
3663
  o && o.options && clearTimeout(o.options.timer);
@@ -3712,26 +3712,26 @@ var Bs = {};
3712
3712
  return r.apply(void 0, [l, h].concat(o));
3713
3713
  }
3714
3714
  Object.defineProperty(s, "__esModule", { value: !0 }), s.cancel = e, s.debounce = a;
3715
- })(Bs);
3716
- var Dr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Pt = (s, e, t, i) => {
3715
+ })(Fs);
3716
+ var zr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Zt = (s, e, t, i) => {
3717
3717
  for (var n = i > 1 ? void 0 : i ? Ur(e, t) : e, r = s.length - 1, a; r >= 0; r--)
3718
3718
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
3719
- return i && n && Dr(e, t, n), n;
3719
+ return i && n && zr(e, t, n), n;
3720
3720
  };
3721
- let Ke = class extends Q {
3721
+ let qe = class extends Q {
3722
3722
  constructor() {
3723
3723
  super(...arguments), this.isOpen = !0, this.onResizeHandler = () => {
3724
- this.isOpen && window.innerWidth < 768 ? Lr(this) : Si(this);
3724
+ this.isOpen && window.innerWidth < 768 ? Lr(this) : $i(this);
3725
3725
  };
3726
3726
  }
3727
3727
  connectedCallback() {
3728
- super.connectedCallback(), this.cleanOptions = ls.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
3728
+ super.connectedCallback(), this.cleanOptions = hs.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
3729
3729
  }
3730
3730
  disconnectedCallback() {
3731
- super.disconnectedCallback(), Si(this), window.removeEventListener("resize", this.onResizeHandler);
3731
+ super.disconnectedCallback(), $i(this), window.removeEventListener("resize", this.onResizeHandler);
3732
3732
  }
3733
3733
  render() {
3734
- const s = this.cleanOptions.config.placement !== "left", e = _i({
3734
+ const s = this.cleanOptions.config.placement !== "left", e = xi({
3735
3735
  fixed: !0,
3736
3736
  "bottom-0": !0,
3737
3737
  "w-full": this.isOpen,
@@ -3741,7 +3741,7 @@ let Ke = class extends Q {
3741
3741
  "md:bottom-8": !0,
3742
3742
  "md:w-fit": !0,
3743
3743
  "md:h-fit": !0
3744
- }), t = _i({
3744
+ }), t = xi({
3745
3745
  "mt-4": !0,
3746
3746
  "px-8": !0,
3747
3747
  "pb-8": !0,
@@ -3756,13 +3756,13 @@ let Ke = class extends Q {
3756
3756
  "md:flex": !0
3757
3757
  // override 'hidden' to ALWAYS show button on larger screens, whether chat is open or not
3758
3758
  });
3759
- return z`
3759
+ return L`
3760
3760
  <div
3761
3761
  class=${e}
3762
3762
  >
3763
3763
  <div
3764
3764
  class="w-full h-full p-2 md:w-[350px] md:h-[500px] md:p-0"
3765
- style=${ut({ display: this.isOpen ? "block" : "none" })}
3765
+ style=${tt({ display: this.isOpen ? "block" : "none" })}
3766
3766
  >
3767
3767
  <iai-chat
3768
3768
  .options=${this.options}
@@ -3772,7 +3772,7 @@ let Ke = class extends Q {
3772
3772
 
3773
3773
  <div
3774
3774
  class=${t}
3775
- style=${ut({ justifyContent: s ? "flex-end" : "flex-start" })}
3775
+ style=${tt({ justifyContent: s ? "flex-end" : "flex-start" })}
3776
3776
  >
3777
3777
  <iai-chat-open-chat-button
3778
3778
  .options=${this.cleanOptions}
@@ -3787,25 +3787,25 @@ let Ke = class extends Q {
3787
3787
  this.isOpen = !this.isOpen, this.onResizeHandler();
3788
3788
  }
3789
3789
  };
3790
- Ke.styles = [Ie];
3791
- Pt([
3792
- J({ type: Object })
3793
- ], Ke.prototype, "options", 2);
3794
- Pt([
3795
- ot()
3796
- ], Ke.prototype, "isOpen", 2);
3797
- Pt([
3790
+ qe.styles = [Ne];
3791
+ Zt([
3792
+ F({ type: Object })
3793
+ ], qe.prototype, "options", 2);
3794
+ Zt([
3795
+ dt()
3796
+ ], qe.prototype, "isOpen", 2);
3797
+ Zt([
3798
3798
  In("iai-chat")
3799
- ], Ke.prototype, "chatWindow", 2);
3800
- Pt([
3801
- Bs.debounce(250)
3802
- ], Ke.prototype, "onResizeHandler", 2);
3803
- Ke = Pt([
3804
- Me("iai-chat-popup")
3805
- ], Ke);
3806
- const Fs = "https://ai-dev.anyonehome.xyz";
3799
+ ], qe.prototype, "chatWindow", 2);
3800
+ Zt([
3801
+ Fs.debounce(250)
3802
+ ], qe.prototype, "onResizeHandler", 2);
3803
+ qe = Zt([
3804
+ Pe("iai-chat-popup")
3805
+ ], qe);
3806
+ const Vs = "https://ai-dev.anyonehome.xyz";
3807
3807
  async function Hr(s, e = {}) {
3808
- return await (await fetch(`${Fs}/threads`, {
3808
+ return await (await fetch(`${Vs}/threads`, {
3809
3809
  method: "POST",
3810
3810
  headers: {
3811
3811
  "Content-Type": "application/json"
@@ -3814,7 +3814,7 @@ async function Hr(s, e = {}) {
3814
3814
  })).json();
3815
3815
  }
3816
3816
  async function Br(s, e) {
3817
- return await (await fetch(`${Fs}/threads/${s}/messages`, {
3817
+ return await (await fetch(`${Vs}/threads/${s}/messages`, {
3818
3818
  method: "POST",
3819
3819
  headers: {
3820
3820
  "Content-Type": "application/json"
@@ -3823,7 +3823,7 @@ async function Br(s, e) {
3823
3823
  })).json();
3824
3824
  }
3825
3825
  async function Fr(s, e, t, i = !1) {
3826
- return await (await fetch(`${Fs}/threads/${s}/functions/${e}`, {
3826
+ return await (await fetch(`${Vs}/threads/${s}/functions/${e}`, {
3827
3827
  method: "POST",
3828
3828
  headers: {
3829
3829
  "Content-Type": "application/json"
@@ -3909,6 +3909,8 @@ let Wr = class {
3909
3909
  if (this.chatStarted)
3910
3910
  return;
3911
3911
  const { id: s } = await Hr(this.assistantId, this.params);
3912
+ if (!s)
3913
+ throw new Error("Could not start chat");
3912
3914
  this.setThreadId(s);
3913
3915
  }
3914
3916
  addMessage(s) {
@@ -4031,7 +4033,7 @@ function Kr(s) {
4031
4033
  * Copyright 2021 Google LLC
4032
4034
  * SPDX-License-Identifier: BSD-3-Clause
4033
4035
  */
4034
- function et(s, e, t) {
4036
+ function Ce(s, e, t) {
4035
4037
  return s ? e(s) : t == null ? void 0 : t(s);
4036
4038
  }
4037
4039
  /**
@@ -4039,11 +4041,11 @@ function et(s, e, t) {
4039
4041
  * Copyright 2020 Google LLC
4040
4042
  * SPDX-License-Identifier: BSD-3-Clause
4041
4043
  */
4042
- const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4044
+ const { I: Jr } = En, Ei = () => document.createComment(""), ht = (s, e, t) => {
4043
4045
  var i;
4044
4046
  const n = s._$AA.parentNode, r = e === void 0 ? s._$AB : e._$AA;
4045
4047
  if (t === void 0) {
4046
- const a = n.insertBefore($i(), r), o = n.insertBefore($i(), r);
4048
+ const a = n.insertBefore(Ei(), r), o = n.insertBefore(Ei(), r);
4047
4049
  t = new Jr(a, o, s, s.options);
4048
4050
  } else {
4049
4051
  const a = t._$AB.nextSibling, o = t._$AM, c = o !== s;
@@ -4060,7 +4062,7 @@ const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4060
4062
  }
4061
4063
  }
4062
4064
  return t;
4063
- }, Re = (s, e, t = s) => (s._$AI(e, t), s), qr = {}, Yr = (s, e = qr) => s._$AH = e, Gr = (s) => s._$AH, As = (s) => {
4065
+ }, Le = (s, e, t = s) => (s._$AI(e, t), s), qr = {}, Yr = (s, e = qr) => s._$AH = e, Gr = (s) => s._$AH, Is = (s) => {
4064
4066
  var e;
4065
4067
  (e = s._$AP) == null || e.call(s, !1, !0);
4066
4068
  let t = s._$AA;
@@ -4075,14 +4077,14 @@ const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4075
4077
  * Copyright 2017 Google LLC
4076
4078
  * SPDX-License-Identifier: BSD-3-Clause
4077
4079
  */
4078
- const Ei = (s, e, t) => {
4080
+ const Ci = (s, e, t) => {
4079
4081
  const i = /* @__PURE__ */ new Map();
4080
4082
  for (let n = e; n <= t; n++)
4081
4083
  i.set(s[n], n);
4082
4084
  return i;
4083
- }, Xr = os(class extends cs {
4085
+ }, Xr = ds(class extends ls {
4084
4086
  constructor(s) {
4085
- if (super(s), s.type !== as.CHILD)
4087
+ if (super(s), s.type !== cs.CHILD)
4086
4088
  throw Error("repeat() can only be used in text expressions");
4087
4089
  }
4088
4090
  dt(s, e, t) {
@@ -4109,37 +4111,37 @@ const Ei = (s, e, t) => {
4109
4111
  else if (n[d] === null)
4110
4112
  d--;
4111
4113
  else if (o[p] === a[b])
4112
- c[b] = Re(n[p], r[b]), p++, b++;
4114
+ c[b] = Le(n[p], r[b]), p++, b++;
4113
4115
  else if (o[d] === a[N])
4114
- c[N] = Re(n[d], r[N]), d--, N--;
4116
+ c[N] = Le(n[d], r[N]), d--, N--;
4115
4117
  else if (o[p] === a[N])
4116
- c[N] = Re(n[p], r[N]), dt(s, c[N + 1], n[p]), p++, N--;
4118
+ c[N] = Le(n[p], r[N]), ht(s, c[N + 1], n[p]), p++, N--;
4117
4119
  else if (o[d] === a[b])
4118
- c[b] = Re(n[d], r[b]), dt(s, n[p], n[d]), d--, b++;
4119
- else if (l === void 0 && (l = Ei(a, b, N), h = Ei(o, p, d)), l.has(o[p]))
4120
+ c[b] = Le(n[d], r[b]), ht(s, n[p], n[d]), d--, b++;
4121
+ else if (l === void 0 && (l = Ci(a, b, N), h = Ci(o, p, d)), l.has(o[p]))
4120
4122
  if (l.has(o[d])) {
4121
4123
  const U = h.get(a[b]), G = U !== void 0 ? n[U] : null;
4122
4124
  if (G === null) {
4123
- const pe = dt(s, n[p]);
4124
- Re(pe, r[b]), c[b] = pe;
4125
+ const pe = ht(s, n[p]);
4126
+ Le(pe, r[b]), c[b] = pe;
4125
4127
  } else
4126
- c[b] = Re(G, r[b]), dt(s, n[p], G), n[U] = null;
4128
+ c[b] = Le(G, r[b]), ht(s, n[p], G), n[U] = null;
4127
4129
  b++;
4128
4130
  } else
4129
- As(n[d]), d--;
4131
+ Is(n[d]), d--;
4130
4132
  else
4131
- As(n[p]), p++;
4133
+ Is(n[p]), p++;
4132
4134
  for (; b <= N; ) {
4133
- const U = dt(s, c[N + 1]);
4134
- Re(U, r[b]), c[b++] = U;
4135
+ const U = ht(s, c[N + 1]);
4136
+ Le(U, r[b]), c[b++] = U;
4135
4137
  }
4136
4138
  for (; p <= d; ) {
4137
4139
  const U = n[p++];
4138
- U !== null && As(U);
4140
+ U !== null && Is(U);
4139
4141
  }
4140
4142
  return this.ut = a, Yr(s, c), le;
4141
4143
  }
4142
- }), Ps = z`
4144
+ }), Nt = L`
4143
4145
  <svg
4144
4146
  xmlns="http://www.w3.org/2000/svg"
4145
4147
  viewBox="0 0 24 24"
@@ -4151,7 +4153,7 @@ const Ei = (s, e, t) => {
4151
4153
  <path
4152
4154
  d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
4153
4155
  </svg>
4154
- `, Qr = z`
4156
+ `, Qr = L`
4155
4157
  <svg
4156
4158
  xmlns="http://www.w3.org/2000/svg"
4157
4159
  viewBox="0 0 24 24"
@@ -4163,7 +4165,7 @@ const Ei = (s, e, t) => {
4163
4165
  <path
4164
4166
  d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z"/>
4165
4167
  </svg>
4166
- `, ea = z`
4168
+ `, ea = L`
4167
4169
  <svg
4168
4170
  xmlns="http://www.w3.org/2000/svg"
4169
4171
  viewBox="0 0 24 24"
@@ -4174,7 +4176,7 @@ const Ei = (s, e, t) => {
4174
4176
  <title>send</title>
4175
4177
  <path d="M2,21L23,12L2,3V10L17,12L2,14V21Z"/>
4176
4178
  </svg>
4177
- `, ta = z`
4179
+ `, ta = L`
4178
4180
  <svg
4179
4181
  xmlns="http://www.w3.org/2000/svg"
4180
4182
  viewBox="0 0 24 24"
@@ -4190,17 +4192,17 @@ var sa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ke = (s, e
4190
4192
  for (var n = i > 1 ? void 0 : i ? ia(e, t) : e, r = s.length - 1, a; r >= 0; r--)
4191
4193
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
4192
4194
  return i && n && sa(e, t, n), n;
4193
- }, Qi = (s, e, t) => {
4195
+ }, en = (s, e, t) => {
4194
4196
  if (!e.has(s))
4195
4197
  throw TypeError("Cannot " + t);
4196
- }, Ye = (s, e, t) => (Qi(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Ci = (s, e, t) => {
4198
+ }, Xe = (s, e, t) => (en(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Ai = (s, e, t) => {
4197
4199
  if (e.has(s))
4198
4200
  throw TypeError("Cannot add the same private member more than once");
4199
4201
  e instanceof WeakSet ? e.add(s) : e.set(s, t);
4200
- }, Ai = (s, e, t, i) => (Qi(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), $e, Dt;
4202
+ }, Oi = (s, e, t, i) => (en(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), $e, Bt;
4201
4203
  let oe = class extends Q {
4202
4204
  constructor() {
4203
- super(), Ci(this, $e, void 0), Ci(this, Dt, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Kr(), this._emitter.on("*", (s, e) => this.dispatchEvent(
4205
+ super(), Ai(this, $e, 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 = Kr(), this._emitter.on("*", (s, e) => this.dispatchEvent(
4204
4206
  new CustomEvent(`iai-chat-${s.toString()}`, {
4205
4207
  bubbles: !0,
4206
4208
  // Allow events to be reached through other elements
@@ -4213,20 +4215,20 @@ let oe = class extends Q {
4213
4215
  }
4214
4216
  // Lifecycle Events
4215
4217
  connectedCallback() {
4216
- super.connectedCallback(), this.cleanOptions = ls.parse(this.options || {});
4218
+ super.connectedCallback(), this.cleanOptions = hs.parse(this.options || {});
4217
4219
  const { assistantId: s, params: e, config: t } = this.cleanOptions;
4218
- Ai(this, $e, new Wr(s, {
4220
+ Oi(this, $e, new Wr(s, {
4219
4221
  params: e,
4220
4222
  simulateDelays: !0,
4221
4223
  historyKey: t.historyKey,
4222
4224
  initialReplyMessage: t.initialReplyMessage
4223
- })), this.updateMessages(Ye(this, $e).messages), this.showTyping = Ye(this, $e).isTyping, this.disableInput = Ye(this, $e).inputDisabled, this.chatManager.on("functionCall", ({ id: i, name: n, params: r }) => {
4225
+ })), this.updateMessages(Xe(this, $e).messages), this.showTyping = Xe(this, $e).isTyping, this.disableInput = Xe(this, $e).inputDisabled, this.chatManager.on("functionCall", ({ id: i, name: n, params: r }) => {
4224
4226
  const a = this.cleanOptions.handlers.functionCalls[n];
4225
4227
  if (!a) {
4226
4228
  console.warn(`No function call handler found for ${n}`);
4227
4229
  return;
4228
4230
  }
4229
- a.call(this, { id: i, params: r, html: z, chatWindow: this });
4231
+ a.call(this, { id: i, params: r, html: L, chatWindow: this });
4230
4232
  }), this.chatManager.on("typing", (i) => {
4231
4233
  this.showTyping = i;
4232
4234
  }), this.chatManager.on("inputDisabled", (i) => {
@@ -4240,7 +4242,7 @@ let oe = class extends Q {
4240
4242
  }), this.chatManager.on("*", this._emitter.emit);
4241
4243
  }
4242
4244
  disconnectedCallback() {
4243
- super.disconnectedCallback(), this._emitter.all.clear(), Ye(this, $e).destroy();
4245
+ super.disconnectedCallback(), this._emitter.all.clear(), Xe(this, $e).destroy();
4244
4246
  }
4245
4247
  firstUpdated() {
4246
4248
  this.focusOnInput();
@@ -4250,14 +4252,14 @@ let oe = class extends Q {
4250
4252
  }
4251
4253
  render() {
4252
4254
  const { header: s, showCloseButton: e } = this.cleanOptions.config.chatWindow;
4253
- return z`
4255
+ return L`
4254
4256
  <div class="flex flex-col h-full rounded-lg shadow-lg bg-white">
4255
4257
  <div class="header rounded-t-lg text-lg p-2 flex justify-between items-center">
4256
4258
  <div class="flex flex-row h-full items-center">
4257
- ${et(s.imageSrc, () => z`
4259
+ ${Ce(s.imageSrc, () => L`
4258
4260
  <img src="${s.imageSrc}" alt="Logo" style="max-height: 100%" />
4259
4261
  `)}
4260
- ${et(s.text, () => z`
4262
+ ${Ce(s.text, () => L`
4261
4263
  <span class="text-lg font-semibold ml-2">${s.text}</span>
4262
4264
  `)}
4263
4265
  </div>
@@ -4271,9 +4273,9 @@ let oe = class extends Q {
4271
4273
  ${ta}
4272
4274
  </button>
4273
4275
 
4274
- ${et(e, () => z`
4276
+ ${Ce(e, () => L`
4275
4277
  <button class="mr-2 h-6 focus:outline-none" @click="${this.closeChat}">
4276
- ${Ps}
4278
+ ${Nt}
4277
4279
  </button>
4278
4280
  `)}
4279
4281
  </div>
@@ -4281,7 +4283,7 @@ let oe = class extends Q {
4281
4283
  <div id="chat-container" class="flex-1 overflow-y-auto p-4 flex flex-col gap-2">
4282
4284
  ${this.chatMessage({ id: "intro-message", role: "assistant", content: this.cleanOptions.config.welcomeMessage })}
4283
4285
 
4284
- ${Xr(this.messages, (t) => t.id, (t, i) => z`
4286
+ ${Xr(this.messages, (t) => t.id, (t, i) => L`
4285
4287
  <div>
4286
4288
  ${this.nameLabel(i)}
4287
4289
  ${this.chatMessage(t)}
@@ -4321,7 +4323,7 @@ let oe = class extends Q {
4321
4323
  }
4322
4324
  // Getters
4323
4325
  get chatManager() {
4324
- return Ye(this, $e);
4326
+ return Xe(this, $e);
4325
4327
  }
4326
4328
  resetChat() {
4327
4329
  this.chatManager.reset();
@@ -4357,7 +4359,7 @@ let oe = class extends Q {
4357
4359
  message: this.inputValue
4358
4360
  },
4359
4361
  cancelable: !0
4360
- })) && (await Ye(this, Dt), Ai(this, Dt, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.internalDisableInput = !1, setTimeout(() => {
4362
+ })) && (await Xe(this, Bt), Oi(this, Bt, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.internalDisableInput = !1, setTimeout(() => {
4361
4363
  this.focusOnInput();
4362
4364
  }, 0));
4363
4365
  }
@@ -4379,28 +4381,28 @@ let oe = class extends Q {
4379
4381
  if (e.role !== "assistant")
4380
4382
  return null;
4381
4383
  const t = e.name || "Assistant", i = this.messages[s - 1];
4382
- return ((i == null ? void 0 : i.name) || "Assistant") === t ? null : z`
4384
+ return ((i == null ? void 0 : i.name) || "Assistant") === t ? null : L`
4383
4385
  <div class="name text-sm">${e.name || "Assistant"}</div>
4384
4386
  `;
4385
4387
  }
4386
4388
  chatMessage(s) {
4387
4389
  switch (s.role) {
4388
4390
  case "assistant":
4389
- return z`
4391
+ return L`
4390
4392
  <iai-chat-message-assistant
4391
4393
  id="message-${s.id}"
4392
4394
  .content="${s.content}"
4393
4395
  ></iai-chat-message-assistant>
4394
4396
  `;
4395
4397
  case "user":
4396
- return z`
4398
+ return L`
4397
4399
  <iai-chat-message-user
4398
4400
  id="message-${s.id}"
4399
4401
  .content="${s.content}"
4400
4402
  ></iai-chat-message-user>
4401
4403
  `;
4402
4404
  case "system":
4403
- return z`
4405
+ return L`
4404
4406
  <iai-chat-message-system
4405
4407
  id="message-${s.id}"
4406
4408
  .content="${s.content}"
@@ -4418,8 +4420,8 @@ let oe = class extends Q {
4418
4420
  }
4419
4421
  };
4420
4422
  $e = /* @__PURE__ */ new WeakMap();
4421
- Dt = /* @__PURE__ */ new WeakMap();
4422
- oe.styles = [Ie, rt`
4423
+ Bt = /* @__PURE__ */ new WeakMap();
4424
+ oe.styles = [Ne, ot`
4423
4425
  .header {
4424
4426
  background-color: var(--iai-chat-i-header-bg);
4425
4427
  color: var(--iai-chat-i-header-fg);
@@ -4437,33 +4439,33 @@ oe.styles = [Ie, rt`
4437
4439
  }
4438
4440
  `];
4439
4441
  ke([
4440
- J({ type: Object })
4442
+ F({ type: Object })
4441
4443
  ], oe.prototype, "options", 2);
4442
4444
  ke([
4443
- J()
4445
+ F()
4444
4446
  ], oe.prototype, "disableInput", 2);
4445
4447
  ke([
4446
- J()
4448
+ F()
4447
4449
  ], oe.prototype, "showTyping", 2);
4448
4450
  ke([
4449
- ot()
4451
+ dt()
4450
4452
  ], oe.prototype, "messages", 2);
4451
4453
  ke([
4452
- ot()
4454
+ dt()
4453
4455
  ], oe.prototype, "inputValue", 2);
4454
4456
  ke([
4455
- ot()
4457
+ dt()
4456
4458
  ], oe.prototype, "internalDisableInput", 2);
4457
4459
  ke([
4458
- ot()
4460
+ dt()
4459
4461
  ], oe.prototype, "internalShowTyping", 2);
4460
4462
  ke([
4461
- Bs.debounce(1)
4463
+ Fs.debounce(1)
4462
4464
  ], oe.prototype, "scrollChatToBottom", 1);
4463
4465
  oe = ke([
4464
- Me("iai-chat")
4466
+ Pe("iai-chat")
4465
4467
  ], oe);
4466
- var en = { exports: {} };
4468
+ var tn = { exports: {} };
4467
4469
  (function(s) {
4468
4470
  (function(e) {
4469
4471
  if (typeof window > "u")
@@ -4537,37 +4539,37 @@ var en = { exports: {} };
4537
4539
  var y = "Host page: " + u;
4538
4540
  return window.top !== window.self && (y = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + u : "Nested host page: " + u), y;
4539
4541
  }
4540
- function qe(u) {
4542
+ function Ge(u) {
4541
4543
  return o + "[" + X(u) + "]";
4542
4544
  }
4543
4545
  function fe(u) {
4544
4546
  return d[u] ? d[u].log : i;
4545
4547
  }
4546
4548
  function O(u, y) {
4547
- hs("log", u, y, fe(u));
4549
+ ms("log", u, y, fe(u));
4548
4550
  }
4549
- function Ws(u, y) {
4550
- hs("info", u, y, fe(u));
4551
+ function Ks(u, y) {
4552
+ ms("info", u, y, fe(u));
4551
4553
  }
4552
4554
  function ee(u, y) {
4553
- hs("warn", u, y, !0);
4555
+ ms("warn", u, y, !0);
4554
4556
  }
4555
- function hs(u, y, M, x) {
4556
- x === !0 && typeof window.console == "object" && console[u](qe(y), M);
4557
+ function ms(u, y, M, x) {
4558
+ x === !0 && typeof window.console == "object" && console[u](Ge(y), M);
4557
4559
  }
4558
4560
  function dn(u) {
4559
4561
  function y() {
4560
4562
  function v() {
4561
- Xs(R), qs($), Pe("onResized", R);
4563
+ Qs(R), Ys($), Re("onResized", R);
4562
4564
  }
4563
- Z("Height"), Z("Width"), Qs(v, R, "init");
4565
+ Z("Height"), Z("Width"), ei(v, R, "init");
4564
4566
  }
4565
4567
  function M() {
4566
- var v = se.slice(c).split(":"), C = v[1] ? parseInt(v[1], 10) : 0, L = d[v[0]] && d[v[0]].iframe, D = getComputedStyle(L);
4568
+ var v = se.slice(c).split(":"), C = v[1] ? parseInt(v[1], 10) : 0, D = d[v[0]] && d[v[0]].iframe, z = getComputedStyle(D);
4567
4569
  return {
4568
- iframe: L,
4570
+ iframe: D,
4569
4571
  id: v[0],
4570
- height: C + x(D) + P(D),
4572
+ height: C + x(z) + P(z),
4571
4573
  width: v[2],
4572
4574
  type: v[3]
4573
4575
  };
@@ -4575,47 +4577,47 @@ var en = { exports: {} };
4575
4577
  function x(v) {
4576
4578
  if (v.boxSizing !== "border-box")
4577
4579
  return 0;
4578
- var C = v.paddingTop ? parseInt(v.paddingTop, 10) : 0, L = v.paddingBottom ? parseInt(v.paddingBottom, 10) : 0;
4579
- return C + L;
4580
+ var C = v.paddingTop ? parseInt(v.paddingTop, 10) : 0, D = v.paddingBottom ? parseInt(v.paddingBottom, 10) : 0;
4581
+ return C + D;
4580
4582
  }
4581
4583
  function P(v) {
4582
4584
  if (v.boxSizing !== "border-box")
4583
4585
  return 0;
4584
- var C = v.borderTopWidth ? parseInt(v.borderTopWidth, 10) : 0, L = v.borderBottomWidth ? parseInt(v.borderBottomWidth, 10) : 0;
4585
- return C + L;
4586
+ var C = v.borderTopWidth ? parseInt(v.borderTopWidth, 10) : 0, D = v.borderBottomWidth ? parseInt(v.borderBottomWidth, 10) : 0;
4587
+ return C + D;
4586
4588
  }
4587
4589
  function Z(v) {
4588
- var C = Number(d[$]["max" + v]), L = Number(d[$]["min" + v]), D = v.toLowerCase(), V = Number(R[D]);
4589
- O($, "Checking " + D + " is in range " + L + "-" + C), V < L && (V = L, O($, "Set " + D + " to min value")), V > C && (V = C, O($, "Set " + D + " to max value")), R[D] = "" + V;
4590
+ var C = Number(d[$]["max" + v]), D = Number(d[$]["min" + v]), z = v.toLowerCase(), W = Number(R[z]);
4591
+ O($, "Checking " + z + " is in range " + D + "-" + C), W < D && (W = D, O($, "Set " + z + " to min value")), W > C && (W = C, O($, "Set " + z + " to max value")), R[z] = "" + W;
4590
4592
  }
4591
4593
  function de() {
4592
4594
  function v() {
4593
- function D() {
4595
+ function z() {
4594
4596
  var q = 0, ve = !1;
4595
4597
  for (O(
4596
4598
  $,
4597
- "Checking connection is from allowed list of origins: " + L
4598
- ); q < L.length; q++)
4599
- if (L[q] === C) {
4599
+ "Checking connection is from allowed list of origins: " + D
4600
+ ); q < D.length; q++)
4601
+ if (D[q] === C) {
4600
4602
  ve = !0;
4601
4603
  break;
4602
4604
  }
4603
4605
  return ve;
4604
4606
  }
4605
- function V() {
4607
+ function W() {
4606
4608
  var q = d[$] && d[$].remoteHost;
4607
4609
  return O($, "Checking connection is from: " + q), C === q;
4608
4610
  }
4609
- return L.constructor === Array ? D() : V();
4611
+ return D.constructor === Array ? z() : W();
4610
4612
  }
4611
- var C = u.origin, L = d[$] && d[$].checkOrigin;
4612
- if (L && "" + C != "null" && !v())
4613
+ var C = u.origin, D = d[$] && d[$].checkOrigin;
4614
+ if (D && "" + C != "null" && !v())
4613
4615
  throw new Error(
4614
4616
  "Unexpected message received from: " + C + " for " + R.iframe.id + ". Message was: " + u.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains."
4615
4617
  );
4616
4618
  return !0;
4617
4619
  }
4618
- function Ne() {
4620
+ function je() {
4619
4621
  return o === ("" + se).slice(0, c) && se.slice(c).split(":")[0] in d;
4620
4622
  }
4621
4623
  function ge() {
@@ -4625,16 +4627,16 @@ var en = { exports: {} };
4625
4627
  function ye(v) {
4626
4628
  return se.slice(se.indexOf(":") + a + v);
4627
4629
  }
4628
- function Te(v) {
4630
+ function Se(v) {
4629
4631
  O(
4630
4632
  $,
4631
4633
  "onMessage passed: {iframe: " + R.iframe.id + ", message: " + v + "}"
4632
- ), Pe("onMessage", {
4634
+ ), Re("onMessage", {
4633
4635
  iframe: R.iframe,
4634
4636
  message: JSON.parse(v)
4635
4637
  }), O($, "--");
4636
4638
  }
4637
- function vs() {
4639
+ function ws() {
4638
4640
  var v = document.body.getBoundingClientRect(), C = R.iframe.getBoundingClientRect();
4639
4641
  return JSON.stringify({
4640
4642
  iframeHeight: C.height,
@@ -4657,55 +4659,55 @@ var en = { exports: {} };
4657
4659
  windowWidth: window.innerWidth
4658
4660
  });
4659
4661
  }
4660
- function Rt(v, C) {
4661
- function L() {
4662
- ce("Send Page Info", "pageInfo:" + vs(), v, C);
4662
+ function Dt(v, C) {
4663
+ function D() {
4664
+ ce("Send Page Info", "pageInfo:" + ws(), v, C);
4663
4665
  }
4664
- un(L, 32, C);
4666
+ un(D, 32, C);
4665
4667
  }
4666
- function bs() {
4667
- function v(V, q) {
4668
+ function _s() {
4669
+ function v(W, q) {
4668
4670
  function ve() {
4669
- d[D] ? Rt(d[D].iframe, D) : C();
4671
+ d[z] ? Dt(d[z].iframe, z) : C();
4670
4672
  }
4671
- ["scroll", "resize"].forEach(function(ni) {
4672
- O(D, V + ni + " listener for sendPageInfo"), q(window, ni, ve);
4673
+ ["scroll", "resize"].forEach(function(ri) {
4674
+ O(z, W + ri + " listener for sendPageInfo"), q(window, ri, ve);
4673
4675
  });
4674
4676
  }
4675
4677
  function C() {
4676
4678
  v("Remove ", pe);
4677
4679
  }
4678
- function L() {
4680
+ function D() {
4679
4681
  v("Add ", G);
4680
4682
  }
4681
- var D = $;
4682
- L(), d[D] && (d[D].stopPageInfo = C);
4683
+ var z = $;
4684
+ D(), d[z] && (d[z].stopPageInfo = C);
4683
4685
  }
4684
- function ws() {
4686
+ function xs() {
4685
4687
  d[$] && d[$].stopPageInfo && (d[$].stopPageInfo(), delete d[$].stopPageInfo);
4686
4688
  }
4687
- function _s() {
4689
+ function ks() {
4688
4690
  var v = !0;
4689
4691
  return R.iframe === null && (ee($, "IFrame (" + R.id + ") not found"), v = !1), v;
4690
4692
  }
4691
4693
  function k(v) {
4692
4694
  var C = v.getBoundingClientRect();
4693
- return Js($), {
4695
+ return qs($), {
4694
4696
  x: Math.floor(Number(C.left) + Number(l.x)),
4695
4697
  y: Math.floor(Number(C.top) + Number(l.y))
4696
4698
  };
4697
4699
  }
4698
- function T(v) {
4700
+ function S(v) {
4699
4701
  function C() {
4700
- l = q, F(), O($, "--");
4702
+ l = q, V(), O($, "--");
4701
4703
  }
4702
- function L() {
4704
+ function D() {
4703
4705
  return {
4704
- x: Number(R.width) + V.x,
4705
- y: Number(R.height) + V.y
4706
+ x: Number(R.width) + W.x,
4707
+ y: Number(R.height) + W.y
4706
4708
  };
4707
4709
  }
4708
- function D() {
4710
+ function z() {
4709
4711
  window.parentIFrame ? window.parentIFrame["scrollTo" + (v ? "Offset" : "")](
4710
4712
  q.x,
4711
4713
  q.y
@@ -4714,66 +4716,66 @@ var en = { exports: {} };
4714
4716
  "Unable to scroll to requested position, window.parentIFrame not found"
4715
4717
  );
4716
4718
  }
4717
- var V = v ? k(R.iframe) : { x: 0, y: 0 }, q = L();
4719
+ var W = v ? k(R.iframe) : { x: 0, y: 0 }, q = D();
4718
4720
  O(
4719
4721
  $,
4720
- "Reposition requested from iFrame (offset x:" + V.x + " y:" + V.y + ")"
4721
- ), window.top === window.self ? C() : D();
4722
+ "Reposition requested from iFrame (offset x:" + W.x + " y:" + W.y + ")"
4723
+ ), window.top === window.self ? C() : z();
4722
4724
  }
4723
- function F() {
4724
- Pe("onScroll", l) === !1 ? Ys() : qs($);
4725
+ function V() {
4726
+ Re("onScroll", l) === !1 ? Gs() : Ys($);
4725
4727
  }
4726
- function W(v) {
4728
+ function K(v) {
4727
4729
  function C() {
4728
4730
  var ve = k(q);
4729
4731
  O(
4730
4732
  $,
4731
- "Moving to in page link (#" + D + ") at x: " + ve.x + " y: " + ve.y
4733
+ "Moving to in page link (#" + z + ") at x: " + ve.x + " y: " + ve.y
4732
4734
  ), l = {
4733
4735
  x: ve.x,
4734
4736
  y: ve.y
4735
- }, F(), O($, "--");
4737
+ }, V(), O($, "--");
4736
4738
  }
4737
- function L() {
4738
- window.parentIFrame ? window.parentIFrame.moveToAnchor(D) : O(
4739
+ function D() {
4740
+ window.parentIFrame ? window.parentIFrame.moveToAnchor(z) : O(
4739
4741
  $,
4740
- "In page link #" + D + " not found and window.parentIFrame not found"
4742
+ "In page link #" + z + " not found and window.parentIFrame not found"
4741
4743
  );
4742
4744
  }
4743
- var D = v.split("#")[1] || "", V = decodeURIComponent(D), q = document.getElementById(V) || document.getElementsByName(V)[0];
4744
- q ? C() : window.top === window.self ? O($, "In page link #" + D + " not found") : L();
4745
+ var z = v.split("#")[1] || "", W = decodeURIComponent(z), q = document.getElementById(W) || document.getElementsByName(W)[0];
4746
+ q ? C() : window.top === window.self ? O($, "In page link #" + z + " not found") : D();
4745
4747
  }
4746
4748
  function te(v) {
4747
4749
  var C = {};
4748
4750
  if (Number(R.width) === 0 && Number(R.height) === 0) {
4749
- var L = ye(9).split(":");
4751
+ var D = ye(9).split(":");
4750
4752
  C = {
4751
- x: L[1],
4752
- y: L[0]
4753
+ x: D[1],
4754
+ y: D[0]
4753
4755
  };
4754
4756
  } else
4755
4757
  C = {
4756
4758
  x: R.width,
4757
4759
  y: R.height
4758
4760
  };
4759
- Pe(v, {
4761
+ Re(v, {
4760
4762
  iframe: R.iframe,
4761
4763
  screenX: Number(C.x),
4762
4764
  screenY: Number(C.y),
4763
4765
  type: R.type
4764
4766
  });
4765
4767
  }
4766
- function Pe(v, C) {
4767
- return ps($, v, C);
4768
+ function Re(v, C) {
4769
+ return fs($, v, C);
4768
4770
  }
4769
- function xs() {
4770
- switch (d[$] && d[$].firstRun && Ss(), R.type) {
4771
+ function Ss() {
4772
+ switch (d[$] && d[$].firstRun && Es(), R.type) {
4771
4773
  case "close": {
4772
- ms(R.iframe);
4774
+ gs(R.iframe);
4773
4775
  break;
4774
4776
  }
4775
4777
  case "message": {
4776
- Te(ye(6));
4778
+ Se(ye(6));
4777
4779
  break;
4778
4780
  }
4779
4781
  case "mouseenter": {
@@ -4789,34 +4791,34 @@ var en = { exports: {} };
4789
4791
  break;
4790
4792
  }
4791
4793
  case "scrollTo": {
4792
- T(!1);
4794
+ S(!1);
4793
4795
  break;
4794
4796
  }
4795
4797
  case "scrollToOffset": {
4796
- T(!0);
4798
+ S(!0);
4797
4799
  break;
4798
4800
  }
4799
4801
  case "pageInfo": {
4800
- Rt(
4802
+ Dt(
4801
4803
  d[$] && d[$].iframe,
4802
4804
  $
4803
- ), bs();
4805
+ ), _s();
4804
4806
  break;
4805
4807
  }
4806
4808
  case "pageInfoStop": {
4807
- ws();
4809
+ xs();
4808
4810
  break;
4809
4811
  }
4810
4812
  case "inPageLink": {
4811
- W(ye(9));
4813
+ K(ye(9));
4812
4814
  break;
4813
4815
  }
4814
4816
  case "reset": {
4815
- Gs(R);
4817
+ Xs(R);
4816
4818
  break;
4817
4819
  }
4818
4820
  case "init": {
4819
- y(), Pe("onInit", R.iframe);
4821
+ y(), Re("onInit", R.iframe);
4820
4822
  break;
4821
4823
  }
4822
4824
  default:
@@ -4825,28 +4827,28 @@ var en = { exports: {} };
4825
4827
  ) : y();
4826
4828
  }
4827
4829
  }
4828
- function ks(v) {
4830
+ function Ts(v) {
4829
4831
  var C = !0;
4830
4832
  return d[v] || (C = !1, ee(
4831
4833
  R.type + " No settings for " + v + ". Message was: " + se
4832
4834
  )), C;
4833
4835
  }
4834
- function Ts() {
4836
+ function $s() {
4835
4837
  for (var v in d)
4836
4838
  ce(
4837
4839
  "iFrame requested init",
4838
- ei(v),
4840
+ ti(v),
4839
4841
  d[v].iframe,
4840
4842
  v
4841
4843
  );
4842
4844
  }
4843
- function Ss() {
4845
+ function Es() {
4844
4846
  d[$] && (d[$].firstRun = !1);
4845
4847
  }
4846
4848
  var se = u.data, R = {}, $ = null;
4847
- se === "[iFrameResizerChild]Ready" ? Ts() : Ne() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && ks($) && (O($, "Received: " + se), _s() && de() && xs())) : Ws($, "Ignored: " + se);
4849
+ se === "[iFrameResizerChild]Ready" ? $s() : je() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && Ts($) && (O($, "Received: " + se), ks() && de() && Ss())) : Ks($, "Ignored: " + se);
4848
4850
  }
4849
- function ps(u, y, M) {
4851
+ function fs(u, y, M) {
4850
4852
  var x = null, P = null;
4851
4853
  if (d[u])
4852
4854
  if (x = d[u][y], typeof x == "function")
@@ -4857,13 +4859,13 @@ var en = { exports: {} };
4857
4859
  );
4858
4860
  return P;
4859
4861
  }
4860
- function Ks(u) {
4862
+ function Js(u) {
4861
4863
  var y = u.id;
4862
4864
  delete d[y];
4863
4865
  }
4864
- function ms(u) {
4866
+ function gs(u) {
4865
4867
  var y = u.id;
4866
- if (ps(y, "onClose", y) === !1) {
4868
+ if (fs(y, "onClose", y) === !1) {
4867
4869
  O(y, "Close iframe cancelled by onClose event");
4868
4870
  return;
4869
4871
  }
@@ -4873,9 +4875,9 @@ var en = { exports: {} };
4873
4875
  } catch (M) {
4874
4876
  ee(M);
4875
4877
  }
4876
- ps(y, "onClosed", y), O(y, "--"), Ks(u);
4878
+ fs(y, "onClosed", y), O(y, "--"), Js(u);
4877
4879
  }
4878
- function Js(u) {
4880
+ function qs(u) {
4879
4881
  l === null && (l = {
4880
4882
  x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
4881
4883
  y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
@@ -4884,25 +4886,25 @@ var en = { exports: {} };
4884
4886
  "Get page position: " + l.x + "," + l.y
4885
4887
  ));
4886
4888
  }
4887
- function qs(u) {
4889
+ function Ys(u) {
4888
4890
  l !== null && (window.scrollTo(l.x, l.y), O(
4889
4891
  u,
4890
4892
  "Set page position: " + l.x + "," + l.y
4891
- ), Ys());
4893
+ ), Gs());
4892
4894
  }
4893
- function Ys() {
4895
+ function Gs() {
4894
4896
  l = null;
4895
4897
  }
4896
- function Gs(u) {
4898
+ function Xs(u) {
4897
4899
  function y() {
4898
- Xs(u), ce("reset", "reset", u.iframe, u.id);
4900
+ Qs(u), ce("reset", "reset", u.iframe, u.id);
4899
4901
  }
4900
4902
  O(
4901
4903
  u.id,
4902
4904
  "Size reset requested by " + (u.type === "init" ? "host page" : "iFrame")
4903
- ), Js(u.id), Qs(y, u, "reset");
4905
+ ), qs(u.id), ei(y, u, "reset");
4904
4906
  }
4905
- function Xs(u) {
4907
+ function Qs(u) {
4906
4908
  function y(Z) {
4907
4909
  if (!u.id) {
4908
4910
  O("undefined", "messageData id not set");
@@ -4922,70 +4924,70 @@ var en = { exports: {} };
4922
4924
  var P = u.iframe.id;
4923
4925
  d[P] && (d[P].sizeHeight && x("height"), d[P].sizeWidth && x("width"));
4924
4926
  }
4925
- function Qs(u, y, M) {
4927
+ function ei(u, y, M) {
4926
4928
  M !== y.type && h && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
4927
4929
  !window.jasmine ? (O(y.id, "Requesting animation frame"), h(u)) : u();
4928
4930
  }
4929
4931
  function ce(u, y, M, x, P) {
4930
4932
  function Z() {
4931
- var Te = d[x] && d[x].targetOrigin;
4933
+ var Se = d[x] && d[x].targetOrigin;
4932
4934
  O(
4933
4935
  x,
4934
- "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Te
4935
- ), M.contentWindow.postMessage(o + y, Te);
4936
+ "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Se
4937
+ ), M.contentWindow.postMessage(o + y, Se);
4936
4938
  }
4937
4939
  function de() {
4938
4940
  ee(x, "[" + u + "] IFrame(" + x + ") not found");
4939
4941
  }
4940
- function Ne() {
4942
+ function je() {
4941
4943
  M && "contentWindow" in M && M.contentWindow !== null ? Z() : de();
4942
4944
  }
4943
4945
  function ge() {
4944
- function Te() {
4946
+ function Se() {
4945
4947
  d[x] && !d[x].loaded && !ye && (ye = !0, ee(
4946
4948
  x,
4947
4949
  "IFrame has not responded within " + d[x].warningTimeout / 1e3 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."
4948
4950
  ));
4949
4951
  }
4950
4952
  P && d[x] && d[x].warningTimeout && (d[x].msgTimeout = setTimeout(
4951
- Te,
4953
+ Se,
4952
4954
  d[x].warningTimeout
4953
4955
  ));
4954
4956
  }
4955
4957
  var ye = !1;
4956
- x = x || M.id, d[x] && (Ne(), ge());
4958
+ x = x || M.id, d[x] && (je(), ge());
4957
4959
  }
4958
- function ei(u) {
4960
+ function ti(u) {
4959
4961
  return u + ":" + d[u].bodyMarginV1 + ":" + d[u].sizeWidth + ":" + d[u].log + ":" + d[u].interval + ":" + d[u].enablePublicMethods + ":" + d[u].autoResize + ":" + d[u].bodyMargin + ":" + d[u].heightCalculationMethod + ":" + d[u].bodyBackground + ":" + d[u].bodyPadding + ":" + d[u].tolerance + ":" + d[u].inPageLinks + ":" + d[u].resizeFrom + ":" + d[u].widthCalculationMethod + ":" + d[u].mouseEvents;
4960
4962
  }
4961
4963
  function ln(u) {
4962
4964
  return typeof u == "number";
4963
4965
  }
4964
- function ti(u, y) {
4966
+ function si(u, y) {
4965
4967
  function M() {
4966
- function T(W) {
4967
- var te = d[k][W];
4968
- te !== 1 / 0 && te !== 0 && (u.style[W] = ln(te) ? te + "px" : te, O(k, "Set " + W + " = " + u.style[W]));
4968
+ function S(K) {
4969
+ var te = d[k][K];
4970
+ te !== 1 / 0 && te !== 0 && (u.style[K] = ln(te) ? te + "px" : te, O(k, "Set " + K + " = " + u.style[K]));
4969
4971
  }
4970
- function F(W) {
4971
- if (d[k]["min" + W] > d[k]["max" + W])
4972
+ function V(K) {
4973
+ if (d[k]["min" + K] > d[k]["max" + K])
4972
4974
  throw new Error(
4973
- "Value for min" + W + " can not be greater than max" + W
4975
+ "Value for min" + K + " can not be greater than max" + K
4974
4976
  );
4975
4977
  }
4976
- F("Height"), F("Width"), T("maxHeight"), T("minHeight"), T("maxWidth"), T("minWidth");
4978
+ V("Height"), V("Width"), S("maxHeight"), S("minHeight"), S("maxWidth"), S("minWidth");
4977
4979
  }
4978
4980
  function x() {
4979
- var T = y && y.id || N.id + t++;
4980
- return document.getElementById(T) !== null && (T += t++), T;
4981
+ var S = y && y.id || N.id + t++;
4982
+ return document.getElementById(S) !== null && (S += t++), S;
4981
4983
  }
4982
- function P(T) {
4983
- if (typeof T != "string")
4984
+ function P(S) {
4985
+ if (typeof S != "string")
4984
4986
  throw new TypeError("Invaild id for iFrame. Expected String");
4985
- return T === "" && (u.id = T = x(), i = (y || {}).log, O(
4986
- T,
4987
- "Added missing iframe ID: " + T + " (" + u.src + ")"
4988
- )), T;
4987
+ return S === "" && (u.id = S = x(), i = (y || {}).log, O(
4988
+ S,
4989
+ "Added missing iframe ID: " + S + " (" + u.src + ")"
4990
+ )), S;
4989
4991
  }
4990
4992
  function Z() {
4991
4993
  switch (O(
@@ -5009,14 +5011,14 @@ var en = { exports: {} };
5009
5011
  function de() {
5010
5012
  (typeof (d[k] && d[k].bodyMargin) == "number" || (d[k] && d[k].bodyMargin) === "0") && (d[k].bodyMarginV1 = d[k].bodyMargin, d[k].bodyMargin = "" + d[k].bodyMargin + "px");
5011
5013
  }
5012
- function Ne() {
5013
- var T = d[k] && d[k].firstRun, F = d[k] && d[k].heightCalculationMethod in p;
5014
- !T && F && Gs({ iframe: u, height: 0, width: 0, type: "init" });
5014
+ function je() {
5015
+ var S = d[k] && d[k].firstRun, V = d[k] && d[k].heightCalculationMethod in p;
5016
+ !S && V && Xs({ iframe: u, height: 0, width: 0, type: "init" });
5015
5017
  }
5016
5018
  function ge() {
5017
5019
  d[k] && (d[k].iframe.iFrameResizer = {
5018
- close: ms.bind(null, d[k].iframe),
5019
- removeListeners: Ks.bind(
5020
+ close: gs.bind(null, d[k].iframe),
5021
+ removeListeners: Js.bind(
5020
5022
  null,
5021
5023
  d[k].iframe
5022
5024
  ),
@@ -5026,88 +5028,88 @@ var en = { exports: {} };
5026
5028
  "resize",
5027
5029
  d[k].iframe
5028
5030
  ),
5029
- moveToAnchor: function(T) {
5031
+ moveToAnchor: function(S) {
5030
5032
  ce(
5031
5033
  "Move to anchor",
5032
- "moveToAnchor:" + T,
5034
+ "moveToAnchor:" + S,
5033
5035
  d[k].iframe,
5034
5036
  k
5035
5037
  );
5036
5038
  },
5037
- sendMessage: function(T) {
5038
- T = JSON.stringify(T), ce(
5039
+ sendMessage: function(S) {
5040
+ S = JSON.stringify(S), ce(
5039
5041
  "Send Message",
5040
- "message:" + T,
5042
+ "message:" + S,
5041
5043
  d[k].iframe,
5042
5044
  k
5043
5045
  );
5044
5046
  }
5045
5047
  });
5046
5048
  }
5047
- function ye(T) {
5048
- function F() {
5049
- ce("iFrame.onload", T, u, e, !0), Ne();
5049
+ function ye(S) {
5050
+ function V() {
5051
+ ce("iFrame.onload", S, u, e, !0), je();
5050
5052
  }
5051
- function W(Pe) {
5053
+ function K(Re) {
5052
5054
  if (u.parentNode) {
5053
- var xs = new Pe(function(ks) {
5054
- ks.forEach(function(Ts) {
5055
- var Ss = Array.prototype.slice.call(Ts.removedNodes);
5056
- Ss.forEach(function(se) {
5057
- se === u && ms(u);
5055
+ var Ss = new Re(function(Ts) {
5056
+ Ts.forEach(function($s) {
5057
+ var Es = Array.prototype.slice.call($s.removedNodes);
5058
+ Es.forEach(function(se) {
5059
+ se === u && gs(u);
5058
5060
  });
5059
5061
  });
5060
5062
  });
5061
- xs.observe(u.parentNode, {
5063
+ Ss.observe(u.parentNode, {
5062
5064
  childList: !0
5063
5065
  });
5064
5066
  }
5065
5067
  }
5066
5068
  var te = U();
5067
- te && W(te), G(u, "load", F), ce("init", T, u, e, !0);
5069
+ te && K(te), G(u, "load", V), ce("init", S, u, e, !0);
5068
5070
  }
5069
- function Te(T) {
5070
- if (typeof T != "object")
5071
+ function Se(S) {
5072
+ if (typeof S != "object")
5071
5073
  throw new TypeError("Options is not an object");
5072
5074
  }
5073
- function vs(T) {
5074
- for (var F in N)
5075
- Object.prototype.hasOwnProperty.call(N, F) && (d[k][F] = Object.prototype.hasOwnProperty.call(
5076
- T,
5077
- F
5078
- ) ? T[F] : N[F]);
5075
+ function ws(S) {
5076
+ for (var V in N)
5077
+ Object.prototype.hasOwnProperty.call(N, V) && (d[k][V] = Object.prototype.hasOwnProperty.call(
5078
+ S,
5079
+ V
5080
+ ) ? S[V] : N[V]);
5079
5081
  }
5080
- function Rt(T) {
5081
- return T === "" || T.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : T;
5082
+ function Dt(S) {
5083
+ return S === "" || S.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : S;
5082
5084
  }
5083
- function bs(T) {
5084
- var F = T.split("Callback");
5085
- if (F.length === 2) {
5086
- var W = "on" + F[0].charAt(0).toUpperCase() + F[0].slice(1);
5087
- this[W] = this[T], delete this[T], ee(
5085
+ function _s(S) {
5086
+ var V = S.split("Callback");
5087
+ if (V.length === 2) {
5088
+ var K = "on" + V[0].charAt(0).toUpperCase() + V[0].slice(1);
5089
+ this[K] = this[S], delete this[S], ee(
5088
5090
  k,
5089
- "Deprecated: '" + T + "' has been renamed '" + W + "'. The old method will be removed in the next major version."
5091
+ "Deprecated: '" + S + "' has been renamed '" + K + "'. The old method will be removed in the next major version."
5090
5092
  );
5091
5093
  }
5092
5094
  }
5093
- function ws(T) {
5094
- T = T || {}, d[k] = /* @__PURE__ */ Object.create(null), d[k].iframe = u, d[k].firstRun = !0, d[k].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Te(T), Object.keys(T).forEach(bs, T), vs(T), d[k] && (d[k].targetOrigin = d[k].checkOrigin === !0 ? Rt(d[k].remoteHost) : "*");
5095
+ function xs(S) {
5096
+ S = S || {}, d[k] = /* @__PURE__ */ Object.create(null), d[k].iframe = u, d[k].firstRun = !0, d[k].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Se(S), Object.keys(S).forEach(_s, S), ws(S), d[k] && (d[k].targetOrigin = d[k].checkOrigin === !0 ? Dt(d[k].remoteHost) : "*");
5095
5097
  }
5096
- function _s() {
5098
+ function ks() {
5097
5099
  return k in d && "iFrameResizer" in u;
5098
5100
  }
5099
5101
  var k = P(u.id);
5100
- _s() ? ee(k, "Ignored iFrame, already setup.") : (ws(y), Z(), M(), de(), ye(ei(k)), ge());
5102
+ ks() ? ee(k, "Ignored iFrame, already setup.") : (xs(y), Z(), M(), de(), ye(ti(k)), ge());
5101
5103
  }
5102
- function fs(u, y) {
5104
+ function ys(u, y) {
5103
5105
  b === null && (b = setTimeout(function() {
5104
5106
  b = null, u();
5105
5107
  }, y));
5106
5108
  }
5107
- var gs = {};
5109
+ var vs = {};
5108
5110
  function un(u, y, M) {
5109
- gs[M] || (gs[M] = setTimeout(function() {
5110
- gs[M] = null, u();
5111
+ vs[M] || (vs[M] = setTimeout(function() {
5112
+ vs[M] = null, u();
5111
5113
  }, y));
5112
5114
  }
5113
5115
  function hn() {
@@ -5116,10 +5118,10 @@ var en = { exports: {} };
5116
5118
  function de(ge) {
5117
5119
  return (d[Z] && d[Z].iframe.style[ge]) === "0px";
5118
5120
  }
5119
- function Ne(ge) {
5121
+ function je(ge) {
5120
5122
  return ge.offsetParent !== null;
5121
5123
  }
5122
- d[Z] && Ne(d[Z].iframe) && (de("height") || de("width")) && ce(
5124
+ d[Z] && je(d[Z].iframe) && (de("height") || de("width")) && ce(
5123
5125
  "Visibility change",
5124
5126
  "resize",
5125
5127
  d[Z].iframe,
@@ -5134,7 +5136,7 @@ var en = { exports: {} };
5134
5136
  O(
5135
5137
  "window",
5136
5138
  "Mutation observed: " + P[0].target + " " + P[0].type
5137
- ), fs(u, 16);
5139
+ ), ys(u, 16);
5138
5140
  }
5139
5141
  function M() {
5140
5142
  var P = document.querySelector("body"), Z = {
@@ -5152,17 +5154,17 @@ var en = { exports: {} };
5152
5154
  }
5153
5155
  function pn(u) {
5154
5156
  function y() {
5155
- ii("Window " + u, "resize");
5157
+ ni("Window " + u, "resize");
5156
5158
  }
5157
- O("window", "Trigger event: " + u), fs(y, 16);
5159
+ O("window", "Trigger event: " + u), ys(y, 16);
5158
5160
  }
5159
- function si() {
5161
+ function ii() {
5160
5162
  function u() {
5161
- ii("Tab Visible", "resize");
5163
+ ni("Tab Visible", "resize");
5162
5164
  }
5163
- document.visibilityState !== "hidden" && (O("document", "Trigger event: Visibility change"), fs(u, 16));
5165
+ document.visibilityState !== "hidden" && (O("document", "Trigger event: Visibility change"), ys(u, 16));
5164
5166
  }
5165
- function ii(u, y) {
5167
+ function ni(u, y) {
5166
5168
  function M(x) {
5167
5169
  return d[x] && d[x].resizeFrom === "parent" && d[x].autoResize && !d[x].firstRun;
5168
5170
  }
@@ -5173,9 +5175,9 @@ var en = { exports: {} };
5173
5175
  function mn() {
5174
5176
  G(window, "message", dn), G(window, "resize", function() {
5175
5177
  pn("resize");
5176
- }), G(document, "visibilitychange", si), G(document, "-webkit-visibilitychange", si);
5178
+ }), G(document, "visibilitychange", ii), G(document, "-webkit-visibilitychange", ii);
5177
5179
  }
5178
- function ys() {
5180
+ function bs() {
5179
5181
  function u(x, P) {
5180
5182
  function Z() {
5181
5183
  if (P.tagName) {
@@ -5186,7 +5188,7 @@ var en = { exports: {} };
5186
5188
  } else
5187
5189
  throw new TypeError("Object is not a valid DOM element");
5188
5190
  }
5189
- P && (Z(), ti(P, x), M.push(P));
5191
+ P && (Z(), si(P, x), M.push(P));
5190
5192
  }
5191
5193
  function y(x) {
5192
5194
  x && x.enablePublicMethods && ee(
@@ -5217,24 +5219,24 @@ var en = { exports: {} };
5217
5219
  function fn(u) {
5218
5220
  u.fn ? u.fn.iFrameResize || (u.fn.iFrameResize = function(y) {
5219
5221
  function M(x, P) {
5220
- ti(P, y);
5222
+ si(P, y);
5221
5223
  }
5222
5224
  return this.filter("iframe").each(M).end();
5223
- }) : Ws("", "Unable to bind to jQuery, it is not fully loaded.");
5225
+ }) : Ks("", "Unable to bind to jQuery, it is not fully loaded.");
5224
5226
  }
5225
- window.jQuery !== e && fn(window.jQuery), typeof e == "function" && e.amd ? e([], ys) : s.exports = ys(), window.iFrameResize = window.iFrameResize || ys();
5227
+ window.jQuery !== e && fn(window.jQuery), typeof e == "function" && e.amd ? e([], bs) : s.exports = bs(), window.iFrameResize = window.iFrameResize || bs();
5226
5228
  })();
5227
- })(en);
5228
- var na = en.exports;
5229
- const ra = /* @__PURE__ */ Xi(na);
5230
- var aa = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, tn = (s, e, t, i) => {
5229
+ })(tn);
5230
+ var na = tn.exports;
5231
+ const ra = /* @__PURE__ */ Qi(na);
5232
+ var aa = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, Ws = (s, e, t, i) => {
5231
5233
  for (var n = i > 1 ? void 0 : i ? oa(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5232
5234
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5233
5235
  return i && n && aa(e, t, n), n;
5234
5236
  };
5235
- let ts = class extends Q {
5237
+ let Pt = class extends Q {
5236
5238
  constructor() {
5237
- super(...arguments), this.src = "";
5239
+ super(...arguments), this.src = "", this.showCloseButton = !1;
5238
5240
  }
5239
5241
  async onLoad(s) {
5240
5242
  ra({
@@ -5249,31 +5251,45 @@ let ts = class extends Q {
5249
5251
  }
5250
5252
  }, s.target);
5251
5253
  }
5254
+ close() {
5255
+ this.dispatchEvent(new CustomEvent("close"));
5256
+ }
5252
5257
  render() {
5253
- return z`
5254
- <iframe
5255
- src=${this.src}
5256
- width="100%"
5257
- @load=${this.onLoad}
5258
- ></iframe>
5258
+ return L`
5259
+ <div class="relative">
5260
+ ${Ce(this.showCloseButton, () => L`
5261
+ <button class="absolute top-0 right-0 m-2 h-6 text-white focus:outline-none" @click="${this.close}">
5262
+ ${Nt}
5263
+ </button>
5264
+ `)}
5265
+
5266
+ <iframe
5267
+ src=${this.src}
5268
+ width="100%"
5269
+ @load=${this.onLoad}
5270
+ ></iframe>
5271
+ </div>
5259
5272
  `;
5260
5273
  }
5261
5274
  };
5262
- ts.styles = [Ie];
5263
- tn([
5264
- J({ type: String })
5265
- ], ts.prototype, "src", 2);
5266
- ts = tn([
5267
- Me("iai-chat-iframe")
5268
- ], ts);
5269
- var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, Vs = (s, e, t, i) => {
5275
+ Pt.styles = [Ne];
5276
+ Ws([
5277
+ F({ type: String })
5278
+ ], Pt.prototype, "src", 2);
5279
+ Ws([
5280
+ F({ type: Boolean })
5281
+ ], Pt.prototype, "showCloseButton", 2);
5282
+ Pt = Ws([
5283
+ Pe("iai-chat-iframe")
5284
+ ], Pt);
5285
+ var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, lt = (s, e, t, i) => {
5270
5286
  for (var n = i > 1 ? void 0 : i ? da(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5271
5287
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5272
5288
  return i && n && ca(e, t, n), n;
5273
5289
  };
5274
- let It = class extends Q {
5290
+ let Me = class extends Q {
5275
5291
  constructor() {
5276
- super(...arguments), this.title = "", this.src = "";
5292
+ super(...arguments), this.title = "", this.src = "", this.width = "500px", this.height = null, this.showHeader = !0;
5277
5293
  }
5278
5294
  async connectedCallback() {
5279
5295
  super.connectedCallback();
@@ -5282,27 +5298,34 @@ let It = class extends Q {
5282
5298
  this.dispatchEvent(new CustomEvent("close"));
5283
5299
  }
5284
5300
  render() {
5285
- return z`
5301
+ const s = tt({
5302
+ width: this.width,
5303
+ height: this.height
5304
+ });
5305
+ return L`
5286
5306
  <div class="fixed inset-0 z-50 bg-black bg-opacity-50 flex justify-center items-center">
5287
5307
  <div
5288
5308
  class="flex flex-col rounded-lg shadow-lg bg-white mx-auto my-auto max-h-[90vh] max-w-[90vw] overflow-hidden"
5309
+ style=${s}
5289
5310
  part="modal"
5290
5311
  >
5291
- <div class="header text-lg p-2 flex justify-between items-center">
5292
- <div class="flex flex-row h-full items-center">
5293
- <span class="text-lg font-semibold ml-2">${this.title}</span>
5294
- </div>
5312
+ ${Ce(this.showHeader, () => L`
5313
+ <div class="header text-lg p-2 flex justify-between items-center">
5314
+ <div class="flex flex-row h-full items-center">
5315
+ <span class="text-lg font-semibold ml-2">${this.title}</span>
5316
+ </div>
5295
5317
 
5296
- <button class="mr-2 focus:outline-none" @click="${this.close}">
5297
- <svg class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
5298
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
5299
- </svg>
5300
- </button>
5301
- </div>
5318
+ <button class="mr-2 h-6 text-white focus:outline-none" @click="${this.close}">
5319
+ ${Nt}
5320
+ </button>
5321
+ </div>
5322
+ `)}
5302
5323
 
5303
5324
  <div class="overflow-y-auto">
5304
5325
  <iai-chat-iframe
5305
5326
  src=${this.src}
5327
+ showCloseButton=${!this.showHeader}
5328
+ @close=${this.close}
5306
5329
  ></iai-chat-iframe>
5307
5330
  </div>
5308
5331
  </div>
@@ -5310,30 +5333,39 @@ let It = class extends Q {
5310
5333
  `;
5311
5334
  }
5312
5335
  };
5313
- It.styles = [Ie, rt`
5336
+ Me.styles = [Ne, ot`
5314
5337
  .header {
5315
5338
  background-color: var(--iai-chat-i-iframe-modal-header-bg);
5316
5339
  color: var(--iai-chat-i-iframe-modal-header-fg);
5317
5340
  height: 50px;
5318
5341
  }
5319
5342
  `];
5320
- Vs([
5321
- J({ type: String })
5322
- ], It.prototype, "title", 2);
5323
- Vs([
5324
- J({ type: String })
5325
- ], It.prototype, "src", 2);
5326
- It = Vs([
5327
- Me("iai-chat-iframe-modal")
5328
- ], It);
5343
+ lt([
5344
+ F({ type: String })
5345
+ ], Me.prototype, "title", 2);
5346
+ lt([
5347
+ F({ type: String })
5348
+ ], Me.prototype, "src", 2);
5349
+ lt([
5350
+ F({ type: String })
5351
+ ], Me.prototype, "width", 2);
5352
+ lt([
5353
+ F({ type: String })
5354
+ ], Me.prototype, "height", 2);
5355
+ lt([
5356
+ F({ type: Boolean })
5357
+ ], Me.prototype, "showHeader", 2);
5358
+ Me = lt([
5359
+ Pe("iai-chat-iframe-modal")
5360
+ ], Me);
5329
5361
  /**
5330
5362
  * @license
5331
5363
  * Copyright 2017 Google LLC
5332
5364
  * SPDX-License-Identifier: BSD-3-Clause
5333
5365
  */
5334
- class js extends cs {
5366
+ class Rs extends ls {
5335
5367
  constructor(e) {
5336
- if (super(e), this.it = B, e.type !== as.CHILD)
5368
+ if (super(e), this.it = B, e.type !== cs.CHILD)
5337
5369
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
5338
5370
  }
5339
5371
  render(e) {
@@ -5350,13 +5382,13 @@ class js extends cs {
5350
5382
  return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
5351
5383
  }
5352
5384
  }
5353
- js.directiveName = "unsafeHTML", js.resultType = 1;
5354
- const la = os(js);
5385
+ Rs.directiveName = "unsafeHTML", Rs.resultType = 1;
5386
+ const la = ds(Rs);
5355
5387
  var sn = { exports: {} };
5356
5388
  (function(s, e) {
5357
5389
  (function(t, i) {
5358
5390
  s.exports = i();
5359
- })(zr, function() {
5391
+ })(Dr, function() {
5360
5392
  function t(o) {
5361
5393
  return o.replace(/\\([(){}[\]#*+\-.!_\\])/g, function(c, l) {
5362
5394
  return String.fromCharCode(1, n.indexOf(l) + r);
@@ -5394,13 +5426,13 @@ var sn = { exports: {} };
5394
5426
  var me = "", X = [];
5395
5427
  for (b = 0, N = p.length; N > b; ++b) {
5396
5428
  h = p[b];
5397
- var qe = h[0], fe = h[1], O = h[2];
5429
+ var Ge = h[0], fe = h[1], O = h[2];
5398
5430
  if (fe === "ul" || fe === "ol")
5399
- !X.length || O > X[0][1] ? (X.unshift([fe, O]), me += "<" + X[0][0] + "><li>" + qe) : X.length > 1 && O <= X[1][1] ? (me += "</li></" + X.shift()[0] + ">", --b) : me += "</li><li>" + qe;
5431
+ !X.length || O > X[0][1] ? (X.unshift([fe, O]), me += "<" + X[0][0] + "><li>" + Ge) : X.length > 1 && O <= X[1][1] ? (me += "</li></" + X.shift()[0] + ">", --b) : me += "</li><li>" + Ge;
5400
5432
  else {
5401
5433
  for (; X.length; )
5402
5434
  me += "</li></" + X.shift()[0] + ">";
5403
- me += fe === "hr" ? "<hr/>" : "<" + fe + O + a.headAttrs(O, qe) + ">" + qe + "</" + fe + O + ">";
5435
+ me += fe === "hr" ? "<hr/>" : "<" + fe + O + a.headAttrs(O, Ge) + ">" + Ge + "</" + fe + O + ">";
5404
5436
  }
5405
5437
  }
5406
5438
  for (; X.length; )
@@ -5416,13 +5448,13 @@ var sn = { exports: {} };
5416
5448
  });
5417
5449
  })(sn);
5418
5450
  var ua = sn.exports;
5419
- const ha = /* @__PURE__ */ Xi(ua);
5451
+ const ha = /* @__PURE__ */ Qi(ua);
5420
5452
  var pa = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, nn = (s, e, t, i) => {
5421
5453
  for (var n = i > 1 ? void 0 : i ? ma(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5422
5454
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5423
5455
  return i && n && pa(e, t, n), n;
5424
5456
  };
5425
- let ss = class extends Q {
5457
+ let ns = class extends Q {
5426
5458
  constructor() {
5427
5459
  super(...arguments), this.content = "";
5428
5460
  }
@@ -5430,7 +5462,7 @@ let ss = class extends Q {
5430
5462
  return ha(this.content);
5431
5463
  }
5432
5464
  render() {
5433
- return z`
5465
+ return L`
5434
5466
  <div class="flex items-end mr-20">
5435
5467
  <div class="message rounded-lg px-4 py-2 flex flex-col gap-3">
5436
5468
  ${la(this.htmlContent)}
@@ -5439,7 +5471,7 @@ let ss = class extends Q {
5439
5471
  `;
5440
5472
  }
5441
5473
  };
5442
- ss.styles = [Ie, rt`
5474
+ ns.styles = [Ne, ot`
5443
5475
  .message {
5444
5476
  background-color: var(--iai-chat-i-message-assistant-bg);
5445
5477
  color: var(--iai-chat-i-message-assistant-fg);
@@ -5470,23 +5502,23 @@ ss.styles = [Ie, rt`
5470
5502
  }
5471
5503
  `];
5472
5504
  nn([
5473
- J({ type: String })
5474
- ], ss.prototype, "content", 2);
5475
- ss = nn([
5476
- Me("iai-chat-message-assistant")
5477
- ], ss);
5505
+ F({ type: String })
5506
+ ], ns.prototype, "content", 2);
5507
+ ns = nn([
5508
+ Pe("iai-chat-message-assistant")
5509
+ ], ns);
5478
5510
  async function fa(s, e) {
5479
5511
  const { type: t, params: i } = s, n = e[t];
5480
5512
  if (!n)
5481
5513
  throw new Error(`No handler for enhanced content type ${t}`);
5482
- return n({ params: i, html: z });
5514
+ return n({ params: i, html: L });
5483
5515
  }
5484
- var ga = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, jt = (s, e, t, i) => {
5516
+ var ga = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, Lt = (s, e, t, i) => {
5485
5517
  for (var n = i > 1 ? void 0 : i ? ya(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5486
5518
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5487
5519
  return i && n && ga(e, t, n), n;
5488
5520
  };
5489
- let Je = class extends Q {
5521
+ let Ye = class extends Q {
5490
5522
  constructor() {
5491
5523
  super(...arguments), this.content = "";
5492
5524
  }
@@ -5499,43 +5531,43 @@ let Je = class extends Q {
5499
5531
  console.warn("Error processing enhanced content", s);
5500
5532
  }
5501
5533
  else
5502
- this.contentHtmlTemplate || (this.contentHtmlTemplate = z`<p class="text-center text-gray-400 text-sm">${this.content}</p>`);
5534
+ this.contentHtmlTemplate || (this.contentHtmlTemplate = L`<p class="text-center text-gray-400 text-sm">${this.content}</p>`);
5503
5535
  }
5504
5536
  render() {
5505
- return z`
5537
+ return L`
5506
5538
  <div>
5507
5539
  ${this.contentHtmlTemplate}
5508
5540
  </div>
5509
5541
  `;
5510
5542
  }
5511
5543
  };
5512
- Je.styles = [Ie];
5513
- jt([
5514
- J({ type: Object })
5515
- ], Je.prototype, "options", 2);
5516
- jt([
5517
- J({ type: String })
5518
- ], Je.prototype, "content", 2);
5519
- jt([
5520
- J({ type: Object })
5521
- ], Je.prototype, "enhancedContent", 2);
5522
- jt([
5523
- J()
5524
- ], Je.prototype, "contentHtmlTemplate", 2);
5525
- Je = jt([
5526
- Me("iai-chat-message-system")
5527
- ], Je);
5544
+ Ye.styles = [Ne];
5545
+ Lt([
5546
+ F({ type: Object })
5547
+ ], Ye.prototype, "options", 2);
5548
+ Lt([
5549
+ F({ type: String })
5550
+ ], Ye.prototype, "content", 2);
5551
+ Lt([
5552
+ F({ type: Object })
5553
+ ], Ye.prototype, "enhancedContent", 2);
5554
+ Lt([
5555
+ F()
5556
+ ], Ye.prototype, "contentHtmlTemplate", 2);
5557
+ Ye = Lt([
5558
+ Pe("iai-chat-message-system")
5559
+ ], Ye);
5528
5560
  var va = Object.defineProperty, ba = Object.getOwnPropertyDescriptor, rn = (s, e, t, i) => {
5529
5561
  for (var n = i > 1 ? void 0 : i ? ba(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5530
5562
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5531
5563
  return i && n && va(e, t, n), n;
5532
5564
  };
5533
- let is = class extends Q {
5565
+ let rs = class extends Q {
5534
5566
  constructor() {
5535
5567
  super(...arguments), this.content = "";
5536
5568
  }
5537
5569
  render() {
5538
- return z`
5570
+ return L`
5539
5571
  <div class="flex items-end justify-end ml-20">
5540
5572
  <div class="message rounded-lg px-4 py-2 flex gap-2">
5541
5573
  <p>${this.content}</p>
@@ -5544,24 +5576,24 @@ let is = class extends Q {
5544
5576
  `;
5545
5577
  }
5546
5578
  };
5547
- is.styles = [Ie, rt`
5579
+ rs.styles = [Ne, ot`
5548
5580
  .message {
5549
5581
  background-color: var(--iai-chat-i-message-user-bg);
5550
5582
  color: var(--iai-chat-i-message-user-fg);
5551
5583
  }
5552
5584
  `];
5553
5585
  rn([
5554
- J({ type: String })
5555
- ], is.prototype, "content", 2);
5556
- is = rn([
5557
- Me("iai-chat-message-user")
5558
- ], is);
5559
- var wa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, us = (s, e, t, i) => {
5586
+ F({ type: String })
5587
+ ], rs.prototype, "content", 2);
5588
+ rs = rn([
5589
+ Pe("iai-chat-message-user")
5590
+ ], rs);
5591
+ var wa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, ps = (s, e, t, i) => {
5560
5592
  for (var n = i > 1 ? void 0 : i ? _a(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5561
5593
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5562
5594
  return i && n && wa(e, t, n), n;
5563
5595
  };
5564
- let nt = class extends Q {
5596
+ let at = class extends Q {
5565
5597
  constructor() {
5566
5598
  super(...arguments), this.isChatWindowOpen = !1, this.isCtaOpen = !0;
5567
5599
  }
@@ -5569,33 +5601,33 @@ let nt = class extends Q {
5569
5601
  const {
5570
5602
  openChatButton: { width: s, height: e, imageSrc: t, cta: i },
5571
5603
  placement: n
5572
- } = this.options.config, r = ut({ alignItems: n !== "left" ? "end" : "start" }), a = ut({ width: s, height: e });
5573
- return z`
5604
+ } = this.options.config, r = tt({ alignItems: n !== "left" ? "end" : "start" }), a = tt({ width: s, height: e });
5605
+ return L`
5574
5606
  <div class="flex flex-col gap-4" style=${r}>
5575
- ${et(i && this.isCtaOpen && !this.isChatWindowOpen, () => z`
5607
+ ${Ce(i && this.isCtaOpen && !this.isChatWindowOpen, () => L`
5576
5608
  <div class="relative rounded-lg p-5 shadow-md bg-white" style="max-width: 350px;">
5577
5609
  <button
5578
5610
  class="absolute top-0 right-0 w-5 h-5 m-0.5"
5579
5611
  @click="${() => this.isCtaOpen = !1}"
5580
- >${Ps}</button>
5612
+ >${Nt}</button>
5581
5613
 
5582
5614
  <span>${i}</span>
5583
5615
 
5584
5616
  <div
5585
5617
  class="absolute bottom-0 mx-4 mb-[-8px] w-0 h-0 border-x-8 border-t-8 border-x-transparent border-white"
5586
- style=${ut({ [n]: 0 })}
5618
+ style=${tt({ [n]: 0 })}
5587
5619
  />
5588
5620
  </div>
5589
5621
  `)}
5590
5622
 
5591
5623
  <button @click="${this.toggleChat}">
5592
- ${et(
5624
+ ${Ce(
5593
5625
  t,
5594
- () => z`<img src="${t}" alt="Chat Icon" style=${a}/>`,
5595
- () => z`
5626
+ () => L`<img src="${t}" alt="Chat Icon" style=${a}/>`,
5627
+ () => L`
5596
5628
  <div class="button rounded-full flex items-center justify-center" style=${a}>
5597
5629
  <div class="h-3/5 w-3/5">
5598
- ${et(this.isChatWindowOpen, () => Ps, () => Qr)}
5630
+ ${Ce(this.isChatWindowOpen, () => Nt, () => Qr)}
5599
5631
  </div>
5600
5632
  </div>
5601
5633
  `
@@ -5608,24 +5640,24 @@ let nt = class extends Q {
5608
5640
  this.dispatchEvent(new CustomEvent("toggle-chat"));
5609
5641
  }
5610
5642
  };
5611
- nt.styles = [Ie, rt`
5643
+ at.styles = [Ne, ot`
5612
5644
  .button {
5613
5645
  background-color: var(--iai-chat-i-ocb-bg);
5614
5646
  color: var(--iai-chat-i-ocb-fg);
5615
5647
  }
5616
5648
  `];
5617
- us([
5618
- J({ type: Object })
5619
- ], nt.prototype, "options", 2);
5620
- us([
5621
- J({ type: Boolean })
5622
- ], nt.prototype, "isChatWindowOpen", 2);
5623
- us([
5624
- ot()
5625
- ], nt.prototype, "isCtaOpen", 2);
5626
- nt = us([
5627
- Me("iai-chat-open-chat-button")
5628
- ], nt);
5649
+ ps([
5650
+ F({ type: Object })
5651
+ ], at.prototype, "options", 2);
5652
+ ps([
5653
+ F({ type: Boolean })
5654
+ ], at.prototype, "isChatWindowOpen", 2);
5655
+ ps([
5656
+ dt()
5657
+ ], at.prototype, "isCtaOpen", 2);
5658
+ at = ps([
5659
+ Pe("iai-chat-open-chat-button")
5660
+ ], at);
5629
5661
  function xa(s) {
5630
5662
  return s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5631
5663
  }
@@ -5637,7 +5669,7 @@ function an(s, e = "") {
5637
5669
  }
5638
5670
  class ka {
5639
5671
  constructor(e) {
5640
- this.widget = null, this.options = ls.parse(e);
5672
+ this.widget = null, this.options = hs.parse(e);
5641
5673
  const t = document.createElement("iai-chat-popup");
5642
5674
  t.options = this.options;
5643
5675
  const i = an(this.options.config.styles);
@@ -5656,7 +5688,7 @@ class ka {
5656
5688
  (e = this.widget) == null || e.remove(), this.widget = null;
5657
5689
  }
5658
5690
  }
5659
- var ns;
5691
+ var as;
5660
5692
  ((s) => {
5661
5693
  ((e) => {
5662
5694
  e.TEXT = "TEXT";
@@ -5669,7 +5701,7 @@ var ns;
5669
5701
  })(s.ConversationEventOrigin || (s.ConversationEventOrigin = {})), ((e) => {
5670
5702
  e.PENDING = "PENDING", e.ACTIVE = "ACTIVE", e.TERMINATED = "TERMINATED";
5671
5703
  })(s.ConversationStatus || (s.ConversationStatus = {}));
5672
- })(ns || (ns = {}));
5704
+ })(as || (as = {}));
5673
5705
  function on(s) {
5674
5706
  return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
5675
5707
  var i = s.get(e);
@@ -5686,7 +5718,7 @@ function on(s) {
5686
5718
  });
5687
5719
  } };
5688
5720
  }
5689
- class Ta {
5721
+ class Sa {
5690
5722
  constructor(e) {
5691
5723
  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([
5692
5724
  1006
@@ -5717,15 +5749,15 @@ class Ta {
5717
5749
  this.disconnect(), this._emitter.all.clear();
5718
5750
  }
5719
5751
  }
5720
- const Sa = ns.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5752
+ const Ta = as.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5721
5753
  let Ca = "https://five9.ah.inhabit.work";
5722
5754
  const Aa = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
5723
- var be, ze;
5724
- const ft = class ft {
5755
+ var be, Ue;
5756
+ const yt = class yt {
5725
5757
  constructor() {
5726
- $s(this, be, void 0);
5727
- $s(this, ze, void 0);
5728
- this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Se(this, be, null), Se(this, ze, null), this.conversationStarted = !1;
5758
+ Cs(this, be, void 0);
5759
+ Cs(this, Ue, void 0);
5760
+ this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Te(this, be, null), Te(this, Ue, null), this.conversationStarted = !1;
5729
5761
  }
5730
5762
  serialize() {
5731
5763
  return JSON.stringify({
@@ -5735,14 +5767,14 @@ const ft = class ft {
5735
5767
  });
5736
5768
  }
5737
5769
  static deserialize(e) {
5738
- const t = JSON.parse(e), i = new ft();
5770
+ const t = JSON.parse(e), i = new yt();
5739
5771
  return t.sessionToken && i.setSession(t.sessionToken), t.conversationId && i.setConversationId(t.conversationId), i.conversationStarted = t.conversationStarted || !1, i;
5740
5772
  }
5741
5773
  static generateBaseUrl(e) {
5742
5774
  return `https://${e}/appsvcs/rs/svc`;
5743
5775
  }
5744
5776
  async createSession() {
5745
- const e = await fetch(`${ft.generateBaseUrl("app-scl.five9.com")}/auth/anon?cookieless=true`, {
5777
+ const e = await fetch(`${yt.generateBaseUrl("app-scl.five9.com")}/auth/anon?cookieless=true`, {
5746
5778
  method: "POST",
5747
5779
  headers: {
5748
5780
  "Content-Type": "application/json",
@@ -5750,13 +5782,13 @@ const ft = class ft {
5750
5782
  },
5751
5783
  body: JSON.stringify({ tenantName: $a })
5752
5784
  });
5753
- return Se(this, be, await e.json()), Zt(this, be);
5785
+ return Te(this, be, await e.json()), zt(this, be);
5754
5786
  }
5755
5787
  setSession(e) {
5756
- Se(this, be, e);
5788
+ Te(this, be, e);
5757
5789
  }
5758
5790
  setConversationId(e) {
5759
- Se(this, ze, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5791
+ Te(this, Ue, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5760
5792
  }
5761
5793
  connect() {
5762
5794
  if (!this.sessionToken)
@@ -5769,7 +5801,7 @@ const ft = class ft {
5769
5801
  if (!this.conversationId)
5770
5802
  throw new Error("Conversation not started");
5771
5803
  this.five9WebSocket && this.five9WebSocket.destroy();
5772
- const e = new Ta(`${Aa}/conversations/${this.conversationId}/ws`);
5804
+ const e = new Sa(`${Aa}/conversations/${this.conversationId}/ws`);
5773
5805
  e.on("*", (t, i) => {
5774
5806
  this._emitter.emit(t, i);
5775
5807
  }), e.on("conversationCreated", (t) => {
@@ -5791,7 +5823,7 @@ const ft = class ft {
5791
5823
  messages: [
5792
5824
  {
5793
5825
  messageId: t.messageId,
5794
- type: Sa.READ
5826
+ type: Ta.READ
5795
5827
  }
5796
5828
  ]
5797
5829
  });
@@ -5806,7 +5838,7 @@ const ft = class ft {
5806
5838
  if (!i)
5807
5839
  throw new Error("Session not found");
5808
5840
  e = e.startsWith("/") ? e : `/${e}`;
5809
- const n = i.metadata.dataCenters[0].apiUrls[0].host, r = await fetch(`${ft.generateBaseUrl(n)}${e}`, {
5841
+ const n = i.metadata.dataCenters[0].apiUrls[0].host, r = await fetch(`${yt.generateBaseUrl(n)}${e}`, {
5810
5842
  ...t,
5811
5843
  headers: {
5812
5844
  ...t.headers,
@@ -5846,7 +5878,7 @@ const ft = class ft {
5846
5878
  if (!t || !i)
5847
5879
  throw new Error("Conversation not started");
5848
5880
  const n = {
5849
- messageType: ns.MessageType.TEXT,
5881
+ messageType: as.MessageType.TEXT,
5850
5882
  message: e
5851
5883
  };
5852
5884
  await this.authenticatedFetch(`/conversations/${t}/messages`, {
@@ -5880,14 +5912,14 @@ const ft = class ft {
5880
5912
  }), this.destroy();
5881
5913
  }
5882
5914
  destroy() {
5883
- this.five9WebSocket && this.five9WebSocket.destroy(), Se(this, be, null), Se(this, ze, null);
5915
+ this.five9WebSocket && this.five9WebSocket.destroy(), Te(this, be, null), Te(this, Ue, null);
5884
5916
  }
5885
5917
  // Getters
5886
5918
  get sessionToken() {
5887
- return Zt(this, be);
5919
+ return zt(this, be);
5888
5920
  }
5889
5921
  get conversationId() {
5890
- return Zt(this, ze);
5922
+ return zt(this, Ue);
5891
5923
  }
5892
5924
  get dataCenter() {
5893
5925
  var e;
@@ -5910,9 +5942,9 @@ const ft = class ft {
5910
5942
  return (e = this.sessionToken) == null ? void 0 : e.context.farmId;
5911
5943
  }
5912
5944
  };
5913
- be = new WeakMap(), ze = new WeakMap();
5914
- let rs = ft;
5915
- function mt(s) {
5945
+ be = new WeakMap(), Ue = new WeakMap();
5946
+ let os = yt;
5947
+ function gt(s) {
5916
5948
  return `any-${s || "main"}-chatSession`;
5917
5949
  }
5918
5950
  async function Oa({
@@ -5935,7 +5967,7 @@ async function Oa({
5935
5967
  role: "system",
5936
5968
  content: "Please wait while we connect you to a live agent"
5937
5969
  });
5938
- const a = new rs();
5970
+ const a = new os();
5939
5971
  await a.createSession();
5940
5972
  const { summary: o, subject: c, ...l } = e;
5941
5973
  await a.createConversation({
@@ -5945,7 +5977,7 @@ async function Oa({
5945
5977
  "AI Summary": o
5946
5978
  }
5947
5979
  }), localStorage.setItem(
5948
- mt(t.cleanOptions.config.historyKey),
5980
+ gt(t.cleanOptions.config.historyKey),
5949
5981
  a.serialize()
5950
5982
  ), cn(t, a);
5951
5983
  };
@@ -5988,7 +6020,7 @@ function cn(s, e) {
5988
6020
  console.log("event:", r, a);
5989
6021
  }), e.on("conversationCreated", () => {
5990
6022
  s.setInputDisabled(!1), localStorage.setItem(
5991
- mt(s.cleanOptions.config.historyKey),
6023
+ gt(s.cleanOptions.config.historyKey),
5992
6024
  e.serialize()
5993
6025
  );
5994
6026
  }), e.on(
@@ -6040,7 +6072,7 @@ function cn(s, e) {
6040
6072
  role: "system",
6041
6073
  content: "The chat has ended"
6042
6074
  }), s.setInputDisabled(!0), localStorage.removeItem(
6043
- mt(s.cleanOptions.config.historyKey)
6075
+ gt(s.cleanOptions.config.historyKey)
6044
6076
  );
6045
6077
  }
6046
6078
  ), e.on("message", (r) => {
@@ -6078,7 +6110,7 @@ function cn(s, e) {
6078
6110
  );
6079
6111
  }, n = async () => {
6080
6112
  console.log("reset fired"), await e.terminateConversation(), await i(), localStorage.removeItem(
6081
- mt(s.cleanOptions.config.historyKey)
6113
+ gt(s.cleanOptions.config.historyKey)
6082
6114
  );
6083
6115
  };
6084
6116
  s.addEventListener(
@@ -6094,9 +6126,10 @@ function Ia(s) {
6094
6126
  ...i.customerFirstName && { firstName: i.customerFirstName },
6095
6127
  ...i.customerLastName && { lastName: i.customerLastName },
6096
6128
  ...i.customerEmail && { email: i.customerEmail },
6097
- ...i.customerPhoneNumber && { phone: i.customerPhoneNumber }
6129
+ ...i.customerPhoneNumber && { phone: i.customerPhoneNumber },
6130
+ ...i.desiredMoveInDate && { moveInDate: i.desiredMoveInDate }
6098
6131
  }, a = document.createElement("iai-chat-iframe-modal");
6099
- a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`;
6132
+ a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
6100
6133
  const o = () => {
6101
6134
  a.remove(), window.removeEventListener("beforeunload", h), n.setInputDisabled(!1);
6102
6135
  }, c = async ({ detail: p }) => {
@@ -6133,14 +6166,14 @@ function Ia(s) {
6133
6166
  }
6134
6167
  class Na {
6135
6168
  constructor(e, t) {
6136
- const i = ls.parse({
6169
+ const i = hs.parse({
6137
6170
  assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
6138
6171
  ...e
6139
6172
  });
6140
6173
  i.handlers.functionCalls.transferToLiveAgent = Oa, i.handlers.functionCalls.showScheduleTourWidget = Ia(t.schedulerUrl), this.chatWidget = new ka(i);
6141
- const n = localStorage.getItem(mt(i.config.historyKey));
6174
+ const n = localStorage.getItem(gt(i.config.historyKey));
6142
6175
  if (n) {
6143
- const r = rs.deserialize(n);
6176
+ const r = os.deserialize(n);
6144
6177
  setTimeout(() => {
6145
6178
  cn(this.chatWidget.api.chatWindow, r);
6146
6179
  }, 0);