@eloquentai/chat-sdk 0.16.5-dev → 0.17.0-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as ue from "react";
|
2
2
|
import { version as ql, createContext as Jo, useContext as Xo, useEffect as ce, useState as z, useMemo as Et, useRef as Pe, useCallback as $e } from "react";
|
3
3
|
import { jsx as m, jsxs as D, Fragment as xt } from "react/jsx-runtime";
|
4
|
+
import { ChevronDown as Xa, RefreshCcw as Gl, X as Qa, Copy as Vl, ThumbsUp as Kl, ThumbsDown as Yl, FileSearch as Jl, CheckCircle as Xl, Info as Ql, XCircle as Zl, AlertTriangle as ed, ArrowUp as td } from "lucide-react";
|
5
|
+
import { clsx as nd } from "clsx";
|
6
|
+
import { twMerge as rd } from "tailwind-merge";
|
4
7
|
import { useDebounce as Qo } from "@uidotdev/usehooks";
|
5
|
-
import {
|
6
|
-
import { twMerge as Vl } from "tailwind-merge";
|
7
|
-
import { useRive as Kl, Layout as Yl, Alignment as Jl, Fit as Xl, useStateMachineInput as Ql } from "@rive-app/react-canvas";
|
8
|
-
import { RefreshCcw as Zl, X as Xa, Copy as ed, ThumbsUp as td, ThumbsDown as nd, FileSearch as rd, ChevronDown as Qa, CheckCircle as od, Info as sd, XCircle as id, AlertTriangle as ad, ArrowUp as cd } from "lucide-react";
|
8
|
+
import { useRive as od, Layout as sd, Alignment as id, Fit as ad, useStateMachineInput as cd } from "@rive-app/react-canvas";
|
9
9
|
import * as Ut from "@radix-ui/react-avatar";
|
10
10
|
import * as ot from "@radix-ui/react-scroll-area";
|
11
11
|
import { ScrollArea as ud } from "@radix-ui/react-scroll-area";
|
@@ -15,7 +15,7 @@ import { z as se } from "zod";
|
|
15
15
|
import ld from "react-dom/client";
|
16
16
|
try {
|
17
17
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
18
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
18
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "05da1b36-dd03-410f-8af6-7f0cd68fd94b", e._sentryDebugIdIdentifier = "sentry-dbid-05da1b36-dd03-410f-8af6-7f0cd68fd94b");
|
19
19
|
} catch {
|
20
20
|
}
|
21
21
|
const U = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, st = "9.30.0", $ = globalThis;
|
@@ -10610,7 +10610,7 @@ function $_(e) {
|
|
10610
10610
|
}
|
10611
10611
|
{
|
10612
10612
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
10613
|
-
e.SENTRY_RELEASE = { id: "
|
10613
|
+
e.SENTRY_RELEASE = { id: "0a52243fe7e193a426882242ef217066a7d5bdfb" };
|
10614
10614
|
}
|
10615
10615
|
const H_ = "development";
|
10616
10616
|
$_({
|
@@ -10626,7 +10626,7 @@ $_({
|
|
10626
10626
|
});
|
10627
10627
|
const ca = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{scrollbar-color:initial;scrollbar-width:initial}: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%;--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%;--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))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-1{bottom:.25rem}.bottom-10{bottom:2.5rem}.bottom-2{bottom:.5rem}.left-1{left:.25rem}.left-\\[50\\%\\]{left:50%}.left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-4{top:1rem}.top-\\[50\\%\\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.m-0{margin:0}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-20{margin-top:-5rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-10{margin-bottom:2.5rem}.mb-\\[19px\\]{margin-bottom:19px}.ml-0{margin-left:0}.ml-3{margin-left:.75rem}.mr-3{margin-right:.75rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2\\.5{height:.625rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-\\[132px\\]{max-height:132px}.min-h-\\[48px\\]{min-height:48px}.min-h-\\[80px\\]{min-height:80px}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2\\.5{width:.625rem}.w-2\\/3{width:66.666667%}.w-24{width:6rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-full{width:100%}.min-w-min{min-width:min-content}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom-right{transform-origin:bottom right}.translate-x-\\[-50\\%\\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[0\\.95\\]{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.self-end{align-self:flex-end}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#000\\]{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FAF9F7\\]{--tw-bg-opacity: 1;background-color:rgb(250 249 247 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-popover{background-color:hsl(var(--popover))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/90{background-color:#ffffffe6}.object-contain{object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.pb-10{padding-bottom:2.5rem}.pb-14{padding-bottom:3.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-10{padding-top:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-\\[\\#fff\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted{color:hsl(var(--muted))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-70{opacity:.7}.shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow: 0 0 4px 0 rgba(0,0,0,.2);--tw-shadow-colored: 0 0 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-transparent{--scrollbar-track: transparent !important}.scrollbar-thumb-border{--scrollbar-thumb: hsl(var(--border)) !important}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}body{background-color:transparent}.eloquent-chat{font-family:Roboto,Arial,sans-serif}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\\[state\\=closed\\]\\:slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\\[state\\=open\\]\\:slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48%}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-primary:hover{color:hsl(var(--primary))}.hover\\:opacity-100:hover{opacity:1}.hover\\:opacity-90:hover{opacity:.9}.hover\\:scrollbar-thumb-border{--scrollbar-thumb-hover: hsl(var(--border)) !important}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-muted:focus-visible{--tw-ring-color: hsl(var(--muted))}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.dark\\:bg-background:is(.dark *){background-color:hsl(var(--background))}.dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}@media (min-width: 640px){.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\\:rounded-lg{border-radius:var(--radius)}.sm\\:text-left{text-align:left}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}', W_ = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}";
|
10628
10628
|
function A(...e) {
|
10629
|
-
return
|
10629
|
+
return rd(nd(e));
|
10630
10630
|
}
|
10631
10631
|
async function z_(e) {
|
10632
10632
|
try {
|
@@ -10635,6 +10635,72 @@ async function z_(e) {
|
|
10635
10635
|
return [null, t];
|
10636
10636
|
}
|
10637
10637
|
}
|
10638
|
+
function Pr(e) {
|
10639
|
+
const { className: t, bgColor: n, fgColor: r, src: o, ...s } = e;
|
10640
|
+
return /* @__PURE__ */ m(
|
10641
|
+
"div",
|
10642
|
+
{
|
10643
|
+
className: A(
|
10644
|
+
"flex items-center justify-center w-full h-full",
|
10645
|
+
t
|
10646
|
+
),
|
10647
|
+
...s,
|
10648
|
+
children: o ? /* @__PURE__ */ m(
|
10649
|
+
"img",
|
10650
|
+
{
|
10651
|
+
src: o,
|
10652
|
+
alt: "Assistant Logo",
|
10653
|
+
className: "shrink-0 w-full h-full object-contain rounded-full"
|
10654
|
+
}
|
10655
|
+
) : /* @__PURE__ */ D("svg", { viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
10656
|
+
/* @__PURE__ */ m("circle", { cx: "40", cy: "40", r: "40", fill: n || "#6F33B7" }),
|
10657
|
+
/* @__PURE__ */ m(
|
10658
|
+
"path",
|
10659
|
+
{
|
10660
|
+
fillRule: "evenodd",
|
10661
|
+
clipRule: "evenodd",
|
10662
|
+
d: "M41.0869 25.8696C33.7902 25.8696 28.0434 31.7499 28.0434 38.913C28.0434 47.3813 34.7925 54.1304 43.2608 54.1304V62.8261C29.99 62.8261 19.3478 52.1837 19.3478 38.913C19.3478 27.0122 28.9233 17.1739 41.0869 17.1739C52.2099 17.1739 60.6521 25.6826 60.6521 36.7391C60.6521 46.4864 52.9974 54.1304 43.2608 54.1304V45.4348C48.1982 45.4348 51.9565 41.6807 51.9565 36.7391C51.9565 30.4669 47.3892 25.8696 41.0869 25.8696Z",
|
10663
|
+
fill: r || "#000000"
|
10664
|
+
}
|
10665
|
+
)
|
10666
|
+
] })
|
10667
|
+
}
|
10668
|
+
);
|
10669
|
+
}
|
10670
|
+
function j_({
|
10671
|
+
isOpen: e,
|
10672
|
+
toggleBubble: t
|
10673
|
+
}) {
|
10674
|
+
return /* @__PURE__ */ m("div", { className: "absolute inset-0 m-auto flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ D(
|
10675
|
+
"div",
|
10676
|
+
{
|
10677
|
+
className: "chat-bubble relative flex items-center justify-center w-12 h-12 rounded-full bg-[#000] text-[#fff] cursor-pointer",
|
10678
|
+
onClick: t,
|
10679
|
+
children: [
|
10680
|
+
/* @__PURE__ */ m(
|
10681
|
+
"div",
|
10682
|
+
{
|
10683
|
+
className: A(
|
10684
|
+
"absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
|
10685
|
+
e ? "rotate-180 opacity-0 scale-0" : "rotate-0 opacity-100 scale-100"
|
10686
|
+
),
|
10687
|
+
children: /* @__PURE__ */ m(Pr, { bgColor: "#000", fgColor: "#ffffff" })
|
10688
|
+
}
|
10689
|
+
),
|
10690
|
+
/* @__PURE__ */ m(
|
10691
|
+
"div",
|
10692
|
+
{
|
10693
|
+
className: A(
|
10694
|
+
"absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
|
10695
|
+
e ? "rotate-0 opacity-100 scale-100" : "-rotate-180 opacity-0 scale-0"
|
10696
|
+
),
|
10697
|
+
children: /* @__PURE__ */ m(Xa, {})
|
10698
|
+
}
|
10699
|
+
)
|
10700
|
+
]
|
10701
|
+
}
|
10702
|
+
) });
|
10703
|
+
}
|
10638
10704
|
const Ns = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10639
10705
|
"div",
|
10640
10706
|
{
|
@@ -10656,7 +10722,7 @@ const Os = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10656
10722
|
}
|
10657
10723
|
));
|
10658
10724
|
Os.displayName = "CardHeader";
|
10659
|
-
const
|
10725
|
+
const q_ = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10660
10726
|
"div",
|
10661
10727
|
{
|
10662
10728
|
ref: n,
|
@@ -10667,8 +10733,8 @@ const j_ = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10667
10733
|
...t
|
10668
10734
|
}
|
10669
10735
|
));
|
10670
|
-
|
10671
|
-
const
|
10736
|
+
q_.displayName = "CardTitle";
|
10737
|
+
const G_ = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10672
10738
|
"div",
|
10673
10739
|
{
|
10674
10740
|
ref: n,
|
@@ -10676,7 +10742,7 @@ const q_ = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10676
10742
|
...t
|
10677
10743
|
}
|
10678
10744
|
));
|
10679
|
-
|
10745
|
+
G_.displayName = "CardDescription";
|
10680
10746
|
const As = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m("div", { ref: n, className: A("p-6 pt-0", e), ...t }));
|
10681
10747
|
As.displayName = "CardContent";
|
10682
10748
|
const Ms = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
@@ -10689,7 +10755,7 @@ const Ms = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10689
10755
|
));
|
10690
10756
|
Ms.displayName = "CardFooter";
|
10691
10757
|
const Ku = Jo(void 0);
|
10692
|
-
function
|
10758
|
+
function V_(e) {
|
10693
10759
|
return /* @__PURE__ */ m(
|
10694
10760
|
Ku.Provider,
|
10695
10761
|
{
|
@@ -10708,11 +10774,11 @@ const Yu = () => {
|
|
10708
10774
|
if (!e)
|
10709
10775
|
throw new Error("useTheme must be used within a ThemeProvider");
|
10710
10776
|
return e;
|
10711
|
-
},
|
10712
|
-
function
|
10713
|
-
return
|
10777
|
+
}, K_ = "/assets/logo-waiting-simple.riv", Y_ = "https://cdn.eloquentai.dev", J_ = "https://chat.eloquentai.dev", X_ = Y_ + K_;
|
10778
|
+
function Q_() {
|
10779
|
+
return J_;
|
10714
10780
|
}
|
10715
|
-
function
|
10781
|
+
function Z_(e, t, n) {
|
10716
10782
|
return {
|
10717
10783
|
API: {
|
10718
10784
|
Events: {
|
@@ -10725,15 +10791,15 @@ function Q_(e, t, n) {
|
|
10725
10791
|
};
|
10726
10792
|
}
|
10727
10793
|
function Ju({ isWaiting: e = !1, ...t }) {
|
10728
|
-
const { className: n, onLoaded: r, ...o } = t, { RiveComponent: s, rive: i } =
|
10729
|
-
src:
|
10794
|
+
const { className: n, onLoaded: r, ...o } = t, { RiveComponent: s, rive: i } = od({
|
10795
|
+
src: X_,
|
10730
10796
|
stateMachines: "State Machine 1",
|
10731
10797
|
autoplay: !0,
|
10732
|
-
layout: new
|
10733
|
-
fit:
|
10734
|
-
alignment:
|
10798
|
+
layout: new sd({
|
10799
|
+
fit: ad.Cover,
|
10800
|
+
alignment: id.TopCenter
|
10735
10801
|
})
|
10736
|
-
}), c =
|
10802
|
+
}), c = cd(i, "State Machine 1", "waiting");
|
10737
10803
|
return ce(() => {
|
10738
10804
|
if (c)
|
10739
10805
|
try {
|
@@ -10755,13 +10821,13 @@ function Ju({ isWaiting: e = !1, ...t }) {
|
|
10755
10821
|
);
|
10756
10822
|
}
|
10757
10823
|
const Xu = Jo(void 0);
|
10758
|
-
function
|
10824
|
+
function ew({
|
10759
10825
|
children: e,
|
10760
10826
|
...t
|
10761
10827
|
}) {
|
10762
10828
|
return /* @__PURE__ */ m(Xu.Provider, { value: t, children: e });
|
10763
10829
|
}
|
10764
|
-
function
|
10830
|
+
function Ur() {
|
10765
10831
|
const e = Xo(Xu);
|
10766
10832
|
if (!e)
|
10767
10833
|
throw new Error(
|
@@ -10781,7 +10847,7 @@ const Qu = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10781
10847
|
}
|
10782
10848
|
));
|
10783
10849
|
Qu.displayName = Ut.Root.displayName;
|
10784
|
-
const
|
10850
|
+
const tw = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10785
10851
|
Ut.Image,
|
10786
10852
|
{
|
10787
10853
|
ref: n,
|
@@ -10789,8 +10855,8 @@ const ew = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10789
10855
|
...t
|
10790
10856
|
}
|
10791
10857
|
));
|
10792
|
-
|
10793
|
-
const
|
10858
|
+
tw.displayName = Ut.Image.displayName;
|
10859
|
+
const nw = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10794
10860
|
Ut.Fallback,
|
10795
10861
|
{
|
10796
10862
|
ref: n,
|
@@ -10801,48 +10867,16 @@ const tw = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10801
10867
|
...t
|
10802
10868
|
}
|
10803
10869
|
));
|
10804
|
-
|
10805
|
-
function
|
10806
|
-
const { className: t, bgColor: n, fgColor: r, src: o, ...s } = e;
|
10807
|
-
return /* @__PURE__ */ m(
|
10808
|
-
"div",
|
10809
|
-
{
|
10810
|
-
className: A(
|
10811
|
-
"flex items-center justify-center w-full h-full",
|
10812
|
-
t
|
10813
|
-
),
|
10814
|
-
...s,
|
10815
|
-
children: o ? /* @__PURE__ */ m(
|
10816
|
-
"img",
|
10817
|
-
{
|
10818
|
-
src: o,
|
10819
|
-
alt: "Assistant Logo",
|
10820
|
-
className: "shrink-0 w-full h-full object-contain rounded-full"
|
10821
|
-
}
|
10822
|
-
) : /* @__PURE__ */ D("svg", { viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
10823
|
-
/* @__PURE__ */ m("circle", { cx: "40", cy: "40", r: "40", fill: n || "#6F33B7" }),
|
10824
|
-
/* @__PURE__ */ m(
|
10825
|
-
"path",
|
10826
|
-
{
|
10827
|
-
fillRule: "evenodd",
|
10828
|
-
clipRule: "evenodd",
|
10829
|
-
d: "M41.0869 25.8696C33.7902 25.8696 28.0434 31.7499 28.0434 38.913C28.0434 47.3813 34.7925 54.1304 43.2608 54.1304V62.8261C29.99 62.8261 19.3478 52.1837 19.3478 38.913C19.3478 27.0122 28.9233 17.1739 41.0869 17.1739C52.2099 17.1739 60.6521 25.6826 60.6521 36.7391C60.6521 46.4864 52.9974 54.1304 43.2608 54.1304V45.4348C48.1982 45.4348 51.9565 41.6807 51.9565 36.7391C51.9565 30.4669 47.3892 25.8696 41.0869 25.8696Z",
|
10830
|
-
fill: r || "#000000"
|
10831
|
-
}
|
10832
|
-
)
|
10833
|
-
] })
|
10834
|
-
}
|
10835
|
-
);
|
10836
|
-
}
|
10837
|
-
function nw({
|
10870
|
+
nw.displayName = Ut.Fallback.displayName;
|
10871
|
+
function rw({
|
10838
10872
|
onCleanChat: e,
|
10839
10873
|
onClose: t
|
10840
10874
|
}) {
|
10841
|
-
const n =
|
10875
|
+
const n = Ur();
|
10842
10876
|
return /* @__PURE__ */ D(Os, { className: "p-4 flex flex-row items-center justify-between shadow-sm space-y-0", children: [
|
10843
10877
|
/* @__PURE__ */ D("div", { className: "flex flex-row items-center space-x-3", children: [
|
10844
10878
|
/* @__PURE__ */ m(Qu, { className: "h-8 w-8", children: /* @__PURE__ */ m(
|
10845
|
-
|
10879
|
+
Pr,
|
10846
10880
|
{
|
10847
10881
|
src: n.assistantLogo,
|
10848
10882
|
bgColor: "#6F33B7",
|
@@ -10857,7 +10891,7 @@ function nw({
|
|
10857
10891
|
{
|
10858
10892
|
onClick: e,
|
10859
10893
|
className: "text-gray-400 hover:text-gray-600 p-2",
|
10860
|
-
children: /* @__PURE__ */ m(
|
10894
|
+
children: /* @__PURE__ */ m(Gl, { className: "w-4 h-4" })
|
10861
10895
|
}
|
10862
10896
|
),
|
10863
10897
|
n.closeButton === !0 && n.isMobile && /* @__PURE__ */ m(
|
@@ -10865,7 +10899,7 @@ function nw({
|
|
10865
10899
|
{
|
10866
10900
|
onClick: t,
|
10867
10901
|
className: "text-gray-400 hover:text-gray-600 p-2",
|
10868
|
-
children: /* @__PURE__ */ m(
|
10902
|
+
children: /* @__PURE__ */ m(Qa, { className: "w-4 h-4" })
|
10869
10903
|
}
|
10870
10904
|
)
|
10871
10905
|
] })
|
@@ -10908,7 +10942,7 @@ const el = ue.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r
|
|
10908
10942
|
}
|
10909
10943
|
));
|
10910
10944
|
el.displayName = ot.ScrollAreaScrollbar.displayName;
|
10911
|
-
function
|
10945
|
+
function ow(e) {
|
10912
10946
|
const { className: t, src: n, ...r } = e;
|
10913
10947
|
return /* @__PURE__ */ m("div", { className: A("w-full h-full", t), ...r, children: n ? /* @__PURE__ */ m(
|
10914
10948
|
"img",
|
@@ -10930,7 +10964,7 @@ function rw(e) {
|
|
10930
10964
|
)
|
10931
10965
|
] }) });
|
10932
10966
|
}
|
10933
|
-
const
|
10967
|
+
const sw = Ae.Root, iw = Ae.Portal, tl = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
10934
10968
|
Ae.Overlay,
|
10935
10969
|
{
|
10936
10970
|
ref: n,
|
@@ -10942,7 +10976,7 @@ const ow = Ae.Root, sw = Ae.Portal, tl = ue.forwardRef(({ className: e, ...t },
|
|
10942
10976
|
}
|
10943
10977
|
));
|
10944
10978
|
tl.displayName = Ae.Overlay.displayName;
|
10945
|
-
const nl = ue.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ D(
|
10979
|
+
const nl = ue.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ D(iw, { children: [
|
10946
10980
|
/* @__PURE__ */ m(tl, {}),
|
10947
10981
|
/* @__PURE__ */ D(
|
10948
10982
|
Ae.Content,
|
@@ -10956,7 +10990,7 @@ const nl = ue.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE_
|
|
10956
10990
|
children: [
|
10957
10991
|
t,
|
10958
10992
|
/* @__PURE__ */ D(Ae.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground bg-white/90", children: [
|
10959
|
-
/* @__PURE__ */ m(
|
10993
|
+
/* @__PURE__ */ m(Qa, { className: "h-4 w-4" }),
|
10960
10994
|
/* @__PURE__ */ m("span", { className: "sr-only", children: "Close" })
|
10961
10995
|
] })
|
10962
10996
|
]
|
@@ -10985,7 +11019,7 @@ const ol = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
10985
11019
|
}
|
10986
11020
|
));
|
10987
11021
|
ol.displayName = Ae.Description.displayName;
|
10988
|
-
function
|
11022
|
+
function aw(e, t = 50, n = !0) {
|
10989
11023
|
const [r, o] = z("");
|
10990
11024
|
return ce(() => {
|
10991
11025
|
if (!n) return;
|
@@ -11002,7 +11036,7 @@ function iw(e, t = 50, n = !0) {
|
|
11002
11036
|
}, [e, t, n]), n ? r : e;
|
11003
11037
|
}
|
11004
11038
|
const ua = ["Reviewing...", "Thinking...", "Validating..."];
|
11005
|
-
function
|
11039
|
+
function cw() {
|
11006
11040
|
const [e, t] = z(0);
|
11007
11041
|
return ce(() => {
|
11008
11042
|
const n = setInterval(() => {
|
@@ -11022,7 +11056,7 @@ function la({
|
|
11022
11056
|
}) {
|
11023
11057
|
const c = !t, [a, u] = z(!1), [l, d] = z(
|
11024
11058
|
null
|
11025
|
-
), [f, h] = z(!1), [p, g] = z(!1), y = Yu(), { collectUserFeedback: b, onMessageClick: v } =
|
11059
|
+
), [f, h] = z(!1), [p, g] = z(!1), y = Yu(), { collectUserFeedback: b, onMessageClick: v } = Ur(), x = cw(), E = !e.isWelcomeMessage && typeof v == "function", _ = aw(
|
11026
11060
|
e.isThinking ? x : e.content,
|
11027
11061
|
15,
|
11028
11062
|
n && c
|
@@ -11136,7 +11170,7 @@ function la({
|
|
11136
11170
|
f && "text-primary"
|
11137
11171
|
),
|
11138
11172
|
title: "Copy message",
|
11139
|
-
children: /* @__PURE__ */ m(
|
11173
|
+
children: /* @__PURE__ */ m(Vl, { size: 16 })
|
11140
11174
|
}
|
11141
11175
|
),
|
11142
11176
|
!e.isWelcomeMessage && b && /* @__PURE__ */ D(xt, { children: [
|
@@ -11148,7 +11182,7 @@ function la({
|
|
11148
11182
|
I,
|
11149
11183
|
l === "up" && "text-primary"
|
11150
11184
|
),
|
11151
|
-
children: /* @__PURE__ */ m(
|
11185
|
+
children: /* @__PURE__ */ m(Kl, { size: 16 })
|
11152
11186
|
}
|
11153
11187
|
),
|
11154
11188
|
/* @__PURE__ */ m(
|
@@ -11161,7 +11195,7 @@ function la({
|
|
11161
11195
|
I,
|
11162
11196
|
l === "down" && "text-primary"
|
11163
11197
|
),
|
11164
|
-
children: /* @__PURE__ */ m(
|
11198
|
+
children: /* @__PURE__ */ m(Yl, { size: 16 })
|
11165
11199
|
}
|
11166
11200
|
)
|
11167
11201
|
] }),
|
@@ -11174,13 +11208,13 @@ function la({
|
|
11174
11208
|
className: A(I, {
|
11175
11209
|
"text-primary": p
|
11176
11210
|
}),
|
11177
|
-
children: /* @__PURE__ */ m(
|
11211
|
+
children: /* @__PURE__ */ m(Jl, { size: 16 })
|
11178
11212
|
}
|
11179
11213
|
)
|
11180
11214
|
] })
|
11181
11215
|
] }) })
|
11182
11216
|
] }),
|
11183
|
-
/* @__PURE__ */ m(
|
11217
|
+
/* @__PURE__ */ m(sw, { open: a, onOpenChange: u, children: /* @__PURE__ */ D(nl, { className: "max-w-[90vw] p-0 bg-transparent border-0", children: [
|
11184
11218
|
/* @__PURE__ */ m(rl, { className: "hidden" }),
|
11185
11219
|
/* @__PURE__ */ m(ol, { className: "hidden" }),
|
11186
11220
|
/* @__PURE__ */ m(
|
@@ -11194,7 +11228,7 @@ function la({
|
|
11194
11228
|
] }) })
|
11195
11229
|
] });
|
11196
11230
|
}
|
11197
|
-
function
|
11231
|
+
function uw({
|
11198
11232
|
className: e,
|
11199
11233
|
message: t,
|
11200
11234
|
nextMessage: n,
|
@@ -11206,7 +11240,7 @@ function cw({
|
|
11206
11240
|
"w-12 h-12": s && !Array.isArray(t) && t.isThinking
|
11207
11241
|
});
|
11208
11242
|
return s ? s && !i ? r ? /* @__PURE__ */ m(
|
11209
|
-
|
11243
|
+
Pr,
|
11210
11244
|
{
|
11211
11245
|
className: u,
|
11212
11246
|
bgColor: "#6F33B7",
|
@@ -11255,8 +11289,8 @@ function cw({
|
|
11255
11289
|
}
|
11256
11290
|
) }, o);
|
11257
11291
|
}
|
11258
|
-
function
|
11259
|
-
const e =
|
11292
|
+
function lw() {
|
11293
|
+
const e = Ur(), t = Pe(null), n = Pe(!0), [r, o] = z(!1), [s, i] = z(!1), c = (l) => l.scrollHeight - l.scrollTop <= l.clientHeight + 60, a = (l) => {
|
11260
11294
|
const d = l.target;
|
11261
11295
|
c(d) ? (o(!1), i(!1)) : (o(!0), i(!0));
|
11262
11296
|
}, u = (l = "smooth") => {
|
@@ -11288,7 +11322,7 @@ function uw() {
|
|
11288
11322
|
onViewportScroll: a,
|
11289
11323
|
children: [
|
11290
11324
|
/* @__PURE__ */ D("div", { className: "chat-interface-head mt-10", children: [
|
11291
|
-
/* @__PURE__ */ m("div", { className: "w-14 h-14 mx-auto rounded-md overflow-hidden", children: /* @__PURE__ */ m(
|
11325
|
+
/* @__PURE__ */ m("div", { className: "w-14 h-14 mx-auto rounded-md overflow-hidden", children: /* @__PURE__ */ m(ow, { src: e.assistantLogo }) }),
|
11292
11326
|
/* @__PURE__ */ D("div", { className: "mt-2 space-y-1", children: [
|
11293
11327
|
/* @__PURE__ */ D("h3", { className: "text-center font-semibold", children: [
|
11294
11328
|
e.assistantName,
|
@@ -11300,7 +11334,7 @@ function uw() {
|
|
11300
11334
|
/* @__PURE__ */ m("div", { className: "chat-interface-body flex flex-col space-y-4 mb-10", children: e.messages?.map((l, d, f) => {
|
11301
11335
|
const h = Array.isArray(l) ? l.map((p) => p.id).join("-") : l.id;
|
11302
11336
|
return /* @__PURE__ */ m(
|
11303
|
-
|
11337
|
+
uw,
|
11304
11338
|
{
|
11305
11339
|
message: l,
|
11306
11340
|
nextMessage: f[d + 1],
|
@@ -11322,7 +11356,7 @@ function uw() {
|
|
11322
11356
|
{
|
11323
11357
|
className: "flex items-center justify-center absolute left-[calc(50%-0.75rem)] bottom-10 mx-auto cursor-pointer",
|
11324
11358
|
onClick: () => u("instant"),
|
11325
|
-
children: /* @__PURE__ */ m(
|
11359
|
+
children: /* @__PURE__ */ m(Xa, { className: "h-6 w-6 text-primary bg-white rounded-full border" })
|
11326
11360
|
}
|
11327
11361
|
)
|
11328
11362
|
] });
|
@@ -11339,7 +11373,7 @@ const sl = ue.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(
|
|
11339
11373
|
}
|
11340
11374
|
));
|
11341
11375
|
sl.displayName = "Textarea";
|
11342
|
-
function
|
11376
|
+
function dw() {
|
11343
11377
|
const e = Pe(!1), t = Pe(0), n = Pe(0);
|
11344
11378
|
return {
|
11345
11379
|
onMouseDown: (c) => {
|
@@ -11364,7 +11398,7 @@ function lw() {
|
|
11364
11398
|
const da = {
|
11365
11399
|
5031: "The service is currently undergoing maintenance. Please try again later.",
|
11366
11400
|
DEFAULT: "Something went wrong. Please try again later."
|
11367
|
-
},
|
11401
|
+
}, fw = (e) => da[e] || da.DEFAULT, il = Jo({
|
11368
11402
|
error: null,
|
11369
11403
|
publishApiError: () => {
|
11370
11404
|
},
|
@@ -11377,8 +11411,8 @@ const da = {
|
|
11377
11411
|
if (e === void 0)
|
11378
11412
|
throw new Error("useError must be used within an ErrorProvider");
|
11379
11413
|
return e;
|
11380
|
-
},
|
11381
|
-
const n = Number(t.response.errors[0].error_code), r =
|
11414
|
+
}, hw = (e) => (t) => {
|
11415
|
+
const n = Number(t.response.errors[0].error_code), r = fw(n);
|
11382
11416
|
e({ code: n, message: r });
|
11383
11417
|
}, fa = {
|
11384
11418
|
warning: {
|
@@ -11386,30 +11420,30 @@ const da = {
|
|
11386
11420
|
borderColor: "border-amber-400",
|
11387
11421
|
textColor: "text-amber-800",
|
11388
11422
|
iconColor: "text-amber-500",
|
11389
|
-
icon:
|
11423
|
+
icon: ed
|
11390
11424
|
},
|
11391
11425
|
error: {
|
11392
11426
|
bgColor: "bg-red-50",
|
11393
11427
|
borderColor: "border-red-500",
|
11394
11428
|
textColor: "text-red-800",
|
11395
11429
|
iconColor: "text-red-500",
|
11396
|
-
icon:
|
11430
|
+
icon: Zl
|
11397
11431
|
},
|
11398
11432
|
info: {
|
11399
11433
|
bgColor: "bg-blue-50",
|
11400
11434
|
borderColor: "border-blue-500",
|
11401
11435
|
textColor: "text-blue-800",
|
11402
11436
|
iconColor: "text-blue-500",
|
11403
|
-
icon:
|
11437
|
+
icon: Ql
|
11404
11438
|
},
|
11405
11439
|
success: {
|
11406
11440
|
bgColor: "bg-green-50",
|
11407
11441
|
borderColor: "border-green-500",
|
11408
11442
|
textColor: "text-green-800",
|
11409
11443
|
iconColor: "text-green-500",
|
11410
|
-
icon:
|
11444
|
+
icon: Xl
|
11411
11445
|
}
|
11412
|
-
},
|
11446
|
+
}, pw = ({ message: e, type: t }) => {
|
11413
11447
|
const n = fa[t] || fa.warning, r = n.icon;
|
11414
11448
|
return /* @__PURE__ */ D(
|
11415
11449
|
"div",
|
@@ -11422,8 +11456,8 @@ const da = {
|
|
11422
11456
|
}
|
11423
11457
|
);
|
11424
11458
|
};
|
11425
|
-
function
|
11426
|
-
const { error: e } = Ds(), t = !!e, n =
|
11459
|
+
function mw() {
|
11460
|
+
const { error: e } = Ds(), t = !!e, n = Ur(), r = Pe(null), [o, s] = z(""), i = dw(), c = Yu(), a = () => o.trim() && !t ? { backgroundColor: c.userBubbleColor } : {}, u = () => n.suggestedMessages ? /* @__PURE__ */ m(
|
11427
11461
|
"div",
|
11428
11462
|
{
|
11429
11463
|
className: "w-full px-4 pb-10 -mt-20 overflow-x-auto no-scrollbar z-10 cursor-grab",
|
@@ -11466,7 +11500,7 @@ function pw() {
|
|
11466
11500
|
return /* @__PURE__ */ D(Ms, { className: "flex flex-col bg-background p-0", children: [
|
11467
11501
|
u(),
|
11468
11502
|
/* @__PURE__ */ D("div", { className: "flex flex-col w-full items-center px-4 pb-4 -mt-6 z-20", children: [
|
11469
|
-
t && /* @__PURE__ */ m(
|
11503
|
+
t && /* @__PURE__ */ m(pw, { message: e.message, type: "error" }),
|
11470
11504
|
/* @__PURE__ */ D(
|
11471
11505
|
"form",
|
11472
11506
|
{
|
@@ -11509,7 +11543,7 @@ function pw() {
|
|
11509
11543
|
o.trim() && !t ? "text-primary-foreground" : "bg-muted-foreground"
|
11510
11544
|
),
|
11511
11545
|
style: a(),
|
11512
|
-
children: /* @__PURE__ */ m(
|
11546
|
+
children: /* @__PURE__ */ m(td, { className: "h-4 w-4" })
|
11513
11547
|
}
|
11514
11548
|
)
|
11515
11549
|
]
|
@@ -11518,7 +11552,7 @@ function pw() {
|
|
11518
11552
|
] }),
|
11519
11553
|
/* @__PURE__ */ D("div", { className: "w-full flex flex-col items-center justify-center space-x-2 p-1 pt-0 px-0 bg-[#FAF9F7] dark:bg-background", children: [
|
11520
11554
|
/* @__PURE__ */ D("div", { className: "w-full flex items-center justify-center space-x-2 py-1 bg-[#FAF9F7] dark:bg-card", children: [
|
11521
|
-
/* @__PURE__ */ m(
|
11555
|
+
/* @__PURE__ */ m(Pr, { className: A("w-5 h-5"), bgColor: "#E5E3E1", fgColor: "#B2B0AE" }),
|
11522
11556
|
/* @__PURE__ */ m("div", { className: "text-xs text-center text-muted-foreground p-1", children: "Powered by EloquentAI" })
|
11523
11557
|
] }),
|
11524
11558
|
n.legalText && /* @__PURE__ */ m(
|
@@ -11584,20 +11618,20 @@ function cl({
|
|
11584
11618
|
/* @__PURE__ */ m(Ms, { children: /* @__PURE__ */ m(De, { className: "h-12 w-full rounded-full" }) })
|
11585
11619
|
] }, "chat-interface-sekelton");
|
11586
11620
|
}
|
11587
|
-
function
|
11621
|
+
function gw(e) {
|
11588
11622
|
const { isOpen: t = !1, isMobile: n, onCleanChat: r, onClose: o, theme: s } = e, i = Qo(t, 10), [c, a] = z(!1), u = al({
|
11589
11623
|
isOpen: i,
|
11590
11624
|
isMobile: n
|
11591
11625
|
}), l = () => c ? /* @__PURE__ */ D(Ns, { className: u, children: [
|
11592
11626
|
/* @__PURE__ */ m(
|
11593
|
-
|
11627
|
+
rw,
|
11594
11628
|
{
|
11595
11629
|
onCleanChat: () => r?.(),
|
11596
11630
|
onClose: () => o?.()
|
11597
11631
|
}
|
11598
11632
|
),
|
11599
|
-
/* @__PURE__ */ m(
|
11600
|
-
/* @__PURE__ */ m(
|
11633
|
+
/* @__PURE__ */ m(lw, {}),
|
11634
|
+
/* @__PURE__ */ m(mw, {})
|
11601
11635
|
] }) : /* @__PURE__ */ D(xt, { children: [
|
11602
11636
|
/* @__PURE__ */ m(cl, { isOpen: t, isMobile: n }),
|
11603
11637
|
!c && /* @__PURE__ */ m(
|
@@ -11608,7 +11642,7 @@ function mw(e) {
|
|
11608
11642
|
}
|
11609
11643
|
)
|
11610
11644
|
] });
|
11611
|
-
return /* @__PURE__ */ m(
|
11645
|
+
return /* @__PURE__ */ m(V_, { ...s, children: /* @__PURE__ */ m(ew, { ...e, children: /* @__PURE__ */ m(
|
11612
11646
|
"main",
|
11613
11647
|
{
|
11614
11648
|
className: A(
|
@@ -11621,40 +11655,6 @@ function mw(e) {
|
|
11621
11655
|
}
|
11622
11656
|
) }) });
|
11623
11657
|
}
|
11624
|
-
function gw({
|
11625
|
-
isOpen: e,
|
11626
|
-
toggleBubble: t
|
11627
|
-
}) {
|
11628
|
-
return /* @__PURE__ */ m("div", { className: "absolute inset-0 m-auto flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ D(
|
11629
|
-
"div",
|
11630
|
-
{
|
11631
|
-
className: "chat-bubble relative flex items-center justify-center w-12 h-12 rounded-full bg-[#000] text-[#fff] cursor-pointer",
|
11632
|
-
onClick: t,
|
11633
|
-
children: [
|
11634
|
-
/* @__PURE__ */ m(
|
11635
|
-
"div",
|
11636
|
-
{
|
11637
|
-
className: A(
|
11638
|
-
"absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
|
11639
|
-
e ? "rotate-180 opacity-0 scale-0" : "rotate-0 opacity-100 scale-100"
|
11640
|
-
),
|
11641
|
-
children: /* @__PURE__ */ m(Ur, { bgColor: "#000", fgColor: "#ffffff" })
|
11642
|
-
}
|
11643
|
-
),
|
11644
|
-
/* @__PURE__ */ m(
|
11645
|
-
"div",
|
11646
|
-
{
|
11647
|
-
className: A(
|
11648
|
-
"absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
|
11649
|
-
e ? "rotate-0 opacity-100 scale-100" : "-rotate-180 opacity-0 scale-0"
|
11650
|
-
),
|
11651
|
-
children: /* @__PURE__ */ m(Qa, {})
|
11652
|
-
}
|
11653
|
-
)
|
11654
|
-
]
|
11655
|
-
}
|
11656
|
-
) });
|
11657
|
-
}
|
11658
11658
|
function ha({ children: e, head: t, ...n }) {
|
11659
11659
|
const [r, o] = z(null), s = r?.contentWindow?.document?.head, i = r?.contentWindow?.document?.body;
|
11660
11660
|
return /* @__PURE__ */ D("iframe", { ...n, ref: o, children: [
|
@@ -11665,25 +11665,24 @@ function ha({ children: e, head: t, ...n }) {
|
|
11665
11665
|
function yw({ children: e, container: t }) {
|
11666
11666
|
return fo(e, t);
|
11667
11667
|
}
|
11668
|
-
function bw(
|
11669
|
-
|
11670
|
-
|
11671
|
-
|
11672
|
-
return
|
11673
|
-
|
11674
|
-
|
11675
|
-
|
11676
|
-
|
11677
|
-
|
11678
|
-
|
11679
|
-
|
11680
|
-
|
11681
|
-
|
11682
|
-
|
11683
|
-
|
11684
|
-
|
11685
|
-
|
11686
|
-
};
|
11668
|
+
function bw({
|
11669
|
+
chatProps: e,
|
11670
|
+
chatSettings: t
|
11671
|
+
}) {
|
11672
|
+
return Et(() => t ? {
|
11673
|
+
assistantName: t.agent_name,
|
11674
|
+
assistantLogo: t.avatar_url || void 0,
|
11675
|
+
theme: {
|
11676
|
+
...e?.theme,
|
11677
|
+
mode: t.theme ?? "light",
|
11678
|
+
userBubbleColor: t.user_bubble_color || e?.theme?.userBubbleColor
|
11679
|
+
},
|
11680
|
+
welcomeMessage: t.welcome_message || void 0,
|
11681
|
+
legalText: t.footer_html || void 0,
|
11682
|
+
suggestedMessages: t.suggested_messages,
|
11683
|
+
displayWelcomeMessages: t.display_welcome_messages,
|
11684
|
+
collectUserFeedback: t.collect_user_feedback
|
11685
|
+
} : e, [e, t]);
|
11687
11686
|
}
|
11688
11687
|
class $o extends Error {
|
11689
11688
|
status;
|
@@ -11730,91 +11729,9 @@ class _w {
|
|
11730
11729
|
});
|
11731
11730
|
}
|
11732
11731
|
}
|
11733
|
-
|
11734
|
-
httpClient;
|
11735
|
-
userId = null;
|
11736
|
-
conversationId = null;
|
11737
|
-
constructor(t) {
|
11738
|
-
this.userId = t.userId || null, this.httpClient = new _w(t);
|
11739
|
-
}
|
11740
|
-
getUserData() {
|
11741
|
-
return {
|
11742
|
-
userId: this.userId,
|
11743
|
-
conversationId: this.conversationId
|
11744
|
-
};
|
11745
|
-
}
|
11746
|
-
/**
|
11747
|
-
* Reset API client by clearing all stored state
|
11748
|
-
*/
|
11749
|
-
reset() {
|
11750
|
-
this.conversationId = null;
|
11751
|
-
}
|
11752
|
-
async boot() {
|
11753
|
-
return (await this.httpClient.get(
|
11754
|
-
"/sdk/boot"
|
11755
|
-
)).data;
|
11756
|
-
}
|
11757
|
-
async createConversation(t) {
|
11758
|
-
const n = {
|
11759
|
-
text: t.text,
|
11760
|
-
user_data: {
|
11761
|
-
user_id: t.externalId || t.userId,
|
11762
|
-
device_id: t.deviceId
|
11763
|
-
}
|
11764
|
-
}, r = await this.httpClient.post("/chat", n), { data: o } = r;
|
11765
|
-
return o;
|
11766
|
-
}
|
11767
|
-
async replyToConversation(t) {
|
11768
|
-
const n = {
|
11769
|
-
text: t.text,
|
11770
|
-
user_data: {
|
11771
|
-
device_id: t.deviceId,
|
11772
|
-
user_id: t.userId
|
11773
|
-
}
|
11774
|
-
}, { data: r } = await this.httpClient.post(`/chat/${t.conversationId}`, n);
|
11775
|
-
return r;
|
11776
|
-
}
|
11777
|
-
async identifyUser(t) {
|
11778
|
-
const n = {
|
11779
|
-
device_id: t.deviceId,
|
11780
|
-
user_id: t.userId,
|
11781
|
-
external_id: t.externalId
|
11782
|
-
}, { data: r } = await this.httpClient.post(`/chat/${t.conversationId}/identify`, n);
|
11783
|
-
return r;
|
11784
|
-
}
|
11785
|
-
}
|
11786
|
-
const Fn = /* @__PURE__ */ new Map(), Bn = /* @__PURE__ */ new Map();
|
11787
|
-
function vw(e, t, n) {
|
11788
|
-
const r = n?.dedupe !== !1, [o, s] = z(
|
11789
|
-
() => Fn.get(e)
|
11790
|
-
), { publishApiError: i } = Ds(), [c, a] = z(void 0), [u, l] = z(!1), d = Pe(!0);
|
11791
|
-
Pe(() => (d.current = !0, () => {
|
11792
|
-
d.current = !1;
|
11793
|
-
}));
|
11794
|
-
const f = $e(async () => {
|
11795
|
-
if (Fn.has(e)) {
|
11796
|
-
const h = Fn.get(e);
|
11797
|
-
return s(h), h;
|
11798
|
-
}
|
11799
|
-
l(!0), a(void 0);
|
11800
|
-
try {
|
11801
|
-
if (r && Bn.has(e))
|
11802
|
-
return await Bn.get(e);
|
11803
|
-
const h = t();
|
11804
|
-
r && Bn.set(e, h);
|
11805
|
-
const p = await h;
|
11806
|
-
return Fn.set(e, p), d.current && s(p), p;
|
11807
|
-
} catch (h) {
|
11808
|
-
throw i(h), d.current && a(h), h;
|
11809
|
-
} finally {
|
11810
|
-
Bn.delete(e), d.current && l(!1);
|
11811
|
-
}
|
11812
|
-
}, [e, r, t, i]);
|
11813
|
-
return { data: o, error: c, isLoading: u, fetch: f };
|
11814
|
-
}
|
11815
|
-
const Sw = "eloquent-ai::conversation-data", Ew = 30 * 60 * 1e3;
|
11732
|
+
const ww = "eloquent-ai::conversation-data", vw = 30 * 60 * 1e3;
|
11816
11733
|
function Ls({ appId: e }) {
|
11817
|
-
const t = Et(() => `${
|
11734
|
+
const t = Et(() => `${ww}-${e}`, [e]), n = Et(
|
11818
11735
|
() => ({
|
11819
11736
|
conversationId: null,
|
11820
11737
|
userId: null,
|
@@ -11835,7 +11752,7 @@ function Ls({ appId: e }) {
|
|
11835
11752
|
}, [t, n]), o = $e(() => {
|
11836
11753
|
try {
|
11837
11754
|
const a = r();
|
11838
|
-
return a.lastActivity ? Date.now() - a.lastActivity >
|
11755
|
+
return a.lastActivity ? Date.now() - a.lastActivity > vw : !0;
|
11839
11756
|
} catch (a) {
|
11840
11757
|
return console.error("Error checking conversation expiration:", a), !0;
|
11841
11758
|
}
|
@@ -11875,116 +11792,23 @@ function Ls({ appId: e }) {
|
|
11875
11792
|
a
|
11876
11793
|
);
|
11877
11794
|
}
|
11878
|
-
}, [t, n]), c = $e(() => {
|
11879
|
-
try {
|
11880
|
-
const a = r();
|
11881
|
-
a.conversationId && (a.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(a)));
|
11882
|
-
} catch (a) {
|
11883
|
-
console.error("Error updating last activity timestamp:", a);
|
11884
|
-
}
|
11885
|
-
}, [r, t]);
|
11886
|
-
return {
|
11887
|
-
isConversationExpired: o,
|
11888
|
-
saveConversationData: s,
|
11889
|
-
clearConversationData: i,
|
11890
|
-
getSavedConversationData: r,
|
11891
|
-
updateLastActivity: c
|
11892
|
-
};
|
11893
|
-
}
|
11894
|
-
function xw(e) {
|
11895
|
-
const { appId: t, initialUserId: n } = e, { getSavedConversationData: r } = Ls({ appId: t }), [o, s] = z(!1), [i, c] = z(""), [a, u] = z(""), [l, d] = z(null);
|
11896
|
-
return ce(() => {
|
11897
|
-
const f = r();
|
11898
|
-
f?.userId ? f?.externalId !== n ? (c(f.userId), d(n)) : (c(f?.userId), d(f.externalId)) : n ? (c(n), d(n)) : c(crypto.randomUUID()), u(f?.deviceId || crypto.randomUUID()), s(!0);
|
11899
|
-
}, [r, n]), {
|
11900
|
-
isReady: o,
|
11901
|
-
userId: i,
|
11902
|
-
deviceId: a,
|
11903
|
-
externalId: l
|
11904
|
-
};
|
11905
|
-
}
|
11906
|
-
function Iw({
|
11907
|
-
appId: e,
|
11908
|
-
initialUserId: t
|
11909
|
-
}) {
|
11910
|
-
const {
|
11911
|
-
userId: n,
|
11912
|
-
externalId: r,
|
11913
|
-
deviceId: o,
|
11914
|
-
isReady: s
|
11915
|
-
} = xw({ appId: e, initialUserId: t }), {
|
11916
|
-
isConversationExpired: i,
|
11917
|
-
clearConversationData: c,
|
11918
|
-
getSavedConversationData: a
|
11919
|
-
} = Ls({ appId: e }), { current: u } = Pe(X_()), [l] = z(
|
11920
|
-
new ww({
|
11921
|
-
baseURL: u,
|
11922
|
-
appId: e
|
11923
|
-
})
|
11924
|
-
), [d, f] = z(null), [h, p] = z(null), [g, y] = z([]), [b, v] = z(!1), E = vw("sdk-boot", () => l.boot()).fetch;
|
11925
|
-
return ce(() => {
|
11926
|
-
if (i())
|
11927
|
-
c();
|
11928
|
-
else {
|
11929
|
-
const {
|
11930
|
-
conversationId: _,
|
11931
|
-
userId: w,
|
11932
|
-
messages: I
|
11933
|
-
} = a();
|
11934
|
-
_ && w && (p({
|
11935
|
-
id: _
|
11936
|
-
}), I && I.length > 0 && y(I));
|
11937
|
-
}
|
11938
|
-
}, [a, i, c]), ce(() => {
|
11939
|
-
if (!s) return;
|
11940
|
-
(async () => {
|
11941
|
-
const [w, I] = await z_(E());
|
11942
|
-
if (I) {
|
11943
|
-
v(!0);
|
11944
|
-
return;
|
11945
|
-
}
|
11946
|
-
const C = w.chat_settings.welcome_message;
|
11947
|
-
f(w.chat_settings), C && g.length === 0 && y([
|
11948
|
-
{
|
11949
|
-
id: crypto.randomUUID(),
|
11950
|
-
content: C,
|
11951
|
-
sender: "receiver",
|
11952
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
11953
|
-
isWelcomeMessage: !0
|
11954
|
-
}
|
11955
|
-
]), v(!0);
|
11956
|
-
})();
|
11957
|
-
}, [s, g.length]), {
|
11958
|
-
userId: n,
|
11959
|
-
externalId: r,
|
11960
|
-
deviceId: o,
|
11961
|
-
apiClient: l,
|
11962
|
-
chatSettings: d,
|
11963
|
-
currentConversation: h,
|
11964
|
-
messages: g,
|
11965
|
-
isReady: b
|
11795
|
+
}, [t, n]), c = $e(() => {
|
11796
|
+
try {
|
11797
|
+
const a = r();
|
11798
|
+
a.conversationId && (a.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(a)));
|
11799
|
+
} catch (a) {
|
11800
|
+
console.error("Error updating last activity timestamp:", a);
|
11801
|
+
}
|
11802
|
+
}, [r, t]);
|
11803
|
+
return {
|
11804
|
+
isConversationExpired: o,
|
11805
|
+
saveConversationData: s,
|
11806
|
+
clearConversationData: i,
|
11807
|
+
getSavedConversationData: r,
|
11808
|
+
updateLastActivity: c
|
11966
11809
|
};
|
11967
11810
|
}
|
11968
|
-
|
11969
|
-
chatProps: e,
|
11970
|
-
chatSettings: t
|
11971
|
-
}) {
|
11972
|
-
return Et(() => t ? {
|
11973
|
-
assistantName: t.agent_name,
|
11974
|
-
assistantLogo: t.avatar_url || void 0,
|
11975
|
-
theme: {
|
11976
|
-
...e?.theme,
|
11977
|
-
mode: t.theme ?? "light",
|
11978
|
-
userBubbleColor: t.user_bubble_color || e?.theme?.userBubbleColor
|
11979
|
-
},
|
11980
|
-
welcomeMessage: t.welcome_message || void 0,
|
11981
|
-
legalText: t.footer_html || void 0,
|
11982
|
-
suggestedMessages: t.suggested_messages,
|
11983
|
-
displayWelcomeMessages: t.display_welcome_messages,
|
11984
|
-
collectUserFeedback: t.collect_user_feedback
|
11985
|
-
} : e, [e, t]);
|
11986
|
-
}
|
11987
|
-
const Cw = "Logging", Tw = "x-amz-user-agent", Rw = "NoHubcallbackProvidedException";
|
11811
|
+
const Sw = "Logging", Ew = "x-amz-user-agent", xw = "NoHubcallbackProvidedException";
|
11988
11812
|
var ye;
|
11989
11813
|
(function(e) {
|
11990
11814
|
e.DEBUG = "DEBUG", e.ERROR = "ERROR", e.INFO = "INFO", e.WARN = "WARN", e.VERBOSE = "VERBOSE", e.NONE = "NONE";
|
@@ -12101,7 +11925,7 @@ class Ie {
|
|
12101
11925
|
this._log(ye.VERBOSE, ...t);
|
12102
11926
|
}
|
12103
11927
|
addPluggable(t) {
|
12104
|
-
t && t.getCategoryName() ===
|
11928
|
+
t && t.getCategoryName() === Sw && (this._pluggables.push(t), t.configure(this._config));
|
12105
11929
|
}
|
12106
11930
|
listPluggables() {
|
12107
11931
|
return this._pluggables;
|
@@ -12127,7 +11951,7 @@ class Lt extends Error {
|
|
12127
11951
|
}
|
12128
11952
|
}
|
12129
11953
|
const Ps = typeof Symbol < "u" ? Symbol("amplify_default") : "@@amplify_default", Gt = new Ie("Hub");
|
12130
|
-
class
|
11954
|
+
class Iw {
|
12131
11955
|
constructor(t) {
|
12132
11956
|
this.listeners = /* @__PURE__ */ new Map(), this.protectedChannels = [
|
12133
11957
|
"core",
|
@@ -12175,7 +11999,7 @@ class Nw {
|
|
12175
11999
|
let o;
|
12176
12000
|
if (typeof n != "function")
|
12177
12001
|
throw new Lt({
|
12178
|
-
name:
|
12002
|
+
name: xw,
|
12179
12003
|
message: "No callback supplied to Hub"
|
12180
12004
|
});
|
12181
12005
|
o = n;
|
@@ -12199,7 +12023,7 @@ class Nw {
|
|
12199
12023
|
});
|
12200
12024
|
}
|
12201
12025
|
}
|
12202
|
-
const ul = new
|
12026
|
+
const ul = new Iw("__default__"), kw = () => {
|
12203
12027
|
if (typeof window < "u" && typeof window.btoa == "function")
|
12204
12028
|
return window.btoa;
|
12205
12029
|
if (typeof btoa == "function")
|
@@ -12208,25 +12032,25 @@ const ul = new Nw("__default__"), Ow = () => {
|
|
12208
12032
|
name: "Base64EncoderError",
|
12209
12033
|
message: "Cannot resolve the `btoa` function from the environment."
|
12210
12034
|
});
|
12211
|
-
}, ll = (e) => e && e["nonRetryable"],
|
12212
|
-
async function
|
12035
|
+
}, ll = (e) => e && e["nonRetryable"], Fn = new Ie("retryUtil");
|
12036
|
+
async function Cw(e, t, n, r) {
|
12213
12037
|
if (typeof e != "function")
|
12214
12038
|
throw Error("functionToRetry must be a function");
|
12215
12039
|
return new Promise(async (o, s) => {
|
12216
12040
|
let i = 0, c = !1, a = () => {
|
12217
12041
|
}, u;
|
12218
12042
|
for (; !c; ) {
|
12219
|
-
i++,
|
12043
|
+
i++, Fn.debug(`${e.name} attempt #${i} with this vars: ${JSON.stringify(t)}`);
|
12220
12044
|
try {
|
12221
12045
|
o(await e(...t));
|
12222
12046
|
return;
|
12223
12047
|
} catch (l) {
|
12224
|
-
if (u = l,
|
12225
|
-
|
12048
|
+
if (u = l, Fn.debug(`error on ${e.name}`, l), ll(l)) {
|
12049
|
+
Fn.debug(`${e.name} non retryable error`, l), s(l);
|
12226
12050
|
return;
|
12227
12051
|
}
|
12228
12052
|
const d = n(i, t, l);
|
12229
|
-
if (
|
12053
|
+
if (Fn.debug(`${e.name} retrying in ${d} ms`), d === !1 || c) {
|
12230
12054
|
s(l);
|
12231
12055
|
return;
|
12232
12056
|
} else
|
@@ -12245,7 +12069,7 @@ const dl = (e) => {
|
|
12245
12069
|
(r && typeof r == "object" || typeof r == "function") && dl(r);
|
12246
12070
|
}
|
12247
12071
|
return Object.freeze(e);
|
12248
|
-
},
|
12072
|
+
}, Tw = new Ie("parseAWSExports"), Rw = {
|
12249
12073
|
API_KEY: "apiKey",
|
12250
12074
|
AWS_IAM: "iam",
|
12251
12075
|
AMAZON_COGNITO_USER_POOLS: "userPool",
|
@@ -12258,7 +12082,7 @@ const dl = (e) => {
|
|
12258
12082
|
// ref: https://github.com/aws-amplify/amplify-js/pull/12922
|
12259
12083
|
// TODO: @v7 remove next line
|
12260
12084
|
LAMBDA: "lambda"
|
12261
|
-
},
|
12085
|
+
}, Nw = (e = {}) => {
|
12262
12086
|
if (!Object.prototype.hasOwnProperty.call(e, "aws_project_region"))
|
12263
12087
|
throw new Lt({
|
12264
12088
|
name: "InvalidParameterException",
|
@@ -12301,8 +12125,8 @@ const dl = (e) => {
|
|
12301
12125
|
if (Array.isArray(s) && (L.Interactions = {
|
12302
12126
|
LexV1: Object.fromEntries(s.map((G) => [G.name, G]))
|
12303
12127
|
}), r) {
|
12304
|
-
const G =
|
12305
|
-
G ||
|
12128
|
+
const G = Rw[n];
|
12129
|
+
G || Tw.debug(`Invalid authentication type ${n}. Falling back to IAM.`), L.API = {
|
12306
12130
|
GraphQL: {
|
12307
12131
|
endpoint: r,
|
12308
12132
|
apiKey: t,
|
@@ -12350,9 +12174,9 @@ const dl = (e) => {
|
|
12350
12174
|
if (L.Auth && $r && (L.Auth.Cognito.loginWith = {
|
12351
12175
|
...L.Auth.Cognito.loginWith,
|
12352
12176
|
oauth: {
|
12353
|
-
...
|
12177
|
+
...Ow(C),
|
12354
12178
|
...ht && {
|
12355
|
-
providers:
|
12179
|
+
providers: Aw(h)
|
12356
12180
|
}
|
12357
12181
|
}
|
12358
12182
|
}), v && (L.Storage = {
|
@@ -12399,50 +12223,50 @@ const dl = (e) => {
|
|
12399
12223
|
} : S;
|
12400
12224
|
}
|
12401
12225
|
return L;
|
12402
|
-
}, ma = (e) => e?.split(",") ?? [],
|
12226
|
+
}, ma = (e) => e?.split(",") ?? [], Ow = ({ domain: e, scope: t, redirectSignIn: n, redirectSignOut: r, responseType: o }) => ({
|
12403
12227
|
domain: e,
|
12404
12228
|
scopes: t,
|
12405
12229
|
redirectSignIn: ma(n),
|
12406
12230
|
redirectSignOut: ma(r),
|
12407
12231
|
responseType: o
|
12408
|
-
}),
|
12232
|
+
}), Aw = (e) => e.map((t) => {
|
12409
12233
|
const n = t.toLowerCase();
|
12410
12234
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
12411
|
-
}),
|
12412
|
-
let
|
12413
|
-
const
|
12414
|
-
function
|
12415
|
-
if (!
|
12235
|
+
}), Mw = Symbol("oauth-listener");
|
12236
|
+
let Bn;
|
12237
|
+
const Dw = new Uint8Array(16);
|
12238
|
+
function Lw() {
|
12239
|
+
if (!Bn && (Bn = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Bn))
|
12416
12240
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
12417
|
-
return
|
12241
|
+
return Bn(Dw);
|
12418
12242
|
}
|
12419
12243
|
const oe = [];
|
12420
12244
|
for (let e = 0; e < 256; ++e)
|
12421
12245
|
oe.push((e + 256).toString(16).slice(1));
|
12422
|
-
function
|
12246
|
+
function Pw(e, t = 0) {
|
12423
12247
|
return oe[e[t + 0]] + oe[e[t + 1]] + oe[e[t + 2]] + oe[e[t + 3]] + "-" + oe[e[t + 4]] + oe[e[t + 5]] + "-" + oe[e[t + 6]] + oe[e[t + 7]] + "-" + oe[e[t + 8]] + oe[e[t + 9]] + "-" + oe[e[t + 10]] + oe[e[t + 11]] + oe[e[t + 12]] + oe[e[t + 13]] + oe[e[t + 14]] + oe[e[t + 15]];
|
12424
12248
|
}
|
12425
|
-
const
|
12426
|
-
randomUUID:
|
12249
|
+
const Uw = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ga = {
|
12250
|
+
randomUUID: Uw
|
12427
12251
|
};
|
12428
|
-
function
|
12252
|
+
function Fw(e, t, n) {
|
12429
12253
|
if (ga.randomUUID && !t && !e)
|
12430
12254
|
return ga.randomUUID();
|
12431
12255
|
e = e || {};
|
12432
|
-
const r = e.random || (e.rng ||
|
12256
|
+
const r = e.random || (e.rng || Lw)();
|
12433
12257
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
12434
12258
|
n = n || 0;
|
12435
12259
|
for (let o = 0; o < 16; ++o)
|
12436
12260
|
t[n + o] = r[o];
|
12437
12261
|
return t;
|
12438
12262
|
}
|
12439
|
-
return
|
12263
|
+
return Pw(r);
|
12440
12264
|
}
|
12441
|
-
function
|
12265
|
+
function Bw(e) {
|
12442
12266
|
const { version: t } = e;
|
12443
12267
|
return t ? t.startsWith("1") : !1;
|
12444
12268
|
}
|
12445
|
-
function
|
12269
|
+
function $w(e) {
|
12446
12270
|
if (!e)
|
12447
12271
|
return;
|
12448
12272
|
const { bucket_name: t, aws_region: n, buckets: r } = e;
|
@@ -12450,11 +12274,11 @@ function qw(e) {
|
|
12450
12274
|
S3: {
|
12451
12275
|
bucket: t,
|
12452
12276
|
region: n,
|
12453
|
-
buckets: r &&
|
12277
|
+
buckets: r && Xw(r)
|
12454
12278
|
}
|
12455
12279
|
};
|
12456
12280
|
}
|
12457
|
-
function
|
12281
|
+
function Hw(e) {
|
12458
12282
|
if (!e)
|
12459
12283
|
return;
|
12460
12284
|
const { user_pool_id: t, user_pool_client_id: n, identity_pool_id: r, password_policy: o, mfa_configuration: s, mfa_methods: i, unauthenticated_identities_enabled: c, oauth: a, username_attributes: u, standard_required_attributes: l, groups: d } = e, f = {
|
@@ -12474,7 +12298,7 @@ function Gw(e) {
|
|
12474
12298
|
requireSpecialCharacters: o.require_symbols,
|
12475
12299
|
minLength: o.min_length ?? 6
|
12476
12300
|
}), s && (f.Cognito.mfa = {
|
12477
|
-
status:
|
12301
|
+
status: Jw(s),
|
12478
12302
|
smsEnabled: i?.includes("SMS"),
|
12479
12303
|
totpEnabled: i?.includes("TOTP")
|
12480
12304
|
}), c && (f.Cognito.allowGuestAccess = c), a && (f.Cognito.loginWith = {
|
@@ -12484,7 +12308,7 @@ function Gw(e) {
|
|
12484
12308
|
redirectSignOut: a.redirect_sign_out_uri,
|
12485
12309
|
responseType: a.response_type === "token" ? "token" : "code",
|
12486
12310
|
scopes: a.scopes,
|
12487
|
-
providers:
|
12311
|
+
providers: Yw(a.identity_providers)
|
12488
12312
|
}
|
12489
12313
|
}), u && (f.Cognito.loginWith = {
|
12490
12314
|
...f.Cognito.loginWith,
|
@@ -12494,7 +12318,7 @@ function Gw(e) {
|
|
12494
12318
|
username: u.includes("username")
|
12495
12319
|
}), l && (f.Cognito.userAttributes = l.reduce((h, p) => ({ ...h, [p]: { required: !0 } }), {})), f;
|
12496
12320
|
}
|
12497
|
-
function
|
12321
|
+
function Ww(e) {
|
12498
12322
|
if (!e?.amazon_pinpoint)
|
12499
12323
|
return;
|
12500
12324
|
const { amazon_pinpoint: t } = e;
|
@@ -12505,7 +12329,7 @@ function Vw(e) {
|
|
12505
12329
|
}
|
12506
12330
|
};
|
12507
12331
|
}
|
12508
|
-
function
|
12332
|
+
function zw(e) {
|
12509
12333
|
if (!e)
|
12510
12334
|
return;
|
12511
12335
|
const { aws_region: t, geofence_collections: n, maps: r, search_indices: o } = e;
|
@@ -12518,7 +12342,7 @@ function Kw(e) {
|
|
12518
12342
|
}
|
12519
12343
|
};
|
12520
12344
|
}
|
12521
|
-
function
|
12345
|
+
function jw(e) {
|
12522
12346
|
if (!e)
|
12523
12347
|
return;
|
12524
12348
|
const { aws_region: t, default_authorization_type: n, url: r, api_key: o, model_introspection: s } = e;
|
@@ -12532,7 +12356,7 @@ function Yw(e) {
|
|
12532
12356
|
}
|
12533
12357
|
};
|
12534
12358
|
}
|
12535
|
-
function
|
12359
|
+
function qw(e) {
|
12536
12360
|
if (!e?.events)
|
12537
12361
|
return;
|
12538
12362
|
const { url: t, aws_region: n, api_key: r, default_authorization_type: o } = e.events;
|
@@ -12545,7 +12369,7 @@ function Jw(e) {
|
|
12545
12369
|
}
|
12546
12370
|
};
|
12547
12371
|
}
|
12548
|
-
function
|
12372
|
+
function Gw(e) {
|
12549
12373
|
if (!e)
|
12550
12374
|
return;
|
12551
12375
|
const { aws_region: t, channels: n, amazon_pinpoint_app_id: r } = e, o = n.includes("IN_APP_MESSAGING"), s = n.includes("APNS") || n.includes("FCM");
|
@@ -12564,15 +12388,15 @@ function Xw(e) {
|
|
12564
12388
|
}
|
12565
12389
|
}), i;
|
12566
12390
|
}
|
12567
|
-
function
|
12391
|
+
function Vw(e) {
|
12568
12392
|
const t = {};
|
12569
|
-
if (e.storage && (t.Storage =
|
12570
|
-
const n =
|
12393
|
+
if (e.storage && (t.Storage = $w(e.storage)), e.auth && (t.Auth = Hw(e.auth)), e.analytics && (t.Analytics = Ww(e.analytics)), e.geo && (t.Geo = zw(e.geo)), e.data && (t.API = jw(e.data)), e.custom) {
|
12394
|
+
const n = qw(e.custom);
|
12571
12395
|
n && "Events" in n && (t.API = { ...t.API, ...n });
|
12572
12396
|
}
|
12573
|
-
return e.notifications && (t.Notifications =
|
12397
|
+
return e.notifications && (t.Notifications = Gw(e.notifications)), t;
|
12574
12398
|
}
|
12575
|
-
const
|
12399
|
+
const Kw = {
|
12576
12400
|
AMAZON_COGNITO_USER_POOLS: "userPool",
|
12577
12401
|
API_KEY: "apiKey",
|
12578
12402
|
AWS_IAM: "iam",
|
@@ -12580,7 +12404,7 @@ const Zw = {
|
|
12580
12404
|
OPENID_CONNECT: "oidc"
|
12581
12405
|
};
|
12582
12406
|
function fl(e) {
|
12583
|
-
return
|
12407
|
+
return Kw[e];
|
12584
12408
|
}
|
12585
12409
|
const ya = {
|
12586
12410
|
GOOGLE: "Google",
|
@@ -12588,13 +12412,13 @@ const ya = {
|
|
12588
12412
|
FACEBOOK: "Facebook",
|
12589
12413
|
SIGN_IN_WITH_APPLE: "Apple"
|
12590
12414
|
};
|
12591
|
-
function
|
12415
|
+
function Yw(e = []) {
|
12592
12416
|
return e.reduce((t, n) => (ya[n] !== void 0 && t.push(ya[n]), t), []);
|
12593
12417
|
}
|
12594
|
-
function
|
12418
|
+
function Jw(e) {
|
12595
12419
|
return e === "OPTIONAL" ? "optional" : e === "REQUIRED" ? "on" : "off";
|
12596
12420
|
}
|
12597
|
-
function
|
12421
|
+
function Xw(e) {
|
12598
12422
|
const t = {};
|
12599
12423
|
return e.forEach(({ name: n, bucket_name: r, aws_region: o, paths: s }) => {
|
12600
12424
|
if (n in t)
|
@@ -12607,7 +12431,7 @@ function nv(e) {
|
|
12607
12431
|
};
|
12608
12432
|
}), t;
|
12609
12433
|
}
|
12610
|
-
const
|
12434
|
+
const Qw = (e) => Object.keys(e).some((t) => t.startsWith("aws_")) ? Nw(e) : Bw(e) ? Vw(e) : e;
|
12611
12435
|
var Ho = function(e, t) {
|
12612
12436
|
return Ho = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
12613
12437
|
n.__proto__ = r;
|
@@ -12746,7 +12570,7 @@ function zo(e, t, n) {
|
|
12746
12570
|
function It(e) {
|
12747
12571
|
return this instanceof It ? (this.v = e, this) : new It(e);
|
12748
12572
|
}
|
12749
|
-
function
|
12573
|
+
function Zw(e, t, n) {
|
12750
12574
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
12751
12575
|
var r = n.apply(e, t || []), o, s = [];
|
12752
12576
|
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", i), o[Symbol.asyncIterator] = function() {
|
@@ -12784,7 +12608,7 @@ function ov(e, t, n) {
|
|
12784
12608
|
h(p), s.shift(), s.length && a(s[0][0], s[0][1]);
|
12785
12609
|
}
|
12786
12610
|
}
|
12787
|
-
function
|
12611
|
+
function ev(e) {
|
12788
12612
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
12789
12613
|
var t = e[Symbol.asyncIterator], n;
|
12790
12614
|
return t ? t.call(e) : (e = typeof ln == "function" ? ln(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
|
@@ -12803,7 +12627,7 @@ function sv(e) {
|
|
12803
12627
|
}, i);
|
12804
12628
|
}
|
12805
12629
|
}
|
12806
|
-
var Ee = 64,
|
12630
|
+
var Ee = 64, tv = 32, nv = new Uint32Array([
|
12807
12631
|
1116352408,
|
12808
12632
|
1899447441,
|
12809
12633
|
3049323471,
|
@@ -12868,7 +12692,7 @@ var Ee = 64, iv = 32, av = new Uint32Array([
|
|
12868
12692
|
2756734187,
|
12869
12693
|
3204031479,
|
12870
12694
|
3329325298
|
12871
|
-
]),
|
12695
|
+
]), rv = [
|
12872
12696
|
1779033703,
|
12873
12697
|
3144134277,
|
12874
12698
|
1013904242,
|
@@ -12877,17 +12701,17 @@ var Ee = 64, iv = 32, av = new Uint32Array([
|
|
12877
12701
|
2600822924,
|
12878
12702
|
528734635,
|
12879
12703
|
1541459225
|
12880
|
-
],
|
12704
|
+
], ov = Math.pow(2, 53) - 1, Kn = (
|
12881
12705
|
/** @class */
|
12882
12706
|
function() {
|
12883
12707
|
function e() {
|
12884
|
-
this.state = Int32Array.from(
|
12708
|
+
this.state = Int32Array.from(rv), this.temp = new Int32Array(64), this.buffer = new Uint8Array(64), this.bufferLength = 0, this.bytesHashed = 0, this.finished = !1;
|
12885
12709
|
}
|
12886
12710
|
return e.prototype.update = function(t) {
|
12887
12711
|
if (this.finished)
|
12888
12712
|
throw new Error("Attempted to update an already finished hash.");
|
12889
12713
|
var n = 0, r = t.byteLength;
|
12890
|
-
if (this.bytesHashed += r, this.bytesHashed * 8 >
|
12714
|
+
if (this.bytesHashed += r, this.bytesHashed * 8 > ov)
|
12891
12715
|
throw new Error("Cannot hash more than 2^53 - 1 bits");
|
12892
12716
|
for (; r > 0; )
|
12893
12717
|
this.buffer[this.bufferLength++] = t[n++], r--, this.bufferLength === Ee && (this.hashBuffer(), this.bufferLength = 0);
|
@@ -12903,7 +12727,7 @@ var Ee = 64, iv = 32, av = new Uint32Array([
|
|
12903
12727
|
n.setUint8(o, 0);
|
12904
12728
|
n.setUint32(Ee - 8, Math.floor(t / 4294967296), !0), n.setUint32(Ee - 4, t), this.hashBuffer(), this.finished = !0;
|
12905
12729
|
}
|
12906
|
-
for (var s = new Uint8Array(
|
12730
|
+
for (var s = new Uint8Array(tv), o = 0; o < 8; o++)
|
12907
12731
|
s[o * 4] = this.state[o] >>> 24 & 255, s[o * 4 + 1] = this.state[o] >>> 16 & 255, s[o * 4 + 2] = this.state[o] >>> 8 & 255, s[o * 4 + 3] = this.state[o] >>> 0 & 255;
|
12908
12732
|
return s;
|
12909
12733
|
}, e.prototype.hashBuffer = function() {
|
@@ -12916,31 +12740,31 @@ var Ee = 64, iv = 32, av = new Uint32Array([
|
|
12916
12740
|
var g = (h >>> 7 | h << 25) ^ (h >>> 18 | h << 14) ^ h >>> 3;
|
12917
12741
|
this.temp[f] = (p + this.temp[f - 7] | 0) + (g + this.temp[f - 16] | 0);
|
12918
12742
|
}
|
12919
|
-
var y = (((a >>> 6 | a << 26) ^ (a >>> 11 | a << 21) ^ (a >>> 25 | a << 7)) + (a & u ^ ~a & l) | 0) + (d + (
|
12743
|
+
var y = (((a >>> 6 | a << 26) ^ (a >>> 11 | a << 21) ^ (a >>> 25 | a << 7)) + (a & u ^ ~a & l) | 0) + (d + (nv[f] + this.temp[f] | 0) | 0) | 0, b = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & s ^ o & i ^ s & i) | 0;
|
12920
12744
|
d = l, l = u, u = a, a = c + y | 0, c = i, i = s, s = o, o = y + b | 0;
|
12921
12745
|
}
|
12922
12746
|
r[0] += o, r[1] += s, r[2] += i, r[3] += c, r[4] += a, r[5] += u, r[6] += l, r[7] += d;
|
12923
12747
|
}, e;
|
12924
12748
|
}()
|
12925
12749
|
);
|
12926
|
-
const
|
12927
|
-
var
|
12750
|
+
const sv = (e) => new TextEncoder().encode(e);
|
12751
|
+
var iv = typeof Buffer < "u" && Buffer.from ? function(e) {
|
12928
12752
|
return Buffer.from(e, "utf8");
|
12929
|
-
} :
|
12753
|
+
} : sv;
|
12930
12754
|
function pl(e) {
|
12931
|
-
return e instanceof Uint8Array ? e : typeof e == "string" ?
|
12755
|
+
return e instanceof Uint8Array ? e : typeof e == "string" ? iv(e) : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(e);
|
12932
12756
|
}
|
12933
|
-
function
|
12757
|
+
function av(e) {
|
12934
12758
|
return typeof e == "string" ? e.length === 0 : e.byteLength === 0;
|
12935
12759
|
}
|
12936
|
-
var
|
12760
|
+
var cv = (
|
12937
12761
|
/** @class */
|
12938
12762
|
function() {
|
12939
12763
|
function e(t) {
|
12940
12764
|
this.secret = t, this.hash = new Kn(), this.reset();
|
12941
12765
|
}
|
12942
12766
|
return e.prototype.update = function(t) {
|
12943
|
-
if (!(
|
12767
|
+
if (!(av(t) || this.error))
|
12944
12768
|
try {
|
12945
12769
|
this.hash.update(pl(t));
|
12946
12770
|
} catch (n) {
|
@@ -12959,7 +12783,7 @@ var hv = (
|
|
12959
12783
|
}, e.prototype.reset = function() {
|
12960
12784
|
if (this.hash = new Kn(), this.secret) {
|
12961
12785
|
this.outer = new Kn();
|
12962
|
-
var t =
|
12786
|
+
var t = uv(this.secret), n = new Uint8Array(Ee);
|
12963
12787
|
n.set(t);
|
12964
12788
|
for (var r = 0; r < Ee; r++)
|
12965
12789
|
t[r] ^= 54, n[r] ^= 92;
|
@@ -12970,7 +12794,7 @@ var hv = (
|
|
12970
12794
|
}, e;
|
12971
12795
|
}()
|
12972
12796
|
);
|
12973
|
-
function
|
12797
|
+
function uv(e) {
|
12974
12798
|
var t = pl(e);
|
12975
12799
|
if (t.byteLength > Ee) {
|
12976
12800
|
var n = new Kn();
|
@@ -12984,7 +12808,7 @@ for (let e = 0; e < 256; e++) {
|
|
12984
12808
|
let t = e.toString(16).toLowerCase();
|
12985
12809
|
t.length === 1 && (t = `0${t}`), ml[e] = t;
|
12986
12810
|
}
|
12987
|
-
function
|
12811
|
+
function lv(e) {
|
12988
12812
|
let t = "";
|
12989
12813
|
for (let n = 0; n < e.byteLength; n++)
|
12990
12814
|
t += ml[e[n]];
|
@@ -13046,123 +12870,123 @@ var Na;
|
|
13046
12870
|
(function(e) {
|
13047
12871
|
e.UploadData = "1", e.DownloadData = "2", e.List = "3", e.Copy = "4", e.Remove = "5", e.GetProperties = "6", e.GetUrl = "7", e.GetDataAccess = "8", e.ListCallerAccessGrants = "9";
|
13048
12872
|
})(Na || (Na = {}));
|
13049
|
-
const
|
13050
|
-
function
|
12873
|
+
const dv = "6.15.1", Fr = () => typeof global < "u", $t = () => typeof window < "u", gl = () => typeof document < "u", Bs = () => typeof process < "u", dn = (e, t) => !!Object.keys(e).find((n) => n.startsWith(t));
|
12874
|
+
function fv() {
|
13051
12875
|
const e = (r) => r.startsWith("_react") || r.startsWith("__react"), t = (r) => Object.keys(r).find(e), n = () => Array.from(document.querySelectorAll("[id]"));
|
13052
12876
|
return gl() && n().some(t);
|
13053
12877
|
}
|
13054
|
-
function
|
12878
|
+
function hv() {
|
13055
12879
|
return Bs() && typeof process.env < "u" && !!Object.keys(process.env).find((e) => e.includes("react"));
|
13056
12880
|
}
|
13057
|
-
function
|
12881
|
+
function pv() {
|
13058
12882
|
return $t() && dn(window, "__VUE");
|
13059
12883
|
}
|
13060
|
-
function
|
12884
|
+
function mv() {
|
13061
12885
|
return Fr() && dn(global, "__VUE");
|
13062
12886
|
}
|
13063
|
-
function
|
12887
|
+
function gv() {
|
13064
12888
|
return $t() && dn(window, "__SVELTE");
|
13065
12889
|
}
|
13066
|
-
function
|
12890
|
+
function yv() {
|
13067
12891
|
return Bs() && typeof process.env < "u" && !!Object.keys(process.env).find((e) => e.includes("svelte"));
|
13068
12892
|
}
|
13069
|
-
function
|
12893
|
+
function bv() {
|
13070
12894
|
return $t() && window.next && typeof window.next == "object";
|
13071
12895
|
}
|
13072
|
-
function
|
12896
|
+
function _v() {
|
13073
12897
|
return Fr() && (dn(global, "__next") || dn(global, "__NEXT"));
|
13074
12898
|
}
|
13075
|
-
function
|
12899
|
+
function wv() {
|
13076
12900
|
return $t() && (window.__NUXT__ !== void 0 || window.$nuxt !== void 0);
|
13077
12901
|
}
|
13078
|
-
function
|
12902
|
+
function vv() {
|
13079
12903
|
return Fr() && typeof global.__NUXT_PATHS__ < "u";
|
13080
12904
|
}
|
13081
|
-
function
|
12905
|
+
function Sv() {
|
13082
12906
|
const e = !!(gl() && document.querySelector("[ng-version]")), t = !!($t() && typeof window.ng < "u");
|
13083
12907
|
return e || t;
|
13084
12908
|
}
|
13085
|
-
function
|
12909
|
+
function Ev() {
|
13086
12910
|
return Bs() && typeof process.env == "object" && "VITE_ENVIRONMENT=dev tsc -b && vite build --mode dev".startsWith("ng ") || !1;
|
13087
12911
|
}
|
13088
|
-
function
|
12912
|
+
function xv() {
|
13089
12913
|
return typeof navigator < "u" && typeof navigator.product < "u" && navigator.product === "ReactNative";
|
13090
12914
|
}
|
13091
|
-
function
|
12915
|
+
function Iv() {
|
13092
12916
|
return Fr() && typeof global.expo < "u";
|
13093
12917
|
}
|
13094
|
-
function
|
12918
|
+
function kv() {
|
13095
12919
|
return $t();
|
13096
12920
|
}
|
13097
|
-
const
|
12921
|
+
const Cv = [
|
13098
12922
|
// First, detect mobile
|
13099
|
-
{ platform: te.Expo, detectionMethod:
|
13100
|
-
{ platform: te.ReactNative, detectionMethod:
|
12923
|
+
{ platform: te.Expo, detectionMethod: Iv },
|
12924
|
+
{ platform: te.ReactNative, detectionMethod: xv },
|
13101
12925
|
// Next, detect web frameworks
|
13102
|
-
{ platform: te.NextJs, detectionMethod:
|
13103
|
-
{ platform: te.Nuxt, detectionMethod:
|
13104
|
-
{ platform: te.Angular, detectionMethod:
|
13105
|
-
{ platform: te.React, detectionMethod:
|
13106
|
-
{ platform: te.VueJs, detectionMethod:
|
13107
|
-
{ platform: te.Svelte, detectionMethod:
|
13108
|
-
{ platform: te.WebUnknown, detectionMethod:
|
12926
|
+
{ platform: te.NextJs, detectionMethod: bv },
|
12927
|
+
{ platform: te.Nuxt, detectionMethod: wv },
|
12928
|
+
{ platform: te.Angular, detectionMethod: Sv },
|
12929
|
+
{ platform: te.React, detectionMethod: fv },
|
12930
|
+
{ platform: te.VueJs, detectionMethod: pv },
|
12931
|
+
{ platform: te.Svelte, detectionMethod: gv },
|
12932
|
+
{ platform: te.WebUnknown, detectionMethod: kv },
|
13109
12933
|
// Last, detect ssr frameworks
|
13110
|
-
{ platform: te.NextJsSSR, detectionMethod:
|
13111
|
-
{ platform: te.NuxtSSR, detectionMethod:
|
13112
|
-
{ platform: te.ReactSSR, detectionMethod:
|
13113
|
-
{ platform: te.VueJsSSR, detectionMethod:
|
13114
|
-
{ platform: te.AngularSSR, detectionMethod:
|
13115
|
-
{ platform: te.SvelteSSR, detectionMethod:
|
12934
|
+
{ platform: te.NextJsSSR, detectionMethod: _v },
|
12935
|
+
{ platform: te.NuxtSSR, detectionMethod: vv },
|
12936
|
+
{ platform: te.ReactSSR, detectionMethod: hv },
|
12937
|
+
{ platform: te.VueJsSSR, detectionMethod: mv },
|
12938
|
+
{ platform: te.AngularSSR, detectionMethod: Ev },
|
12939
|
+
{ platform: te.SvelteSSR, detectionMethod: yv }
|
13116
12940
|
];
|
13117
|
-
function
|
13118
|
-
return
|
12941
|
+
function Tv() {
|
12942
|
+
return Cv.find((e) => e.detectionMethod())?.platform || te.ServerSideUnknown;
|
13119
12943
|
}
|
13120
12944
|
let tn;
|
13121
12945
|
const io = [];
|
13122
12946
|
let jo = !1;
|
13123
|
-
const
|
12947
|
+
const Rv = 10, Nv = 10, Ov = 1e3, yl = () => {
|
13124
12948
|
if (!tn) {
|
13125
|
-
if (tn =
|
12949
|
+
if (tn = Tv(), jo)
|
13126
12950
|
for (; io.length; )
|
13127
12951
|
io.pop()?.();
|
13128
12952
|
else
|
13129
12953
|
io.forEach((e) => {
|
13130
12954
|
e();
|
13131
12955
|
});
|
13132
|
-
Oa(te.ServerSideUnknown,
|
12956
|
+
Oa(te.ServerSideUnknown, Rv), Oa(te.WebUnknown, Nv);
|
13133
12957
|
}
|
13134
12958
|
return tn;
|
13135
12959
|
};
|
13136
|
-
function
|
12960
|
+
function Av() {
|
13137
12961
|
tn = void 0;
|
13138
12962
|
}
|
13139
12963
|
function Oa(e, t) {
|
13140
12964
|
tn === e && !jo && setTimeout(() => {
|
13141
|
-
|
12965
|
+
Av(), jo = !0, setTimeout(yl, Ov);
|
13142
12966
|
}, t);
|
13143
12967
|
}
|
13144
|
-
const
|
12968
|
+
const Mv = {}, Dv = (e, t) => Mv[e]?.[t]?.additionalDetails, Lv = "aws-amplify", Pv = (e) => e.replace(/\+.*/, ""), Uv = ({ category: e, action: t } = {}) => {
|
13145
12969
|
const n = [
|
13146
|
-
[
|
12970
|
+
[Lv, Pv(dv)]
|
13147
12971
|
];
|
13148
12972
|
if (e && n.push([e, t]), n.push(["framework", yl()]), e && t) {
|
13149
|
-
const r =
|
12973
|
+
const r = Dv(e, t);
|
13150
12974
|
r && r.forEach((o) => {
|
13151
12975
|
n.push(o);
|
13152
12976
|
});
|
13153
12977
|
}
|
13154
12978
|
return n;
|
13155
|
-
},
|
12979
|
+
}, Fv = (e) => Uv(e).map(([r, o]) => r && o ? `${r}/${o}` : r).join(" ");
|
13156
12980
|
function ie(e) {
|
13157
12981
|
return typeof e == "function";
|
13158
12982
|
}
|
13159
|
-
function
|
12983
|
+
function Bv(e) {
|
13160
12984
|
var t = function(r) {
|
13161
12985
|
Error.call(r), r.stack = new Error().stack;
|
13162
12986
|
}, n = e(t);
|
13163
12987
|
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
13164
12988
|
}
|
13165
|
-
var ao =
|
12989
|
+
var ao = Bv(function(e) {
|
13166
12990
|
return function(n) {
|
13167
12991
|
e(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
13168
12992
|
` + n.map(function(r, o) {
|
@@ -13273,9 +13097,9 @@ function bl(e) {
|
|
13273
13097
|
function Ma(e) {
|
13274
13098
|
ie(e) ? e() : e.unsubscribe();
|
13275
13099
|
}
|
13276
|
-
var
|
13100
|
+
var $v = {
|
13277
13101
|
Promise: void 0
|
13278
|
-
},
|
13102
|
+
}, Hv = {
|
13279
13103
|
setTimeout: function(e, t) {
|
13280
13104
|
for (var n = [], r = 2; r < arguments.length; r++)
|
13281
13105
|
n[r - 2] = arguments[r];
|
@@ -13287,20 +13111,20 @@ var qv = {
|
|
13287
13111
|
delegate: void 0
|
13288
13112
|
};
|
13289
13113
|
function _l(e) {
|
13290
|
-
|
13114
|
+
Hv.setTimeout(function() {
|
13291
13115
|
throw e;
|
13292
13116
|
});
|
13293
13117
|
}
|
13294
13118
|
function Da() {
|
13295
13119
|
}
|
13296
|
-
function
|
13120
|
+
function Wv(e) {
|
13297
13121
|
e();
|
13298
13122
|
}
|
13299
13123
|
var Hs = function(e) {
|
13300
13124
|
Us(t, e);
|
13301
13125
|
function t(n) {
|
13302
13126
|
var r = e.call(this) || this;
|
13303
|
-
return r.isStopped = !1, n ? (r.destination = n, bl(n) && n.add(r)) : r.destination =
|
13127
|
+
return r.isStopped = !1, n ? (r.destination = n, bl(n) && n.add(r)) : r.destination = qv, r;
|
13304
13128
|
}
|
13305
13129
|
return t.create = function(n, r, o) {
|
13306
13130
|
return new qo(n, r, o);
|
@@ -13327,7 +13151,7 @@ var Hs = function(e) {
|
|
13327
13151
|
this.unsubscribe();
|
13328
13152
|
}
|
13329
13153
|
}, t;
|
13330
|
-
}($s),
|
13154
|
+
}($s), zv = function() {
|
13331
13155
|
function e(t) {
|
13332
13156
|
this.partialObserver = t;
|
13333
13157
|
}
|
@@ -13337,7 +13161,7 @@ var Hs = function(e) {
|
|
13337
13161
|
try {
|
13338
13162
|
n.next(t);
|
13339
13163
|
} catch (r) {
|
13340
|
-
|
13164
|
+
$n(r);
|
13341
13165
|
}
|
13342
13166
|
}, e.prototype.error = function(t) {
|
13343
13167
|
var n = this.partialObserver;
|
@@ -13345,17 +13169,17 @@ var Hs = function(e) {
|
|
13345
13169
|
try {
|
13346
13170
|
n.error(t);
|
13347
13171
|
} catch (r) {
|
13348
|
-
|
13172
|
+
$n(r);
|
13349
13173
|
}
|
13350
13174
|
else
|
13351
|
-
|
13175
|
+
$n(t);
|
13352
13176
|
}, e.prototype.complete = function() {
|
13353
13177
|
var t = this.partialObserver;
|
13354
13178
|
if (t.complete)
|
13355
13179
|
try {
|
13356
13180
|
t.complete();
|
13357
13181
|
} catch (n) {
|
13358
|
-
|
13182
|
+
$n(n);
|
13359
13183
|
}
|
13360
13184
|
}, e;
|
13361
13185
|
}(), qo = function(e) {
|
@@ -13366,29 +13190,29 @@ var Hs = function(e) {
|
|
13366
13190
|
next: n ?? void 0,
|
13367
13191
|
error: r ?? void 0,
|
13368
13192
|
complete: o ?? void 0
|
13369
|
-
} : i = n, s.destination = new
|
13193
|
+
} : i = n, s.destination = new zv(i), s;
|
13370
13194
|
}
|
13371
13195
|
return t;
|
13372
13196
|
}(Hs);
|
13373
|
-
function
|
13197
|
+
function $n(e) {
|
13374
13198
|
_l(e);
|
13375
13199
|
}
|
13376
|
-
function
|
13200
|
+
function jv(e) {
|
13377
13201
|
throw e;
|
13378
13202
|
}
|
13379
|
-
var
|
13203
|
+
var qv = {
|
13380
13204
|
closed: !0,
|
13381
13205
|
next: Da,
|
13382
|
-
error:
|
13206
|
+
error: jv,
|
13383
13207
|
complete: Da
|
13384
13208
|
}, Ws = function() {
|
13385
13209
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
13386
13210
|
}();
|
13387
|
-
function
|
13211
|
+
function Gv(e) {
|
13388
13212
|
return e;
|
13389
13213
|
}
|
13390
|
-
function
|
13391
|
-
return e.length === 0 ?
|
13214
|
+
function Vv(e) {
|
13215
|
+
return e.length === 0 ? Gv : e.length === 1 ? e[0] : function(n) {
|
13392
13216
|
return e.reduce(function(r, o) {
|
13393
13217
|
return o(r);
|
13394
13218
|
}, n);
|
@@ -13402,8 +13226,8 @@ var ve = function() {
|
|
13402
13226
|
var n = new e();
|
13403
13227
|
return n.source = this, n.operator = t, n;
|
13404
13228
|
}, e.prototype.subscribe = function(t, n, r) {
|
13405
|
-
var o = this, s =
|
13406
|
-
return
|
13229
|
+
var o = this, s = Yv(t) ? t : new qo(t, n, r);
|
13230
|
+
return Wv(function() {
|
13407
13231
|
var i = o, c = i.operator, a = i.source;
|
13408
13232
|
s.add(c ? c.call(s, a) : a ? o._subscribe(s) : o._trySubscribe(s));
|
13409
13233
|
}), s;
|
@@ -13437,7 +13261,7 @@ var ve = function() {
|
|
13437
13261
|
}, e.prototype.pipe = function() {
|
13438
13262
|
for (var t = [], n = 0; n < arguments.length; n++)
|
13439
13263
|
t[n] = arguments[n];
|
13440
|
-
return
|
13264
|
+
return Vv(t)(this);
|
13441
13265
|
}, e.prototype.toPromise = function(t) {
|
13442
13266
|
var n = this;
|
13443
13267
|
return t = La(t), new t(function(r, o) {
|
@@ -13456,20 +13280,20 @@ var ve = function() {
|
|
13456
13280
|
}();
|
13457
13281
|
function La(e) {
|
13458
13282
|
var t;
|
13459
|
-
return (t = e ??
|
13283
|
+
return (t = e ?? $v.Promise) !== null && t !== void 0 ? t : Promise;
|
13460
13284
|
}
|
13461
|
-
function
|
13285
|
+
function Kv(e) {
|
13462
13286
|
return e && ie(e.next) && ie(e.error) && ie(e.complete);
|
13463
13287
|
}
|
13464
|
-
function
|
13465
|
-
return e && e instanceof Hs ||
|
13288
|
+
function Yv(e) {
|
13289
|
+
return e && e instanceof Hs || Kv(e) && bl(e);
|
13466
13290
|
}
|
13467
|
-
function
|
13291
|
+
function Jv(e) {
|
13468
13292
|
return ie(e?.lift);
|
13469
13293
|
}
|
13470
13294
|
function Br(e) {
|
13471
13295
|
return function(t) {
|
13472
|
-
if (
|
13296
|
+
if (Jv(t))
|
13473
13297
|
return t.lift(function(n) {
|
13474
13298
|
try {
|
13475
13299
|
return e(n, this);
|
@@ -13481,9 +13305,9 @@ function Br(e) {
|
|
13481
13305
|
};
|
13482
13306
|
}
|
13483
13307
|
function zs(e, t, n, r, o) {
|
13484
|
-
return new
|
13308
|
+
return new Xv(e, t, n, r, o);
|
13485
13309
|
}
|
13486
|
-
var
|
13310
|
+
var Xv = function(e) {
|
13487
13311
|
Us(t, e);
|
13488
13312
|
function t(n, r, o, s, i, c) {
|
13489
13313
|
var a = e.call(this, n) || this;
|
@@ -13533,15 +13357,15 @@ function El(e) {
|
|
13533
13357
|
function xl(e) {
|
13534
13358
|
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
13535
13359
|
}
|
13536
|
-
function
|
13360
|
+
function Qv() {
|
13537
13361
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
13538
13362
|
}
|
13539
|
-
var Il =
|
13363
|
+
var Il = Qv();
|
13540
13364
|
function kl(e) {
|
13541
13365
|
return ie(e?.[Il]);
|
13542
13366
|
}
|
13543
13367
|
function Cl(e) {
|
13544
|
-
return
|
13368
|
+
return Zw(this, arguments, function() {
|
13545
13369
|
var n, r, o, s;
|
13546
13370
|
return Fs(this, function(i) {
|
13547
13371
|
switch (i.label) {
|
@@ -13579,21 +13403,21 @@ function js(e) {
|
|
13579
13403
|
return e;
|
13580
13404
|
if (e != null) {
|
13581
13405
|
if (Sl(e))
|
13582
|
-
return
|
13406
|
+
return Zv(e);
|
13583
13407
|
if (wl(e))
|
13584
|
-
return
|
13408
|
+
return eS(e);
|
13585
13409
|
if (vl(e))
|
13586
|
-
return
|
13410
|
+
return tS(e);
|
13587
13411
|
if (El(e))
|
13588
13412
|
return Rl(e);
|
13589
13413
|
if (kl(e))
|
13590
|
-
return
|
13414
|
+
return nS(e);
|
13591
13415
|
if (Tl(e))
|
13592
|
-
return
|
13416
|
+
return rS(e);
|
13593
13417
|
}
|
13594
13418
|
throw xl(e);
|
13595
13419
|
}
|
13596
|
-
function
|
13420
|
+
function Zv(e) {
|
13597
13421
|
return new ve(function(t) {
|
13598
13422
|
var n = e[Ws]();
|
13599
13423
|
if (ie(n.subscribe))
|
@@ -13601,14 +13425,14 @@ function oS(e) {
|
|
13601
13425
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
13602
13426
|
});
|
13603
13427
|
}
|
13604
|
-
function
|
13428
|
+
function eS(e) {
|
13605
13429
|
return new ve(function(t) {
|
13606
13430
|
for (var n = 0; n < e.length && !t.closed; n++)
|
13607
13431
|
t.next(e[n]);
|
13608
13432
|
t.complete();
|
13609
13433
|
});
|
13610
13434
|
}
|
13611
|
-
function
|
13435
|
+
function tS(e) {
|
13612
13436
|
return new ve(function(t) {
|
13613
13437
|
e.then(function(n) {
|
13614
13438
|
t.closed || (t.next(n), t.complete());
|
@@ -13617,7 +13441,7 @@ function iS(e) {
|
|
13617
13441
|
}).then(null, _l);
|
13618
13442
|
});
|
13619
13443
|
}
|
13620
|
-
function
|
13444
|
+
function nS(e) {
|
13621
13445
|
return new ve(function(t) {
|
13622
13446
|
var n, r;
|
13623
13447
|
try {
|
@@ -13640,22 +13464,22 @@ function aS(e) {
|
|
13640
13464
|
}
|
13641
13465
|
function Rl(e) {
|
13642
13466
|
return new ve(function(t) {
|
13643
|
-
|
13467
|
+
oS(e, t).catch(function(n) {
|
13644
13468
|
return t.error(n);
|
13645
13469
|
});
|
13646
13470
|
});
|
13647
13471
|
}
|
13648
|
-
function
|
13472
|
+
function rS(e) {
|
13649
13473
|
return Rl(Cl(e));
|
13650
13474
|
}
|
13651
|
-
function
|
13475
|
+
function oS(e, t) {
|
13652
13476
|
var n, r, o, s;
|
13653
13477
|
return hl(this, void 0, void 0, function() {
|
13654
13478
|
var i, c;
|
13655
13479
|
return Fs(this, function(a) {
|
13656
13480
|
switch (a.label) {
|
13657
13481
|
case 0:
|
13658
|
-
a.trys.push([0, 5, 6, 11]), n =
|
13482
|
+
a.trys.push([0, 5, 6, 11]), n = ev(e), a.label = 1;
|
13659
13483
|
case 1:
|
13660
13484
|
return [4, n.next()];
|
13661
13485
|
case 2:
|
@@ -13718,13 +13542,13 @@ function Ol(e, t) {
|
|
13718
13542
|
}, t));
|
13719
13543
|
});
|
13720
13544
|
}
|
13721
|
-
function
|
13545
|
+
function sS(e, t) {
|
13722
13546
|
return js(e).pipe(Ol(t), Nl(t));
|
13723
13547
|
}
|
13724
|
-
function
|
13548
|
+
function iS(e, t) {
|
13725
13549
|
return js(e).pipe(Ol(t), Nl(t));
|
13726
13550
|
}
|
13727
|
-
function
|
13551
|
+
function aS(e, t) {
|
13728
13552
|
return new ve(function(n) {
|
13729
13553
|
var r = 0;
|
13730
13554
|
return t.schedule(function() {
|
@@ -13732,7 +13556,7 @@ function fS(e, t) {
|
|
13732
13556
|
});
|
13733
13557
|
});
|
13734
13558
|
}
|
13735
|
-
function
|
13559
|
+
function cS(e, t) {
|
13736
13560
|
return new ve(function(n) {
|
13737
13561
|
var r;
|
13738
13562
|
return it(n, t, function() {
|
@@ -13765,30 +13589,30 @@ function Al(e, t) {
|
|
13765
13589
|
});
|
13766
13590
|
});
|
13767
13591
|
}
|
13768
|
-
function
|
13592
|
+
function uS(e, t) {
|
13769
13593
|
return Al(Cl(e), t);
|
13770
13594
|
}
|
13771
|
-
function
|
13595
|
+
function lS(e, t) {
|
13772
13596
|
if (e != null) {
|
13773
13597
|
if (Sl(e))
|
13774
|
-
return
|
13598
|
+
return sS(e, t);
|
13775
13599
|
if (wl(e))
|
13776
|
-
return
|
13600
|
+
return aS(e, t);
|
13777
13601
|
if (vl(e))
|
13778
|
-
return
|
13602
|
+
return iS(e, t);
|
13779
13603
|
if (El(e))
|
13780
13604
|
return Al(e, t);
|
13781
13605
|
if (kl(e))
|
13782
|
-
return
|
13606
|
+
return cS(e, t);
|
13783
13607
|
if (Tl(e))
|
13784
|
-
return
|
13608
|
+
return uS(e, t);
|
13785
13609
|
}
|
13786
13610
|
throw xl(e);
|
13787
13611
|
}
|
13788
|
-
function
|
13789
|
-
return t ?
|
13612
|
+
function dS(e, t) {
|
13613
|
+
return t ? lS(e, t) : js(e);
|
13790
13614
|
}
|
13791
|
-
function
|
13615
|
+
function fS(e, t) {
|
13792
13616
|
return Br(function(n, r) {
|
13793
13617
|
var o = 0;
|
13794
13618
|
n.subscribe(zs(r, function(s) {
|
@@ -13796,7 +13620,7 @@ function yS(e, t) {
|
|
13796
13620
|
}));
|
13797
13621
|
});
|
13798
13622
|
}
|
13799
|
-
function
|
13623
|
+
function hS(e, t) {
|
13800
13624
|
return Br(function(n, r) {
|
13801
13625
|
var o = 0;
|
13802
13626
|
n.subscribe(zs(r, function(s) {
|
@@ -13804,7 +13628,7 @@ function bS(e, t) {
|
|
13804
13628
|
}));
|
13805
13629
|
});
|
13806
13630
|
}
|
13807
|
-
const
|
13631
|
+
const pS = () => {
|
13808
13632
|
if (typeof self > "u")
|
13809
13633
|
return !1;
|
13810
13634
|
const e = self;
|
@@ -13812,7 +13636,7 @@ const _S = () => {
|
|
13812
13636
|
};
|
13813
13637
|
class kt {
|
13814
13638
|
networkMonitor(t) {
|
13815
|
-
const n =
|
13639
|
+
const n = pS() ? self : typeof window < "u" && window;
|
13816
13640
|
return n ? new ve((r) => {
|
13817
13641
|
r.next({ online: n.navigator.onLine });
|
13818
13642
|
const o = () => {
|
@@ -13823,7 +13647,7 @@ class kt {
|
|
13823
13647
|
return n.addEventListener("online", o), n.addEventListener("offline", s), kt._observers.push(r), () => {
|
13824
13648
|
n.removeEventListener("online", o), n.removeEventListener("offline", s), kt._observers = kt._observers.filter((i) => i !== r);
|
13825
13649
|
};
|
13826
|
-
}) :
|
13650
|
+
}) : dS([{ online: !0 }]);
|
13827
13651
|
}
|
13828
13652
|
// expose observers to simulate offline mode for integration testing
|
13829
13653
|
static _observerOverride(t) {
|
@@ -13838,7 +13662,7 @@ class kt {
|
|
13838
13662
|
}
|
13839
13663
|
kt._observers = [];
|
13840
13664
|
const Pa = new Ie("Auth");
|
13841
|
-
class
|
13665
|
+
class mS {
|
13842
13666
|
/**
|
13843
13667
|
* Configure Auth category
|
13844
13668
|
*
|
@@ -13888,9 +13712,9 @@ class wS {
|
|
13888
13712
|
}
|
13889
13713
|
}
|
13890
13714
|
const Ua = (e) => `You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;
|
13891
|
-
class
|
13715
|
+
class gS {
|
13892
13716
|
constructor() {
|
13893
|
-
this.oAuthListener = void 0, this.resourcesConfig = {}, this.libraryOptions = {}, this.Auth = new
|
13717
|
+
this.oAuthListener = void 0, this.resourcesConfig = {}, this.libraryOptions = {}, this.Auth = new mS();
|
13894
13718
|
}
|
13895
13719
|
/**
|
13896
13720
|
* Configures Amplify for use with your back-end resources.
|
@@ -13906,7 +13730,7 @@ class vS {
|
|
13906
13730
|
* @param libraryOptions - Additional options for customizing the behavior of the library.
|
13907
13731
|
*/
|
13908
13732
|
configure(t, n) {
|
13909
|
-
const r =
|
13733
|
+
const r = Qw(t);
|
13910
13734
|
this.resourcesConfig = r, n && (this.libraryOptions = n), this.resourcesConfig = dl(this.resourcesConfig), this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth), ul.dispatch("core", {
|
13911
13735
|
event: "configure",
|
13912
13736
|
data: this.resourcesConfig
|
@@ -13921,28 +13745,28 @@ class vS {
|
|
13921
13745
|
return this.resourcesConfig;
|
13922
13746
|
}
|
13923
13747
|
/** @internal */
|
13924
|
-
[
|
13748
|
+
[Mw](t) {
|
13925
13749
|
this.resourcesConfig.Auth?.Cognito.loginWith?.oauth ? t(this.resourcesConfig.Auth?.Cognito) : this.oAuthListener = t;
|
13926
13750
|
}
|
13927
13751
|
notifyOAuthListener() {
|
13928
13752
|
!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth || !this.oAuthListener || (this.oAuthListener(this.resourcesConfig.Auth?.Cognito), this.oAuthListener = void 0);
|
13929
13753
|
}
|
13930
13754
|
}
|
13931
|
-
const qs = new
|
13932
|
-
function
|
13755
|
+
const qs = new gS(), yS = (e, t) => e.Auth.fetchAuthSession(t), Ml = (e) => yS(qs, e), Dl = 5 * 60 * 1e3;
|
13756
|
+
function bS(e = Dl) {
|
13933
13757
|
return (r) => {
|
13934
13758
|
const o = 2 ** r * 100 + 100 * Math.random();
|
13935
13759
|
return o > e ? !1 : o;
|
13936
13760
|
};
|
13937
13761
|
}
|
13938
|
-
const Go =
|
13762
|
+
const Go = Fw, Gs = URL, Ll = URLSearchParams, Pl = (e) => Object.keys(e).map((t) => t.toLowerCase()).sort().join(";"), _S = "X-Amz-Date", wS = "X-Amz-Security-Token", vS = "authorization", SS = "host", ES = _S.toLowerCase(), xS = wS.toLowerCase(), Ul = "aws4_request", Fl = "AWS4-HMAC-SHA256", IS = "AWS4", kS = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", CS = "UNSIGNED-PAYLOAD", TS = (e, t, n) => `${e}/${t}/${n}/${Ul}`, RS = (e) => {
|
13939
13763
|
const t = e.toISOString().replace(/[:-]|\.\d{3}/g, "");
|
13940
13764
|
return {
|
13941
13765
|
longDate: t,
|
13942
13766
|
shortDate: t.slice(0, 8)
|
13943
13767
|
};
|
13944
|
-
},
|
13945
|
-
const { accessKeyId: s, secretAccessKey: i, sessionToken: c } = e, { longDate: a, shortDate: u } =
|
13768
|
+
}, NS = ({ credentials: e, signingDate: t = /* @__PURE__ */ new Date(), signingRegion: n, signingService: r, uriEscapePath: o = !0 }) => {
|
13769
|
+
const { accessKeyId: s, secretAccessKey: i, sessionToken: c } = e, { longDate: a, shortDate: u } = RS(t), l = TS(u, n, r);
|
13946
13770
|
return {
|
13947
13771
|
accessKeyId: s,
|
13948
13772
|
credentialScope: l,
|
@@ -13955,35 +13779,35 @@ const Go = zw, Gs = URL, Ll = URLSearchParams, Pl = (e) => Object.keys(e).map((t
|
|
13955
13779
|
uriEscapePath: o
|
13956
13780
|
};
|
13957
13781
|
}, Kt = (e, t) => {
|
13958
|
-
const n = new
|
13782
|
+
const n = new cv(e ?? void 0);
|
13959
13783
|
return n.update(t), n.digestSync();
|
13960
13784
|
}, Vo = (e, t) => {
|
13961
13785
|
const n = Kt(e, t);
|
13962
|
-
return
|
13963
|
-
},
|
13786
|
+
return lv(n);
|
13787
|
+
}, OS = (e) => Object.entries(e).map(([t, n]) => ({
|
13964
13788
|
key: t.toLowerCase(),
|
13965
13789
|
value: n?.trim().replace(/\s+/g, " ") ?? ""
|
13966
13790
|
})).sort((t, n) => t.key < n.key ? -1 : 1).map((t) => `${t.key}:${t.value}
|
13967
|
-
`).join(""),
|
13791
|
+
`).join(""), AS = (e) => Array.from(e).sort(([t, n], [r, o]) => t === r ? n < o ? -1 : 1 : t < r ? -1 : 1).map(([t, n]) => `${Fa(t)}=${Fa(n)}`).join("&"), Fa = (e) => encodeURIComponent(e).replace(/[!'()*]/g, MS), MS = (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`, DS = (e, t = !0) => e ? t ? encodeURIComponent(e).replace(/%2F/g, "/") : e : "/", LS = (e) => e == null ? kS : PS(e) ? Vo(null, e) : CS, PS = (e) => typeof e == "string" || ArrayBuffer.isView(e) || US(e), US = (e) => typeof ArrayBuffer == "function" && e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", FS = ({ body: e, headers: t, method: n, url: r }, o = !0) => [
|
13968
13792
|
n,
|
13969
|
-
|
13970
|
-
|
13971
|
-
|
13793
|
+
DS(r.pathname, o),
|
13794
|
+
AS(r.searchParams),
|
13795
|
+
OS(t),
|
13972
13796
|
Pl(t),
|
13973
|
-
|
13797
|
+
LS(e)
|
13974
13798
|
].join(`
|
13975
|
-
`),
|
13976
|
-
const o = `${
|
13799
|
+
`), BS = (e, t, n, r) => {
|
13800
|
+
const o = `${IS}${e}`, s = Kt(o, t), i = Kt(s, n), c = Kt(i, r);
|
13977
13801
|
return Kt(c, Ul);
|
13978
|
-
},
|
13979
|
-
`),
|
13980
|
-
const a =
|
13981
|
-
return Vo(
|
13982
|
-
},
|
13983
|
-
const n =
|
13984
|
-
c[
|
13985
|
-
const a = { ...e, headers: c }, u =
|
13986
|
-
return c[
|
13802
|
+
}, $S = (e, t, n) => [Fl, e, t, n].join(`
|
13803
|
+
`), HS = (e, { credentialScope: t, longDate: n, secretAccessKey: r, shortDate: o, signingRegion: s, signingService: i, uriEscapePath: c }) => {
|
13804
|
+
const a = FS(e, c), u = Vo(null, a), l = $S(n, t, u);
|
13805
|
+
return Vo(BS(r, o, s, i), l);
|
13806
|
+
}, WS = (e, t) => {
|
13807
|
+
const n = NS(t), { accessKeyId: r, credentialScope: o, longDate: s, sessionToken: i } = n, c = { ...e.headers };
|
13808
|
+
c[SS] = e.url.host, c[ES] = s, i && (c[xS] = i);
|
13809
|
+
const a = { ...e, headers: c }, u = HS(a, n), l = `Credential=${r}/${o}`, d = `SignedHeaders=${Pl(c)}`, f = `Signature=${u}`;
|
13810
|
+
return c[vS] = `${Fl} ${l}, ${d}, ${f}`, a;
|
13987
13811
|
};
|
13988
13812
|
function Yn(e) {
|
13989
13813
|
"@babel/helpers - typeof";
|
@@ -13993,10 +13817,10 @@ function Yn(e) {
|
|
13993
13817
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
13994
13818
|
}, Yn(e);
|
13995
13819
|
}
|
13996
|
-
function
|
13820
|
+
function zS(e) {
|
13997
13821
|
return Yn(e) == "object" && e !== null;
|
13998
13822
|
}
|
13999
|
-
var
|
13823
|
+
var jS = typeof Symbol == "function" && Symbol.toStringTag != null ? Symbol.toStringTag : "@@toStringTag";
|
14000
13824
|
function Ko(e, t) {
|
14001
13825
|
for (var n = /\r\n|[\n\r]/g, r = 1, o = t + 1, s; (s = n.exec(e.body)) && s.index < t; )
|
14002
13826
|
r += 1, o = t + 1 - (s.index + s[0].length);
|
@@ -14005,7 +13829,7 @@ function Ko(e, t) {
|
|
14005
13829
|
column: o
|
14006
13830
|
};
|
14007
13831
|
}
|
14008
|
-
function
|
13832
|
+
function qS(e) {
|
14009
13833
|
return Bl(e.source, Ko(e.source, e.start));
|
14010
13834
|
}
|
14011
13835
|
function Bl(e, t) {
|
@@ -14037,14 +13861,14 @@ function Ba(e) {
|
|
14037
13861
|
}));
|
14038
13862
|
return t.map(function(r) {
|
14039
13863
|
var o = r[0], s = r[1];
|
14040
|
-
return
|
13864
|
+
return GS(n, o) + (s ? " | " + s : " |");
|
14041
13865
|
}).join(`
|
14042
13866
|
`);
|
14043
13867
|
}
|
14044
13868
|
function Jn(e) {
|
14045
13869
|
return Array(e + 1).join(" ");
|
14046
13870
|
}
|
14047
|
-
function
|
13871
|
+
function GS(e, t) {
|
14048
13872
|
return Jn(e - t.length) + t;
|
14049
13873
|
}
|
14050
13874
|
function Xn(e) {
|
@@ -14065,39 +13889,39 @@ function $a(e, t) {
|
|
14065
13889
|
}
|
14066
13890
|
return n;
|
14067
13891
|
}
|
14068
|
-
function
|
13892
|
+
function VS(e) {
|
14069
13893
|
for (var t = 1; t < arguments.length; t++) {
|
14070
13894
|
var n = arguments[t] != null ? arguments[t] : {};
|
14071
13895
|
t % 2 ? $a(Object(n), !0).forEach(function(r) {
|
14072
|
-
|
13896
|
+
KS(e, r, n[r]);
|
14073
13897
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $a(Object(n)).forEach(function(r) {
|
14074
13898
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
14075
13899
|
});
|
14076
13900
|
}
|
14077
13901
|
return e;
|
14078
13902
|
}
|
14079
|
-
function
|
13903
|
+
function KS(e, t, n) {
|
14080
13904
|
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
14081
13905
|
}
|
14082
|
-
function
|
13906
|
+
function YS(e, t) {
|
14083
13907
|
if (!(e instanceof t))
|
14084
13908
|
throw new TypeError("Cannot call a class as a function");
|
14085
13909
|
}
|
14086
|
-
function
|
13910
|
+
function JS(e, t) {
|
14087
13911
|
for (var n = 0; n < t.length; n++) {
|
14088
13912
|
var r = t[n];
|
14089
13913
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
14090
13914
|
}
|
14091
13915
|
}
|
14092
|
-
function
|
14093
|
-
return t &&
|
13916
|
+
function XS(e, t, n) {
|
13917
|
+
return t && JS(e.prototype, t), e;
|
14094
13918
|
}
|
14095
|
-
function
|
13919
|
+
function QS(e, t) {
|
14096
13920
|
if (typeof t != "function" && t !== null)
|
14097
13921
|
throw new TypeError("Super expression must either be null or a function");
|
14098
13922
|
e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && fn(e, t);
|
14099
13923
|
}
|
14100
|
-
function
|
13924
|
+
function ZS(e) {
|
14101
13925
|
var t = Hl();
|
14102
13926
|
return function() {
|
14103
13927
|
var r = hn(e), o;
|
@@ -14120,7 +13944,7 @@ function Yt(e) {
|
|
14120
13944
|
function Yo(e) {
|
14121
13945
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
14122
13946
|
return Yo = function(r) {
|
14123
|
-
if (r === null || !
|
13947
|
+
if (r === null || !e0(r)) return r;
|
14124
13948
|
if (typeof r != "function")
|
14125
13949
|
throw new TypeError("Super expression must either be null or a function");
|
14126
13950
|
if (typeof t < "u") {
|
@@ -14151,7 +13975,7 @@ function Hl() {
|
|
14151
13975
|
return !1;
|
14152
13976
|
}
|
14153
13977
|
}
|
14154
|
-
function
|
13978
|
+
function e0(e) {
|
14155
13979
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
14156
13980
|
}
|
14157
13981
|
function fn(e, t) {
|
@@ -14165,11 +13989,11 @@ function hn(e) {
|
|
14165
13989
|
}, hn(e);
|
14166
13990
|
}
|
14167
13991
|
var co = /* @__PURE__ */ function(e) {
|
14168
|
-
|
14169
|
-
var t =
|
13992
|
+
QS(n, e);
|
13993
|
+
var t = ZS(n);
|
14170
13994
|
function n(r, o, s, i, c, a, u) {
|
14171
13995
|
var l, d, f, h;
|
14172
|
-
|
13996
|
+
YS(this, n), h = t.call(this, r), h.name = "GraphQLError", h.originalError = a ?? void 0, h.nodes = Ha(Array.isArray(o) ? o : o ? [o] : void 0);
|
14173
13997
|
for (var p = [], g = 0, y = (b = h.nodes) !== null && b !== void 0 ? b : []; g < y.length; g++) {
|
14174
13998
|
var b, v = y[g], x = v.loc;
|
14175
13999
|
x != null && p.push(x);
|
@@ -14182,7 +14006,7 @@ var co = /* @__PURE__ */ function(e) {
|
|
14182
14006
|
return Ko(_.source, _.start);
|
14183
14007
|
}), h.path = c ?? void 0;
|
14184
14008
|
var E = a?.extensions;
|
14185
|
-
return u == null &&
|
14009
|
+
return u == null && zS(E) ? h.extensions = VS({}, E) : h.extensions = u ?? {}, Object.defineProperties(Yt(h), {
|
14186
14010
|
message: {
|
14187
14011
|
enumerable: !0
|
14188
14012
|
},
|
@@ -14220,15 +14044,15 @@ var co = /* @__PURE__ */ function(e) {
|
|
14220
14044
|
configurable: !0
|
14221
14045
|
}), h);
|
14222
14046
|
}
|
14223
|
-
return
|
14047
|
+
return XS(n, [{
|
14224
14048
|
key: "toString",
|
14225
14049
|
value: function() {
|
14226
|
-
return
|
14050
|
+
return t0(this);
|
14227
14051
|
}
|
14228
14052
|
// FIXME: workaround to not break chai comparisons, should be remove in v16
|
14229
14053
|
// $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
14230
14054
|
}, {
|
14231
|
-
key:
|
14055
|
+
key: jS,
|
14232
14056
|
get: function() {
|
14233
14057
|
return "Object";
|
14234
14058
|
}
|
@@ -14237,14 +14061,14 @@ var co = /* @__PURE__ */ function(e) {
|
|
14237
14061
|
function Ha(e) {
|
14238
14062
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
14239
14063
|
}
|
14240
|
-
function
|
14064
|
+
function t0(e) {
|
14241
14065
|
var t = e.message;
|
14242
14066
|
if (e.nodes)
|
14243
14067
|
for (var n = 0, r = e.nodes; n < r.length; n++) {
|
14244
14068
|
var o = r[n];
|
14245
14069
|
o.loc && (t += `
|
14246
14070
|
|
14247
|
-
` +
|
14071
|
+
` + qS(o.loc));
|
14248
14072
|
}
|
14249
14073
|
else if (e.source && e.locations)
|
14250
14074
|
for (var s = 0, i = e.locations; s < i.length; s++) {
|
@@ -14255,16 +14079,16 @@ function i0(e) {
|
|
14255
14079
|
}
|
14256
14080
|
return t;
|
14257
14081
|
}
|
14258
|
-
class
|
14082
|
+
class n0 extends Error {
|
14259
14083
|
constructor() {
|
14260
14084
|
super(...arguments), this.nonRetryable = !0;
|
14261
14085
|
}
|
14262
14086
|
}
|
14263
|
-
const
|
14264
|
-
function
|
14087
|
+
const r0 = (e, t, n = Dl, r) => Cw(e, t, bS(n));
|
14088
|
+
function o0(e) {
|
14265
14089
|
return Array.from(e, (t) => String.fromCodePoint(t)).join("");
|
14266
14090
|
}
|
14267
|
-
const
|
14091
|
+
const s0 = {
|
14268
14092
|
/**
|
14269
14093
|
* Convert input to base64-encoded string
|
14270
14094
|
* @param input - string to convert to base64
|
@@ -14275,14 +14099,14 @@ const l0 = {
|
|
14275
14099
|
urlSafe: !1,
|
14276
14100
|
skipPadding: !1
|
14277
14101
|
}) {
|
14278
|
-
const n = typeof e == "string" ? e :
|
14279
|
-
let r =
|
14102
|
+
const n = typeof e == "string" ? e : o0(e);
|
14103
|
+
let r = kw()(n);
|
14280
14104
|
return t.urlSafe && (r = r.replace(/\+/g, "-").replace(/\//g, "_")), t.skipPadding && (r = r.replace(/=/g, "")), r;
|
14281
14105
|
}
|
14282
|
-
},
|
14106
|
+
}, i0 = 5e3, a0 = [400, 401, 403], c0 = [
|
14283
14107
|
"BadRequestException",
|
14284
14108
|
"UnauthorizedException"
|
14285
|
-
],
|
14109
|
+
], u0 = "ConnectionStateChange";
|
14286
14110
|
var _e;
|
14287
14111
|
(function(e) {
|
14288
14112
|
e.GQL_CONNECTION_INIT = "connection_init", e.GQL_CONNECTION_ERROR = "connection_error", e.GQL_CONNECTION_ACK = "connection_ack", e.GQL_START = "start", e.GQL_START_ACK = "start_ack", e.DATA = "data", e.GQL_CONNECTION_KEEP_ALIVE = "ka", e.GQL_STOP = "stop", e.GQL_COMPLETE = "complete", e.GQL_ERROR = "error", e.EVENT_SUBSCRIBE = "subscribe", e.EVENT_PUBLISH = "publish", e.EVENT_SUBSCRIBE_ACK = "subscribe_success", e.EVENT_PUBLISH_ACK = "publish_success", e.EVENT_STOP = "unsubscribe", e.EVENT_COMPLETE = "unsubscribe_success";
|
@@ -14295,11 +14119,11 @@ var he;
|
|
14295
14119
|
(function(e) {
|
14296
14120
|
e[e.CLOSED = 0] = "CLOSED", e[e.READY = 1] = "READY", e[e.CONNECTING = 2] = "CONNECTING";
|
14297
14121
|
})(he || (he = {}));
|
14298
|
-
const
|
14122
|
+
const l0 = {
|
14299
14123
|
accept: "application/json, text/javascript",
|
14300
14124
|
"content-encoding": "amz-1.0",
|
14301
14125
|
"content-type": "application/json; charset=UTF-8"
|
14302
|
-
}, Wa = 15e3,
|
14126
|
+
}, Wa = 15e3, d0 = 15e3, f0 = 5 * 60 * 1e3, h0 = 5 * 1e3, p0 = 65 * 1e3, m0 = 5 * 1e3, g0 = 60 * 1e3;
|
14303
14127
|
var Re;
|
14304
14128
|
(function(e) {
|
14305
14129
|
e.CONNECTION_CLOSED = "Connection closed", e.CONNECTION_FAILED = "Connection failed", e.REALTIME_SUBSCRIPTION_INIT_ERROR = "AppSync Realtime subscription init error", e.SUBSCRIPTION_ACK = "Subscription ack", e.TIMEOUT_DISCONNECT = "Timeout disconnect";
|
@@ -14325,7 +14149,7 @@ const za = () => new kt().networkMonitor(), xe = {
|
|
14325
14149
|
ONLINE: { networkState: "connected" },
|
14326
14150
|
OFFLINE: { networkState: "disconnected" }
|
14327
14151
|
};
|
14328
|
-
class
|
14152
|
+
class y0 {
|
14329
14153
|
constructor() {
|
14330
14154
|
this._networkMonitoringSubscription = void 0, this._linkedConnectionState = {
|
14331
14155
|
networkState: "connected",
|
@@ -14359,7 +14183,7 @@ class S0 {
|
|
14359
14183
|
*/
|
14360
14184
|
get connectionStateObservable() {
|
14361
14185
|
let t;
|
14362
|
-
return this._linkedConnectionStateObservable.pipe(
|
14186
|
+
return this._linkedConnectionStateObservable.pipe(fS((n) => this.connectionStatesTranslator(n))).pipe(hS((n) => {
|
14363
14187
|
const r = n !== t;
|
14364
14188
|
return t = n, r;
|
14365
14189
|
}));
|
@@ -14386,7 +14210,7 @@ var Pt;
|
|
14386
14210
|
(function(e) {
|
14387
14211
|
e.START_RECONNECT = "START_RECONNECT", e.HALT_RECONNECT = "HALT_RECONNECT";
|
14388
14212
|
})(Pt || (Pt = {}));
|
14389
|
-
class
|
14213
|
+
class b0 {
|
14390
14214
|
constructor() {
|
14391
14215
|
this.reconnectObservers = [];
|
14392
14216
|
}
|
@@ -14403,8 +14227,8 @@ class E0 {
|
|
14403
14227
|
t === Pt.START_RECONNECT && this.reconnectSetTimeoutId === void 0 && this.reconnectIntervalId === void 0 && (this.reconnectSetTimeoutId = setTimeout(() => {
|
14404
14228
|
this._triggerReconnect(), this.reconnectIntervalId = setInterval(() => {
|
14405
14229
|
this._triggerReconnect();
|
14406
|
-
},
|
14407
|
-
},
|
14230
|
+
}, g0);
|
14231
|
+
}, m0)), t === Pt.HALT_RECONNECT && (this.reconnectIntervalId && (clearInterval(this.reconnectIntervalId), this.reconnectIntervalId = void 0), this.reconnectSetTimeoutId && (clearTimeout(this.reconnectSetTimeoutId), this.reconnectSetTimeoutId = void 0));
|
14408
14232
|
}
|
14409
14233
|
/**
|
14410
14234
|
* Complete all reconnect observers
|
@@ -14420,10 +14244,10 @@ class E0 {
|
|
14420
14244
|
});
|
14421
14245
|
}
|
14422
14246
|
}
|
14423
|
-
const ja = "wss://",
|
14247
|
+
const ja = "wss://", _0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)-\d\.amazonaws.com(?:\.cn)?\/graphql$/i, w0 = /^https:\/\/\w{26}\.\w+-api\.\w{2}(?:(?:-\w{2,})+)-\d\.amazonaws.com(?:\.cn)?\/event$/i, qa = "/realtime", v0 = (e) => e.match(_0) === null, S0 = (e) => e.match(w0) !== null, E0 = (e) => {
|
14424
14248
|
let t = e ?? "";
|
14425
|
-
return
|
14426
|
-
},
|
14249
|
+
return S0(t) ? t = t.concat(qa).replace("ddpg-api", "grt-gamma").replace("appsync-api", "appsync-realtime-api") : v0(t) ? t = t.concat(qa) : t = t.replace("appsync-api", "appsync-realtime-api").replace("gogi-beta", "grt-beta").replace("ddpg-api", "grt-gamma"), t = t.replace("https://", ja).replace("http://", ja), new Gs(t);
|
14250
|
+
}, x0 = (e) => {
|
14427
14251
|
if (!e)
|
14428
14252
|
return {};
|
14429
14253
|
if ("Authorization" in e) {
|
@@ -14431,13 +14255,13 @@ const ja = "wss://", x0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)
|
|
14431
14255
|
return n;
|
14432
14256
|
}
|
14433
14257
|
return e;
|
14434
|
-
},
|
14435
|
-
const t =
|
14258
|
+
}, I0 = (e) => {
|
14259
|
+
const t = x0(e), n = new Ll();
|
14436
14260
|
return Object.entries(t).forEach(([r, o]) => {
|
14437
14261
|
n.append(r, o);
|
14438
14262
|
}), n;
|
14439
|
-
},
|
14440
|
-
const n =
|
14263
|
+
}, k0 = (e, t) => {
|
14264
|
+
const n = E0(e), r = new Ll(n.search);
|
14441
14265
|
for (const [o, s] of t.entries())
|
14442
14266
|
r.append(o, s);
|
14443
14267
|
return n.search = r.toString(), n.toString();
|
@@ -14458,14 +14282,14 @@ const ja = "wss://", x0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)
|
|
14458
14282
|
}, Ga = new Ie("AWSAppSyncRealTimeProvider Auth"), Va = async ({ host: e }) => ({
|
14459
14283
|
Authorization: (await Ml())?.tokens?.accessToken?.toString(),
|
14460
14284
|
host: e
|
14461
|
-
}),
|
14285
|
+
}), C0 = async ({ apiKey: e, host: t }) => {
|
14462
14286
|
const r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:-]|\.\d{3}/g, "");
|
14463
14287
|
return {
|
14464
14288
|
host: t,
|
14465
14289
|
"x-amz-date": r,
|
14466
14290
|
"x-api-key": e
|
14467
14291
|
};
|
14468
|
-
},
|
14292
|
+
}, T0 = async ({ payload: e, canonicalUri: t, appSyncGraphqlEndpoint: n, region: r }) => {
|
14469
14293
|
const o = {
|
14470
14294
|
region: r,
|
14471
14295
|
service: "appsync"
|
@@ -14473,9 +14297,9 @@ const ja = "wss://", x0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)
|
|
14473
14297
|
url: `${n}${t}`,
|
14474
14298
|
data: e,
|
14475
14299
|
method: "POST",
|
14476
|
-
headers: { ...
|
14300
|
+
headers: { ...l0 }
|
14477
14301
|
};
|
14478
|
-
return
|
14302
|
+
return WS({
|
14479
14303
|
headers: i.headers,
|
14480
14304
|
method: i.method,
|
14481
14305
|
url: new Gs(i.url),
|
@@ -14494,8 +14318,8 @@ const ja = "wss://", x0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)
|
|
14494
14318
|
};
|
14495
14319
|
}, Wl = async ({ apiKey: e, authenticationType: t, canonicalUri: n, appSyncGraphqlEndpoint: r, region: o, additionalCustomHeaders: s, payload: i }) => {
|
14496
14320
|
const c = {
|
14497
|
-
apiKey:
|
14498
|
-
iam:
|
14321
|
+
apiKey: C0,
|
14322
|
+
iam: T0,
|
14499
14323
|
oidc: Va,
|
14500
14324
|
userPool: Va,
|
14501
14325
|
lambda: Ka,
|
@@ -14519,17 +14343,17 @@ const ja = "wss://", x0 = /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)
|
|
14519
14343
|
}, Ya = (e) => {
|
14520
14344
|
ul.dispatch("api", e, "PubSub", Ps);
|
14521
14345
|
};
|
14522
|
-
class
|
14346
|
+
class R0 {
|
14523
14347
|
constructor(t) {
|
14524
|
-
this.subscriptionObserverMap = /* @__PURE__ */ new Map(), this.allowNoSubscriptions = !1, this.socketStatus = he.CLOSED, this.keepAliveTimestamp = Date.now(), this.promiseArray = [], this.connectionStateMonitor = new
|
14348
|
+
this.subscriptionObserverMap = /* @__PURE__ */ new Map(), this.allowNoSubscriptions = !1, this.socketStatus = he.CLOSED, this.keepAliveTimestamp = Date.now(), this.promiseArray = [], this.connectionStateMonitor = new y0(), this.reconnectionMonitor = new b0(), this._establishConnection = async (n, r) => {
|
14525
14349
|
this.logger.debug(`Establishing WebSocket connection to ${n}`);
|
14526
14350
|
try {
|
14527
14351
|
await this._openConnection(n, r), await this._initiateHandshake();
|
14528
14352
|
} catch (o) {
|
14529
14353
|
const { errorType: s, errorCode: i } = o;
|
14530
|
-
throw
|
14354
|
+
throw a0.includes(i) || // Event API does not currently return `errorCode`. This may change in the future.
|
14531
14355
|
// For now fall back to also checking known non-retryable error types
|
14532
|
-
|
14356
|
+
c0.includes(s) ? new n0(s) : s ? new Error(s) : o;
|
14533
14357
|
}
|
14534
14358
|
}, this.logger = new Ie(t.providerName), this.wsProtocolName = t.wsProtocolName, this.wsConnectUri = t.connectUri, this.connectionStateMonitorSubscription = this._startConnectionStateMonitoring();
|
14535
14359
|
}
|
@@ -14647,7 +14471,7 @@ class D0 {
|
|
14647
14471
|
_startConnectionStateMonitoring() {
|
14648
14472
|
return this.connectionStateMonitor.connectionStateObservable.subscribe((t) => {
|
14649
14473
|
Ya({
|
14650
|
-
event:
|
14474
|
+
event: u0,
|
14651
14475
|
data: {
|
14652
14476
|
provider: this,
|
14653
14477
|
connectionState: t
|
@@ -14695,7 +14519,7 @@ class D0 {
|
|
14695
14519
|
subscriptionFailedCallback: l,
|
14696
14520
|
startAckTimeoutId: setTimeout(() => {
|
14697
14521
|
this._timeoutStartSubscriptionAck(r);
|
14698
|
-
},
|
14522
|
+
}, d0)
|
14699
14523
|
}), this.awsRealTimeSocket && this.awsRealTimeSocket.send(u);
|
14700
14524
|
}
|
14701
14525
|
// Log logic for start subscription failures
|
@@ -14766,7 +14590,7 @@ class D0 {
|
|
14766
14590
|
}
|
14767
14591
|
keepAliveHeartbeat(t) {
|
14768
14592
|
const n = Date.now();
|
14769
|
-
n - this.keepAliveTimestamp >
|
14593
|
+
n - this.keepAliveTimestamp > p0 ? this.connectionStateMonitor.record(xe.KEEP_ALIVE_MISSED) : this.connectionStateMonitor.record(xe.KEEP_ALIVE), n - this.keepAliveTimestamp > t && this._errorDisconnect(Re.TIMEOUT_DISCONNECT);
|
14770
14594
|
}
|
14771
14595
|
_handleIncomingSubscriptionMessage(t) {
|
14772
14596
|
if (typeof t.data != "string")
|
@@ -14852,10 +14676,10 @@ class D0 {
|
|
14852
14676
|
appSyncGraphqlEndpoint: t,
|
14853
14677
|
region: o,
|
14854
14678
|
additionalCustomHeaders: s
|
14855
|
-
}), l = u ? JSON.stringify(u) : "", f = `header-${
|
14679
|
+
}), l = u ? JSON.stringify(u) : "", f = `header-${s0.convert(l, {
|
14856
14680
|
urlSafe: !0,
|
14857
14681
|
skipPadding: !0
|
14858
|
-
})}`, h =
|
14682
|
+
})}`, h = I0(s), p = k0(t, h);
|
14859
14683
|
await this._establishRetryableConnection(p, f), this.promiseArray.forEach(({ res: g }) => {
|
14860
14684
|
this.logger.debug("Notifying connection successful"), g();
|
14861
14685
|
}), this.socketStatus = he.READY, this.promiseArray = [];
|
@@ -14867,7 +14691,7 @@ class D0 {
|
|
14867
14691
|
});
|
14868
14692
|
}
|
14869
14693
|
async _establishRetryableConnection(t, n) {
|
14870
|
-
this.logger.debug("Establishing retryable connection"), await
|
14694
|
+
this.logger.debug("Establishing retryable connection"), await r0(this._establishConnection.bind(this), [t, n], i0);
|
14871
14695
|
}
|
14872
14696
|
async _openConnection(t, n) {
|
14873
14697
|
return new Promise((r, o) => {
|
@@ -14927,14 +14751,14 @@ class D0 {
|
|
14927
14751
|
_registerWebsocketHandlers(t) {
|
14928
14752
|
this.awsRealTimeSocket && (this.keepAliveHeartbeatIntervalId = setInterval(() => {
|
14929
14753
|
this.keepAliveHeartbeat(t);
|
14930
|
-
},
|
14754
|
+
}, h0), this.awsRealTimeSocket.onmessage = this._handleIncomingSubscriptionMessage.bind(this), this.awsRealTimeSocket.onerror = (n) => {
|
14931
14755
|
this.logger.debug(n), this._errorDisconnect(Re.CONNECTION_CLOSED);
|
14932
14756
|
}, this.awsRealTimeSocket.onclose = (n) => {
|
14933
14757
|
this.logger.debug(`WebSocket closed ${n.reason}`), this._closeSocket(), this._errorDisconnect(Re.CONNECTION_CLOSED);
|
14934
14758
|
});
|
14935
14759
|
}
|
14936
14760
|
}
|
14937
|
-
const Zn = (e, t) => e ? e === "identityPool" ? "iam" : e : t,
|
14761
|
+
const Zn = (e, t) => e ? e === "identityPool" ? "iam" : e : t, N0 = () => {
|
14938
14762
|
const t = qs.getConfig().API?.Events;
|
14939
14763
|
if (!t)
|
14940
14764
|
throw new Error("Amplify configuration is missing. Have you called Amplify.configure()?");
|
@@ -14957,13 +14781,13 @@ const Zn = (e, t) => e ? e === "identityPool" ? "iam" : e : t, L0 = () => {
|
|
14957
14781
|
if (t === void 0)
|
14958
14782
|
throw new Error(`Event must be a valid JSON value. Received ${e}`);
|
14959
14783
|
return [t];
|
14960
|
-
}, Ja = "AWSAppSyncEventsProvider",
|
14961
|
-
class
|
14784
|
+
}, Ja = "AWSAppSyncEventsProvider", O0 = "aws-appsync-event-ws", A0 = "";
|
14785
|
+
class M0 extends R0 {
|
14962
14786
|
constructor() {
|
14963
14787
|
super({
|
14964
14788
|
providerName: Ja,
|
14965
|
-
wsProtocolName:
|
14966
|
-
connectUri:
|
14789
|
+
wsProtocolName: O0,
|
14790
|
+
connectUri: A0
|
14967
14791
|
}), this.allowNoSubscriptions = !0;
|
14968
14792
|
}
|
14969
14793
|
getProviderName() {
|
@@ -14997,7 +14821,7 @@ class F0 extends D0 {
|
|
14997
14821
|
}),
|
14998
14822
|
...s,
|
14999
14823
|
...o,
|
15000
|
-
[
|
14824
|
+
[Ew]: Fv(r)
|
15001
14825
|
}, y = {
|
15002
14826
|
id: n,
|
15003
14827
|
channel: u,
|
@@ -15034,7 +14858,7 @@ class F0 extends D0 {
|
|
15034
14858
|
};
|
15035
14859
|
}
|
15036
14860
|
_extractConnectionTimeout(t) {
|
15037
|
-
const { connectionTimeoutMs: n =
|
14861
|
+
const { connectionTimeoutMs: n = f0 } = t;
|
15038
14862
|
return n;
|
15039
14863
|
}
|
15040
14864
|
_extractErrorCodeAndType(t) {
|
@@ -15042,10 +14866,10 @@ class F0 extends D0 {
|
|
15042
14866
|
return { errorCode: r, errorType: n };
|
15043
14867
|
}
|
15044
14868
|
}
|
15045
|
-
const
|
15046
|
-
async function
|
15047
|
-
const n =
|
15048
|
-
n.authenticationType = Zn(t?.authMode, n.authenticationType), n.apiKey = n.apiKey, n.authToken = n.authToken, await
|
14869
|
+
const Hn = new M0(), Vt = /* @__PURE__ */ new Set();
|
14870
|
+
async function D0(e, t) {
|
14871
|
+
const n = N0();
|
14872
|
+
n.authenticationType = Zn(t?.authMode, n.authenticationType), n.apiKey = n.apiKey, n.authToken = n.authToken, await Hn.connect(n);
|
15049
14873
|
const r = Go();
|
15050
14874
|
Vt.add(r);
|
15051
14875
|
let o;
|
@@ -15054,11 +14878,11 @@ async function B0(e, t) {
|
|
15054
14878
|
if (!Vt.has(r))
|
15055
14879
|
throw new Error("Channel is closed");
|
15056
14880
|
const l = { ...n, query: e };
|
15057
|
-
return l.authenticationType = Zn(u?.authMode, l.authenticationType), l.apiKey = u?.apiKey || l.apiKey, l.authToken = u?.authToken || l.authToken, o =
|
14881
|
+
return l.authenticationType = Zn(u?.authMode, l.authenticationType), l.apiKey = u?.apiKey || l.apiKey, l.authToken = u?.authToken || l.authToken, o = Hn.subscribe(l).subscribe(a), o;
|
15058
14882
|
},
|
15059
14883
|
close: async () => {
|
15060
14884
|
o && o.unsubscribe(), Vt.delete(r), setTimeout(() => {
|
15061
|
-
Vt.size === 0 &&
|
14885
|
+
Vt.size === 0 && Hn.closeIfNoActiveSubscription();
|
15062
14886
|
}, 1e3);
|
15063
14887
|
},
|
15064
14888
|
publish: async (a, u) => {
|
@@ -15069,11 +14893,11 @@ async function B0(e, t) {
|
|
15069
14893
|
query: e,
|
15070
14894
|
variables: a
|
15071
14895
|
};
|
15072
|
-
return l.authenticationType = Zn(u?.authMode, l.authenticationType), l.apiKey = u?.apiKey || l.apiKey, l.authToken = u?.authToken || l.authToken,
|
14896
|
+
return l.authenticationType = Zn(u?.authMode, l.authenticationType), l.apiKey = u?.apiKey || l.apiKey, l.authToken = u?.authToken || l.authToken, Hn.publish(l);
|
15073
14897
|
}
|
15074
14898
|
};
|
15075
14899
|
}
|
15076
|
-
const
|
14900
|
+
const L0 = se.object({
|
15077
14901
|
message_id: se.string(),
|
15078
14902
|
message_number: se.number(),
|
15079
14903
|
agent_id: se.string(),
|
@@ -15097,7 +14921,7 @@ se.object({
|
|
15097
14921
|
content: se.string()
|
15098
14922
|
})
|
15099
14923
|
});
|
15100
|
-
function
|
14924
|
+
function P0({
|
15101
14925
|
conversationId: e,
|
15102
14926
|
onReceiveMessage: t,
|
15103
14927
|
chatSettings: n
|
@@ -15105,7 +14929,7 @@ function H0({
|
|
15105
14929
|
const r = `/default/chat/${e}`, [o, s] = z(!1), i = n?.app_sync_url, c = n?.app_sync_region, a = n?.app_sync_api_key;
|
15106
14930
|
ce(() => {
|
15107
14931
|
(i || c || a) && (qs.configure(
|
15108
|
-
|
14932
|
+
Z_(i, a, c)
|
15109
14933
|
), s(!0));
|
15110
14934
|
}, [i, a, c]), ce(() => {
|
15111
14935
|
if (!o || !e) return;
|
@@ -15114,10 +14938,10 @@ function H0({
|
|
15114
14938
|
console.log(
|
15115
14939
|
"Connecting to conversation channel:",
|
15116
14940
|
r
|
15117
|
-
), u = await
|
14941
|
+
), u = await D0(r), u.subscribe({
|
15118
14942
|
next: (d) => {
|
15119
14943
|
if (console.log(d), d.type === "data") {
|
15120
|
-
const f =
|
14944
|
+
const f = L0.safeParse(
|
15121
14945
|
d.event
|
15122
14946
|
);
|
15123
14947
|
if (console.log("Parsed result:", f), f.success) {
|
@@ -15145,7 +14969,7 @@ function H0({
|
|
15145
14969
|
};
|
15146
14970
|
}, [o, e, r, t]);
|
15147
14971
|
}
|
15148
|
-
function
|
14972
|
+
function U0({
|
15149
14973
|
appId: e,
|
15150
14974
|
userId: t,
|
15151
14975
|
externalId: n,
|
@@ -15181,7 +15005,7 @@ function W0({
|
|
15181
15005
|
},
|
15182
15006
|
[c, t, r, u, i]
|
15183
15007
|
);
|
15184
|
-
|
15008
|
+
P0({
|
15185
15009
|
conversationId: c?.id,
|
15186
15010
|
onReceiveMessage: p,
|
15187
15011
|
chatSettings: s
|
@@ -15243,6 +15067,182 @@ function W0({
|
|
15243
15067
|
onSendMessage: y
|
15244
15068
|
};
|
15245
15069
|
}
|
15070
|
+
class F0 {
|
15071
|
+
httpClient;
|
15072
|
+
userId = null;
|
15073
|
+
conversationId = null;
|
15074
|
+
constructor(t) {
|
15075
|
+
this.userId = t.userId || null, this.httpClient = new _w(t);
|
15076
|
+
}
|
15077
|
+
getUserData() {
|
15078
|
+
return {
|
15079
|
+
userId: this.userId,
|
15080
|
+
conversationId: this.conversationId
|
15081
|
+
};
|
15082
|
+
}
|
15083
|
+
/**
|
15084
|
+
* Reset API client by clearing all stored state
|
15085
|
+
*/
|
15086
|
+
reset() {
|
15087
|
+
this.conversationId = null;
|
15088
|
+
}
|
15089
|
+
async boot() {
|
15090
|
+
return (await this.httpClient.get(
|
15091
|
+
"/sdk/boot"
|
15092
|
+
)).data;
|
15093
|
+
}
|
15094
|
+
async createConversation(t) {
|
15095
|
+
const n = {
|
15096
|
+
text: t.text,
|
15097
|
+
user_data: {
|
15098
|
+
user_id: t.externalId || t.userId,
|
15099
|
+
device_id: t.deviceId
|
15100
|
+
}
|
15101
|
+
}, r = await this.httpClient.post("/chat", n), { data: o } = r;
|
15102
|
+
return o;
|
15103
|
+
}
|
15104
|
+
async replyToConversation(t) {
|
15105
|
+
const n = {
|
15106
|
+
text: t.text,
|
15107
|
+
user_data: {
|
15108
|
+
device_id: t.deviceId,
|
15109
|
+
user_id: t.userId
|
15110
|
+
}
|
15111
|
+
}, { data: r } = await this.httpClient.post(`/chat/${t.conversationId}`, n);
|
15112
|
+
return r;
|
15113
|
+
}
|
15114
|
+
async identifyUser(t) {
|
15115
|
+
const n = {
|
15116
|
+
device_id: t.deviceId,
|
15117
|
+
user_id: t.userId,
|
15118
|
+
external_id: t.externalId
|
15119
|
+
}, { data: r } = await this.httpClient.post(`/chat/${t.conversationId}/identify`, n);
|
15120
|
+
return r;
|
15121
|
+
}
|
15122
|
+
}
|
15123
|
+
const Wn = /* @__PURE__ */ new Map(), zn = /* @__PURE__ */ new Map();
|
15124
|
+
function B0(e, t, n) {
|
15125
|
+
const r = n?.dedupe !== !1, [o, s] = z(
|
15126
|
+
() => Wn.get(e)
|
15127
|
+
), { publishApiError: i } = Ds(), [c, a] = z(void 0), [u, l] = z(!1), d = Pe(!0);
|
15128
|
+
Pe(() => (d.current = !0, () => {
|
15129
|
+
d.current = !1;
|
15130
|
+
}));
|
15131
|
+
const f = $e(async () => {
|
15132
|
+
if (Wn.has(e)) {
|
15133
|
+
const h = Wn.get(e);
|
15134
|
+
return s(h), h;
|
15135
|
+
}
|
15136
|
+
l(!0), a(void 0);
|
15137
|
+
try {
|
15138
|
+
if (r && zn.has(e))
|
15139
|
+
return await zn.get(e);
|
15140
|
+
const h = t();
|
15141
|
+
r && zn.set(e, h);
|
15142
|
+
const p = await h;
|
15143
|
+
return Wn.set(e, p), d.current && s(p), p;
|
15144
|
+
} catch (h) {
|
15145
|
+
throw i(h), d.current && a(h), h;
|
15146
|
+
} finally {
|
15147
|
+
zn.delete(e), d.current && l(!1);
|
15148
|
+
}
|
15149
|
+
}, [e, r, t, i]);
|
15150
|
+
return { data: o, error: c, isLoading: u, fetch: f };
|
15151
|
+
}
|
15152
|
+
function $0(e) {
|
15153
|
+
const { appId: t, initialUserId: n } = e, { getSavedConversationData: r } = Ls({ appId: t }), [o, s] = z(!1), [i, c] = z(""), [a, u] = z(""), [l, d] = z(null);
|
15154
|
+
return ce(() => {
|
15155
|
+
const f = r();
|
15156
|
+
f?.userId ? f?.externalId !== n ? (c(f.userId), d(n)) : (c(f?.userId), d(f.externalId)) : n ? (c(n), d(n)) : c(crypto.randomUUID()), u(f?.deviceId || crypto.randomUUID()), s(!0);
|
15157
|
+
}, [r, n]), {
|
15158
|
+
isReady: o,
|
15159
|
+
userId: i,
|
15160
|
+
deviceId: a,
|
15161
|
+
externalId: l
|
15162
|
+
};
|
15163
|
+
}
|
15164
|
+
function H0({
|
15165
|
+
appId: e,
|
15166
|
+
initialUserId: t
|
15167
|
+
}) {
|
15168
|
+
const {
|
15169
|
+
userId: n,
|
15170
|
+
externalId: r,
|
15171
|
+
deviceId: o,
|
15172
|
+
isReady: s
|
15173
|
+
} = $0({ appId: e, initialUserId: t }), {
|
15174
|
+
isConversationExpired: i,
|
15175
|
+
clearConversationData: c,
|
15176
|
+
getSavedConversationData: a
|
15177
|
+
} = Ls({ appId: e }), { current: u } = Pe(Q_()), [l] = z(
|
15178
|
+
new F0({
|
15179
|
+
baseURL: u,
|
15180
|
+
appId: e
|
15181
|
+
})
|
15182
|
+
), [d, f] = z(null), [h, p] = z(null), [g, y] = z([]), [b, v] = z(!1), E = B0(`sdk-boot-${e}`, () => l.boot()).fetch;
|
15183
|
+
return ce(() => {
|
15184
|
+
if (i())
|
15185
|
+
c();
|
15186
|
+
else {
|
15187
|
+
const {
|
15188
|
+
conversationId: _,
|
15189
|
+
userId: w,
|
15190
|
+
messages: I
|
15191
|
+
} = a();
|
15192
|
+
_ && w && (p({
|
15193
|
+
id: _
|
15194
|
+
}), I && I.length > 0 && y(I));
|
15195
|
+
}
|
15196
|
+
}, [a, i, c]), ce(() => {
|
15197
|
+
if (!s) return;
|
15198
|
+
(async () => {
|
15199
|
+
const [w, I] = await z_(E());
|
15200
|
+
if (I) {
|
15201
|
+
v(!0);
|
15202
|
+
return;
|
15203
|
+
}
|
15204
|
+
const C = w.chat_settings.welcome_message;
|
15205
|
+
f(w.chat_settings), C && g.length === 0 && y([
|
15206
|
+
{
|
15207
|
+
id: crypto.randomUUID(),
|
15208
|
+
content: C,
|
15209
|
+
sender: "receiver",
|
15210
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
15211
|
+
isWelcomeMessage: !0
|
15212
|
+
}
|
15213
|
+
]), v(!0);
|
15214
|
+
})();
|
15215
|
+
}, [s, g.length]), {
|
15216
|
+
userId: n,
|
15217
|
+
externalId: r,
|
15218
|
+
deviceId: o,
|
15219
|
+
apiClient: l,
|
15220
|
+
chatSettings: d,
|
15221
|
+
currentConversation: h,
|
15222
|
+
messages: g,
|
15223
|
+
isReady: b
|
15224
|
+
};
|
15225
|
+
}
|
15226
|
+
function W0(e) {
|
15227
|
+
const [t, n] = z(!1), [r, o] = z(
|
15228
|
+
null
|
15229
|
+
), s = e ?? t;
|
15230
|
+
return ce(() => {
|
15231
|
+
const i = () => {
|
15232
|
+
n(window.innerWidth <= 640);
|
15233
|
+
};
|
15234
|
+
return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
15235
|
+
}, []), ce(() => {
|
15236
|
+
const i = document.createElement("div");
|
15237
|
+
return i.className = "eloquent-ai-chat-portal", i.style.position = "relative", i.style.zIndex = "30", document.body.appendChild(i), o(i), () => {
|
15238
|
+
i.parentElement && i.parentElement.removeChild(i);
|
15239
|
+
};
|
15240
|
+
}, []), {
|
15241
|
+
isMobileScreen: t,
|
15242
|
+
isMobile: s,
|
15243
|
+
portalContainer: r
|
15244
|
+
};
|
15245
|
+
}
|
15246
15246
|
function z0({
|
15247
15247
|
environment: e,
|
15248
15248
|
appId: t,
|
@@ -15251,7 +15251,7 @@ function z0({
|
|
15251
15251
|
isMobile: o,
|
15252
15252
|
initialOpen: s = !1
|
15253
15253
|
}) {
|
15254
|
-
const { isMobile: i, portalContainer: c } =
|
15254
|
+
const { isMobile: i, portalContainer: c } = W0(o), {
|
15255
15255
|
userId: a,
|
15256
15256
|
externalId: u,
|
15257
15257
|
deviceId: l,
|
@@ -15260,9 +15260,9 @@ function z0({
|
|
15260
15260
|
currentConversation: h,
|
15261
15261
|
messages: p,
|
15262
15262
|
isReady: g
|
15263
|
-
} =
|
15263
|
+
} = H0({ appId: t, initialUserId: n }), y = bw({ chatProps: r, chatSettings: f }), [b, v] = z(s ?? i), x = Qo(b, 200), [E, _] = z(
|
15264
15264
|
r?.messages ?? []
|
15265
|
-
), [w, I] = z(h), { onSendMessage: C, onCleanMessages: S } =
|
15265
|
+
), [w, I] = z(h), { onSendMessage: C, onCleanMessages: S } = U0({
|
15266
15266
|
appId: t,
|
15267
15267
|
userId: a,
|
15268
15268
|
externalId: u,
|
@@ -15301,7 +15301,7 @@ function z0({
|
|
15301
15301
|
const j0 = ({
|
15302
15302
|
children: e
|
15303
15303
|
}) => {
|
15304
|
-
const [t, n] = z(null), r =
|
15304
|
+
const [t, n] = z(null), r = hw(n), i = {
|
15305
15305
|
error: t,
|
15306
15306
|
publishApiError: r,
|
15307
15307
|
publishError: (c) => n(c),
|
@@ -15397,7 +15397,7 @@ function q0({
|
|
15397
15397
|
} : {}
|
15398
15398
|
},
|
15399
15399
|
children: f ? /* @__PURE__ */ m(
|
15400
|
-
|
15400
|
+
gw,
|
15401
15401
|
{
|
15402
15402
|
...g,
|
15403
15403
|
isOpen: p,
|
@@ -15431,7 +15431,7 @@ function q0({
|
|
15431
15431
|
zIndex: h ? 2147482999 : 2147483e3
|
15432
15432
|
},
|
15433
15433
|
children: /* @__PURE__ */ m(
|
15434
|
-
|
15434
|
+
j_,
|
15435
15435
|
{
|
15436
15436
|
isOpen: p,
|
15437
15437
|
toggleBubble: () => E((C) => !C)
|
@@ -15455,7 +15455,7 @@ function oE(e, t) {
|
|
15455
15455
|
}
|
15456
15456
|
export {
|
15457
15457
|
G0 as Chat,
|
15458
|
-
|
15458
|
+
gw as ChatInterface,
|
15459
15459
|
oE as renderChat
|
15460
15460
|
};
|
15461
15461
|
//# sourceMappingURL=index.mjs.map
|