@eloquentai/chat-sdk 0.36.2-dev.6 → 0.37.0-dev.1

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