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