@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/components/chat-interface/header.d.ts +3 -1
- package/dist/components/chat-interface/types.d.ts +15 -0
- package/dist/components/embed/chat-bubble.d.ts +1 -1
- package/dist/components/embed/iframe.d.ts +5 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +1023 -948
- package/dist/index.mjs.map +1 -1
- package/dist/lib/focus.d.ts +6 -0
- package/dist/{skeleton-iVXhp7xX.js → skeleton-DuY4ejhj.js} +739 -700
- package/dist/{skeleton-iVXhp7xX.js.map → skeleton-DuY4ejhj.js.map} +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { L as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import
|
|
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] = "
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
"
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
71
|
+
o ? "eloq:bg-[#fff] eloq:text-[#000]" : "eloq:bg-[#000] eloq:text-[#fff]"
|
|
49
72
|
),
|
|
50
|
-
onClick:
|
|
51
|
-
children:
|
|
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
|
|
56
|
-
const [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
63
|
-
return
|
|
106
|
+
function io({ children: e, container: t }) {
|
|
107
|
+
return ot(e, t);
|
|
64
108
|
}
|
|
65
|
-
function
|
|
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,
|
|
73
|
-
|
|
116
|
+
const [a, u] = C(!1), [s, l] = C("entering"), [i, c] = C(!1), d = Mt();
|
|
117
|
+
if (K(() => {
|
|
74
118
|
if (t) {
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
119
|
+
u(!0), l("entering");
|
|
120
|
+
const h = setTimeout(() => {
|
|
121
|
+
l("visible");
|
|
78
122
|
}, 50);
|
|
79
|
-
|
|
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
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
125
|
+
l("exiting");
|
|
126
|
+
const h = setTimeout(() => {
|
|
127
|
+
u(!1), l("entering");
|
|
92
128
|
}, 300);
|
|
93
|
-
return () => clearTimeout(
|
|
129
|
+
return () => clearTimeout(h);
|
|
94
130
|
}
|
|
95
|
-
}, [t
|
|
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:
|
|
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__ */
|
|
156
|
+
children: /* @__PURE__ */ Ce(
|
|
107
157
|
"div",
|
|
108
158
|
{
|
|
109
|
-
className: "eloq:relative eloq:
|
|
110
|
-
|
|
111
|
-
|
|
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__ */
|
|
116
|
-
"
|
|
165
|
+
/* @__PURE__ */ Ce(
|
|
166
|
+
"button",
|
|
117
167
|
{
|
|
118
|
-
"
|
|
119
|
-
className:
|
|
120
|
-
|
|
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__ */
|
|
123
|
-
"
|
|
184
|
+
/* @__PURE__ */ Ce(
|
|
185
|
+
"svg",
|
|
124
186
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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__ */
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
|
|
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__ */
|
|
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:
|
|
160
|
-
|
|
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:
|
|
231
|
+
color: p
|
|
167
232
|
},
|
|
168
|
-
children: /* @__PURE__ */
|
|
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
|
-
)
|
|
240
|
+
);
|
|
176
241
|
}
|
|
177
|
-
function
|
|
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
|
|
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
|
|
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
|
|
255
|
+
function uo({
|
|
191
256
|
chatProps: e,
|
|
192
257
|
chatSettings: t
|
|
193
258
|
}) {
|
|
194
|
-
return
|
|
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
|
|
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
|
|
295
|
+
const ho = "eloquent-ai::conversation-data", Pe = typeof window < "u", fo = 1800 * 1e3;
|
|
231
296
|
function it({ appId: e }) {
|
|
232
|
-
const t =
|
|
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 (!
|
|
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 >
|
|
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,
|
|
324
|
+
(i, c, d, p, h) => {
|
|
260
325
|
try {
|
|
261
|
-
if (!
|
|
326
|
+
if (!Pe) return;
|
|
262
327
|
const f = {
|
|
263
328
|
conversationId: i,
|
|
264
|
-
userId:
|
|
329
|
+
userId: c,
|
|
265
330
|
deviceId: p,
|
|
266
|
-
messages:
|
|
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
|
-
),
|
|
341
|
+
), u = v(() => {
|
|
277
342
|
try {
|
|
278
|
-
if (!
|
|
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 (!
|
|
357
|
+
if (!Pe) return;
|
|
293
358
|
const i = localStorage.getItem(t);
|
|
294
359
|
if (i) {
|
|
295
|
-
const
|
|
360
|
+
const c = JSON.parse(i);
|
|
296
361
|
localStorage.setItem(
|
|
297
362
|
t,
|
|
298
363
|
JSON.stringify({
|
|
299
364
|
...o,
|
|
300
|
-
deviceId:
|
|
301
|
-
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]),
|
|
376
|
+
}, [t, o]), l = v(() => {
|
|
312
377
|
try {
|
|
313
|
-
if (!
|
|
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:
|
|
326
|
-
markChatClosed:
|
|
390
|
+
updateLastActivity: l,
|
|
391
|
+
markChatClosed: u
|
|
327
392
|
};
|
|
328
393
|
}
|
|
329
|
-
function
|
|
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
|
|
337
|
-
function
|
|
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
|
|
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
|
|
413
|
+
function ko(e) {
|
|
349
414
|
return `header-${btoa(JSON.stringify(e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")}`;
|
|
350
415
|
}
|
|
351
|
-
function
|
|
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
|
|
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:
|
|
362
|
-
} = e, s =
|
|
363
|
-
return new Promise((
|
|
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 =
|
|
367
|
-
|
|
368
|
-
|
|
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 =
|
|
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
|
-
},
|
|
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 ===
|
|
452
|
+
p.readyState === qo && p.send(JSON.stringify(b));
|
|
388
453
|
}, P = (b) => {
|
|
389
454
|
w && clearTimeout(w), w = setTimeout(() => {
|
|
390
|
-
|
|
391
|
-
},
|
|
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
|
-
|
|
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),
|
|
422
|
-
Date.now() -
|
|
423
|
-
},
|
|
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 }),
|
|
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
|
-
|
|
497
|
+
R(`Subscribe error: ${Ye(q.errors)}`);
|
|
433
498
|
return;
|
|
434
499
|
}
|
|
435
500
|
case "ka": {
|
|
436
|
-
|
|
501
|
+
E = Date.now();
|
|
437
502
|
return;
|
|
438
503
|
}
|
|
439
504
|
case "data": {
|
|
440
505
|
if (q.id !== i) return;
|
|
441
|
-
|
|
442
|
-
let
|
|
443
|
-
if (typeof
|
|
506
|
+
E = Date.now();
|
|
507
|
+
let k = q.event;
|
|
508
|
+
if (typeof k == "string")
|
|
444
509
|
try {
|
|
445
|
-
|
|
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
|
-
|
|
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
|
-
|
|
531
|
+
R("WebSocket closed");
|
|
467
532
|
}), p.addEventListener("error", () => {
|
|
468
|
-
|
|
533
|
+
R("WebSocket error");
|
|
469
534
|
});
|
|
470
535
|
});
|
|
471
536
|
}
|
|
472
|
-
function
|
|
537
|
+
function Co(e, t) {
|
|
473
538
|
return typeof t == "bigint" ? t.toString() : t;
|
|
474
539
|
}
|
|
475
|
-
class
|
|
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
|
|
485
|
-
return new
|
|
549
|
+
function Io(e) {
|
|
550
|
+
return new So(e);
|
|
486
551
|
}
|
|
487
|
-
function
|
|
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
|
|
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
|
|
564
|
+
const St = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
500
565
|
};
|
|
501
|
-
function
|
|
566
|
+
function rt(e) {
|
|
502
567
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
503
568
|
}
|
|
504
|
-
function
|
|
505
|
-
if (
|
|
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 !(
|
|
576
|
+
return !(rt(o) === !1 || Object.prototype.hasOwnProperty.call(o, "isPrototypeOf") === !1);
|
|
512
577
|
}
|
|
513
|
-
function
|
|
578
|
+
function dt(e) {
|
|
514
579
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
515
580
|
}
|
|
516
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
623
|
+
function Oe(e) {
|
|
559
624
|
return typeof e == "string" ? e : e?.message;
|
|
560
625
|
}
|
|
561
|
-
function
|
|
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
|
|
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,
|
|
571
|
-
for (const
|
|
572
|
-
|
|
573
|
-
return s.path ?? (s.path = []), s.message =
|
|
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
|
|
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 }) :
|
|
643
|
+
r.get ? Object.defineProperty(e, o, { ...r, enumerable: !1 }) : Oo(e, o, r.value);
|
|
579
644
|
}
|
|
580
645
|
}
|
|
581
|
-
function
|
|
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
|
|
585
|
-
return
|
|
649
|
+
function Po(e, t, o) {
|
|
650
|
+
return De(e, t, o, !1);
|
|
586
651
|
}
|
|
587
|
-
function
|
|
652
|
+
function Oo(e, t, o) {
|
|
588
653
|
Object.defineProperty(e, t, {
|
|
589
654
|
configurable: !0,
|
|
590
655
|
get() {
|
|
591
|
-
return this == null ? o :
|
|
656
|
+
return this == null ? o : De(this, t, o.bind(this));
|
|
592
657
|
},
|
|
593
658
|
set(r) {
|
|
594
|
-
|
|
659
|
+
De(this, t, r);
|
|
595
660
|
}
|
|
596
661
|
});
|
|
597
662
|
}
|
|
598
|
-
function
|
|
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
|
|
603
|
-
const
|
|
667
|
+
let Xe, ye = !1;
|
|
668
|
+
const jo = {
|
|
604
669
|
configurable: !0,
|
|
605
670
|
get() {
|
|
606
|
-
|
|
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 &&
|
|
612
|
-
|
|
676
|
+
if (t in r && Xe !== e._zod) {
|
|
677
|
+
Xe = void 0;
|
|
613
678
|
return;
|
|
614
679
|
}
|
|
615
|
-
|
|
680
|
+
Xe = e._zod, Object.defineProperty(r, t, {
|
|
616
681
|
configurable: !0,
|
|
617
682
|
get() {
|
|
618
|
-
Object.defineProperty(this, t,
|
|
619
|
-
const n =
|
|
620
|
-
|
|
683
|
+
Object.defineProperty(this, t, jo);
|
|
684
|
+
const n = ye;
|
|
685
|
+
ye = !1;
|
|
621
686
|
try {
|
|
622
687
|
const a = o(this);
|
|
623
|
-
return
|
|
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],
|
|
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
|
|
634
|
-
const n =
|
|
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
|
|
647
|
-
const
|
|
648
|
-
let
|
|
649
|
-
function
|
|
650
|
-
const t =
|
|
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
|
|
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
|
|
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
|
|
675
|
-
function
|
|
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
|
-
|
|
745
|
+
Qe.value = new a(h);
|
|
681
746
|
try {
|
|
682
|
-
Object.defineProperty(p, "_zod",
|
|
747
|
+
Object.defineProperty(p, "_zod", Qe);
|
|
683
748
|
} finally {
|
|
684
|
-
|
|
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),
|
|
753
|
+
const g = Object.getPrototypeOf(p), E = p._zod.constr.prototype;
|
|
689
754
|
let w = g;
|
|
690
|
-
for (; w && w !==
|
|
755
|
+
for (; w && w !== E; )
|
|
691
756
|
w = Object.getPrototypeOf(w);
|
|
692
757
|
const z = w ?? g;
|
|
693
|
-
s.has(z) || (s.add(z),
|
|
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
|
|
765
|
+
class c extends i {
|
|
701
766
|
}
|
|
702
|
-
Object.defineProperty(
|
|
767
|
+
Object.defineProperty(c, "name", { value: e });
|
|
703
768
|
function d(p) {
|
|
704
|
-
const h = r?.Parent ?
|
|
705
|
-
|
|
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
|
|
709
|
-
|
|
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:
|
|
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
|
|
784
|
+
class je extends Error {
|
|
720
785
|
constructor() {
|
|
721
786
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
722
787
|
}
|
|
723
788
|
}
|
|
724
|
-
(
|
|
725
|
-
const
|
|
726
|
-
function
|
|
727
|
-
return e && Object.assign(
|
|
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
|
|
794
|
+
function Bo() {
|
|
730
795
|
const e = this._zod;
|
|
731
|
-
return e.message ?? (e.message = JSON.stringify(e.def,
|
|
796
|
+
return e.message ?? (e.message = JSON.stringify(e.def, Co, 2)), e.message;
|
|
732
797
|
}
|
|
733
|
-
function
|
|
798
|
+
function Lo(e) {
|
|
734
799
|
this._zod.message = e;
|
|
735
800
|
}
|
|
736
|
-
const
|
|
737
|
-
get:
|
|
738
|
-
set:
|
|
801
|
+
const No = {
|
|
802
|
+
get: Bo,
|
|
803
|
+
set: Lo,
|
|
739
804
|
enumerable: !0,
|
|
740
805
|
configurable: !0
|
|
741
|
-
},
|
|
742
|
-
e.name = "$ZodError",
|
|
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
|
-
|
|
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
|
-
},
|
|
820
|
+
}, We = Q("$ZodError", Zo, void 0, {
|
|
756
821
|
Parent: Error
|
|
757
|
-
}),
|
|
822
|
+
}), Ko = (e) => {
|
|
758
823
|
const t = (o, r, n, a) => {
|
|
759
|
-
const
|
|
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
|
|
826
|
+
throw new je();
|
|
762
827
|
if (s.issues.length) {
|
|
763
|
-
const
|
|
764
|
-
throw
|
|
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
|
-
},
|
|
834
|
+
}, Vo = /* @__PURE__ */ Ko(We), Wo = (e) => {
|
|
770
835
|
const t = async (o, r, n, a) => {
|
|
771
|
-
const
|
|
772
|
-
let s = o._zod.run({ value: r, issues: [] },
|
|
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
|
|
775
|
-
throw
|
|
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
|
-
},
|
|
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
|
|
784
|
-
return a.issues.length ?
|
|
785
|
-
},
|
|
786
|
-
function
|
|
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) =>
|
|
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
|
|
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 ?
|
|
802
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
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
|
|
812
|
-
|
|
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,
|
|
883
|
+
const a = (s, l, i) => {
|
|
819
884
|
if (s.memo)
|
|
820
885
|
return s;
|
|
821
|
-
let
|
|
822
|
-
for (const p of
|
|
886
|
+
let c = Se(s), d;
|
|
887
|
+
for (const p of l) {
|
|
823
888
|
if (p._zod.def.when) {
|
|
824
|
-
if (
|
|
889
|
+
if (Mo(s) || !p._zod.def.when(s))
|
|
825
890
|
continue;
|
|
826
|
-
} else if (
|
|
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
|
|
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 && (
|
|
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
|
-
|
|
903
|
+
pt(s.issues, h, e), c || (c = Se(s, h));
|
|
839
904
|
}
|
|
840
905
|
}
|
|
841
906
|
return d ? d.then(() => s) : s;
|
|
842
|
-
},
|
|
843
|
-
if (
|
|
907
|
+
}, u = (s, l, i) => {
|
|
908
|
+
if (Se(s))
|
|
844
909
|
return s.aborted = !0, s;
|
|
845
|
-
const
|
|
846
|
-
if (
|
|
910
|
+
const c = a(l, n, i);
|
|
911
|
+
if (c instanceof Promise) {
|
|
847
912
|
if (i.async === !1)
|
|
848
|
-
throw new
|
|
849
|
-
return
|
|
913
|
+
throw new je();
|
|
914
|
+
return c.then((d) => e._zod.parse(d, i));
|
|
850
915
|
}
|
|
851
|
-
return e._zod.parse(
|
|
916
|
+
return e._zod.parse(c, i);
|
|
852
917
|
};
|
|
853
|
-
e._zod.run = (s,
|
|
854
|
-
if (
|
|
855
|
-
return e._zod.parse(s,
|
|
856
|
-
if (
|
|
857
|
-
const
|
|
858
|
-
return
|
|
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,
|
|
925
|
+
const i = e._zod.parse(s, l);
|
|
861
926
|
if (i instanceof Promise) {
|
|
862
|
-
if (
|
|
863
|
-
throw new
|
|
864
|
-
return i.then((
|
|
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,
|
|
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
|
|
937
|
+
return Po(this, "~standard", rr(this));
|
|
873
938
|
},
|
|
874
939
|
set "~standard"(e) {
|
|
875
|
-
|
|
940
|
+
De(this, "~standard", e);
|
|
876
941
|
}
|
|
877
|
-
}), Et = (e, t) => e.issues.length ? { issues: e.issues.map((o) =>
|
|
878
|
-
async function
|
|
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
|
|
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
|
|
957
|
+
return or(e, t);
|
|
893
958
|
},
|
|
894
959
|
vendor: "zod",
|
|
895
960
|
version: 1
|
|
896
961
|
};
|
|
897
962
|
}
|
|
898
|
-
const
|
|
899
|
-
|
|
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
|
-
}),
|
|
913
|
-
|
|
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
|
|
924
|
-
const
|
|
925
|
-
if (!(!
|
|
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 && !
|
|
992
|
+
if (n !== void 0 && s && !u)
|
|
928
993
|
return;
|
|
929
|
-
t.issues.push(...
|
|
994
|
+
t.issues.push(...Ue(o, e.issues));
|
|
930
995
|
}
|
|
931
|
-
if (!
|
|
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 ? (
|
|
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
|
|
944
|
-
function
|
|
945
|
-
const t = Object.keys(e.shape), o = Object.getOwnPropertySymbols(e.shape), r = o.length ? o :
|
|
946
|
-
for (const
|
|
947
|
-
if (!e.shape?.[
|
|
948
|
-
throw new Error(`Invalid element at key "${String(
|
|
949
|
-
const a =
|
|
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
|
|
961
|
-
const s = [],
|
|
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 (
|
|
965
|
-
if (
|
|
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 (
|
|
1034
|
+
if (l.has(f))
|
|
970
1035
|
continue;
|
|
971
1036
|
if (f === "__proto__") {
|
|
972
|
-
|
|
1037
|
+
c === "never" && s.push(f);
|
|
973
1038
|
continue;
|
|
974
1039
|
}
|
|
975
|
-
if (
|
|
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((
|
|
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
|
|
992
|
-
|
|
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
|
|
997
|
-
return Object.defineProperty(t, "shape", { value:
|
|
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 =
|
|
1066
|
+
const n = Io(() => sr(t));
|
|
1002
1067
|
me(e, "propValues", (i) => {
|
|
1003
|
-
const
|
|
1004
|
-
for (const p in
|
|
1005
|
-
const h =
|
|
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) ||
|
|
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 =
|
|
1080
|
+
const a = rt, u = t.catchall;
|
|
1016
1081
|
let s;
|
|
1017
|
-
const
|
|
1018
|
-
|
|
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 =
|
|
1029
|
-
const p = [], h = s.shape, f =
|
|
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
|
|
1096
|
+
for (const E of s.allKeys) {
|
|
1032
1097
|
if (f && i.issues.length !== g) {
|
|
1033
|
-
if (
|
|
1098
|
+
if (Se(i, g))
|
|
1034
1099
|
break;
|
|
1035
1100
|
g = i.issues.length;
|
|
1036
1101
|
}
|
|
1037
|
-
if (
|
|
1102
|
+
if (E === "__proto__")
|
|
1038
1103
|
continue;
|
|
1039
|
-
const w = h[
|
|
1040
|
-
|
|
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
|
|
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
|
|
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) => !
|
|
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((
|
|
1119
|
+
errors: e.map((a) => a.issues.map((u) => Ee(u, r, xe())))
|
|
1055
1120
|
}), t);
|
|
1056
1121
|
}
|
|
1057
|
-
const
|
|
1058
|
-
|
|
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) =>
|
|
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
|
|
1137
|
+
const u = [];
|
|
1073
1138
|
for (const s of t.options) {
|
|
1074
|
-
const
|
|
1139
|
+
const l = s._zod.run({
|
|
1075
1140
|
value: r.value,
|
|
1076
1141
|
issues: []
|
|
1077
1142
|
}, n);
|
|
1078
|
-
if (
|
|
1079
|
-
|
|
1143
|
+
if (l instanceof Promise)
|
|
1144
|
+
u.push(l), a = !0;
|
|
1080
1145
|
else {
|
|
1081
|
-
if (
|
|
1082
|
-
return
|
|
1083
|
-
|
|
1146
|
+
if (l.issues.length === 0)
|
|
1147
|
+
return l;
|
|
1148
|
+
u.push(l);
|
|
1084
1149
|
}
|
|
1085
1150
|
}
|
|
1086
|
-
return a ? Promise.all(
|
|
1151
|
+
return a ? Promise.all(u).then((s) => mt(s, r, e, n)) : mt(u, r, e, n);
|
|
1087
1152
|
};
|
|
1088
|
-
}),
|
|
1089
|
-
|
|
1090
|
-
const o =
|
|
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 (!
|
|
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
|
|
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
|
|
1104
|
-
for (const
|
|
1105
|
-
if (typeof
|
|
1106
|
-
if (
|
|
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:
|
|
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) =>
|
|
1116
|
-
input:
|
|
1117
|
-
path: [
|
|
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[
|
|
1126
|
-
h instanceof Promise ?
|
|
1127
|
-
f.issues.length && r.issues.push(...
|
|
1128
|
-
})) : (h.issues.length && r.issues.push(...
|
|
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
|
|
1132
|
-
if (!
|
|
1196
|
+
for (const c in a)
|
|
1197
|
+
if (!l.has(c))
|
|
1133
1198
|
if (t.mode === "loose") {
|
|
1134
|
-
if (
|
|
1199
|
+
if (c === "__proto__")
|
|
1135
1200
|
continue;
|
|
1136
|
-
r.value[
|
|
1201
|
+
r.value[c] = a[c];
|
|
1137
1202
|
} else
|
|
1138
|
-
i = i ?? [], i.push(
|
|
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
|
|
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
|
|
1153
|
-
if (
|
|
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" &&
|
|
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 && (
|
|
1224
|
+
f.issues.length === 0 && (c = f);
|
|
1160
1225
|
}
|
|
1161
|
-
if (
|
|
1162
|
-
t.mode === "loose" ? r.value[i] = a[i] : s ? (
|
|
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:
|
|
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 =
|
|
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 ?
|
|
1177
|
-
f.issues.length && r.issues.push(...
|
|
1178
|
-
})) : (h.issues.length && r.issues.push(...
|
|
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
|
-
|
|
1245
|
+
l && l.length > 0 && r.issues.push({
|
|
1181
1246
|
code: "unrecognized_keys",
|
|
1182
1247
|
input: a,
|
|
1183
1248
|
inst: e,
|
|
1184
|
-
keys:
|
|
1249
|
+
keys: l,
|
|
1185
1250
|
continue: !0
|
|
1186
1251
|
});
|
|
1187
1252
|
}
|
|
1188
|
-
return
|
|
1253
|
+
return u.length ? Promise.all(u).then(() => r) : r;
|
|
1189
1254
|
};
|
|
1190
|
-
}),
|
|
1191
|
-
|
|
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" ?
|
|
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
|
-
}),
|
|
1206
|
-
|
|
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(`^(${
|
|
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
|
|
1276
|
+
function fr(e) {
|
|
1212
1277
|
return e.checks && (e.checks = [...e.checks]), e;
|
|
1213
1278
|
}
|
|
1214
1279
|
// @__NO_SIDE_EFFECTS__
|
|
1215
|
-
function
|
|
1216
|
-
return new e(
|
|
1280
|
+
function gr(e, t) {
|
|
1281
|
+
return new e(fr({ type: "string", ...Ie(t) }));
|
|
1217
1282
|
}
|
|
1218
1283
|
// @__NO_SIDE_EFFECTS__
|
|
1219
|
-
function
|
|
1284
|
+
function mr(e, t) {
|
|
1220
1285
|
return new e({
|
|
1221
1286
|
type: "null",
|
|
1222
|
-
...
|
|
1287
|
+
...Ie(t)
|
|
1223
1288
|
});
|
|
1224
1289
|
}
|
|
1225
|
-
const
|
|
1290
|
+
const Re = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
|
|
1226
1291
|
if (!e._zod)
|
|
1227
1292
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
1228
|
-
|
|
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
|
-
|
|
1300
|
+
De(this, "with", e);
|
|
1236
1301
|
},
|
|
1237
1302
|
parse(e, t) {
|
|
1238
|
-
return
|
|
1303
|
+
return Vo(this, e, t, { callee: this.parse });
|
|
1239
1304
|
},
|
|
1240
1305
|
parseAsync(e, t) {
|
|
1241
|
-
return
|
|
1306
|
+
return Fo(this, e, t, { callee: this.parseAsync });
|
|
1242
1307
|
},
|
|
1243
1308
|
safeParse(e, t) {
|
|
1244
|
-
return
|
|
1309
|
+
return Jo(this, e, t);
|
|
1245
1310
|
},
|
|
1246
1311
|
safeParseAsync(e, t) {
|
|
1247
|
-
return
|
|
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
|
|
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
|
-
}),
|
|
1272
|
-
|
|
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__ */
|
|
1341
|
+
return /* @__PURE__ */ gr(br, e);
|
|
1277
1342
|
}
|
|
1278
|
-
const
|
|
1279
|
-
|
|
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
|
|
1283
|
-
return /* @__PURE__ */
|
|
1347
|
+
function wr(e) {
|
|
1348
|
+
return /* @__PURE__ */ mr(vr, e);
|
|
1284
1349
|
}
|
|
1285
|
-
const
|
|
1286
|
-
|
|
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
|
|
1354
|
+
function B(e, t) {
|
|
1290
1355
|
const o = {
|
|
1291
1356
|
type: "object",
|
|
1292
1357
|
shape: e ?? {},
|
|
1293
|
-
...
|
|
1358
|
+
...Ie(t)
|
|
1294
1359
|
};
|
|
1295
|
-
return new
|
|
1360
|
+
return new qr(o);
|
|
1296
1361
|
}
|
|
1297
|
-
const
|
|
1298
|
-
|
|
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
|
|
1302
|
-
return new
|
|
1366
|
+
function xr(e, t) {
|
|
1367
|
+
return new yr({
|
|
1303
1368
|
type: "union",
|
|
1304
1369
|
options: e,
|
|
1305
|
-
...
|
|
1370
|
+
...Ie(t)
|
|
1306
1371
|
});
|
|
1307
1372
|
}
|
|
1308
|
-
const
|
|
1309
|
-
|
|
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
|
|
1313
|
-
return !t || !t._zod ? new
|
|
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
|
-
...
|
|
1318
|
-
}) : new
|
|
1382
|
+
...Ie(t)
|
|
1383
|
+
}) : new bt({
|
|
1319
1384
|
type: "record",
|
|
1320
1385
|
keyType: e,
|
|
1321
1386
|
valueType: t,
|
|
1322
|
-
...
|
|
1387
|
+
...Ie(o)
|
|
1323
1388
|
});
|
|
1324
1389
|
}
|
|
1325
|
-
const
|
|
1326
|
-
|
|
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
|
|
1395
|
+
return new _r({
|
|
1331
1396
|
type: "literal",
|
|
1332
1397
|
values: Array.isArray(e) ? e : [e],
|
|
1333
|
-
...
|
|
1398
|
+
...Ie(t)
|
|
1334
1399
|
});
|
|
1335
1400
|
}
|
|
1336
|
-
const
|
|
1337
|
-
|
|
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
|
|
1406
|
+
return new Cr({
|
|
1342
1407
|
type: "nullable",
|
|
1343
1408
|
innerType: e
|
|
1344
1409
|
});
|
|
1345
1410
|
}
|
|
1346
|
-
|
|
1347
|
-
const
|
|
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
|
-
}),
|
|
1416
|
+
}), Ir = /* @__PURE__ */ B({
|
|
1352
1417
|
type: /* @__PURE__ */ fe("agent_cognition"),
|
|
1353
1418
|
content: /* @__PURE__ */ T()
|
|
1354
|
-
}),
|
|
1419
|
+
}), Er = /* @__PURE__ */ B({
|
|
1355
1420
|
type: /* @__PURE__ */ fe("chat_closed_expired"),
|
|
1356
1421
|
content: /* @__PURE__ */ T()
|
|
1357
|
-
}),
|
|
1422
|
+
}), Rr = /* @__PURE__ */ B({
|
|
1358
1423
|
type: /* @__PURE__ */ fe("agent_captured_url"),
|
|
1359
1424
|
content: /* @__PURE__ */ T()
|
|
1360
|
-
}),
|
|
1425
|
+
}), zr = /* @__PURE__ */ B({
|
|
1361
1426
|
type: /* @__PURE__ */ fe("agent_topic"),
|
|
1362
1427
|
content: /* @__PURE__ */ T()
|
|
1363
|
-
}),
|
|
1428
|
+
}), Tr = /* @__PURE__ */ B({
|
|
1364
1429
|
type: /* @__PURE__ */ fe("agent_summary"),
|
|
1365
1430
|
content: /* @__PURE__ */ T()
|
|
1366
|
-
}),
|
|
1431
|
+
}), Mr = /* @__PURE__ */ B({
|
|
1367
1432
|
type: /* @__PURE__ */ fe("chat_rating"),
|
|
1368
1433
|
content: /* @__PURE__ */ T()
|
|
1369
|
-
}),
|
|
1434
|
+
}), Ar = /* @__PURE__ */ B({
|
|
1370
1435
|
type: /* @__PURE__ */ fe("breadcrumb"),
|
|
1371
1436
|
content: /* @__PURE__ */ T()
|
|
1372
|
-
}),
|
|
1437
|
+
}), Pr = /* @__PURE__ */ B({
|
|
1373
1438
|
type: /* @__PURE__ */ fe("chat_escalated"),
|
|
1374
|
-
content: /* @__PURE__ */
|
|
1375
|
-
}),
|
|
1439
|
+
content: /* @__PURE__ */ wr()
|
|
1440
|
+
}), Or = /* @__PURE__ */ B({
|
|
1376
1441
|
type: /* @__PURE__ */ fe("error"),
|
|
1377
1442
|
code: /* @__PURE__ */ T()
|
|
1378
|
-
}),
|
|
1443
|
+
}), Ur = /* @__PURE__ */ B({
|
|
1379
1444
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1380
1445
|
created_at: /* @__PURE__ */ T(),
|
|
1381
|
-
data:
|
|
1382
|
-
}),
|
|
1446
|
+
data: Sr
|
|
1447
|
+
}), jr = /* @__PURE__ */ B({
|
|
1383
1448
|
created_at: /* @__PURE__ */ T(),
|
|
1384
|
-
data:
|
|
1385
|
-
}),
|
|
1449
|
+
data: Or
|
|
1450
|
+
}), Dr = /* @__PURE__ */ B({
|
|
1386
1451
|
created_at: /* @__PURE__ */ T(),
|
|
1387
|
-
data:
|
|
1388
|
-
}),
|
|
1452
|
+
data: Ir
|
|
1453
|
+
}), $r = /* @__PURE__ */ B({
|
|
1389
1454
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1390
1455
|
created_at: /* @__PURE__ */ T(),
|
|
1391
|
-
data:
|
|
1392
|
-
}),
|
|
1456
|
+
data: Er
|
|
1457
|
+
}), Br = /* @__PURE__ */ B({
|
|
1393
1458
|
created_at: /* @__PURE__ */ T(),
|
|
1394
|
-
data:
|
|
1395
|
-
}),
|
|
1459
|
+
data: Rr
|
|
1460
|
+
}), Lr = /* @__PURE__ */ B({
|
|
1396
1461
|
created_at: /* @__PURE__ */ T(),
|
|
1397
|
-
data:
|
|
1398
|
-
}),
|
|
1462
|
+
data: zr
|
|
1463
|
+
}), Nr = /* @__PURE__ */ B({
|
|
1399
1464
|
created_at: /* @__PURE__ */ T(),
|
|
1400
|
-
data:
|
|
1401
|
-
}),
|
|
1465
|
+
data: Tr
|
|
1466
|
+
}), Zr = /* @__PURE__ */ B({
|
|
1402
1467
|
created_at: /* @__PURE__ */ T(),
|
|
1403
|
-
data:
|
|
1404
|
-
}),
|
|
1468
|
+
data: Mr
|
|
1469
|
+
}), Kr = /* @__PURE__ */ B({
|
|
1405
1470
|
created_at: /* @__PURE__ */ T(),
|
|
1406
|
-
data:
|
|
1407
|
-
}),
|
|
1471
|
+
data: Ar
|
|
1472
|
+
}), Vr = /* @__PURE__ */ B({
|
|
1408
1473
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1409
1474
|
created_at: /* @__PURE__ */ T(),
|
|
1410
|
-
data:
|
|
1411
|
-
}),
|
|
1412
|
-
|
|
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
|
-
|
|
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
|
-
}),
|
|
1427
|
-
data:
|
|
1428
|
-
}),
|
|
1429
|
-
data: /* @__PURE__ */
|
|
1430
|
-
}),
|
|
1431
|
-
function
|
|
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:
|
|
1503
|
+
onCognitionComplete: u,
|
|
1439
1504
|
onError: s,
|
|
1440
|
-
onChatClosed:
|
|
1505
|
+
onChatClosed: l,
|
|
1441
1506
|
onAgentCapturedUrl: i,
|
|
1442
|
-
onAgentTopic:
|
|
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:
|
|
1513
|
+
backupPollingInterval: E = Xr
|
|
1449
1514
|
}) {
|
|
1450
|
-
const w =
|
|
1451
|
-
|
|
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 =
|
|
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
|
-
|
|
1461
|
-
}, []),
|
|
1462
|
-
|
|
1463
|
-
}, [
|
|
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
|
-
}, []),
|
|
1466
|
-
}),
|
|
1530
|
+
}, []), W = $(() => {
|
|
1531
|
+
}), ne = v(
|
|
1467
1532
|
async (M) => {
|
|
1468
1533
|
U();
|
|
1469
|
-
const le = x.current,
|
|
1470
|
-
if (!le || !
|
|
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
|
|
1537
|
+
const F = be.current(), Ae = await _o({
|
|
1473
1538
|
httpEndpoint: le,
|
|
1474
|
-
auth:
|
|
1539
|
+
auth: F ? { authorizationToken: F } : { apiKey: we },
|
|
1475
1540
|
channel: `/default/chat/${M}`,
|
|
1476
1541
|
onDisconnect: () => {
|
|
1477
|
-
z.current = null,
|
|
1542
|
+
z.current = null, W.current();
|
|
1478
1543
|
},
|
|
1479
|
-
onEvent: (
|
|
1480
|
-
const
|
|
1481
|
-
if (!
|
|
1482
|
-
console.error("Invalid conversation response:",
|
|
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 =
|
|
1550
|
+
const ge = qe.data;
|
|
1486
1551
|
switch (ge.data.type) {
|
|
1487
1552
|
case "utterance": {
|
|
1488
|
-
const
|
|
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),
|
|
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:
|
|
1497
|
-
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
|
|
1511
|
-
D.current(
|
|
1575
|
+
const N = ge;
|
|
1576
|
+
D.current(N.data.content);
|
|
1512
1577
|
return;
|
|
1513
1578
|
}
|
|
1514
1579
|
case "agent_captured_url": {
|
|
1515
|
-
const
|
|
1516
|
-
oe.current?.(
|
|
1580
|
+
const N = ge;
|
|
1581
|
+
oe.current?.(N.data.content);
|
|
1517
1582
|
return;
|
|
1518
1583
|
}
|
|
1519
1584
|
case "agent_topic": {
|
|
1520
|
-
const
|
|
1521
|
-
ce.current?.(
|
|
1585
|
+
const N = ge;
|
|
1586
|
+
ce.current?.(N.data.content);
|
|
1522
1587
|
return;
|
|
1523
1588
|
}
|
|
1524
1589
|
case "agent_summary": {
|
|
1525
|
-
const
|
|
1526
|
-
G.current?.(
|
|
1590
|
+
const N = ge;
|
|
1591
|
+
G.current?.(N.data.content);
|
|
1527
1592
|
return;
|
|
1528
1593
|
}
|
|
1529
1594
|
case "chat_closed_expired": {
|
|
1530
|
-
V.current?.(),
|
|
1595
|
+
V.current?.(), se.current?.();
|
|
1531
1596
|
return;
|
|
1532
1597
|
}
|
|
1533
1598
|
case "chat_rating": {
|
|
1534
|
-
|
|
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?.(),
|
|
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 =
|
|
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
|
-
|
|
1624
|
+
L,
|
|
1560
1625
|
pe,
|
|
1561
1626
|
x,
|
|
1562
1627
|
O,
|
|
1563
1628
|
be,
|
|
1564
|
-
|
|
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
|
-
|
|
1637
|
+
se,
|
|
1573
1638
|
Y
|
|
1574
1639
|
]
|
|
1575
|
-
),
|
|
1640
|
+
), X = v(
|
|
1576
1641
|
async (M) => {
|
|
1577
1642
|
let le;
|
|
1578
1643
|
try {
|
|
1579
1644
|
le = await ue.current(M);
|
|
1580
|
-
} catch (
|
|
1581
|
-
console.warn("Backup poll failed:",
|
|
1645
|
+
} catch (F) {
|
|
1646
|
+
console.warn("Backup poll failed:", F);
|
|
1582
1647
|
return;
|
|
1583
1648
|
}
|
|
1584
1649
|
if (A.current !== M) return;
|
|
1585
|
-
const
|
|
1586
|
-
(
|
|
1650
|
+
const we = le.filter(
|
|
1651
|
+
(F) => F.role === "user" || F.role === "assistant"
|
|
1587
1652
|
);
|
|
1588
|
-
|
|
1589
|
-
if (!
|
|
1653
|
+
we.forEach((F, Ae) => {
|
|
1654
|
+
if (!F.message_id || w.current.has(F.message_id))
|
|
1590
1655
|
return;
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1593
|
-
|
|
1594
|
-
|
|
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
|
-
|
|
1597
|
-
|
|
1661
|
+
_e,
|
|
1662
|
+
F.created_at
|
|
1598
1663
|
);
|
|
1599
1664
|
return;
|
|
1600
1665
|
}
|
|
1601
|
-
w.current.add(
|
|
1666
|
+
w.current.add(F.message_id), L(), ae.current(qe, M, _e);
|
|
1602
1667
|
});
|
|
1603
1668
|
},
|
|
1604
|
-
[ue,
|
|
1605
|
-
),
|
|
1669
|
+
[ue, ae, ie, L]
|
|
1670
|
+
), ve = v(
|
|
1606
1671
|
(M) => {
|
|
1607
|
-
|
|
1608
|
-
() =>
|
|
1609
|
-
|
|
1672
|
+
y(), P.current = setInterval(
|
|
1673
|
+
() => X(M),
|
|
1674
|
+
E
|
|
1610
1675
|
);
|
|
1611
1676
|
},
|
|
1612
|
-
[
|
|
1613
|
-
),
|
|
1677
|
+
[y, X, E]
|
|
1678
|
+
), ze = v(
|
|
1614
1679
|
function M() {
|
|
1615
|
-
if (!te.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
|
|
1620
|
-
|
|
1621
|
-
|
|
1684
|
+
const we = Math.min(
|
|
1685
|
+
Gr * Math.pow(2, R.current),
|
|
1686
|
+
Yr
|
|
1622
1687
|
);
|
|
1623
|
-
|
|
1624
|
-
j.current = null,
|
|
1688
|
+
R.current += 1, j.current = setTimeout(async () => {
|
|
1689
|
+
j.current = null, ee.current = !0;
|
|
1625
1690
|
try {
|
|
1626
|
-
await
|
|
1691
|
+
await ne(le), R.current = 0, ee.current = !1, await X(le);
|
|
1627
1692
|
} catch {
|
|
1628
|
-
|
|
1693
|
+
ee.current = !1, M();
|
|
1629
1694
|
}
|
|
1630
|
-
},
|
|
1695
|
+
}, we);
|
|
1631
1696
|
},
|
|
1632
|
-
[
|
|
1697
|
+
[ne, X]
|
|
1633
1698
|
);
|
|
1634
|
-
|
|
1635
|
-
|
|
1699
|
+
K(() => {
|
|
1700
|
+
W.current = ze;
|
|
1636
1701
|
});
|
|
1637
|
-
const
|
|
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
|
-
|
|
1708
|
+
S(), te.current = !0, A.current = M, R.current = 0, ve(M), await ne(M);
|
|
1644
1709
|
},
|
|
1645
|
-
[m,
|
|
1646
|
-
),
|
|
1647
|
-
te.current = !1, A.current = null,
|
|
1648
|
-
}, [
|
|
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 =
|
|
1652
|
-
|
|
1653
|
-
() =>
|
|
1654
|
-
|
|
1716
|
+
const le = k.current + 1;
|
|
1717
|
+
_(), k.current = le, b.current = setInterval(
|
|
1718
|
+
() => X(M),
|
|
1719
|
+
Qr
|
|
1655
1720
|
), q.current = setTimeout(
|
|
1656
|
-
|
|
1657
|
-
|
|
1721
|
+
_,
|
|
1722
|
+
en
|
|
1658
1723
|
);
|
|
1659
|
-
}, [
|
|
1724
|
+
}, [X, _]), He = v(() => {
|
|
1660
1725
|
w.current.clear();
|
|
1661
1726
|
}, []);
|
|
1662
|
-
return
|
|
1663
|
-
!t || !m || A.current === t ||
|
|
1664
|
-
console.error("Failed to eagerly connect:", M), A.current === t && (te.current = !0,
|
|
1665
|
-
}).then(() =>
|
|
1666
|
-
}, [t, m,
|
|
1667
|
-
|
|
1668
|
-
}, [
|
|
1669
|
-
}
|
|
1670
|
-
function
|
|
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
|
|
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
|
|
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
|
-
(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
1832
|
+
apiClient: u,
|
|
1768
1833
|
chatSettings: s,
|
|
1769
|
-
messages:
|
|
1834
|
+
messages: l,
|
|
1770
1835
|
setMessages: i,
|
|
1771
|
-
currentChat:
|
|
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:
|
|
1842
|
+
const { saveChatData: g, clearChatData: E, updateLastActivity: w, markChatClosed: z } = it({
|
|
1778
1843
|
appId: e
|
|
1779
|
-
}), { publishApiError: A, publishNetworkError:
|
|
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,
|
|
1783
|
-
(
|
|
1784
|
-
),
|
|
1785
|
-
(
|
|
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 && !
|
|
1788
|
-
const
|
|
1789
|
-
i((
|
|
1790
|
-
if (
|
|
1791
|
-
return
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
|
|
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
|
-
|
|
1865
|
+
ne,
|
|
1801
1866
|
a,
|
|
1802
1867
|
b.current?.getChatToken()
|
|
1803
|
-
),
|
|
1868
|
+
), ne;
|
|
1804
1869
|
});
|
|
1805
1870
|
},
|
|
1806
1871
|
[
|
|
@@ -1813,70 +1878,70 @@ function ln({
|
|
|
1813
1878
|
q,
|
|
1814
1879
|
f
|
|
1815
1880
|
]
|
|
1816
|
-
),
|
|
1881
|
+
), ee = v(
|
|
1817
1882
|
(m, x, O, U) => {
|
|
1818
1883
|
if (!m.response.content) return;
|
|
1819
|
-
const
|
|
1820
|
-
i((
|
|
1821
|
-
if (
|
|
1822
|
-
(
|
|
1823
|
-
|
|
1824
|
-
)) return
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1827
|
-
|
|
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
|
-
|
|
1898
|
+
S,
|
|
1834
1899
|
a,
|
|
1835
1900
|
b.current?.getChatToken()
|
|
1836
|
-
),
|
|
1901
|
+
), S;
|
|
1837
1902
|
});
|
|
1838
1903
|
},
|
|
1839
1904
|
[i, g, t, a, b]
|
|
1840
|
-
),
|
|
1905
|
+
), ae = v(() => {
|
|
1841
1906
|
P(), i((m) => m.filter((x) => !x.isThinking));
|
|
1842
|
-
}, [i, P]),
|
|
1843
|
-
i((m) => [...m.filter((O) => !O.isRatingRequest),
|
|
1907
|
+
}, [i, P]), ie = v(() => {
|
|
1908
|
+
i((m) => [...m.filter((O) => !O.isRatingRequest), an()]);
|
|
1844
1909
|
}, [i]);
|
|
1845
|
-
|
|
1846
|
-
}, [
|
|
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 } =
|
|
1917
|
+
}, [z, p]), { connect: V, disconnect: oe, clearProcessedIds: ce, expectReply: G } = tn({
|
|
1853
1918
|
chatSettings: s,
|
|
1854
|
-
chatId:
|
|
1855
|
-
messages:
|
|
1919
|
+
chatId: c?.id ?? null,
|
|
1920
|
+
messages: l,
|
|
1856
1921
|
onMessage: te,
|
|
1857
|
-
onMissedUserMessage:
|
|
1922
|
+
onMissedUserMessage: ee,
|
|
1858
1923
|
onCognition: j,
|
|
1859
1924
|
onCognitionComplete: P,
|
|
1860
|
-
onError:
|
|
1925
|
+
onError: ae,
|
|
1861
1926
|
onChatClosed: Z,
|
|
1862
|
-
onRatingRequest:
|
|
1927
|
+
onRatingRequest: ie,
|
|
1863
1928
|
onBreadcrumb: Z,
|
|
1864
1929
|
fetchHistory: D,
|
|
1865
1930
|
getChatToken: J
|
|
1866
|
-
}),
|
|
1867
|
-
|
|
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
|
-
),
|
|
1934
|
+
), E(), d(null);
|
|
1870
1935
|
}, [
|
|
1871
1936
|
P,
|
|
1872
1937
|
oe,
|
|
1873
1938
|
ce,
|
|
1874
|
-
|
|
1875
|
-
|
|
1939
|
+
l,
|
|
1940
|
+
E,
|
|
1876
1941
|
i,
|
|
1877
1942
|
d
|
|
1878
1943
|
]), Y = v(
|
|
1879
|
-
(m, x) => i((O) =>
|
|
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:
|
|
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:
|
|
1972
|
+
({ file: y }, _) => m.uploadAttachment({
|
|
1908
1973
|
conversationId: x,
|
|
1909
|
-
file:
|
|
1910
|
-
onProgress: (
|
|
1974
|
+
file: y,
|
|
1975
|
+
onProgress: (L) => Y(
|
|
1911
1976
|
U,
|
|
1912
|
-
(
|
|
1977
|
+
(S) => cn(S, _, L)
|
|
1913
1978
|
)
|
|
1914
|
-
}).catch((
|
|
1915
|
-
throw Bt(
|
|
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((
|
|
1923
|
-
const
|
|
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
|
-
|
|
1990
|
+
y();
|
|
1926
1991
|
return;
|
|
1927
1992
|
}
|
|
1928
|
-
if (m instanceof at || m instanceof
|
|
1929
|
-
|
|
1993
|
+
if (m instanceof at || m instanceof Ne && m.status === 403) {
|
|
1994
|
+
R();
|
|
1930
1995
|
return;
|
|
1931
1996
|
}
|
|
1932
|
-
A(m), m instanceof
|
|
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),
|
|
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
|
-
|
|
2005
|
+
R,
|
|
1941
2006
|
A,
|
|
1942
2007
|
d,
|
|
1943
|
-
|
|
2008
|
+
E
|
|
1944
2009
|
]
|
|
1945
2010
|
), re = v(
|
|
1946
2011
|
async (m, x = []) => {
|
|
1947
|
-
if (!
|
|
2012
|
+
if (!u || l.some((y) => y.isRatingRequest)) return;
|
|
1948
2013
|
if (h) {
|
|
1949
|
-
i((
|
|
2014
|
+
i((y) => [...y, sn()]);
|
|
1950
2015
|
return;
|
|
1951
2016
|
}
|
|
1952
|
-
const O =
|
|
1953
|
-
i((
|
|
2017
|
+
const O = k.current, U = ln(m, x);
|
|
2018
|
+
i((y) => [...y, U]), w();
|
|
1954
2019
|
try {
|
|
1955
|
-
const
|
|
1956
|
-
|
|
1957
|
-
|
|
2020
|
+
const y = c?.id || await ue(u), _ = await be(
|
|
2021
|
+
u,
|
|
2022
|
+
y,
|
|
1958
2023
|
x,
|
|
1959
2024
|
U.id
|
|
1960
2025
|
);
|
|
1961
|
-
|
|
1962
|
-
...
|
|
1963
|
-
attachments: Nt(
|
|
2026
|
+
_.length > 0 && Y(U.id, (S) => ({
|
|
2027
|
+
...S,
|
|
2028
|
+
attachments: Nt(_, x)
|
|
1964
2029
|
}));
|
|
1965
|
-
const
|
|
2030
|
+
const L = await u.replyToConversation({
|
|
1966
2031
|
text: m.content,
|
|
1967
|
-
attachments:
|
|
1968
|
-
conversationId:
|
|
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((
|
|
1975
|
-
if (
|
|
1976
|
-
const
|
|
1977
|
-
|
|
2039
|
+
i((S) => {
|
|
2040
|
+
if (k.current !== O) return S;
|
|
2041
|
+
const W = wt(
|
|
2042
|
+
S,
|
|
1978
2043
|
U.id,
|
|
1979
|
-
(
|
|
2044
|
+
(ne) => ({ ...ne, id: L.message_id, isNew: !1 })
|
|
1980
2045
|
);
|
|
1981
2046
|
return g(
|
|
1982
|
-
|
|
2047
|
+
y,
|
|
1983
2048
|
t,
|
|
1984
|
-
|
|
2049
|
+
W,
|
|
1985
2050
|
a,
|
|
1986
|
-
|
|
1987
|
-
),
|
|
2051
|
+
u.getChatToken()
|
|
2052
|
+
), W;
|
|
1988
2053
|
}), G();
|
|
1989
|
-
} catch (
|
|
2054
|
+
} catch (y) {
|
|
1990
2055
|
throw pe(
|
|
1991
|
-
|
|
1992
|
-
|
|
2056
|
+
y,
|
|
2057
|
+
u,
|
|
1993
2058
|
U.id,
|
|
1994
2059
|
x.length > 0
|
|
1995
|
-
),
|
|
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
|
-
|
|
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 =
|
|
2084
|
+
const x = c?.id;
|
|
2020
2085
|
!b.current || !x || await b.current.addRating(x, m);
|
|
2021
2086
|
},
|
|
2022
|
-
[
|
|
2087
|
+
[c?.id, b]
|
|
2023
2088
|
);
|
|
2024
2089
|
return {
|
|
2025
|
-
onCleanMessages:
|
|
2090
|
+
onCleanMessages: se,
|
|
2026
2091
|
onSendMessage: re,
|
|
2027
2092
|
onRateChat: he
|
|
2028
2093
|
};
|
|
2029
2094
|
}
|
|
2030
|
-
const
|
|
2031
|
-
function
|
|
2032
|
-
return typeof window > "u" || typeof import.meta > "u" ? "" :
|
|
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
|
|
2035
|
-
function
|
|
2036
|
-
return
|
|
2099
|
+
const hn = Rt("VITE_API_URL"), fn = Rt("VITE_REGION_API_URL");
|
|
2100
|
+
function gn() {
|
|
2101
|
+
return hn || "";
|
|
2037
2102
|
}
|
|
2038
|
-
function
|
|
2039
|
-
return
|
|
2103
|
+
function mn() {
|
|
2104
|
+
return fn || "";
|
|
2040
2105
|
}
|
|
2041
|
-
class
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
2210
|
+
const vn = {
|
|
2146
2211
|
retries: 3,
|
|
2147
2212
|
minDelayMs: 200,
|
|
2148
2213
|
maxDelayMs: 1e3,
|
|
2149
2214
|
factor: 2
|
|
2150
2215
|
};
|
|
2151
|
-
function
|
|
2152
|
-
return e instanceof at ? !0 : e instanceof
|
|
2216
|
+
function wn(e) {
|
|
2217
|
+
return e instanceof at ? !0 : e instanceof Ne ? e.status === 429 || e.status >= 500 : !1;
|
|
2153
2218
|
}
|
|
2154
|
-
function
|
|
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
|
|
2159
|
-
const o = { ...
|
|
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 || !
|
|
2229
|
+
if (r >= o.retries || !wn(n))
|
|
2165
2230
|
throw n;
|
|
2166
2231
|
await new Promise(
|
|
2167
|
-
(a) => setTimeout(a,
|
|
2232
|
+
(a) => setTimeout(a, qn(r, o))
|
|
2168
2233
|
);
|
|
2169
2234
|
}
|
|
2170
2235
|
}
|
|
2171
|
-
const
|
|
2172
|
-
function
|
|
2173
|
-
const r = o?.dedupe !== !1, [n, a] =
|
|
2174
|
-
() =>
|
|
2175
|
-
), { publishApiError:
|
|
2176
|
-
|
|
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 (
|
|
2181
|
-
const f =
|
|
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 &&
|
|
2187
|
-
return await
|
|
2251
|
+
if (r && Be.has(e))
|
|
2252
|
+
return await Be.get(e);
|
|
2188
2253
|
const f = t();
|
|
2189
|
-
r &&
|
|
2254
|
+
r && Be.set(e, f);
|
|
2190
2255
|
const g = await f;
|
|
2191
|
-
return
|
|
2256
|
+
return $e.set(e, g), p.current && a(g), g;
|
|
2192
2257
|
} catch (f) {
|
|
2193
|
-
throw f instanceof at || f instanceof
|
|
2258
|
+
throw f instanceof at || f instanceof Ne && f.status === 403 ? s() : u(f), p.current && i(f), f;
|
|
2194
2259
|
} finally {
|
|
2195
|
-
|
|
2260
|
+
Be.delete(e), p.current && d(!1);
|
|
2196
2261
|
}
|
|
2197
|
-
}, [e, r, t,
|
|
2198
|
-
return { data: n, error:
|
|
2262
|
+
}, [e, r, t, u, s]);
|
|
2263
|
+
return { data: n, error: l, isLoading: c, fetch: h };
|
|
2199
2264
|
}
|
|
2200
|
-
function
|
|
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
|
|
2209
|
-
const { appId: t, initialUserId: o } = e, { getSavedChatData: r } = it({ appId: t }), [n, a] =
|
|
2210
|
-
() =>
|
|
2211
|
-
), [
|
|
2212
|
-
return
|
|
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
|
|
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:
|
|
2295
|
+
externalId: u,
|
|
2231
2296
|
deviceId: s,
|
|
2232
|
-
isReady:
|
|
2233
|
-
} =
|
|
2297
|
+
isReady: l
|
|
2298
|
+
} = xn({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: c, getSavedChatData: d } = it({
|
|
2234
2299
|
appId: t
|
|
2235
|
-
}), { current: p } =
|
|
2236
|
-
new
|
|
2300
|
+
}), { current: p } = $(e || gn()), [h] = C(
|
|
2301
|
+
new bn({
|
|
2237
2302
|
baseURL: p,
|
|
2238
2303
|
appId: t
|
|
2239
2304
|
})
|
|
2240
|
-
), [f, g] =
|
|
2241
|
-
|
|
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
|
-
|
|
2308
|
+
c();
|
|
2244
2309
|
else {
|
|
2245
2310
|
const {
|
|
2246
|
-
conversationId:
|
|
2311
|
+
conversationId: ie,
|
|
2247
2312
|
userId: D,
|
|
2248
2313
|
messages: J,
|
|
2249
2314
|
isChatClosed: Z,
|
|
2250
2315
|
chatToken: V
|
|
2251
2316
|
} = d();
|
|
2252
|
-
|
|
2253
|
-
id:
|
|
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,
|
|
2257
|
-
const
|
|
2258
|
-
return
|
|
2259
|
-
if (
|
|
2260
|
-
|
|
2261
|
-
const [D, J] = await
|
|
2262
|
-
|
|
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),
|
|
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
|
|
2334
|
+
const [Z, V] = await ct(qt(ee));
|
|
2270
2335
|
if (V) {
|
|
2271
|
-
|
|
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
|
|
2283
|
-
g(Z.chat_settings),
|
|
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
|
-
}, [
|
|
2350
|
+
}, [l, h, t, ee, d]), {
|
|
2286
2351
|
userId: a,
|
|
2287
2352
|
userName: r,
|
|
2288
2353
|
userData: n,
|
|
2289
|
-
externalId:
|
|
2354
|
+
externalId: u,
|
|
2290
2355
|
deviceId: s,
|
|
2291
2356
|
apiClient: h,
|
|
2292
2357
|
chatSettings: f,
|
|
2293
|
-
currentChat:
|
|
2358
|
+
currentChat: E,
|
|
2294
2359
|
messages: z,
|
|
2295
|
-
isReady:
|
|
2360
|
+
isReady: R,
|
|
2296
2361
|
isChatClosed: P,
|
|
2297
2362
|
isChatActive: q
|
|
2298
2363
|
};
|
|
2299
2364
|
}
|
|
2300
|
-
const
|
|
2301
|
-
function
|
|
2302
|
-
return typeof window > "u" ? !1 : window.matchMedia(
|
|
2365
|
+
const zt = "(max-width: 640px)";
|
|
2366
|
+
function _n() {
|
|
2367
|
+
return typeof window > "u" ? !1 : window.matchMedia(zt).matches;
|
|
2303
2368
|
}
|
|
2304
|
-
function
|
|
2305
|
-
const [t, o] =
|
|
2369
|
+
function Cn(e) {
|
|
2370
|
+
const [t, o] = C(_n), [r, n] = C(
|
|
2306
2371
|
null
|
|
2307
|
-
), a = e ?? t,
|
|
2308
|
-
return
|
|
2309
|
-
if (
|
|
2310
|
-
const s = window.matchMedia(
|
|
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
|
|
2314
|
-
}, [
|
|
2315
|
-
if (
|
|
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
|
-
}, [
|
|
2385
|
+
}, [u]), {
|
|
2321
2386
|
isMobileScreen: t,
|
|
2322
2387
|
isMobile: a,
|
|
2323
2388
|
portalContainer: r
|
|
2324
2389
|
};
|
|
2325
2390
|
}
|
|
2326
|
-
const
|
|
2391
|
+
const xt = 1245, Sn = [
|
|
2327
2392
|
[2.32, 0.4],
|
|
2328
2393
|
[4.25, 0.18]
|
|
2329
|
-
],
|
|
2394
|
+
], In = [
|
|
2330
2395
|
{ start: 0, duration: 0.22, level: 0.45 },
|
|
2331
2396
|
{ start: 0.16, duration: 0.2, level: 0.25 }
|
|
2332
|
-
],
|
|
2333
|
-
function
|
|
2334
|
-
const
|
|
2335
|
-
|
|
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
|
|
2402
|
+
function zn(e) {
|
|
2338
2403
|
const t = e.createGain();
|
|
2339
|
-
t.gain.value =
|
|
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
|
-
|
|
2344
|
-
|
|
2408
|
+
In.forEach((n) => {
|
|
2409
|
+
_t(
|
|
2345
2410
|
e,
|
|
2346
2411
|
t,
|
|
2347
|
-
|
|
2412
|
+
xt,
|
|
2348
2413
|
n.level,
|
|
2349
2414
|
r + n.start,
|
|
2350
2415
|
n.duration
|
|
2351
|
-
),
|
|
2352
|
-
|
|
2416
|
+
), Sn.forEach(([a, u]) => {
|
|
2417
|
+
_t(
|
|
2353
2418
|
e,
|
|
2354
2419
|
t,
|
|
2355
|
-
|
|
2356
|
-
n.level *
|
|
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
|
|
2364
|
-
function
|
|
2428
|
+
const nt = "eloquentai:notification-sound-muted", Tn = 3e3;
|
|
2429
|
+
function Mn() {
|
|
2365
2430
|
try {
|
|
2366
|
-
return window.localStorage.getItem(
|
|
2431
|
+
return window.localStorage.getItem(nt) === "true";
|
|
2367
2432
|
} catch {
|
|
2368
2433
|
return !1;
|
|
2369
2434
|
}
|
|
2370
2435
|
}
|
|
2371
|
-
function
|
|
2436
|
+
function An(e) {
|
|
2372
2437
|
try {
|
|
2373
|
-
e ? window.localStorage.setItem(
|
|
2438
|
+
e ? window.localStorage.setItem(nt, "true") : window.localStorage.removeItem(nt);
|
|
2374
2439
|
} catch {
|
|
2375
2440
|
}
|
|
2376
2441
|
}
|
|
2377
|
-
function
|
|
2442
|
+
function Pn(e) {
|
|
2378
2443
|
return document.visibilityState === "visible" && document.hasFocus() && e;
|
|
2379
2444
|
}
|
|
2380
|
-
function
|
|
2445
|
+
function On() {
|
|
2381
2446
|
const e = window.webkitAudioContext;
|
|
2382
2447
|
return window.AudioContext ?? e ?? null;
|
|
2383
2448
|
}
|
|
2384
|
-
function
|
|
2449
|
+
function Un({
|
|
2385
2450
|
isEnabled: e,
|
|
2386
2451
|
isOpen: t
|
|
2387
2452
|
}) {
|
|
2388
|
-
const [o, r] =
|
|
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 =
|
|
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
|
-
|
|
2466
|
+
K(() => {
|
|
2402
2467
|
if (!e) return;
|
|
2403
|
-
const d = { capture: !0 }, p = () =>
|
|
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,
|
|
2472
|
+
}, [e, l]);
|
|
2408
2473
|
const i = v(() => {
|
|
2409
|
-
if (!e || s.current ||
|
|
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 <
|
|
2414
|
-
}, [e, s,
|
|
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
|
|
2418
|
-
|
|
2419
|
-
}, [o]), { notify: i, unlock:
|
|
2482
|
+
return K(() => {
|
|
2483
|
+
An(o);
|
|
2484
|
+
}, [o]), { notify: i, unlock: l, isMuted: o, toggleMuted: c };
|
|
2420
2485
|
}
|
|
2421
|
-
const
|
|
2422
|
-
function
|
|
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:
|
|
2494
|
+
chatProps: u,
|
|
2430
2495
|
isMobile: s,
|
|
2431
|
-
isInitiallyOpen:
|
|
2496
|
+
isInitiallyOpen: l,
|
|
2432
2497
|
hasCloseButton: i,
|
|
2433
|
-
hasCleanChatButton:
|
|
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:
|
|
2505
|
+
hasCleanChatButtonOverride: E
|
|
2441
2506
|
}) {
|
|
2442
|
-
const { isMobile: w, portalContainer: z } =
|
|
2507
|
+
const { isMobile: w, portalContainer: z } = Cn(s), {
|
|
2443
2508
|
userId: A,
|
|
2444
|
-
externalId:
|
|
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:
|
|
2452
|
-
isChatActive:
|
|
2453
|
-
} =
|
|
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
|
-
}),
|
|
2460
|
-
|
|
2461
|
-
if (!te || G || (
|
|
2462
|
-
const
|
|
2463
|
-
|
|
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 =
|
|
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
|
-
(
|
|
2541
|
+
(N) => {
|
|
2477
2542
|
g || (he(), ce((de) => {
|
|
2478
|
-
const lt = typeof
|
|
2479
|
-
return 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] =
|
|
2484
|
-
|
|
2485
|
-
), [
|
|
2486
|
-
|
|
2487
|
-
const [
|
|
2488
|
-
|
|
2489
|
-
const [
|
|
2490
|
-
|
|
2491
|
-
const
|
|
2492
|
-
|
|
2493
|
-
}, []), [
|
|
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 !== "" && !
|
|
2560
|
+
isVisible: M !== "" && !Fe,
|
|
2496
2561
|
autoHideDelay: pe
|
|
2497
|
-
}, { onSendMessage:
|
|
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:
|
|
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:
|
|
2509
|
-
setCurrentChat:
|
|
2510
|
-
onChatClosed:
|
|
2511
|
-
isChatClosed:
|
|
2573
|
+
currentChat: y,
|
|
2574
|
+
setCurrentChat: _,
|
|
2575
|
+
onChatClosed: Me,
|
|
2576
|
+
isChatClosed: L,
|
|
2512
2577
|
onAgentMessage: re.notify
|
|
2513
2578
|
});
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
}, [
|
|
2517
|
-
q &&
|
|
2579
|
+
K(() => {
|
|
2580
|
+
k.length > 0 && U(k);
|
|
2581
|
+
}, [k]), K(() => {
|
|
2582
|
+
q && _(q);
|
|
2518
2583
|
}, [q]);
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2521
|
-
if (!
|
|
2522
|
-
const
|
|
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:
|
|
2591
|
+
externalId: R,
|
|
2527
2592
|
deviceId: j,
|
|
2528
|
-
conversationId:
|
|
2529
|
-
}, de = JSON.stringify(
|
|
2530
|
-
|
|
2593
|
+
conversationId: y.id
|
|
2594
|
+
}, de = JSON.stringify(N);
|
|
2595
|
+
_e.current !== de && (_e.current = de, P.identifyUser(N));
|
|
2531
2596
|
}, [
|
|
2532
|
-
|
|
2597
|
+
R,
|
|
2533
2598
|
A,
|
|
2534
2599
|
n,
|
|
2535
2600
|
a,
|
|
2536
2601
|
j,
|
|
2537
|
-
|
|
2602
|
+
y,
|
|
2538
2603
|
P
|
|
2539
2604
|
]);
|
|
2540
|
-
const
|
|
2541
|
-
|
|
2542
|
-
}, [
|
|
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:
|
|
2612
|
+
isChatActive: ae,
|
|
2548
2613
|
isInitiallyOpen: Y,
|
|
2549
2614
|
hasCloseButton: ue,
|
|
2550
2615
|
hasCleanChatButton: be,
|
|
2551
2616
|
isMobile: w,
|
|
2552
|
-
chatId:
|
|
2553
|
-
chatInterfaceProps:
|
|
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:
|
|
2623
|
+
onSendMessage: we,
|
|
2559
2624
|
setChatOpen: m,
|
|
2560
|
-
onCleanMessages:
|
|
2625
|
+
onCleanMessages: F,
|
|
2561
2626
|
proactiveMessage: le,
|
|
2562
2627
|
hideProactiveMessage: ge,
|
|
2563
|
-
isChatClosed:
|
|
2564
|
-
onStartNewChat:
|
|
2565
|
-
onRateChat:
|
|
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
|
|
2572
|
-
const [t, o] =
|
|
2573
|
-
return
|
|
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
|
|
2589
|
-
|
|
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
|
|
2604
|
-
const [e, t] =
|
|
2605
|
-
const i = (
|
|
2606
|
-
r(
|
|
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 =
|
|
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:
|
|
2684
|
+
showCognition: u,
|
|
2620
2685
|
hideCognition: s
|
|
2621
2686
|
};
|
|
2622
2687
|
}
|
|
2623
|
-
function
|
|
2688
|
+
function Zn({
|
|
2624
2689
|
children: e
|
|
2625
2690
|
}) {
|
|
2626
|
-
const t =
|
|
2627
|
-
return /* @__PURE__ */
|
|
2691
|
+
const t = Nn();
|
|
2692
|
+
return /* @__PURE__ */ I(Ft.Provider, { value: t, children: e });
|
|
2628
2693
|
}
|
|
2629
|
-
const
|
|
2630
|
-
const [t, o] =
|
|
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: (
|
|
2699
|
+
publishError: (c) => o(c),
|
|
2635
2700
|
publishNetworkError: () => n(!0),
|
|
2636
2701
|
clearError: () => o(null)
|
|
2637
2702
|
};
|
|
2638
|
-
return /* @__PURE__ */
|
|
2639
|
-
},
|
|
2640
|
-
function
|
|
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:
|
|
2712
|
+
isMobile: u,
|
|
2648
2713
|
hasCloseButton: s,
|
|
2649
|
-
hasCleanChatButton:
|
|
2714
|
+
hasCleanChatButton: l,
|
|
2650
2715
|
isInitiallyOpen: i,
|
|
2651
2716
|
// Deprecated aliases, resolved in useChat (new name wins).
|
|
2652
|
-
closeButton:
|
|
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:
|
|
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:
|
|
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 } =
|
|
2668
|
-
isReady:
|
|
2732
|
+
const { hideSdk: q } = Ve(), {
|
|
2733
|
+
isReady: k,
|
|
2669
2734
|
isChatActive: te,
|
|
2670
|
-
isInitiallyOpen:
|
|
2671
|
-
hasCloseButton:
|
|
2672
|
-
hasCleanChatButton:
|
|
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:
|
|
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
|
-
} =
|
|
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:
|
|
2763
|
+
isMobile: u,
|
|
2699
2764
|
isInitiallyOpen: i,
|
|
2700
2765
|
hasCloseButton: s,
|
|
2701
|
-
hasCleanChatButton:
|
|
2766
|
+
hasCleanChatButton: l,
|
|
2702
2767
|
initialOpen: p,
|
|
2703
|
-
closeButton:
|
|
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 =
|
|
2711
|
-
|
|
2775
|
+
}), U = $(void 0);
|
|
2776
|
+
K(() => {
|
|
2712
2777
|
!z || U.current === J || (U.current = J, z(J));
|
|
2713
2778
|
}, [J, z]);
|
|
2714
|
-
const
|
|
2715
|
-
|
|
2716
|
-
const
|
|
2717
|
-
if (q ||
|
|
2718
|
-
const
|
|
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__ */
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
|
|
2799
|
+
/* @__PURE__ */ I("style", { children: oo }),
|
|
2800
|
+
/* @__PURE__ */ I(
|
|
2801
|
+
Ge,
|
|
2737
2802
|
{
|
|
2738
2803
|
className: "eloquentai-chat-messaging",
|
|
2739
|
-
|
|
2804
|
+
title: "Chat",
|
|
2805
|
+
head: /* @__PURE__ */ I("style", { children: Je }),
|
|
2740
2806
|
style: {
|
|
2741
|
-
display: Z ||
|
|
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% - ${
|
|
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:
|
|
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__ */
|
|
2772
|
-
) : /* @__PURE__ */
|
|
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:
|
|
2847
|
+
keyboardInset: S,
|
|
2780
2848
|
messages: Y,
|
|
2781
|
-
onSendMessage: (
|
|
2782
|
-
onMessageClick:
|
|
2849
|
+
onSendMessage: (ve, ze) => (V(), R?.(ve), be(ve, ze)),
|
|
2850
|
+
onMessageClick: E,
|
|
2783
2851
|
highlightedMessageId: A,
|
|
2784
2852
|
isMobile: D,
|
|
2785
|
-
hasCloseButton:
|
|
2786
|
-
hasCleanChatButton:
|
|
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: () =>
|
|
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__ */
|
|
2802
|
-
|
|
2871
|
+
!h && /* @__PURE__ */ I(
|
|
2872
|
+
Ge,
|
|
2803
2873
|
{
|
|
2804
2874
|
className: "eloquentai-chat-launcher",
|
|
2805
|
-
|
|
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__ */
|
|
2820
|
-
|
|
2891
|
+
children: /* @__PURE__ */ I(
|
|
2892
|
+
ao,
|
|
2821
2893
|
{
|
|
2822
2894
|
isOpen: Z,
|
|
2823
|
-
toggleBubble: () =>
|
|
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__ */
|
|
2830
|
-
|
|
2903
|
+
G?.displayWelcomeMessages ? /* @__PURE__ */ I(
|
|
2904
|
+
Ge,
|
|
2831
2905
|
{
|
|
2832
2906
|
className: "eloquentai-chat-proactive-message",
|
|
2833
|
-
|
|
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__ */
|
|
2917
|
+
children: /* @__PURE__ */ I(Xt, { ...G?.theme ?? {}, children: /* @__PURE__ */ I(
|
|
2843
2918
|
"div",
|
|
2844
2919
|
{
|
|
2845
|
-
className:
|
|
2920
|
+
className: Le("eloq:w-full eloq:h-full", {
|
|
2846
2921
|
dark: G?.theme?.mode === "dark"
|
|
2847
2922
|
}),
|
|
2848
|
-
children: re && !
|
|
2849
|
-
|
|
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__ */
|
|
2942
|
+
return /* @__PURE__ */ I(Qt, { children: g ? ne() : ue ? /* @__PURE__ */ I(io, { container: ue, children: ne() }) : null });
|
|
2868
2943
|
}
|
|
2869
|
-
function
|
|
2870
|
-
return /* @__PURE__ */
|
|
2944
|
+
function Fn(e) {
|
|
2945
|
+
return /* @__PURE__ */ I(Kn, { children: /* @__PURE__ */ I(Zn, { children: /* @__PURE__ */ I(Wn, { ...e }) }) });
|
|
2871
2946
|
}
|
|
2872
|
-
function
|
|
2947
|
+
function Qn(e, t) {
|
|
2873
2948
|
return ((r, n, a) => {
|
|
2874
|
-
const
|
|
2875
|
-
return
|
|
2876
|
-
})(
|
|
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
|
-
|
|
2954
|
+
Fn as Chat,
|
|
2880
2955
|
Yt as ChatInterface,
|
|
2881
|
-
|
|
2882
|
-
|
|
2956
|
+
Qn as renderChat,
|
|
2957
|
+
tn as useRealtimeSocket
|
|
2883
2958
|
};
|
|
2884
2959
|
//# sourceMappingURL=index.mjs.map
|