@eloquentai/chat-sdk 0.35.1-dev.2 → 0.36.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,20 +1,20 @@
1
1
  "use client";
2
- import { L as Ct, c as Xe, u as St, g as rt, X as It, i as zt, A as Et, d as W, e as je, f as Rt, h as Pt, r as Tt, t as Mt, j as Ot, N as Ye, k as Oe, l as At, H as Ut, w as nt, m as jt, s as Dt, n as $t, o as Bt, E as Nt, p as Lt, S as Zt, C as Kt, T as Ht } from "./skeleton-CyUpDF_5.js";
3
- import { jsx as q, jsxs as ze, Fragment as at } from "react/jsx-runtime";
4
- import { useState as _, useEffect as K, useMemo as Fe, useCallback as v, useRef as Z } from "react";
5
- import { createPortal as Je } from "react-dom";
6
- import Vt from "react-dom/client";
2
+ import { L as Tt, c as Qe, u as Mt, g as at, X as Pt, i as At, A as Ot, d as V, e as De, f as Ut, h as jt, r as Dt, t as $t, j as Bt, N as et, k as Oe, l as Lt, H as Nt, w as it, m as Zt, s as Kt, n as Vt, o as Ht, E as Wt, p as Ft, S as Jt, C as Gt, T as Yt } from "./skeleton-CNz9cQ6u.js";
3
+ import { jsx as x, jsxs as ze, Fragment as st } from "react/jsx-runtime";
4
+ import { useState as _, useEffect as Z, useMemo as Je, useCallback as w, useRef as N } from "react";
5
+ import { createPortal as Ge } from "react-dom";
6
+ import Xt from "react-dom/client";
7
7
  try {
8
- let t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, e = new t.Error().stack;
9
- e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "388c4d1d-fab2-4ce6-b5b0-89b7d5c4008b", t._sentryDebugIdIdentifier = "sentry-dbid-388c4d1d-fab2-4ce6-b5b0-89b7d5c4008b");
8
+ let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
9
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b2a12f8f-024a-4e80-8da3-3c6de79a0de4", e._sentryDebugIdIdentifier = "sentry-dbid-b2a12f8f-024a-4e80-8da3-3c6de79a0de4");
10
10
  } catch {
11
11
  }
12
12
  if (typeof window < "u") {
13
- const t = "development";
14
- import("./index-hFbiYJI3.js").then(({ init: e }) => {
15
- e({
13
+ const e = "development";
14
+ import("./index-hFbiYJI3.js").then(({ init: t }) => {
15
+ t({
16
16
  dsn: void 0,
17
- environment: t,
17
+ environment: e,
18
18
  sendDefaultPii: !1,
19
19
  debug: !1,
20
20
  enabled: !0,
@@ -33,69 +33,69 @@ if (typeof window < "u") {
33
33
  });
34
34
  });
35
35
  }
36
- const Le = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-1\\.5{padding:calc(var(--eloq-spacing) * 1.5)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));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,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));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,)}}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', Wt = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}";
37
- function Ft({
38
- toggleBubble: t,
39
- isDarkMode: e = !1
36
+ const Ze = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:text-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-in)}.eloq\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-1\\.5{padding:calc(var(--eloq-spacing) * 1.5)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));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,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));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,)}}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes text-in{0%{opacity:0}to{opacity:1}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', Qt = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}";
37
+ function eo({
38
+ toggleBubble: e,
39
+ isDarkMode: t = !1
40
40
  }) {
41
- const o = e ? "#fff" : "#000", r = e ? "#000000" : "#ffffff";
42
- return /* @__PURE__ */ q("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ q(
41
+ const o = t ? "#fff" : "#000", r = t ? "#000000" : "#ffffff";
42
+ return /* @__PURE__ */ x("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ x(
43
43
  "div",
44
44
  {
45
- className: Xe(
45
+ className: Qe(
46
46
  "eloq:chat-bubble eloq:relative eloq:flex eloq:items-center eloq:justify-center eloq:w-12 eloq:h-12 eloq:rounded-full eloq:cursor-pointer",
47
47
  // Inverted in dark mode: a black launcher disappears on dark pages.
48
- e ? "eloq:bg-[#fff] eloq:text-[#000]" : "eloq:bg-[#000] eloq:text-[#fff]"
48
+ t ? "eloq:bg-[#fff] eloq:text-[#000]" : "eloq:bg-[#000] eloq:text-[#fff]"
49
49
  ),
50
- onClick: t,
51
- children: /* @__PURE__ */ q("div", { className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto", children: /* @__PURE__ */ q(Ct, { bgColor: o, fgColor: r }) })
50
+ onClick: e,
51
+ children: /* @__PURE__ */ x("div", { className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto", children: /* @__PURE__ */ x(Tt, { bgColor: o, fgColor: r }) })
52
52
  }
53
53
  ) });
54
54
  }
55
- function Ze({ children: t, head: e, ...o }) {
56
- const [r, n] = _(null), i = r?.contentWindow?.document?.head, d = r?.contentWindow?.document?.body;
55
+ function Ke({ children: e, head: t, ...o }) {
56
+ const [r, n] = _(null), i = r?.contentWindow?.document?.head, c = r?.contentWindow?.document?.body;
57
57
  return /* @__PURE__ */ ze("iframe", { ...o, ref: n, children: [
58
- i && Je(e, i),
59
- d && Je(t, d)
58
+ i && Ge(t, i),
59
+ c && Ge(e, c)
60
60
  ] });
61
61
  }
62
- function Jt({ children: t, container: e }) {
63
- return Je(t, e);
62
+ function to({ children: e, container: t }) {
63
+ return Ge(e, t);
64
64
  }
65
- function Gt({
66
- message: t,
67
- isVisible: e,
65
+ function oo({
66
+ message: e,
67
+ isVisible: t,
68
68
  onDismiss: o,
69
69
  onMessageClick: r,
70
70
  autoHideDelay: n
71
71
  }) {
72
- const [i, d] = _(!1), [s, c] = _("entering"), a = St();
73
- return K(() => {
74
- if (e) {
75
- d(!0), c("entering");
72
+ const [i, c] = _(!1), [s, d] = _("entering"), a = Mt();
73
+ return Z(() => {
74
+ if (t) {
75
+ c(!0), d("entering");
76
76
  const l = setTimeout(() => {
77
- c("visible");
77
+ d("visible");
78
78
  }, 50);
79
- let h;
80
- const u = setTimeout(() => {
81
- c("exiting"), h = setTimeout(() => {
79
+ let u;
80
+ const p = setTimeout(() => {
81
+ d("exiting"), u = setTimeout(() => {
82
82
  o();
83
83
  }, 300);
84
84
  }, n);
85
85
  return () => {
86
- clearTimeout(l), clearTimeout(u), clearTimeout(h);
86
+ clearTimeout(l), clearTimeout(p), clearTimeout(u);
87
87
  };
88
88
  } else {
89
- c("exiting");
89
+ d("exiting");
90
90
  const l = setTimeout(() => {
91
- d(!1), c("entering");
91
+ c(!1), d("entering");
92
92
  }, 300);
93
93
  return () => clearTimeout(l);
94
94
  }
95
- }, [e, o, n]), i ? /* @__PURE__ */ q(
95
+ }, [t, o, n]), i ? /* @__PURE__ */ x(
96
96
  "div",
97
97
  {
98
- className: Xe(
98
+ className: Qe(
99
99
  // right-16 leaves a ~7px gap between the tail tip and the launcher
100
100
  // circle's edge — the tail points at it without sliding underneath.
101
101
  "eloq:absolute eloq:right-16 eloq:bottom-0 eloq:max-w-xs eloq:transform eloq:transition-all eloq:duration-500 eloq:ease-out",
@@ -103,7 +103,7 @@ function Gt({
103
103
  s === "visible" && "eloq:translate-x-0 eloq:opacity-100 eloq:scale-100",
104
104
  s === "exiting" && "eloq:translate-x-8 eloq:opacity-0 eloq:scale-95"
105
105
  ),
106
- children: /* @__PURE__ */ q("div", { className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300", children: /* @__PURE__ */ ze(
106
+ children: /* @__PURE__ */ x("div", { className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300", children: /* @__PURE__ */ ze(
107
107
  "div",
108
108
  {
109
109
  className: "eloq:relative eloq:rounded-lg eloq:border eloq:p-3 eloq:cursor-pointer",
@@ -119,7 +119,7 @@ function Gt({
119
119
  className: "eloq:absolute eloq:bottom-1 eloq:-right-[9px] eloq:h-4 eloq:w-4 eloq:-scale-x-100",
120
120
  viewBox: "0 0 10.54 11.14",
121
121
  children: [
122
- /* @__PURE__ */ q(
122
+ /* @__PURE__ */ x(
123
123
  "path",
124
124
  {
125
125
  d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z",
@@ -129,7 +129,7 @@ function Gt({
129
129
  style: { stroke: "hsl(var(--border))" }
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ q(
132
+ /* @__PURE__ */ x(
133
133
  "rect",
134
134
  {
135
135
  x: "6.2",
@@ -142,17 +142,17 @@ function Gt({
142
142
  ]
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ q(
145
+ /* @__PURE__ */ x(
146
146
  "p",
147
147
  {
148
148
  className: "eloq:text-sm eloq:leading-relaxed eloq:pr-4",
149
149
  style: {
150
- color: a.botBubbleTextColor || rt(a.botBubbleColor)
150
+ color: a.botBubbleTextColor || at(a.botBubbleColor)
151
151
  },
152
- children: t
152
+ children: e
153
153
  }
154
154
  ),
155
- /* @__PURE__ */ q(
155
+ /* @__PURE__ */ x(
156
156
  "button",
157
157
  {
158
158
  "aria-label": "Dismiss message",
@@ -163,9 +163,9 @@ function Gt({
163
163
  style: {
164
164
  // Follows the bubble's computed text colour, so the X blends
165
165
  // with the message on any bubble background (and dark mode).
166
- color: a.botBubbleTextColor || rt(a.botBubbleColor)
166
+ color: a.botBubbleTextColor || at(a.botBubbleColor)
167
167
  },
168
- children: /* @__PURE__ */ q(It, { className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
168
+ children: /* @__PURE__ */ x(Pt, { className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
169
169
  }
170
170
  )
171
171
  ]
@@ -174,62 +174,62 @@ function Gt({
174
174
  }
175
175
  ) : null;
176
176
  }
177
- function it(t) {
177
+ function lt(e) {
178
178
  if (typeof document > "u") return null;
179
- const e = document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));
180
- return e ? decodeURIComponent(e[1]) : null;
179
+ const t = document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));
180
+ return t ? decodeURIComponent(t[1]) : null;
181
181
  }
182
- function Xt(t, e, o) {
182
+ function ro(e, t, o) {
183
183
  if (typeof document > "u") return;
184
184
  const r = new Date(Date.now() + o * 60 * 60 * 1e3).toUTCString();
185
- document.cookie = `${t}=${encodeURIComponent(e)}; expires=${r}; path=/; SameSite=Lax`;
185
+ document.cookie = `${e}=${encodeURIComponent(t)}; expires=${r}; path=/; SameSite=Lax`;
186
186
  }
187
- function Yt(t) {
188
- typeof document > "u" || (document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`);
187
+ function no(e) {
188
+ typeof document > "u" || (document.cookie = `${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`);
189
189
  }
190
- function Qt({
191
- chatProps: t,
192
- chatSettings: e
190
+ function ao({
191
+ chatProps: e,
192
+ chatSettings: t
193
193
  }) {
194
- return Fe(() => e ? {
195
- assistantName: e.agent_name,
196
- assistantLogo: e.avatar_url || void 0,
194
+ return Je(() => t ? {
195
+ assistantName: t.agent_name,
196
+ assistantLogo: t.avatar_url || void 0,
197
197
  theme: {
198
- ...t?.theme,
199
- mode: e.theme ?? "light",
200
- userBubbleColor: e.user_bubble_color || t?.theme?.userBubbleColor,
201
- botBubbleColor: e.bot_bubble_color || t?.theme?.botBubbleColor,
202
- suggestedMessageBubbleColor: e.suggested_message_bubble_color || t?.theme?.suggestedMessageBubbleColor,
203
- userBubbleTextColor: e.user_bubble_text_color || t?.theme?.userBubbleTextColor,
204
- botBubbleTextColor: e.bot_bubble_text_color || t?.theme?.botBubbleTextColor,
205
- suggestedMessageBubbleTextColor: e.suggested_message_bubble_text_color || t?.theme?.suggestedMessageBubbleTextColor
198
+ ...e?.theme,
199
+ mode: t.theme ?? "light",
200
+ userBubbleColor: t.user_bubble_color || e?.theme?.userBubbleColor,
201
+ botBubbleColor: t.bot_bubble_color || e?.theme?.botBubbleColor,
202
+ suggestedMessageBubbleColor: t.suggested_message_bubble_color || e?.theme?.suggestedMessageBubbleColor,
203
+ userBubbleTextColor: t.user_bubble_text_color || e?.theme?.userBubbleTextColor,
204
+ botBubbleTextColor: t.bot_bubble_text_color || e?.theme?.botBubbleTextColor,
205
+ suggestedMessageBubbleTextColor: t.suggested_message_bubble_text_color || e?.theme?.suggestedMessageBubbleTextColor
206
206
  },
207
- welcomeMessage: e.welcome_message || void 0,
208
- legalText: e.footer_html || void 0,
209
- suggestedMessages: e.suggested_messages,
210
- suggestedMessageTexts: e.suggested_message_texts ?? void 0,
207
+ welcomeMessage: t.welcome_message || void 0,
208
+ legalText: t.footer_html || void 0,
209
+ suggestedMessages: t.suggested_messages,
210
+ suggestedMessageTexts: t.suggested_message_texts ?? void 0,
211
211
  // Boot value wins when the server sends one (?? so an explicit false
212
212
  // still wins); the host-app prop is the fallback.
213
- hasSuggestedMessageAura: e.suggested_message_aura ?? t?.hasSuggestedMessageAura,
214
- hasSuggestedMessageShine: e.suggested_message_shine ?? t?.hasSuggestedMessageShine,
215
- hasAttachments: e.attachments_enabled ?? t?.hasAttachments,
216
- displayWelcomeMessages: e.auto_display_welcome_message,
217
- collectUserFeedback: e.collect_user_feedback,
218
- title: e.title || "responds instantly",
219
- subtitle: e.subtitle || "Ask me anything"
220
- } : t, [t, e]);
221
- }
222
- function eo() {
213
+ hasSuggestedMessageAura: t.suggested_message_aura ?? e?.hasSuggestedMessageAura,
214
+ hasSuggestedMessageShine: t.suggested_message_shine ?? e?.hasSuggestedMessageShine,
215
+ hasAttachments: t.attachments_enabled ?? e?.hasAttachments,
216
+ displayWelcomeMessages: t.auto_display_welcome_message,
217
+ collectUserFeedback: t.collect_user_feedback,
218
+ title: t.title || "responds instantly",
219
+ subtitle: t.subtitle || "Ask me anything"
220
+ } : e, [e, t]);
221
+ }
222
+ function io() {
223
223
  if (typeof window > "u")
224
224
  return {};
225
- const t = new URLSearchParams(window.location.search), e = {};
226
- return t.forEach((o, r) => {
227
- e[r] = o;
228
- }), e;
229
- }
230
- const to = "eloquent-ai::conversation-data", _e = typeof window < "u", oo = 1800 * 1e3;
231
- function Qe({ appId: t }) {
232
- const e = Fe(() => `${to}-${t}`, [t]), o = Fe(
225
+ const e = new URLSearchParams(window.location.search), t = {};
226
+ return e.forEach((o, r) => {
227
+ t[r] = o;
228
+ }), t;
229
+ }
230
+ const so = "eloquent-ai::conversation-data", Ce = typeof window < "u", lo = 1800 * 1e3;
231
+ function tt({ appId: e }) {
232
+ const t = Je(() => `${so}-${e}`, [e]), o = Je(
233
233
  () => ({
234
234
  conversationId: null,
235
235
  userId: null,
@@ -237,10 +237,10 @@ function Qe({ appId: t }) {
237
237
  messages: []
238
238
  }),
239
239
  []
240
- ), r = v(() => {
240
+ ), r = w(() => {
241
241
  try {
242
- if (!_e) return o;
243
- const a = localStorage.getItem(e);
242
+ if (!Ce) return o;
243
+ const a = localStorage.getItem(t);
244
244
  return a ? JSON.parse(a) : o;
245
245
  } catch (a) {
246
246
  return console.error(
@@ -248,37 +248,37 @@ function Qe({ appId: t }) {
248
248
  a
249
249
  ), o;
250
250
  }
251
- }, [e, o]), n = v(() => {
251
+ }, [t, o]), n = w(() => {
252
252
  try {
253
253
  const a = r();
254
- return a.lastActivity ? Date.now() - a.lastActivity > oo : !0;
254
+ return a.lastActivity ? Date.now() - a.lastActivity > lo : !0;
255
255
  } catch (a) {
256
256
  return console.error("Error checking conversation expiration:", a), !0;
257
257
  }
258
- }, [r]), i = v(
259
- (a, l, h, u, p) => {
258
+ }, [r]), i = w(
259
+ (a, l, u, p, h) => {
260
260
  try {
261
- if (!_e) return;
261
+ if (!Ce) return;
262
262
  const f = {
263
263
  conversationId: a,
264
264
  userId: l,
265
- deviceId: u,
266
- messages: ro(h),
265
+ deviceId: p,
266
+ messages: co(u),
267
267
  lastActivity: Date.now(),
268
- chatToken: p
268
+ chatToken: h
269
269
  };
270
- localStorage.setItem(e, JSON.stringify(f));
270
+ localStorage.setItem(t, JSON.stringify(f));
271
271
  } catch (f) {
272
272
  console.error("Error saving conversation data to localStorage:", f);
273
273
  }
274
274
  },
275
- [e]
276
- ), d = v(() => {
275
+ [t]
276
+ ), c = w(() => {
277
277
  try {
278
- if (!_e) return;
278
+ if (!Ce) return;
279
279
  const a = r();
280
280
  localStorage.setItem(
281
- e,
281
+ t,
282
282
  JSON.stringify({ ...a, isChatClosed: !0 })
283
283
  );
284
284
  } catch (a) {
@@ -287,14 +287,14 @@ function Qe({ appId: t }) {
287
287
  a
288
288
  );
289
289
  }
290
- }, [e, r]), s = v(() => {
290
+ }, [t, r]), s = w(() => {
291
291
  try {
292
- if (!_e) return;
293
- const a = localStorage.getItem(e);
292
+ if (!Ce) return;
293
+ const a = localStorage.getItem(t);
294
294
  if (a) {
295
295
  const l = JSON.parse(a);
296
296
  localStorage.setItem(
297
- e,
297
+ t,
298
298
  JSON.stringify({
299
299
  ...o,
300
300
  deviceId: l.deviceId,
@@ -308,128 +308,128 @@ function Qe({ appId: t }) {
308
308
  a
309
309
  );
310
310
  }
311
- }, [e, o]), c = v(() => {
311
+ }, [t, o]), d = w(() => {
312
312
  try {
313
- if (!_e) return;
313
+ if (!Ce) return;
314
314
  const a = r();
315
- a.conversationId && (a.lastActivity = Date.now(), localStorage.setItem(e, JSON.stringify(a)));
315
+ a.conversationId && (a.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(a)));
316
316
  } catch (a) {
317
317
  console.error("Error updating last activity timestamp:", a);
318
318
  }
319
- }, [r, e]);
319
+ }, [r, t]);
320
320
  return {
321
321
  isChatExpired: n,
322
322
  saveChatData: i,
323
323
  clearChatData: s,
324
324
  getSavedChatData: r,
325
- updateLastActivity: c,
326
- markChatClosed: d
325
+ updateLastActivity: d,
326
+ markChatClosed: c
327
327
  };
328
328
  }
329
- function ro(t) {
330
- return t.flatMap((e) => {
331
- if (!e.attachments) return [e];
332
- const o = e.attachments.filter((r) => zt(r.url)).map(({ url: r, mimeType: n, name: i }) => ({ url: r, mimeType: n, name: i }));
333
- return o.length > 0 ? [{ ...e, attachments: o }] : e.content ? [{ ...e, attachments: void 0 }] : [];
329
+ function co(e) {
330
+ return e.flatMap((t) => {
331
+ if (!t.attachments) return [t];
332
+ const o = t.attachments.filter((r) => At(r.url)).map(({ url: r, mimeType: n, name: i }) => ({ url: r, mimeType: n, name: i }));
333
+ return o.length > 0 ? [{ ...t, attachments: o }] : t.content ? [{ ...t, attachments: void 0 }] : [];
334
334
  });
335
335
  }
336
- const no = "aws-appsync-event-ws", ao = 15e3, io = 3e5, so = 5e3, lo = 1;
337
- function co(t) {
338
- const e = new URL(t);
339
- return /\.appsync-api\.[\w-]+\.amazonaws\.com(\.cn)?$/.test(e.hostname) && (e.hostname = e.hostname.replace(
336
+ const uo = "aws-appsync-event-ws", po = 15e3, ho = 3e5, fo = 5e3, go = 1;
337
+ function mo(e) {
338
+ const t = new URL(e);
339
+ return /\.appsync-api\.[\w-]+\.amazonaws\.com(\.cn)?$/.test(t.hostname) && (t.hostname = t.hostname.replace(
340
340
  ".appsync-api.",
341
341
  ".appsync-realtime-api."
342
- )), e.protocol = "wss:", e.pathname = `${e.pathname.replace(/\/$/, "")}/realtime`, e.toString();
342
+ )), t.protocol = "wss:", t.pathname = `${t.pathname.replace(/\/$/, "")}/realtime`, t.toString();
343
343
  }
344
- function uo(t, e) {
345
- const o = new URL(t).host;
346
- return "authorizationToken" in e ? { Authorization: e.authorizationToken, host: o } : { "x-api-key": e.apiKey, host: o };
344
+ function bo(e, t) {
345
+ const o = new URL(e).host;
346
+ return "authorizationToken" in t ? { Authorization: t.authorizationToken, host: o } : { "x-api-key": t.apiKey, host: o };
347
347
  }
348
- function ho(t) {
349
- return `header-${btoa(JSON.stringify(t)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")}`;
348
+ function vo(e) {
349
+ return `header-${btoa(JSON.stringify(e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")}`;
350
350
  }
351
- function Ke(t) {
352
- return !t || t.length === 0 ? "unknown error" : t.map((e) => `${e.errorType ?? "Error"}: ${e.message ?? ""}`).join("; ");
351
+ function Ve(e) {
352
+ return !e || e.length === 0 ? "unknown error" : e.map((t) => `${t.errorType ?? "Error"}: ${t.message ?? ""}`).join("; ");
353
353
  }
354
- function po(t) {
354
+ function wo(e) {
355
355
  const {
356
- httpEndpoint: e,
356
+ httpEndpoint: t,
357
357
  auth: o,
358
358
  channel: r,
359
359
  onEvent: n,
360
360
  onDisconnect: i,
361
- createWebSocket: d = (l, h) => new WebSocket(l, h)
362
- } = t, s = uo(e, o), c = co(e), a = crypto.randomUUID();
363
- return new Promise((l, h) => {
364
- let u;
361
+ createWebSocket: c = (l, u) => new WebSocket(l, u)
362
+ } = e, s = bo(t, o), d = mo(t), a = crypto.randomUUID();
363
+ return new Promise((l, u) => {
364
+ let p;
365
365
  try {
366
- u = d(c, [
367
- no,
368
- ho(s)
366
+ p = c(d, [
367
+ uo,
368
+ vo(s)
369
369
  ]);
370
- } catch (w) {
371
- h(w instanceof Error ? w : new Error(String(w)));
370
+ } catch (m) {
371
+ u(m instanceof Error ? m : new Error(String(m)));
372
372
  return;
373
373
  }
374
- let p = "connecting", f = !1, g = io, k = Date.now(), b = null, I = null;
374
+ let h = "connecting", f = !1, g = ho, k = Date.now(), q = null, I = null;
375
375
  const j = () => {
376
- b && (clearTimeout(b), b = null), I && (clearInterval(I), I = null);
377
- }, C = (w) => {
378
- if (p === "closed") return;
379
- const y = p === "established";
380
- p = "closed", j();
376
+ q && (clearTimeout(q), q = null), I && (clearInterval(I), I = null);
377
+ }, S = (m) => {
378
+ if (h === "closed") return;
379
+ const y = h === "established";
380
+ h = "closed", j();
381
381
  try {
382
- u.close();
382
+ p.close();
383
383
  } catch {
384
384
  }
385
- f || (y ? i(w) : h(new Error(w)));
386
- }, z = (w) => {
387
- u.readyState === lo && u.send(JSON.stringify(w));
388
- }, E = (w) => {
389
- b && clearTimeout(b), b = setTimeout(() => {
390
- C(`Timed out waiting for ${w}`);
391
- }, ao);
385
+ f || (y ? i(m) : u(new Error(m)));
386
+ }, $ = (m) => {
387
+ p.readyState === go && p.send(JSON.stringify(m));
388
+ }, R = (m) => {
389
+ q && clearTimeout(q), q = setTimeout(() => {
390
+ S(`Timed out waiting for ${m}`);
391
+ }, po);
392
392
  };
393
- u.addEventListener("open", () => {
394
- p !== "closed" && (z({ type: "connection_init" }), E("connection_ack"));
395
- }), u.addEventListener("message", (w) => {
396
- if (p === "closed") return;
393
+ p.addEventListener("open", () => {
394
+ h !== "closed" && ($({ type: "connection_init" }), R("connection_ack"));
395
+ }), p.addEventListener("message", (m) => {
396
+ if (h === "closed") return;
397
397
  let y;
398
398
  try {
399
- y = JSON.parse(String(w.data));
399
+ y = JSON.parse(String(m.data));
400
400
  } catch {
401
401
  console.warn("[EloquentChatSDK] Unparseable realtime frame ignored");
402
402
  return;
403
403
  }
404
404
  switch (y.type) {
405
405
  case "connection_ack": {
406
- if (p !== "connecting") return;
407
- p = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), z({
406
+ if (h !== "connecting") return;
407
+ h = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), $({
408
408
  type: "subscribe",
409
409
  id: a,
410
410
  channel: r,
411
411
  authorization: s
412
- }), E("subscribe_success");
412
+ }), R("subscribe_success");
413
413
  return;
414
414
  }
415
415
  case "connection_error": {
416
- C(`Connection error: ${Ke(y.errors)}`);
416
+ S(`Connection error: ${Ve(y.errors)}`);
417
417
  return;
418
418
  }
419
419
  case "subscribe_success": {
420
- if (p !== "subscribing" || y.id !== a) return;
421
- p = "established", b && (clearTimeout(b), b = null), k = Date.now(), I = setInterval(() => {
422
- Date.now() - k > g && C("Keep-alive timeout");
423
- }, so), l({
420
+ if (h !== "subscribing" || y.id !== a) return;
421
+ h = "established", q && (clearTimeout(q), q = null), k = Date.now(), I = setInterval(() => {
422
+ Date.now() - k > g && S("Keep-alive timeout");
423
+ }, fo), l({
424
424
  close: () => {
425
- f = !0, z({ type: "unsubscribe", id: a }), C("Closed by client");
425
+ f = !0, $({ type: "unsubscribe", id: a }), S("Closed by client");
426
426
  }
427
427
  });
428
428
  return;
429
429
  }
430
430
  case "subscribe_error": {
431
431
  if (y.id !== a) return;
432
- C(`Subscribe error: ${Ke(y.errors)}`);
432
+ S(`Subscribe error: ${Ve(y.errors)}`);
433
433
  return;
434
434
  }
435
435
  case "ka": {
@@ -439,309 +439,309 @@ function po(t) {
439
439
  case "data": {
440
440
  if (y.id !== a) return;
441
441
  k = Date.now();
442
- let M = y.event;
443
- if (typeof M == "string")
442
+ let P = y.event;
443
+ if (typeof P == "string")
444
444
  try {
445
- M = JSON.parse(M);
445
+ P = JSON.parse(P);
446
446
  } catch {
447
447
  console.warn(
448
448
  "[EloquentChatSDK] Unparseable realtime event ignored"
449
449
  );
450
450
  return;
451
451
  }
452
- n(M);
452
+ n(P);
453
453
  return;
454
454
  }
455
455
  case "broadcast_error": {
456
456
  console.warn(
457
457
  "[EloquentChatSDK] Realtime broadcast error:",
458
- Ke(y.errors)
458
+ Ve(y.errors)
459
459
  );
460
460
  return;
461
461
  }
462
462
  default:
463
463
  return;
464
464
  }
465
- }), u.addEventListener("close", () => {
466
- C("WebSocket closed");
467
- }), u.addEventListener("error", () => {
468
- C("WebSocket error");
465
+ }), p.addEventListener("close", () => {
466
+ S("WebSocket closed");
467
+ }), p.addEventListener("error", () => {
468
+ S("WebSocket error");
469
469
  });
470
470
  });
471
471
  }
472
- function fo(t, e) {
473
- return typeof e == "bigint" ? e.toString() : e;
472
+ function qo(e, t) {
473
+ return typeof t == "bigint" ? t.toString() : t;
474
474
  }
475
- class go {
476
- constructor(e) {
477
- this._getter = e, this._value = void 0;
475
+ class yo {
476
+ constructor(t) {
477
+ this._getter = t, this._value = void 0;
478
478
  }
479
479
  get value() {
480
- const e = this._getter;
481
- return e !== void 0 && (this._value = e(), this._getter = void 0), this._value;
480
+ const t = this._getter;
481
+ return t !== void 0 && (this._value = t(), this._getter = void 0), this._value;
482
482
  }
483
483
  }
484
- function mo(t) {
485
- return new go(t);
484
+ function xo(e) {
485
+ return new yo(e);
486
486
  }
487
- function mt(t) {
488
- const e = t.startsWith("^") ? 1 : 0, o = t.endsWith("$") ? t.length - 1 : t.length;
489
- return t.slice(e, o);
487
+ function yt(e) {
488
+ const t = e.startsWith("^") ? 1 : 0, o = e.endsWith("$") ? e.length - 1 : e.length;
489
+ return e.slice(t, o);
490
490
  }
491
- function bo(t, e, o) {
492
- Object.defineProperty(t, e, {
491
+ function ko(e, t, o) {
492
+ Object.defineProperty(e, t, {
493
493
  value: o,
494
494
  writable: !0,
495
495
  enumerable: !0,
496
496
  configurable: !0
497
497
  });
498
498
  }
499
- const bt = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
499
+ const xt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
500
500
  };
501
- function Ge(t) {
502
- return typeof t == "object" && t !== null && !Array.isArray(t);
501
+ function Ye(e) {
502
+ return typeof e == "object" && e !== null && !Array.isArray(e);
503
503
  }
504
- function vo(t) {
505
- if (Ge(t) === !1)
504
+ function _o(e) {
505
+ if (Ye(e) === !1)
506
506
  return !1;
507
- const e = t.constructor;
508
- if (e === void 0 || typeof e != "function")
507
+ const t = e.constructor;
508
+ if (t === void 0 || typeof t != "function")
509
509
  return !0;
510
- const o = e.prototype;
511
- return !(Ge(o) === !1 || Object.prototype.hasOwnProperty.call(o, "isPrototypeOf") === !1);
510
+ const o = t.prototype;
511
+ return !(Ye(o) === !1 || Object.prototype.hasOwnProperty.call(o, "isPrototypeOf") === !1);
512
512
  }
513
- function st(t) {
514
- return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
513
+ function ct(e) {
514
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
515
515
  }
516
- function wo(t, e, o) {
517
- const r = new t._zod.constr(e ?? t._zod.def);
518
- return (!e || o?.parent) && (r._zod.parent = t), r;
516
+ function Co(e, t, o) {
517
+ const r = new e._zod.constr(t ?? e._zod.def);
518
+ return (!t || o?.parent) && (r._zod.parent = e), r;
519
519
  }
520
- function ve(t) {
521
- const e = t;
522
- if (!e)
520
+ function ye(e) {
521
+ const t = e;
522
+ if (!t)
523
523
  return {};
524
- if (typeof e == "string")
525
- return { error: () => e };
526
- if (e?.message !== void 0) {
527
- if (e?.error !== void 0)
524
+ if (typeof t == "string")
525
+ return { error: () => t };
526
+ if (t?.message !== void 0) {
527
+ if (t?.error !== void 0)
528
528
  throw new Error("Cannot specify both `message` and `error` params");
529
- e.error = e.message;
529
+ t.error = t.message;
530
530
  }
531
- return delete e.message, typeof e.error == "string" ? { ...e, error: () => e.error } : e;
531
+ return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
532
532
  }
533
- function qo(t) {
534
- return Object.keys(t).filter((e) => t[e]._zod.optin !== void 0 && t[e]._zod.optout === "optional");
533
+ function So(e) {
534
+ return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
535
535
  }
536
- function be(t, e = 0) {
537
- if (t.aborted === !0)
536
+ function qe(e, t = 0) {
537
+ if (e.aborted === !0)
538
538
  return !0;
539
- for (let o = e; o < t.issues.length; o++)
540
- if (t.issues[o]?.continue !== !0)
539
+ for (let o = t; o < e.issues.length; o++)
540
+ if (e.issues[o]?.continue !== !0)
541
541
  return !0;
542
542
  return !1;
543
543
  }
544
- function yo(t, e = 0) {
545
- if (t.aborted === !0)
544
+ function Io(e, t = 0) {
545
+ if (e.aborted === !0)
546
546
  return !0;
547
- for (let o = e; o < t.issues.length; o++)
548
- if (t.issues[o]?.continue === !1)
547
+ for (let o = t; o < e.issues.length; o++)
548
+ if (e.issues[o]?.continue === !1)
549
549
  return !0;
550
550
  return !1;
551
551
  }
552
- function Se(t, e) {
553
- return e.map((o) => {
552
+ function Ie(e, t) {
553
+ return t.map((o) => {
554
554
  var r;
555
- return (r = o).path ?? (r.path = []), o.path.unshift(t), o;
555
+ return (r = o).path ?? (r.path = []), o.path.unshift(e), o;
556
556
  });
557
557
  }
558
- function Ce(t) {
559
- return typeof t == "string" ? t : t?.message;
558
+ function Se(e) {
559
+ return typeof e == "string" ? e : e?.message;
560
560
  }
561
- function lt(t, e, o) {
561
+ function dt(e, t, o) {
562
562
  var r;
563
- for (let n = e; n < t.length; n++)
564
- (r = t[n]).schema ?? (r.schema = o);
563
+ for (let n = t; n < e.length; n++)
564
+ (r = e[n]).schema ?? (r.schema = o);
565
565
  }
566
- function we(t, e, o) {
566
+ function xe(e, t, o) {
567
567
  var r;
568
- const n = t.inst?._zod?.traits;
569
- n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = t).schema ?? (r.schema = t.inst) : t.schema = t.inst);
570
- const i = t.schema !== t.inst ? t.schema?._zod.def?.error : void 0, d = t.message ? t.message : Ce(t.inst?._zod.def?.error?.(t)) ?? Ce(i?.(t)) ?? Ce(e?.error?.(t)) ?? Ce(o.customError?.(t)) ?? Ce(o.localeError?.(t)) ?? "Invalid input", s = {};
571
- for (const c of Object.keys(t))
572
- c === "inst" || c === "schema" || c === "continue" || c === "input" || c === "__proto__" || (s[c] = t[c]);
573
- return s.path ?? (s.path = []), s.message = d, e?.reportInput && (s.input = t.input), s;
574
- }
575
- function xo(t, e) {
576
- for (const o in e) {
577
- const r = Object.getOwnPropertyDescriptor(e, o);
578
- r.get ? Object.defineProperty(t, o, { ...r, enumerable: !1 }) : _o(t, o, r.value);
568
+ const n = e.inst?._zod?.traits;
569
+ n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
570
+ const i = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, c = e.message ? e.message : Se(e.inst?._zod.def?.error?.(e)) ?? Se(i?.(e)) ?? Se(t?.error?.(e)) ?? Se(o.customError?.(e)) ?? Se(o.localeError?.(e)) ?? "Invalid input", s = {};
571
+ for (const d of Object.keys(e))
572
+ d === "inst" || d === "schema" || d === "continue" || d === "input" || d === "__proto__" || (s[d] = e[d]);
573
+ return s.path ?? (s.path = []), s.message = c, t?.reportInput && (s.input = e.input), s;
574
+ }
575
+ function Eo(e, t) {
576
+ for (const o in t) {
577
+ const r = Object.getOwnPropertyDescriptor(t, o);
578
+ r.get ? Object.defineProperty(e, o, { ...r, enumerable: !1 }) : Ro(e, o, r.value);
579
579
  }
580
580
  }
581
- function Ee(t, e, o, r = !0) {
582
- return Object.defineProperty(t, e, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
581
+ function Re(e, t, o, r = !0) {
582
+ return Object.defineProperty(e, t, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
583
583
  }
584
- function ko(t, e, o) {
585
- return Ee(t, e, o, !1);
584
+ function zo(e, t, o) {
585
+ return Re(e, t, o, !1);
586
586
  }
587
- function _o(t, e, o) {
588
- Object.defineProperty(t, e, {
587
+ function Ro(e, t, o) {
588
+ Object.defineProperty(e, t, {
589
589
  configurable: !0,
590
590
  get() {
591
- return this == null ? o : Ee(this, e, o.bind(this));
591
+ return this == null ? o : Re(this, t, o.bind(this));
592
592
  },
593
593
  set(r) {
594
- Ee(this, e, r);
594
+ Re(this, t, r);
595
595
  }
596
596
  });
597
597
  }
598
- function Co(t, e) {
599
- const o = Object.getPrototypeOf(t);
600
- return e in o ? void 0 : o;
598
+ function To(e, t) {
599
+ const o = Object.getPrototypeOf(e);
600
+ return t in o ? void 0 : o;
601
601
  }
602
- let He, pe = !1;
603
- const So = {
602
+ let He, be = !1;
603
+ const Mo = {
604
604
  configurable: !0,
605
605
  get() {
606
- pe = !0;
606
+ be = !0;
607
607
  }
608
608
  };
609
- function he(t, e, o) {
610
- const r = Object.getPrototypeOf(t._zod);
611
- if (e in r && He !== t._zod) {
609
+ function de(e, t, o) {
610
+ const r = Object.getPrototypeOf(e._zod);
611
+ if (t in r && He !== e._zod) {
612
612
  He = void 0;
613
613
  return;
614
614
  }
615
- He = t._zod, Object.defineProperty(r, e, {
615
+ He = e._zod, Object.defineProperty(r, t, {
616
616
  configurable: !0,
617
617
  get() {
618
- Object.defineProperty(this, e, So);
619
- const n = pe;
620
- pe = !1;
618
+ Object.defineProperty(this, t, Mo);
619
+ const n = be;
620
+ be = !1;
621
621
  try {
622
622
  const i = o(this);
623
- return pe ? delete this[e] : Object.defineProperty(this, e, { configurable: !0, writable: !0, value: i }), pe = pe || n, i;
623
+ return be ? delete this[t] : Object.defineProperty(this, t, { configurable: !0, writable: !0, value: i }), be = be || n, i;
624
624
  } catch (i) {
625
- throw delete this[e], pe = pe || n, i;
625
+ throw delete this[t], be = be || n, i;
626
626
  }
627
627
  },
628
628
  set(n) {
629
- Object.defineProperty(this, e, { configurable: !0, writable: !0, value: n });
629
+ Object.defineProperty(this, t, { configurable: !0, writable: !0, value: n });
630
630
  }
631
631
  });
632
632
  }
633
- function Io(t, e, o, r) {
634
- const n = Co(t, e);
635
- n && Object.defineProperty(n, e, {
633
+ function Po(e, t, o, r) {
634
+ const n = To(e, t);
635
+ n && Object.defineProperty(n, t, {
636
636
  configurable: !0,
637
637
  get() {
638
638
  const i = { configurable: !0, writable: !0, enumerable: r, value: void 0 };
639
- return Object.defineProperty(this, e, i), i.value = o(this), Object.defineProperty(this, e, i), i.value;
639
+ return Object.defineProperty(this, t, i), i.value = o(this), Object.defineProperty(this, t, i), i.value;
640
640
  },
641
641
  set(i) {
642
- Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: r, value: i });
642
+ Object.defineProperty(this, t, { configurable: !0, writable: !0, enumerable: r, value: i });
643
643
  }
644
644
  });
645
645
  }
646
- var ct;
647
- const Ve = { value: void 0, enumerable: !1 };
648
- let dt = "captureStackTrace" in Error ? Error : null;
649
- function zo(t) {
650
- const e = dt;
651
- if (e) {
652
- const o = e.stackTraceLimit;
646
+ var ut;
647
+ const We = { value: void 0, enumerable: !1 };
648
+ let pt = "captureStackTrace" in Error ? Error : null;
649
+ function Ao(e) {
650
+ const t = pt;
651
+ if (t) {
652
+ const o = t.stackTraceLimit;
653
653
  if (typeof o == "number") {
654
654
  try {
655
- e.stackTraceLimit = 0;
655
+ t.stackTraceLimit = 0;
656
656
  } catch {
657
- return dt = null, new t();
657
+ return pt = null, new e();
658
658
  }
659
659
  try {
660
- return new t();
660
+ return new e();
661
661
  } finally {
662
- e.stackTraceLimit = o;
662
+ t.stackTraceLimit = o;
663
663
  }
664
664
  }
665
665
  }
666
- return new t();
666
+ return new e();
667
667
  }
668
- function H(t, e, o, r) {
668
+ function F(e, t, o, r) {
669
669
  const n = {};
670
- function i(u) {
671
- this.def = u, this.constr = h, this.traits = /* @__PURE__ */ new Set();
670
+ function i(p) {
671
+ this.def = p, this.constr = u, this.traits = /* @__PURE__ */ new Set();
672
672
  }
673
673
  i.prototype = n;
674
- const d = o, s = d && /* @__PURE__ */ new WeakSet();
675
- function c(u, p) {
676
- if (u._zod) {
677
- if (u._zod.traits.has(t))
674
+ const c = o, s = c && /* @__PURE__ */ new WeakSet();
675
+ function d(p, h) {
676
+ if (p._zod) {
677
+ if (p._zod.traits.has(e))
678
678
  return;
679
679
  } else {
680
- Ve.value = new i(p);
680
+ We.value = new i(h);
681
681
  try {
682
- Object.defineProperty(u, "_zod", Ve);
682
+ Object.defineProperty(p, "_zod", We);
683
683
  } finally {
684
- Ve.value = void 0;
684
+ We.value = void 0;
685
685
  }
686
686
  }
687
- if (u._zod.traits.add(t), e(u, p), s) {
688
- const g = Object.getPrototypeOf(u), k = u._zod.constr.prototype;
689
- let b = g;
690
- for (; b && b !== k; )
691
- b = Object.getPrototypeOf(b);
692
- const I = b ?? g;
693
- s.has(I) || (s.add(I), xo(I, d));
687
+ if (p._zod.traits.add(e), t(p, h), s) {
688
+ const g = Object.getPrototypeOf(p), k = p._zod.constr.prototype;
689
+ let q = g;
690
+ for (; q && q !== k; )
691
+ q = Object.getPrototypeOf(q);
692
+ const I = q ?? g;
693
+ s.has(I) || (s.add(I), Eo(I, c));
694
694
  }
695
- const f = h.prototype;
695
+ const f = u.prototype;
696
696
  for (const g in f)
697
- Object.prototype.hasOwnProperty.call(f, g) && (g in u || (u[g] = f[g].bind(u)));
697
+ Object.prototype.hasOwnProperty.call(f, g) && (g in p || (p[g] = f[g].bind(p)));
698
698
  }
699
699
  const a = r?.Parent ?? Object;
700
700
  class l extends a {
701
701
  }
702
- Object.defineProperty(l, "name", { value: t });
703
- function h(u) {
704
- const p = r?.Parent ? zo(l) : this;
705
- c(p, u);
706
- const f = p._zod.deferred;
702
+ Object.defineProperty(l, "name", { value: e });
703
+ function u(p) {
704
+ const h = r?.Parent ? Ao(l) : this;
705
+ d(h, p);
706
+ const f = h._zod.deferred;
707
707
  if (f) {
708
708
  for (const k of f)
709
709
  k();
710
- p._zod.deferred = void 0;
710
+ h._zod.deferred = void 0;
711
711
  }
712
712
  const g = globalThis.__zod_globalConfig?.postProcessor;
713
- return g && g(p), p;
713
+ return g && g(h), h;
714
714
  }
715
- return Object.defineProperty(h, "init", { value: c }), Object.defineProperty(h, Symbol.hasInstance, {
716
- value: (u) => r?.Parent && u instanceof r.Parent ? !0 : u?._zod?.traits?.has(t)
717
- }), Object.defineProperty(h, "name", { value: t }), h;
715
+ return Object.defineProperty(u, "init", { value: d }), Object.defineProperty(u, Symbol.hasInstance, {
716
+ value: (p) => r?.Parent && p instanceof r.Parent ? !0 : p?._zod?.traits?.has(e)
717
+ }), Object.defineProperty(u, "name", { value: e }), u;
718
718
  }
719
- class Ie extends Error {
719
+ class Ee extends Error {
720
720
  constructor() {
721
721
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
722
722
  }
723
723
  }
724
- (ct = globalThis).__zod_globalConfig ?? (ct.__zod_globalConfig = {});
725
- const Ae = globalThis.__zod_globalConfig;
726
- function fe(t) {
727
- return t && Object.assign(Ae, t), Ae;
724
+ (ut = globalThis).__zod_globalConfig ?? (ut.__zod_globalConfig = {});
725
+ const Ue = globalThis.__zod_globalConfig;
726
+ function ve(e) {
727
+ return e && Object.assign(Ue, e), Ue;
728
728
  }
729
- function Eo() {
730
- const t = this._zod;
731
- return t.message ?? (t.message = JSON.stringify(t.def, fo, 2)), t.message;
729
+ function Oo() {
730
+ const e = this._zod;
731
+ return e.message ?? (e.message = JSON.stringify(e.def, qo, 2)), e.message;
732
732
  }
733
- function Ro(t) {
734
- this._zod.message = t;
733
+ function Uo(e) {
734
+ this._zod.message = e;
735
735
  }
736
- const Po = {
737
- get: Eo,
738
- set: Ro,
736
+ const jo = {
737
+ get: Oo,
738
+ set: Uo,
739
739
  enumerable: !0,
740
740
  configurable: !0
741
- }, We = { value: void 0, enumerable: !1 }, ut = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), To = (t, e) => {
742
- t.name = "$ZodError", We.value = e, Object.defineProperty(t, "issues", We), We.value = void 0, Object.defineProperty(t, "message", Po);
743
- const o = Object.getPrototypeOf(t);
744
- ut.has(o) || (ut.add(o), Object.defineProperty(o, "toString", {
741
+ }, Fe = { value: void 0, enumerable: !1 }, ht = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Do = (e, t) => {
742
+ e.name = "$ZodError", Fe.value = t, Object.defineProperty(e, "issues", Fe), Fe.value = void 0, Object.defineProperty(e, "message", jo);
743
+ const o = Object.getPrototypeOf(e);
744
+ ht.has(o) || (ht.add(o), Object.defineProperty(o, "toString", {
745
745
  configurable: !0,
746
746
  enumerable: !1,
747
747
  get() {
@@ -752,152 +752,152 @@ const Po = {
752
752
  Object.defineProperty(this, "toString", { value: r, configurable: !0, writable: !0 });
753
753
  }
754
754
  }));
755
- }, De = H("$ZodError", To, void 0, {
755
+ }, $e = F("$ZodError", Do, void 0, {
756
756
  Parent: Error
757
- }), Mo = (t) => {
758
- const e = (o, r, n, i) => {
759
- const d = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, d);
757
+ }), $o = (e) => {
758
+ const t = (o, r, n, i) => {
759
+ const c = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, c);
760
760
  if (s instanceof Promise)
761
- throw new Ie();
761
+ throw new Ee();
762
762
  if (s.issues.length) {
763
- const c = new (i?.Err ?? t)(s.issues.map((a) => we(a, d, fe())));
764
- throw bt(c, i?.callee ?? e), c;
763
+ const d = new (i?.Err ?? e)(s.issues.map((a) => xe(a, c, ve())));
764
+ throw xt(d, i?.callee ?? t), d;
765
765
  }
766
766
  return s.value;
767
767
  };
768
- return e;
769
- }, Oo = /* @__PURE__ */ Mo(De), Ao = (t) => {
770
- const e = async (o, r, n, i) => {
771
- const d = n ? { ...n, async: !0 } : { async: !0 };
772
- let s = o._zod.run({ value: r, issues: [] }, d);
768
+ return t;
769
+ }, Bo = /* @__PURE__ */ $o($e), Lo = (e) => {
770
+ const t = async (o, r, n, i) => {
771
+ const c = n ? { ...n, async: !0 } : { async: !0 };
772
+ let s = o._zod.run({ value: r, issues: [] }, c);
773
773
  if (s instanceof Promise && (s = await s), s.issues.length) {
774
- const c = new (i?.Err ?? t)(s.issues.map((a) => we(a, d, fe())));
775
- throw bt(c, i?.callee ?? e), c;
774
+ const d = new (i?.Err ?? e)(s.issues.map((a) => xe(a, c, ve())));
775
+ throw xt(d, i?.callee ?? t), d;
776
776
  }
777
777
  return s.value;
778
778
  };
779
- return e;
780
- }, Uo = /* @__PURE__ */ Ao(De), jo = (t) => (e, o, r) => {
781
- const n = r ? { ...r, async: !1 } : { async: !1 }, i = e._zod.run({ value: o, issues: [] }, n);
779
+ return t;
780
+ }, No = /* @__PURE__ */ Lo($e), Zo = (e) => (t, o, r) => {
781
+ const n = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: o, issues: [] }, n);
782
782
  if (i instanceof Promise)
783
- throw new Ie();
784
- return i.issues.length ? vt(t, i.issues, n) : { success: !0, data: i.value };
785
- }, Do = /* @__PURE__ */ jo(De);
786
- function vt(t, e, o) {
783
+ throw new Ee();
784
+ return i.issues.length ? kt(e, i.issues, n) : { success: !0, data: i.value };
785
+ }, Ko = /* @__PURE__ */ Zo($e);
786
+ function kt(e, t, o) {
787
787
  let r;
788
788
  return {
789
789
  success: !1,
790
790
  get error() {
791
- return r || (r = new t(e.map((n) => we(n, o, fe()))), e = void 0, o = void 0), r;
791
+ return r || (r = new e(t.map((n) => xe(n, o, ve()))), t = void 0, o = void 0), r;
792
792
  },
793
793
  set error(n) {
794
- r = n, e = void 0, o = void 0;
794
+ r = n, t = void 0, o = void 0;
795
795
  }
796
796
  };
797
797
  }
798
- const $o = (t) => async (e, o, r) => {
798
+ const Vo = (e) => async (t, o, r) => {
799
799
  const n = r ? { ...r, async: !0 } : { async: !0 };
800
- let i = e._zod.run({ value: o, issues: [] }, n);
801
- return i instanceof Promise && (i = await i), i.issues.length ? vt(t, i.issues, n) : { success: !0, data: i.value };
802
- }, Bo = /* @__PURE__ */ $o(De), No = /^[\s\S]{0,}$/, Lo = /^-?\d+(?:\.\d+)?$/, Zo = /^null$/i, Ko = {
800
+ let i = t._zod.run({ value: o, issues: [] }, n);
801
+ return i instanceof Promise && (i = await i), i.issues.length ? kt(e, i.issues, n) : { success: !0, data: i.value };
802
+ }, Ho = /* @__PURE__ */ Vo($e), Wo = /^[\s\S]{0,}$/, Fo = /^-?\d+(?:\.\d+)?$/, Jo = /^null$/i, Go = {
803
803
  major: 4,
804
804
  minor: 6,
805
805
  patch: 7
806
- }, ge = /* @__PURE__ */ H("$ZodType", (t, e) => {
806
+ }, we = /* @__PURE__ */ F("$ZodType", (e, t) => {
807
807
  var o;
808
- t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = Ko;
809
- const r = t._zod.def.checks, n = t._zod.traits.has("$ZodCheck") ? [t, ...r ?? []] : r?.length ? [...r] : [];
808
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Go;
809
+ const r = e._zod.def.checks, n = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
810
810
  for (const i of n)
811
- for (const d of i._zod.onattach)
812
- d(t);
811
+ for (const c of i._zod.onattach)
812
+ c(e);
813
813
  if (n.length === 0)
814
- (o = t._zod).deferred ?? (o.deferred = []), t._zod.deferred?.push(() => {
815
- t._zod.run = t._zod.parse;
814
+ (o = e._zod).deferred ?? (o.deferred = []), e._zod.deferred?.push(() => {
815
+ e._zod.run = e._zod.parse;
816
816
  });
817
817
  else {
818
- const i = (s, c, a) => {
818
+ const i = (s, d, a) => {
819
819
  if (s.memo)
820
820
  return s;
821
- let l = be(s), h;
822
- for (const u of c) {
823
- if (u._zod.def.when) {
824
- if (yo(s) || !u._zod.def.when(s))
821
+ let l = qe(s), u;
822
+ for (const p of d) {
823
+ if (p._zod.def.when) {
824
+ if (Io(s) || !p._zod.def.when(s))
825
825
  continue;
826
826
  } else if (l)
827
827
  continue;
828
- const p = s.issues.length, f = u._zod.check(s);
828
+ const h = s.issues.length, f = p._zod.check(s);
829
829
  if (f instanceof Promise && a?.async === !1)
830
- throw new Ie();
831
- if (h || f instanceof Promise)
832
- h = (h ?? Promise.resolve()).then(async () => {
833
- await f, s.issues.length !== p && (lt(s.issues, p, t), l || (l = be(s, p)));
830
+ throw new Ee();
831
+ if (u || f instanceof Promise)
832
+ u = (u ?? Promise.resolve()).then(async () => {
833
+ await f, s.issues.length !== h && (dt(s.issues, h, e), l || (l = qe(s, h)));
834
834
  });
835
835
  else {
836
- if (s.issues.length === p)
836
+ if (s.issues.length === h)
837
837
  continue;
838
- lt(s.issues, p, t), l || (l = be(s, p));
838
+ dt(s.issues, h, e), l || (l = qe(s, h));
839
839
  }
840
840
  }
841
- return h ? h.then(() => s) : s;
842
- }, d = (s, c, a) => {
843
- if (be(s))
841
+ return u ? u.then(() => s) : s;
842
+ }, c = (s, d, a) => {
843
+ if (qe(s))
844
844
  return s.aborted = !0, s;
845
- const l = i(c, n, a);
845
+ const l = i(d, n, a);
846
846
  if (l instanceof Promise) {
847
847
  if (a.async === !1)
848
- throw new Ie();
849
- return l.then((h) => t._zod.parse(h, a));
848
+ throw new Ee();
849
+ return l.then((u) => e._zod.parse(u, a));
850
850
  }
851
- return t._zod.parse(l, a);
851
+ return e._zod.parse(l, a);
852
852
  };
853
- t._zod.run = (s, c) => {
854
- if (c.skipChecks)
855
- return t._zod.parse(s, c);
856
- if (c.direction === "backward") {
857
- const l = t._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
858
- return l instanceof Promise ? l.then((h) => d(h, s, c)) : d(l, s, c);
853
+ e._zod.run = (s, d) => {
854
+ if (d.skipChecks)
855
+ return e._zod.parse(s, d);
856
+ if (d.direction === "backward") {
857
+ const l = e._zod.parse({ value: s.value, issues: [] }, { ...d, skipChecks: !0 });
858
+ return l instanceof Promise ? l.then((u) => c(u, s, d)) : c(l, s, d);
859
859
  }
860
- const a = t._zod.parse(s, c);
860
+ const a = e._zod.parse(s, d);
861
861
  if (a instanceof Promise) {
862
- if (c.async === !1)
863
- throw new Ie();
864
- return a.then((l) => i(l, n, c));
862
+ if (d.async === !1)
863
+ throw new Ee();
864
+ return a.then((l) => i(l, n, d));
865
865
  }
866
- return i(a, n, c);
866
+ return i(a, n, d);
867
867
  };
868
868
  }
869
869
  }, {
870
870
  // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
871
871
  get "~standard"() {
872
- return ko(this, "~standard", Vo(this));
872
+ return zo(this, "~standard", Xo(this));
873
873
  },
874
- set "~standard"(t) {
875
- Ee(this, "~standard", t);
874
+ set "~standard"(e) {
875
+ Re(this, "~standard", e);
876
876
  }
877
- }), wt = (t, e) => t.issues.length ? { issues: t.issues.map((o) => we(o, e, fe())) } : { value: t.value };
878
- async function Ho(t, e) {
877
+ }), _t = (e, t) => e.issues.length ? { issues: e.issues.map((o) => xe(o, t, ve())) } : { value: e.value };
878
+ async function Yo(e, t) {
879
879
  const o = { async: !0 };
880
- return wt(await t._zod.run({ value: e, issues: [] }, o), o);
880
+ return _t(await e._zod.run({ value: t, issues: [] }, o), o);
881
881
  }
882
- function Vo(t) {
882
+ function Xo(e) {
883
883
  return {
884
- validate: (e) => {
884
+ validate: (t) => {
885
885
  const o = { async: !1 };
886
886
  try {
887
- const r = t._zod.run({ value: e, issues: [] }, o);
887
+ const r = e._zod.run({ value: t, issues: [] }, o);
888
888
  if (!(r instanceof Promise))
889
- return wt(r, o);
889
+ return _t(r, o);
890
890
  } catch {
891
891
  }
892
- return Ho(t, e);
892
+ return Yo(e, t);
893
893
  },
894
894
  vendor: "zod",
895
895
  version: 1
896
896
  };
897
897
  }
898
- const Wo = /* @__PURE__ */ H("$ZodString", (t, e) => {
899
- ge.init(t, e), t._zod.pattern = e.pattern ?? No, t._zod.parse = (o, r) => {
900
- if (e.coerce)
898
+ const Qo = /* @__PURE__ */ F("$ZodString", (e, t) => {
899
+ we.init(e, t), e._zod.pattern = t.pattern ?? Wo, e._zod.parse = (o, r) => {
900
+ if (t.coerce)
901
901
  try {
902
902
  o.value = String(o.value);
903
903
  } catch {
@@ -906,30 +906,30 @@ const Wo = /* @__PURE__ */ H("$ZodString", (t, e) => {
906
906
  expected: "string",
907
907
  code: "invalid_type",
908
908
  input: o.value,
909
- inst: t
909
+ inst: e
910
910
  }), o;
911
911
  };
912
- }), Fo = /* @__PURE__ */ H("$ZodNull", (t, e) => {
913
- ge.init(t, e), t._zod.pattern = Zo, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (o, r) => {
912
+ }), er = /* @__PURE__ */ F("$ZodNull", (e, t) => {
913
+ we.init(e, t), e._zod.pattern = Jo, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (o, r) => {
914
914
  const n = o.value;
915
915
  return n === null || o.issues.push({
916
916
  expected: "null",
917
917
  code: "invalid_type",
918
918
  input: n,
919
- inst: t
919
+ inst: e
920
920
  }), o;
921
921
  };
922
922
  });
923
- function Ue(t, e, o, r, n, i) {
924
- const d = o in r, s = i === "optional";
925
- if (!(!d && s && n === "optional")) {
926
- if (t.issues.length) {
927
- if (n !== void 0 && s && !d)
923
+ function je(e, t, o, r, n, i) {
924
+ const c = o in r, s = i === "optional";
925
+ if (!(!c && s && n === "optional")) {
926
+ if (e.issues.length) {
927
+ if (n !== void 0 && s && !c)
928
928
  return;
929
- e.issues.push(...Se(o, t.issues));
929
+ t.issues.push(...Ie(o, e.issues));
930
930
  }
931
- if (!d && n === void 0) {
932
- t.issues.length || e.issues.push({
931
+ if (!c && n === void 0) {
932
+ e.issues.length || t.issues.push({
933
933
  code: "invalid_type",
934
934
  expected: "nonoptional",
935
935
  input: void 0,
@@ -937,36 +937,36 @@ function Ue(t, e, o, r, n, i) {
937
937
  });
938
938
  return;
939
939
  }
940
- t.value === void 0 ? (d || n === "defaulted" && !s) && (e.value[o] = void 0) : e.value[o] = t.value;
940
+ e.value === void 0 ? (c || n === "defaulted" && !s) && (t.value[o] = void 0) : t.value[o] = e.value;
941
941
  }
942
942
  }
943
- const Jo = [];
944
- function Go(t) {
945
- const e = Object.keys(t.shape), o = Object.getOwnPropertySymbols(t.shape), r = o.length ? o : Jo, n = r.length ? [...e, ...r] : e;
946
- for (const d of n)
947
- if (!t.shape?.[d]?._zod?.traits?.has("$ZodType"))
948
- throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);
949
- const i = qo(t.shape);
943
+ const tr = [];
944
+ function or(e) {
945
+ const t = Object.keys(e.shape), o = Object.getOwnPropertySymbols(e.shape), r = o.length ? o : tr, n = r.length ? [...t, ...r] : t;
946
+ for (const c of n)
947
+ if (!e.shape?.[c]?._zod?.traits?.has("$ZodType"))
948
+ throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);
949
+ const i = So(e.shape);
950
950
  return {
951
- ...t,
951
+ ...e,
952
952
  allKeys: n,
953
953
  symbolKeys: r,
954
954
  // string-only: handleCatchall matches it against `for...in`, which never yields a symbol
955
- keySet: new Set(e),
956
- numKeys: e.length,
955
+ keySet: new Set(t),
956
+ numKeys: t.length,
957
957
  optionalKeys: new Set(i)
958
958
  };
959
959
  }
960
- function Xo(t, e, o, r, n, i, d) {
961
- const s = [], c = n.keySet, a = n.catchall._zod, l = a.def.type, h = a.optin, u = a.optout;
962
- let p = 0;
963
- for (const f in e) {
964
- if (d && o.issues.length !== p) {
965
- if (be(o, p))
960
+ function rr(e, t, o, r, n, i, c) {
961
+ const s = [], d = n.keySet, a = n.catchall._zod, l = a.def.type, u = a.optin, p = a.optout;
962
+ let h = 0;
963
+ for (const f in t) {
964
+ if (c && o.issues.length !== h) {
965
+ if (qe(o, h))
966
966
  break;
967
- p = o.issues.length;
967
+ h = o.issues.length;
968
968
  }
969
- if (c.has(f))
969
+ if (d.has(f))
970
970
  continue;
971
971
  if (f === "__proto__") {
972
972
  l === "never" && s.push(f);
@@ -976,161 +976,161 @@ function Xo(t, e, o, r, n, i, d) {
976
976
  s.push(f);
977
977
  continue;
978
978
  }
979
- const g = a.run({ value: e[f], issues: [] }, r);
980
- g instanceof Promise ? t.push(g.then((k) => Ue(k, o, f, e, h, u))) : Ue(g, o, f, e, h, u);
979
+ const g = a.run({ value: t[f], issues: [] }, r);
980
+ g instanceof Promise ? e.push(g.then((k) => je(k, o, f, t, u, p))) : je(g, o, f, t, u, p);
981
981
  }
982
982
  return s.length && o.issues.push({
983
983
  code: "unrecognized_keys",
984
984
  keys: s,
985
- input: e,
985
+ input: t,
986
986
  inst: i,
987
987
  // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
988
988
  continue: !0
989
- }), t.length ? Promise.all(t).then(() => o) : o;
989
+ }), e.length ? Promise.all(e).then(() => o) : o;
990
990
  }
991
- const Yo = /* @__PURE__ */ H("$ZodObject", (t, e) => {
992
- ge.init(t, e);
993
- const o = Object.getOwnPropertyDescriptor(e, "shape"), r = o?.get ? o.get.raw : e.shape ?? {};
991
+ const nr = /* @__PURE__ */ F("$ZodObject", (e, t) => {
992
+ we.init(e, t);
993
+ const o = Object.getOwnPropertyDescriptor(t, "shape"), r = o?.get ? o.get.raw : t.shape ?? {};
994
994
  if (r) {
995
995
  const a = () => {
996
996
  const l = { ...r };
997
- return Object.defineProperty(e, "shape", { value: l }), a.raw = l, l;
997
+ return Object.defineProperty(t, "shape", { value: l }), a.raw = l, l;
998
998
  };
999
- a.raw = r, Object.defineProperty(e, "shape", { get: a });
999
+ a.raw = r, Object.defineProperty(t, "shape", { get: a });
1000
1000
  }
1001
- const n = mo(() => Go(e));
1002
- he(t, "propValues", (a) => {
1003
- const l = a.def.shape, h = {};
1004
- for (const u in l) {
1005
- const p = l[u]._zod;
1006
- if (p.values) {
1007
- Object.prototype.hasOwnProperty.call(h, u) || bo(h, u, /* @__PURE__ */ new Set());
1008
- for (const f of p.values)
1009
- h[u].add(f);
1010
- p.optin !== void 0 && h[u].add(void 0);
1001
+ const n = xo(() => or(t));
1002
+ de(e, "propValues", (a) => {
1003
+ const l = a.def.shape, u = {};
1004
+ for (const p in l) {
1005
+ const h = l[p]._zod;
1006
+ if (h.values) {
1007
+ Object.prototype.hasOwnProperty.call(u, p) || ko(u, p, /* @__PURE__ */ new Set());
1008
+ for (const f of h.values)
1009
+ u[p].add(f);
1010
+ h.optin !== void 0 && u[p].add(void 0);
1011
1011
  }
1012
1012
  }
1013
- return h;
1013
+ return u;
1014
1014
  });
1015
- const i = Ge, d = e.catchall;
1015
+ const i = Ye, c = t.catchall;
1016
1016
  let s;
1017
- const c = Ae.memoizer;
1018
- c?.attach(t), t._zod.parse = (a, l) => {
1017
+ const d = Ue.memoizer;
1018
+ d?.attach(e), e._zod.parse = (a, l) => {
1019
1019
  s ?? (s = n.value);
1020
- const h = a.value;
1021
- if (!i(h))
1020
+ const u = a.value;
1021
+ if (!i(u))
1022
1022
  return a.issues.push({
1023
1023
  expected: "object",
1024
1024
  code: "invalid_type",
1025
- input: h,
1026
- inst: t
1025
+ input: u,
1026
+ inst: e
1027
1027
  }), a;
1028
- a.value = c ? c.alloc(t, a, {}, l) : {};
1029
- const u = [], p = s.shape, f = l?.abortEarly;
1028
+ a.value = d ? d.alloc(e, a, {}, l) : {};
1029
+ const p = [], h = s.shape, f = l?.abortEarly;
1030
1030
  let g = a.issues.length;
1031
1031
  for (const k of s.allKeys) {
1032
1032
  if (f && a.issues.length !== g) {
1033
- if (be(a, g))
1033
+ if (qe(a, g))
1034
1034
  break;
1035
1035
  g = a.issues.length;
1036
1036
  }
1037
1037
  if (k === "__proto__")
1038
1038
  continue;
1039
- const b = p[k], I = b._zod.optin, j = b._zod.optout, C = b._zod.run({ value: h[k], issues: [] }, l);
1040
- C instanceof Promise ? u.push(C.then((z) => Ue(z, a, k, h, I, j))) : Ue(C, a, k, h, I, j);
1039
+ const q = h[k], I = q._zod.optin, j = q._zod.optout, S = q._zod.run({ value: u[k], issues: [] }, l);
1040
+ S instanceof Promise ? p.push(S.then(($) => je($, a, k, u, I, j))) : je(S, a, k, u, I, j);
1041
1041
  }
1042
- return d ? Xo(u, h, a, l, n.value, t, f === !0) : u.length ? Promise.all(u).then(() => a) : a;
1042
+ return c ? rr(p, u, a, l, n.value, e, f === !0) : p.length ? Promise.all(p).then(() => a) : a;
1043
1043
  };
1044
1044
  });
1045
- function ht(t, e, o, r) {
1046
- for (const i of t)
1045
+ function ft(e, t, o, r) {
1046
+ for (const i of e)
1047
1047
  if (i.issues.length === 0)
1048
- return e.value = i.value, e;
1049
- const n = t.filter((i) => !be(i));
1050
- return n.length === 1 ? (e.value = n[0].value, n[0]) : (e.issues.push({
1048
+ return t.value = i.value, t;
1049
+ const n = e.filter((i) => !qe(i));
1050
+ return n.length === 1 ? (t.value = n[0].value, n[0]) : (t.issues.push({
1051
1051
  code: "invalid_union",
1052
- input: e.value,
1052
+ input: t.value,
1053
1053
  inst: o,
1054
- errors: t.map((i) => i.issues.map((d) => we(d, r, fe())))
1055
- }), e);
1054
+ errors: e.map((i) => i.issues.map((c) => xe(c, r, ve())))
1055
+ }), t);
1056
1056
  }
1057
- const Qo = /* @__PURE__ */ H("$ZodUnion", (t, e) => {
1058
- ge.init(t, e), he(t, "optin", (r) => r.def.options.some((n) => n._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((n) => n._zod.optin !== void 0) ? "optional" : void 0), he(t, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), he(t, "values", (r) => {
1057
+ const ar = /* @__PURE__ */ F("$ZodUnion", (e, t) => {
1058
+ we.init(e, t), de(e, "optin", (r) => r.def.options.some((n) => n._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((n) => n._zod.optin !== void 0) ? "optional" : void 0), de(e, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), de(e, "values", (r) => {
1059
1059
  if (r.def.options.every((n) => n._zod.values))
1060
1060
  return new Set(r.def.options.flatMap((n) => Array.from(n._zod.values)));
1061
- }), he(t, "pattern", (r) => {
1061
+ }), de(e, "pattern", (r) => {
1062
1062
  if (r.def.options.every((n) => n._zod.pattern)) {
1063
1063
  const n = r.def.options.map((i) => i._zod.pattern);
1064
- return new RegExp(`^(${n.map((i) => mt(i.source)).join("|")})$`);
1064
+ return new RegExp(`^(${n.map((i) => yt(i.source)).join("|")})$`);
1065
1065
  }
1066
1066
  });
1067
- const o = e.options.length === 1 ? e.options[0]._zod.run : null;
1068
- t._zod.parse = (r, n) => {
1067
+ const o = t.options.length === 1 ? t.options[0]._zod.run : null;
1068
+ e._zod.parse = (r, n) => {
1069
1069
  if (o)
1070
1070
  return o(r, n);
1071
1071
  let i = !1;
1072
- const d = [];
1073
- for (const s of e.options) {
1074
- const c = s._zod.run({
1072
+ const c = [];
1073
+ for (const s of t.options) {
1074
+ const d = s._zod.run({
1075
1075
  value: r.value,
1076
1076
  issues: []
1077
1077
  }, n);
1078
- if (c instanceof Promise)
1079
- d.push(c), i = !0;
1078
+ if (d instanceof Promise)
1079
+ c.push(d), i = !0;
1080
1080
  else {
1081
- if (c.issues.length === 0)
1082
- return c;
1083
- d.push(c);
1081
+ if (d.issues.length === 0)
1082
+ return d;
1083
+ c.push(d);
1084
1084
  }
1085
1085
  }
1086
- return i ? Promise.all(d).then((s) => ht(s, r, t, n)) : ht(d, r, t, n);
1086
+ return i ? Promise.all(c).then((s) => ft(s, r, e, n)) : ft(c, r, e, n);
1087
1087
  };
1088
- }), er = /* @__PURE__ */ H("$ZodRecord", (t, e) => {
1089
- ge.init(t, e);
1090
- const o = Ae.memoizer;
1091
- o?.attach(t), t._zod.parse = (r, n) => {
1088
+ }), ir = /* @__PURE__ */ F("$ZodRecord", (e, t) => {
1089
+ we.init(e, t);
1090
+ const o = Ue.memoizer;
1091
+ o?.attach(e), e._zod.parse = (r, n) => {
1092
1092
  const i = r.value;
1093
- if (!vo(i))
1093
+ if (!_o(i))
1094
1094
  return r.issues.push({
1095
1095
  expected: "record",
1096
1096
  code: "invalid_type",
1097
1097
  input: i,
1098
- inst: t
1098
+ inst: e
1099
1099
  }), r;
1100
- const d = [], s = e.keyType._zod.values;
1101
- if (s && !e.partial) {
1102
- r.value = o ? o.alloc(t, r, {}, n) : {};
1103
- const c = /* @__PURE__ */ new Set();
1100
+ const c = [], s = t.keyType._zod.values;
1101
+ if (s && !t.partial) {
1102
+ r.value = o ? o.alloc(e, r, {}, n) : {};
1103
+ const d = /* @__PURE__ */ new Set();
1104
1104
  for (const l of s)
1105
1105
  if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
1106
- if (c.add(typeof l == "number" ? l.toString() : l), l === "__proto__")
1106
+ if (d.add(typeof l == "number" ? l.toString() : l), l === "__proto__")
1107
1107
  continue;
1108
- const h = e.keyType._zod.run({ value: l, issues: [] }, n);
1109
- if (h instanceof Promise)
1108
+ const u = t.keyType._zod.run({ value: l, issues: [] }, n);
1109
+ if (u instanceof Promise)
1110
1110
  throw new Error("Async schemas not supported in object keys currently");
1111
- if (h.issues.length) {
1111
+ if (u.issues.length) {
1112
1112
  r.issues.push({
1113
1113
  code: "invalid_key",
1114
1114
  origin: "record",
1115
- issues: h.issues.map((f) => we(f, n, fe())),
1115
+ issues: u.issues.map((f) => xe(f, n, ve())),
1116
1116
  input: l,
1117
1117
  path: [l],
1118
- inst: t
1118
+ inst: e
1119
1119
  });
1120
1120
  continue;
1121
1121
  }
1122
- const u = h.value;
1123
- if (u === "__proto__")
1122
+ const p = u.value;
1123
+ if (p === "__proto__")
1124
1124
  continue;
1125
- const p = e.valueType._zod.run({ value: i[l], issues: [] }, n);
1126
- p instanceof Promise ? d.push(p.then((f) => {
1127
- f.issues.length && r.issues.push(...Se(l, f.issues)), r.value[u] = f.value;
1128
- })) : (p.issues.length && r.issues.push(...Se(l, p.issues)), r.value[u] = p.value);
1125
+ const h = t.valueType._zod.run({ value: i[l], issues: [] }, n);
1126
+ h instanceof Promise ? c.push(h.then((f) => {
1127
+ f.issues.length && r.issues.push(...Ie(l, f.issues)), r.value[p] = f.value;
1128
+ })) : (h.issues.length && r.issues.push(...Ie(l, h.issues)), r.value[p] = h.value);
1129
1129
  }
1130
1130
  let a;
1131
1131
  for (const l in i)
1132
- if (!c.has(l))
1133
- if (e.mode === "loose") {
1132
+ if (!d.has(l))
1133
+ if (t.mode === "loose") {
1134
1134
  if (l === "__proto__")
1135
1135
  continue;
1136
1136
  r.value[l] = i[l];
@@ -1139,519 +1139,519 @@ const Qo = /* @__PURE__ */ H("$ZodUnion", (t, e) => {
1139
1139
  a && a.length > 0 && r.issues.push({
1140
1140
  code: "unrecognized_keys",
1141
1141
  input: i,
1142
- inst: t,
1142
+ inst: e,
1143
1143
  keys: a,
1144
1144
  continue: !0
1145
1145
  });
1146
1146
  } else {
1147
- r.value = o ? o.alloc(t, r, {}, n) : {};
1148
- let c;
1147
+ r.value = o ? o.alloc(e, r, {}, n) : {};
1148
+ let d;
1149
1149
  for (const a of Reflect.ownKeys(i)) {
1150
1150
  if (a === "__proto__" || !Object.prototype.propertyIsEnumerable.call(i, a))
1151
1151
  continue;
1152
- let l = e.keyType._zod.run({ value: a, issues: [] }, n);
1152
+ let l = t.keyType._zod.run({ value: a, issues: [] }, n);
1153
1153
  if (l instanceof Promise)
1154
1154
  throw new Error("Async schemas not supported in object keys currently");
1155
- if (typeof a == "string" && Lo.test(a) && l.issues.length) {
1156
- const f = e.keyType._zod.run({ value: Number(a), issues: [] }, n);
1155
+ if (typeof a == "string" && Fo.test(a) && l.issues.length) {
1156
+ const f = t.keyType._zod.run({ value: Number(a), issues: [] }, n);
1157
1157
  if (f instanceof Promise)
1158
1158
  throw new Error("Async schemas not supported in object keys currently");
1159
1159
  f.issues.length === 0 && (l = f);
1160
1160
  }
1161
1161
  if (l.issues.length) {
1162
- e.mode === "loose" ? r.value[a] = i[a] : s ? (c = c ?? [], c.push(a)) : r.issues.push({
1162
+ t.mode === "loose" ? r.value[a] = i[a] : s ? (d = d ?? [], d.push(a)) : r.issues.push({
1163
1163
  code: "invalid_key",
1164
1164
  origin: "record",
1165
- issues: l.issues.map((f) => we(f, n, fe())),
1165
+ issues: l.issues.map((f) => xe(f, n, ve())),
1166
1166
  input: a,
1167
1167
  path: [a],
1168
- inst: t
1168
+ inst: e
1169
1169
  });
1170
1170
  continue;
1171
1171
  }
1172
- const u = l.value;
1173
- if (u === "__proto__")
1172
+ const p = l.value;
1173
+ if (p === "__proto__")
1174
1174
  continue;
1175
- const p = e.valueType._zod.run({ value: i[a], issues: [] }, n);
1176
- p instanceof Promise ? d.push(p.then((f) => {
1177
- f.issues.length && r.issues.push(...Se(a, f.issues)), r.value[u] = f.value;
1178
- })) : (p.issues.length && r.issues.push(...Se(a, p.issues)), r.value[u] = p.value);
1175
+ const h = t.valueType._zod.run({ value: i[a], issues: [] }, n);
1176
+ h instanceof Promise ? c.push(h.then((f) => {
1177
+ f.issues.length && r.issues.push(...Ie(a, f.issues)), r.value[p] = f.value;
1178
+ })) : (h.issues.length && r.issues.push(...Ie(a, h.issues)), r.value[p] = h.value);
1179
1179
  }
1180
- c && c.length > 0 && r.issues.push({
1180
+ d && d.length > 0 && r.issues.push({
1181
1181
  code: "unrecognized_keys",
1182
1182
  input: i,
1183
- inst: t,
1184
- keys: c,
1183
+ inst: e,
1184
+ keys: d,
1185
1185
  continue: !0
1186
1186
  });
1187
1187
  }
1188
- return d.length ? Promise.all(d).then(() => r) : r;
1188
+ return c.length ? Promise.all(c).then(() => r) : r;
1189
1189
  };
1190
- }), tr = /* @__PURE__ */ H("$ZodLiteral", (t, e) => {
1191
- ge.init(t, e);
1192
- const o = new Set(e.values);
1193
- t._zod.values = o, he(t, "pattern", (r) => {
1190
+ }), sr = /* @__PURE__ */ F("$ZodLiteral", (e, t) => {
1191
+ we.init(e, t);
1192
+ const o = new Set(t.values);
1193
+ e._zod.values = o, de(e, "pattern", (r) => {
1194
1194
  const n = r.def.values;
1195
- return new RegExp(n.length ? `^(${n.map((i) => typeof i == "string" ? st(i) : i ? st(i.toString()) : String(i)).join("|")})$` : "^[^\\s\\S]$");
1196
- }), t._zod.parse = (r, n) => {
1195
+ return new RegExp(n.length ? `^(${n.map((i) => typeof i == "string" ? ct(i) : i ? ct(i.toString()) : String(i)).join("|")})$` : "^[^\\s\\S]$");
1196
+ }), e._zod.parse = (r, n) => {
1197
1197
  const i = r.value;
1198
1198
  return o.has(i) || r.issues.push({
1199
1199
  code: "invalid_value",
1200
- values: e.values,
1200
+ values: t.values,
1201
1201
  input: i,
1202
- inst: t
1202
+ inst: e
1203
1203
  }), r;
1204
1204
  };
1205
- }), or = /* @__PURE__ */ H("$ZodNullable", (t, e) => {
1206
- ge.init(t, e), he(t, "optin", (o) => o.def.innerType._zod.optin), he(t, "optout", (o) => o.def.innerType._zod.optout), he(t, "pattern", (o) => {
1205
+ }), lr = /* @__PURE__ */ F("$ZodNullable", (e, t) => {
1206
+ we.init(e, t), de(e, "optin", (o) => o.def.innerType._zod.optin), de(e, "optout", (o) => o.def.innerType._zod.optout), de(e, "pattern", (o) => {
1207
1207
  const r = o.def.innerType._zod.pattern;
1208
- return r ? new RegExp(`^(${mt(r.source)}|null)$`) : void 0;
1209
- }), he(t, "values", (o) => o.def.innerType._zod.values ? /* @__PURE__ */ new Set([...o.def.innerType._zod.values, null]) : void 0), t._zod.parse = (o, r) => o.value === null ? o : e.innerType._zod.run(o, r);
1208
+ return r ? new RegExp(`^(${yt(r.source)}|null)$`) : void 0;
1209
+ }), de(e, "values", (o) => o.def.innerType._zod.values ? /* @__PURE__ */ new Set([...o.def.innerType._zod.values, null]) : void 0), e._zod.parse = (o, r) => o.value === null ? o : t.innerType._zod.run(o, r);
1210
1210
  });
1211
- function rr(t) {
1212
- return t.checks && (t.checks = [...t.checks]), t;
1211
+ function cr(e) {
1212
+ return e.checks && (e.checks = [...e.checks]), e;
1213
1213
  }
1214
1214
  // @__NO_SIDE_EFFECTS__
1215
- function nr(t, e) {
1216
- return new t(rr({ type: "string", ...ve(e) }));
1215
+ function dr(e, t) {
1216
+ return new e(cr({ type: "string", ...ye(t) }));
1217
1217
  }
1218
1218
  // @__NO_SIDE_EFFECTS__
1219
- function ar(t, e) {
1220
- return new t({
1219
+ function ur(e, t) {
1220
+ return new e({
1221
1221
  type: "null",
1222
- ...ve(e)
1222
+ ...ye(t)
1223
1223
  });
1224
1224
  }
1225
- const qe = /* @__PURE__ */ H("ZodMiniType", (t, e) => {
1226
- if (!t._zod)
1225
+ const ke = /* @__PURE__ */ F("ZodMiniType", (e, t) => {
1226
+ if (!e._zod)
1227
1227
  throw new Error("Uninitialized schema in ZodMiniType.");
1228
- ge.init(t, e), t.def = e, t.type = e.type;
1228
+ we.init(e, t), e.def = t, e.type = t.type;
1229
1229
  }, {
1230
1230
  // `with` is an alias for `check`: the same function object, not a wrapper.
1231
1231
  get with() {
1232
1232
  return this.check;
1233
1233
  },
1234
- set with(t) {
1235
- Ee(this, "with", t);
1234
+ set with(e) {
1235
+ Re(this, "with", e);
1236
1236
  },
1237
- parse(t, e) {
1238
- return Oo(this, t, e, { callee: this.parse });
1237
+ parse(e, t) {
1238
+ return Bo(this, e, t, { callee: this.parse });
1239
1239
  },
1240
- parseAsync(t, e) {
1241
- return Uo(this, t, e, { callee: this.parseAsync });
1240
+ parseAsync(e, t) {
1241
+ return No(this, e, t, { callee: this.parseAsync });
1242
1242
  },
1243
- safeParse(t, e) {
1244
- return Do(this, t, e);
1243
+ safeParse(e, t) {
1244
+ return Ko(this, e, t);
1245
1245
  },
1246
- safeParseAsync(t, e) {
1247
- return Bo(this, t, e);
1246
+ safeParseAsync(e, t) {
1247
+ return Ho(this, e, t);
1248
1248
  },
1249
- check(...t) {
1250
- const e = this.def;
1249
+ check(...e) {
1250
+ const t = this.def;
1251
1251
  return this.clone({
1252
- ...e,
1252
+ ...t,
1253
1253
  checks: [
1254
- ...e.checks ?? [],
1255
- ...t.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
1254
+ ...t.checks ?? [],
1255
+ ...e.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
1256
1256
  ]
1257
1257
  }, { parent: !0 });
1258
1258
  },
1259
- clone(t, e) {
1260
- return wo(this, t, e);
1259
+ clone(e, t) {
1260
+ return Co(this, e, t);
1261
1261
  },
1262
1262
  brand() {
1263
1263
  return this;
1264
1264
  },
1265
- register(t, e) {
1266
- return t.add(this, e), this;
1265
+ register(e, t) {
1266
+ return e.add(this, t), this;
1267
1267
  },
1268
- apply(t, ...e) {
1269
- return e.length === 0 ? t(this) : t(this, ...e);
1268
+ apply(e, ...t) {
1269
+ return t.length === 0 ? e(this) : e(this, ...t);
1270
1270
  }
1271
- }), ir = /* @__PURE__ */ H("ZodMiniString", (t, e) => {
1272
- Wo.init(t, e), qe.init(t, e);
1271
+ }), pr = /* @__PURE__ */ F("ZodMiniString", (e, t) => {
1272
+ Qo.init(e, t), ke.init(e, t);
1273
1273
  });
1274
1274
  // @__NO_SIDE_EFFECTS__
1275
- function R(t) {
1276
- return /* @__PURE__ */ nr(ir, t);
1275
+ function E(e) {
1276
+ return /* @__PURE__ */ dr(pr, e);
1277
1277
  }
1278
- const sr = /* @__PURE__ */ H("ZodMiniNull", (t, e) => {
1279
- Fo.init(t, e), qe.init(t, e);
1278
+ const hr = /* @__PURE__ */ F("ZodMiniNull", (e, t) => {
1279
+ er.init(e, t), ke.init(e, t);
1280
1280
  });
1281
1281
  // @__NO_SIDE_EFFECTS__
1282
- function lr(t) {
1283
- return /* @__PURE__ */ ar(sr, t);
1282
+ function fr(e) {
1283
+ return /* @__PURE__ */ ur(hr, e);
1284
1284
  }
1285
- const cr = /* @__PURE__ */ H("ZodMiniObject", (t, e) => {
1286
- Yo.init(t, e), qe.init(t, e), Io(t, "shape", (o) => o._zod.def.shape, !1);
1285
+ const gr = /* @__PURE__ */ F("ZodMiniObject", (e, t) => {
1286
+ nr.init(e, t), ke.init(e, t), Po(e, "shape", (o) => o._zod.def.shape, !1);
1287
1287
  });
1288
1288
  // @__NO_SIDE_EFFECTS__
1289
- function U(t, e) {
1289
+ function U(e, t) {
1290
1290
  const o = {
1291
1291
  type: "object",
1292
- shape: t ?? {},
1293
- ...ve(e)
1292
+ shape: e ?? {},
1293
+ ...ye(t)
1294
1294
  };
1295
- return new cr(o);
1295
+ return new gr(o);
1296
1296
  }
1297
- const dr = /* @__PURE__ */ H("ZodMiniUnion", (t, e) => {
1298
- Qo.init(t, e), qe.init(t, e);
1297
+ const mr = /* @__PURE__ */ F("ZodMiniUnion", (e, t) => {
1298
+ ar.init(e, t), ke.init(e, t);
1299
1299
  });
1300
1300
  // @__NO_SIDE_EFFECTS__
1301
- function ur(t, e) {
1302
- return new dr({
1301
+ function br(e, t) {
1302
+ return new mr({
1303
1303
  type: "union",
1304
- options: t,
1305
- ...ve(e)
1304
+ options: e,
1305
+ ...ye(t)
1306
1306
  });
1307
1307
  }
1308
- const pt = /* @__PURE__ */ H("ZodMiniRecord", (t, e) => {
1309
- er.init(t, e), qe.init(t, e);
1308
+ const gt = /* @__PURE__ */ F("ZodMiniRecord", (e, t) => {
1309
+ ir.init(e, t), ke.init(e, t);
1310
1310
  });
1311
1311
  // @__NO_SIDE_EFFECTS__
1312
- function hr(t, e, o) {
1313
- return !e || !e._zod ? new pt({
1314
- type: "record",
1315
- keyType: /* @__PURE__ */ R(),
1316
- valueType: t,
1317
- ...ve(e)
1318
- }) : new pt({
1312
+ function vr(e, t, o) {
1313
+ return !t || !t._zod ? new gt({
1319
1314
  type: "record",
1320
- keyType: t,
1315
+ keyType: /* @__PURE__ */ E(),
1321
1316
  valueType: e,
1322
- ...ve(o)
1317
+ ...ye(t)
1318
+ }) : new gt({
1319
+ type: "record",
1320
+ keyType: e,
1321
+ valueType: t,
1322
+ ...ye(o)
1323
1323
  });
1324
1324
  }
1325
- const pr = /* @__PURE__ */ H("ZodMiniLiteral", (t, e) => {
1326
- tr.init(t, e), qe.init(t, e);
1325
+ const wr = /* @__PURE__ */ F("ZodMiniLiteral", (e, t) => {
1326
+ sr.init(e, t), ke.init(e, t);
1327
1327
  });
1328
1328
  // @__NO_SIDE_EFFECTS__
1329
- function le(t, e) {
1330
- return new pr({
1329
+ function se(e, t) {
1330
+ return new wr({
1331
1331
  type: "literal",
1332
- values: Array.isArray(t) ? t : [t],
1333
- ...ve(e)
1332
+ values: Array.isArray(e) ? e : [e],
1333
+ ...ye(t)
1334
1334
  });
1335
1335
  }
1336
- const fr = /* @__PURE__ */ H("ZodMiniNullable", (t, e) => {
1337
- or.init(t, e), qe.init(t, e);
1336
+ const qr = /* @__PURE__ */ F("ZodMiniNullable", (e, t) => {
1337
+ lr.init(e, t), ke.init(e, t);
1338
1338
  });
1339
1339
  // @__NO_SIDE_EFFECTS__
1340
- function et(t) {
1341
- return new fr({
1340
+ function ot(e) {
1341
+ return new qr({
1342
1342
  type: "nullable",
1343
- innerType: t
1343
+ innerType: e
1344
1344
  });
1345
1345
  }
1346
- fe({ jitless: !0 });
1347
- const gr = /* @__PURE__ */ U({
1348
- type: /* @__PURE__ */ le("utterance"),
1349
- content: /* @__PURE__ */ R(),
1350
- role: /* @__PURE__ */ R()
1351
- }), mr = /* @__PURE__ */ U({
1352
- type: /* @__PURE__ */ le("agent_cognition"),
1353
- content: /* @__PURE__ */ R()
1354
- }), br = /* @__PURE__ */ U({
1355
- type: /* @__PURE__ */ le("chat_closed_expired"),
1356
- content: /* @__PURE__ */ R()
1357
- }), vr = /* @__PURE__ */ U({
1358
- type: /* @__PURE__ */ le("agent_captured_url"),
1359
- content: /* @__PURE__ */ R()
1360
- }), wr = /* @__PURE__ */ U({
1361
- type: /* @__PURE__ */ le("agent_topic"),
1362
- content: /* @__PURE__ */ R()
1363
- }), qr = /* @__PURE__ */ U({
1364
- type: /* @__PURE__ */ le("agent_summary"),
1365
- content: /* @__PURE__ */ R()
1366
- }), yr = /* @__PURE__ */ U({
1367
- type: /* @__PURE__ */ le("chat_rating"),
1368
- content: /* @__PURE__ */ R()
1346
+ ve({ jitless: !0 });
1347
+ const yr = /* @__PURE__ */ U({
1348
+ type: /* @__PURE__ */ se("utterance"),
1349
+ content: /* @__PURE__ */ E(),
1350
+ role: /* @__PURE__ */ E()
1369
1351
  }), xr = /* @__PURE__ */ U({
1370
- type: /* @__PURE__ */ le("breadcrumb"),
1371
- content: /* @__PURE__ */ R()
1352
+ type: /* @__PURE__ */ se("agent_cognition"),
1353
+ content: /* @__PURE__ */ E()
1372
1354
  }), kr = /* @__PURE__ */ U({
1373
- type: /* @__PURE__ */ le("chat_escalated"),
1374
- content: /* @__PURE__ */ lr()
1355
+ type: /* @__PURE__ */ se("chat_closed_expired"),
1356
+ content: /* @__PURE__ */ E()
1375
1357
  }), _r = /* @__PURE__ */ U({
1376
- type: /* @__PURE__ */ le("error"),
1377
- code: /* @__PURE__ */ R()
1358
+ type: /* @__PURE__ */ se("agent_captured_url"),
1359
+ content: /* @__PURE__ */ E()
1378
1360
  }), Cr = /* @__PURE__ */ U({
1379
- message_id: /* @__PURE__ */ et(/* @__PURE__ */ R()),
1380
- created_at: /* @__PURE__ */ R(),
1381
- data: gr
1361
+ type: /* @__PURE__ */ se("agent_topic"),
1362
+ content: /* @__PURE__ */ E()
1382
1363
  }), Sr = /* @__PURE__ */ U({
1383
- created_at: /* @__PURE__ */ R(),
1384
- data: _r
1364
+ type: /* @__PURE__ */ se("agent_summary"),
1365
+ content: /* @__PURE__ */ E()
1385
1366
  }), Ir = /* @__PURE__ */ U({
1386
- created_at: /* @__PURE__ */ R(),
1387
- data: mr
1388
- }), zr = /* @__PURE__ */ U({
1389
- message_id: /* @__PURE__ */ et(/* @__PURE__ */ R()),
1390
- created_at: /* @__PURE__ */ R(),
1391
- data: br
1367
+ type: /* @__PURE__ */ se("chat_rating"),
1368
+ content: /* @__PURE__ */ E()
1392
1369
  }), Er = /* @__PURE__ */ U({
1393
- created_at: /* @__PURE__ */ R(),
1394
- data: vr
1370
+ type: /* @__PURE__ */ se("breadcrumb"),
1371
+ content: /* @__PURE__ */ E()
1372
+ }), zr = /* @__PURE__ */ U({
1373
+ type: /* @__PURE__ */ se("chat_escalated"),
1374
+ content: /* @__PURE__ */ fr()
1395
1375
  }), Rr = /* @__PURE__ */ U({
1396
- created_at: /* @__PURE__ */ R(),
1397
- data: wr
1398
- }), Pr = /* @__PURE__ */ U({
1399
- created_at: /* @__PURE__ */ R(),
1400
- data: qr
1376
+ type: /* @__PURE__ */ se("error"),
1377
+ code: /* @__PURE__ */ E()
1401
1378
  }), Tr = /* @__PURE__ */ U({
1402
- created_at: /* @__PURE__ */ R(),
1379
+ message_id: /* @__PURE__ */ ot(/* @__PURE__ */ E()),
1380
+ created_at: /* @__PURE__ */ E(),
1403
1381
  data: yr
1404
1382
  }), Mr = /* @__PURE__ */ U({
1405
- created_at: /* @__PURE__ */ R(),
1383
+ created_at: /* @__PURE__ */ E(),
1384
+ data: Rr
1385
+ }), Pr = /* @__PURE__ */ U({
1386
+ created_at: /* @__PURE__ */ E(),
1406
1387
  data: xr
1407
- }), Or = /* @__PURE__ */ U({
1408
- message_id: /* @__PURE__ */ et(/* @__PURE__ */ R()),
1409
- created_at: /* @__PURE__ */ R(),
1388
+ }), Ar = /* @__PURE__ */ U({
1389
+ message_id: /* @__PURE__ */ ot(/* @__PURE__ */ E()),
1390
+ created_at: /* @__PURE__ */ E(),
1410
1391
  data: kr
1411
- }), Ar = /* @__PURE__ */ ur([
1412
- Cr,
1413
- Sr,
1414
- Ir,
1415
- Er,
1416
- Rr,
1417
- Pr,
1418
- zr,
1419
- Tr,
1420
- Mr,
1421
- Or
1422
- ]), Ur = /* @__PURE__ */ U({
1423
- url: /* @__PURE__ */ R(),
1424
- mimeType: /* @__PURE__ */ le(Et),
1425
- name: /* @__PURE__ */ R()
1392
+ }), Or = /* @__PURE__ */ U({
1393
+ created_at: /* @__PURE__ */ E(),
1394
+ data: _r
1395
+ }), Ur = /* @__PURE__ */ U({
1396
+ created_at: /* @__PURE__ */ E(),
1397
+ data: Cr
1426
1398
  }), jr = /* @__PURE__ */ U({
1427
- data: Ur
1399
+ created_at: /* @__PURE__ */ E(),
1400
+ data: Sr
1428
1401
  }), Dr = /* @__PURE__ */ U({
1429
- data: /* @__PURE__ */ U({ urls: /* @__PURE__ */ hr(/* @__PURE__ */ R(), /* @__PURE__ */ R()) })
1430
- }), $r = 500, Br = 3e4, Nr = 6e4;
1431
- function Lr({
1432
- chatSettings: t,
1433
- chatId: e,
1402
+ created_at: /* @__PURE__ */ E(),
1403
+ data: Ir
1404
+ }), $r = /* @__PURE__ */ U({
1405
+ created_at: /* @__PURE__ */ E(),
1406
+ data: Er
1407
+ }), Br = /* @__PURE__ */ U({
1408
+ message_id: /* @__PURE__ */ ot(/* @__PURE__ */ E()),
1409
+ created_at: /* @__PURE__ */ E(),
1410
+ data: zr
1411
+ }), Lr = /* @__PURE__ */ br([
1412
+ Tr,
1413
+ Mr,
1414
+ Pr,
1415
+ Or,
1416
+ Ur,
1417
+ jr,
1418
+ Ar,
1419
+ Dr,
1420
+ $r,
1421
+ Br
1422
+ ]), Nr = /* @__PURE__ */ U({
1423
+ url: /* @__PURE__ */ E(),
1424
+ mimeType: /* @__PURE__ */ se(Ot),
1425
+ name: /* @__PURE__ */ E()
1426
+ }), Zr = /* @__PURE__ */ U({
1427
+ data: Nr
1428
+ }), Kr = /* @__PURE__ */ U({
1429
+ data: /* @__PURE__ */ U({ urls: /* @__PURE__ */ vr(/* @__PURE__ */ E(), /* @__PURE__ */ E()) })
1430
+ }), Vr = 500, Hr = 3e4, Wr = 6e4;
1431
+ function Fr({
1432
+ chatSettings: e,
1433
+ chatId: t,
1434
1434
  messages: o,
1435
1435
  onMessage: r,
1436
1436
  onCognition: n,
1437
1437
  onCognitionComplete: i,
1438
- onError: d,
1438
+ onError: c,
1439
1439
  onChatClosed: s,
1440
- onAgentCapturedUrl: c,
1440
+ onAgentCapturedUrl: d,
1441
1441
  onAgentTopic: a,
1442
1442
  onAgentSummary: l,
1443
- onRatingRequest: h,
1444
- onBreadcrumb: u,
1445
- fetchHistory: p,
1443
+ onRatingRequest: u,
1444
+ onBreadcrumb: p,
1445
+ fetchHistory: h,
1446
1446
  getChatToken: f,
1447
- backupPollingInterval: g = Nr
1447
+ backupPollingInterval: g = Wr
1448
1448
  }) {
1449
- const k = Z(/* @__PURE__ */ new Set());
1450
- K(() => {
1451
- for (const N of o)
1452
- N.id && k.current.add(N.id);
1449
+ const k = N(/* @__PURE__ */ new Set());
1450
+ Z(() => {
1451
+ for (const D of o)
1452
+ D.id && k.current.add(D.id);
1453
1453
  }, [o]);
1454
- const b = Z(null), I = Z(null), j = Z(0), C = Z(null), z = Z(null), E = Z(!1), w = Z(!1), y = W(r), M = W(n), oe = W(i), F = W(d), Y = W(s), Q = W(c), O = W(a), L = W(l), D = W(h), P = W(u), ee = W(p), re = W(f), { publishError: J } = je(), ae = t?.app_sync_url, G = t?.app_sync_api_key, m = !!(ae && G), x = W(ae), S = W(G), A = v(() => {
1455
- b.current && (b.current.close(), b.current = null);
1456
- }, []), $ = v(() => {
1457
- z.current && (clearInterval(z.current), z.current = null);
1458
- }, []), T = v(() => {
1459
- C.current && (clearTimeout(C.current), C.current = null);
1460
- }, []), B = Z(() => {
1461
- }), V = v(
1462
- async (N) => {
1463
- A();
1464
- const ne = x.current, te = S.current;
1465
- if (!ne || !te)
1454
+ const q = N(null), I = N(null), j = N(0), S = N(null), $ = N(null), R = N(!1), m = N(!1), y = V(r), P = V(n), oe = V(i), G = V(c), re = V(s), ne = V(d), T = V(a), L = V(l), A = V(u), K = V(p), X = V(h), H = V(f), { publishError: W } = De(), ae = e?.app_sync_url, Q = e?.app_sync_api_key, ee = !!(ae && Q), fe = V(ae), b = V(Q), v = w(() => {
1455
+ q.current && (q.current.close(), q.current = null);
1456
+ }, []), C = w(() => {
1457
+ $.current && (clearInterval($.current), $.current = null);
1458
+ }, []), O = w(() => {
1459
+ S.current && (clearTimeout(S.current), S.current = null);
1460
+ }, []), M = N(() => {
1461
+ }), B = w(
1462
+ async (D) => {
1463
+ v();
1464
+ const ie = fe.current, te = b.current;
1465
+ if (!ie || !te)
1466
1466
  throw new Error("Cannot connect: AppSync settings not available");
1467
- const Re = re.current(), Be = await po({
1468
- httpEndpoint: ne,
1469
- auth: Re ? { authorizationToken: Re } : { apiKey: te },
1470
- channel: `/default/chat/${N}`,
1467
+ const Te = H.current(), Be = await wo({
1468
+ httpEndpoint: ie,
1469
+ auth: Te ? { authorizationToken: Te } : { apiKey: te },
1470
+ channel: `/default/chat/${D}`,
1471
1471
  onDisconnect: () => {
1472
- b.current = null, B.current();
1472
+ q.current = null, M.current();
1473
1473
  },
1474
- onEvent: (Ne) => {
1475
- const xe = Ar.safeParse(Ne);
1476
- if (!xe.success) {
1477
- console.error("Invalid conversation response:", xe.error);
1474
+ onEvent: (Le) => {
1475
+ const _e = Lr.safeParse(Le);
1476
+ if (!_e.success) {
1477
+ console.error("Invalid conversation response:", _e.error);
1478
1478
  return;
1479
1479
  }
1480
- const de = xe.data;
1481
- switch (de.data.type) {
1480
+ const le = _e.data;
1481
+ switch (le.data.type) {
1482
1482
  case "utterance": {
1483
- const X = de, se = X.message_id ?? crypto.randomUUID();
1484
- if (k.current.has(se))
1483
+ const Y = le, he = Y.message_id ?? crypto.randomUUID();
1484
+ if (k.current.has(he))
1485
1485
  return;
1486
- k.current.add(se), oe.current(), y.current(
1486
+ k.current.add(he), oe.current(), y.current(
1487
1487
  {
1488
- message_id: se,
1488
+ message_id: he,
1489
1489
  response: {
1490
- id: se,
1491
- type: X.data.type,
1492
- content: X.data.content
1490
+ id: he,
1491
+ type: Y.data.type,
1492
+ content: Y.data.content
1493
1493
  }
1494
1494
  },
1495
- N
1495
+ D
1496
1496
  );
1497
1497
  return;
1498
1498
  }
1499
1499
  case "error": {
1500
- const se = parseInt(de.data.code);
1501
- J({ code: se, message: Rt(se) }), F.current?.();
1500
+ const he = parseInt(le.data.code);
1501
+ W({ code: he, message: Ut(he) }), G.current?.();
1502
1502
  return;
1503
1503
  }
1504
1504
  case "agent_cognition": {
1505
- const X = de;
1506
- M.current(X.data.content);
1505
+ const Y = le;
1506
+ P.current(Y.data.content);
1507
1507
  return;
1508
1508
  }
1509
1509
  case "agent_captured_url": {
1510
- const X = de;
1511
- Q.current?.(X.data.content);
1510
+ const Y = le;
1511
+ ne.current?.(Y.data.content);
1512
1512
  return;
1513
1513
  }
1514
1514
  case "agent_topic": {
1515
- const X = de;
1516
- O.current?.(X.data.content);
1515
+ const Y = le;
1516
+ T.current?.(Y.data.content);
1517
1517
  return;
1518
1518
  }
1519
1519
  case "agent_summary": {
1520
- const X = de;
1521
- L.current?.(X.data.content);
1520
+ const Y = le;
1521
+ L.current?.(Y.data.content);
1522
1522
  return;
1523
1523
  }
1524
1524
  case "chat_closed_expired": {
1525
- Y.current?.(), D.current?.();
1525
+ re.current?.(), A.current?.();
1526
1526
  return;
1527
1527
  }
1528
1528
  case "chat_rating": {
1529
- D.current?.();
1529
+ A.current?.();
1530
1530
  return;
1531
1531
  }
1532
1532
  case "breadcrumb": {
1533
- P.current?.();
1533
+ K.current?.();
1534
1534
  return;
1535
1535
  }
1536
1536
  case "chat_escalated": {
1537
- Y.current?.(), D.current?.();
1537
+ re.current?.(), A.current?.();
1538
1538
  return;
1539
1539
  }
1540
1540
  default:
1541
1541
  console.warn(
1542
1542
  "Unknown notification type:",
1543
- de.data.type
1543
+ le.data.type
1544
1544
  );
1545
1545
  }
1546
1546
  }
1547
1547
  });
1548
- b.current = Be;
1548
+ q.current = Be;
1549
1549
  },
1550
1550
  // The *Ref entries are latest-refs (stable identities); listed to satisfy
1551
1551
  // exhaustive-deps, which can't see that useLatestRef returns a ref.
1552
1552
  [
1553
- A,
1554
- J,
1555
- x,
1556
- S,
1557
- re,
1553
+ v,
1554
+ W,
1555
+ fe,
1556
+ b,
1557
+ H,
1558
1558
  y,
1559
- M,
1559
+ P,
1560
1560
  oe,
1561
- F,
1562
- Y,
1563
- Q,
1564
- O,
1561
+ G,
1562
+ re,
1563
+ ne,
1564
+ T,
1565
1565
  L,
1566
- D,
1567
- P
1566
+ A,
1567
+ K
1568
1568
  ]
1569
- ), ie = v(
1570
- async (N) => {
1569
+ ), z = w(
1570
+ async (D) => {
1571
1571
  try {
1572
- const ne = await ee.current(N);
1573
- for (const te of ne)
1572
+ const ie = await X.current(D);
1573
+ for (const te of ie)
1574
1574
  te.role !== "assistant" || !te.message_id || k.current.has(te.message_id) || (k.current.add(te.message_id), y.current(
1575
1575
  { message_id: te.message_id, response: te.response },
1576
- N
1576
+ D
1577
1577
  ));
1578
- } catch (ne) {
1579
- console.warn("Backup poll failed:", ne);
1578
+ } catch (ie) {
1579
+ console.warn("Backup poll failed:", ie);
1580
1580
  }
1581
1581
  },
1582
- [ee, y]
1583
- ), ye = v(
1584
- (N) => {
1585
- $(), z.current = setInterval(
1586
- () => ie(N),
1582
+ [X, y]
1583
+ ), J = w(
1584
+ (D) => {
1585
+ C(), $.current = setInterval(
1586
+ () => z(D),
1587
1587
  g
1588
1588
  );
1589
1589
  },
1590
- [$, ie, g]
1591
- ), ce = v(
1592
- function N() {
1593
- if (!E.current || w.current || C.current)
1590
+ [C, z, g]
1591
+ ), ue = w(
1592
+ function D() {
1593
+ if (!R.current || m.current || S.current)
1594
1594
  return;
1595
- const ne = I.current;
1596
- if (!ne) return;
1595
+ const ie = I.current;
1596
+ if (!ie) return;
1597
1597
  const te = Math.min(
1598
- $r * Math.pow(2, j.current),
1599
- Br
1598
+ Vr * Math.pow(2, j.current),
1599
+ Hr
1600
1600
  );
1601
- j.current += 1, C.current = setTimeout(async () => {
1602
- C.current = null, w.current = !0;
1601
+ j.current += 1, S.current = setTimeout(async () => {
1602
+ S.current = null, m.current = !0;
1603
1603
  try {
1604
- await V(ne), j.current = 0, w.current = !1, await ie(ne);
1604
+ await B(ie), j.current = 0, m.current = !1, await z(ie);
1605
1605
  } catch {
1606
- w.current = !1, N();
1606
+ m.current = !1, D();
1607
1607
  }
1608
1608
  }, te);
1609
1609
  },
1610
- [V, ie]
1610
+ [B, z]
1611
1611
  );
1612
- K(() => {
1613
- B.current = ce;
1612
+ Z(() => {
1613
+ M.current = ue;
1614
1614
  });
1615
- const me = v(
1616
- async (N) => {
1617
- if (!m || !N)
1615
+ const pe = w(
1616
+ async (D) => {
1617
+ if (!ee || !D)
1618
1618
  throw new Error(
1619
1619
  "Cannot connect: AppSync settings not ready or missing chatId"
1620
1620
  );
1621
- T(), E.current = !0, I.current = N, j.current = 0, ye(N), await V(N);
1621
+ O(), R.current = !0, I.current = D, j.current = 0, J(D), await B(D);
1622
1622
  },
1623
- [m, T, V, ye]
1624
- ), ke = v(() => {
1625
- E.current = !1, I.current = null, j.current = 0, T(), $(), A();
1626
- }, [T, $, A]), $e = v(() => {
1623
+ [ee, O, B, J]
1624
+ ), ge = w(() => {
1625
+ R.current = !1, I.current = null, j.current = 0, O(), C(), v();
1626
+ }, [O, C, v]), me = w(() => {
1627
1627
  k.current.clear();
1628
1628
  }, []);
1629
- return K(() => {
1630
- !e || !m || I.current === e || me(e).catch((N) => {
1631
- console.error("Failed to eagerly connect:", N), I.current = e, E.current = !0, B.current();
1629
+ return Z(() => {
1630
+ !t || !ee || I.current === t || pe(t).catch((D) => {
1631
+ console.error("Failed to eagerly connect:", D), I.current = t, R.current = !0, M.current();
1632
1632
  });
1633
- }, [e, m, me]), K(() => () => {
1634
- ke();
1635
- }, [ke]), { connect: me, disconnect: ke, clearProcessedIds: $e };
1633
+ }, [t, ee, pe]), Z(() => () => {
1634
+ ge();
1635
+ }, [ge]), { connect: pe, disconnect: ge, clearProcessedIds: me };
1636
1636
  }
1637
- function Zr(t) {
1637
+ function Jr(e) {
1638
1638
  return {
1639
- id: t.message_id,
1640
- content: t.response.content ?? "",
1639
+ id: e.message_id,
1640
+ content: e.response.content ?? "",
1641
1641
  sender: "assistant",
1642
1642
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1643
1643
  };
1644
1644
  }
1645
- function Kr(t) {
1645
+ function Gr(e) {
1646
1646
  return {
1647
1647
  id: crypto.randomUUID(),
1648
- content: t,
1648
+ content: e,
1649
1649
  sender: "assistant",
1650
1650
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1651
1651
  isWelcomeMessage: !0
1652
1652
  };
1653
1653
  }
1654
- function Hr() {
1654
+ function Yr() {
1655
1655
  return {
1656
1656
  id: crypto.randomUUID(),
1657
1657
  content: "",
@@ -1660,7 +1660,7 @@ function Hr() {
1660
1660
  isRatingRequest: !0
1661
1661
  };
1662
1662
  }
1663
- function Vr() {
1663
+ function Xr() {
1664
1664
  return {
1665
1665
  id: crypto.randomUUID(),
1666
1666
  content: "This conversation is closed, please start a new chat.",
@@ -1668,13 +1668,13 @@ function Vr() {
1668
1668
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1669
1669
  };
1670
1670
  }
1671
- function Wr(t, e) {
1671
+ function Qr(e, t) {
1672
1672
  return {
1673
- ...t,
1673
+ ...e,
1674
1674
  id: crypto.randomUUID(),
1675
1675
  isNew: !0,
1676
- ...e.length > 0 ? {
1677
- attachments: e.map(
1676
+ ...t.length > 0 ? {
1677
+ attachments: t.map(
1678
1678
  ({ file: o, mimeType: r, previewUrl: n }) => ({
1679
1679
  url: n,
1680
1680
  mimeType: r,
@@ -1685,253 +1685,267 @@ function Wr(t, e) {
1685
1685
  } : {}
1686
1686
  };
1687
1687
  }
1688
- function Fr(t, e, o) {
1689
- return t.map(
1690
- (r) => r.id === e ? o(r) : r
1688
+ function en(e, t, o) {
1689
+ return e.map(
1690
+ (r) => r.id === t ? o(r) : r
1691
1691
  );
1692
1692
  }
1693
- function Jr(t, e, o) {
1693
+ function tn(e, t, o) {
1694
1694
  return {
1695
- ...t,
1696
- attachments: t.attachments?.map(
1697
- (r, n) => n === e ? { ...r, uploadProgress: o } : r
1695
+ ...e,
1696
+ attachments: e.attachments?.map(
1697
+ (r, n) => n === t ? { ...r, uploadProgress: o } : r
1698
1698
  )
1699
1699
  };
1700
1700
  }
1701
- function Gr(t, e) {
1702
- return t.flatMap((o) => o.id !== e ? [o] : o.content ? [{ ...o, attachments: void 0 }] : []);
1701
+ function on(e, t) {
1702
+ return e.flatMap((o) => o.id !== t ? [o] : o.content ? [{ ...o, attachments: void 0 }] : []);
1703
1703
  }
1704
- function Xr({
1705
- appId: t,
1706
- userId: e,
1704
+ function rn({
1705
+ appId: e,
1706
+ userId: t,
1707
1707
  userName: o,
1708
1708
  userData: r,
1709
1709
  externalId: n,
1710
1710
  deviceId: i,
1711
- apiClient: d,
1711
+ apiClient: c,
1712
1712
  chatSettings: s,
1713
- messages: c,
1713
+ messages: d,
1714
1714
  setMessages: a,
1715
1715
  currentChat: l,
1716
- setCurrentChat: h,
1717
- onChatClosed: u,
1718
- isChatClosed: p
1716
+ setCurrentChat: u,
1717
+ onChatClosed: p,
1718
+ isChatClosed: h,
1719
+ onAgentMessage: f
1719
1720
  }) {
1720
- const { saveChatData: f, clearChatData: g, updateLastActivity: k, markChatClosed: b } = Qe({
1721
- appId: t
1722
- }), { publishApiError: I, publishNetworkError: j } = je(), { showCognition: C, hideCognition: z } = Pt(), E = W(d), w = v(
1723
- (m, x) => {
1724
- m.response.content && a((S) => {
1725
- if (S.some((T) => T.isRatingRequest) || s?.welcome_message && m.response.content === s.welcome_message)
1726
- return S;
1727
- const $ = [
1728
- ...S.filter((T) => !T.isThinking),
1729
- Zr(m)
1721
+ const { saveChatData: g, clearChatData: k, updateLastActivity: q, markChatClosed: I } = tt({
1722
+ appId: e
1723
+ }), { publishApiError: j, publishNetworkError: S } = De(), { showCognition: $, hideCognition: R } = jt(), m = V(c), y = V(d), P = w(
1724
+ (b, v) => {
1725
+ if (!b.response.content) return;
1726
+ const C = !!s?.welcome_message && b.response.content === s.welcome_message, O = y.current.some(
1727
+ (M) => M.isRatingRequest
1728
+ );
1729
+ !C && !O && f?.(), a((M) => {
1730
+ if (M.some((J) => J.isRatingRequest) || s?.welcome_message && b.response.content === s.welcome_message)
1731
+ return M;
1732
+ const z = [
1733
+ ...M.filter((J) => !J.isThinking),
1734
+ Jr(b)
1730
1735
  ];
1731
- return f(
1732
- x,
1733
- e,
1734
- $,
1736
+ return g(
1737
+ v,
1738
+ t,
1739
+ z,
1735
1740
  i,
1736
- E.current?.getChatToken()
1737
- ), $;
1741
+ m.current?.getChatToken()
1742
+ ), z;
1738
1743
  });
1739
1744
  },
1740
- [s, i, f, a, e, E]
1741
- ), y = v(() => {
1742
- z(), a((m) => m.filter((x) => !x.isThinking));
1743
- }, [a, z]), M = v(() => {
1744
- a((m) => [...m.filter((S) => !S.isRatingRequest), Hr()]);
1745
+ [
1746
+ s,
1747
+ i,
1748
+ g,
1749
+ a,
1750
+ t,
1751
+ m,
1752
+ y,
1753
+ f
1754
+ ]
1755
+ ), oe = w(() => {
1756
+ R(), a((b) => b.filter((v) => !v.isThinking));
1757
+ }, [a, R]), G = w(() => {
1758
+ a((b) => [...b.filter((C) => !C.isRatingRequest), Yr()]);
1745
1759
  }, [a]);
1746
- K(() => {
1747
- }, [M]);
1748
- const oe = v(
1749
- (m) => E.current ? E.current.getChatHistory(m) : Promise.resolve([]),
1750
- [E]
1751
- ), F = v(() => E.current?.getChatToken() ?? null, [E]), Y = v(() => {
1752
- b(), u?.();
1753
- }, [b, u]), { connect: Q, disconnect: O, clearProcessedIds: L } = Lr({
1760
+ Z(() => {
1761
+ }, [G]);
1762
+ const re = w(
1763
+ (b) => m.current ? m.current.getChatHistory(b) : Promise.resolve([]),
1764
+ [m]
1765
+ ), ne = w(() => m.current?.getChatToken() ?? null, [m]), T = w(() => {
1766
+ I(), p?.();
1767
+ }, [I, p]), { connect: L, disconnect: A, clearProcessedIds: K } = Fr({
1754
1768
  chatSettings: s,
1755
1769
  chatId: l?.id ?? null,
1756
- messages: c,
1757
- onMessage: w,
1758
- onCognition: C,
1759
- onCognitionComplete: z,
1760
- onError: y,
1761
- onChatClosed: Y,
1762
- onRatingRequest: M,
1763
- onBreadcrumb: Y,
1764
- fetchHistory: oe,
1765
- getChatToken: F
1766
- }), D = v(() => {
1767
- z(), O(), L(), Tt(c), a(
1768
- (m) => m.filter((x) => Array.isArray(x) ? !1 : x.isWelcomeMessage)
1769
- ), g(), h(null);
1770
+ messages: d,
1771
+ onMessage: P,
1772
+ onCognition: $,
1773
+ onCognitionComplete: R,
1774
+ onError: oe,
1775
+ onChatClosed: T,
1776
+ onRatingRequest: G,
1777
+ onBreadcrumb: T,
1778
+ fetchHistory: re,
1779
+ getChatToken: ne
1780
+ }), X = w(() => {
1781
+ R(), A(), K(), Dt(d), a(
1782
+ (b) => b.filter((v) => Array.isArray(v) ? !1 : v.isWelcomeMessage)
1783
+ ), k(), u(null);
1770
1784
  }, [
1771
- z,
1772
- O,
1773
- L,
1774
- c,
1775
- g,
1785
+ R,
1786
+ A,
1787
+ K,
1788
+ d,
1789
+ k,
1776
1790
  a,
1777
- h
1778
- ]), P = v(
1779
- (m, x) => a((S) => Fr(S, m, x)),
1791
+ u
1792
+ ]), H = w(
1793
+ (b, v) => a((C) => en(C, b, v)),
1780
1794
  [a]
1781
- ), ee = v(
1782
- async (m) => {
1783
- const x = await m.createConversation({
1784
- userId: n || e,
1795
+ ), W = w(
1796
+ async (b) => {
1797
+ const v = await b.createConversation({
1798
+ userId: n || t,
1785
1799
  deviceId: i,
1786
1800
  userName: o,
1787
1801
  userData: r,
1788
1802
  externalMetadata: {
1789
- searchParams: eo()
1803
+ searchParams: io()
1790
1804
  }
1791
1805
  });
1792
- h({ id: x.chat_id });
1806
+ u({ id: v.chat_id });
1793
1807
  try {
1794
- await Q(x.chat_id);
1795
- } catch (S) {
1808
+ await L(v.chat_id);
1809
+ } catch (C) {
1796
1810
  console.warn(
1797
1811
  "Failed to connect realtime channel, continuing with REST-only delivery:",
1798
- S
1812
+ C
1799
1813
  );
1800
1814
  }
1801
- return x.chat_id;
1815
+ return v.chat_id;
1802
1816
  },
1803
- [n, e, i, o, r, h, Q]
1804
- ), re = v(
1805
- (m, x, S, A) => Promise.all(
1806
- S.map(
1807
- ({ file: $ }, T) => m.uploadAttachment({
1808
- conversationId: x,
1809
- file: $,
1810
- onProgress: (B) => P(
1811
- A,
1812
- (V) => Jr(V, T, B)
1817
+ [n, t, i, o, r, u, L]
1818
+ ), ae = w(
1819
+ (b, v, C, O) => Promise.all(
1820
+ C.map(
1821
+ ({ file: M }, B) => b.uploadAttachment({
1822
+ conversationId: v,
1823
+ file: M,
1824
+ onProgress: (z) => H(
1825
+ O,
1826
+ (J) => tn(J, B, z)
1813
1827
  )
1814
- }).catch((B) => {
1815
- throw Mt(B, $.name);
1828
+ }).catch((z) => {
1829
+ throw $t(z, M.name);
1816
1830
  })
1817
1831
  )
1818
1832
  ),
1819
- [P]
1820
- ), J = v(
1821
- (m, x, S, A) => {
1822
- z(), A && a((T) => Gr(T, S)), a((T) => T.filter((B) => !B.isThinking));
1823
- const $ = () => P(S, (T) => ({ ...T, isFailed: !0 }));
1824
- if (m instanceof Ot) {
1825
- $();
1833
+ [H]
1834
+ ), Q = w(
1835
+ (b, v, C, O) => {
1836
+ R(), O && a((B) => on(B, C)), a((B) => B.filter((z) => !z.isThinking));
1837
+ const M = () => H(C, (B) => ({ ...B, isFailed: !0 }));
1838
+ if (b instanceof Bt) {
1839
+ M();
1826
1840
  return;
1827
1841
  }
1828
- if (m instanceof Ye || m instanceof Oe && m.status === 403) {
1829
- j();
1842
+ if (b instanceof et || b instanceof Oe && b.status === 403) {
1843
+ S();
1830
1844
  return;
1831
1845
  }
1832
- I(m), m instanceof Oe && // A 401 means an expired or closed chat token: drop the session so
1846
+ j(b), b instanceof Oe && // A 401 means an expired or closed chat token: drop the session so
1833
1847
  // the next send starts a fresh one, as for a client-side expiry.
1834
- (m.status >= 500 || m.status === 401) ? (h(null), g(), a((T) => T.filter((B) => B.id !== S)), x.reset()) : $();
1848
+ (b.status >= 500 || b.status === 401) ? (u(null), k(), a((B) => B.filter((z) => z.id !== C)), v.reset()) : M();
1835
1849
  },
1836
1850
  [
1837
- z,
1851
+ R,
1838
1852
  a,
1839
- P,
1853
+ H,
1854
+ S,
1840
1855
  j,
1841
- I,
1842
- h,
1843
- g
1856
+ u,
1857
+ k
1844
1858
  ]
1845
- ), ae = v(
1846
- async (m, x = []) => {
1847
- if (!d || c.some((A) => A.isRatingRequest)) return;
1848
- if (p) {
1849
- a((A) => [...A, Vr()]);
1859
+ ), ee = w(
1860
+ async (b, v = []) => {
1861
+ if (!c || d.some((O) => O.isRatingRequest)) return;
1862
+ if (h) {
1863
+ a((O) => [...O, Xr()]);
1850
1864
  return;
1851
1865
  }
1852
- const S = Wr(m, x);
1853
- a([...c, S]), k();
1866
+ const C = Qr(b, v);
1867
+ a([...d, C]), q();
1854
1868
  try {
1855
- const A = l?.id || await ee(d), $ = await re(
1856
- d,
1857
- A,
1858
- x,
1859
- S.id
1869
+ const O = l?.id || await W(c), M = await ae(
1870
+ c,
1871
+ O,
1872
+ v,
1873
+ C.id
1860
1874
  );
1861
- $.length > 0 && P(S.id, (B) => ({
1862
- ...B,
1863
- attachments: At($, x)
1875
+ M.length > 0 && H(C.id, (z) => ({
1876
+ ...z,
1877
+ attachments: Lt(M, v)
1864
1878
  }));
1865
- const T = await d.replyToConversation({
1866
- text: m.content,
1867
- attachments: $,
1868
- conversationId: A,
1869
- userId: n || e,
1879
+ const B = await c.replyToConversation({
1880
+ text: b.content,
1881
+ attachments: M,
1882
+ conversationId: O,
1883
+ userId: n || t,
1870
1884
  deviceId: i,
1871
1885
  userName: o,
1872
1886
  userData: r
1873
1887
  });
1874
- P(S.id, (B) => ({
1875
- ...B,
1876
- id: T.message_id,
1888
+ H(C.id, (z) => ({
1889
+ ...z,
1890
+ id: B.message_id,
1877
1891
  isNew: !1
1878
1892
  }));
1879
- } catch (A) {
1880
- throw J(
1881
- A,
1882
- d,
1883
- S.id,
1884
- x.length > 0
1885
- ), A;
1893
+ } catch (O) {
1894
+ throw Q(
1895
+ O,
1896
+ c,
1897
+ C.id,
1898
+ v.length > 0
1899
+ ), O;
1886
1900
  }
1887
1901
  },
1888
1902
  [
1889
- d,
1890
1903
  c,
1891
- p,
1904
+ d,
1905
+ h,
1892
1906
  a,
1893
- k,
1907
+ q,
1894
1908
  l?.id,
1895
- ee,
1896
- re,
1897
- P,
1898
- J,
1909
+ W,
1910
+ ae,
1911
+ H,
1912
+ Q,
1899
1913
  n,
1900
- e,
1914
+ t,
1901
1915
  i,
1902
1916
  o,
1903
1917
  r
1904
1918
  ]
1905
- ), G = v(
1906
- async (m) => {
1907
- const x = l?.id;
1908
- !E.current || !x || await E.current.addRating(x, m);
1919
+ ), fe = w(
1920
+ async (b) => {
1921
+ const v = l?.id;
1922
+ !m.current || !v || await m.current.addRating(v, b);
1909
1923
  },
1910
- [l?.id, E]
1924
+ [l?.id, m]
1911
1925
  );
1912
1926
  return {
1913
- onCleanMessages: D,
1914
- onSendMessage: ae,
1915
- onRateChat: G
1927
+ onCleanMessages: X,
1928
+ onSendMessage: ee,
1929
+ onRateChat: fe
1916
1930
  };
1917
1931
  }
1918
- const Yr = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev" };
1919
- function qt(t) {
1920
- return typeof window > "u" || typeof import.meta > "u" ? "" : Yr[t] || "";
1932
+ const nn = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev" };
1933
+ function Ct(e) {
1934
+ return typeof window > "u" || typeof import.meta > "u" ? "" : nn[e] || "";
1921
1935
  }
1922
- const Qr = qt("VITE_API_URL"), en = qt("VITE_REGION_API_URL");
1923
- function tn() {
1924
- return Qr || "";
1936
+ const an = Ct("VITE_API_URL"), sn = Ct("VITE_REGION_API_URL");
1937
+ function ln() {
1938
+ return an || "";
1925
1939
  }
1926
- function on() {
1927
- return en || "";
1940
+ function cn() {
1941
+ return sn || "";
1928
1942
  }
1929
- class rn {
1943
+ class dn {
1930
1944
  httpClient;
1931
1945
  userId = null;
1932
1946
  conversationId = null;
1933
- constructor(e) {
1934
- this.userId = e.userId || null, this.httpClient = new Ut(e);
1947
+ constructor(t) {
1948
+ this.userId = t.userId || null, this.httpClient = new Nt(t);
1935
1949
  }
1936
1950
  getUserData() {
1937
1951
  return {
@@ -1945,22 +1959,22 @@ class rn {
1945
1959
  reset() {
1946
1960
  this.conversationId = null, this.httpClient.setChatToken(null);
1947
1961
  }
1948
- setRegion(e) {
1949
- this.httpClient.setRegion(e);
1962
+ setRegion(t) {
1963
+ this.httpClient.setRegion(t);
1950
1964
  }
1951
1965
  getChatToken() {
1952
1966
  return this.httpClient.getChatToken();
1953
1967
  }
1954
- setChatToken(e) {
1955
- this.httpClient.setChatToken(e);
1968
+ setChatToken(t) {
1969
+ this.httpClient.setChatToken(t);
1956
1970
  }
1957
1971
  /**
1958
1972
  * Get organization data by app ID
1959
1973
  */
1960
- async getOrganizationByAppId(e) {
1961
- const o = on();
1974
+ async getOrganizationByAppId(t) {
1975
+ const o = cn();
1962
1976
  return await this.httpClient.getExternal(
1963
- `${o}/by-app-id/${e}`
1977
+ `${o}/by-app-id/${t}`
1964
1978
  );
1965
1979
  }
1966
1980
  async boot() {
@@ -1968,136 +1982,136 @@ class rn {
1968
1982
  "/v1/sdk/boot"
1969
1983
  )).data;
1970
1984
  }
1971
- async addRating(e, o) {
1972
- return (await this.httpClient.put(`/v1/chat/${e}/rating`, { rating: o })).data;
1985
+ async addRating(t, o) {
1986
+ return (await this.httpClient.put(`/v1/chat/${t}/rating`, { rating: o })).data;
1973
1987
  }
1974
- async createConversation(e) {
1988
+ async createConversation(t) {
1975
1989
  const o = await this.httpClient.post("/v2/chat", {
1976
1990
  user_data: {
1977
- user_id: e.userId,
1978
- device_id: e.deviceId,
1979
- user_name: e.userName,
1980
- external_id: e.externalId,
1981
- user_data: e.userData
1991
+ user_id: t.userId,
1992
+ device_id: t.deviceId,
1993
+ user_name: t.userName,
1994
+ external_id: t.externalId,
1995
+ user_data: t.userData
1982
1996
  },
1983
- ...e.externalMetadata && Object.keys(e.externalMetadata).length > 0 ? { external_metadata: e.externalMetadata } : {}
1997
+ ...t.externalMetadata && Object.keys(t.externalMetadata).length > 0 ? { external_metadata: t.externalMetadata } : {}
1984
1998
  }), { data: r } = o;
1985
1999
  return this.httpClient.setChatToken(r.chat_token), r;
1986
2000
  }
1987
- async replyToConversation(e) {
2001
+ async replyToConversation(t) {
1988
2002
  const o = {
1989
- ...e.text ? { text: e.text } : {},
1990
- ...e.attachments?.length ? { attachments: e.attachments } : {},
2003
+ ...t.text ? { text: t.text } : {},
2004
+ ...t.attachments?.length ? { attachments: t.attachments } : {},
1991
2005
  user_data: {
1992
- device_id: e.deviceId,
1993
- user_id: e.userId,
1994
- user_name: e.userName,
1995
- user_data: e.userData
2006
+ device_id: t.deviceId,
2007
+ user_id: t.userId,
2008
+ user_name: t.userName,
2009
+ user_data: t.userData
1996
2010
  }
1997
- }, { data: r } = await this.httpClient.post(`/v3/chat/${e.conversationId}`, o);
2011
+ }, { data: r } = await this.httpClient.post(`/v3/chat/${t.conversationId}`, o);
1998
2012
  return r;
1999
2013
  }
2000
- async uploadAttachment(e) {
2014
+ async uploadAttachment(t) {
2001
2015
  const o = new FormData();
2002
- o.append("file", e.file);
2016
+ o.append("file", t.file);
2003
2017
  const r = await this.httpClient.upload(
2004
- `/v1/chat/${e.conversationId}/attachments`,
2018
+ `/v1/chat/${t.conversationId}/attachments`,
2005
2019
  o,
2006
- e.onProgress
2020
+ t.onProgress
2007
2021
  );
2008
- return jr.parse(r).data;
2022
+ return Zr.parse(r).data;
2009
2023
  }
2010
- async getAttachmentUrls(e, o) {
2024
+ async getAttachmentUrls(t, o) {
2011
2025
  const r = await this.httpClient.post(
2012
- `/v1/chat/${e}/attachments/urls`,
2026
+ `/v1/chat/${t}/attachments/urls`,
2013
2027
  { urls: o }
2014
2028
  );
2015
- return Dr.parse(r).data.urls;
2029
+ return Kr.parse(r).data.urls;
2016
2030
  }
2017
- async identifyUser(e) {
2031
+ async identifyUser(t) {
2018
2032
  const o = {
2019
- device_id: e.deviceId,
2020
- user_id: e.userId,
2021
- user_name: e.userName,
2022
- external_id: e.externalId,
2023
- user_data: e.userData
2024
- }, { data: r } = await this.httpClient.post(`/v1/chat/${e.conversationId}/identify`, o);
2033
+ device_id: t.deviceId,
2034
+ user_id: t.userId,
2035
+ user_name: t.userName,
2036
+ external_id: t.externalId,
2037
+ user_data: t.userData
2038
+ }, { data: r } = await this.httpClient.post(`/v1/chat/${t.conversationId}/identify`, o);
2025
2039
  return r;
2026
2040
  }
2027
- async getChatHistory(e) {
2041
+ async getChatHistory(t) {
2028
2042
  return (await this.httpClient.get(
2029
- `/v1/chat/${e}/history`
2043
+ `/v1/chat/${t}/history`
2030
2044
  )).data;
2031
2045
  }
2032
2046
  }
2033
- const nn = {
2047
+ const un = {
2034
2048
  retries: 3,
2035
2049
  minDelayMs: 200,
2036
2050
  maxDelayMs: 1e3,
2037
2051
  factor: 2
2038
2052
  };
2039
- function an(t) {
2040
- return t instanceof Ye ? !0 : t instanceof Oe ? t.status === 429 || t.status >= 500 : !1;
2053
+ function pn(e) {
2054
+ return e instanceof et ? !0 : e instanceof Oe ? e.status === 429 || e.status >= 500 : !1;
2041
2055
  }
2042
- function sn(t, e) {
2043
- const o = e.minDelayMs * e.factor ** t, r = Math.min(o, e.maxDelayMs);
2056
+ function hn(e, t) {
2057
+ const o = t.minDelayMs * t.factor ** e, r = Math.min(o, t.maxDelayMs);
2044
2058
  return Math.random() * r;
2045
2059
  }
2046
- async function ft(t, e = {}) {
2047
- const o = { ...nn, ...e };
2060
+ async function mt(e, t = {}) {
2061
+ const o = { ...un, ...t };
2048
2062
  for (let r = 0; ; r++)
2049
2063
  try {
2050
- return await t();
2064
+ return await e();
2051
2065
  } catch (n) {
2052
- if (r >= o.retries || !an(n))
2066
+ if (r >= o.retries || !pn(n))
2053
2067
  throw n;
2054
2068
  await new Promise(
2055
- (i) => setTimeout(i, sn(r, o))
2069
+ (i) => setTimeout(i, hn(r, o))
2056
2070
  );
2057
2071
  }
2058
2072
  }
2059
- const Te = /* @__PURE__ */ new Map(), Me = /* @__PURE__ */ new Map();
2060
- function ln(t, e, o) {
2073
+ const Pe = /* @__PURE__ */ new Map(), Ae = /* @__PURE__ */ new Map();
2074
+ function fn(e, t, o) {
2061
2075
  const r = o?.dedupe !== !1, [n, i] = _(
2062
- () => Te.get(t)
2063
- ), { publishApiError: d, publishNetworkError: s } = je(), [c, a] = _(void 0), [l, h] = _(!1), u = Z(!0);
2064
- Z(() => (u.current = !0, () => {
2065
- u.current = !1;
2076
+ () => Pe.get(e)
2077
+ ), { publishApiError: c, publishNetworkError: s } = De(), [d, a] = _(void 0), [l, u] = _(!1), p = N(!0);
2078
+ N(() => (p.current = !0, () => {
2079
+ p.current = !1;
2066
2080
  }));
2067
- const p = v(async () => {
2068
- if (Te.has(t)) {
2069
- const f = Te.get(t);
2081
+ const h = w(async () => {
2082
+ if (Pe.has(e)) {
2083
+ const f = Pe.get(e);
2070
2084
  return i(f), f;
2071
2085
  }
2072
- h(!0), a(void 0);
2086
+ u(!0), a(void 0);
2073
2087
  try {
2074
- if (r && Me.has(t))
2075
- return await Me.get(t);
2076
- const f = e();
2077
- r && Me.set(t, f);
2088
+ if (r && Ae.has(e))
2089
+ return await Ae.get(e);
2090
+ const f = t();
2091
+ r && Ae.set(e, f);
2078
2092
  const g = await f;
2079
- return Te.set(t, g), u.current && i(g), g;
2093
+ return Pe.set(e, g), p.current && i(g), g;
2080
2094
  } catch (f) {
2081
- throw f instanceof Ye || f instanceof Oe && f.status === 403 ? s() : d(f), u.current && a(f), f;
2095
+ throw f instanceof et || f instanceof Oe && f.status === 403 ? s() : c(f), p.current && a(f), f;
2082
2096
  } finally {
2083
- Me.delete(t), u.current && h(!1);
2097
+ Ae.delete(e), p.current && u(!1);
2084
2098
  }
2085
- }, [t, r, e, d, s]);
2086
- return { data: n, error: c, isLoading: l, fetch: p };
2087
- }
2088
- function gt(t, e) {
2089
- const o = t?.deviceId || crypto.randomUUID();
2090
- return t?.userId ? t.externalId !== e ? { userId: t.userId, externalId: e, deviceId: o } : {
2091
- userId: t.userId,
2092
- externalId: t.externalId,
2099
+ }, [e, r, t, c, s]);
2100
+ return { data: n, error: d, isLoading: l, fetch: h };
2101
+ }
2102
+ function bt(e, t) {
2103
+ const o = e?.deviceId || crypto.randomUUID();
2104
+ return e?.userId ? e.externalId !== t ? { userId: e.userId, externalId: t, deviceId: o } : {
2105
+ userId: e.userId,
2106
+ externalId: e.externalId,
2093
2107
  deviceId: o
2094
- } : e ? { userId: e, externalId: e, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
2108
+ } : t ? { userId: t, externalId: t, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
2095
2109
  }
2096
- function cn(t) {
2097
- const { appId: e, initialUserId: o } = t, { getSavedChatData: r } = Qe({ appId: e }), [n, i] = _(
2098
- () => gt(r(), o)
2099
- ), [d, s] = _(o);
2100
- return d !== o && (s(o), i(gt(r(), o))), {
2110
+ function gn(e) {
2111
+ const { appId: t, initialUserId: o } = e, { getSavedChatData: r } = tt({ appId: t }), [n, i] = _(
2112
+ () => bt(r(), o)
2113
+ ), [c, s] = _(o);
2114
+ return c !== o && (s(o), i(bt(r(), o))), {
2101
2115
  // Identity is available synchronously; kept in the contract because
2102
2116
  // consumers (SDK boot) still key off it.
2103
2117
  isReady: !0,
@@ -2106,259 +2120,361 @@ function cn(t) {
2106
2120
  externalId: n.externalId
2107
2121
  };
2108
2122
  }
2109
- function dn({
2110
- apiUrl: t,
2111
- appId: e,
2123
+ function mn({
2124
+ apiUrl: e,
2125
+ appId: t,
2112
2126
  initialUserId: o,
2113
2127
  userName: r,
2114
2128
  userData: n
2115
2129
  }) {
2116
2130
  const {
2117
2131
  userId: i,
2118
- externalId: d,
2132
+ externalId: c,
2119
2133
  deviceId: s,
2120
- isReady: c
2121
- } = cn({ appId: e, initialUserId: o }), { isChatExpired: a, clearChatData: l, getSavedChatData: h } = Qe({
2122
- appId: e
2123
- }), { current: u } = Z(t || tn()), [p] = _(
2124
- new rn({
2125
- baseURL: u,
2126
- appId: e
2134
+ isReady: d
2135
+ } = gn({ appId: t, initialUserId: o }), { isChatExpired: a, clearChatData: l, getSavedChatData: u } = tt({
2136
+ appId: t
2137
+ }), { current: p } = N(e || ln()), [h] = _(
2138
+ new dn({
2139
+ baseURL: p,
2140
+ appId: t
2127
2141
  })
2128
- ), [f, g] = _(null), [k, b] = _(null), [I, j] = _([]), [C, z] = _(!1), [E, w] = _(!1), [y, M] = _(!0), F = ln(`sdk-boot-${e}`, () => p.boot()).fetch;
2129
- K(() => {
2142
+ ), [f, g] = _(null), [k, q] = _(null), [I, j] = _([]), [S, $] = _(!1), [R, m] = _(!1), [y, P] = _(!0), G = fn(`sdk-boot-${t}`, () => h.boot()).fetch;
2143
+ Z(() => {
2130
2144
  if (a())
2131
2145
  l();
2132
2146
  else {
2133
2147
  const {
2134
- conversationId: Q,
2135
- userId: O,
2148
+ conversationId: ne,
2149
+ userId: T,
2136
2150
  messages: L,
2137
- isChatClosed: D,
2138
- chatToken: P
2139
- } = h();
2140
- Q && O && (b({
2141
- id: Q
2142
- }), p.setChatToken(P ?? null), L && L.length > 0 && j(L), D && w(!0));
2151
+ isChatClosed: A,
2152
+ chatToken: K
2153
+ } = u();
2154
+ ne && T && (q({
2155
+ id: ne
2156
+ }), h.setChatToken(K ?? null), L && L.length > 0 && j(L), A && m(!0));
2143
2157
  }
2144
- }, [h, a, l, p]);
2145
- const Y = Z(!1);
2146
- return K(() => {
2147
- if (Y.current) return;
2148
- Y.current = !0, (async () => {
2149
- const [O, L] = await nt(
2150
- ft(() => p.getOrganizationByAppId(e))
2158
+ }, [u, a, l, h]);
2159
+ const re = N(!1);
2160
+ return Z(() => {
2161
+ if (re.current) return;
2162
+ re.current = !0, (async () => {
2163
+ const [T, L] = await it(
2164
+ mt(() => h.getOrganizationByAppId(t))
2151
2165
  );
2152
2166
  if (L) {
2153
- console.error("Failed to fetch organization data:", L), M(!1), z(!0);
2167
+ console.error("Failed to fetch organization data:", L), P(!1), $(!0);
2154
2168
  return;
2155
2169
  }
2156
- p.setRegion(O.region);
2157
- const [D, P] = await nt(ft(F));
2158
- if (P) {
2159
- M(!1), z(!0);
2170
+ h.setRegion(T.region);
2171
+ const [A, K] = await it(mt(G));
2172
+ if (K) {
2173
+ P(!1), $(!0);
2160
2174
  return;
2161
2175
  }
2162
2176
  const {
2163
- conversationId: ee,
2164
- userId: re,
2165
- messages: J
2166
- } = h();
2167
- ee && re && J.some(jt) && j(
2168
- await Dt(p, ee, J)
2177
+ conversationId: X,
2178
+ userId: H,
2179
+ messages: W
2180
+ } = u();
2181
+ X && H && W.some(Zt) && j(
2182
+ await Kt(h, X, W)
2169
2183
  );
2170
- const ae = D.chat_settings.welcome_message;
2171
- g(D.chat_settings), M(D.chat_settings.is_active ?? !0), ae && j((G) => G.length > 0 || G.some((m) => m.isWelcomeMessage) ? G : [Kr(ae)]), z(!0);
2184
+ const ae = A.chat_settings.welcome_message;
2185
+ g(A.chat_settings), P(A.chat_settings.is_active ?? !0), ae && j((Q) => Q.length > 0 || Q.some((ee) => ee.isWelcomeMessage) ? Q : [Gr(ae)]), $(!0);
2172
2186
  })();
2173
- }, [c, p, e, F, h]), {
2187
+ }, [d, h, t, G, u]), {
2174
2188
  userId: i,
2175
2189
  userName: r,
2176
2190
  userData: n,
2177
- externalId: d,
2191
+ externalId: c,
2178
2192
  deviceId: s,
2179
- apiClient: p,
2193
+ apiClient: h,
2180
2194
  chatSettings: f,
2181
2195
  currentChat: k,
2182
2196
  messages: I,
2183
- isReady: C,
2184
- isChatClosed: E,
2197
+ isReady: S,
2198
+ isChatClosed: R,
2185
2199
  isChatActive: y
2186
2200
  };
2187
2201
  }
2188
- const yt = "(max-width: 640px)";
2189
- function un() {
2190
- return typeof window > "u" ? !1 : window.matchMedia(yt).matches;
2202
+ const St = "(max-width: 640px)";
2203
+ function bn() {
2204
+ return typeof window > "u" ? !1 : window.matchMedia(St).matches;
2191
2205
  }
2192
- function hn(t) {
2193
- const [e, o] = _(un), [r, n] = _(
2206
+ function vn(e) {
2207
+ const [t, o] = _(bn), [r, n] = _(
2194
2208
  null
2195
- ), i = t ?? e, d = typeof window > "u";
2196
- return K(() => {
2197
- if (d) return;
2198
- const s = window.matchMedia(yt), c = (a) => {
2209
+ ), i = e ?? t, c = typeof window > "u";
2210
+ return Z(() => {
2211
+ if (c) return;
2212
+ const s = window.matchMedia(St), d = (a) => {
2199
2213
  o(a.matches);
2200
2214
  };
2201
- return c(s), s.addEventListener("change", c), () => s.removeEventListener("change", c);
2202
- }, [d]), K(() => {
2203
- if (d) return;
2215
+ return d(s), s.addEventListener("change", d), () => s.removeEventListener("change", d);
2216
+ }, [c]), Z(() => {
2217
+ if (c) return;
2204
2218
  const s = document.createElement("div");
2205
2219
  return s.className = "eloquent-ai-chat-portal", s.style.position = "relative", s.style.zIndex = "30", document.body.appendChild(s), n(s), () => {
2206
2220
  s.parentElement && s.parentElement.removeChild(s);
2207
2221
  };
2208
- }, [d]), {
2209
- isMobileScreen: e,
2222
+ }, [c]), {
2223
+ isMobileScreen: t,
2210
2224
  isMobile: i,
2211
2225
  portalContainer: r
2212
2226
  };
2213
2227
  }
2214
- const pn = 2, fn = (t) => `eloquent-ai:chat-widget-closed-${t}`;
2215
- function gn({
2216
- environment: t,
2217
- apiUrl: e,
2228
+ const vt = 1245, wn = [
2229
+ [2.32, 0.4],
2230
+ [4.25, 0.18]
2231
+ ], qn = [
2232
+ { start: 0, duration: 0.22, level: 0.45 },
2233
+ { start: 0.16, duration: 0.2, level: 0.25 }
2234
+ ], yn = 0.3, xn = 3e-3, wt = 1e-4;
2235
+ function qt(e, t, o, r, n, i) {
2236
+ const c = e.createOscillator(), s = e.createGain();
2237
+ c.type = "sine", c.frequency.setValueAtTime(o, n), s.gain.setValueAtTime(wt, n), s.gain.exponentialRampToValueAtTime(r, n + xn), s.gain.exponentialRampToValueAtTime(wt, n + i), c.connect(s).connect(t), c.start(n), c.stop(n + i + 0.05);
2238
+ }
2239
+ function kn(e) {
2240
+ const t = e.createGain();
2241
+ t.gain.value = yn;
2242
+ const o = e.createBiquadFilter();
2243
+ o.type = "lowpass", o.frequency.value = 6e3, t.connect(o).connect(e.destination);
2244
+ const r = e.currentTime + 0.02;
2245
+ qn.forEach((n) => {
2246
+ qt(
2247
+ e,
2248
+ t,
2249
+ vt,
2250
+ n.level,
2251
+ r + n.start,
2252
+ n.duration
2253
+ ), wn.forEach(([i, c]) => {
2254
+ qt(
2255
+ e,
2256
+ t,
2257
+ vt * i,
2258
+ n.level * c,
2259
+ r + n.start,
2260
+ n.duration * 0.35
2261
+ );
2262
+ });
2263
+ });
2264
+ }
2265
+ const Xe = "eloquentai:notification-sound-muted", _n = 3e3;
2266
+ function Cn() {
2267
+ try {
2268
+ return window.localStorage.getItem(Xe) === "true";
2269
+ } catch {
2270
+ return !1;
2271
+ }
2272
+ }
2273
+ function Sn(e) {
2274
+ try {
2275
+ e ? window.localStorage.setItem(Xe, "true") : window.localStorage.removeItem(Xe);
2276
+ } catch {
2277
+ }
2278
+ }
2279
+ function In(e) {
2280
+ return document.visibilityState === "visible" && document.hasFocus() && e;
2281
+ }
2282
+ function En() {
2283
+ const e = window.webkitAudioContext;
2284
+ return window.AudioContext ?? e ?? null;
2285
+ }
2286
+ function zn({
2287
+ isEnabled: e,
2288
+ isOpen: t
2289
+ }) {
2290
+ const [o, r] = _(Cn), n = N(null), i = N(0), c = V(t), s = V(o), d = w(() => {
2291
+ if (!e) return;
2292
+ const u = En();
2293
+ if (!u) return;
2294
+ try {
2295
+ n.current ??= new u();
2296
+ } catch {
2297
+ return;
2298
+ }
2299
+ const p = n.current.state;
2300
+ (p === "suspended" || p === "interrupted") && n.current.resume().catch(() => {
2301
+ });
2302
+ }, [e]);
2303
+ Z(() => {
2304
+ if (!e) return;
2305
+ const u = { capture: !0 }, p = () => d();
2306
+ return window.addEventListener("pointerdown", p, u), window.addEventListener("keydown", p, u), () => {
2307
+ window.removeEventListener("pointerdown", p, u), window.removeEventListener("keydown", p, u);
2308
+ };
2309
+ }, [e, d]);
2310
+ const a = w(() => {
2311
+ if (!e || s.current || In(c.current)) return;
2312
+ const u = n.current;
2313
+ if (!u || u.state !== "running") return;
2314
+ const p = Date.now();
2315
+ p - i.current < _n || (i.current = p, kn(u));
2316
+ }, [e, s, c]), l = w(() => {
2317
+ r((u) => !u);
2318
+ }, []);
2319
+ return Z(() => {
2320
+ Sn(o);
2321
+ }, [o]), { notify: a, unlock: d, isMuted: o, toggleMuted: l };
2322
+ }
2323
+ const Rn = 2, Tn = (e) => `eloquent-ai:chat-widget-closed-${e}`;
2324
+ function Mn({
2325
+ environment: e,
2326
+ apiUrl: t,
2218
2327
  appId: o,
2219
2328
  userId: r,
2220
2329
  userName: n,
2221
2330
  userData: i,
2222
- chatProps: d,
2331
+ chatProps: c,
2223
2332
  isMobile: s,
2224
- isInitiallyOpen: c,
2333
+ isInitiallyOpen: d,
2225
2334
  hasCloseButton: a,
2226
2335
  hasCleanChatButton: l,
2227
2336
  // Deprecated aliases, kept until hosts migrate to the is/has names above.
2228
- initialOpen: h,
2229
- closeButton: u,
2230
- cleanChatButton: p,
2337
+ initialOpen: u,
2338
+ closeButton: p,
2339
+ cleanChatButton: h,
2231
2340
  proactiveMessageHideDelay: f = 5e3,
2232
2341
  isAlwaysOpen: g = !1,
2233
2342
  hasCleanChatButtonOverride: k
2234
2343
  }) {
2235
- const { isMobile: b, portalContainer: I } = hn(s), {
2344
+ const { isMobile: q, portalContainer: I } = vn(s), {
2236
2345
  userId: j,
2237
- externalId: C,
2238
- deviceId: z,
2239
- apiClient: E,
2240
- chatSettings: w,
2346
+ externalId: S,
2347
+ deviceId: $,
2348
+ apiClient: R,
2349
+ chatSettings: m,
2241
2350
  currentChat: y,
2242
- messages: M,
2351
+ messages: P,
2243
2352
  isReady: oe,
2244
- isChatClosed: F,
2245
- isChatActive: Y
2246
- } = dn({
2247
- apiUrl: e,
2353
+ isChatClosed: G,
2354
+ isChatActive: re
2355
+ } = mn({
2356
+ apiUrl: t,
2248
2357
  appId: o,
2249
2358
  initialUserId: r,
2250
2359
  userName: n,
2251
2360
  userData: i
2252
- }), Q = Qt({ chatProps: d, chatSettings: w }), O = c ?? h ?? !1, L = a ?? u ?? !0, D = l ?? p ?? !0, P = fn(o), [ee, re] = _(() => g ? !0 : it(P) === "true" || b ? !1 : O ?? b), [J, ae] = _(!1);
2253
- K(() => {
2254
- if (!oe || J || (ae(!0), g)) return;
2255
- const ue = w?.initial_open;
2256
- ue != null && (b || ue && it(P) === "true" || re(ue));
2361
+ }), ne = ao({ chatProps: c, chatSettings: m }), T = d ?? u ?? !1, L = a ?? p ?? !0, A = l ?? h ?? !0, K = Tn(o), [X, H] = _(() => g ? !0 : lt(K) === "true" || q ? !1 : T ?? q), [W, ae] = _(!1);
2362
+ Z(() => {
2363
+ if (!oe || W || (ae(!0), g)) return;
2364
+ const ce = m?.initial_open;
2365
+ ce != null && (q || ce && lt(K) === "true" || H(ce));
2257
2366
  }, [
2258
2367
  oe,
2259
- J,
2260
- w?.initial_open,
2261
- b,
2262
- P,
2368
+ W,
2369
+ m?.initial_open,
2370
+ q,
2371
+ K,
2263
2372
  g
2264
2373
  ]);
2265
- const G = w?.initial_open ?? O, m = w?.close_button ?? L, x = k ?? w?.clean_chat_button ?? D, S = w?.proactive_message_hide_delay ?? f, A = v(
2266
- (ue) => {
2267
- g || re((Pe) => {
2268
- const ot = typeof ue == "function" ? ue(Pe) : ue;
2269
- return ot ? Yt(P) : Xt(P, "true", pn), ot;
2270
- });
2374
+ const Q = m?.initial_open ?? T, ee = m?.close_button ?? L, fe = k ?? m?.clean_chat_button ?? A, b = m?.proactive_message_hide_delay ?? f, v = zn({
2375
+ isEnabled: m?.notification_sound !== !1,
2376
+ isOpen: X
2377
+ }), { unlock: C } = v, O = w(
2378
+ (ce) => {
2379
+ g || (C(), H((Me) => {
2380
+ const nt = typeof ce == "function" ? ce(Me) : ce;
2381
+ return nt ? no(K) : ro(K, "true", Rn), nt;
2382
+ }));
2271
2383
  },
2272
- [P, g]
2273
- ), $ = $t(ee, 400), [T, B] = _(
2274
- d?.messages ?? []
2275
- ), [V, ie] = _(y), [ye, ce] = _(!1), [me, ke] = _(M);
2276
- me !== M && (ke(M), M.length > 0 && B(M));
2277
- const [$e, N] = _(y);
2278
- $e !== y && (N(y), y && ie(y));
2279
- const [ne, te] = _(F);
2280
- ne !== F && (te(F), F && ce(!0));
2281
- const Re = v(() => {
2282
- ce(!0);
2283
- }, []), [Be, Ne] = _(!1), xe = oe && w?.auto_display_welcome_message && w?.welcome_message ? w.welcome_message : "", de = {
2284
- text: xe,
2285
- isVisible: xe !== "" && !Be,
2286
- autoHideDelay: S
2287
- }, { onSendMessage: X, onCleanMessages: se, onRateChat: xt } = Xr({
2384
+ [K, g, C]
2385
+ ), M = Vt(X, 400), [B, z] = _(
2386
+ c?.messages ?? []
2387
+ ), [J, ue] = _(y), [pe, ge] = _(!1), [me, D] = _(P);
2388
+ me !== P && (D(P), P.length > 0 && z(P));
2389
+ const [ie, te] = _(y);
2390
+ ie !== y && (te(y), y && ue(y));
2391
+ const [Te, Be] = _(G);
2392
+ Te !== G && (Be(G), G && ge(!0));
2393
+ const Le = w(() => {
2394
+ ge(!0);
2395
+ }, []), [_e, le] = _(!1), Y = oe && m?.auto_display_welcome_message && m?.welcome_message ? m.welcome_message : "", he = {
2396
+ text: Y,
2397
+ isVisible: Y !== "" && !_e,
2398
+ autoHideDelay: b
2399
+ }, { onSendMessage: It, onCleanMessages: Ne, onRateChat: Et } = rn({
2288
2400
  appId: o,
2289
2401
  userId: j,
2290
2402
  userName: n,
2291
2403
  userData: i,
2292
- externalId: C,
2293
- deviceId: z,
2294
- apiClient: E,
2295
- chatSettings: w,
2296
- setMessages: B,
2297
- messages: T,
2298
- currentChat: V,
2299
- setCurrentChat: ie,
2300
- onChatClosed: Re,
2301
- isChatClosed: ye
2404
+ externalId: S,
2405
+ deviceId: $,
2406
+ apiClient: R,
2407
+ chatSettings: m,
2408
+ setMessages: z,
2409
+ messages: B,
2410
+ currentChat: J,
2411
+ setCurrentChat: ue,
2412
+ onChatClosed: Le,
2413
+ isChatClosed: pe,
2414
+ onAgentMessage: v.notify
2302
2415
  });
2303
- K(() => {
2304
- M.length > 0 && B(M);
2305
- }, [M]), K(() => {
2306
- y && ie(y);
2416
+ Z(() => {
2417
+ P.length > 0 && z(P);
2418
+ }, [P]), Z(() => {
2419
+ y && ue(y);
2307
2420
  }, [y]);
2308
- const tt = Z(null);
2309
- K(() => {
2310
- if (!V || !C || !E) return;
2311
- const ue = {
2421
+ const rt = N(null);
2422
+ Z(() => {
2423
+ if (!J || !S || !R) return;
2424
+ const ce = {
2312
2425
  userId: j,
2313
2426
  userName: n,
2314
2427
  userData: i,
2315
- externalId: C,
2316
- deviceId: z,
2317
- conversationId: V.id
2318
- }, Pe = JSON.stringify(ue);
2319
- tt.current !== Pe && (tt.current = Pe, E.identifyUser(ue));
2428
+ externalId: S,
2429
+ deviceId: $,
2430
+ conversationId: J.id
2431
+ }, Me = JSON.stringify(ce);
2432
+ rt.current !== Me && (rt.current = Me, R.identifyUser(ce));
2320
2433
  }, [
2321
- C,
2434
+ S,
2322
2435
  j,
2323
2436
  n,
2324
2437
  i,
2325
- z,
2326
- V,
2327
- E
2438
+ $,
2439
+ J,
2440
+ R
2328
2441
  ]);
2329
- const kt = v(() => {
2330
- se(), ce(!1);
2331
- }, [se]), _t = v(() => {
2332
- Ne(!0);
2442
+ const zt = w(() => {
2443
+ Ne(), ge(!1);
2444
+ }, [Ne]), Rt = w(() => {
2445
+ le(!0);
2333
2446
  }, []);
2334
2447
  return {
2335
2448
  isReady: oe,
2336
- isChatActive: Y,
2337
- isInitiallyOpen: G,
2338
- hasCloseButton: m,
2339
- hasCleanChatButton: x,
2340
- isMobile: b,
2341
- chatId: V?.id ?? null,
2342
- chatInterfaceProps: Q,
2343
- chatOpen: ee,
2344
- chatOpenDebounced: $,
2345
- messages: T,
2449
+ isChatActive: re,
2450
+ isInitiallyOpen: Q,
2451
+ hasCloseButton: ee,
2452
+ hasCleanChatButton: fe,
2453
+ isMobile: q,
2454
+ chatId: J?.id ?? null,
2455
+ chatInterfaceProps: ne,
2456
+ chatOpen: X,
2457
+ chatOpenDebounced: M,
2458
+ messages: B,
2346
2459
  portalContainer: I,
2347
- onSendMessage: X,
2348
- setChatOpen: A,
2349
- onCleanMessages: se,
2350
- proactiveMessage: de,
2351
- hideProactiveMessage: _t,
2352
- isChatClosed: ye,
2353
- onStartNewChat: kt,
2354
- onRateChat: xt
2460
+ onSendMessage: It,
2461
+ setChatOpen: O,
2462
+ onCleanMessages: Ne,
2463
+ proactiveMessage: he,
2464
+ hideProactiveMessage: Rt,
2465
+ isChatClosed: pe,
2466
+ onStartNewChat: zt,
2467
+ onRateChat: Et,
2468
+ unlockSound: C,
2469
+ isSoundMuted: v.isMuted,
2470
+ toggleSound: v.toggleMuted
2355
2471
  };
2356
2472
  }
2357
- function mn(t) {
2358
- const [e, o] = _(0);
2359
- return K(() => {
2473
+ function Pn(e) {
2474
+ const [t, o] = _(0);
2475
+ return Z(() => {
2360
2476
  const r = window.visualViewport;
2361
- if (!t || !r) {
2477
+ if (!e || !r) {
2362
2478
  o(0);
2363
2479
  return;
2364
2480
  }
@@ -2369,136 +2485,139 @@ function mn(t) {
2369
2485
  return n(), r.addEventListener("resize", n), r.addEventListener("scroll", n), () => {
2370
2486
  r.removeEventListener("resize", n), r.removeEventListener("scroll", n), o(0);
2371
2487
  };
2372
- }, [t]), e;
2373
- }
2374
- function bn(t) {
2375
- K(() => {
2376
- if (!t) return;
2377
- const { body: e } = document, o = window.scrollY, r = {
2378
- position: e.style.position,
2379
- top: e.style.top,
2380
- left: e.style.left,
2381
- right: e.style.right,
2382
- overflow: e.style.overflow
2488
+ }, [e]), t;
2489
+ }
2490
+ function An(e) {
2491
+ Z(() => {
2492
+ if (!e) return;
2493
+ const { body: t } = document, o = window.scrollY, r = {
2494
+ position: t.style.position,
2495
+ top: t.style.top,
2496
+ left: t.style.left,
2497
+ right: t.style.right,
2498
+ overflow: t.style.overflow
2383
2499
  };
2384
- return e.style.position = "fixed", e.style.top = `-${o}px`, e.style.left = "0", e.style.right = "0", e.style.overflow = "hidden", () => {
2385
- e.style.position = r.position, e.style.top = r.top, e.style.left = r.left, e.style.right = r.right, e.style.overflow = r.overflow, window.scrollTo(0, o);
2500
+ return t.style.position = "fixed", t.style.top = `-${o}px`, t.style.left = "0", t.style.right = "0", t.style.overflow = "hidden", () => {
2501
+ t.style.position = r.position, t.style.top = r.top, t.style.left = r.left, t.style.right = r.right, t.style.overflow = r.overflow, window.scrollTo(0, o);
2386
2502
  };
2387
- }, [t]);
2503
+ }, [e]);
2388
2504
  }
2389
- function vn() {
2390
- const [t, e] = _(!1), [o, r] = _(null), n = Z(null), i = Z(null), d = v((c) => {
2505
+ function On() {
2506
+ const [e, t] = _(!1), [o, r] = _(null), n = N(null), i = N(null), c = w((d) => {
2391
2507
  const a = (l) => {
2392
- r(l), e(!0), i.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2508
+ r(l), t(!0), i.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2393
2509
  n.current = null;
2394
- const h = i.current;
2395
- h && a(h);
2510
+ const u = i.current;
2511
+ u && a(u);
2396
2512
  }, 1e3);
2397
2513
  };
2398
- n.current ? i.current = c : a(c);
2399
- }, []), s = v(() => {
2400
- n.current && (clearTimeout(n.current), n.current = null), i.current = null, e(!1), r(null);
2514
+ n.current ? i.current = d : a(d);
2515
+ }, []), s = w(() => {
2516
+ n.current && (clearTimeout(n.current), n.current = null), i.current = null, t(!1), r(null);
2401
2517
  }, []);
2402
2518
  return {
2403
- isVisible: t,
2519
+ isVisible: e,
2404
2520
  content: o,
2405
- showCognition: d,
2521
+ showCognition: c,
2406
2522
  hideCognition: s
2407
2523
  };
2408
2524
  }
2409
- function wn({
2410
- children: t
2525
+ function Un({
2526
+ children: e
2411
2527
  }) {
2412
- const e = vn();
2413
- return /* @__PURE__ */ q(Bt.Provider, { value: e, children: t });
2528
+ const t = On();
2529
+ return /* @__PURE__ */ x(Ht.Provider, { value: t, children: e });
2414
2530
  }
2415
- const qn = ({ children: t }) => {
2416
- const [e, o] = _(null), [r, n] = _(!1), i = Lt(o), a = {
2417
- error: e,
2531
+ const jn = ({ children: e }) => {
2532
+ const [t, o] = _(null), [r, n] = _(!1), i = Ft(o), a = {
2533
+ error: t,
2418
2534
  hideSdk: r,
2419
2535
  publishApiError: i,
2420
2536
  publishError: (l) => o(l),
2421
2537
  publishNetworkError: () => n(!0),
2422
2538
  clearError: () => o(null)
2423
2539
  };
2424
- return /* @__PURE__ */ q(Nt.Provider, { value: a, children: t });
2425
- }, yn = 100;
2426
- function xn({
2427
- appId: t,
2428
- userId: e,
2540
+ return /* @__PURE__ */ x(Wt.Provider, { value: a, children: e });
2541
+ }, Dn = 100;
2542
+ function $n({
2543
+ appId: e,
2544
+ userId: t,
2429
2545
  userName: o,
2430
2546
  userData: r,
2431
2547
  chatProps: n,
2432
2548
  proactiveMessageHideDelay: i = 5e3,
2433
- isMobile: d,
2549
+ isMobile: c,
2434
2550
  hasCloseButton: s,
2435
- hasCleanChatButton: c,
2551
+ hasCleanChatButton: d,
2436
2552
  isInitiallyOpen: a,
2437
2553
  // Deprecated aliases, resolved in useChat (new name wins).
2438
2554
  closeButton: l,
2439
- cleanChatButton: h,
2440
- initialOpen: u,
2441
- INTERNAL_ONLY_CHAT_INTERFACE_ONLY: p = !1,
2555
+ cleanChatButton: u,
2556
+ initialOpen: p,
2557
+ INTERNAL_ONLY_CHAT_INTERFACE_ONLY: h = !1,
2442
2558
  INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: f = void 0,
2443
2559
  INTERNAL_ONLY_BLOCK_STYLE: g = !1,
2444
2560
  INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: k = void 0,
2445
- INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: b = void 0,
2561
+ INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: q = void 0,
2446
2562
  INTERNAL_ONLY_ON_CHAT_ID: I = void 0,
2447
2563
  INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID: j = null,
2448
- INTERNAL_ONLY_ON_MESSAGE_SENT: C = void 0,
2449
- INTERNAL_ONLY_SHOW_COPY_BUTTON: z = !1,
2450
- INTERNAL_ONLY_ENVIRONMENT: E = "live",
2451
- INTERNAL_ONLY_API_URL: w
2564
+ INTERNAL_ONLY_ON_MESSAGE_SENT: S = void 0,
2565
+ INTERNAL_ONLY_SHOW_COPY_BUTTON: $ = !1,
2566
+ INTERNAL_ONLY_ENVIRONMENT: R = "live",
2567
+ INTERNAL_ONLY_API_URL: m
2452
2568
  }) {
2453
- const { hideSdk: y } = je(), {
2454
- isReady: M,
2569
+ const { hideSdk: y } = De(), {
2570
+ isReady: P,
2455
2571
  isChatActive: oe,
2456
- isInitiallyOpen: F,
2457
- hasCloseButton: Y,
2458
- hasCleanChatButton: Q,
2459
- isMobile: O,
2572
+ isInitiallyOpen: G,
2573
+ hasCloseButton: re,
2574
+ hasCleanChatButton: ne,
2575
+ isMobile: T,
2460
2576
  chatId: L,
2461
- chatOpen: D,
2462
- chatInterfaceProps: P,
2463
- chatOpenDebounced: ee,
2464
- messages: re,
2465
- portalContainer: J,
2466
- onSendMessage: ae,
2467
- setChatOpen: G,
2468
- proactiveMessage: m,
2469
- hideProactiveMessage: x,
2470
- isChatClosed: S,
2471
- onStartNewChat: A,
2472
- onRateChat: $
2473
- } = gn({
2474
- environment: E,
2475
- apiUrl: w,
2476
- appId: t,
2477
- userId: e,
2577
+ chatOpen: A,
2578
+ unlockSound: K,
2579
+ isSoundMuted: X,
2580
+ toggleSound: H,
2581
+ chatInterfaceProps: W,
2582
+ chatOpenDebounced: ae,
2583
+ messages: Q,
2584
+ portalContainer: ee,
2585
+ onSendMessage: fe,
2586
+ setChatOpen: b,
2587
+ proactiveMessage: v,
2588
+ hideProactiveMessage: C,
2589
+ isChatClosed: O,
2590
+ onStartNewChat: M,
2591
+ onRateChat: B
2592
+ } = Mn({
2593
+ environment: R,
2594
+ apiUrl: m,
2595
+ appId: e,
2596
+ userId: t,
2478
2597
  userName: o,
2479
2598
  userData: r,
2480
2599
  chatProps: n,
2481
- isMobile: d,
2600
+ isMobile: c,
2482
2601
  isInitiallyOpen: a,
2483
2602
  hasCloseButton: s,
2484
- hasCleanChatButton: c,
2485
- initialOpen: u,
2603
+ hasCleanChatButton: d,
2604
+ initialOpen: p,
2486
2605
  closeButton: l,
2487
- cleanChatButton: h,
2606
+ cleanChatButton: u,
2488
2607
  proactiveMessageHideDelay: i,
2489
2608
  // Embedded: the interface is the page content with no launcher to reopen
2490
2609
  // it, so nothing (boot initial_open, closed-cookie, props) may close it.
2491
- isAlwaysOpen: p,
2610
+ isAlwaysOpen: h,
2492
2611
  hasCleanChatButtonOverride: f
2493
- }), T = Z(void 0);
2494
- K(() => {
2495
- !I || T.current === L || (T.current = L, I(L));
2612
+ }), z = N(void 0);
2613
+ Z(() => {
2614
+ !I || z.current === L || (z.current = L, I(L));
2496
2615
  }, [L, I]);
2497
- const B = mn(O && D);
2498
- bn(O && D);
2499
- const V = !M;
2500
- if (y || V && !p || !V && !oe) return null;
2501
- const ie = () => /* @__PURE__ */ ze(
2616
+ const J = Pn(T && A);
2617
+ An(T && A);
2618
+ const ue = !P;
2619
+ if (y || ue && !h || !ue && !oe) return null;
2620
+ const pe = () => /* @__PURE__ */ ze(
2502
2621
  "div",
2503
2622
  {
2504
2623
  style: {
@@ -2514,37 +2633,37 @@ function xn({
2514
2633
  ...g ? { position: "relative", inset: 0, width: "100%", height: "100%" } : {}
2515
2634
  },
2516
2635
  children: [
2517
- /* @__PURE__ */ q("style", { children: Wt }),
2518
- /* @__PURE__ */ q(
2519
- Ze,
2636
+ /* @__PURE__ */ x("style", { children: Qt }),
2637
+ /* @__PURE__ */ x(
2638
+ Ke,
2520
2639
  {
2521
2640
  className: "eloquentai-chat-messaging",
2522
- head: /* @__PURE__ */ ze(at, { children: [
2523
- /* @__PURE__ */ q("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
2524
- /* @__PURE__ */ q("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
2525
- /* @__PURE__ */ q(
2641
+ head: /* @__PURE__ */ ze(st, { children: [
2642
+ /* @__PURE__ */ x("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
2643
+ /* @__PURE__ */ x("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
2644
+ /* @__PURE__ */ x(
2526
2645
  "link",
2527
2646
  {
2528
2647
  href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",
2529
2648
  rel: "stylesheet"
2530
2649
  }
2531
2650
  ),
2532
- /* @__PURE__ */ q("style", { children: Le })
2651
+ /* @__PURE__ */ x("style", { children: Ze })
2533
2652
  ] }),
2534
2653
  style: {
2535
- display: D || ee ? "block" : "none",
2536
- width: O ? "100vw" : "400px",
2654
+ display: A || ae ? "block" : "none",
2655
+ width: T ? "100vw" : "400px",
2537
2656
  // 100dvh accounts for mobile browser chrome (e.g. address bar); 100vh fallback for older browsers
2538
2657
  "--chat-mobile-viewport-height": "100dvh",
2539
- height: O ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
2540
- maxHeight: O ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${yn}px)`,
2658
+ height: T ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
2659
+ maxHeight: T ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${Dn}px)`,
2541
2660
  border: "none",
2542
2661
  zIndex: 2147483e3,
2543
2662
  position: "fixed",
2544
- top: O ? 0 : void 0,
2545
- left: O ? 0 : void 0,
2546
- right: O ? 0 : 16,
2547
- bottom: O ? 0 : 16,
2663
+ top: T ? 0 : void 0,
2664
+ left: T ? 0 : void 0,
2665
+ right: T ? 0 : 16,
2666
+ bottom: T ? 0 : 16,
2548
2667
  ...g ? {
2549
2668
  position: "relative",
2550
2669
  top: 0,
@@ -2557,44 +2676,46 @@ function xn({
2557
2676
  zIndex: 0
2558
2677
  } : {}
2559
2678
  },
2560
- children: V ? (
2679
+ children: ue ? (
2561
2680
  // Only reachable in embedded mode (the launcher returns null while
2562
2681
  // booting): hold the widget's frame with a skeleton so a remount —
2563
2682
  // project/environment switch in the host app — doesn't flash an
2564
2683
  // empty hole where the chat was.
2565
- /* @__PURE__ */ q(Zt, { isOpen: !0, isMobile: O, skipAnimation: !0 })
2566
- ) : /* @__PURE__ */ q(
2567
- Kt,
2684
+ /* @__PURE__ */ x(Jt, { isOpen: !0, isMobile: T, skipAnimation: !0 })
2685
+ ) : /* @__PURE__ */ x(
2686
+ Gt,
2568
2687
  {
2569
- ...P,
2570
- hasIntroAnimation: !p,
2571
- isTestMode: E === "test",
2572
- isOpen: D,
2573
- keyboardInset: B,
2574
- messages: re,
2575
- onSendMessage: (ce, me) => (C?.(ce), ae(ce, me)),
2688
+ ...W,
2689
+ hasIntroAnimation: !h,
2690
+ isTestMode: R === "test",
2691
+ isOpen: A,
2692
+ keyboardInset: J,
2693
+ messages: Q,
2694
+ onSendMessage: (me, D) => (K(), S?.(me), fe(me, D)),
2576
2695
  onMessageClick: k,
2577
2696
  highlightedMessageId: j,
2578
- isMobile: O,
2579
- hasCloseButton: Y,
2580
- hasCleanChatButton: Q,
2581
- hasCopyButton: z,
2582
- isChatClosed: S,
2583
- onStartNewChat: A,
2584
- onRateChat: $,
2585
- onClose: () => G(!1),
2697
+ isMobile: T,
2698
+ hasCloseButton: re,
2699
+ hasCleanChatButton: ne,
2700
+ hasCopyButton: $,
2701
+ isChatClosed: O,
2702
+ onStartNewChat: M,
2703
+ onRateChat: B,
2704
+ isSoundMuted: X,
2705
+ onToggleSound: H,
2706
+ onClose: () => b(!1),
2586
2707
  onCleanChat: () => {
2587
- A(), b?.();
2708
+ M(), q?.();
2588
2709
  }
2589
2710
  }
2590
2711
  )
2591
2712
  }
2592
2713
  ),
2593
- !p && /* @__PURE__ */ q(
2594
- Ze,
2714
+ !h && /* @__PURE__ */ x(
2715
+ Ke,
2595
2716
  {
2596
2717
  className: "eloquentai-chat-launcher",
2597
- head: /* @__PURE__ */ q("style", { children: Le }),
2718
+ head: /* @__PURE__ */ x("style", { children: Ze }),
2598
2719
  style: {
2599
2720
  position: "fixed",
2600
2721
  bottom: 17,
@@ -2603,26 +2724,26 @@ function xn({
2603
2724
  width: 48,
2604
2725
  height: 48,
2605
2726
  border: "none",
2606
- zIndex: O ? 2147482999 : 2147483e3,
2607
- opacity: D ? 0 : 1,
2608
- pointerEvents: D ? "none" : "auto",
2609
- transition: D ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
2727
+ zIndex: T ? 2147482999 : 2147483e3,
2728
+ opacity: A ? 0 : 1,
2729
+ pointerEvents: A ? "none" : "auto",
2730
+ transition: A ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
2610
2731
  },
2611
- children: /* @__PURE__ */ q(
2612
- Ft,
2732
+ children: /* @__PURE__ */ x(
2733
+ eo,
2613
2734
  {
2614
- isOpen: D,
2615
- toggleBubble: () => G((ce) => !ce),
2616
- isDarkMode: P?.theme?.mode === "dark"
2735
+ isOpen: A,
2736
+ toggleBubble: () => b((me) => !me),
2737
+ isDarkMode: W?.theme?.mode === "dark"
2617
2738
  }
2618
2739
  )
2619
2740
  }
2620
2741
  ),
2621
- P?.displayWelcomeMessages ? /* @__PURE__ */ q(
2622
- Ze,
2742
+ W?.displayWelcomeMessages ? /* @__PURE__ */ x(
2743
+ Ke,
2623
2744
  {
2624
2745
  className: "eloquentai-chat-proactive-message",
2625
- head: /* @__PURE__ */ q("style", { children: Le }),
2746
+ head: /* @__PURE__ */ x("style", { children: Ze }),
2626
2747
  style: {
2627
2748
  position: "fixed",
2628
2749
  // Aligns the bubble's tail with the launcher's center: the
@@ -2631,22 +2752,22 @@ function xn({
2631
2752
  bottom: 24,
2632
2753
  right: 17
2633
2754
  },
2634
- children: /* @__PURE__ */ q(Ht, { ...P?.theme ?? {}, children: /* @__PURE__ */ q(
2755
+ children: /* @__PURE__ */ x(Yt, { ...W?.theme ?? {}, children: /* @__PURE__ */ x(
2635
2756
  "div",
2636
2757
  {
2637
- className: Xe("eloq:w-full eloq:h-full", {
2638
- dark: P?.theme?.mode === "dark"
2758
+ className: Qe("eloq:w-full eloq:h-full", {
2759
+ dark: W?.theme?.mode === "dark"
2639
2760
  }),
2640
- children: m && !F && /* @__PURE__ */ q(
2641
- Gt,
2761
+ children: v && !G && /* @__PURE__ */ x(
2762
+ oo,
2642
2763
  {
2643
- message: m.text,
2644
- isVisible: m.isVisible,
2645
- onDismiss: x,
2764
+ message: v.text,
2765
+ isVisible: v.isVisible,
2766
+ onDismiss: C,
2646
2767
  onMessageClick: () => {
2647
- G(!0), x();
2768
+ b(!0), C();
2648
2769
  },
2649
- autoHideDelay: m.autoHideDelay
2770
+ autoHideDelay: v.autoHideDelay
2650
2771
  }
2651
2772
  )
2652
2773
  }
@@ -2656,21 +2777,21 @@ function xn({
2656
2777
  ]
2657
2778
  }
2658
2779
  );
2659
- return /* @__PURE__ */ q(at, { children: g ? ie() : J ? /* @__PURE__ */ q(Jt, { container: J, children: ie() }) : null });
2780
+ return /* @__PURE__ */ x(st, { children: g ? pe() : ee ? /* @__PURE__ */ x(to, { container: ee, children: pe() }) : null });
2660
2781
  }
2661
- function kn(t) {
2662
- return /* @__PURE__ */ q(qn, { children: /* @__PURE__ */ q(wn, { children: /* @__PURE__ */ q(xn, { ...t }) }) });
2782
+ function Bn(e) {
2783
+ return /* @__PURE__ */ x(jn, { children: /* @__PURE__ */ x(Un, { children: /* @__PURE__ */ x($n, { ...e }) }) });
2663
2784
  }
2664
- function En(t, e) {
2785
+ function Hn(e, t) {
2665
2786
  return ((r, n, i) => {
2666
- const d = Vt.createRoot(n);
2667
- return d.render(/* @__PURE__ */ q(r, { ...i })), d.unmount;
2668
- })(kn, t, e);
2787
+ const c = Xt.createRoot(n);
2788
+ return c.render(/* @__PURE__ */ x(r, { ...i })), c.unmount;
2789
+ })(Bn, e, t);
2669
2790
  }
2670
2791
  export {
2671
- kn as Chat,
2672
- Kt as ChatInterface,
2673
- En as renderChat,
2674
- Lr as useRealtimeSocket
2792
+ Bn as Chat,
2793
+ Gt as ChatInterface,
2794
+ Hn as renderChat,
2795
+ Fr as useRealtimeSocket
2675
2796
  };
2676
2797
  //# sourceMappingURL=index.mjs.map