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