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