@iai-lib/any-chat-widget 0.1.0-alpha.12 → 0.1.0-alpha.14

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.
@@ -6,7 +6,7 @@ var Zt = (s, e, t) => (ri(s, e, "read from private field"), t ? t.call(s) : e.ge
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
- }, Te = (s, e, t, i) => (ri(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
9
+ }, Se = (s, e, t, i) => (ri(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
@@ -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, Sn = 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, tt = globalThis, ci = tt.trustedTypes, Tn = ci ? ci.emptyScript : "", di = tt.reactiveElementPolyfillSupport, lt = (s, e) => s, Ut = { toAttribute(s, e) {
64
64
  switch (e) {
65
65
  case Boolean:
66
- s = s ? Sn : null;
66
+ s = s ? Tn : null;
67
67
  break;
68
68
  case Object:
69
69
  case Array:
@@ -307,7 +307,7 @@ Ge.elementStyles = [], Ge.shadowRootOptions = { mode: "open" }, Ge[lt("elementPr
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, Tn = `<${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 = `[
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
311
  \f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, hi = /-->/g, pi = />/g, je = RegExp(`>|${Es}(?:([^\\s"'>=/]+)(${Es}*=${Es}*(?:[^
312
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
313
  function Pi(s, e) {
@@ -324,7 +324,7 @@ const ji = (s, e) => {
324
324
  for (; d < c.length && (a.lastIndex = d, h = a.exec(c), h !== null); )
325
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
326
  const b = a === je && s[o + 1].startsWith("/>") ? " " : "";
327
- r += a === ct ? c + Tn : p >= 0 ? (i.push(l), c.slice(0, p) + zs + c.slice(p) + we + b) : c + we + (p === -2 ? o : b);
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);
328
328
  }
329
329
  return [Pi(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
330
330
  };
@@ -589,7 +589,7 @@ Q._$litElement$ = !0, Q.finalized = !0, (vi = globalThis.litElementHydrateSuppor
589
589
  const bi = globalThis.litElementPolyfillSupport;
590
590
  bi == null || bi({ 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 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))}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
@@ -1196,7 +1196,7 @@ class I {
1196
1196
  _refinement(e) {
1197
1197
  return new ae({
1198
1198
  schema: this,
1199
- typeName: T.ZodEffects,
1199
+ typeName: S.ZodEffects,
1200
1200
  effect: { type: "refinement", refinement: e }
1201
1201
  });
1202
1202
  }
@@ -1219,16 +1219,16 @@ class I {
1219
1219
  return it.create(this, this._def);
1220
1220
  }
1221
1221
  or(e) {
1222
- return St.create([this, e], this._def);
1222
+ return Tt.create([this, e], this._def);
1223
1223
  }
1224
1224
  and(e) {
1225
- return Tt.create(this, e, this._def);
1225
+ return St.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: T.ZodEffects,
1231
+ typeName: S.ZodEffects,
1232
1232
  effect: { type: "transform", transform: e }
1233
1233
  });
1234
1234
  }
@@ -1238,12 +1238,12 @@ class I {
1238
1238
  ...A(this._def),
1239
1239
  innerType: this,
1240
1240
  defaultValue: t,
1241
- typeName: T.ZodDefault
1241
+ typeName: S.ZodDefault
1242
1242
  });
1243
1243
  }
1244
1244
  brand() {
1245
1245
  return new Vi({
1246
- typeName: T.ZodBranded,
1246
+ typeName: S.ZodBranded,
1247
1247
  type: this,
1248
1248
  ...A(this._def)
1249
1249
  });
@@ -1254,7 +1254,7 @@ class I {
1254
1254
  ...A(this._def),
1255
1255
  innerType: this,
1256
1256
  catchValue: t,
1257
- typeName: T.ZodCatch
1257
+ typeName: S.ZodCatch
1258
1258
  });
1259
1259
  }
1260
1260
  describe(e) {
@@ -1579,7 +1579,7 @@ ie.create = (s) => {
1579
1579
  var e;
1580
1580
  return new ie({
1581
1581
  checks: [],
1582
- typeName: T.ZodString,
1582
+ typeName: S.ZodString,
1583
1583
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1584
1584
  ...A(s)
1585
1585
  });
@@ -1756,7 +1756,7 @@ class Ce extends I {
1756
1756
  }
1757
1757
  Ce.create = (s) => new Ce({
1758
1758
  checks: [],
1759
- typeName: T.ZodNumber,
1759
+ typeName: S.ZodNumber,
1760
1760
  coerce: (s == null ? void 0 : s.coerce) || !1,
1761
1761
  ...A(s)
1762
1762
  });
@@ -1883,7 +1883,7 @@ Ae.create = (s) => {
1883
1883
  var e;
1884
1884
  return new Ae({
1885
1885
  checks: [],
1886
- typeName: T.ZodBigInt,
1886
+ typeName: S.ZodBigInt,
1887
1887
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1888
1888
  ...A(s)
1889
1889
  });
@@ -1902,7 +1902,7 @@ class _t extends I {
1902
1902
  }
1903
1903
  }
1904
1904
  _t.create = (s) => new _t({
1905
- typeName: T.ZodBoolean,
1905
+ typeName: S.ZodBoolean,
1906
1906
  coerce: (s == null ? void 0 : s.coerce) || !1,
1907
1907
  ...A(s)
1908
1908
  });
@@ -1981,7 +1981,7 @@ class Fe extends I {
1981
1981
  Fe.create = (s) => new Fe({
1982
1982
  checks: [],
1983
1983
  coerce: (s == null ? void 0 : s.coerce) || !1,
1984
- typeName: T.ZodDate,
1984
+ typeName: S.ZodDate,
1985
1985
  ...A(s)
1986
1986
  });
1987
1987
  class Kt extends I {
@@ -1998,7 +1998,7 @@ class Kt extends I {
1998
1998
  }
1999
1999
  }
2000
2000
  Kt.create = (s) => new Kt({
2001
- typeName: T.ZodSymbol,
2001
+ typeName: S.ZodSymbol,
2002
2002
  ...A(s)
2003
2003
  });
2004
2004
  class xt extends I {
@@ -2015,7 +2015,7 @@ class xt extends I {
2015
2015
  }
2016
2016
  }
2017
2017
  xt.create = (s) => new xt({
2018
- typeName: T.ZodUndefined,
2018
+ typeName: S.ZodUndefined,
2019
2019
  ...A(s)
2020
2020
  });
2021
2021
  class kt extends I {
@@ -2032,7 +2032,7 @@ class kt extends I {
2032
2032
  }
2033
2033
  }
2034
2034
  kt.create = (s) => new kt({
2035
- typeName: T.ZodNull,
2035
+ typeName: S.ZodNull,
2036
2036
  ...A(s)
2037
2037
  });
2038
2038
  class st extends I {
@@ -2044,7 +2044,7 @@ class st extends I {
2044
2044
  }
2045
2045
  }
2046
2046
  st.create = (s) => new st({
2047
- typeName: T.ZodAny,
2047
+ typeName: S.ZodAny,
2048
2048
  ...A(s)
2049
2049
  });
2050
2050
  class De extends I {
@@ -2056,7 +2056,7 @@ class De extends I {
2056
2056
  }
2057
2057
  }
2058
2058
  De.create = (s) => new De({
2059
- typeName: T.ZodUnknown,
2059
+ typeName: S.ZodUnknown,
2060
2060
  ...A(s)
2061
2061
  });
2062
2062
  class xe extends I {
@@ -2070,7 +2070,7 @@ class xe extends I {
2070
2070
  }
2071
2071
  }
2072
2072
  xe.create = (s) => new xe({
2073
- typeName: T.ZodNever,
2073
+ typeName: S.ZodNever,
2074
2074
  ...A(s)
2075
2075
  });
2076
2076
  class Jt extends I {
@@ -2087,7 +2087,7 @@ class Jt extends I {
2087
2087
  }
2088
2088
  }
2089
2089
  Jt.create = (s) => new Jt({
2090
- typeName: T.ZodVoid,
2090
+ typeName: S.ZodVoid,
2091
2091
  ...A(s)
2092
2092
  });
2093
2093
  class re extends I {
@@ -2160,7 +2160,7 @@ re.create = (s, e) => new re({
2160
2160
  minLength: null,
2161
2161
  maxLength: null,
2162
2162
  exactLength: null,
2163
- typeName: T.ZodArray,
2163
+ typeName: S.ZodArray,
2164
2164
  ...A(e)
2165
2165
  });
2166
2166
  function Xe(s) {
@@ -2325,7 +2325,7 @@ class H extends I {
2325
2325
  ...this._def.shape(),
2326
2326
  ...e._def.shape()
2327
2327
  }),
2328
- typeName: T.ZodObject
2328
+ typeName: S.ZodObject
2329
2329
  });
2330
2330
  }
2331
2331
  // merge<
@@ -2451,24 +2451,24 @@ H.create = (s, e) => new H({
2451
2451
  shape: () => s,
2452
2452
  unknownKeys: "strip",
2453
2453
  catchall: xe.create(),
2454
- typeName: T.ZodObject,
2454
+ typeName: S.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: T.ZodObject,
2461
+ typeName: S.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: T.ZodObject,
2468
+ typeName: S.ZodObject,
2469
2469
  ...A(e)
2470
2470
  });
2471
- class St extends I {
2471
+ class Tt extends I {
2472
2472
  _parse(e) {
2473
2473
  const { ctx: t } = this._processInputParams(e), i = this._def.options;
2474
2474
  function n(r) {
@@ -2536,9 +2536,9 @@ class St extends I {
2536
2536
  return this._def.options;
2537
2537
  }
2538
2538
  }
2539
- St.create = (s, e) => new St({
2539
+ Tt.create = (s, e) => new Tt({
2540
2540
  options: s,
2541
- typeName: T.ZodUnion,
2541
+ typeName: S.ZodUnion,
2542
2542
  ...A(e)
2543
2543
  });
2544
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;
@@ -2596,7 +2596,7 @@ class ds extends I {
2596
2596
  }
2597
2597
  }
2598
2598
  return new ds({
2599
- typeName: T.ZodDiscriminatedUnion,
2599
+ typeName: S.ZodDiscriminatedUnion,
2600
2600
  discriminator: e,
2601
2601
  options: t,
2602
2602
  optionsMap: n,
@@ -2631,7 +2631,7 @@ 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 Tt extends I {
2634
+ class St extends I {
2635
2635
  _parse(e) {
2636
2636
  const { status: t, ctx: i } = this._processInputParams(e), n = (r, a) => {
2637
2637
  if (Is(r) || Is(a))
@@ -2663,10 +2663,10 @@ class Tt extends I {
2663
2663
  }));
2664
2664
  }
2665
2665
  }
2666
- Tt.create = (s, e, t) => new Tt({
2666
+ St.create = (s, e, t) => new St({
2667
2667
  left: s,
2668
2668
  right: e,
2669
- typeName: T.ZodIntersection,
2669
+ typeName: S.ZodIntersection,
2670
2670
  ...A(t)
2671
2671
  });
2672
2672
  class he extends I {
@@ -2714,7 +2714,7 @@ 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: T.ZodTuple,
2717
+ typeName: S.ZodTuple,
2718
2718
  rest: null,
2719
2719
  ...A(e)
2720
2720
  });
@@ -2749,12 +2749,12 @@ class $t extends I {
2749
2749
  return t instanceof I ? new $t({
2750
2750
  keyType: e,
2751
2751
  valueType: t,
2752
- typeName: T.ZodRecord,
2752
+ typeName: S.ZodRecord,
2753
2753
  ...A(i)
2754
2754
  }) : new $t({
2755
2755
  keyType: ie.create(),
2756
2756
  valueType: e,
2757
- typeName: T.ZodRecord,
2757
+ typeName: S.ZodRecord,
2758
2758
  ...A(t)
2759
2759
  });
2760
2760
  }
@@ -2804,7 +2804,7 @@ class qt extends I {
2804
2804
  qt.create = (s, e, t) => new qt({
2805
2805
  valueType: e,
2806
2806
  keyType: s,
2807
- typeName: T.ZodMap,
2807
+ typeName: S.ZodMap,
2808
2808
  ...A(t)
2809
2809
  });
2810
2810
  class Ve extends I {
@@ -2868,7 +2868,7 @@ Ve.create = (s, e) => new Ve({
2868
2868
  valueType: s,
2869
2869
  minSize: null,
2870
2870
  maxSize: null,
2871
- typeName: T.ZodSet,
2871
+ typeName: S.ZodSet,
2872
2872
  ...A(e)
2873
2873
  });
2874
2874
  class Qe extends I {
@@ -2967,7 +2967,7 @@ class Qe extends I {
2967
2967
  return new Qe({
2968
2968
  args: e || he.create([]).rest(De.create()),
2969
2969
  returns: t || De.create(),
2970
- typeName: T.ZodFunction,
2970
+ typeName: S.ZodFunction,
2971
2971
  ...A(i)
2972
2972
  });
2973
2973
  }
@@ -2983,7 +2983,7 @@ class Et extends I {
2983
2983
  }
2984
2984
  Et.create = (s, e) => new Et({
2985
2985
  getter: s,
2986
- typeName: T.ZodLazy,
2986
+ typeName: S.ZodLazy,
2987
2987
  ...A(e)
2988
2988
  });
2989
2989
  class Ct extends I {
@@ -3004,13 +3004,13 @@ class Ct extends I {
3004
3004
  }
3005
3005
  Ct.create = (s, e) => new Ct({
3006
3006
  value: s,
3007
- typeName: T.ZodLiteral,
3007
+ typeName: S.ZodLiteral,
3008
3008
  ...A(e)
3009
3009
  });
3010
3010
  function Fi(s, e) {
3011
3011
  return new Oe({
3012
3012
  values: s,
3013
- typeName: T.ZodEnum,
3013
+ typeName: S.ZodEnum,
3014
3014
  ...A(e)
3015
3015
  });
3016
3016
  }
@@ -3090,7 +3090,7 @@ class At extends I {
3090
3090
  }
3091
3091
  At.create = (s, e) => new At({
3092
3092
  values: s,
3093
- typeName: T.ZodNativeEnum,
3093
+ typeName: S.ZodNativeEnum,
3094
3094
  ...A(e)
3095
3095
  });
3096
3096
  class it extends I {
@@ -3114,7 +3114,7 @@ class it extends I {
3114
3114
  }
3115
3115
  it.create = (s, e) => new it({
3116
3116
  type: s,
3117
- typeName: T.ZodPromise,
3117
+ typeName: S.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 === T.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3125
+ return this._def.schema._def.typeName === S.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 = {
@@ -3187,14 +3187,14 @@ class ae extends I {
3187
3187
  }
3188
3188
  ae.create = (s, e, t) => new ae({
3189
3189
  schema: s,
3190
- typeName: T.ZodEffects,
3190
+ typeName: S.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: T.ZodEffects,
3197
+ typeName: S.ZodEffects,
3198
3198
  ...A(t)
3199
3199
  });
3200
3200
  class _e extends I {
@@ -3207,7 +3207,7 @@ class _e extends I {
3207
3207
  }
3208
3208
  _e.create = (s, e) => new _e({
3209
3209
  innerType: s,
3210
- typeName: T.ZodOptional,
3210
+ typeName: S.ZodOptional,
3211
3211
  ...A(e)
3212
3212
  });
3213
3213
  class We extends I {
@@ -3220,7 +3220,7 @@ class We extends I {
3220
3220
  }
3221
3221
  We.create = (s, e) => new We({
3222
3222
  innerType: s,
3223
- typeName: T.ZodNullable,
3223
+ typeName: S.ZodNullable,
3224
3224
  ...A(e)
3225
3225
  });
3226
3226
  class Ot extends I {
@@ -3239,7 +3239,7 @@ class Ot extends I {
3239
3239
  }
3240
3240
  Ot.create = (s, e) => new Ot({
3241
3241
  innerType: s,
3242
- typeName: T.ZodDefault,
3242
+ typeName: S.ZodDefault,
3243
3243
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
3244
3244
  ...A(e)
3245
3245
  });
@@ -3282,7 +3282,7 @@ class Yt extends I {
3282
3282
  }
3283
3283
  Yt.create = (s, e) => new Yt({
3284
3284
  innerType: s,
3285
- typeName: T.ZodCatch,
3285
+ typeName: S.ZodCatch,
3286
3286
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
3287
3287
  ...A(e)
3288
3288
  });
@@ -3300,7 +3300,7 @@ class Gt extends I {
3300
3300
  }
3301
3301
  }
3302
3302
  Gt.create = (s) => new Gt({
3303
- typeName: T.ZodNaN,
3303
+ typeName: S.ZodNaN,
3304
3304
  ...A(s)
3305
3305
  });
3306
3306
  const Kn = Symbol("zod_brand");
@@ -3353,7 +3353,7 @@ class Nt extends I {
3353
3353
  return new Nt({
3354
3354
  in: e,
3355
3355
  out: t,
3356
- typeName: T.ZodPipeline
3356
+ typeName: S.ZodPipeline
3357
3357
  });
3358
3358
  }
3359
3359
  }
@@ -3365,7 +3365,7 @@ class Xt extends I {
3365
3365
  }
3366
3366
  Xt.create = (s, e) => new Xt({
3367
3367
  innerType: s,
3368
- typeName: T.ZodReadonly,
3368
+ typeName: S.ZodReadonly,
3369
3369
  ...A(e)
3370
3370
  });
3371
3371
  const Wi = (s, e = {}, t) => s ? st.create().superRefine((i, n) => {
@@ -3377,13 +3377,13 @@ const Wi = (s, e = {}, t) => s ? st.create().superRefine((i, n) => {
3377
3377
  }) : st.create(), Jn = {
3378
3378
  object: H.lazycreate
3379
3379
  };
3380
- var T;
3380
+ var S;
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
- })(T || (T = {}));
3383
+ })(S || (S = {}));
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 = St.create, lr = ds.create, ur = Tt.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, Sr = ae.createWithPreprocess, Tr = Nt.create, $r = () => Ki().optional(), Er = () => Ji().optional(), Cr = () => qi().optional(), Ar = {
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 = {
3387
3387
  string: (s) => ie.create({ ...s, coerce: !0 }),
3388
3388
  number: (s) => Ce.create({ ...s, coerce: !0 }),
3389
3389
  boolean: (s) => _t.create({
@@ -3432,9 +3432,9 @@ var w = /* @__PURE__ */ Object.freeze({
3432
3432
  ZodVoid: Jt,
3433
3433
  ZodArray: re,
3434
3434
  ZodObject: H,
3435
- ZodUnion: St,
3435
+ ZodUnion: Tt,
3436
3436
  ZodDiscriminatedUnion: ds,
3437
- ZodIntersection: Tt,
3437
+ ZodIntersection: St,
3438
3438
  ZodTuple: he,
3439
3439
  ZodRecord: $t,
3440
3440
  ZodMap: qt,
@@ -3461,7 +3461,7 @@ var w = /* @__PURE__ */ Object.freeze({
3461
3461
  ZodSchema: I,
3462
3462
  late: Jn,
3463
3463
  get ZodFirstPartyTypeKind() {
3464
- return T;
3464
+ return S;
3465
3465
  },
3466
3466
  coerce: Ar,
3467
3467
  any: sr,
@@ -3489,8 +3489,8 @@ var w = /* @__PURE__ */ Object.freeze({
3489
3489
  onumber: Er,
3490
3490
  optional: xr,
3491
3491
  ostring: $r,
3492
- pipeline: Tr,
3493
- preprocess: Sr,
3492
+ pipeline: Sr,
3493
+ preprocess: Tr,
3494
3494
  promise: _r,
3495
3495
  record: pr,
3496
3496
  set: fr,
@@ -3514,6 +3514,7 @@ const ls = w.object({
3514
3514
  config: w.object({
3515
3515
  historyKey: w.string().refine((s) => s.replace(/-/g, "_")).nullable().default("main"),
3516
3516
  welcomeMessage: w.string().default("Hello! How can I help you today?"),
3517
+ initialReplyMessage: w.string().nullable().default(null),
3517
3518
  placement: w.enum(["left", "right"]).default("right"),
3518
3519
  openChatButton: w.object({
3519
3520
  imageSrc: w.string().optional(),
@@ -3574,12 +3575,12 @@ function Ir(s) {
3574
3575
  }
3575
3576
  var Us = !1;
3576
3577
  if (typeof window < "u") {
3577
- var Si = {
3578
+ var Ti = {
3578
3579
  get passive() {
3579
3580
  Us = !0;
3580
3581
  }
3581
3582
  };
3582
- window.addEventListener("testPassive", null, Si), window.removeEventListener("testPassive", null, Si);
3583
+ window.addEventListener("testPassive", null, Ti), window.removeEventListener("testPassive", null, Ti);
3583
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) {
3585
3586
  return Ue.some(function(e) {
@@ -3644,7 +3645,7 @@ var Qt = typeof window < "u" && window.navigator && window.navigator.platform &&
3644
3645
  i.targetTouches.length === 1 && Zr(i, s);
3645
3646
  }, es || (document.addEventListener("touchmove", Hs, Us ? { passive: !1 } : void 0), es = !0));
3646
3647
  }
3647
- }, Ti = function(s) {
3648
+ }, Si = function(s) {
3648
3649
  if (!s) {
3649
3650
  console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
3650
3651
  return;
@@ -3720,14 +3721,14 @@ var Dr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Pt = (s, e
3720
3721
  let Ke = class extends Q {
3721
3722
  constructor() {
3722
3723
  super(...arguments), this.isOpen = !0, this.onResizeHandler = () => {
3723
- this.isOpen && window.innerWidth < 768 ? Lr(this) : Ti(this);
3724
+ this.isOpen && window.innerWidth < 768 ? Lr(this) : Si(this);
3724
3725
  };
3725
3726
  }
3726
3727
  connectedCallback() {
3727
3728
  super.connectedCallback(), this.cleanOptions = ls.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
3728
3729
  }
3729
3730
  disconnectedCallback() {
3730
- super.disconnectedCallback(), Ti(this), window.removeEventListener("resize", this.onResizeHandler);
3731
+ super.disconnectedCallback(), Si(this), window.removeEventListener("resize", this.onResizeHandler);
3731
3732
  }
3732
3733
  render() {
3733
3734
  const s = this.cleanOptions.config.placement !== "left", e = _i({
@@ -3846,56 +3847,60 @@ function Vr(s) {
3846
3847
  });
3847
3848
  } };
3848
3849
  }
3849
- class Wr {
3850
- constructor(e, t = {}) {
3851
- this._assistantId = "", this._params = {}, this._simulateDelays = !1, this._threadId = "", this._messages = [], this.isTyping = !1, this.inputDisabled = !1, this.onStorageEvent = (o) => {
3852
- var c;
3853
- const [l, h, p] = ((c = o.key) == null ? void 0 : c.split("-")) || [];
3854
- if (!(l !== "iaiChat" || h !== this._historyKey))
3855
- switch (p) {
3850
+ let Wr = class {
3851
+ constructor(s, e = {}) {
3852
+ if (this._assistantId = "", this._threadId = "", this._messages = [], this.isTyping = !1, this.inputDisabled = !1, this.onStorageEvent = (t) => {
3853
+ var i;
3854
+ const [n, r, a] = ((i = t.key) == null ? void 0 : i.split("-")) || [];
3855
+ if (!(n !== "iaiChat" || r !== this.options.historyKey))
3856
+ switch (a) {
3856
3857
  case "messageHistory":
3857
- this.onMessageHistoryStorageEvent(o);
3858
+ this.onMessageHistoryStorageEvent(t);
3858
3859
  break;
3859
3860
  case "threadId":
3860
- this.setThreadId(JSON.parse(o.newValue || ""), !0);
3861
+ this.setThreadId(JSON.parse(t.newValue || ""), !0);
3861
3862
  break;
3862
3863
  case "typing":
3863
- this.setTyping(JSON.parse(o.newValue || "false"), !0);
3864
+ this.setTyping(JSON.parse(t.newValue || "false"), !0);
3864
3865
  break;
3865
3866
  case "inputDisabled":
3866
- this.setInputDisabled(JSON.parse(o.newValue || "false"), !0);
3867
+ this.setInputDisabled(JSON.parse(t.newValue || "false"), !0);
3867
3868
  break;
3868
3869
  }
3869
- }, this._assistantId = e;
3870
- const { params: i = {}, events: n, simulateDelays: r = !1, historyKey: a = "main" } = t;
3871
- if (this._params = i, this._simulateDelays = r, this._historyKey = a, this._emitter = Vr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), a) {
3872
- const o = this.storageGet("messageHistory");
3873
- o && (this._messages = o);
3874
- const c = this.storageGet("threadId");
3875
- c && this.setThreadId(c, !0);
3876
- const l = this.storageGet("typing");
3877
- l && this.setTyping(l, !0);
3878
- const h = this.storageGet("inputDisabled");
3879
- h && this.setInputDisabled(h, !0), window.addEventListener("storage", this.onStorageEvent);
3880
- }
3881
- n && Object.entries(n).forEach(([o, c]) => {
3882
- this._emitter.on(o, c);
3870
+ }, this._assistantId = s, this.options = {
3871
+ params: {},
3872
+ simulateDelays: !0,
3873
+ historyKey: null,
3874
+ initialReplyMessage: null,
3875
+ ...e
3876
+ }, this._emitter = Vr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), e.historyKey) {
3877
+ const t = this.storageGet("messageHistory");
3878
+ t && (this._messages = t);
3879
+ const i = this.storageGet("threadId");
3880
+ i && this.setThreadId(i, !0);
3881
+ const n = this.storageGet("typing");
3882
+ n && this.setTyping(n, !0);
3883
+ const r = this.storageGet("inputDisabled");
3884
+ r && this.setInputDisabled(r, !0), window.addEventListener("storage", this.onStorageEvent);
3885
+ }
3886
+ e.events && Object.entries(e.events).forEach(([t, i]) => {
3887
+ this._emitter.on(t, i);
3883
3888
  });
3884
3889
  }
3885
- onMessageHistoryStorageEvent(e) {
3886
- if (!e.newValue) {
3890
+ onMessageHistoryStorageEvent(s) {
3891
+ if (!s.newValue) {
3887
3892
  this.reset();
3888
3893
  return;
3889
3894
  }
3890
- const t = JSON.parse(e.newValue), i = this._messages.map((r) => r.id), n = t.map((r) => r.id);
3891
- this._messages.forEach((r) => {
3892
- n.includes(r.id) || this._emitter.emit("messageRemoved", r.id);
3893
- }), t.forEach((r) => {
3894
- i.includes(r.id) || this._emitter.emit("message", r);
3895
- }), this._messages = t;
3895
+ const e = JSON.parse(s.newValue), t = this._messages.map((n) => n.id), i = e.map((n) => n.id);
3896
+ this._messages.forEach((n) => {
3897
+ i.includes(n.id) || this._emitter.emit("messageRemoved", n.id);
3898
+ }), e.forEach((n) => {
3899
+ t.includes(n.id) || this._emitter.emit("message", n);
3900
+ }), this._messages = e;
3896
3901
  }
3897
3902
  reset() {
3898
- this._messages = [], this.setTyping(!1), this.setInputDisabled(!1), this.storageRemoveAll(), this._emitter.emit("reset");
3903
+ this._threadId = "", this._messages = [], this.setTyping(!1), this.setInputDisabled(!1), this.storageRemoveAll(), this._emitter.emit("reset");
3899
3904
  }
3900
3905
  destroy() {
3901
3906
  this._emitter.all.clear(), window.removeEventListener("storage", this.onStorageEvent), this._emitter.emit("destroy");
@@ -3903,73 +3908,82 @@ class Wr {
3903
3908
  async startChat() {
3904
3909
  if (this.chatStarted)
3905
3910
  return;
3906
- const { id: e } = await Hr(this.assistantId, this.params);
3907
- this.setThreadId(e);
3911
+ const { id: s } = await Hr(this.assistantId, this.params);
3912
+ if (!s)
3913
+ throw new Error("Could not start chat");
3914
+ this.setThreadId(s);
3908
3915
  }
3909
- addMessage(e) {
3910
- const t = {
3911
- ...e,
3912
- id: e.id || Math.random().toString(36).substring(7)
3916
+ addMessage(s) {
3917
+ const e = {
3918
+ ...s,
3919
+ id: s.id || Math.random().toString(36).substring(7)
3913
3920
  };
3914
- return this._messages.push(t), this.storageSet("messageHistory", this._messages), this._emitter.emit("message", t), t;
3921
+ return this._messages.push(e), this.storageSet("messageHistory", this._messages), this._emitter.emit("message", e), e;
3915
3922
  }
3916
- removeMessage(e) {
3917
- this._messages = this._messages.filter((t) => t.id !== e), this.storageSet("messageHistory", this._messages), this._emitter.emit("messageRemoved", e);
3923
+ removeMessage(s) {
3924
+ this._messages = this._messages.filter((e) => e.id !== s), this.storageSet("messageHistory", this._messages), this._emitter.emit("messageRemoved", s);
3918
3925
  }
3919
- async respondToFunctionCall(e, t, i) {
3926
+ async respondToFunctionCall(s, e, t) {
3920
3927
  this.simulateDelay(1800).then(() => this.setTyping(!0));
3921
- const n = this.simulateDelay(2e3);
3928
+ const i = this.simulateDelay(2e3);
3922
3929
  await this.insertMessagesWithSimulatedDelays(
3923
3930
  Promise.all([
3924
- Fr(this.threadId, e, t, i),
3925
- n
3926
- ]).then(([r]) => r)
3931
+ Fr(this.threadId, s, e, t),
3932
+ i
3933
+ ]).then(([n]) => n)
3927
3934
  );
3928
3935
  }
3929
- async sendUserMessage(e) {
3936
+ async sendUserMessage(s) {
3930
3937
  try {
3931
3938
  this.addMessage({
3932
- id: Math.random().toString(36).substring(7),
3933
3939
  role: "user",
3934
- content: e
3940
+ content: s
3935
3941
  }), this.simulateDelay(1800).then(() => this.setTyping(!0));
3936
- const t = this.simulateDelay(4800);
3937
- this.chatStarted || await this.startChat();
3938
- const { messages: i, functions: n } = await this.insertMessagesWithSimulatedDelays(
3942
+ let e = this.simulateDelay(4800);
3943
+ if (!this.chatStarted) {
3944
+ const { initialReplyMessage: n } = this.options;
3945
+ n && (this.simulateDelay(3800).then(() => {
3946
+ this.addMessage({
3947
+ role: "assistant",
3948
+ content: n
3949
+ }), this.setTyping(!1);
3950
+ }), this.simulateDelay(6200).then(() => this.setTyping(!0)), e = this.simulateDelay(8200)), await this.startChat();
3951
+ }
3952
+ const { messages: t, functions: i } = await this.insertMessagesWithSimulatedDelays(
3939
3953
  Promise.all([
3940
- Br(this.threadId, e),
3941
- t
3942
- ]).then(([r]) => r)
3954
+ Br(this.threadId, s),
3955
+ e
3956
+ ]).then(([n]) => n)
3943
3957
  );
3944
- return { messages: i, functions: n };
3945
- } catch (t) {
3946
- throw console.error(t), new Error("There was an error sending the message");
3958
+ return { messages: t, functions: i };
3959
+ } catch (e) {
3960
+ throw console.error(e), new Error("There was an error sending the message");
3947
3961
  }
3948
3962
  }
3949
- setThreadId(e, t = !1) {
3950
- this._threadId = e, t || this.storageSet("threadId", e);
3963
+ setThreadId(s, e = !1) {
3964
+ this._threadId = s, e || this.storageSet("threadId", s);
3951
3965
  }
3952
- setTyping(e, t = !1) {
3953
- this.isTyping = e, this._emitter.emit("typing", e), t || this.storageSet("typing", e);
3966
+ setTyping(s, e = !1) {
3967
+ this.isTyping = s, this._emitter.emit("typing", s), e || this.storageSet("typing", s);
3954
3968
  }
3955
- setInputDisabled(e, t = !1) {
3956
- this.inputDisabled = e, this._emitter.emit("inputDisabled", e), t || this.storageSet("inputDisabled", e);
3969
+ setInputDisabled(s, e = !1) {
3970
+ this.inputDisabled = s, this._emitter.emit("inputDisabled", s), e || this.storageSet("inputDisabled", s);
3957
3971
  }
3958
- async insertMessagesWithSimulatedDelays(e) {
3959
- const t = await e;
3960
- if (t.error)
3961
- throw new Error(t.message);
3962
- const { messages: i, functions: n } = t;
3963
- return await Promise.all(i.map(async (r, a) => (await this.simulateDelay(1e3 * a), this.addMessage(r)))), this.setTyping(!1), n.forEach((r) => this._emitter.emit("functionCall", r)), { messages: i, functions: n };
3972
+ async insertMessagesWithSimulatedDelays(s) {
3973
+ const e = await s;
3974
+ if (e.error)
3975
+ throw new Error(e.message);
3976
+ const { messages: t, functions: i } = e;
3977
+ return await Promise.all(t.map(async (n, r) => (await this.simulateDelay(1e3 * r), this.addMessage(n)))), this.setTyping(!1), i.forEach((n) => this._emitter.emit("functionCall", n)), { messages: t, functions: i };
3964
3978
  }
3965
- simulateDelay(e) {
3966
- return this._simulateDelays ? new Promise((t) => setTimeout(t, e)) : Promise.resolve();
3979
+ simulateDelay(s) {
3980
+ return this.options.simulateDelays ? new Promise((e) => setTimeout(e, s)) : Promise.resolve();
3967
3981
  }
3968
3982
  get assistantId() {
3969
3983
  return this._assistantId;
3970
3984
  }
3971
3985
  get params() {
3972
- return this._params;
3986
+ return this.options.params;
3973
3987
  }
3974
3988
  get threadId() {
3975
3989
  return this._threadId;
@@ -3980,24 +3994,24 @@ class Wr {
3980
3994
  get chatStarted() {
3981
3995
  return !!this._threadId;
3982
3996
  }
3983
- storageSet(e, t) {
3984
- this._historyKey && localStorage.setItem(`iaiChat-${this._historyKey}-${e}`, JSON.stringify(t));
3997
+ storageSet(s, e) {
3998
+ this.options.historyKey && localStorage.setItem(`iaiChat-${this.options.historyKey}-${s}`, JSON.stringify(e));
3985
3999
  }
3986
- storageGet(e) {
3987
- if (!this._historyKey)
4000
+ storageGet(s) {
4001
+ if (!this.options.historyKey)
3988
4002
  return null;
3989
- const t = localStorage.getItem(`iaiChat-${this._historyKey}-${e}`);
3990
- return t ? JSON.parse(t) : null;
4003
+ const e = localStorage.getItem(`iaiChat-${this.options.historyKey}-${s}`);
4004
+ return e ? JSON.parse(e) : null;
3991
4005
  }
3992
- storageRemove(e) {
3993
- localStorage.removeItem(`iaiChat-${this._historyKey}-${e}`);
4006
+ storageRemove(s) {
4007
+ localStorage.removeItem(`iaiChat-${this.options.historyKey}-${s}`);
3994
4008
  }
3995
4009
  storageRemoveAll() {
3996
- this._historyKey && Object.keys(localStorage).forEach((e) => {
3997
- e.startsWith(`iaiChat-${this._historyKey}-`) && localStorage.removeItem(e);
4010
+ this.options.historyKey && Object.keys(localStorage).forEach((s) => {
4011
+ s.startsWith(`iaiChat-${this.options.historyKey}-`) && localStorage.removeItem(s);
3998
4012
  });
3999
4013
  }
4000
- }
4014
+ };
4001
4015
  function Kr(s) {
4002
4016
  return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
4003
4017
  var i = s.get(e);
@@ -4203,7 +4217,12 @@ let oe = class extends Q {
4203
4217
  connectedCallback() {
4204
4218
  super.connectedCallback(), this.cleanOptions = ls.parse(this.options || {});
4205
4219
  const { assistantId: s, params: e, config: t } = this.cleanOptions;
4206
- Ai(this, $e, new Wr(s, { params: e, simulateDelays: !0, historyKey: t.historyKey })), 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 }) => {
4220
+ Ai(this, $e, new Wr(s, {
4221
+ params: e,
4222
+ simulateDelays: !0,
4223
+ historyKey: t.historyKey,
4224
+ initialReplyMessage: t.initialReplyMessage
4225
+ })), 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 }) => {
4207
4226
  const a = this.cleanOptions.handlers.functionCalls[n];
4208
4227
  if (!a) {
4209
4228
  console.warn(`No function call handler found for ${n}`);
@@ -4608,7 +4627,7 @@ var en = { exports: {} };
4608
4627
  function ye(v) {
4609
4628
  return se.slice(se.indexOf(":") + a + v);
4610
4629
  }
4611
- function Se(v) {
4630
+ function Te(v) {
4612
4631
  O(
4613
4632
  $,
4614
4633
  "onMessage passed: {iframe: " + R.iframe.id + ", message: " + v + "}"
@@ -4678,7 +4697,7 @@ var en = { exports: {} };
4678
4697
  y: Math.floor(Number(C.top) + Number(l.y))
4679
4698
  };
4680
4699
  }
4681
- function S(v) {
4700
+ function T(v) {
4682
4701
  function C() {
4683
4702
  l = q, F(), O($, "--");
4684
4703
  }
@@ -4750,13 +4769,13 @@ var en = { exports: {} };
4750
4769
  return ps($, v, C);
4751
4770
  }
4752
4771
  function xs() {
4753
- switch (d[$] && d[$].firstRun && Ts(), R.type) {
4772
+ switch (d[$] && d[$].firstRun && Ss(), R.type) {
4754
4773
  case "close": {
4755
4774
  ms(R.iframe);
4756
4775
  break;
4757
4776
  }
4758
4777
  case "message": {
4759
- Se(ye(6));
4778
+ Te(ye(6));
4760
4779
  break;
4761
4780
  }
4762
4781
  case "mouseenter": {
@@ -4772,11 +4791,11 @@ var en = { exports: {} };
4772
4791
  break;
4773
4792
  }
4774
4793
  case "scrollTo": {
4775
- S(!1);
4794
+ T(!1);
4776
4795
  break;
4777
4796
  }
4778
4797
  case "scrollToOffset": {
4779
- S(!0);
4798
+ T(!0);
4780
4799
  break;
4781
4800
  }
4782
4801
  case "pageInfo": {
@@ -4814,7 +4833,7 @@ var en = { exports: {} };
4814
4833
  R.type + " No settings for " + v + ". Message was: " + se
4815
4834
  )), C;
4816
4835
  }
4817
- function Ss() {
4836
+ function Ts() {
4818
4837
  for (var v in d)
4819
4838
  ce(
4820
4839
  "iFrame requested init",
@@ -4823,11 +4842,11 @@ var en = { exports: {} };
4823
4842
  v
4824
4843
  );
4825
4844
  }
4826
- function Ts() {
4845
+ function Ss() {
4827
4846
  d[$] && (d[$].firstRun = !1);
4828
4847
  }
4829
4848
  var se = u.data, R = {}, $ = null;
4830
- se === "[iFrameResizerChild]Ready" ? Ss() : Ne() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && ks($) && (O($, "Received: " + se), _s() && de() && xs())) : Ws($, "Ignored: " + se);
4849
+ se === "[iFrameResizerChild]Ready" ? Ts() : Ne() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && ks($) && (O($, "Received: " + se), _s() && de() && xs())) : Ws($, "Ignored: " + se);
4831
4850
  }
4832
4851
  function ps(u, y, M) {
4833
4852
  var x = null, P = null;
@@ -4911,11 +4930,11 @@ var en = { exports: {} };
4911
4930
  }
4912
4931
  function ce(u, y, M, x, P) {
4913
4932
  function Z() {
4914
- var Se = d[x] && d[x].targetOrigin;
4933
+ var Te = d[x] && d[x].targetOrigin;
4915
4934
  O(
4916
4935
  x,
4917
- "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Se
4918
- ), M.contentWindow.postMessage(o + y, Se);
4936
+ "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Te
4937
+ ), M.contentWindow.postMessage(o + y, Te);
4919
4938
  }
4920
4939
  function de() {
4921
4940
  ee(x, "[" + u + "] IFrame(" + x + ") not found");
@@ -4924,14 +4943,14 @@ var en = { exports: {} };
4924
4943
  M && "contentWindow" in M && M.contentWindow !== null ? Z() : de();
4925
4944
  }
4926
4945
  function ge() {
4927
- function Se() {
4946
+ function Te() {
4928
4947
  d[x] && !d[x].loaded && !ye && (ye = !0, ee(
4929
4948
  x,
4930
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."
4931
4950
  ));
4932
4951
  }
4933
4952
  P && d[x] && d[x].warningTimeout && (d[x].msgTimeout = setTimeout(
4934
- Se,
4953
+ Te,
4935
4954
  d[x].warningTimeout
4936
4955
  ));
4937
4956
  }
@@ -4946,7 +4965,7 @@ var en = { exports: {} };
4946
4965
  }
4947
4966
  function ti(u, y) {
4948
4967
  function M() {
4949
- function S(W) {
4968
+ function T(W) {
4950
4969
  var te = d[k][W];
4951
4970
  te !== 1 / 0 && te !== 0 && (u.style[W] = ln(te) ? te + "px" : te, O(k, "Set " + W + " = " + u.style[W]));
4952
4971
  }
@@ -4956,19 +4975,19 @@ var en = { exports: {} };
4956
4975
  "Value for min" + W + " can not be greater than max" + W
4957
4976
  );
4958
4977
  }
4959
- F("Height"), F("Width"), S("maxHeight"), S("minHeight"), S("maxWidth"), S("minWidth");
4978
+ F("Height"), F("Width"), T("maxHeight"), T("minHeight"), T("maxWidth"), T("minWidth");
4960
4979
  }
4961
4980
  function x() {
4962
- var S = y && y.id || N.id + t++;
4963
- return document.getElementById(S) !== null && (S += t++), S;
4981
+ var T = y && y.id || N.id + t++;
4982
+ return document.getElementById(T) !== null && (T += t++), T;
4964
4983
  }
4965
- function P(S) {
4966
- if (typeof S != "string")
4984
+ function P(T) {
4985
+ if (typeof T != "string")
4967
4986
  throw new TypeError("Invaild id for iFrame. Expected String");
4968
- return S === "" && (u.id = S = x(), i = (y || {}).log, O(
4969
- S,
4970
- "Added missing iframe ID: " + S + " (" + u.src + ")"
4971
- )), S;
4987
+ return T === "" && (u.id = T = x(), i = (y || {}).log, O(
4988
+ T,
4989
+ "Added missing iframe ID: " + T + " (" + u.src + ")"
4990
+ )), T;
4972
4991
  }
4973
4992
  function Z() {
4974
4993
  switch (O(
@@ -4993,8 +5012,8 @@ var en = { exports: {} };
4993
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");
4994
5013
  }
4995
5014
  function Ne() {
4996
- var S = d[k] && d[k].firstRun, F = d[k] && d[k].heightCalculationMethod in p;
4997
- !S && F && Gs({ iframe: u, height: 0, width: 0, type: "init" });
5015
+ var T = d[k] && d[k].firstRun, F = d[k] && d[k].heightCalculationMethod in p;
5016
+ !T && F && Gs({ iframe: u, height: 0, width: 0, type: "init" });
4998
5017
  }
4999
5018
  function ge() {
5000
5019
  d[k] && (d[k].iframe.iFrameResizer = {
@@ -5009,34 +5028,34 @@ var en = { exports: {} };
5009
5028
  "resize",
5010
5029
  d[k].iframe
5011
5030
  ),
5012
- moveToAnchor: function(S) {
5031
+ moveToAnchor: function(T) {
5013
5032
  ce(
5014
5033
  "Move to anchor",
5015
- "moveToAnchor:" + S,
5034
+ "moveToAnchor:" + T,
5016
5035
  d[k].iframe,
5017
5036
  k
5018
5037
  );
5019
5038
  },
5020
- sendMessage: function(S) {
5021
- S = JSON.stringify(S), ce(
5039
+ sendMessage: function(T) {
5040
+ T = JSON.stringify(T), ce(
5022
5041
  "Send Message",
5023
- "message:" + S,
5042
+ "message:" + T,
5024
5043
  d[k].iframe,
5025
5044
  k
5026
5045
  );
5027
5046
  }
5028
5047
  });
5029
5048
  }
5030
- function ye(S) {
5049
+ function ye(T) {
5031
5050
  function F() {
5032
- ce("iFrame.onload", S, u, e, !0), Ne();
5051
+ ce("iFrame.onload", T, u, e, !0), Ne();
5033
5052
  }
5034
5053
  function W(Pe) {
5035
5054
  if (u.parentNode) {
5036
5055
  var xs = new Pe(function(ks) {
5037
- ks.forEach(function(Ss) {
5038
- var Ts = Array.prototype.slice.call(Ss.removedNodes);
5039
- Ts.forEach(function(se) {
5056
+ ks.forEach(function(Ts) {
5057
+ var Ss = Array.prototype.slice.call(Ts.removedNodes);
5058
+ Ss.forEach(function(se) {
5040
5059
  se === u && ms(u);
5041
5060
  });
5042
5061
  });
@@ -5047,34 +5066,34 @@ var en = { exports: {} };
5047
5066
  }
5048
5067
  }
5049
5068
  var te = U();
5050
- te && W(te), G(u, "load", F), ce("init", S, u, e, !0);
5069
+ te && W(te), G(u, "load", F), ce("init", T, u, e, !0);
5051
5070
  }
5052
- function Se(S) {
5053
- if (typeof S != "object")
5071
+ function Te(T) {
5072
+ if (typeof T != "object")
5054
5073
  throw new TypeError("Options is not an object");
5055
5074
  }
5056
- function vs(S) {
5075
+ function vs(T) {
5057
5076
  for (var F in N)
5058
5077
  Object.prototype.hasOwnProperty.call(N, F) && (d[k][F] = Object.prototype.hasOwnProperty.call(
5059
- S,
5078
+ T,
5060
5079
  F
5061
- ) ? S[F] : N[F]);
5080
+ ) ? T[F] : N[F]);
5062
5081
  }
5063
- function Rt(S) {
5064
- return S === "" || S.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : S;
5082
+ function Rt(T) {
5083
+ return T === "" || T.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : T;
5065
5084
  }
5066
- function bs(S) {
5067
- var F = S.split("Callback");
5085
+ function bs(T) {
5086
+ var F = T.split("Callback");
5068
5087
  if (F.length === 2) {
5069
5088
  var W = "on" + F[0].charAt(0).toUpperCase() + F[0].slice(1);
5070
- this[W] = this[S], delete this[S], ee(
5089
+ this[W] = this[T], delete this[T], ee(
5071
5090
  k,
5072
- "Deprecated: '" + S + "' has been renamed '" + W + "'. The old method will be removed in the next major version."
5091
+ "Deprecated: '" + T + "' has been renamed '" + W + "'. The old method will be removed in the next major version."
5073
5092
  );
5074
5093
  }
5075
5094
  }
5076
- function ws(S) {
5077
- 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(bs, S), vs(S), d[k] && (d[k].targetOrigin = d[k].checkOrigin === !0 ? Rt(d[k].remoteHost) : "*");
5095
+ function ws(T) {
5096
+ 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) : "*");
5078
5097
  }
5079
5098
  function _s() {
5080
5099
  return k in d && "iFrameResizer" in u;
@@ -5669,7 +5688,7 @@ function on(s) {
5669
5688
  });
5670
5689
  } };
5671
5690
  }
5672
- class Sa {
5691
+ class Ta {
5673
5692
  constructor(e) {
5674
5693
  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([
5675
5694
  1006
@@ -5700,7 +5719,7 @@ class Sa {
5700
5719
  this.disconnect(), this._emitter.all.clear();
5701
5720
  }
5702
5721
  }
5703
- const Ta = ns.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5722
+ const Sa = ns.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5704
5723
  let Ca = "https://five9.ah.inhabit.work";
5705
5724
  const Aa = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
5706
5725
  var be, ze;
@@ -5708,7 +5727,7 @@ const ft = class ft {
5708
5727
  constructor() {
5709
5728
  $s(this, be, void 0);
5710
5729
  $s(this, ze, void 0);
5711
- 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, ze, null), this.conversationStarted = !1;
5730
+ 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;
5712
5731
  }
5713
5732
  serialize() {
5714
5733
  return JSON.stringify({
@@ -5733,13 +5752,13 @@ const ft = class ft {
5733
5752
  },
5734
5753
  body: JSON.stringify({ tenantName: $a })
5735
5754
  });
5736
- return Te(this, be, await e.json()), Zt(this, be);
5755
+ return Se(this, be, await e.json()), Zt(this, be);
5737
5756
  }
5738
5757
  setSession(e) {
5739
- Te(this, be, e);
5758
+ Se(this, be, e);
5740
5759
  }
5741
5760
  setConversationId(e) {
5742
- Te(this, ze, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5761
+ Se(this, ze, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5743
5762
  }
5744
5763
  connect() {
5745
5764
  if (!this.sessionToken)
@@ -5752,7 +5771,7 @@ const ft = class ft {
5752
5771
  if (!this.conversationId)
5753
5772
  throw new Error("Conversation not started");
5754
5773
  this.five9WebSocket && this.five9WebSocket.destroy();
5755
- const e = new Sa(`${Aa}/conversations/${this.conversationId}/ws`);
5774
+ const e = new Ta(`${Aa}/conversations/${this.conversationId}/ws`);
5756
5775
  e.on("*", (t, i) => {
5757
5776
  this._emitter.emit(t, i);
5758
5777
  }), e.on("conversationCreated", (t) => {
@@ -5774,7 +5793,7 @@ const ft = class ft {
5774
5793
  messages: [
5775
5794
  {
5776
5795
  messageId: t.messageId,
5777
- type: Ta.READ
5796
+ type: Sa.READ
5778
5797
  }
5779
5798
  ]
5780
5799
  });
@@ -5863,7 +5882,7 @@ const ft = class ft {
5863
5882
  }), this.destroy();
5864
5883
  }
5865
5884
  destroy() {
5866
- this.five9WebSocket && this.five9WebSocket.destroy(), Te(this, be, null), Te(this, ze, null);
5885
+ this.five9WebSocket && this.five9WebSocket.destroy(), Se(this, be, null), Se(this, ze, null);
5867
5886
  }
5868
5887
  // Getters
5869
5888
  get sessionToken() {