tanya-chatbot 0.5.3 → 0.5.5

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.
@@ -1,27 +1,27 @@
1
- import { useEffect as M, useState as z, useRef as Ft } from "react";
2
- import { jsx as a, jsxs as u, Fragment as re } from "react/jsx-runtime";
3
- import { createHttpLink as lr, ApolloClient as cr, InMemoryCache as dr, ApolloProvider as ur } from "@apollo/client";
4
- import { Provider as pr, useDispatch as De, useSelector as Rt } from "react-redux";
5
- import { createSlice as Le, configureStore as fr } from "@reduxjs/toolkit";
6
- import * as Be from "@radix-ui/react-popover";
1
+ import { useEffect as B, useState as $, useRef as xt } from "react";
2
+ import { jsx as a, jsxs as u, Fragment as oe } from "react/jsx-runtime";
3
+ import { createHttpLink as cr, ApolloClient as dr, InMemoryCache as ur, ApolloProvider as pr } from "@apollo/client";
4
+ import { Provider as fr, useDispatch as Le, useSelector as Rt } from "react-redux";
5
+ import { createSlice as Be, configureStore as hr } from "@reduxjs/toolkit";
6
+ import * as Ue from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
9
  import E from "axios";
10
10
  import "crypto-js";
11
- import { Icon as be } from "@iconify/react";
12
- import { toast as H } from "react-toastify";
13
- const hr = '*,: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;-o-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]){-webkit-text-decoration:underline dotted;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::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}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}.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}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;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-full{--tw-translate-y: 100%;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))}.transform{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}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.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))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px 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-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px 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)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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}.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-all{transition-property:all;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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@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-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;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))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.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}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;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))}.md\\:translate-x-full{--tw-translate-x: 100%;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))}.md\\:translate-y-0{--tw-translate-y: 0px;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))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;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))}.lg\\:translate-x-full{--tw-translate-x: 100%;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))}.lg\\:translate-y-0{--tw-translate-y: 0px;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))}.lg\\:transform{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))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
14
- function ko() {
15
- return M(() => {
11
+ import { Icon as xe } from "@iconify/react";
12
+ import { toast as U } from "react-toastify";
13
+ const mr = '*,: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;-o-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]){-webkit-text-decoration:underline dotted;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::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}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}.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}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;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-full{--tw-translate-y: 100%;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))}.transform{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}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.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))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px 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-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px 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)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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}.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-all{transition-property:all;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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@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-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;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))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.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}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;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))}.md\\:translate-x-full{--tw-translate-x: 100%;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))}.md\\:translate-y-0{--tw-translate-y: 0px;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))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;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))}.lg\\:translate-x-full{--tw-translate-x: 100%;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))}.lg\\:translate-y-0{--tw-translate-y: 0px;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))}.lg\\:transform{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))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
14
+ function So() {
15
+ return B(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
- return t.textContent = hr, document.head.appendChild(t), () => {
18
+ return t.textContent = mr, document.head.appendChild(t), () => {
19
19
  document.head.removeChild(t);
20
20
  };
21
21
  }
22
22
  }, []), null;
23
23
  }
24
- const mr = {
24
+ const wr = {
25
25
  store: {
26
26
  storeCode: "",
27
27
  storeName: "",
@@ -55,30 +55,30 @@ const mr = {
55
55
  mobile: []
56
56
  }
57
57
  }
58
- }, Ue = Le({
58
+ }, qe = Be({
59
59
  name: "store",
60
- initialState: mr,
60
+ initialState: wr,
61
61
  reducers: {
62
62
  setStore: (t, e) => {
63
63
  t.store = e.payload;
64
64
  }
65
65
  }
66
- }), { setStore: So } = Ue.actions, wr = Ue.reducer, gr = {
66
+ }), { setStore: _o } = qe.actions, gr = qe.reducer, br = {
67
67
  product: null
68
- }, qe = Le({
68
+ }, Me = Be({
69
69
  name: "product",
70
- initialState: gr,
70
+ initialState: br,
71
71
  reducers: {
72
72
  setProduct: (t, e) => {
73
73
  t.product = e.payload;
74
74
  }
75
75
  }
76
- }), { setProduct: oe } = qe.actions, br = qe.reducer, xr = fr({
76
+ }), { setProduct: ne } = Me.actions, xr = Me.reducer, yr = hr({
77
77
  reducer: {
78
- store: wr,
79
- product: br
78
+ store: gr,
79
+ product: xr
80
80
  }
81
- }), yr = ({ children: t }) => /* @__PURE__ */ a(pr, { store: xr, children: t }), Vt = (t) => {
81
+ }), vr = ({ children: t }) => /* @__PURE__ */ a(fr, { store: yr, children: t }), Vt = (t) => {
82
82
  const e = new CustomEvent("reactCartUpdated", {
83
83
  detail: {
84
84
  cartUpdated: !0,
@@ -87,31 +87,31 @@ const mr = {
87
87
  });
88
88
  window.dispatchEvent(e);
89
89
  };
90
- function vr({
90
+ function kr({
91
91
  ...t
92
92
  }) {
93
- return /* @__PURE__ */ a(Be.Root, { "data-slot": "popover", ...t });
93
+ return /* @__PURE__ */ a(Ue.Root, { "data-slot": "popover", ...t });
94
94
  }
95
- function kr({
95
+ function Sr({
96
96
  ...t
97
97
  }) {
98
- return /* @__PURE__ */ a(Be.Trigger, { "data-slot": "popover-trigger", ...t });
98
+ return /* @__PURE__ */ a(Ue.Trigger, { "data-slot": "popover-trigger", ...t });
99
99
  }
100
- const kt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), Me = async () => {
100
+ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), He = async () => {
101
101
  const t = "https://tanya-sfcc-server.vercel.app/";
102
102
  try {
103
103
  const e = await E.post(
104
- `${t}api/auth/token-bm-grant?baseUrl=${tt()}&siteId=${J()}`
104
+ `${t}api/auth/token-bm-grant?baseUrl=${Z()}&siteId=${Y()}`
105
105
  );
106
106
  return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
107
107
  } catch (e) {
108
108
  return E.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
109
109
  }
110
- }, He = async (t) => {
110
+ }, Re = async (t) => {
111
111
  const e = "https://tanya-sfcc-server.vercel.app/";
112
112
  try {
113
113
  const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
114
- `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${tt()}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Z()}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
115
115
  {},
116
116
  {
117
117
  headers: {
@@ -125,23 +125,23 @@ const kt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
125
125
  return E.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
126
  }
127
127
  };
128
- async function Ot() {
128
+ async function $t() {
129
129
  var c;
130
- const t = J(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
130
+ const t = Y(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
131
131
  return console.log(n), (c = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && c.isGuest, console.log("access token found in local storage"), { access_token: n, expires_in: o };
132
132
  }
133
- const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getItem("SiteId"), at = () => sessionStorage.getItem("pubCfg"), it = () => sessionStorage.getItem("envRef"), st = () => sessionStorage.getItem("orgRef"), xe = async (t) => {
133
+ const Z = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem("SiteId"), it = () => sessionStorage.getItem("pubCfg"), st = () => sessionStorage.getItem("envRef"), lt = () => sessionStorage.getItem("orgRef"), ye = async (t) => {
134
134
  console.log("fetching results");
135
- const { serverUrl: e, basePath: r } = kt();
135
+ const { serverUrl: e, basePath: r } = St();
136
136
  let o = "";
137
137
  {
138
- const n = await Ot();
138
+ const n = await $t();
139
139
  console.log("the token from getSearchResults", n), o = n.access_token;
140
140
  }
141
141
  try {
142
- const n = tt();
142
+ const n = Z();
143
143
  return (await E.get(
144
- `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
144
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
145
145
  {
146
146
  headers: {
147
147
  "Content-Type": "application/json",
@@ -152,13 +152,13 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
152
152
  } catch (n) {
153
153
  throw console.error("Error fetching search results:", n), n;
154
154
  }
155
- }, Re = async (t) => {
155
+ }, Ve = async (t) => {
156
156
  if (!t) throw new Error("Product ID is required");
157
- const { serverUrl: e, basePath: r } = kt(), o = tt();
157
+ const { serverUrl: e, basePath: r } = St(), o = Z();
158
158
  console.log("calling access");
159
- const { access_token: n } = await Ot();
159
+ const { access_token: n } = await $t();
160
160
  return (await E.get(
161
- `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
161
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
162
162
  {
163
163
  headers: {
164
164
  "Content-Type": "application/json",
@@ -166,13 +166,13 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
166
166
  }
167
167
  }
168
168
  )).data;
169
- }, Sr = async (t) => {
169
+ }, _r = async (t) => {
170
170
  if (!t) throw new Error("customerId is required");
171
- const e = await Me(), { customer_token: r } = await He(
171
+ const e = await He(), { customer_token: r } = await Re(
172
172
  e
173
- ), { serverUrl: o, basePath: n } = kt(), l = (await Ot()).access_token;
173
+ ), { serverUrl: o, basePath: n } = St(), l = (await $t()).access_token;
174
174
  return (await E.get(
175
- `${o}${n}/get-interest?baseUrl=${tt()}&customerId=${t}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
175
+ `${o}${n}/get-interest?baseUrl=${Z()}&customerId=${t}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
176
176
  {
177
177
  headers: {
178
178
  "Content-Type": "application/json",
@@ -180,10 +180,10 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
180
180
  }
181
181
  }
182
182
  )).data;
183
- }, ye = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ve = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), _r = (t, e) => t.toLocaleString("en-US", {
183
+ }, ve = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ke = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), Cr = (t, e) => t.toLocaleString("en-US", {
184
184
  style: "currency",
185
185
  currency: e || "USD"
186
- }), ke = (t) => {
186
+ }), Se = (t) => {
187
187
  var e, r, o;
188
188
  return "variants" in t ? {
189
189
  centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
@@ -192,21 +192,21 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
192
192
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
193
193
  currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
194
194
  };
195
- }, Cr = (t) => t.charAt(0).toUpperCase() + t.slice(1), Se = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
195
+ }, Ir = (t) => t.charAt(0).toUpperCase() + t.slice(1), _e = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Qt = (t) => t.split("\\n").map((e, r) => {
196
196
  const o = e.match(/^(\d+)\.\s(.+)/);
197
197
  return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
198
198
  }).join("");
199
- function Ir() {
200
- const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
201
- return M(() => {
199
+ function Fr() {
200
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = $(t);
201
+ return B(() => {
202
202
  const o = () => r(t());
203
203
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
204
204
  }, []), e;
205
205
  }
206
- const Fr = ({
206
+ const Nr = ({
207
207
  product: t
208
208
  }) => {
209
- const e = De(), r = Ir(), [o, n] = z(0), c = () => {
209
+ const e = Le(), r = Fr(), [o, n] = $(0), c = () => {
210
210
  n(
211
211
  (i) => i + r >= t.length ? 0 : i + r
212
212
  );
@@ -215,8 +215,8 @@ const Fr = ({
215
215
  (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
216
216
  );
217
217
  }, d = async (i) => {
218
- const x = await Re(i);
219
- e(oe(x));
218
+ const y = await Ve(i);
219
+ e(ne(y));
220
220
  };
221
221
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
222
222
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
@@ -233,7 +233,7 @@ const Fr = ({
233
233
  }
234
234
  ),
235
235
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
236
- var x, y, C, k;
236
+ var y, v, C, _;
237
237
  return /* @__PURE__ */ u(
238
238
  "div",
239
239
  {
@@ -245,7 +245,7 @@ const Fr = ({
245
245
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
246
246
  "img",
247
247
  {
248
- src: ((x = ve(i)[0]) == null ? void 0 : x.link) || ve(i)[0] || // fallback if it's a string
248
+ src: ((y = ke(i)[0]) == null ? void 0 : y.link) || ke(i)[0] || // fallback if it's a string
249
249
  "https://via.placeholder.com/120",
250
250
  alt: i != null && i.productName ? i.productName : "Product",
251
251
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -257,8 +257,8 @@ const Fr = ({
257
257
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
258
258
  children: [
259
259
  /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
260
- /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : Se(
261
- ye((y = i == null ? void 0 : i.name) == null ? void 0 : y["en-US"]),
260
+ /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : _e(
261
+ ve((v = i == null ? void 0 : i.name) == null ? void 0 : v["en-US"]),
262
262
  60
263
263
  ) || "Product" }),
264
264
  /* @__PURE__ */ a(
@@ -272,17 +272,17 @@ const Fr = ({
272
272
  marginBottom: "5px",
273
273
  zIndex: 50
274
274
  },
275
- children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : Se(
276
- ye((C = i == null ? void 0 : i.name) == null ? void 0 : C["en-US"]),
275
+ children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : _e(
276
+ ve((C = i == null ? void 0 : i.name) == null ? void 0 : C["en-US"]),
277
277
  60
278
278
  ) || "Product"
279
279
  }
280
280
  )
281
281
  ] }),
282
282
  /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
283
- /* @__PURE__ */ a("p", { children: _r(
284
- i != null && i.price ? Number(i == null ? void 0 : i.price) : ke(i).centAmount || 0,
285
- (k = ke(i)) == null ? void 0 : k.currencyCode
283
+ /* @__PURE__ */ a("p", { children: Cr(
284
+ i != null && i.price ? Number(i == null ? void 0 : i.price) : Se(i).centAmount || 0,
285
+ (_ = Se(i)) == null ? void 0 : _.currencyCode
286
286
  ) }),
287
287
  /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
288
288
  "$",
@@ -311,7 +311,7 @@ const Fr = ({
311
311
  }
312
312
  )
313
313
  ] }) });
314
- }, Nr = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
314
+ }, Er = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
315
315
  "div",
316
316
  {
317
317
  className: "mb-4 p-3 rounded-xl",
@@ -324,11 +324,11 @@ const Fr = ({
324
324
  "div",
325
325
  {
326
326
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
327
- children: Cr(r.keyword) || "No keyword"
327
+ children: Ir(r.keyword) || "No keyword"
328
328
  }
329
329
  ),
330
330
  /* @__PURE__ */ a(
331
- Fr,
331
+ Nr,
332
332
  {
333
333
  product: r.items,
334
334
  storeDetails: e
@@ -337,12 +337,12 @@ const Fr = ({
337
337
  ]
338
338
  },
339
339
  o
340
- )) }), Ve = async (t, e) => {
340
+ )) }), Ye = async (t, e) => {
341
341
  var c, l;
342
- const { serverUrl: r, basePath: o } = kt(), n = `${r}`;
342
+ const { serverUrl: r, basePath: o } = St(), n = `${r}`;
343
343
  try {
344
344
  const d = await E.post(
345
- `${n}${o}/basket/create?baseUrl=${tt()}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
345
+ `${n}${o}/basket/create?baseUrl=${Z()}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
346
346
  e,
347
347
  {
348
348
  headers: {
@@ -361,11 +361,11 @@ const Fr = ({
361
361
  } catch (d) {
362
362
  return E.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
363
363
  }
364
- }, ne = async (t, e, r) => {
365
- const { serverUrl: o, basePath: n } = kt(), c = `${o}`;
364
+ }, ae = async (t, e, r) => {
365
+ const { serverUrl: o, basePath: n } = St(), c = `${o}`;
366
366
  try {
367
367
  const l = await E.post(
368
- `${c}${n}/basket/add-product/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
368
+ `${c}${n}/basket/add-product/${t}?baseUrl=${Z()}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
369
369
  e,
370
370
  {
371
371
  headers: {
@@ -381,15 +381,15 @@ const Fr = ({
381
381
  l.response || l.message
382
382
  ) : console.error("Unexpected error:", l), null;
383
383
  }
384
- }, Ye = async ({
384
+ }, Ke = async ({
385
385
  basketId: t,
386
386
  customer_token: e
387
387
  }) => {
388
388
  var c;
389
- const { serverUrl: r, basePath: o } = kt(), n = `${r}`;
389
+ const { serverUrl: r, basePath: o } = St(), n = `${r}`;
390
390
  try {
391
391
  const l = await E.get(
392
- `${n}${o}/basket/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
392
+ `${n}${o}/basket/${t}?baseUrl=${Z()}&siteId=${Y()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
393
393
  {
394
394
  headers: {
395
395
  "Content-Type": "application/json",
@@ -401,8 +401,8 @@ const Fr = ({
401
401
  } catch (l) {
402
402
  return E.isAxiosError(l) ? { status: (c = l.response) == null ? void 0 : c.status, data: null } : { status: null, data: null };
403
403
  }
404
- }, Yt = "sfcc_basket_id", _e = "sfcc_customer_token", Pt = "sfcc_token_expiry", Er = 300 * 1e3, Nt = "1.0.0";
405
- const nt = (t) => {
404
+ }, Yt = "sfcc_basket_id", Ce = "sfcc_customer_token", Ot = "sfcc_token_expiry", Tr = 300 * 1e3, Et = "1.0.0";
405
+ const at = (t) => {
406
406
  try {
407
407
  t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
408
408
  } catch (e) {
@@ -411,88 +411,88 @@ const nt = (t) => {
411
411
  }, Kt = (t) => {
412
412
  try {
413
413
  if (t) {
414
- localStorage.setItem(_e, t);
415
- const e = Date.now() + Er;
416
- localStorage.setItem(Pt, e.toString());
414
+ localStorage.setItem(Ce, t);
415
+ const e = Date.now() + Tr;
416
+ localStorage.setItem(Ot, e.toString());
417
417
  } else
418
- localStorage.removeItem(_e);
418
+ localStorage.removeItem(Ce);
419
419
  } catch (e) {
420
420
  console.error("Error storing token:", e);
421
421
  }
422
- }, Ce = 300, Tr = ({ addToCartPwa: t }) => {
423
- var i, x, y, C, k, j;
424
- const e = De(), r = Rt((T) => T.product.product), o = Rt((T) => T.store.store), [n, c] = z(!!r);
425
- if (M(() => {
422
+ }, Ie = 300, Pr = ({ addToCartPwa: t }) => {
423
+ var i, y, v, C, _, O;
424
+ const e = Le(), r = Rt((T) => T.product.product), o = Rt((T) => T.store.store), [n, c] = $(!!r);
425
+ if (B(() => {
426
426
  c(!!r);
427
427
  }, [r]), !r) return null;
428
428
  const l = async () => {
429
- var T, D, W, lt, R, ct, St, $t, et, _t, Ct, dt, zt, At, rt, P;
429
+ var T, A, tt, _t, ct, q, dt, Ct, zt, et, It, Ft, ut, At, jt, K;
430
430
  try {
431
- if (!((D = (T = r == null ? void 0 : r.variants) == null ? void 0 : T[0]) != null && D.product_id) && !(r.type.item || r.type.bundle) && !((lt = (W = r == null ? void 0 : r.variants) == null ? void 0 : W[0]) != null && lt.productId)) {
432
- H.error("Variants not available", {
431
+ if (!((A = (T = r == null ? void 0 : r.variants) == null ? void 0 : T[0]) != null && A.product_id) && !(r.type.item || r.type.bundle) && !((_t = (tt = r == null ? void 0 : r.variants) == null ? void 0 : tt[0]) != null && _t.productId)) {
432
+ U.error("Variants not available", {
433
433
  position: "bottom-right",
434
434
  autoClose: 1e3
435
435
  }), console.error("No product variant found");
436
436
  return;
437
437
  }
438
- const _ = [
438
+ const b = [
439
439
  {
440
- product_id: ((R = r.variants) == null ? void 0 : R[0].product_id) || ((ct = r.variants) == null ? void 0 : ct[0].productId) || (r == null ? void 0 : r.id),
440
+ product_id: ((ct = r.variants) == null ? void 0 : ct[0].product_id) || ((q = r.variants) == null ? void 0 : q[0].productId) || (r == null ? void 0 : r.id),
441
441
  quantity: 1
442
442
  }
443
- ], v = JSON.parse(
443
+ ], rt = JSON.parse(
444
444
  sessionStorage.getItem("customerData") || "{}"
445
- ), ut = (v == null ? void 0 : v.basketId) || localStorage.getItem(Yt), Wt = !1, jt = localStorage.getItem(Pt), Dt = Date.now();
446
- if (!Wt || !jt || Dt >= parseInt(jt)) {
447
- let $ = "";
448
- if ($ = "Bearer " + (await Ot()).access_token, !$) {
445
+ ), k = (rt == null ? void 0 : rt.basketId) || localStorage.getItem(Yt), Wt = !1, Dt = localStorage.getItem(Ot), Lt = Date.now();
446
+ if (!Wt || !Dt || Lt >= parseInt(Dt)) {
447
+ let M = "";
448
+ if (M = "Bearer " + (await $t()).access_token, !M) {
449
449
  console.error("Failed to get customer_token");
450
450
  return;
451
451
  }
452
- const pt = Dt + 300 * 1e3;
453
- if (Kt($), localStorage.setItem(Pt, pt.toString()), ut) {
454
- const It = await Ye({
455
- basketId: ut,
456
- customer_token: $
452
+ const ot = Lt + 300 * 1e3;
453
+ if (Kt(M), localStorage.setItem(Ot, ot.toString()), k) {
454
+ const Nt = await Ke({
455
+ basketId: k,
456
+ customer_token: M
457
457
  });
458
- if (It.status === 200 && It) {
459
- const L = await ne(
460
- ut,
461
- _,
462
- $
458
+ if (Nt.status === 200 && Nt) {
459
+ const W = await ae(
460
+ k,
461
+ b,
462
+ M
463
463
  );
464
- (((St = L == null ? void 0 : L.product_items) == null ? void 0 : St.length) > 0 || (($t = L == null ? void 0 : L.productItems) == null ? void 0 : $t.length) > 0) && (H.success("Added to cart", {
464
+ (((dt = W == null ? void 0 : W.product_items) == null ? void 0 : dt.length) > 0 || ((Ct = W == null ? void 0 : W.productItems) == null ? void 0 : Ct.length) > 0) && (U.success("Added to cart", {
465
465
  position: "bottom-right",
466
466
  autoClose: 3e3,
467
467
  hideProgressBar: !1,
468
468
  closeOnClick: !0,
469
469
  pauseOnHover: !0,
470
470
  draggable: !0
471
- }), Vt(ut));
471
+ }), Vt(k));
472
472
  return;
473
473
  }
474
474
  }
475
- const Lt = {
475
+ const pt = {
476
476
  productItems: [
477
477
  {
478
- productId: ((et = r.variants) == null ? void 0 : et[0].product_id) || ((_t = r.variants) == null ? void 0 : _t[0].productId) || (r == null ? void 0 : r.id),
478
+ productId: ((zt = r.variants) == null ? void 0 : zt[0].product_id) || ((et = r.variants) == null ? void 0 : et[0].productId) || (r == null ? void 0 : r.id),
479
479
  quantity: 1
480
480
  }
481
481
  ]
482
- }, S = await Ve($, Lt);
482
+ }, S = await Ye(M, pt);
483
483
  if (!(S != null && S.basket_id) && !(S != null && S.basketId)) {
484
484
  console.error("Failed to create basket");
485
485
  return;
486
486
  }
487
- nt(
487
+ at(
488
488
  (S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId)
489
489
  ), console.log("adding product to basket");
490
- const G = await ne(
490
+ const J = await ae(
491
491
  (S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId),
492
- _,
493
- $
492
+ b,
493
+ M
494
494
  );
495
- console.log("object added to basket"), (((Ct = G == null ? void 0 : G.product_items) == null ? void 0 : Ct.length) > 0 || ((dt = G == null ? void 0 : G.productItems) == null ? void 0 : dt.length) > 0) && H.success("Added to cart", {
495
+ console.log("object added to basket"), (((It = J == null ? void 0 : J.product_items) == null ? void 0 : It.length) > 0 || ((Ft = J == null ? void 0 : J.productItems) == null ? void 0 : Ft.length) > 0) && U.success("Added to cart", {
496
496
  position: "bottom-right",
497
497
  autoClose: 3e3,
498
498
  hideProgressBar: !1,
@@ -501,12 +501,12 @@ const nt = (t) => {
501
501
  draggable: !0
502
502
  }), Vt(S.basket_id || (S == null ? void 0 : S.basketId));
503
503
  }
504
- } catch (_) {
505
- console.error("Error adding to cart:", _), H.error("Failed to add product to cart", {
504
+ } catch (b) {
505
+ console.error("Error adding to cart:", b), U.error("Failed to add product to cart", {
506
506
  position: "bottom-right",
507
507
  autoClose: 3e3
508
- }), ((zt = _ == null ? void 0 : _.response) == null ? void 0 : zt.status) === 404 || // Basket not found
509
- ((At = _ == null ? void 0 : _.response) == null ? void 0 : At.status) === 401 ? (((rt = _ == null ? void 0 : _.response) == null ? void 0 : rt.status) === 404 && nt(null), ((P = _ == null ? void 0 : _.response) == null ? void 0 : P.status) === 401 && (nt(null), Kt(null))) : (console.error("Failed to add product to basket:", _.message), H.error("Failed to add product to cart", {
508
+ }), ((ut = b == null ? void 0 : b.response) == null ? void 0 : ut.status) === 404 || // Basket not found
509
+ ((At = b == null ? void 0 : b.response) == null ? void 0 : At.status) === 401 ? (((jt = b == null ? void 0 : b.response) == null ? void 0 : jt.status) === 404 && at(null), ((K = b == null ? void 0 : b.response) == null ? void 0 : K.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", b.message), U.error("Failed to add product to cart", {
510
510
  position: "bottom-right",
511
511
  autoClose: 3e3
512
512
  }));
@@ -514,13 +514,13 @@ const nt = (t) => {
514
514
  }, d = () => {
515
515
  r && (window.location.href = r.c_pdpUrl);
516
516
  };
517
- return console.log(r, "the prod"), /* @__PURE__ */ u(re, { children: [
517
+ return console.log(r, "the prod"), /* @__PURE__ */ u(oe, { children: [
518
518
  /* @__PURE__ */ a(
519
519
  "div",
520
520
  {
521
521
  className: "fixed inset-0 z-40 bg-black/30",
522
522
  onClick: () => {
523
- c(!1), setTimeout(() => e(oe(null)), Ce);
523
+ c(!1), setTimeout(() => e(ne(null)), Ie);
524
524
  }
525
525
  }
526
526
  ),
@@ -538,14 +538,14 @@ const nt = (t) => {
538
538
  /* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
539
539
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
540
540
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
541
- be,
541
+ xe,
542
542
  {
543
543
  icon: "mdi:close",
544
544
  className: "text-[#555555] w-6 h-6 cursor-pointer",
545
545
  onClick: () => {
546
546
  c(!1), setTimeout(
547
- () => e(oe(null)),
548
- Ce
547
+ () => e(ne(null)),
548
+ Ie
549
549
  );
550
550
  }
551
551
  }
@@ -555,20 +555,20 @@ const nt = (t) => {
555
555
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
556
556
  "img",
557
557
  {
558
- src: (C = (y = (x = (i = r.imageGroups) == null ? void 0 : i[0]) == null ? void 0 : x.images) == null ? void 0 : y[0]) == null ? void 0 : C.link,
558
+ src: (C = (v = (y = (i = r.imageGroups) == null ? void 0 : i[0]) == null ? void 0 : y.images) == null ? void 0 : v[0]) == null ? void 0 : C.link,
559
559
  alt: r.name,
560
560
  className: "rounded-[10px]"
561
561
  }
562
562
  ) }),
563
563
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
564
- (T) => T.images.slice(1, 2).map((D) => /* @__PURE__ */ a(
564
+ (T) => T.images.slice(1, 2).map((A) => /* @__PURE__ */ a(
565
565
  "img",
566
566
  {
567
- src: D.link,
567
+ src: A.link,
568
568
  alt: r.name,
569
569
  className: "rounded-[10px] w-[60px] h-[60px]"
570
570
  },
571
- D.link
571
+ A.link
572
572
  ))
573
573
  ) })
574
574
  ] }),
@@ -604,30 +604,30 @@ const nt = (t) => {
604
604
  /* @__PURE__ */ u("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
605
605
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
606
606
  /* @__PURE__ */ u("div", { className: "text-[#323135] font-bold", children: [
607
- ((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) || 0,
607
+ ((_ = r == null ? void 0 : r.rating) == null ? void 0 : _.rate) || 0,
608
608
  " /",
609
609
  " ",
610
610
  /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
611
611
  ] }),
612
612
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
613
613
  /* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
614
- ((j = r == null ? void 0 : r.rating) == null ? void 0 : j.count) || 0,
614
+ ((O = r == null ? void 0 : r.rating) == null ? void 0 : O.count) || 0,
615
615
  " ratings"
616
616
  ] })
617
617
  ] }) }),
618
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((T, D) => {
619
- var W;
618
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((T, A) => {
619
+ var tt;
620
620
  return /* @__PURE__ */ a(
621
- be,
621
+ xe,
622
622
  {
623
623
  icon: "mdi:star",
624
624
  width: "20",
625
625
  height: "20",
626
626
  className: `text-yellow-500
627
- ${((W = r == null ? void 0 : r.rating) == null ? void 0 : W.rate) > D ? "text-yellow-500" : "text-gray-300"}
627
+ ${((tt = r == null ? void 0 : r.rating) == null ? void 0 : tt.rate) > A ? "text-yellow-500" : "text-gray-300"}
628
628
  `
629
629
  },
630
- D
630
+ A
631
631
  );
632
632
  }) })
633
633
  ] }),
@@ -662,7 +662,7 @@ const nt = (t) => {
662
662
  }
663
663
  )
664
664
  ] });
665
- }, Pr = ({
665
+ }, Or = ({
666
666
  tanyaConfig: t,
667
667
  basketId: e,
668
668
  addToCart: r
@@ -681,53 +681,53 @@ const nt = (t) => {
681
681
  "Niece/Nephew": "his/her niece/nephew",
682
682
  "My Friends": "his/her friends",
683
683
  Others: "others"
684
- }, c = Ft(null), l = Ft(null), d = Ft(null), i = Ft(null), [x, y] = z(null), [C, k] = z(!1), [j, T] = z(!1), [D, W] = z(!1), [lt, R] = z(!1), [ct, St] = z(!1), [$t, et] = z(!1), [_t, Ct] = z(""), [dt, zt] = z(""), At = (s) => ({
684
+ }, c = xt(null), l = xt(null), d = xt(null), i = xt(null), [y, v] = $(null), C = xt(null), [_, O] = $(!1), [T, A] = $(!1), [tt, _t] = $(!1), [ct, q] = $(!1), [dt, Ct] = $(!1), [zt, et] = $(!1), [It, Ft] = $(""), [ut, At] = $(""), jt = (s) => ({
685
685
  id: s.id,
686
686
  title: s.name,
687
687
  image: s.image ?? "",
688
688
  price: s.price ?? 0
689
- }), [rt, P] = z([]), _ = Ft(null), v = Rt((s) => s.store.store), ut = Rt((s) => s.product.product);
690
- M(() => {
689
+ }), [K, b] = $([]), rt = xt(null), k = Rt((s) => s.store.store), Wt = Rt((s) => s.product.product);
690
+ B(() => {
691
691
  const s = localStorage.getItem(
692
692
  `access_token_${t.siteId}`
693
- ), w = localStorage.getItem(
693
+ ), m = localStorage.getItem(
694
694
  `chat-token-${t.siteId}`
695
695
  );
696
- if (s && w === s) {
696
+ if (s && m === s) {
697
697
  const h = localStorage.getItem("chatHistory");
698
- h && P(JSON.parse(h));
698
+ h && b(JSON.parse(h));
699
699
  } else
700
700
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
701
701
  `chat-token-${t.siteId}`,
702
702
  s || ""
703
703
  );
704
- }, []), M(() => {
705
- localStorage.setItem("chatHistory", JSON.stringify(rt));
704
+ }, []), B(() => {
705
+ localStorage.setItem("chatHistory", JSON.stringify(K));
706
706
  const s = localStorage.getItem(
707
707
  `access_token_${t.siteId}`
708
708
  );
709
709
  s && localStorage.setItem(`chat-token-${t.siteId}`, s);
710
- }, [rt]);
711
- const Wt = () => {
712
- W(!0), setTimeout(() => T(!0), 10);
713
- }, jt = () => {
714
- T(!1), setTimeout(() => W(!1), 300);
710
+ }, [K]);
711
+ const Dt = () => {
712
+ _t(!0), setTimeout(() => A(!0), 10);
713
+ }, Lt = () => {
714
+ A(!1), setTimeout(() => _t(!1), 300);
715
715
  };
716
- M(() => {
717
- C ? Wt() : jt();
718
- }, [C]);
719
- const Dt = (s) => {
720
- zt(n[s]);
716
+ B(() => {
717
+ _ ? Dt() : Lt();
718
+ }, [_]);
719
+ const M = (s) => {
720
+ At(n[s]);
721
721
  };
722
- M(() => {
723
- _.current && (_.current.scrollTop += 150);
724
- }, [rt]);
725
- let $ = null, pt = null;
726
- const Lt = async () => {
727
- if ($ && pt && Date.now() < pt)
728
- return $;
722
+ B(() => {
723
+ rt.current && (rt.current.scrollTop += 150);
724
+ }, [K]);
725
+ let ot = null, pt = null;
726
+ const S = async () => {
727
+ if (ot && pt && Date.now() < pt)
728
+ return ot;
729
729
  try {
730
- const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", w = new URLSearchParams({
730
+ const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", m = new URLSearchParams({
731
731
  grant_type: "client_credentials",
732
732
  client_id: "4i8rd70sgt961tc4dhskgf08c",
733
733
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
@@ -737,56 +737,51 @@ const nt = (t) => {
737
737
  headers: {
738
738
  "Content-Type": "application/x-www-form-urlencoded"
739
739
  },
740
- body: w
740
+ body: m
741
741
  });
742
742
  if (!h.ok)
743
743
  throw new Error(
744
744
  `Token request failed! status: ${h.status}`
745
745
  );
746
746
  const g = await h.json();
747
- $ = g.access_token;
747
+ ot = g.access_token;
748
748
  const p = g.expires_in || 3600;
749
- return pt = Date.now() + (p - 60) * 1e3, $;
749
+ return pt = Date.now() + (p - 60) * 1e3, ot;
750
750
  } catch (s) {
751
- return console.error("Error obtaining JWT token:", s), $ = null, pt = null, null;
751
+ return console.error("Error obtaining JWT token:", s), ot = null, pt = null, null;
752
752
  }
753
- }, S = async () => {
754
- const s = await Ot();
755
- s != null && y(s);
753
+ }, J = async () => {
754
+ const s = await $t();
755
+ s != null && v(s);
756
756
  };
757
- M(() => {
757
+ B(() => {
758
758
  if (t != null && t.siteId) {
759
- const { clientID: s, host: w, organizationID: h, shortCode: g, siteId: p } = t;
760
- sessionStorage.setItem("Host", w), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(s)), sessionStorage.setItem("envRef", g), sessionStorage.setItem("orgRef", h);
759
+ const { clientID: s, host: m, organizationID: h, shortCode: g, siteId: p } = t;
760
+ sessionStorage.setItem("Host", m), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(s)), sessionStorage.setItem("envRef", g), sessionStorage.setItem("orgRef", h);
761
761
  }
762
- S(), console.log("scapi environment v1");
763
- }, []), M(() => {
764
- e && (console.log("setting the basket id", e), nt(e));
765
- }, [e]), M(() => {
766
- const s = async () => {
767
- k(!1);
768
- };
769
- return window.addEventListener("reactCartUpdated", s), () => window.removeEventListener("reactCartUpdated", s);
770
- }, []);
771
- const G = async () => {
762
+ J(), console.log("scapi environment v1");
763
+ }, []), B(() => {
764
+ e && (console.log("setting the basket id", e), at(e));
765
+ }, [e]);
766
+ const Nt = async () => {
772
767
  const s = JSON.parse(
773
768
  sessionStorage.getItem("customerData") || "{}"
774
769
  ).customerId;
775
- return (await Sr(s || "")).c_interests;
776
- }, It = async (s, w) => {
777
- console.log("in secondary flow", Nt);
778
- const h = await G();
779
- if (console.log(h, "interests of customer", Nt), !!h)
770
+ return (await _r(s || "")).c_interests;
771
+ }, W = async (s, m) => {
772
+ console.log("in secondary flow", Et);
773
+ const h = await Nt();
774
+ if (console.log(h, "interests of customer", Et), !!h)
780
775
  try {
781
- P(
782
- (q) => q.map(
783
- (V, Y) => Y === q.length - 1 ? { ...V, secondaryLoading: !0 } : V
776
+ b(
777
+ (L) => L.map(
778
+ (H, R) => R === L.length - 1 ? { ...H, secondaryLoading: !0 } : H
784
779
  )
785
780
  );
786
- const g = await Lt();
781
+ const g = await S();
787
782
  if (!g) throw new Error("Failed to fetch token");
788
- const p = localStorage.getItem("customerNumber"), m = localStorage.getItem("isLoggedIn"), ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
789
- registered: String(m || !1),
783
+ const p = localStorage.getItem("customerNumber"), w = localStorage.getItem("isLoggedIn"), ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
784
+ registered: String(w || !1),
790
785
  userId: String(p || (/* @__PURE__ */ new Date()).getTime())
791
786
  }).toString()}`, ht = JSON.stringify({
792
787
  flowId: "Q166PR519W",
@@ -794,10 +789,10 @@ const nt = (t) => {
794
789
  input: {
795
790
  loyaltyPoints: "",
796
791
  productName: s,
797
- productPoints: String(w || 0),
792
+ productPoints: String(m || 0),
798
793
  interests: h
799
794
  }
800
- }), B = await fetch(ft, {
795
+ }), j = await fetch(ft, {
801
796
  signal: AbortSignal.timeout(3e4),
802
797
  method: "POST",
803
798
  headers: {
@@ -806,49 +801,49 @@ const nt = (t) => {
806
801
  },
807
802
  body: ht
808
803
  });
809
- if (!B.body) throw new Error("Readable stream not supported");
810
- const mt = B.body.getReader(), wt = new TextDecoder();
811
- let U = "";
804
+ if (!j.body) throw new Error("Readable stream not supported");
805
+ const mt = j.body.getReader(), wt = new TextDecoder();
806
+ let D = "";
812
807
  for (; ; ) {
813
- const { done: q, value: V } = await mt.read();
814
- if (q) break;
815
- U += wt.decode(V, { stream: !0 });
816
- const Y = U.split(`
808
+ const { done: L, value: H } = await mt.read();
809
+ if (L) break;
810
+ D += wt.decode(H, { stream: !0 });
811
+ const R = D.split(`
817
812
  `);
818
- U = Y.pop() || "";
819
- for (const X of Y)
820
- if (X.startsWith("data:")) {
821
- const f = X.slice(5).trim();
813
+ D = R.pop() || "";
814
+ for (const G of R)
815
+ if (G.startsWith("data:")) {
816
+ const f = G.slice(5).trim();
822
817
  try {
823
- const K = JSON.parse(f);
824
- K.index === 0 && P(
818
+ const V = JSON.parse(f);
819
+ V.index === 0 && b(
825
820
  (I) => I.map(
826
- (O, Q) => Q === I.length - 1 ? {
827
- ...O,
828
- secondaryResponse: K.data,
821
+ (P, X) => X === I.length - 1 ? {
822
+ ...P,
823
+ secondaryResponse: V.data,
829
824
  secondaryLoading: !1
830
- } : O
825
+ } : P
831
826
  )
832
827
  );
833
- } catch (K) {
834
- P(
828
+ } catch (V) {
829
+ b(
835
830
  (I) => I.map(
836
- (O, Q) => Q === I.length - 1 ? { ...O, secondaryLoading: !1 } : O
831
+ (P, X) => X === I.length - 1 ? { ...P, secondaryLoading: !1 } : P
837
832
  )
838
- ), console.error("Secondary flow JSON parse error:", K);
833
+ ), console.error("Secondary flow JSON parse error:", V);
839
834
  }
840
835
  }
841
836
  }
842
837
  } catch (g) {
843
838
  console.error("Secondary flow error:", g);
844
839
  }
845
- }, L = async (s) => {
846
- const w = s || _t.trim();
847
- if (w) {
848
- St(!0), Ct(""), c.current = null, l.current = null, d.current = null, i.current = null, P((h) => [
840
+ }, Gt = async (s) => {
841
+ const m = s || It.trim();
842
+ if (m) {
843
+ Ct(!0), Ft(""), c.current = null, l.current = null, d.current = null, i.current = null, b((h) => [
849
844
  ...h,
850
845
  {
851
- query: w,
846
+ query: m,
852
847
  response: "Thinking for what suits you best...",
853
848
  potentialQuestions: "",
854
849
  products: [],
@@ -856,8 +851,8 @@ const nt = (t) => {
856
851
  }
857
852
  ]);
858
853
  try {
859
- const h = dt, g = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), m = await Lt();
860
- if (!m)
854
+ const h = ut, g = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), w = await S();
855
+ if (!w)
861
856
  throw new Error("Failed to obtain access token");
862
857
  const ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
863
858
  registered: String(p || !1),
@@ -866,42 +861,42 @@ const nt = (t) => {
866
861
  flowId: "MMHQKYI1NE",
867
862
  flowAliasId: "SZF9ZK1ATE",
868
863
  input: {
869
- userPrompt: w,
864
+ userPrompt: m,
870
865
  whom: h
871
866
  }
872
- }), B = await fetch(ft, {
867
+ }), j = await fetch(ft, {
873
868
  signal: AbortSignal.timeout(3e4),
874
869
  method: "POST",
875
870
  headers: {
876
871
  "Content-Type": "application/json",
877
- Authorization: `Bearer ${m}`
872
+ Authorization: `Bearer ${w}`
878
873
  },
879
874
  body: ht
880
875
  });
881
- if (!B.ok)
882
- throw new Error(`HTTP error! status: ${B.status}`);
883
- if (!B.body) throw new Error("Readable stream not supported");
884
- const mt = B.body.getReader(), wt = new TextDecoder();
885
- let U = "", q = "";
876
+ if (!j.ok)
877
+ throw new Error(`HTTP error! status: ${j.status}`);
878
+ if (!j.body) throw new Error("Readable stream not supported");
879
+ const mt = j.body.getReader(), wt = new TextDecoder();
880
+ let D = "", L = "";
886
881
  for (; ; ) {
887
882
  et(!0);
888
- const { done: V, value: Y } = await mt.read();
889
- if (V) break;
890
- U += wt.decode(Y, { stream: !0 });
891
- const X = U.split(`
883
+ const { done: H, value: R } = await mt.read();
884
+ if (H) break;
885
+ D += wt.decode(R, { stream: !0 });
886
+ const G = D.split(`
892
887
  `);
893
- U = X.pop() || "";
894
- for (const f of X)
888
+ D = G.pop() || "";
889
+ for (const f of G)
895
890
  if (f.startsWith("data:")) {
896
- const K = f.slice(5).trim();
891
+ const V = f.slice(5).trim();
897
892
  try {
898
- const I = JSON.parse(K);
899
- I.index == 1 && (q = I.data), P(
900
- (O) => O.map(
901
- (Q, Bt) => Bt === O.length - 1 ? {
902
- ...Q,
893
+ const I = JSON.parse(V);
894
+ I.index == 1 && (L = I.data), b(
895
+ (P) => P.map(
896
+ (X, Bt) => Bt === P.length - 1 ? {
897
+ ...X,
903
898
  [I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
904
- } : Q
899
+ } : X
905
900
  )
906
901
  );
907
902
  } catch (I) {
@@ -909,58 +904,58 @@ const nt = (t) => {
909
904
  }
910
905
  }
911
906
  }
912
- or(rr(q));
907
+ nr(or(L));
913
908
  } catch (h) {
914
909
  console.error("Error sending message to Tanya:", h);
915
910
  } finally {
916
- St(!1);
911
+ Ct(!1);
917
912
  }
918
913
  }
919
- }, rr = (s) => {
920
- const w = s.match(
914
+ }, or = (s) => {
915
+ const m = s.match(
921
916
  /top five relevant product or category names are: (.*)/i
922
- ), p = (w ? w[1] : s).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
917
+ ), p = (m ? m[1] : s).split(", ").map((z) => z.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
923
918
  return [...new Set(p)].filter(Boolean).join(",");
924
- }, or = async (s) => {
919
+ }, nr = async (s) => {
925
920
  if (typeof s == "string") {
926
921
  console.log(s, "keywords");
927
- const w = s.split(",");
928
- for (const h of w) {
929
- const g = await xe(h);
930
- if (et(!1), (g == null ? void 0 : g.length) > 0 && (P(
922
+ const m = s.split(",");
923
+ for (const h of m) {
924
+ const g = await ye(h);
925
+ if (et(!1), (g == null ? void 0 : g.length) > 0 && (b(
931
926
  (p) => p.map(
932
- (m, A) => A === p.length - 1 ? {
933
- ...m,
927
+ (w, z) => z === p.length - 1 ? {
928
+ ...w,
934
929
  products: [
935
- ...m.products || [],
930
+ ...w.products || [],
936
931
  { keyword: h, items: g, loading: !1 }
937
932
  ]
938
- } : m
933
+ } : w
939
934
  )
940
935
  ), !c.current || l.current == null)) {
941
936
  const p = g[0];
942
937
  c.current = String((p == null ? void 0 : p.product_name) ?? ""), d.current = p.image.link, l.current = p.product_id;
943
- const m = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
944
- i.current = typeof m == "number" && Number.isFinite(m) ? m : null;
938
+ const w = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
939
+ i.current = typeof w == "number" && Number.isFinite(w) ? w : null;
945
940
  }
946
941
  }
947
942
  } else
948
- for (const w of s) {
949
- const h = await xe(w);
950
- et(!1), (h == null ? void 0 : h.length) > 0 && P(
943
+ for (const m of s) {
944
+ const h = await ye(m);
945
+ et(!1), (h == null ? void 0 : h.length) > 0 && b(
951
946
  (g) => g.map(
952
- (p, m) => m === g.length - 1 ? {
947
+ (p, w) => w === g.length - 1 ? {
953
948
  ...p,
954
949
  products: [
955
950
  ...p.products || [],
956
- { keyword: w, items: h, loading: !1 }
951
+ { keyword: m, items: h, loading: !1 }
957
952
  ]
958
953
  } : p
959
954
  )
960
955
  );
961
956
  }
962
957
  if (c.current) {
963
- P(
958
+ b(
964
959
  (h) => h.map(
965
960
  (g, p) => p === h.length - 1 ? {
966
961
  ...g,
@@ -975,119 +970,121 @@ const nt = (t) => {
975
970
  } : g
976
971
  )
977
972
  );
978
- const w = JSON.parse(
973
+ const m = JSON.parse(
979
974
  sessionStorage.getItem("customerData") || "{}"
980
975
  );
981
- (w == null ? void 0 : w.isGuest) == !1 ? (console.log("running secondary flow", Nt), It(c.current, 0)) : console.log("not running secondary flow", Nt);
976
+ (m == null ? void 0 : m.isGuest) == !1 ? (console.log("running secondary flow", Et), W(c.current, 0)) : console.log("not running secondary flow", Et);
982
977
  }
983
978
  et(!1);
984
- }, nr = async (s, w) => {
985
- var h, g, p, m, A, ft, ht, B, mt, wt, U, q, V, Y, X;
986
- R(!0);
979
+ }, ar = async (s, m) => {
980
+ var h, g, p, w, z, ft, ht, j, mt, wt, D, L, H, R, G;
981
+ q(!0);
987
982
  try {
988
- const f = await Re(s.id);
989
- if (!((g = (h = f == null ? void 0 : f.variants) == null ? void 0 : h[0]) != null && g.product_id || (m = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && m.productId) && !(f.type.item || f.type.bundle)) {
990
- R(!1), H.error("Variants not found", {
983
+ const f = await Ve(s.id);
984
+ if (!((g = (h = f == null ? void 0 : f.variants) == null ? void 0 : h[0]) != null && g.product_id || (w = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && w.productId) && !(f.type.item || f.type.bundle)) {
985
+ q(!1), U.error("Variants not found", {
991
986
  position: "bottom-right",
992
987
  autoClose: 1e3
993
988
  }), console.error("No product variant found");
994
989
  return;
995
990
  }
996
- const K = [
991
+ const V = [
997
992
  {
998
- product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
999
- quantity: w
993
+ product_id: ((z = f.variants) == null ? void 0 : z[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
994
+ quantity: m
1000
995
  }
1001
996
  ];
1002
- console.log(K, "product data", "app version", Nt);
997
+ console.log(V, "product data", "app version", Et);
1003
998
  const I = JSON.parse(
1004
999
  sessionStorage.getItem("customerData") || "{}"
1005
- ), O = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), Q = !1, Bt = localStorage.getItem(Pt), we = Date.now();
1006
- if (!Q || !Bt || we >= parseInt(Bt)) {
1007
- const ar = await Me();
1008
- let { customer_token: gt } = await He(
1009
- ar
1000
+ ), P = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), X = !1, Bt = localStorage.getItem(Ot), ge = Date.now();
1001
+ if (!X || !Bt || ge >= parseInt(Bt)) {
1002
+ const ir = await He();
1003
+ let { customer_token: gt } = await Re(
1004
+ ir
1010
1005
  );
1011
- if (gt = "Bearer " + x.access_token, !gt) {
1006
+ if (gt = "Bearer " + y.access_token, !gt) {
1012
1007
  console.error("Failed to get customer_token");
1013
1008
  return;
1014
1009
  }
1015
- const ir = we + 300 * 1e3;
1016
- if (Kt(gt), localStorage.setItem(Pt, ir.toString()), console.log(O, "basketIdFromCustomer"), O) {
1017
- const ge = await Ye({
1018
- basketId: O,
1010
+ const sr = ge + 300 * 1e3;
1011
+ if (Kt(gt), localStorage.setItem(Ot, sr.toString()), console.log(P, "basketIdFromCustomer"), P) {
1012
+ const be = await Ke({
1013
+ basketId: P,
1019
1014
  customer_token: gt
1020
1015
  });
1021
- if (ge.status === 200 && ge) {
1022
- const Gt = await ne(
1023
- O,
1024
- K,
1016
+ if (be.status === 200 && be) {
1017
+ const Xt = await ae(
1018
+ P,
1019
+ V,
1025
1020
  gt
1026
1021
  );
1027
- ((ht = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : ht.length) > 0 && (H.success("Added to cart", {
1022
+ ((ht = Xt == null ? void 0 : Xt.product_items) == null ? void 0 : ht.length) > 0 && (U.success("Added to cart", {
1028
1023
  position: "bottom-right",
1029
1024
  autoClose: 3e3,
1030
1025
  hideProgressBar: !1,
1031
1026
  closeOnClick: !0,
1032
1027
  pauseOnHover: !0,
1033
1028
  draggable: !0
1034
- }), Vt(O), R(!1));
1029
+ }), Vt(P), q(!1));
1035
1030
  return;
1036
1031
  }
1037
1032
  }
1038
- const sr = {
1033
+ const lr = {
1039
1034
  productItems: [
1040
1035
  {
1041
- productId: ((B = f.variants) == null ? void 0 : B[0].product_id) || ((mt = f.variants) == null ? void 0 : mt[0].productId) || (f == null ? void 0 : f.id),
1036
+ productId: ((j = f.variants) == null ? void 0 : j[0].product_id) || ((mt = f.variants) == null ? void 0 : mt[0].productId) || (f == null ? void 0 : f.id),
1042
1037
  quantity: 1
1043
1038
  }
1044
1039
  ]
1045
- }, b = await Ve(gt, sr);
1040
+ }, x = await Ye(gt, lr);
1046
1041
  if (console.log(
1047
- b,
1048
- b == null ? void 0 : b.basket_id,
1049
- b == null ? void 0 : b.basketId,
1042
+ x,
1043
+ x == null ? void 0 : x.basket_id,
1044
+ x == null ? void 0 : x.basketId,
1050
1045
  "the basket response"
1051
- ), !(b != null && b.basket_id || !(b != null && b.basketId))) {
1052
- R(!1), console.error("Failed to create basket");
1046
+ ), !(x != null && x.basket_id || !(x != null && x.basketId))) {
1047
+ q(!1), console.error("Failed to create basket");
1053
1048
  return;
1054
1049
  }
1055
- nt(
1056
- (b == null ? void 0 : b.basket_id) || (b == null ? void 0 : b.basketId)
1050
+ at(
1051
+ (x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
1057
1052
  );
1058
1053
  const bt = await r(
1059
1054
  {
1060
1055
  productId: l,
1061
- quantity: w
1056
+ quantity: m
1062
1057
  },
1063
- (b == null ? void 0 : b.basket_id) || (b == null ? void 0 : b.basketId)
1058
+ (x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
1064
1059
  );
1065
- (((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((U = bt == null ? void 0 : bt.productItems) == null ? void 0 : U.length) > 0) && H.success("Added to cart", {
1060
+ (((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((D = bt == null ? void 0 : bt.productItems) == null ? void 0 : D.length) > 0) && U.success("Added to cart", {
1066
1061
  position: "bottom-right",
1067
1062
  autoClose: 3e3,
1068
1063
  hideProgressBar: !1,
1069
1064
  closeOnClick: !0,
1070
1065
  pauseOnHover: !0,
1071
1066
  draggable: !0
1072
- }), Vt(b.basket_id || (b == null ? void 0 : b.basketId));
1067
+ }), Vt(x.basket_id || (x == null ? void 0 : x.basketId));
1073
1068
  }
1074
1069
  } catch (f) {
1075
- R(!1), console.error("Error adding to cart:", f), H.error("Failed to add product to cart", {
1070
+ q(!1), console.error("Error adding to cart:", f), U.error("Failed to add product to cart", {
1076
1071
  position: "bottom-right",
1077
1072
  autoClose: 3e3
1078
- }), ((q = f == null ? void 0 : f.response) == null ? void 0 : q.status) === 404 || // Basket not found
1079
- ((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && nt(null), ((X = f == null ? void 0 : f.response) == null ? void 0 : X.status) === 401 && (nt(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), H.error("Failed to add product to cart", {
1073
+ }), ((L = f == null ? void 0 : f.response) == null ? void 0 : L.status) === 404 || // Basket not found
1074
+ ((H = f == null ? void 0 : f.response) == null ? void 0 : H.status) === 401 ? (((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 404 && at(null), ((G = f == null ? void 0 : f.response) == null ? void 0 : G.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), U.error("Failed to add product to cart", {
1080
1075
  position: "bottom-right",
1081
1076
  autoClose: 3e3
1082
1077
  }));
1083
1078
  }
1084
- R(!1);
1079
+ q(!1);
1085
1080
  };
1086
- return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(vr, { open: C, onOpenChange: k, children: [
1081
+ return B(() => {
1082
+ C.current && C.current.scrollIntoView({ behavior: "smooth" });
1083
+ }, [C.current]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(kr, { open: _, onOpenChange: O, children: [
1087
1084
  /* @__PURE__ */ a(
1088
- kr,
1085
+ Sr,
1089
1086
  {
1090
- onClick: () => k(!0),
1087
+ onClick: () => O(!0),
1091
1088
  style: {
1092
1089
  // background: storeDetails.tanyaThemeColor,
1093
1090
  },
@@ -1147,12 +1144,12 @@ const nt = (t) => {
1147
1144
  ) })
1148
1145
  }
1149
1146
  ),
1150
- D && /* @__PURE__ */ u(re, { children: [
1147
+ tt && /* @__PURE__ */ u(oe, { children: [
1151
1148
  /* @__PURE__ */ a(
1152
1149
  "div",
1153
1150
  {
1154
1151
  className: "fixed inset-0 z-40 bg-black/30",
1155
- onClick: () => k(!1)
1152
+ onClick: () => O(!1)
1156
1153
  }
1157
1154
  ),
1158
1155
  /* @__PURE__ */ u(
@@ -1163,9 +1160,9 @@ const nt = (t) => {
1163
1160
  top-0 right-0
1164
1161
  transition-transform duration-300 ease-in-out
1165
1162
  lg:transform
1166
- ${j ? "lg:translate-x-0" : "lg:translate-x-full"}
1163
+ ${T ? "lg:translate-x-0" : "lg:translate-x-full"}
1167
1164
  // For mobile: animate from bottom
1168
- ${j ? "translate-y-0" : "translate-y-full"}
1165
+ ${T ? "translate-y-0" : "translate-y-full"}
1169
1166
  lg:translate-y-0
1170
1167
  `,
1171
1168
  style: {
@@ -1182,7 +1179,7 @@ const nt = (t) => {
1182
1179
  {
1183
1180
  style: {
1184
1181
  display: "flex",
1185
- color: v.tanyaThemeContrastColor,
1182
+ color: k.tanyaThemeContrastColor,
1186
1183
  alignItems: "center",
1187
1184
  gap: "0.5rem"
1188
1185
  },
@@ -1243,7 +1240,7 @@ const nt = (t) => {
1243
1240
  gap: "1.25rem",
1244
1241
  margin: "0.75rem"
1245
1242
  },
1246
- children: /* @__PURE__ */ a("button", { onClick: () => k(!1), children: /* @__PURE__ */ u(
1243
+ children: /* @__PURE__ */ a("button", { onClick: () => O(!1), children: /* @__PURE__ */ u(
1247
1244
  "svg",
1248
1245
  {
1249
1246
  width: "24",
@@ -1295,15 +1292,15 @@ const nt = (t) => {
1295
1292
  /* @__PURE__ */ u(
1296
1293
  "div",
1297
1294
  {
1298
- className: `flex flex-col h-full ${ut ? "lg:w-2/3 w-full" : "w-full"}`,
1295
+ className: `flex flex-col h-full ${Wt ? "lg:w-2/3 w-full" : "w-full"}`,
1299
1296
  children: [
1300
1297
  /* @__PURE__ */ u(
1301
1298
  "div",
1302
1299
  {
1303
- ref: _,
1300
+ ref: rt,
1304
1301
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1305
1302
  children: [
1306
- (v == null ? void 0 : v.whomRequired) && /* @__PURE__ */ u(
1303
+ (k == null ? void 0 : k.whomRequired) && /* @__PURE__ */ u(
1307
1304
  "div",
1308
1305
  {
1309
1306
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
@@ -1312,11 +1309,11 @@ const nt = (t) => {
1312
1309
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: o.map((s) => /* @__PURE__ */ a(
1313
1310
  "button",
1314
1311
  {
1315
- onClick: () => Dt(s),
1312
+ onClick: () => M(s),
1316
1313
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1317
1314
  style: {
1318
- backgroundColor: dt === n[s] ? "#FFFFFF" : "#F3F3F3",
1319
- borderColor: dt === n[s] ? "#BBB3DD" : ""
1315
+ backgroundColor: ut === n[s] ? "#FFFFFF" : "#F3F3F3",
1316
+ borderColor: ut === n[s] ? "#BBB3DD" : ""
1320
1317
  },
1321
1318
  children: s
1322
1319
  },
@@ -1325,16 +1322,23 @@ const nt = (t) => {
1325
1322
  ]
1326
1323
  }
1327
1324
  ),
1328
- rt.map((s, w) => {
1325
+ K.map((s, m) => {
1329
1326
  var h, g;
1330
1327
  return /* @__PURE__ */ u("div", { children: [
1331
- /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: s.query }) }),
1328
+ /* @__PURE__ */ a(
1329
+ "div",
1330
+ {
1331
+ className: "flex justify-end",
1332
+ ref: m == K.length - 1 ? C : null,
1333
+ children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: s.query })
1334
+ }
1335
+ ),
1332
1336
  s.response && s.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1333
1337
  "div",
1334
1338
  {
1335
1339
  className: "font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1336
1340
  dangerouslySetInnerHTML: {
1337
- __html: Xt(s.response)
1341
+ __html: Qt(s.response)
1338
1342
  }
1339
1343
  }
1340
1344
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1342,16 +1346,16 @@ const nt = (t) => {
1342
1346
  {
1343
1347
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1344
1348
  dangerouslySetInnerHTML: {
1345
- __html: Xt(s.response)
1349
+ __html: Qt(s.response)
1346
1350
  }
1347
1351
  }
1348
1352
  ) }),
1349
- $t && !s.response.includes("Thinking") && ((h = s.products) == null ? void 0 : h.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1353
+ zt && !s.response.includes("Thinking") && ((h = s.products) == null ? void 0 : h.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1350
1354
  (s == null ? void 0 : s.products) && ((g = s == null ? void 0 : s.products) == null ? void 0 : g.length) > 0 && /* @__PURE__ */ a(
1351
- Nr,
1355
+ Er,
1352
1356
  {
1353
1357
  chat: s.products,
1354
- storeDetails: v
1358
+ storeDetails: k
1355
1359
  }
1356
1360
  ),
1357
1361
  s.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
@@ -1359,21 +1363,21 @@ const nt = (t) => {
1359
1363
  "p",
1360
1364
  {
1361
1365
  className: "font-nunitoSans font-bold text-sm text-[#494949]",
1362
- style: { color: v.themeDarkColor },
1366
+ style: { color: k.themeDarkColor },
1363
1367
  children: "Why not explore these inquiries..."
1364
1368
  }
1365
1369
  ),
1366
- s.potentialQuestions.split(",").map((p, m) => /* @__PURE__ */ a(
1370
+ s.potentialQuestions.split(",").map((p, w) => /* @__PURE__ */ a(
1367
1371
  "button",
1368
1372
  {
1369
- className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${v.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1370
- onClick: () => L(p),
1373
+ className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1374
+ onClick: () => Gt(p),
1371
1375
  style: {
1372
- backgroundColor: v.tanyaThemeColorLight
1376
+ backgroundColor: k.tanyaThemeColorLight
1373
1377
  },
1374
1378
  children: p
1375
1379
  },
1376
- m
1380
+ w
1377
1381
  ))
1378
1382
  ] }),
1379
1383
  s.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
@@ -1394,7 +1398,7 @@ const nt = (t) => {
1394
1398
  "p",
1395
1399
  {
1396
1400
  className: "font-semibold tanya-pulse",
1397
- style: { color: v.themeDarkColor },
1401
+ style: { color: k.themeDarkColor },
1398
1402
  children: "I’ve found a special surprise crafted just for you… hang on a sec!"
1399
1403
  }
1400
1404
  ),
@@ -1402,23 +1406,23 @@ const nt = (t) => {
1402
1406
  "p",
1403
1407
  {
1404
1408
  className: "tanya-dots mt-1",
1405
- style: { color: v.themeDarkColor },
1409
+ style: { color: k.themeDarkColor },
1406
1410
  children: "• • •"
1407
1411
  }
1408
1412
  )
1409
1413
  ]
1410
1414
  }
1411
1415
  ) }),
1412
- s.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1416
+ s.secondaryResponse && /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1413
1417
  /* @__PURE__ */ a(
1414
1418
  "div",
1415
1419
  {
1416
1420
  className: "text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",
1417
1421
  style: {
1418
- backgroundColor: v.tanyaThemeColorLight
1422
+ backgroundColor: k.tanyaThemeColorLight
1419
1423
  },
1420
1424
  dangerouslySetInnerHTML: {
1421
- __html: Xt(
1425
+ __html: Qt(
1422
1426
  s.secondaryResponse
1423
1427
  )
1424
1428
  }
@@ -1430,7 +1434,7 @@ const nt = (t) => {
1430
1434
  {
1431
1435
  className: "flex gap-4 items-stretch rounded-2xl p-4",
1432
1436
  style: {
1433
- backgroundColor: v.tanyaThemeColorLight
1437
+ backgroundColor: k.tanyaThemeColorLight
1434
1438
  },
1435
1439
  children: [
1436
1440
  /* @__PURE__ */ a(
@@ -1457,7 +1461,7 @@ const nt = (t) => {
1457
1461
  /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: s.productSnapshot.name }),
1458
1462
  /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: s.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1459
1463
  style: "currency",
1460
- currency: (v == null ? void 0 : v.currency) || "USD"
1464
+ currency: (k == null ? void 0 : k.currency) || "USD"
1461
1465
  }).format(
1462
1466
  s.productSnapshot.price
1463
1467
  ) : "" }),
@@ -1477,23 +1481,23 @@ const nt = (t) => {
1477
1481
  "button",
1478
1482
  {
1479
1483
  className: "px-3 py-1 text-sm",
1480
- onClick: () => P(
1484
+ onClick: () => b(
1481
1485
  (p) => p.map(
1482
- (m, A) => A === w && m.productSnapshot ? {
1483
- ...m,
1486
+ (w, z) => z === m && w.productSnapshot ? {
1487
+ ...w,
1484
1488
  productSnapshot: {
1485
- ...m.productSnapshot,
1489
+ ...w.productSnapshot,
1486
1490
  quantity: Math.max(
1487
1491
  1,
1488
- m.productSnapshot.quantity - 1
1492
+ w.productSnapshot.quantity - 1
1489
1493
  )
1490
1494
  }
1491
- } : m
1495
+ } : w
1492
1496
  )
1493
1497
  ),
1494
1498
  style: {
1495
1499
  background: "transparent",
1496
- color: v.themeDarkColor
1500
+ color: k.themeDarkColor
1497
1501
  },
1498
1502
  children: "−"
1499
1503
  }
@@ -1503,20 +1507,20 @@ const nt = (t) => {
1503
1507
  "button",
1504
1508
  {
1505
1509
  className: "px-3 py-1 text-sm",
1506
- onClick: () => P(
1510
+ onClick: () => b(
1507
1511
  (p) => p.map(
1508
- (m, A) => A === w && m.productSnapshot ? {
1509
- ...m,
1512
+ (w, z) => z === m && w.productSnapshot ? {
1513
+ ...w,
1510
1514
  productSnapshot: {
1511
- ...m.productSnapshot,
1512
- quantity: m.productSnapshot.quantity + 1
1515
+ ...w.productSnapshot,
1516
+ quantity: w.productSnapshot.quantity + 1
1513
1517
  }
1514
- } : m
1518
+ } : w
1515
1519
  )
1516
1520
  ),
1517
1521
  style: {
1518
1522
  background: "transparent",
1519
- color: v.themeDarkColor
1523
+ color: k.themeDarkColor
1520
1524
  },
1521
1525
  children: "+"
1522
1526
  }
@@ -1526,21 +1530,21 @@ const nt = (t) => {
1526
1530
  "button",
1527
1531
  {
1528
1532
  onClick: () => {
1529
- nr(
1530
- At(
1533
+ ar(
1534
+ jt(
1531
1535
  s.productSnapshot
1532
1536
  ),
1533
1537
  s.productSnapshot.quantity
1534
1538
  );
1535
1539
  },
1536
- disabled: lt,
1540
+ disabled: ct,
1537
1541
  className: "px-4 py-2 rounded-full font-medium",
1538
1542
  style: {
1539
- background: v.tanyaThemeColor,
1540
- color: (v == null ? void 0 : v.tanyaThemeContrastColor) || "#fff",
1541
- opacity: lt ? 0.8 : 1
1543
+ background: k.tanyaThemeColor,
1544
+ color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
1545
+ opacity: ct ? 0.8 : 1
1542
1546
  },
1543
- children: lt ? "Adding..." : "Add to cart"
1547
+ children: ct ? "Adding..." : "Add to cart"
1544
1548
  }
1545
1549
  )
1546
1550
  ] })
@@ -1550,7 +1554,7 @@ const nt = (t) => {
1550
1554
  ) })
1551
1555
  ] }) }),
1552
1556
  /* @__PURE__ */ a("div", { className: "mb-20" })
1553
- ] }, w);
1557
+ ] }, m);
1554
1558
  })
1555
1559
  ]
1556
1560
  }
@@ -1568,11 +1572,11 @@ const nt = (t) => {
1568
1572
  {
1569
1573
  className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
1570
1574
  placeholder: "How can I help you...",
1571
- value: _t,
1575
+ value: It,
1572
1576
  autoFocus: !0,
1573
- onChange: (s) => Ct(s.target.value),
1577
+ onChange: (s) => Ft(s.target.value),
1574
1578
  onKeyDown: (s) => {
1575
- s.key === "Enter" && !ct && L();
1579
+ s.key === "Enter" && !dt && Gt();
1576
1580
  }
1577
1581
  }
1578
1582
  ),
@@ -1580,16 +1584,16 @@ const nt = (t) => {
1580
1584
  "button",
1581
1585
  {
1582
1586
  type: "submit",
1583
- disabled: ct,
1587
+ disabled: dt,
1584
1588
  className: "p-3",
1585
- onClick: () => L(),
1586
- children: ct ? /* @__PURE__ */ a(
1589
+ onClick: () => Gt(),
1590
+ children: dt ? /* @__PURE__ */ a(
1587
1591
  "div",
1588
1592
  {
1589
1593
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
1590
1594
  style: {
1591
1595
  borderBottom: "2px solid",
1592
- color: v.tanyaThemeColor
1596
+ color: k.tanyaThemeColor
1593
1597
  }
1594
1598
  }
1595
1599
  ) : /* @__PURE__ */ a(
@@ -1617,7 +1621,7 @@ const nt = (t) => {
1617
1621
  ]
1618
1622
  }
1619
1623
  ),
1620
- /* @__PURE__ */ a(Tr, { addToCartPwa: r })
1624
+ /* @__PURE__ */ a(Pr, { addToCartPwa: r })
1621
1625
  ] })
1622
1626
  ]
1623
1627
  }
@@ -1625,32 +1629,32 @@ const nt = (t) => {
1625
1629
  ] })
1626
1630
  ] }) });
1627
1631
  };
1628
- var ae = function(t, e) {
1629
- return ae = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, o) {
1632
+ var ie = function(t, e) {
1633
+ return ie = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, o) {
1630
1634
  r.__proto__ = o;
1631
1635
  } || function(r, o) {
1632
1636
  for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1633
- }, ae(t, e);
1637
+ }, ie(t, e);
1634
1638
  };
1635
- function Or(t, e) {
1639
+ function $r(t, e) {
1636
1640
  if (typeof e != "function" && e !== null)
1637
1641
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1638
- ae(t, e);
1642
+ ie(t, e);
1639
1643
  function r() {
1640
1644
  this.constructor = t;
1641
1645
  }
1642
1646
  t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
1643
1647
  }
1644
- var Z = function() {
1645
- return Z = Object.assign || function(e) {
1648
+ var Q = function() {
1649
+ return Q = Object.assign || function(e) {
1646
1650
  for (var r, o = 1, n = arguments.length; o < n; o++) {
1647
1651
  r = arguments[o];
1648
1652
  for (var c in r) Object.prototype.hasOwnProperty.call(r, c) && (e[c] = r[c]);
1649
1653
  }
1650
1654
  return e;
1651
- }, Z.apply(this, arguments);
1655
+ }, Q.apply(this, arguments);
1652
1656
  };
1653
- function $r(t, e) {
1657
+ function zr(t, e) {
1654
1658
  var r = {};
1655
1659
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
1656
1660
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1658,28 +1662,28 @@ function $r(t, e) {
1658
1662
  e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
1659
1663
  return r;
1660
1664
  }
1661
- var Qt = "Invariant Violation", Ie = Object.setPrototypeOf, zr = Ie === void 0 ? function(t, e) {
1665
+ var Zt = "Invariant Violation", Fe = Object.setPrototypeOf, Ar = Fe === void 0 ? function(t, e) {
1662
1666
  return t.__proto__ = e, t;
1663
- } : Ie, Ke = (
1667
+ } : Fe, Je = (
1664
1668
  /** @class */
1665
1669
  (function(t) {
1666
- Or(e, t);
1670
+ $r(e, t);
1667
1671
  function e(r) {
1668
- r === void 0 && (r = Qt);
1669
- var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1670
- return o.framesToPop = 1, o.name = Qt, zr(o, e.prototype), o;
1672
+ r === void 0 && (r = Zt);
1673
+ var o = t.call(this, typeof r == "number" ? Zt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1674
+ return o.framesToPop = 1, o.name = Zt, Ar(o, e.prototype), o;
1671
1675
  }
1672
1676
  return e;
1673
1677
  })(Error)
1674
1678
  );
1675
- function ot(t, e) {
1679
+ function nt(t, e) {
1676
1680
  if (!t)
1677
- throw new Ke(e);
1681
+ throw new Je(e);
1678
1682
  }
1679
- var Je = ["debug", "log", "warn", "error", "silent"], Ar = Je.indexOf("log");
1683
+ var We = ["debug", "log", "warn", "error", "silent"], jr = We.indexOf("log");
1680
1684
  function Ut(t) {
1681
1685
  return function() {
1682
- if (Je.indexOf(t) >= Ar) {
1686
+ if (We.indexOf(t) >= jr) {
1683
1687
  var e = console[t] || console.log;
1684
1688
  return e.apply(console, arguments);
1685
1689
  }
@@ -1687,21 +1691,21 @@ function Ut(t) {
1687
1691
  }
1688
1692
  (function(t) {
1689
1693
  t.debug = Ut("debug"), t.log = Ut("log"), t.warn = Ut("warn"), t.error = Ut("error");
1690
- })(ot || (ot = {}));
1691
- var We = "3.14.0";
1692
- function xt(t) {
1694
+ })(nt || (nt = {}));
1695
+ var Ge = "3.14.0";
1696
+ function yt(t) {
1693
1697
  try {
1694
1698
  return t();
1695
1699
  } catch {
1696
1700
  }
1697
1701
  }
1698
- const ie = xt(function() {
1702
+ const se = yt(function() {
1699
1703
  return globalThis;
1700
- }) || xt(function() {
1704
+ }) || yt(function() {
1701
1705
  return window;
1702
- }) || xt(function() {
1706
+ }) || yt(function() {
1703
1707
  return self;
1704
- }) || xt(function() {
1708
+ }) || yt(function() {
1705
1709
  return global;
1706
1710
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1707
1711
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1709,16 +1713,16 @@ const ie = xt(function() {
1709
1713
  // detect syntactic usage of the Function constructor. If you think you can
1710
1714
  // improve your static analysis to detect this obfuscation, think again. This
1711
1715
  // is an arms race you cannot win, at least not in JavaScript.
1712
- xt(function() {
1713
- return xt.constructor("return this")();
1716
+ yt(function() {
1717
+ return yt.constructor("return this")();
1714
1718
  });
1715
- var Fe = /* @__PURE__ */ new Map();
1716
- function jr(t) {
1717
- var e = Fe.get(t) || 1;
1718
- return Fe.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1719
+ var Ne = /* @__PURE__ */ new Map();
1720
+ function Dr(t) {
1721
+ var e = Ne.get(t) || 1;
1722
+ return Ne.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1719
1723
  }
1720
- function Dr(t, e) {
1721
- var r = jr("stringifyForDisplay");
1724
+ function Lr(t, e) {
1725
+ var r = Dr("stringifyForDisplay");
1722
1726
  return JSON.stringify(t, function(o, n) {
1723
1727
  return n === void 0 ? r : n;
1724
1728
  }, e).split(JSON.stringify(r)).join("<undefined>");
@@ -1729,49 +1733,49 @@ function qt(t) {
1729
1733
  r[o - 1] = arguments[o];
1730
1734
  if (typeof e == "number") {
1731
1735
  var n = e;
1732
- e = ce(n), e || (e = de(n, r), r = []);
1736
+ e = de(n), e || (e = ue(n, r), r = []);
1733
1737
  }
1734
1738
  t.apply(void 0, [e].concat(r));
1735
1739
  };
1736
1740
  }
1737
- var Zt = Object.assign(function(e, r) {
1741
+ var te = Object.assign(function(e, r) {
1738
1742
  for (var o = [], n = 2; n < arguments.length; n++)
1739
1743
  o[n - 2] = arguments[n];
1740
- e || ot(e, ce(r, o) || de(r, o));
1744
+ e || nt(e, de(r, o) || ue(r, o));
1741
1745
  }, {
1742
- debug: qt(ot.debug),
1743
- log: qt(ot.log),
1744
- warn: qt(ot.warn),
1745
- error: qt(ot.error)
1746
+ debug: qt(nt.debug),
1747
+ log: qt(nt.log),
1748
+ warn: qt(nt.warn),
1749
+ error: qt(nt.error)
1746
1750
  });
1747
- function Ge(t) {
1751
+ function Xe(t) {
1748
1752
  for (var e = [], r = 1; r < arguments.length; r++)
1749
1753
  e[r - 1] = arguments[r];
1750
- return new Ke(ce(t, e) || de(t, e));
1754
+ return new Je(de(t, e) || ue(t, e));
1751
1755
  }
1752
- var Ne = Symbol.for("ApolloErrorMessageHandler_" + We);
1753
- function Xe(t) {
1756
+ var Ee = Symbol.for("ApolloErrorMessageHandler_" + Ge);
1757
+ function Qe(t) {
1754
1758
  if (typeof t == "string")
1755
1759
  return t;
1756
1760
  try {
1757
- return Dr(t, 2).slice(0, 1e3);
1761
+ return Lr(t, 2).slice(0, 1e3);
1758
1762
  } catch {
1759
1763
  return "<non-serializable>";
1760
1764
  }
1761
1765
  }
1762
- function ce(t, e) {
1766
+ function de(t, e) {
1763
1767
  if (e === void 0 && (e = []), !!t)
1764
- return ie[Ne] && ie[Ne](t, e.map(Xe));
1768
+ return se[Ee] && se[Ee](t, e.map(Qe));
1765
1769
  }
1766
- function de(t, e) {
1770
+ function ue(t, e) {
1767
1771
  if (e === void 0 && (e = []), !!t)
1768
1772
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1769
- version: We,
1773
+ version: Ge,
1770
1774
  message: t,
1771
- args: e.map(Xe)
1775
+ args: e.map(Qe)
1772
1776
  })));
1773
1777
  }
1774
- function Lr(t) {
1778
+ function Br(t) {
1775
1779
  return t.definitions.filter(function(e) {
1776
1780
  return e.kind === "OperationDefinition" && !!e.name;
1777
1781
  }).map(function(e) {
@@ -1779,13 +1783,13 @@ function Lr(t) {
1779
1783
  })[0] || null;
1780
1784
  }
1781
1785
  let F = null;
1782
- const Ee = {};
1783
- let Br = 1;
1784
- const Ur = () => class {
1786
+ const Te = {};
1787
+ let Ur = 1;
1788
+ const qr = () => class {
1785
1789
  constructor() {
1786
1790
  this.id = [
1787
1791
  "slot",
1788
- Br++,
1792
+ Ur++,
1789
1793
  Date.now(),
1790
1794
  Math.random().toString(36).slice(2)
1791
1795
  ].join(":");
@@ -1794,11 +1798,11 @@ const Ur = () => class {
1794
1798
  for (let e = F; e; e = e.parent)
1795
1799
  if (this.id in e.slots) {
1796
1800
  const r = e.slots[this.id];
1797
- if (r === Ee)
1801
+ if (r === Te)
1798
1802
  break;
1799
1803
  return e !== F && (F.slots[this.id] = r), !0;
1800
1804
  }
1801
- return F && (F.slots[this.id] = Ee), !1;
1805
+ return F && (F.slots[this.id] = Te), !1;
1802
1806
  }
1803
1807
  getValue() {
1804
1808
  if (this.hasValue())
@@ -1842,27 +1846,27 @@ const Ur = () => class {
1842
1846
  return e.apply(o, r);
1843
1847
  }
1844
1848
  };
1845
- function Te(t) {
1849
+ function Pe(t) {
1846
1850
  try {
1847
1851
  return t();
1848
1852
  } catch {
1849
1853
  }
1850
1854
  }
1851
- const te = "@wry/context:Slot", qr = (
1855
+ const ee = "@wry/context:Slot", Mr = (
1852
1856
  // Prefer globalThis when available.
1853
1857
  // https://github.com/benjamn/wryware/issues/347
1854
- Te(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1858
+ Pe(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1855
1859
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1856
1860
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1857
- Te(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1861
+ Pe(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1858
1862
  // back to using the Array constructor as a namespace, but that was flagged in
1859
1863
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1860
1864
  /* @__PURE__ */ Object.create(null)
1861
- ), Pe = qr, ue = Pe[te] || // Earlier versions of this package stored the globalKey property on the Array
1865
+ ), Oe = Mr, pe = Oe[ee] || // Earlier versions of this package stored the globalKey property on the Array
1862
1866
  // constructor, so we check there as well, to prevent Slot class duplication.
1863
- Array[te] || (function(t) {
1867
+ Array[ee] || (function(t) {
1864
1868
  try {
1865
- Object.defineProperty(Pe, te, {
1869
+ Object.defineProperty(Oe, ee, {
1866
1870
  value: t,
1867
1871
  enumerable: !1,
1868
1872
  writable: !1,
@@ -1877,12 +1881,12 @@ Array[te] || (function(t) {
1877
1881
  } finally {
1878
1882
  return t;
1879
1883
  }
1880
- })(Ur()), { bind: Co, noContext: Io } = ue;
1881
- new ue();
1882
- function Mr(t, e) {
1884
+ })(qr()), { bind: Io, noContext: Fo } = pe;
1885
+ new pe();
1886
+ function Hr(t, e) {
1883
1887
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1884
1888
  if (r) return (r = r.call(t)).next.bind(r);
1885
- if (Array.isArray(t) || (r = Hr(t)) || e) {
1889
+ if (Array.isArray(t) || (r = Rr(t)) || e) {
1886
1890
  r && (t = r);
1887
1891
  var o = 0;
1888
1892
  return function() {
@@ -1892,38 +1896,38 @@ function Mr(t, e) {
1892
1896
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1893
1897
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1894
1898
  }
1895
- function Hr(t, e) {
1899
+ function Rr(t, e) {
1896
1900
  if (t) {
1897
- if (typeof t == "string") return Oe(t, e);
1901
+ if (typeof t == "string") return $e(t, e);
1898
1902
  var r = Object.prototype.toString.call(t).slice(8, -1);
1899
1903
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
1900
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
1904
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return $e(t, e);
1901
1905
  }
1902
1906
  }
1903
- function Oe(t, e) {
1907
+ function $e(t, e) {
1904
1908
  (e == null || e > t.length) && (e = t.length);
1905
1909
  for (var r = 0, o = new Array(e); r < e; r++)
1906
1910
  o[r] = t[r];
1907
1911
  return o;
1908
1912
  }
1909
- function $e(t, e) {
1913
+ function ze(t, e) {
1910
1914
  for (var r = 0; r < e.length; r++) {
1911
1915
  var o = e[r];
1912
1916
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1913
1917
  }
1914
1918
  }
1915
- function pe(t, e, r) {
1916
- return e && $e(t.prototype, e), r && $e(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1919
+ function fe(t, e, r) {
1920
+ return e && ze(t.prototype, e), r && ze(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1917
1921
  }
1918
- var fe = function() {
1922
+ var he = function() {
1919
1923
  return typeof Symbol == "function";
1920
- }, he = function(t) {
1921
- return fe() && !!Symbol[t];
1922
1924
  }, me = function(t) {
1923
- return he(t) ? Symbol[t] : "@@" + t;
1925
+ return he() && !!Symbol[t];
1926
+ }, we = function(t) {
1927
+ return me(t) ? Symbol[t] : "@@" + t;
1924
1928
  };
1925
- fe() && !he("observable") && (Symbol.observable = Symbol("observable"));
1926
- var Rr = me("iterator"), se = me("observable"), Qe = me("species");
1929
+ he() && !me("observable") && (Symbol.observable = Symbol("observable"));
1930
+ var Vr = we("iterator"), le = we("observable"), Ze = we("species");
1927
1931
  function Jt(t, e) {
1928
1932
  var r = t[e];
1929
1933
  if (r != null) {
@@ -1931,15 +1935,15 @@ function Jt(t, e) {
1931
1935
  return r;
1932
1936
  }
1933
1937
  }
1934
- function Et(t) {
1938
+ function Tt(t) {
1935
1939
  var e = t.constructor;
1936
- return e !== void 0 && (e = e[Qe], e === null && (e = void 0)), e !== void 0 ? e : N;
1940
+ return e !== void 0 && (e = e[Ze], e === null && (e = void 0)), e !== void 0 ? e : N;
1937
1941
  }
1938
- function Vr(t) {
1942
+ function Yr(t) {
1939
1943
  return t instanceof N;
1940
1944
  }
1941
- function vt(t) {
1942
- vt.log ? vt.log(t) : setTimeout(function() {
1945
+ function kt(t) {
1946
+ kt.log ? kt.log(t) : setTimeout(function() {
1943
1947
  throw t;
1944
1948
  });
1945
1949
  }
@@ -1948,11 +1952,11 @@ function Ht(t) {
1948
1952
  try {
1949
1953
  t();
1950
1954
  } catch (e) {
1951
- vt(e);
1955
+ kt(e);
1952
1956
  }
1953
1957
  });
1954
1958
  }
1955
- function Ze(t) {
1959
+ function tr(t) {
1956
1960
  var e = t._cleanup;
1957
1961
  if (e !== void 0 && (t._cleanup = void 0, !!e))
1958
1962
  try {
@@ -1963,21 +1967,21 @@ function Ze(t) {
1963
1967
  r && r.call(e);
1964
1968
  }
1965
1969
  } catch (o) {
1966
- vt(o);
1970
+ kt(o);
1967
1971
  }
1968
1972
  }
1969
- function le(t) {
1973
+ function ce(t) {
1970
1974
  t._observer = void 0, t._queue = void 0, t._state = "closed";
1971
1975
  }
1972
- function Yr(t) {
1976
+ function Kr(t) {
1973
1977
  var e = t._queue;
1974
1978
  if (e) {
1975
1979
  t._queue = void 0, t._state = "ready";
1976
- for (var r = 0; r < e.length && (tr(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1980
+ for (var r = 0; r < e.length && (er(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1977
1981
  ;
1978
1982
  }
1979
1983
  }
1980
- function tr(t, e, r) {
1984
+ function er(t, e, r) {
1981
1985
  t._state = "running";
1982
1986
  var o = t._observer;
1983
1987
  try {
@@ -1987,19 +1991,19 @@ function tr(t, e, r) {
1987
1991
  n && n.call(o, r);
1988
1992
  break;
1989
1993
  case "error":
1990
- if (le(t), n) n.call(o, r);
1994
+ if (ce(t), n) n.call(o, r);
1991
1995
  else throw r;
1992
1996
  break;
1993
1997
  case "complete":
1994
- le(t), n && n.call(o);
1998
+ ce(t), n && n.call(o);
1995
1999
  break;
1996
2000
  }
1997
2001
  } catch (c) {
1998
- vt(c);
2002
+ kt(c);
1999
2003
  }
2000
- t._state === "closed" ? Ze(t) : t._state === "running" && (t._state = "ready");
2004
+ t._state === "closed" ? tr(t) : t._state === "running" && (t._state = "ready");
2001
2005
  }
2002
- function ee(t, e, r) {
2006
+ function re(t, e, r) {
2003
2007
  if (t._state !== "closed") {
2004
2008
  if (t._state === "buffering") {
2005
2009
  t._queue.push({
@@ -2013,17 +2017,17 @@ function ee(t, e, r) {
2013
2017
  type: e,
2014
2018
  value: r
2015
2019
  }], Ht(function() {
2016
- return Yr(t);
2020
+ return Kr(t);
2017
2021
  });
2018
2022
  return;
2019
2023
  }
2020
- tr(t, e, r);
2024
+ er(t, e, r);
2021
2025
  }
2022
2026
  }
2023
- var Kr = /* @__PURE__ */ (function() {
2027
+ var Jr = /* @__PURE__ */ (function() {
2024
2028
  function t(r, o) {
2025
2029
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
2026
- var n = new Jr(this);
2030
+ var n = new Wr(this);
2027
2031
  try {
2028
2032
  this._cleanup = o.call(void 0, n);
2029
2033
  } catch (c) {
@@ -2033,25 +2037,25 @@ var Kr = /* @__PURE__ */ (function() {
2033
2037
  }
2034
2038
  var e = t.prototype;
2035
2039
  return e.unsubscribe = function() {
2036
- this._state !== "closed" && (le(this), Ze(this));
2037
- }, pe(t, [{
2040
+ this._state !== "closed" && (ce(this), tr(this));
2041
+ }, fe(t, [{
2038
2042
  key: "closed",
2039
2043
  get: function() {
2040
2044
  return this._state === "closed";
2041
2045
  }
2042
2046
  }]), t;
2043
- })(), Jr = /* @__PURE__ */ (function() {
2047
+ })(), Wr = /* @__PURE__ */ (function() {
2044
2048
  function t(r) {
2045
2049
  this._subscription = r;
2046
2050
  }
2047
2051
  var e = t.prototype;
2048
2052
  return e.next = function(o) {
2049
- ee(this._subscription, "next", o);
2053
+ re(this._subscription, "next", o);
2050
2054
  }, e.error = function(o) {
2051
- ee(this._subscription, "error", o);
2055
+ re(this._subscription, "error", o);
2052
2056
  }, e.complete = function() {
2053
- ee(this._subscription, "complete");
2054
- }, pe(t, [{
2057
+ re(this._subscription, "complete");
2058
+ }, fe(t, [{
2055
2059
  key: "closed",
2056
2060
  get: function() {
2057
2061
  return this._subscription._state === "closed";
@@ -2069,7 +2073,7 @@ var Kr = /* @__PURE__ */ (function() {
2069
2073
  next: o,
2070
2074
  error: arguments[1],
2071
2075
  complete: arguments[2]
2072
- }), new Kr(o, this._subscriber);
2076
+ }), new Jr(o, this._subscriber);
2073
2077
  }, e.forEach = function(o) {
2074
2078
  var n = this;
2075
2079
  return new Promise(function(c, l) {
@@ -2081,11 +2085,11 @@ var Kr = /* @__PURE__ */ (function() {
2081
2085
  i.unsubscribe(), c();
2082
2086
  }
2083
2087
  var i = n.subscribe({
2084
- next: function(x) {
2088
+ next: function(y) {
2085
2089
  try {
2086
- o(x, d);
2087
- } catch (y) {
2088
- l(y), i.unsubscribe();
2090
+ o(y, d);
2091
+ } catch (v) {
2092
+ l(v), i.unsubscribe();
2089
2093
  }
2090
2094
  },
2091
2095
  error: l,
@@ -2095,7 +2099,7 @@ var Kr = /* @__PURE__ */ (function() {
2095
2099
  }, e.map = function(o) {
2096
2100
  var n = this;
2097
2101
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2098
- var c = Et(this);
2102
+ var c = Tt(this);
2099
2103
  return new c(function(l) {
2100
2104
  return n.subscribe({
2101
2105
  next: function(d) {
@@ -2117,7 +2121,7 @@ var Kr = /* @__PURE__ */ (function() {
2117
2121
  }, e.filter = function(o) {
2118
2122
  var n = this;
2119
2123
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2120
- var c = Et(this);
2124
+ var c = Tt(this);
2121
2125
  return new c(function(l) {
2122
2126
  return n.subscribe({
2123
2127
  next: function(d) {
@@ -2139,115 +2143,115 @@ var Kr = /* @__PURE__ */ (function() {
2139
2143
  }, e.reduce = function(o) {
2140
2144
  var n = this;
2141
2145
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2142
- var c = Et(this), l = arguments.length > 1, d = !1, i = arguments[1], x = i;
2143
- return new c(function(y) {
2146
+ var c = Tt(this), l = arguments.length > 1, d = !1, i = arguments[1], y = i;
2147
+ return new c(function(v) {
2144
2148
  return n.subscribe({
2145
2149
  next: function(C) {
2146
- var k = !d;
2147
- if (d = !0, !k || l)
2150
+ var _ = !d;
2151
+ if (d = !0, !_ || l)
2148
2152
  try {
2149
- x = o(x, C);
2150
- } catch (j) {
2151
- return y.error(j);
2153
+ y = o(y, C);
2154
+ } catch (O) {
2155
+ return v.error(O);
2152
2156
  }
2153
2157
  else
2154
- x = C;
2158
+ y = C;
2155
2159
  },
2156
2160
  error: function(C) {
2157
- y.error(C);
2161
+ v.error(C);
2158
2162
  },
2159
2163
  complete: function() {
2160
- if (!d && !l) return y.error(new TypeError("Cannot reduce an empty sequence"));
2161
- y.next(x), y.complete();
2164
+ if (!d && !l) return v.error(new TypeError("Cannot reduce an empty sequence"));
2165
+ v.next(y), v.complete();
2162
2166
  }
2163
2167
  });
2164
2168
  });
2165
2169
  }, e.concat = function() {
2166
2170
  for (var o = this, n = arguments.length, c = new Array(n), l = 0; l < n; l++)
2167
2171
  c[l] = arguments[l];
2168
- var d = Et(this);
2172
+ var d = Tt(this);
2169
2173
  return new d(function(i) {
2170
- var x, y = 0;
2171
- function C(k) {
2172
- x = k.subscribe({
2173
- next: function(j) {
2174
- i.next(j);
2174
+ var y, v = 0;
2175
+ function C(_) {
2176
+ y = _.subscribe({
2177
+ next: function(O) {
2178
+ i.next(O);
2175
2179
  },
2176
- error: function(j) {
2177
- i.error(j);
2180
+ error: function(O) {
2181
+ i.error(O);
2178
2182
  },
2179
2183
  complete: function() {
2180
- y === c.length ? (x = void 0, i.complete()) : C(d.from(c[y++]));
2184
+ v === c.length ? (y = void 0, i.complete()) : C(d.from(c[v++]));
2181
2185
  }
2182
2186
  });
2183
2187
  }
2184
2188
  return C(o), function() {
2185
- x && (x.unsubscribe(), x = void 0);
2189
+ y && (y.unsubscribe(), y = void 0);
2186
2190
  };
2187
2191
  });
2188
2192
  }, e.flatMap = function(o) {
2189
2193
  var n = this;
2190
2194
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2191
- var c = Et(this);
2195
+ var c = Tt(this);
2192
2196
  return new c(function(l) {
2193
2197
  var d = [], i = n.subscribe({
2194
- next: function(y) {
2198
+ next: function(v) {
2195
2199
  if (o)
2196
2200
  try {
2197
- y = o(y);
2198
- } catch (k) {
2199
- return l.error(k);
2201
+ v = o(v);
2202
+ } catch (_) {
2203
+ return l.error(_);
2200
2204
  }
2201
- var C = c.from(y).subscribe({
2202
- next: function(k) {
2203
- l.next(k);
2205
+ var C = c.from(v).subscribe({
2206
+ next: function(_) {
2207
+ l.next(_);
2204
2208
  },
2205
- error: function(k) {
2206
- l.error(k);
2209
+ error: function(_) {
2210
+ l.error(_);
2207
2211
  },
2208
2212
  complete: function() {
2209
- var k = d.indexOf(C);
2210
- k >= 0 && d.splice(k, 1), x();
2213
+ var _ = d.indexOf(C);
2214
+ _ >= 0 && d.splice(_, 1), y();
2211
2215
  }
2212
2216
  });
2213
2217
  d.push(C);
2214
2218
  },
2215
- error: function(y) {
2216
- l.error(y);
2219
+ error: function(v) {
2220
+ l.error(v);
2217
2221
  },
2218
2222
  complete: function() {
2219
- x();
2223
+ y();
2220
2224
  }
2221
2225
  });
2222
- function x() {
2226
+ function y() {
2223
2227
  i.closed && d.length === 0 && l.complete();
2224
2228
  }
2225
2229
  return function() {
2226
- d.forEach(function(y) {
2227
- return y.unsubscribe();
2230
+ d.forEach(function(v) {
2231
+ return v.unsubscribe();
2228
2232
  }), i.unsubscribe();
2229
2233
  };
2230
2234
  });
2231
- }, e[se] = function() {
2235
+ }, e[le] = function() {
2232
2236
  return this;
2233
2237
  }, t.from = function(o) {
2234
2238
  var n = typeof this == "function" ? this : t;
2235
2239
  if (o == null) throw new TypeError(o + " is not an object");
2236
- var c = Jt(o, se);
2240
+ var c = Jt(o, le);
2237
2241
  if (c) {
2238
2242
  var l = c.call(o);
2239
2243
  if (Object(l) !== l) throw new TypeError(l + " is not an object");
2240
- return Vr(l) && l.constructor === n ? l : new n(function(d) {
2244
+ return Yr(l) && l.constructor === n ? l : new n(function(d) {
2241
2245
  return l.subscribe(d);
2242
2246
  });
2243
2247
  }
2244
- if (he("iterator") && (c = Jt(o, Rr), c))
2248
+ if (me("iterator") && (c = Jt(o, Vr), c))
2245
2249
  return new n(function(d) {
2246
2250
  Ht(function() {
2247
2251
  if (!d.closed) {
2248
- for (var i = Mr(c.call(o)), x; !(x = i()).done; ) {
2249
- var y = x.value;
2250
- if (d.next(y), d.closed) return;
2252
+ for (var i = Hr(c.call(o)), y; !(y = i()).done; ) {
2253
+ var v = y.value;
2254
+ if (d.next(v), d.closed) return;
2251
2255
  }
2252
2256
  d.complete();
2253
2257
  }
@@ -2277,21 +2281,21 @@ var Kr = /* @__PURE__ */ (function() {
2277
2281
  }
2278
2282
  });
2279
2283
  });
2280
- }, pe(t, null, [{
2281
- key: Qe,
2284
+ }, fe(t, null, [{
2285
+ key: Ze,
2282
2286
  get: function() {
2283
2287
  return this;
2284
2288
  }
2285
2289
  }]), t;
2286
2290
  })();
2287
- fe() && Object.defineProperty(N, Symbol("extensions"), {
2291
+ he() && Object.defineProperty(N, Symbol("extensions"), {
2288
2292
  value: {
2289
- symbol: se,
2290
- hostReportError: vt
2293
+ symbol: le,
2294
+ hostReportError: kt
2291
2295
  },
2292
2296
  configurable: !0
2293
2297
  });
2294
- function Wr(t) {
2298
+ function Gr(t) {
2295
2299
  var e, r = t.Symbol;
2296
2300
  if (typeof r == "function")
2297
2301
  if (r.observable)
@@ -2307,14 +2311,14 @@ function Wr(t) {
2307
2311
  e = "@@observable";
2308
2312
  return e;
2309
2313
  }
2310
- var yt;
2311
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2312
- Wr(yt);
2313
- var ze = N.prototype, Ae = "@@observable";
2314
- ze[Ae] || (ze[Ae] = function() {
2314
+ var vt;
2315
+ typeof self < "u" ? vt = self : typeof window < "u" ? vt = window : typeof global < "u" ? vt = global : typeof module < "u" ? vt = module : vt = Function("return this")();
2316
+ Gr(vt);
2317
+ var Ae = N.prototype, je = "@@observable";
2318
+ Ae[je] || (Ae[je] = function() {
2315
2319
  return this;
2316
2320
  });
2317
- function Gr(t) {
2321
+ function Xr(t) {
2318
2322
  for (var e = [
2319
2323
  "query",
2320
2324
  "operationName",
@@ -2324,15 +2328,15 @@ function Gr(t) {
2324
2328
  ], r = 0, o = Object.keys(t); r < o.length; r++) {
2325
2329
  var n = o[r];
2326
2330
  if (e.indexOf(n) < 0)
2327
- throw Ge(58, n);
2331
+ throw Xe(58, n);
2328
2332
  }
2329
2333
  return t;
2330
2334
  }
2331
- function Xr(t, e) {
2332
- var r = Z({}, t), o = function(c) {
2333
- typeof c == "function" ? r = Z(Z({}, r), c(r)) : r = Z(Z({}, r), c);
2335
+ function Qr(t, e) {
2336
+ var r = Q({}, t), o = function(c) {
2337
+ typeof c == "function" ? r = Q(Q({}, r), c(r)) : r = Q(Q({}, r), c);
2334
2338
  }, n = function() {
2335
- return Z({}, r);
2339
+ return Q({}, r);
2336
2340
  };
2337
2341
  return Object.defineProperty(e, "setContext", {
2338
2342
  enumerable: !1,
@@ -2342,32 +2346,32 @@ function Xr(t, e) {
2342
2346
  value: n
2343
2347
  }), e;
2344
2348
  }
2345
- function Qr(t) {
2349
+ function Zr(t) {
2346
2350
  var e = {
2347
2351
  variables: t.variables || {},
2348
2352
  extensions: t.extensions || {},
2349
2353
  operationName: t.operationName,
2350
2354
  query: t.query
2351
2355
  };
2352
- return e.operationName || (e.operationName = typeof e.query != "string" ? Lr(e.query) || void 0 : ""), e;
2356
+ return e.operationName || (e.operationName = typeof e.query != "string" ? Br(e.query) || void 0 : ""), e;
2353
2357
  }
2354
- var Zr = Symbol.for("apollo.deprecations"), to = ie, eo = new ue();
2355
- function ro(t) {
2356
- return to[Zr] || (eo.getValue() || []).includes(t);
2358
+ var to = Symbol.for("apollo.deprecations"), eo = se, ro = new pe();
2359
+ function oo(t) {
2360
+ return eo[to] || (ro.getValue() || []).includes(t);
2357
2361
  }
2358
- function oo(t, e) {
2359
- ro(t) || e();
2362
+ function no(t, e) {
2363
+ oo(t) || e();
2360
2364
  }
2361
- function je(t, e) {
2365
+ function De(t, e) {
2362
2366
  return e ? e(t) : N.of();
2363
2367
  }
2364
- function Tt(t) {
2365
- return typeof t == "function" ? new er(t) : t;
2368
+ function Pt(t) {
2369
+ return typeof t == "function" ? new rr(t) : t;
2366
2370
  }
2367
2371
  function Mt(t) {
2368
2372
  return t.request.length <= 1;
2369
2373
  }
2370
- var er = (
2374
+ var rr = (
2371
2375
  /** @class */
2372
2376
  (function() {
2373
2377
  function t(e) {
@@ -2378,23 +2382,23 @@ var er = (
2378
2382
  return N.of();
2379
2383
  });
2380
2384
  }, t.from = function(e) {
2381
- return e.length === 0 ? t.empty() : e.map(Tt).reduce(function(r, o) {
2385
+ return e.length === 0 ? t.empty() : e.map(Pt).reduce(function(r, o) {
2382
2386
  return r.concat(o);
2383
2387
  });
2384
2388
  }, t.split = function(e, r, o) {
2385
- var n = Tt(r), c = Tt(o || new t(je)), l;
2389
+ var n = Pt(r), c = Pt(o || new t(De)), l;
2386
2390
  return Mt(n) && Mt(c) ? l = new t(function(d) {
2387
2391
  return e(d) ? n.request(d) || N.of() : c.request(d) || N.of();
2388
2392
  }) : l = new t(function(d, i) {
2389
2393
  return e(d) ? n.request(d, i) || N.of() : c.request(d, i) || N.of();
2390
2394
  }), Object.assign(l, { left: n, right: c });
2391
2395
  }, t.execute = function(e, r) {
2392
- return e.request(Xr(r.context, Qr(Gr(r)))) || N.of();
2396
+ return e.request(Qr(r.context, Zr(Xr(r)))) || N.of();
2393
2397
  }, t.concat = function(e, r) {
2394
- var o = Tt(e);
2398
+ var o = Pt(e);
2395
2399
  if (Mt(o))
2396
- return globalThis.__DEV__ !== !1 && Zt.warn(47, o), o;
2397
- var n = Tt(r), c;
2400
+ return globalThis.__DEV__ !== !1 && te.warn(47, o), o;
2401
+ var n = Pt(r), c;
2398
2402
  return Mt(n) ? c = new t(function(l) {
2399
2403
  return o.request(l, function(d) {
2400
2404
  return n.request(d) || N.of();
@@ -2405,25 +2409,25 @@ var er = (
2405
2409
  }) || N.of();
2406
2410
  }), Object.assign(c, { left: o, right: n });
2407
2411
  }, t.prototype.split = function(e, r, o) {
2408
- return this.concat(t.split(e, r, o || new t(je)));
2412
+ return this.concat(t.split(e, r, o || new t(De)));
2409
2413
  }, t.prototype.concat = function(e) {
2410
2414
  return t.concat(this, e);
2411
2415
  }, t.prototype.request = function(e, r) {
2412
- throw Ge(48);
2416
+ throw Xe(48);
2413
2417
  }, t.prototype.onError = function(e, r) {
2414
- if (globalThis.__DEV__ !== !1 && oo("onError", function() {
2415
- globalThis.__DEV__ !== !1 && Zt.warn(49);
2418
+ if (globalThis.__DEV__ !== !1 && no("onError", function() {
2419
+ globalThis.__DEV__ !== !1 && te.warn(49);
2416
2420
  }), r && r.error)
2417
2421
  return r.error(e), !1;
2418
2422
  throw e;
2419
2423
  }, t.prototype.setOnError = function(e) {
2420
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && Zt.warn(50), this.onError = e, this;
2424
+ return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && te.warn(50), this.onError = e, this;
2421
2425
  }, t;
2422
2426
  })()
2423
2427
  );
2424
- function no(t) {
2425
- return new er(function(e, r) {
2426
- var o = $r(e, []);
2428
+ function ao(t) {
2429
+ return new rr(function(e, r) {
2430
+ var o = zr(e, []);
2427
2431
  return new N(function(n) {
2428
2432
  var c, l = !1;
2429
2433
  return Promise.resolve(o).then(function(d) {
@@ -2440,7 +2444,7 @@ function no(t) {
2440
2444
  });
2441
2445
  });
2442
2446
  }
2443
- const ao = async () => {
2447
+ const io = async () => {
2444
2448
  const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", o = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2445
2449
  try {
2446
2450
  const n = await E.post(
@@ -2458,30 +2462,30 @@ const ao = async () => {
2458
2462
  } catch (n) {
2459
2463
  return E.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2460
2464
  }
2461
- }, io = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", so = lr({
2462
- uri: `${io}`
2463
- }), lo = no(async (t, { headers: e }) => {
2464
- const r = await ao();
2465
+ }, so = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", lo = cr({
2466
+ uri: `${so}`
2467
+ }), co = ao(async (t, { headers: e }) => {
2468
+ const r = await io();
2465
2469
  return {
2466
2470
  headers: {
2467
2471
  ...e,
2468
2472
  authorization: `Bearer ${r}`
2469
2473
  }
2470
2474
  };
2471
- }), co = new cr({
2472
- link: lo.concat(so),
2473
- cache: new dr(),
2475
+ }), uo = new dr({
2476
+ link: co.concat(lo),
2477
+ cache: new ur(),
2474
2478
  defaultOptions: {
2475
2479
  watchQuery: {
2476
2480
  fetchPolicy: "cache-and-network"
2477
2481
  }
2478
2482
  }
2479
- }), Fo = (t) => {
2483
+ }), No = (t) => {
2480
2484
  const { tanyaConfig: e } = t;
2481
- return /* @__PURE__ */ a(ur, { client: co, children: /* @__PURE__ */ a(yr, { children: /* @__PURE__ */ a(Pr, { tanyaConfig: e }) }) });
2485
+ return /* @__PURE__ */ a(pr, { client: uo, children: /* @__PURE__ */ a(vr, { children: /* @__PURE__ */ a(Or, { tanyaConfig: e }) }) });
2482
2486
  };
2483
2487
  export {
2484
- Fo as TanyaChatbot,
2485
- ko as TanyaChatbotProvider
2488
+ No as TanyaChatbot,
2489
+ So as TanyaChatbotProvider
2486
2490
  };
2487
2491
  //# sourceMappingURL=tanya-chatbot.es.js.map