tanya-chatbot 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,27 @@
1
- import { useEffect as it, useState as z, useRef as Ft } from "react";
1
+ import { useEffect as tt, useState as $, useRef as _t } from "react";
2
2
  import { jsx as a, jsxs as u, Fragment as re } from "react/jsx-runtime";
3
- import { createHttpLink as sr, ApolloClient as lr, InMemoryCache as cr, ApolloProvider as dr } from "@apollo/client";
4
- import { Provider as ur, useDispatch as Ae, useSelector as Ht } from "react-redux";
5
- import { createSlice as De, configureStore as pr } from "@reduxjs/toolkit";
6
- import * as Le from "@radix-ui/react-popover";
3
+ import { createHttpLink as ar, ApolloClient as ir, InMemoryCache as sr, ApolloProvider as lr } from "@apollo/client";
4
+ import { Provider as cr, useDispatch as je, useSelector as Mt } from "react-redux";
5
+ import { createSlice as De, configureStore as dr } from "@reduxjs/toolkit";
6
+ import * as Ae from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
9
  import T from "axios";
10
10
  import "crypto-js";
11
- import { Icon as ge } from "@iconify/react";
11
+ import { Icon as we } from "@iconify/react";
12
12
  import { toast as M } from "react-toastify";
13
- const fr = '*,: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 vo() {
15
- return it(() => {
13
+ const ur = '*,: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 bo() {
15
+ return tt(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
- return t.textContent = fr, document.head.appendChild(t), () => {
18
+ return t.textContent = ur, document.head.appendChild(t), () => {
19
19
  document.head.removeChild(t);
20
20
  };
21
21
  }
22
22
  }, []), null;
23
23
  }
24
- const mr = {
24
+ const pr = {
25
25
  store: {
26
26
  storeCode: "",
27
27
  storeName: "",
@@ -55,30 +55,30 @@ const mr = {
55
55
  mobile: []
56
56
  }
57
57
  }
58
- }, Be = De({
58
+ }, Le = De({
59
59
  name: "store",
60
- initialState: mr,
60
+ initialState: pr,
61
61
  reducers: {
62
62
  setStore: (t, e) => {
63
63
  t.store = e.payload;
64
64
  }
65
65
  }
66
- }), { setStore: ko } = Be.actions, hr = Be.reducer, wr = {
66
+ }), { setStore: yo } = Le.actions, fr = Le.reducer, mr = {
67
67
  product: null
68
- }, Ue = De({
68
+ }, Be = De({
69
69
  name: "product",
70
- initialState: wr,
70
+ initialState: mr,
71
71
  reducers: {
72
72
  setProduct: (t, e) => {
73
73
  t.product = e.payload;
74
74
  }
75
75
  }
76
- }), { setProduct: oe } = Ue.actions, gr = Ue.reducer, br = pr({
76
+ }), { setProduct: oe } = Be.actions, hr = Be.reducer, wr = dr({
77
77
  reducer: {
78
- store: hr,
79
- product: gr
78
+ store: fr,
79
+ product: hr
80
80
  }
81
- }), xr = ({ children: t }) => /* @__PURE__ */ a(ur, { store: br, children: t }), Vt = (t) => {
81
+ }), gr = ({ children: t }) => /* @__PURE__ */ a(cr, { store: wr, children: t }), Ht = (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 yr({
90
+ function xr({
91
91
  ...t
92
92
  }) {
93
- return /* @__PURE__ */ a(Le.Root, { "data-slot": "popover", ...t });
93
+ return /* @__PURE__ */ a(Ae.Root, { "data-slot": "popover", ...t });
94
94
  }
95
- function vr({
95
+ function br({
96
96
  ...t
97
97
  }) {
98
- return /* @__PURE__ */ a(Le.Trigger, { "data-slot": "popover-trigger", ...t });
98
+ return /* @__PURE__ */ a(Ae.Trigger, { "data-slot": "popover-trigger", ...t });
99
99
  }
100
- const lt = () => ({ 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" }), qe = async () => {
100
+ const yt = () => ({ 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" }), Ue = async () => {
101
101
  const t = "https://tanya-sfcc-server.vercel.app/";
102
102
  try {
103
103
  const e = await T.post(
104
- `${t}api/auth/token-bm-grant?baseUrl=${Q()}&siteId=${H()}`
104
+ `${t}api/auth/token-bm-grant?baseUrl=${rt()}&siteId=${R()}`
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 T.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
109
109
  }
110
- }, Me = async (t) => {
110
+ }, qe = 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 T.post(
114
- `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
115
115
  {},
116
116
  {
117
117
  headers: {
@@ -125,21 +125,21 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
125
125
  return T.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() {
129
- var b;
130
- const t = H(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
128
+ async function Tt() {
129
+ var x;
130
+ const t = R(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
131
131
  console.log(n);
132
- const s = ((b = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : b.isGuest) || !0;
132
+ const l = ((x = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : x.isGuest) || !0;
133
133
  if (o && n && (/* @__PURE__ */ new Date()).getTime() < parseInt(o))
134
134
  return console.log("access token found in local storage"), { access_token: n, expires_in: o };
135
- const { serverUrl: l } = lt(), d = JSON.parse(
135
+ const { serverUrl: c } = yt(), d = JSON.parse(
136
136
  sessionStorage.getItem("customerData") || "{}"
137
137
  ).dwsid, i = JSON.parse(
138
138
  sessionStorage.getItem("customerData") || "{}"
139
139
  ).usrRef;
140
140
  try {
141
- const h = s ? "unregister-auth" : "register-auth", S = await T.get(
142
- `${l}sc-api/${h}?dwsid=${d}&email=${i}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}&siteId=${H()}&token=true`,
141
+ const h = l ? "unregister-auth" : "register-auth", S = await T.get(
142
+ `${c}sc-api/${h}?dwsid=${d}&email=${i}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}&siteId=${R()}&token=true`,
143
143
  {
144
144
  withCredentials: !0
145
145
  }
@@ -147,23 +147,23 @@ async function Ot() {
147
147
  return localStorage.setItem(e, S.data.access_token), localStorage.setItem(
148
148
  r,
149
149
  String((/* @__PURE__ */ new Date()).getTime() + S.data.expires_in * 1e3)
150
- ), localStorage.setItem("isGuest", s ? "true" : "false"), S.data;
150
+ ), localStorage.setItem("isGuest", l ? "true" : "false"), S.data;
151
151
  } catch (h) {
152
152
  console.log(h);
153
153
  }
154
154
  }
155
- const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem("SiteId"), Z = () => sessionStorage.getItem("pubCfg"), tt = () => sessionStorage.getItem("envRef"), et = () => sessionStorage.getItem("orgRef"), be = async (t) => {
155
+ const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getItem("SiteId"), ot = () => sessionStorage.getItem("pubCfg"), nt = () => sessionStorage.getItem("envRef"), at = () => sessionStorage.getItem("orgRef"), ge = async (t) => {
156
156
  console.log("fetching results");
157
- const { serverUrl: e, basePath: r } = lt();
157
+ const { serverUrl: e, basePath: r } = yt();
158
158
  let o = "";
159
159
  {
160
- const n = await Ot();
160
+ const n = await Tt();
161
161
  console.log("the token from getSearchResults", n), o = n.access_token;
162
162
  }
163
163
  try {
164
- const n = Q();
164
+ const n = rt();
165
165
  return (await T.get(
166
- `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
166
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
167
167
  {
168
168
  headers: {
169
169
  "Content-Type": "application/json",
@@ -174,13 +174,13 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
174
174
  } catch (n) {
175
175
  throw console.error("Error fetching search results:", n), n;
176
176
  }
177
- }, He = async (t) => {
177
+ }, Me = async (t) => {
178
178
  if (!t) throw new Error("Product ID is required");
179
- const { serverUrl: e, basePath: r } = lt(), o = Q();
179
+ const { serverUrl: e, basePath: r } = yt(), o = rt();
180
180
  console.log("calling access");
181
- const { access_token: n } = await Ot();
181
+ const { access_token: n } = await Tt();
182
182
  return console.log(n), (await T.get(
183
- `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
183
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
184
184
  {
185
185
  headers: {
186
186
  "Content-Type": "application/json",
@@ -188,24 +188,24 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
188
188
  }
189
189
  }
190
190
  )).data;
191
- }, kr = async (t) => {
191
+ }, yr = async (t) => {
192
192
  if (!t) throw new Error("customerId is required");
193
- const e = await qe(), { customer_token: r } = await Me(
193
+ const e = await Ue(), { customer_token: r } = await qe(
194
194
  e
195
- ), { serverUrl: o, basePath: n } = lt(), l = (await Ot()).access_token;
195
+ ), { serverUrl: o, basePath: n } = yt(), c = (await Tt()).access_token;
196
196
  return (await T.get(
197
- `${o}${n}/get-interest?baseUrl=${Q()}&customerId=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
197
+ `${o}${n}/get-interest?baseUrl=${rt()}&customerId=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
198
198
  {
199
199
  headers: {
200
200
  "Content-Type": "application/json",
201
- Authorization: `Bearer ${l}`
201
+ Authorization: `Bearer ${c}`
202
202
  }
203
203
  }
204
204
  )).data;
205
- }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ye = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), Sr = (t, e) => t.toLocaleString("en-US", {
205
+ }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), be = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), vr = (t, e) => t.toLocaleString("en-US", {
206
206
  style: "currency",
207
207
  currency: e || "USD"
208
- }), ve = (t) => {
208
+ }), ye = (t) => {
209
209
  var e, r, o;
210
210
  return "variants" in t ? {
211
211
  centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
@@ -214,37 +214,37 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
214
214
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
215
215
  currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
216
216
  };
217
- }, Cr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ke = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
217
+ }, kr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ve = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
218
218
  const o = e.match(/^(\d+)\.\s(.+)/);
219
219
  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/>";
220
220
  }).join("");
221
- function _r() {
222
- const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
223
- return it(() => {
221
+ function Sr() {
222
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = $(t);
223
+ return tt(() => {
224
224
  const o = () => r(t());
225
225
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
226
226
  }, []), e;
227
227
  }
228
- const Fr = ({
228
+ const Cr = ({
229
229
  product: t
230
230
  }) => {
231
- const e = Ae(), r = _r(), [o, n] = z(0), s = () => {
231
+ const e = je(), r = Sr(), [o, n] = $(0), l = () => {
232
232
  n(
233
233
  (i) => i + r >= t.length ? 0 : i + r
234
234
  );
235
- }, l = () => {
235
+ }, c = () => {
236
236
  n(
237
237
  (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
238
238
  );
239
239
  }, d = async (i) => {
240
- const b = await He(i);
241
- e(oe(b));
240
+ const x = await Me(i);
241
+ e(oe(x));
242
242
  };
243
243
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
244
244
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
245
245
  "button",
246
246
  {
247
- onClick: l,
247
+ onClick: c,
248
248
  className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
249
249
  style: {
250
250
  height: "30px",
@@ -255,7 +255,7 @@ const Fr = ({
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
258
- var b, h, S, _;
258
+ var x, h, S, _;
259
259
  return /* @__PURE__ */ u(
260
260
  "div",
261
261
  {
@@ -267,7 +267,7 @@ const Fr = ({
267
267
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
268
268
  "img",
269
269
  {
270
- src: ((b = ye(i)[0]) == null ? void 0 : b.link) || ye(i)[0] || // fallback if it's a string
270
+ src: ((x = be(i)[0]) == null ? void 0 : x.link) || be(i)[0] || // fallback if it's a string
271
271
  "https://via.placeholder.com/120",
272
272
  alt: i != null && i.productName ? i.productName : "Product",
273
273
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -279,7 +279,7 @@ const Fr = ({
279
279
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
280
280
  children: [
281
281
  /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
282
- /* @__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 : ke(
282
+ /* @__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 : ve(
283
283
  xe((h = i == null ? void 0 : i.name) == null ? void 0 : h["en-US"]),
284
284
  60
285
285
  ) || "Product" }),
@@ -294,7 +294,7 @@ const Fr = ({
294
294
  marginBottom: "5px",
295
295
  zIndex: 50
296
296
  },
297
- children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
297
+ children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ve(
298
298
  xe((S = i == null ? void 0 : i.name) == null ? void 0 : S["en-US"]),
299
299
  60
300
300
  ) || "Product"
@@ -302,9 +302,9 @@ const Fr = ({
302
302
  )
303
303
  ] }),
304
304
  /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
305
- /* @__PURE__ */ a("p", { children: Sr(
306
- i != null && i.price ? Number(i == null ? void 0 : i.price) : ve(i).centAmount || 0,
307
- (_ = ve(i)) == null ? void 0 : _.currencyCode
305
+ /* @__PURE__ */ a("p", { children: vr(
306
+ i != null && i.price ? Number(i == null ? void 0 : i.price) : ye(i).centAmount || 0,
307
+ (_ = ye(i)) == null ? void 0 : _.currencyCode
308
308
  ) }),
309
309
  /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
310
310
  "$",
@@ -322,7 +322,7 @@ const Fr = ({
322
322
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
323
323
  "button",
324
324
  {
325
- onClick: s,
325
+ onClick: l,
326
326
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
327
327
  style: {
328
328
  height: "30px",
@@ -333,7 +333,7 @@ const Fr = ({
333
333
  }
334
334
  )
335
335
  ] }) });
336
- }, Ir = ({ 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(
336
+ }, _r = ({ 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(
337
337
  "div",
338
338
  {
339
339
  className: "mb-4 p-3 rounded-xl",
@@ -346,11 +346,11 @@ const Fr = ({
346
346
  "div",
347
347
  {
348
348
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
349
- children: Cr(r.keyword) || "No keyword"
349
+ children: kr(r.keyword) || "No keyword"
350
350
  }
351
351
  ),
352
352
  /* @__PURE__ */ a(
353
- Fr,
353
+ Cr,
354
354
  {
355
355
  product: r.items,
356
356
  storeDetails: e
@@ -359,13 +359,13 @@ const Fr = ({
359
359
  ]
360
360
  },
361
361
  o
362
- )) }), Ve = async (t, e) => {
363
- const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
362
+ )) }), He = async (t, e) => {
363
+ const { serverUrl: r, basePath: o } = yt(), n = `${r}`;
364
364
  console.log(`customer_token
365
365
  `, t);
366
366
  try {
367
367
  return (await T.post(
368
- `${n}${o}/basket/create?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
368
+ `${n}${o}/basket/create?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
369
369
  e,
370
370
  {
371
371
  headers: {
@@ -374,14 +374,14 @@ const Fr = ({
374
374
  }
375
375
  }
376
376
  )).data;
377
- } catch (s) {
378
- return T.isAxiosError(s) ? console.error("Error creating basket:", s.response || s.message) : console.error("Unexpected error:", s), null;
377
+ } catch (l) {
378
+ return T.isAxiosError(l) ? console.error("Error creating basket:", l.response || l.message) : console.error("Unexpected error:", l), null;
379
379
  }
380
- }, Rt = async (t, e, r) => {
381
- const { serverUrl: o, basePath: n } = lt(), s = `${o}`;
380
+ }, Vt = async (t, e, r) => {
381
+ const { serverUrl: o, basePath: n } = yt(), l = `${o}`;
382
382
  try {
383
- const l = await T.post(
384
- `${s}${n}/basket/add-product/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
383
+ const c = await T.post(
384
+ `${l}${n}/basket/add-product/${t}?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
385
385
  e,
386
386
  {
387
387
  headers: {
@@ -390,62 +390,42 @@ const Fr = ({
390
390
  }
391
391
  }
392
392
  );
393
- return l.status === 200 && l.data ? l.data : null;
394
- } catch (l) {
395
- return T.isAxiosError(l) ? console.error(
393
+ return c.status === 200 && c.data ? c.data : null;
394
+ } catch (c) {
395
+ return T.isAxiosError(c) ? console.error(
396
396
  "Error adding products to basket:",
397
- l.response || l.message
398
- ) : console.error("Unexpected error:", l), null;
399
- }
400
- }, Re = async ({
401
- basketId: t,
402
- customer_token: e
403
- }) => {
404
- var s;
405
- const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
406
- try {
407
- const l = await T.get(
408
- `${n}${o}/basket/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
409
- {
410
- headers: {
411
- "Content-Type": "application/json",
412
- Authorization: e
413
- }
414
- }
415
- );
416
- return { status: l.status, data: l.data };
417
- } catch (l) {
418
- return T.isAxiosError(l) ? { status: (s = l.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
397
+ c.response || c.message
398
+ ) : console.error("Unexpected error:", c), null;
419
399
  }
420
- }, Yt = "sfcc_basket_id", Se = "sfcc_customer_token", Tt = "sfcc_token_expiry", Nr = 300 * 1e3, It = "1.0.0";
421
- const st = (t) => {
400
+ }, Yt = "sfcc_basket_id", ke = "sfcc_customer_token", Et = "sfcc_token_expiry", Fr = 300 * 1e3, Ft = "1.0.0";
401
+ const et = (t) => {
422
402
  try {
423
403
  t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
424
404
  } catch (e) {
425
405
  console.error("Error saving basket ID to storage:", e);
426
406
  }
427
- }, Kt = (t) => {
407
+ }, Rt = (t) => {
428
408
  try {
429
409
  if (t) {
430
- localStorage.setItem(Se, t);
431
- const e = Date.now() + Nr;
432
- localStorage.setItem(Tt, e.toString());
410
+ localStorage.setItem(ke, t);
411
+ const e = Date.now() + Fr;
412
+ localStorage.setItem(Et, e.toString());
433
413
  } else
434
- localStorage.removeItem(Se);
414
+ localStorage.removeItem(ke);
435
415
  } catch (e) {
436
416
  console.error("Error storing token:", e);
437
417
  }
438
- }, Ce = 300, Er = () => {
439
- var d, i, b, h, S, _;
440
- const t = Ae(), e = Ht((F) => F.product.product), r = Ht((F) => F.store.store), [o, n] = z(!!e);
441
- if (it(() => {
418
+ }, Se = 300, Ir = () => {
419
+ var d, i, x, h, S, _;
420
+ const t = je(), e = Mt((F) => F.product.product), r = Mt((F) => F.store.store), [o, n] = $(!!e);
421
+ if (tt(() => {
442
422
  n(!!e);
443
423
  }, [e]), !e) return null;
444
- const s = async () => {
445
- var F, A, K, ct, V, dt, kt, Pt, rt, St, Ct, ut, $t, zt, _t, P;
424
+ const l = async () => {
425
+ var F, D, K, it, H, st, vt, Ot, Q, kt, St, lt, Pt, $t, Ct, O;
446
426
  console.log(e, "the prod");
447
427
  try {
448
- if (!((A = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && A.product_id) && !(e.type.item || e.type.bundle) && !((ct = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && ct.productId)) {
428
+ if (!((D = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && D.product_id) && !(e.type.item || e.type.bundle) && !((it = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && it.productId)) {
449
429
  M.error("Variants not available", {
450
430
  position: "bottom-right",
451
431
  autoClose: 1e3
@@ -454,57 +434,52 @@ const st = (t) => {
454
434
  }
455
435
  const C = [
456
436
  {
457
- product_id: ((V = e.variants) == null ? void 0 : V[0].product_id) || ((dt = e.variants) == null ? void 0 : dt[0].productId) || (e == null ? void 0 : e.id),
437
+ product_id: ((H = e.variants) == null ? void 0 : H[0].product_id) || ((st = e.variants) == null ? void 0 : st[0].productId) || (e == null ? void 0 : e.id),
458
438
  quantity: 1
459
439
  }
460
440
  ];
461
441
  console.log(C, "the product data");
462
442
  const k = JSON.parse(
463
443
  sessionStorage.getItem("customerData") || "{}"
464
- ), ot = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Wt = !1, jt = localStorage.getItem(Tt), At = Date.now();
465
- if (!Wt || !jt || At >= parseInt(jt)) {
466
- let $ = "";
444
+ ), ct = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Jt = !1, zt = localStorage.getItem(Et), jt = Date.now();
445
+ if (!Jt || !zt || jt >= parseInt(zt)) {
446
+ let z = "";
467
447
  {
468
- const ft = await Ot();
469
- console.log("token from auth data"), $ = "Bearer " + ft.access_token;
448
+ const A = await Tt();
449
+ console.log("token from auth data"), z = "Bearer " + A.access_token;
470
450
  }
471
- if (!$) {
451
+ if (!z) {
472
452
  console.error("Failed to get customer_token");
473
453
  return;
474
454
  }
475
- const pt = At + 300 * 1e3;
476
- if (Kt($), localStorage.setItem(Tt, pt.toString()), ot) {
477
- const ft = await Re({
478
- basketId: ot,
479
- customer_token: $
480
- });
481
- if (console.log(ot, "basket id from customer"), ft.status === 200 && ft) {
482
- const D = await Rt(
483
- ot,
484
- C,
485
- $
486
- );
487
- (((kt = D == null ? void 0 : D.product_items) == null ? void 0 : kt.length) > 0 || ((Pt = D == null ? void 0 : D.productItems) == null ? void 0 : Pt.length) > 0) && (M.success("Added to cart", {
488
- position: "bottom-right",
489
- autoClose: 3e3,
490
- hideProgressBar: !1,
491
- closeOnClick: !0,
492
- pauseOnHover: !0,
493
- draggable: !0
494
- }), Vt(ot));
495
- return;
496
- }
455
+ const dt = jt + 300 * 1e3;
456
+ if (Rt(z), localStorage.setItem(Et, dt.toString()), ct) {
457
+ console.log(ct, "basket id from customer");
458
+ const A = await Vt(
459
+ ct,
460
+ C,
461
+ z
462
+ );
463
+ (((vt = A == null ? void 0 : A.product_items) == null ? void 0 : vt.length) > 0 || ((Ot = A == null ? void 0 : A.productItems) == null ? void 0 : Ot.length) > 0) && (M.success("Added to cart", {
464
+ position: "bottom-right",
465
+ autoClose: 3e3,
466
+ hideProgressBar: !1,
467
+ closeOnClick: !0,
468
+ pauseOnHover: !0,
469
+ draggable: !0
470
+ }), Ht(ct));
471
+ return;
497
472
  }
498
473
  const Dt = {
499
474
  productItems: [
500
475
  {
501
- productId: ((rt = e.variants) == null ? void 0 : rt[0].product_id) || ((St = e.variants) == null ? void 0 : St[0].productId) || (e == null ? void 0 : e.id),
476
+ productId: ((Q = e.variants) == null ? void 0 : Q[0].product_id) || ((kt = e.variants) == null ? void 0 : kt[0].productId) || (e == null ? void 0 : e.id),
502
477
  quantity: 1
503
478
  }
504
479
  ]
505
480
  };
506
481
  console.log("before create basket");
507
- const m = await Ve($, Dt);
482
+ const m = await He(z, Dt);
508
483
  if (console.log(
509
484
  m,
510
485
  m == null ? void 0 : m.basket_id,
@@ -517,34 +492,34 @@ const st = (t) => {
517
492
  console.log(
518
493
  "setting stored id",
519
494
  (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
520
- ), st(
495
+ ), et(
521
496
  (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
522
497
  ), console.log("adding product to basket");
523
- const J = await Rt(
498
+ const J = await Vt(
524
499
  (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId),
525
500
  C,
526
- $
501
+ z
527
502
  );
528
- console.log("object added to basket"), (((Ct = J == null ? void 0 : J.product_items) == null ? void 0 : Ct.length) > 0 || ((ut = J == null ? void 0 : J.productItems) == null ? void 0 : ut.length) > 0) && M.success("Added to cart", {
503
+ console.log("object added to basket"), (((St = J == null ? void 0 : J.product_items) == null ? void 0 : St.length) > 0 || ((lt = J == null ? void 0 : J.productItems) == null ? void 0 : lt.length) > 0) && M.success("Added to cart", {
529
504
  position: "bottom-right",
530
505
  autoClose: 3e3,
531
506
  hideProgressBar: !1,
532
507
  closeOnClick: !0,
533
508
  pauseOnHover: !0,
534
509
  draggable: !0
535
- }), Vt(m.basket_id || (m == null ? void 0 : m.basketId));
510
+ }), Ht(m.basket_id || (m == null ? void 0 : m.basketId));
536
511
  }
537
512
  } catch (C) {
538
513
  console.error("Error adding to cart:", C), M.error("Failed to add product to cart", {
539
514
  position: "bottom-right",
540
515
  autoClose: 3e3
541
- }), (($t = C == null ? void 0 : C.response) == null ? void 0 : $t.status) === 404 || // Basket not found
542
- ((zt = C == null ? void 0 : C.response) == null ? void 0 : zt.status) === 401 ? (((_t = C == null ? void 0 : C.response) == null ? void 0 : _t.status) === 404 && st(null), ((P = C == null ? void 0 : C.response) == null ? void 0 : P.status) === 401 && (st(null), Kt(null))) : (console.error("Failed to add product to basket:", C.message), M.error("Failed to add product to cart", {
516
+ }), ((Pt = C == null ? void 0 : C.response) == null ? void 0 : Pt.status) === 404 || // Basket not found
517
+ (($t = C == null ? void 0 : C.response) == null ? void 0 : $t.status) === 401 ? (((Ct = C == null ? void 0 : C.response) == null ? void 0 : Ct.status) === 404 && et(null), ((O = C == null ? void 0 : C.response) == null ? void 0 : O.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", C.message), M.error("Failed to add product to cart", {
543
518
  position: "bottom-right",
544
519
  autoClose: 3e3
545
520
  }));
546
521
  }
547
- }, l = () => {
522
+ }, c = () => {
548
523
  e && (window.location.href = e.c_pdpUrl);
549
524
  };
550
525
  return console.log(e, "the prod"), /* @__PURE__ */ u(re, { children: [
@@ -553,7 +528,7 @@ const st = (t) => {
553
528
  {
554
529
  className: "fixed inset-0 z-40 bg-black/30",
555
530
  onClick: () => {
556
- n(!1), setTimeout(() => t(oe(null)), Ce);
531
+ n(!1), setTimeout(() => t(oe(null)), Se);
557
532
  }
558
533
  }
559
534
  ),
@@ -571,14 +546,14 @@ const st = (t) => {
571
546
  /* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
572
547
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
573
548
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
574
- ge,
549
+ we,
575
550
  {
576
551
  icon: "mdi:close",
577
552
  className: "text-[#555555] w-6 h-6 cursor-pointer",
578
553
  onClick: () => {
579
554
  n(!1), setTimeout(
580
555
  () => t(oe(null)),
581
- Ce
556
+ Se
582
557
  );
583
558
  }
584
559
  }
@@ -588,20 +563,20 @@ const st = (t) => {
588
563
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
589
564
  "img",
590
565
  {
591
- src: (h = (b = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : b[0]) == null ? void 0 : h.link,
566
+ src: (h = (x = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : x[0]) == null ? void 0 : h.link,
592
567
  alt: e.name,
593
568
  className: "rounded-[10px]"
594
569
  }
595
570
  ) }),
596
571
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
597
- (F) => F.images.slice(1, 2).map((A) => /* @__PURE__ */ a(
572
+ (F) => F.images.slice(1, 2).map((D) => /* @__PURE__ */ a(
598
573
  "img",
599
574
  {
600
- src: A.link,
575
+ src: D.link,
601
576
  alt: e.name,
602
577
  className: "rounded-[10px] w-[60px] h-[60px]"
603
578
  },
604
- A.link
579
+ D.link
605
580
  ))
606
581
  ) })
607
582
  ] }),
@@ -648,19 +623,19 @@ const st = (t) => {
648
623
  " ratings"
649
624
  ] })
650
625
  ] }) }),
651
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((F, A) => {
626
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((F, D) => {
652
627
  var K;
653
628
  return /* @__PURE__ */ a(
654
- ge,
629
+ we,
655
630
  {
656
631
  icon: "mdi:star",
657
632
  width: "20",
658
633
  height: "20",
659
634
  className: `text-yellow-500
660
- ${((K = e == null ? void 0 : e.rating) == null ? void 0 : K.rate) > A ? "text-yellow-500" : "text-gray-300"}
635
+ ${((K = e == null ? void 0 : e.rating) == null ? void 0 : K.rate) > D ? "text-yellow-500" : "text-gray-300"}
661
636
  `
662
637
  },
663
- A
638
+ D
664
639
  );
665
640
  }) })
666
641
  ] }),
@@ -675,7 +650,7 @@ const st = (t) => {
675
650
  {
676
651
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
677
652
  style: { backgroundColor: r.tanyaThemeColor },
678
- onClick: s,
653
+ onClick: l,
679
654
  children: "Add to Cart"
680
655
  }
681
656
  ),
@@ -684,7 +659,7 @@ const st = (t) => {
684
659
  {
685
660
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
686
661
  style: { backgroundColor: r.tanyaThemeColor },
687
- onClick: l,
662
+ onClick: c,
688
663
  children: "View more"
689
664
  }
690
665
  )
@@ -695,7 +670,7 @@ const st = (t) => {
695
670
  }
696
671
  )
697
672
  ] });
698
- }, Tr = ({
673
+ }, Nr = ({
699
674
  tanyaConfig: t,
700
675
  basketId: e
701
676
  }) => {
@@ -713,36 +688,36 @@ const st = (t) => {
713
688
  "Niece/Nephew": "his/her niece/nephew",
714
689
  "My Friends": "his/her friends",
715
690
  Others: "others"
716
- }, n = Ft(null), s = Ft(null), l = Ft(null), d = Ft(null), [i, b] = z(null), [h, S] = z(!1), [_, F] = z(!1), [A, K] = z(!1), [ct, V] = z(!1), [dt, kt] = z(!1), [Pt, rt] = z(!1), [St, Ct] = z(""), [ut, $t] = z(""), zt = (c) => ({
717
- id: c.id,
718
- title: c.name,
719
- image: c.image ?? "",
720
- price: c.price ?? 0
721
- }), [_t, P] = z([]), C = Ft(null), k = Ht((c) => c.store.store), ot = Ht((c) => c.product.product), Wt = () => {
691
+ }, n = _t(null), l = _t(null), c = _t(null), d = _t(null), [i, x] = $(null), [h, S] = $(!1), [_, F] = $(!1), [D, K] = $(!1), [it, H] = $(!1), [st, vt] = $(!1), [Ot, Q] = $(!1), [kt, St] = $(""), [lt, Pt] = $(""), $t = (s) => ({
692
+ id: s.id,
693
+ title: s.name,
694
+ image: s.image ?? "",
695
+ price: s.price ?? 0
696
+ }), [Ct, O] = $([]), C = _t(null), k = Mt((s) => s.store.store), ct = Mt((s) => s.product.product), Jt = () => {
722
697
  K(!0), setTimeout(() => F(!0), 10);
723
- }, jt = () => {
698
+ }, zt = () => {
724
699
  F(!1), setTimeout(() => K(!1), 300);
725
700
  };
726
- it(() => {
727
- h ? Wt() : jt();
701
+ tt(() => {
702
+ h ? Jt() : zt();
728
703
  }, [h]);
729
- const At = (c) => {
730
- $t(o[c]);
704
+ const jt = (s) => {
705
+ Pt(o[s]);
731
706
  };
732
- it(() => {
707
+ tt(() => {
733
708
  C.current && (C.current.scrollTop += 150);
734
- }, [_t]);
735
- let $ = null, pt = null;
709
+ }, [Ct]);
710
+ let z = null, dt = null;
736
711
  const Dt = async () => {
737
- if ($ && pt && Date.now() < pt)
738
- return $;
712
+ if (z && dt && Date.now() < dt)
713
+ return z;
739
714
  try {
740
- const c = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
715
+ const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
741
716
  grant_type: "client_credentials",
742
717
  client_id: "4i8rd70sgt961tc4dhskgf08c",
743
718
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
744
719
  scope: "default-m2m-resource-server-8xzfzo/read"
745
- }), w = await fetch(c, {
720
+ }), w = await fetch(s, {
746
721
  method: "POST",
747
722
  headers: {
748
723
  "Content-Type": "application/x-www-form-urlencoded"
@@ -753,71 +728,71 @@ const st = (t) => {
753
728
  throw new Error(
754
729
  `Token request failed! status: ${w.status}`
755
730
  );
756
- const x = await w.json();
757
- $ = x.access_token;
758
- const p = x.expires_in || 3600;
759
- return pt = Date.now() + (p - 60) * 1e3, $;
760
- } catch (c) {
761
- return console.error("Error obtaining JWT token:", c), $ = null, pt = null, null;
731
+ const b = await w.json();
732
+ z = b.access_token;
733
+ const p = b.expires_in || 3600;
734
+ return dt = Date.now() + (p - 60) * 1e3, z;
735
+ } catch (s) {
736
+ return console.error("Error obtaining JWT token:", s), z = null, dt = null, null;
762
737
  }
763
738
  }, m = async () => {
764
- const c = await Ot();
765
- c != null && b(c);
739
+ const s = await Tt();
740
+ s != null && x(s);
766
741
  };
767
- it(() => {
742
+ tt(() => {
768
743
  if (t != null && t.siteId) {
769
- const { clientID: c, host: v, organizationID: w, shortCode: x, siteId: p } = t;
770
- sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(c)), sessionStorage.setItem("envRef", x), sessionStorage.setItem("orgRef", w);
744
+ const { clientID: s, host: v, organizationID: w, shortCode: b, siteId: p } = t;
745
+ sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(s)), sessionStorage.setItem("envRef", b), sessionStorage.setItem("orgRef", w);
771
746
  }
772
747
  m(), console.log("scapi environment v1");
773
- }, []), it(() => {
774
- e && (console.log("setting the basket id", e), st(e));
748
+ }, []), tt(() => {
749
+ e && (console.log("setting the basket id", e), et(e));
775
750
  }, [e]);
776
751
  const J = async () => {
777
- const c = JSON.parse(
752
+ const s = JSON.parse(
778
753
  sessionStorage.getItem("customerData") || "{}"
779
754
  ).customerId;
780
- return (await kr(c || "")).c_interests;
781
- }, ft = async (c, v) => {
782
- console.log("in secondary flow", It);
755
+ return (await yr(s || "")).c_interests;
756
+ }, A = async (s, v) => {
757
+ console.log("in secondary flow", Ft);
783
758
  const w = await J();
784
- if (console.log(w, "interests of customer", It), !!w)
759
+ if (console.log(w, "interests of customer", Ft), !!w)
785
760
  try {
786
- P(
761
+ O(
787
762
  (U) => U.map(
788
- (R, Y) => Y === U.length - 1 ? { ...R, secondaryLoading: !0 } : R
763
+ (V, Y) => Y === U.length - 1 ? { ...V, secondaryLoading: !0 } : V
789
764
  )
790
765
  );
791
- const x = await Dt();
792
- if (!x) throw new Error("Failed to fetch token");
793
- const p = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), mt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
766
+ const b = await Dt();
767
+ if (!b) throw new Error("Failed to fetch token");
768
+ const p = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
794
769
  registered: String(g || !1),
795
770
  userId: String(p || (/* @__PURE__ */ new Date()).getTime())
796
- }).toString()}`, ht = JSON.stringify({
771
+ }).toString()}`, pt = JSON.stringify({
797
772
  flowId: "Q166PR519W",
798
773
  flowAliasId: "HKFUVLWVH2",
799
774
  input: {
800
775
  loyaltyPoints: "",
801
- productName: c,
776
+ productName: s,
802
777
  productPoints: String(v || 0),
803
778
  interests: w
804
779
  }
805
- }), L = await fetch(mt, {
780
+ }), L = await fetch(ut, {
806
781
  signal: AbortSignal.timeout(3e4),
807
782
  method: "POST",
808
783
  headers: {
809
784
  "Content-Type": "application/json",
810
- Authorization: `Bearer ${x}`
785
+ Authorization: `Bearer ${b}`
811
786
  },
812
- body: ht
787
+ body: pt
813
788
  });
814
789
  if (!L.body) throw new Error("Readable stream not supported");
815
- const wt = L.body.getReader(), gt = new TextDecoder();
790
+ const ft = L.body.getReader(), mt = new TextDecoder();
816
791
  let B = "";
817
792
  for (; ; ) {
818
- const { done: U, value: R } = await wt.read();
793
+ const { done: U, value: V } = await ft.read();
819
794
  if (U) break;
820
- B += gt.decode(R, { stream: !0 });
795
+ B += mt.decode(V, { stream: !0 });
821
796
  const Y = B.split(`
822
797
  `);
823
798
  B = Y.pop() || "";
@@ -826,31 +801,31 @@ const st = (t) => {
826
801
  const f = W.slice(5).trim();
827
802
  try {
828
803
  const q = JSON.parse(f);
829
- q.index === 0 && P(
804
+ q.index === 0 && O(
830
805
  (I) => I.map(
831
- (O, G) => G === I.length - 1 ? {
832
- ...O,
806
+ (P, G) => G === I.length - 1 ? {
807
+ ...P,
833
808
  secondaryResponse: q.data,
834
809
  secondaryLoading: !1
835
- } : O
810
+ } : P
836
811
  )
837
812
  );
838
813
  } catch (q) {
839
- P(
814
+ O(
840
815
  (I) => I.map(
841
- (O, G) => G === I.length - 1 ? { ...O, secondaryLoading: !1 } : O
816
+ (P, G) => G === I.length - 1 ? { ...P, secondaryLoading: !1 } : P
842
817
  )
843
818
  ), console.error("Secondary flow JSON parse error:", q);
844
819
  }
845
820
  }
846
821
  }
847
- } catch (x) {
848
- console.error("Secondary flow error:", x);
822
+ } catch (b) {
823
+ console.error("Secondary flow error:", b);
849
824
  }
850
- }, D = async (c) => {
851
- const v = c || St.trim();
825
+ }, Wt = async (s) => {
826
+ const v = s || kt.trim();
852
827
  if (v) {
853
- kt(!0), Ct(""), n.current = null, s.current = null, l.current = null, d.current = null, P((w) => [
828
+ vt(!0), St(""), n.current = null, l.current = null, c.current = null, d.current = null, O((w) => [
854
829
  ...w,
855
830
  {
856
831
  query: v,
@@ -861,38 +836,38 @@ const st = (t) => {
861
836
  }
862
837
  ]);
863
838
  try {
864
- const w = ut, x = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
839
+ const w = lt, b = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
865
840
  if (!g)
866
841
  throw new Error("Failed to obtain access token");
867
- const mt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
842
+ const ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
868
843
  registered: String(p || !1),
869
- userId: String(x || (/* @__PURE__ */ new Date()).getTime())
870
- }).toString()}`, ht = JSON.stringify({
844
+ userId: String(b || (/* @__PURE__ */ new Date()).getTime())
845
+ }).toString()}`, pt = JSON.stringify({
871
846
  flowId: "MMHQKYI1NE",
872
847
  flowAliasId: "SZF9ZK1ATE",
873
848
  input: {
874
849
  userPrompt: v,
875
850
  whom: w
876
851
  }
877
- }), L = await fetch(mt, {
852
+ }), L = await fetch(ut, {
878
853
  signal: AbortSignal.timeout(3e4),
879
854
  method: "POST",
880
855
  headers: {
881
856
  "Content-Type": "application/json",
882
857
  Authorization: `Bearer ${g}`
883
858
  },
884
- body: ht
859
+ body: pt
885
860
  });
886
861
  if (!L.ok)
887
862
  throw new Error(`HTTP error! status: ${L.status}`);
888
863
  if (!L.body) throw new Error("Readable stream not supported");
889
- const wt = L.body.getReader(), gt = new TextDecoder();
864
+ const ft = L.body.getReader(), mt = new TextDecoder();
890
865
  let B = "", U = "";
891
866
  for (; ; ) {
892
- rt(!0);
893
- const { done: R, value: Y } = await wt.read();
894
- if (R) break;
895
- B += gt.decode(Y, { stream: !0 });
867
+ Q(!0);
868
+ const { done: V, value: Y } = await ft.read();
869
+ if (V) break;
870
+ B += mt.decode(Y, { stream: !0 });
896
871
  const W = B.split(`
897
872
  `);
898
873
  B = W.pop() || "";
@@ -901,9 +876,9 @@ const st = (t) => {
901
876
  const q = f.slice(5).trim();
902
877
  try {
903
878
  const I = JSON.parse(q);
904
- I.index == 1 && (U = I.data), P(
905
- (O) => O.map(
906
- (G, Lt) => Lt === O.length - 1 ? {
879
+ I.index == 1 && (U = I.data), O(
880
+ (P) => P.map(
881
+ (G, At) => At === P.length - 1 ? {
907
882
  ...G,
908
883
  [I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
909
884
  } : G
@@ -914,47 +889,47 @@ const st = (t) => {
914
889
  }
915
890
  }
916
891
  }
917
- rr(er(U));
892
+ tr(Ze(U));
918
893
  } catch (w) {
919
894
  console.error("Error sending message to Tanya:", w);
920
895
  } finally {
921
- kt(!1);
896
+ vt(!1);
922
897
  }
923
898
  }
924
- }, er = (c) => {
925
- const v = c.match(
899
+ }, Ze = (s) => {
900
+ const v = s.match(
926
901
  /top five relevant product or category names are: (.*)/i
927
- ), p = (v ? v[1] : c).split(", ").map((j) => j.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
902
+ ), p = (v ? v[1] : s).split(", ").map((j) => j.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
928
903
  return [...new Set(p)].filter(Boolean).join(",");
929
- }, rr = async (c) => {
930
- if (typeof c == "string") {
931
- console.log(c, "keywords");
932
- const v = c.split(",");
904
+ }, tr = async (s) => {
905
+ if (typeof s == "string") {
906
+ console.log(s, "keywords");
907
+ const v = s.split(",");
933
908
  for (const w of v) {
934
- const x = await be(w);
935
- if (rt(!1), (x == null ? void 0 : x.length) > 0 && (P(
909
+ const b = await ge(w);
910
+ if (Q(!1), (b == null ? void 0 : b.length) > 0 && (O(
936
911
  (p) => p.map(
937
912
  (g, j) => j === p.length - 1 ? {
938
913
  ...g,
939
914
  products: [
940
915
  ...g.products || [],
941
- { keyword: w, items: x, loading: !1 }
916
+ { keyword: w, items: b, loading: !1 }
942
917
  ]
943
918
  } : g
944
919
  )
945
- ), !n.current || s.current == null)) {
946
- const p = x[0];
947
- n.current = String((p == null ? void 0 : p.product_name) ?? ""), l.current = p.image.link, s.current = p.product_id;
920
+ ), !n.current || l.current == null)) {
921
+ const p = b[0];
922
+ n.current = String((p == null ? void 0 : p.product_name) ?? ""), c.current = p.image.link, l.current = p.product_id;
948
923
  const g = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
949
924
  d.current = typeof g == "number" && Number.isFinite(g) ? g : null;
950
925
  }
951
926
  }
952
927
  } else
953
- for (const v of c) {
954
- const w = await be(v);
955
- rt(!1), (w == null ? void 0 : w.length) > 0 && P(
956
- (x) => x.map(
957
- (p, g) => g === x.length - 1 ? {
928
+ for (const v of s) {
929
+ const w = await ge(v);
930
+ Q(!1), (w == null ? void 0 : w.length) > 0 && O(
931
+ (b) => b.map(
932
+ (p, g) => g === b.length - 1 ? {
958
933
  ...p,
959
934
  products: [
960
935
  ...p.products || [],
@@ -965,34 +940,34 @@ const st = (t) => {
965
940
  );
966
941
  }
967
942
  if (n.current) {
968
- P(
943
+ O(
969
944
  (w) => w.map(
970
- (x, p) => p === w.length - 1 ? {
971
- ...x,
945
+ (b, p) => p === w.length - 1 ? {
946
+ ...b,
972
947
  productSnapshot: {
973
- id: s.current,
948
+ id: l.current,
974
949
  name: n.current,
975
- image: l.current,
950
+ image: c.current,
976
951
  price: d.current ?? null,
977
952
  points: 0,
978
953
  quantity: 1
979
954
  }
980
- } : x
955
+ } : b
981
956
  )
982
957
  );
983
958
  const v = JSON.parse(
984
959
  sessionStorage.getItem("customerData") || "{}"
985
960
  );
986
- (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", It), ft(n.current, 0)) : console.log("not running secondary flow", It);
961
+ (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", Ft), A(n.current, 0)) : console.log("not running secondary flow", Ft);
987
962
  }
988
- rt(!1);
989
- }, or = async (c, v) => {
990
- var w, x, p, g, j, mt, ht, L, wt, gt, B, U, R, Y, W;
991
- V(!0);
963
+ Q(!1);
964
+ }, er = async (s, v) => {
965
+ var w, b, p, g, j, ut, pt, L, ft, mt, B, U, V, Y, W;
966
+ H(!0);
992
967
  try {
993
- const f = await He(c.id);
994
- if (!((x = (w = f == null ? void 0 : f.variants) == null ? void 0 : w[0]) != null && x.product_id || (g = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && g.productId) && !(f.type.item || f.type.bundle)) {
995
- V(!1), M.error("Variants not found", {
968
+ const f = await Me(s.id);
969
+ if (!((b = (w = f == null ? void 0 : f.variants) == null ? void 0 : w[0]) != null && b.product_id || (g = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && g.productId) && !(f.type.item || f.type.bundle)) {
970
+ H(!1), M.error("Variants not found", {
996
971
  position: "bottom-right",
997
972
  autoClose: 1e3
998
973
  }), console.error("No product variant found");
@@ -1000,95 +975,89 @@ const st = (t) => {
1000
975
  }
1001
976
  const q = [
1002
977
  {
1003
- product_id: ((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),
978
+ product_id: ((j = f.variants) == null ? void 0 : j[0].product_id) || ((ut = f.variants) == null ? void 0 : ut[0].productId) || (f == null ? void 0 : f.id),
1004
979
  quantity: v
1005
980
  }
1006
981
  ];
1007
- console.log(q, "product data", "app version", It);
982
+ console.log(q, "product data", "app version", Ft);
1008
983
  const I = JSON.parse(
1009
984
  sessionStorage.getItem("customerData") || "{}"
1010
- ), O = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, Lt = localStorage.getItem(Tt), he = Date.now();
1011
- if (!G || !Lt || he >= parseInt(Lt)) {
1012
- const nr = await qe();
1013
- let { customer_token: nt } = await Me(
1014
- nr
985
+ ), P = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, At = localStorage.getItem(Et), he = Date.now();
986
+ if (!G || !At || he >= parseInt(At)) {
987
+ const rr = await Ue();
988
+ let { customer_token: ht } = await qe(
989
+ rr
1015
990
  );
1016
- if (nt = "Bearer " + i.access_token, !nt) {
991
+ if (ht = "Bearer " + i.access_token, !ht) {
1017
992
  console.error("Failed to get customer_token");
1018
993
  return;
1019
994
  }
1020
- const ar = he + 300 * 1e3;
1021
- if (Kt(nt), localStorage.setItem(Tt, ar.toString()), console.log(O, "basketIdFromCustomer"), O) {
1022
- const we = await Re({
1023
- basketId: O,
1024
- customer_token: nt
1025
- });
1026
- if (we.status === 200 && we) {
1027
- const Gt = await Rt(
1028
- O,
1029
- q,
1030
- nt
1031
- );
1032
- ((ht = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : ht.length) > 0 && (M.success("Added to cart", {
1033
- position: "bottom-right",
1034
- autoClose: 3e3,
1035
- hideProgressBar: !1,
1036
- closeOnClick: !0,
1037
- pauseOnHover: !0,
1038
- draggable: !0
1039
- }), Vt(O), V(!1));
1040
- return;
1041
- }
995
+ const or = he + 300 * 1e3;
996
+ if (Rt(ht), localStorage.setItem(Et, or.toString()), console.log(P, "basketIdFromCustomer"), P) {
997
+ const Gt = await Vt(
998
+ P,
999
+ q,
1000
+ ht
1001
+ );
1002
+ ((pt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : pt.length) > 0 && (M.success("Added to cart", {
1003
+ position: "bottom-right",
1004
+ autoClose: 3e3,
1005
+ hideProgressBar: !1,
1006
+ closeOnClick: !0,
1007
+ pauseOnHover: !0,
1008
+ draggable: !0
1009
+ }), Ht(P), H(!1));
1010
+ return;
1042
1011
  }
1043
- const ir = {
1012
+ const nr = {
1044
1013
  productItems: [
1045
1014
  {
1046
- productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((wt = f.variants) == null ? void 0 : wt[0].productId) || (f == null ? void 0 : f.id),
1015
+ productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
1047
1016
  quantity: 1
1048
1017
  }
1049
1018
  ]
1050
- }, y = await Ve(nt, ir);
1019
+ }, y = await He(ht, nr);
1051
1020
  if (console.log(
1052
1021
  y,
1053
1022
  y == null ? void 0 : y.basket_id,
1054
1023
  y == null ? void 0 : y.basketId,
1055
1024
  "the basket response"
1056
1025
  ), !(y != null && y.basket_id || !(y != null && y.basketId))) {
1057
- V(!1), console.error("Failed to create basket");
1026
+ H(!1), console.error("Failed to create basket");
1058
1027
  return;
1059
1028
  }
1060
- st(
1029
+ et(
1061
1030
  (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId)
1062
1031
  );
1063
- const bt = await Rt(
1032
+ const wt = await Vt(
1064
1033
  (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId),
1065
1034
  q,
1066
- nt
1035
+ ht
1067
1036
  );
1068
- (((gt = bt == null ? void 0 : bt.product_items) == null ? void 0 : gt.length) > 0 || ((B = bt == null ? void 0 : bt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
1037
+ (((mt = wt == null ? void 0 : wt.product_items) == null ? void 0 : mt.length) > 0 || ((B = wt == null ? void 0 : wt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
1069
1038
  position: "bottom-right",
1070
1039
  autoClose: 3e3,
1071
1040
  hideProgressBar: !1,
1072
1041
  closeOnClick: !0,
1073
1042
  pauseOnHover: !0,
1074
1043
  draggable: !0
1075
- }), Vt(y.basket_id || (y == null ? void 0 : y.basketId));
1044
+ }), Ht(y.basket_id || (y == null ? void 0 : y.basketId));
1076
1045
  }
1077
1046
  } catch (f) {
1078
- V(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1047
+ H(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1079
1048
  position: "bottom-right",
1080
1049
  autoClose: 3e3
1081
1050
  }), ((U = f == null ? void 0 : f.response) == null ? void 0 : U.status) === 404 || // Basket not found
1082
- ((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && st(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (st(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
1051
+ ((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 && et(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
1083
1052
  position: "bottom-right",
1084
1053
  autoClose: 3e3
1085
1054
  }));
1086
1055
  }
1087
- V(!1);
1056
+ H(!1);
1088
1057
  };
1089
- return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(yr, { open: h, onOpenChange: S, children: [
1058
+ return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(xr, { open: h, onOpenChange: S, children: [
1090
1059
  /* @__PURE__ */ a(
1091
- vr,
1060
+ br,
1092
1061
  {
1093
1062
  onClick: () => S(!0),
1094
1063
  style: {
@@ -1150,7 +1119,7 @@ const st = (t) => {
1150
1119
  ) })
1151
1120
  }
1152
1121
  ),
1153
- A && /* @__PURE__ */ u(re, { children: [
1122
+ D && /* @__PURE__ */ u(re, { children: [
1154
1123
  /* @__PURE__ */ a(
1155
1124
  "div",
1156
1125
  {
@@ -1298,7 +1267,7 @@ const st = (t) => {
1298
1267
  /* @__PURE__ */ u(
1299
1268
  "div",
1300
1269
  {
1301
- className: `flex flex-col h-full ${ot ? "lg:w-2/3 w-full" : "w-full"}`,
1270
+ className: `flex flex-col h-full ${ct ? "lg:w-2/3 w-full" : "w-full"}`,
1302
1271
  children: [
1303
1272
  /* @__PURE__ */ u(
1304
1273
  "div",
@@ -1312,32 +1281,32 @@ const st = (t) => {
1312
1281
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
1313
1282
  children: [
1314
1283
  /* @__PURE__ */ a("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ a("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
1315
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((c) => /* @__PURE__ */ a(
1284
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((s) => /* @__PURE__ */ a(
1316
1285
  "button",
1317
1286
  {
1318
- onClick: () => At(c),
1287
+ onClick: () => jt(s),
1319
1288
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1320
1289
  style: {
1321
- backgroundColor: ut === o[c] ? "#FFFFFF" : "#F3F3F3",
1322
- borderColor: ut === o[c] ? "#BBB3DD" : ""
1290
+ backgroundColor: lt === o[s] ? "#FFFFFF" : "#F3F3F3",
1291
+ borderColor: lt === o[s] ? "#BBB3DD" : ""
1323
1292
  },
1324
- children: c
1293
+ children: s
1325
1294
  },
1326
- c
1295
+ s
1327
1296
  )) })
1328
1297
  ]
1329
1298
  }
1330
1299
  ),
1331
- _t.map((c, v) => {
1332
- var w, x;
1300
+ Ct.map((s, v) => {
1301
+ var w, b;
1333
1302
  return /* @__PURE__ */ u("div", { children: [
1334
- /* @__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: c.query }) }),
1335
- c.response && c.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1303
+ /* @__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 }) }),
1304
+ s.response && s.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1336
1305
  "div",
1337
1306
  {
1338
1307
  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",
1339
1308
  dangerouslySetInnerHTML: {
1340
- __html: Xt(c.response)
1309
+ __html: Xt(s.response)
1341
1310
  }
1342
1311
  }
1343
1312
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1345,19 +1314,19 @@ const st = (t) => {
1345
1314
  {
1346
1315
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1347
1316
  dangerouslySetInnerHTML: {
1348
- __html: Xt(c.response)
1317
+ __html: Xt(s.response)
1349
1318
  }
1350
1319
  }
1351
1320
  ) }),
1352
- Pt && !c.response.includes("Thinking") && ((w = c.products) == null ? void 0 : w.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
- (c == null ? void 0 : c.products) && ((x = c == null ? void 0 : c.products) == null ? void 0 : x.length) > 0 && /* @__PURE__ */ a(
1354
- Ir,
1321
+ Ot && !s.response.includes("Thinking") && ((w = s.products) == null ? void 0 : w.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" }) }),
1322
+ (s == null ? void 0 : s.products) && ((b = s == null ? void 0 : s.products) == null ? void 0 : b.length) > 0 && /* @__PURE__ */ a(
1323
+ _r,
1355
1324
  {
1356
- chat: c.products,
1325
+ chat: s.products,
1357
1326
  storeDetails: k
1358
1327
  }
1359
1328
  ),
1360
- c.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1329
+ s.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1361
1330
  /* @__PURE__ */ a(
1362
1331
  "p",
1363
1332
  {
@@ -1366,11 +1335,11 @@ const st = (t) => {
1366
1335
  children: "Why not explore these inquiries..."
1367
1336
  }
1368
1337
  ),
1369
- c.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1338
+ s.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1370
1339
  "button",
1371
1340
  {
1372
1341
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1373
- onClick: () => D(p),
1342
+ onClick: () => Wt(p),
1374
1343
  style: {
1375
1344
  backgroundColor: k.tanyaThemeColorLight
1376
1345
  },
@@ -1379,7 +1348,7 @@ const st = (t) => {
1379
1348
  g
1380
1349
  ))
1381
1350
  ] }),
1382
- c.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1351
+ s.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1383
1352
  "div",
1384
1353
  {
1385
1354
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1412,7 +1381,7 @@ const st = (t) => {
1412
1381
  ]
1413
1382
  }
1414
1383
  ) }),
1415
- c.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1384
+ s.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1416
1385
  /* @__PURE__ */ a(
1417
1386
  "div",
1418
1387
  {
@@ -1422,12 +1391,12 @@ const st = (t) => {
1422
1391
  },
1423
1392
  dangerouslySetInnerHTML: {
1424
1393
  __html: Xt(
1425
- c.secondaryResponse
1394
+ s.secondaryResponse
1426
1395
  )
1427
1396
  }
1428
1397
  }
1429
1398
  ),
1430
- c.productSnapshot && // chat.productSnapshot.points > 0 &&
1399
+ s.productSnapshot && // chat.productSnapshot.points > 0 &&
1431
1400
  /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
1432
1401
  "div",
1433
1402
  {
@@ -1445,11 +1414,11 @@ const st = (t) => {
1445
1414
  height: 112,
1446
1415
  borderColor: "#eee"
1447
1416
  },
1448
- children: c.productSnapshot.image ? /* @__PURE__ */ a(
1417
+ children: s.productSnapshot.image ? /* @__PURE__ */ a(
1449
1418
  "img",
1450
1419
  {
1451
- src: c.productSnapshot.image,
1452
- alt: c.productSnapshot.name,
1420
+ src: s.productSnapshot.image,
1421
+ alt: s.productSnapshot.name,
1453
1422
  className: "w-full h-full object-cover"
1454
1423
  }
1455
1424
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -1457,18 +1426,18 @@ const st = (t) => {
1457
1426
  ),
1458
1427
  /* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
1459
1428
  /* @__PURE__ */ u("div", { children: [
1460
- /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: c.productSnapshot.name }),
1461
- /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: c.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1429
+ /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: s.productSnapshot.name }),
1430
+ /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: s.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1462
1431
  style: "currency",
1463
1432
  currency: (k == null ? void 0 : k.currency) || "USD"
1464
1433
  }).format(
1465
- c.productSnapshot.price
1434
+ s.productSnapshot.price
1466
1435
  ) : "" }),
1467
- c.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1436
+ s.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1468
1437
  "You will earn",
1469
1438
  " ",
1470
1439
  /* @__PURE__ */ u("strong", { children: [
1471
- c.productSnapshot.points,
1440
+ s.productSnapshot.points,
1472
1441
  " ",
1473
1442
  "points"
1474
1443
  ] })
@@ -1480,7 +1449,7 @@ const st = (t) => {
1480
1449
  "button",
1481
1450
  {
1482
1451
  className: "px-3 py-1 text-sm",
1483
- onClick: () => P(
1452
+ onClick: () => O(
1484
1453
  (p) => p.map(
1485
1454
  (g, j) => j === v && g.productSnapshot ? {
1486
1455
  ...g,
@@ -1501,12 +1470,12 @@ const st = (t) => {
1501
1470
  children: "−"
1502
1471
  }
1503
1472
  ),
1504
- /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: c.productSnapshot.quantity }),
1473
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: s.productSnapshot.quantity }),
1505
1474
  /* @__PURE__ */ a(
1506
1475
  "button",
1507
1476
  {
1508
1477
  className: "px-3 py-1 text-sm",
1509
- onClick: () => P(
1478
+ onClick: () => O(
1510
1479
  (p) => p.map(
1511
1480
  (g, j) => j === v && g.productSnapshot ? {
1512
1481
  ...g,
@@ -1529,21 +1498,21 @@ const st = (t) => {
1529
1498
  "button",
1530
1499
  {
1531
1500
  onClick: () => {
1532
- or(
1533
- zt(
1534
- c.productSnapshot
1501
+ er(
1502
+ $t(
1503
+ s.productSnapshot
1535
1504
  ),
1536
- c.productSnapshot.quantity
1505
+ s.productSnapshot.quantity
1537
1506
  );
1538
1507
  },
1539
- disabled: ct,
1508
+ disabled: it,
1540
1509
  className: "px-4 py-2 rounded-full font-medium",
1541
1510
  style: {
1542
1511
  background: k.tanyaThemeColor,
1543
1512
  color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
1544
- opacity: ct ? 0.8 : 1
1513
+ opacity: it ? 0.8 : 1
1545
1514
  },
1546
- children: ct ? "Adding..." : "Add to cart"
1515
+ children: it ? "Adding..." : "Add to cart"
1547
1516
  }
1548
1517
  )
1549
1518
  ] })
@@ -1571,11 +1540,11 @@ const st = (t) => {
1571
1540
  {
1572
1541
  className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
1573
1542
  placeholder: "How can I help you...",
1574
- value: St,
1543
+ value: kt,
1575
1544
  autoFocus: !0,
1576
- onChange: (c) => Ct(c.target.value),
1577
- onKeyDown: (c) => {
1578
- c.key === "Enter" && !dt && D();
1545
+ onChange: (s) => St(s.target.value),
1546
+ onKeyDown: (s) => {
1547
+ s.key === "Enter" && !st && Wt();
1579
1548
  }
1580
1549
  }
1581
1550
  ),
@@ -1583,10 +1552,10 @@ const st = (t) => {
1583
1552
  "button",
1584
1553
  {
1585
1554
  type: "submit",
1586
- disabled: dt,
1555
+ disabled: st,
1587
1556
  className: "p-3",
1588
- onClick: () => D(),
1589
- children: dt ? /* @__PURE__ */ a(
1557
+ onClick: () => Wt(),
1558
+ children: st ? /* @__PURE__ */ a(
1590
1559
  "div",
1591
1560
  {
1592
1561
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -1620,7 +1589,7 @@ const st = (t) => {
1620
1589
  ]
1621
1590
  }
1622
1591
  ),
1623
- /* @__PURE__ */ a(Er, {})
1592
+ /* @__PURE__ */ a(Ir, {})
1624
1593
  ] })
1625
1594
  ]
1626
1595
  }
@@ -1635,7 +1604,7 @@ var ne = function(t, e) {
1635
1604
  for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1636
1605
  }, ne(t, e);
1637
1606
  };
1638
- function Or(t, e) {
1607
+ function Er(t, e) {
1639
1608
  if (typeof e != "function" && e !== null)
1640
1609
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1641
1610
  ne(t, e);
@@ -1648,12 +1617,12 @@ var X = function() {
1648
1617
  return X = Object.assign || function(e) {
1649
1618
  for (var r, o = 1, n = arguments.length; o < n; o++) {
1650
1619
  r = arguments[o];
1651
- for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
1620
+ for (var l in r) Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
1652
1621
  }
1653
1622
  return e;
1654
1623
  }, X.apply(this, arguments);
1655
1624
  };
1656
- function Pr(t, e) {
1625
+ function Tr(t, e) {
1657
1626
  var r = {};
1658
1627
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
1659
1628
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1661,50 +1630,50 @@ function Pr(t, e) {
1661
1630
  e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
1662
1631
  return r;
1663
1632
  }
1664
- var Qt = "Invariant Violation", _e = Object.setPrototypeOf, $r = _e === void 0 ? function(t, e) {
1633
+ var Qt = "Invariant Violation", Ce = Object.setPrototypeOf, Or = Ce === void 0 ? function(t, e) {
1665
1634
  return t.__proto__ = e, t;
1666
- } : _e, Ye = (
1635
+ } : Ce, Ve = (
1667
1636
  /** @class */
1668
1637
  (function(t) {
1669
- Or(e, t);
1638
+ Er(e, t);
1670
1639
  function e(r) {
1671
1640
  r === void 0 && (r = Qt);
1672
1641
  var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1673
- return o.framesToPop = 1, o.name = Qt, $r(o, e.prototype), o;
1642
+ return o.framesToPop = 1, o.name = Qt, Or(o, e.prototype), o;
1674
1643
  }
1675
1644
  return e;
1676
1645
  })(Error)
1677
1646
  );
1678
- function at(t, e) {
1647
+ function Z(t, e) {
1679
1648
  if (!t)
1680
- throw new Ye(e);
1649
+ throw new Ve(e);
1681
1650
  }
1682
- var Ke = ["debug", "log", "warn", "error", "silent"], zr = Ke.indexOf("log");
1683
- function Bt(t) {
1651
+ var Ye = ["debug", "log", "warn", "error", "silent"], Pr = Ye.indexOf("log");
1652
+ function Lt(t) {
1684
1653
  return function() {
1685
- if (Ke.indexOf(t) >= zr) {
1654
+ if (Ye.indexOf(t) >= Pr) {
1686
1655
  var e = console[t] || console.log;
1687
1656
  return e.apply(console, arguments);
1688
1657
  }
1689
1658
  };
1690
1659
  }
1691
1660
  (function(t) {
1692
- t.debug = Bt("debug"), t.log = Bt("log"), t.warn = Bt("warn"), t.error = Bt("error");
1693
- })(at || (at = {}));
1694
- var Je = "3.14.0";
1695
- function xt(t) {
1661
+ t.debug = Lt("debug"), t.log = Lt("log"), t.warn = Lt("warn"), t.error = Lt("error");
1662
+ })(Z || (Z = {}));
1663
+ var Re = "3.14.0";
1664
+ function gt(t) {
1696
1665
  try {
1697
1666
  return t();
1698
1667
  } catch {
1699
1668
  }
1700
1669
  }
1701
- const ae = xt(function() {
1670
+ const ae = gt(function() {
1702
1671
  return globalThis;
1703
- }) || xt(function() {
1672
+ }) || gt(function() {
1704
1673
  return window;
1705
- }) || xt(function() {
1674
+ }) || gt(function() {
1706
1675
  return self;
1707
- }) || xt(function() {
1676
+ }) || gt(function() {
1708
1677
  return global;
1709
1678
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1710
1679
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1712,21 +1681,21 @@ const ae = xt(function() {
1712
1681
  // detect syntactic usage of the Function constructor. If you think you can
1713
1682
  // improve your static analysis to detect this obfuscation, think again. This
1714
1683
  // is an arms race you cannot win, at least not in JavaScript.
1715
- xt(function() {
1716
- return xt.constructor("return this")();
1684
+ gt(function() {
1685
+ return gt.constructor("return this")();
1717
1686
  });
1718
- var Fe = /* @__PURE__ */ new Map();
1719
- function jr(t) {
1720
- var e = Fe.get(t) || 1;
1721
- return Fe.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1687
+ var _e = /* @__PURE__ */ new Map();
1688
+ function $r(t) {
1689
+ var e = _e.get(t) || 1;
1690
+ return _e.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1722
1691
  }
1723
- function Ar(t, e) {
1724
- var r = jr("stringifyForDisplay");
1692
+ function zr(t, e) {
1693
+ var r = $r("stringifyForDisplay");
1725
1694
  return JSON.stringify(t, function(o, n) {
1726
1695
  return n === void 0 ? r : n;
1727
1696
  }, e).split(JSON.stringify(r)).join("<undefined>");
1728
1697
  }
1729
- function Ut(t) {
1698
+ function Bt(t) {
1730
1699
  return function(e) {
1731
1700
  for (var r = [], o = 1; o < arguments.length; o++)
1732
1701
  r[o - 1] = arguments[o];
@@ -1740,41 +1709,41 @@ function Ut(t) {
1740
1709
  var Zt = Object.assign(function(e, r) {
1741
1710
  for (var o = [], n = 2; n < arguments.length; n++)
1742
1711
  o[n - 2] = arguments[n];
1743
- e || at(e, le(r, o) || ce(r, o));
1712
+ e || Z(e, le(r, o) || ce(r, o));
1744
1713
  }, {
1745
- debug: Ut(at.debug),
1746
- log: Ut(at.log),
1747
- warn: Ut(at.warn),
1748
- error: Ut(at.error)
1714
+ debug: Bt(Z.debug),
1715
+ log: Bt(Z.log),
1716
+ warn: Bt(Z.warn),
1717
+ error: Bt(Z.error)
1749
1718
  });
1750
- function We(t) {
1719
+ function Ke(t) {
1751
1720
  for (var e = [], r = 1; r < arguments.length; r++)
1752
1721
  e[r - 1] = arguments[r];
1753
- return new Ye(le(t, e) || ce(t, e));
1722
+ return new Ve(le(t, e) || ce(t, e));
1754
1723
  }
1755
- var Ie = Symbol.for("ApolloErrorMessageHandler_" + Je);
1756
- function Ge(t) {
1724
+ var Fe = Symbol.for("ApolloErrorMessageHandler_" + Re);
1725
+ function Je(t) {
1757
1726
  if (typeof t == "string")
1758
1727
  return t;
1759
1728
  try {
1760
- return Ar(t, 2).slice(0, 1e3);
1729
+ return zr(t, 2).slice(0, 1e3);
1761
1730
  } catch {
1762
1731
  return "<non-serializable>";
1763
1732
  }
1764
1733
  }
1765
1734
  function le(t, e) {
1766
1735
  if (e === void 0 && (e = []), !!t)
1767
- return ae[Ie] && ae[Ie](t, e.map(Ge));
1736
+ return ae[Fe] && ae[Fe](t, e.map(Je));
1768
1737
  }
1769
1738
  function ce(t, e) {
1770
1739
  if (e === void 0 && (e = []), !!t)
1771
1740
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1772
- version: Je,
1741
+ version: Re,
1773
1742
  message: t,
1774
- args: e.map(Ge)
1743
+ args: e.map(Je)
1775
1744
  })));
1776
1745
  }
1777
- function Dr(t) {
1746
+ function jr(t) {
1778
1747
  return t.definitions.filter(function(e) {
1779
1748
  return e.kind === "OperationDefinition" && !!e.name;
1780
1749
  }).map(function(e) {
@@ -1782,13 +1751,13 @@ function Dr(t) {
1782
1751
  })[0] || null;
1783
1752
  }
1784
1753
  let N = null;
1785
- const Ne = {};
1786
- let Lr = 1;
1787
- const Br = () => class {
1754
+ const Ie = {};
1755
+ let Dr = 1;
1756
+ const Ar = () => class {
1788
1757
  constructor() {
1789
1758
  this.id = [
1790
1759
  "slot",
1791
- Lr++,
1760
+ Dr++,
1792
1761
  Date.now(),
1793
1762
  Math.random().toString(36).slice(2)
1794
1763
  ].join(":");
@@ -1797,26 +1766,26 @@ const Br = () => class {
1797
1766
  for (let e = N; e; e = e.parent)
1798
1767
  if (this.id in e.slots) {
1799
1768
  const r = e.slots[this.id];
1800
- if (r === Ne)
1769
+ if (r === Ie)
1801
1770
  break;
1802
1771
  return e !== N && (N.slots[this.id] = r), !0;
1803
1772
  }
1804
- return N && (N.slots[this.id] = Ne), !1;
1773
+ return N && (N.slots[this.id] = Ie), !1;
1805
1774
  }
1806
1775
  getValue() {
1807
1776
  if (this.hasValue())
1808
1777
  return N.slots[this.id];
1809
1778
  }
1810
1779
  withValue(e, r, o, n) {
1811
- const s = {
1780
+ const l = {
1812
1781
  __proto__: null,
1813
1782
  [this.id]: e
1814
- }, l = N;
1815
- N = { parent: l, slots: s };
1783
+ }, c = N;
1784
+ N = { parent: c, slots: l };
1816
1785
  try {
1817
1786
  return r.apply(n, o);
1818
1787
  } finally {
1819
- N = l;
1788
+ N = c;
1820
1789
  }
1821
1790
  }
1822
1791
  // Capture the current context and wrap a callback function so that it
@@ -1845,27 +1814,27 @@ const Br = () => class {
1845
1814
  return e.apply(o, r);
1846
1815
  }
1847
1816
  };
1848
- function Ee(t) {
1817
+ function Ne(t) {
1849
1818
  try {
1850
1819
  return t();
1851
1820
  } catch {
1852
1821
  }
1853
1822
  }
1854
- const te = "@wry/context:Slot", Ur = (
1823
+ const te = "@wry/context:Slot", Lr = (
1855
1824
  // Prefer globalThis when available.
1856
1825
  // https://github.com/benjamn/wryware/issues/347
1857
- Ee(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1826
+ Ne(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1858
1827
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1859
1828
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1860
- Ee(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1829
+ Ne(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1861
1830
  // back to using the Array constructor as a namespace, but that was flagged in
1862
1831
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1863
1832
  /* @__PURE__ */ Object.create(null)
1864
- ), Te = Ur, de = Te[te] || // Earlier versions of this package stored the globalKey property on the Array
1833
+ ), Ee = Lr, de = Ee[te] || // Earlier versions of this package stored the globalKey property on the Array
1865
1834
  // constructor, so we check there as well, to prevent Slot class duplication.
1866
1835
  Array[te] || (function(t) {
1867
1836
  try {
1868
- Object.defineProperty(Te, te, {
1837
+ Object.defineProperty(Ee, te, {
1869
1838
  value: t,
1870
1839
  enumerable: !1,
1871
1840
  writable: !1,
@@ -1880,12 +1849,12 @@ Array[te] || (function(t) {
1880
1849
  } finally {
1881
1850
  return t;
1882
1851
  }
1883
- })(Br()), { bind: Co, noContext: _o } = de;
1852
+ })(Ar()), { bind: ko, noContext: So } = de;
1884
1853
  new de();
1885
- function qr(t, e) {
1854
+ function Br(t, e) {
1886
1855
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1887
1856
  if (r) return (r = r.call(t)).next.bind(r);
1888
- if (Array.isArray(t) || (r = Mr(t)) || e) {
1857
+ if (Array.isArray(t) || (r = Ur(t)) || e) {
1889
1858
  r && (t = r);
1890
1859
  var o = 0;
1891
1860
  return function() {
@@ -1895,28 +1864,28 @@ function qr(t, e) {
1895
1864
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1896
1865
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1897
1866
  }
1898
- function Mr(t, e) {
1867
+ function Ur(t, e) {
1899
1868
  if (t) {
1900
- if (typeof t == "string") return Oe(t, e);
1869
+ if (typeof t == "string") return Te(t, e);
1901
1870
  var r = Object.prototype.toString.call(t).slice(8, -1);
1902
1871
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
1903
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
1872
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Te(t, e);
1904
1873
  }
1905
1874
  }
1906
- function Oe(t, e) {
1875
+ function Te(t, e) {
1907
1876
  (e == null || e > t.length) && (e = t.length);
1908
1877
  for (var r = 0, o = new Array(e); r < e; r++)
1909
1878
  o[r] = t[r];
1910
1879
  return o;
1911
1880
  }
1912
- function Pe(t, e) {
1881
+ function Oe(t, e) {
1913
1882
  for (var r = 0; r < e.length; r++) {
1914
1883
  var o = e[r];
1915
1884
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1916
1885
  }
1917
1886
  }
1918
1887
  function ue(t, e, r) {
1919
- return e && Pe(t.prototype, e), r && Pe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1888
+ return e && Oe(t.prototype, e), r && Oe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1920
1889
  }
1921
1890
  var pe = function() {
1922
1891
  return typeof Symbol == "function";
@@ -1926,65 +1895,65 @@ var pe = function() {
1926
1895
  return fe(t) ? Symbol[t] : "@@" + t;
1927
1896
  };
1928
1897
  pe() && !fe("observable") && (Symbol.observable = Symbol("observable"));
1929
- var Hr = me("iterator"), ie = me("observable"), Xe = me("species");
1930
- function Jt(t, e) {
1898
+ var qr = me("iterator"), ie = me("observable"), We = me("species");
1899
+ function Kt(t, e) {
1931
1900
  var r = t[e];
1932
1901
  if (r != null) {
1933
1902
  if (typeof r != "function") throw new TypeError(r + " is not a function");
1934
1903
  return r;
1935
1904
  }
1936
1905
  }
1937
- function Nt(t) {
1906
+ function It(t) {
1938
1907
  var e = t.constructor;
1939
- return e !== void 0 && (e = e[Xe], e === null && (e = void 0)), e !== void 0 ? e : E;
1908
+ return e !== void 0 && (e = e[We], e === null && (e = void 0)), e !== void 0 ? e : E;
1940
1909
  }
1941
- function Vr(t) {
1910
+ function Mr(t) {
1942
1911
  return t instanceof E;
1943
1912
  }
1944
- function vt(t) {
1945
- vt.log ? vt.log(t) : setTimeout(function() {
1913
+ function bt(t) {
1914
+ bt.log ? bt.log(t) : setTimeout(function() {
1946
1915
  throw t;
1947
1916
  });
1948
1917
  }
1949
- function Mt(t) {
1918
+ function qt(t) {
1950
1919
  Promise.resolve().then(function() {
1951
1920
  try {
1952
1921
  t();
1953
1922
  } catch (e) {
1954
- vt(e);
1923
+ bt(e);
1955
1924
  }
1956
1925
  });
1957
1926
  }
1958
- function Qe(t) {
1927
+ function Ge(t) {
1959
1928
  var e = t._cleanup;
1960
1929
  if (e !== void 0 && (t._cleanup = void 0, !!e))
1961
1930
  try {
1962
1931
  if (typeof e == "function")
1963
1932
  e();
1964
1933
  else {
1965
- var r = Jt(e, "unsubscribe");
1934
+ var r = Kt(e, "unsubscribe");
1966
1935
  r && r.call(e);
1967
1936
  }
1968
1937
  } catch (o) {
1969
- vt(o);
1938
+ bt(o);
1970
1939
  }
1971
1940
  }
1972
1941
  function se(t) {
1973
1942
  t._observer = void 0, t._queue = void 0, t._state = "closed";
1974
1943
  }
1975
- function Rr(t) {
1944
+ function Hr(t) {
1976
1945
  var e = t._queue;
1977
1946
  if (e) {
1978
1947
  t._queue = void 0, t._state = "ready";
1979
- for (var r = 0; r < e.length && (Ze(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1948
+ for (var r = 0; r < e.length && (Xe(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1980
1949
  ;
1981
1950
  }
1982
1951
  }
1983
- function Ze(t, e, r) {
1952
+ function Xe(t, e, r) {
1984
1953
  t._state = "running";
1985
1954
  var o = t._observer;
1986
1955
  try {
1987
- var n = Jt(o, e);
1956
+ var n = Kt(o, e);
1988
1957
  switch (e) {
1989
1958
  case "next":
1990
1959
  n && n.call(o, r);
@@ -1997,10 +1966,10 @@ function Ze(t, e, r) {
1997
1966
  se(t), n && n.call(o);
1998
1967
  break;
1999
1968
  }
2000
- } catch (s) {
2001
- vt(s);
1969
+ } catch (l) {
1970
+ bt(l);
2002
1971
  }
2003
- t._state === "closed" ? Qe(t) : t._state === "running" && (t._state = "ready");
1972
+ t._state === "closed" ? Ge(t) : t._state === "running" && (t._state = "ready");
2004
1973
  }
2005
1974
  function ee(t, e, r) {
2006
1975
  if (t._state !== "closed") {
@@ -2015,35 +1984,35 @@ function ee(t, e, r) {
2015
1984
  t._state = "buffering", t._queue = [{
2016
1985
  type: e,
2017
1986
  value: r
2018
- }], Mt(function() {
2019
- return Rr(t);
1987
+ }], qt(function() {
1988
+ return Hr(t);
2020
1989
  });
2021
1990
  return;
2022
1991
  }
2023
- Ze(t, e, r);
1992
+ Xe(t, e, r);
2024
1993
  }
2025
1994
  }
2026
- var Yr = /* @__PURE__ */ (function() {
1995
+ var Vr = /* @__PURE__ */ (function() {
2027
1996
  function t(r, o) {
2028
1997
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
2029
- var n = new Kr(this);
1998
+ var n = new Yr(this);
2030
1999
  try {
2031
2000
  this._cleanup = o.call(void 0, n);
2032
- } catch (s) {
2033
- n.error(s);
2001
+ } catch (l) {
2002
+ n.error(l);
2034
2003
  }
2035
2004
  this._state === "initializing" && (this._state = "ready");
2036
2005
  }
2037
2006
  var e = t.prototype;
2038
2007
  return e.unsubscribe = function() {
2039
- this._state !== "closed" && (se(this), Qe(this));
2008
+ this._state !== "closed" && (se(this), Ge(this));
2040
2009
  }, ue(t, [{
2041
2010
  key: "closed",
2042
2011
  get: function() {
2043
2012
  return this._state === "closed";
2044
2013
  }
2045
2014
  }]), t;
2046
- })(), Kr = /* @__PURE__ */ (function() {
2015
+ })(), Yr = /* @__PURE__ */ (function() {
2047
2016
  function t(r) {
2048
2017
  this._subscription = r;
2049
2018
  }
@@ -2072,107 +2041,107 @@ var Yr = /* @__PURE__ */ (function() {
2072
2041
  next: o,
2073
2042
  error: arguments[1],
2074
2043
  complete: arguments[2]
2075
- }), new Yr(o, this._subscriber);
2044
+ }), new Vr(o, this._subscriber);
2076
2045
  }, e.forEach = function(o) {
2077
2046
  var n = this;
2078
- return new Promise(function(s, l) {
2047
+ return new Promise(function(l, c) {
2079
2048
  if (typeof o != "function") {
2080
- l(new TypeError(o + " is not a function"));
2049
+ c(new TypeError(o + " is not a function"));
2081
2050
  return;
2082
2051
  }
2083
2052
  function d() {
2084
- i.unsubscribe(), s();
2053
+ i.unsubscribe(), l();
2085
2054
  }
2086
2055
  var i = n.subscribe({
2087
- next: function(b) {
2056
+ next: function(x) {
2088
2057
  try {
2089
- o(b, d);
2058
+ o(x, d);
2090
2059
  } catch (h) {
2091
- l(h), i.unsubscribe();
2060
+ c(h), i.unsubscribe();
2092
2061
  }
2093
2062
  },
2094
- error: l,
2095
- complete: s
2063
+ error: c,
2064
+ complete: l
2096
2065
  });
2097
2066
  });
2098
2067
  }, e.map = function(o) {
2099
2068
  var n = this;
2100
2069
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2101
- var s = Nt(this);
2102
- return new s(function(l) {
2070
+ var l = It(this);
2071
+ return new l(function(c) {
2103
2072
  return n.subscribe({
2104
2073
  next: function(d) {
2105
2074
  try {
2106
2075
  d = o(d);
2107
2076
  } catch (i) {
2108
- return l.error(i);
2077
+ return c.error(i);
2109
2078
  }
2110
- l.next(d);
2079
+ c.next(d);
2111
2080
  },
2112
2081
  error: function(d) {
2113
- l.error(d);
2082
+ c.error(d);
2114
2083
  },
2115
2084
  complete: function() {
2116
- l.complete();
2085
+ c.complete();
2117
2086
  }
2118
2087
  });
2119
2088
  });
2120
2089
  }, e.filter = function(o) {
2121
2090
  var n = this;
2122
2091
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2123
- var s = Nt(this);
2124
- return new s(function(l) {
2092
+ var l = It(this);
2093
+ return new l(function(c) {
2125
2094
  return n.subscribe({
2126
2095
  next: function(d) {
2127
2096
  try {
2128
2097
  if (!o(d)) return;
2129
2098
  } catch (i) {
2130
- return l.error(i);
2099
+ return c.error(i);
2131
2100
  }
2132
- l.next(d);
2101
+ c.next(d);
2133
2102
  },
2134
2103
  error: function(d) {
2135
- l.error(d);
2104
+ c.error(d);
2136
2105
  },
2137
2106
  complete: function() {
2138
- l.complete();
2107
+ c.complete();
2139
2108
  }
2140
2109
  });
2141
2110
  });
2142
2111
  }, e.reduce = function(o) {
2143
2112
  var n = this;
2144
2113
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2145
- var s = Nt(this), l = arguments.length > 1, d = !1, i = arguments[1], b = i;
2146
- return new s(function(h) {
2114
+ var l = It(this), c = arguments.length > 1, d = !1, i = arguments[1], x = i;
2115
+ return new l(function(h) {
2147
2116
  return n.subscribe({
2148
2117
  next: function(S) {
2149
2118
  var _ = !d;
2150
- if (d = !0, !_ || l)
2119
+ if (d = !0, !_ || c)
2151
2120
  try {
2152
- b = o(b, S);
2121
+ x = o(x, S);
2153
2122
  } catch (F) {
2154
2123
  return h.error(F);
2155
2124
  }
2156
2125
  else
2157
- b = S;
2126
+ x = S;
2158
2127
  },
2159
2128
  error: function(S) {
2160
2129
  h.error(S);
2161
2130
  },
2162
2131
  complete: function() {
2163
- if (!d && !l) return h.error(new TypeError("Cannot reduce an empty sequence"));
2164
- h.next(b), h.complete();
2132
+ if (!d && !c) return h.error(new TypeError("Cannot reduce an empty sequence"));
2133
+ h.next(x), h.complete();
2165
2134
  }
2166
2135
  });
2167
2136
  });
2168
2137
  }, e.concat = function() {
2169
- for (var o = this, n = arguments.length, s = new Array(n), l = 0; l < n; l++)
2170
- s[l] = arguments[l];
2171
- var d = Nt(this);
2138
+ for (var o = this, n = arguments.length, l = new Array(n), c = 0; c < n; c++)
2139
+ l[c] = arguments[c];
2140
+ var d = It(this);
2172
2141
  return new d(function(i) {
2173
- var b, h = 0;
2142
+ var x, h = 0;
2174
2143
  function S(_) {
2175
- b = _.subscribe({
2144
+ x = _.subscribe({
2176
2145
  next: function(F) {
2177
2146
  i.next(F);
2178
2147
  },
@@ -2180,50 +2149,50 @@ var Yr = /* @__PURE__ */ (function() {
2180
2149
  i.error(F);
2181
2150
  },
2182
2151
  complete: function() {
2183
- h === s.length ? (b = void 0, i.complete()) : S(d.from(s[h++]));
2152
+ h === l.length ? (x = void 0, i.complete()) : S(d.from(l[h++]));
2184
2153
  }
2185
2154
  });
2186
2155
  }
2187
2156
  return S(o), function() {
2188
- b && (b.unsubscribe(), b = void 0);
2157
+ x && (x.unsubscribe(), x = void 0);
2189
2158
  };
2190
2159
  });
2191
2160
  }, e.flatMap = function(o) {
2192
2161
  var n = this;
2193
2162
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2194
- var s = Nt(this);
2195
- return new s(function(l) {
2163
+ var l = It(this);
2164
+ return new l(function(c) {
2196
2165
  var d = [], i = n.subscribe({
2197
2166
  next: function(h) {
2198
2167
  if (o)
2199
2168
  try {
2200
2169
  h = o(h);
2201
2170
  } catch (_) {
2202
- return l.error(_);
2171
+ return c.error(_);
2203
2172
  }
2204
- var S = s.from(h).subscribe({
2173
+ var S = l.from(h).subscribe({
2205
2174
  next: function(_) {
2206
- l.next(_);
2175
+ c.next(_);
2207
2176
  },
2208
2177
  error: function(_) {
2209
- l.error(_);
2178
+ c.error(_);
2210
2179
  },
2211
2180
  complete: function() {
2212
2181
  var _ = d.indexOf(S);
2213
- _ >= 0 && d.splice(_, 1), b();
2182
+ _ >= 0 && d.splice(_, 1), x();
2214
2183
  }
2215
2184
  });
2216
2185
  d.push(S);
2217
2186
  },
2218
2187
  error: function(h) {
2219
- l.error(h);
2188
+ c.error(h);
2220
2189
  },
2221
2190
  complete: function() {
2222
- b();
2191
+ x();
2223
2192
  }
2224
2193
  });
2225
- function b() {
2226
- i.closed && d.length === 0 && l.complete();
2194
+ function x() {
2195
+ i.closed && d.length === 0 && c.complete();
2227
2196
  }
2228
2197
  return function() {
2229
2198
  d.forEach(function(h) {
@@ -2236,20 +2205,20 @@ var Yr = /* @__PURE__ */ (function() {
2236
2205
  }, t.from = function(o) {
2237
2206
  var n = typeof this == "function" ? this : t;
2238
2207
  if (o == null) throw new TypeError(o + " is not an object");
2239
- var s = Jt(o, ie);
2240
- if (s) {
2241
- var l = s.call(o);
2242
- if (Object(l) !== l) throw new TypeError(l + " is not an object");
2243
- return Vr(l) && l.constructor === n ? l : new n(function(d) {
2244
- return l.subscribe(d);
2208
+ var l = Kt(o, ie);
2209
+ if (l) {
2210
+ var c = l.call(o);
2211
+ if (Object(c) !== c) throw new TypeError(c + " is not an object");
2212
+ return Mr(c) && c.constructor === n ? c : new n(function(d) {
2213
+ return c.subscribe(d);
2245
2214
  });
2246
2215
  }
2247
- if (fe("iterator") && (s = Jt(o, Hr), s))
2216
+ if (fe("iterator") && (l = Kt(o, qr), l))
2248
2217
  return new n(function(d) {
2249
- Mt(function() {
2218
+ qt(function() {
2250
2219
  if (!d.closed) {
2251
- for (var i = qr(s.call(o)), b; !(b = i()).done; ) {
2252
- var h = b.value;
2220
+ for (var i = Br(l.call(o)), x; !(x = i()).done; ) {
2221
+ var h = x.value;
2253
2222
  if (d.next(h), d.closed) return;
2254
2223
  }
2255
2224
  d.complete();
@@ -2258,7 +2227,7 @@ var Yr = /* @__PURE__ */ (function() {
2258
2227
  });
2259
2228
  if (Array.isArray(o))
2260
2229
  return new n(function(d) {
2261
- Mt(function() {
2230
+ qt(function() {
2262
2231
  if (!d.closed) {
2263
2232
  for (var i = 0; i < o.length; ++i)
2264
2233
  if (d.next(o[i]), d.closed) return;
@@ -2268,11 +2237,11 @@ var Yr = /* @__PURE__ */ (function() {
2268
2237
  });
2269
2238
  throw new TypeError(o + " is not observable");
2270
2239
  }, t.of = function() {
2271
- for (var o = arguments.length, n = new Array(o), s = 0; s < o; s++)
2272
- n[s] = arguments[s];
2273
- var l = typeof this == "function" ? this : t;
2274
- return new l(function(d) {
2275
- Mt(function() {
2240
+ for (var o = arguments.length, n = new Array(o), l = 0; l < o; l++)
2241
+ n[l] = arguments[l];
2242
+ var c = typeof this == "function" ? this : t;
2243
+ return new c(function(d) {
2244
+ qt(function() {
2276
2245
  if (!d.closed) {
2277
2246
  for (var i = 0; i < n.length; ++i)
2278
2247
  if (d.next(n[i]), d.closed) return;
@@ -2281,7 +2250,7 @@ var Yr = /* @__PURE__ */ (function() {
2281
2250
  });
2282
2251
  });
2283
2252
  }, ue(t, null, [{
2284
- key: Xe,
2253
+ key: We,
2285
2254
  get: function() {
2286
2255
  return this;
2287
2256
  }
@@ -2290,11 +2259,11 @@ var Yr = /* @__PURE__ */ (function() {
2290
2259
  pe() && Object.defineProperty(E, Symbol("extensions"), {
2291
2260
  value: {
2292
2261
  symbol: ie,
2293
- hostReportError: vt
2262
+ hostReportError: bt
2294
2263
  },
2295
2264
  configurable: !0
2296
2265
  });
2297
- function Jr(t) {
2266
+ function Rr(t) {
2298
2267
  var e, r = t.Symbol;
2299
2268
  if (typeof r == "function")
2300
2269
  if (r.observable)
@@ -2310,14 +2279,14 @@ function Jr(t) {
2310
2279
  e = "@@observable";
2311
2280
  return e;
2312
2281
  }
2313
- var yt;
2314
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2315
- Jr(yt);
2316
- var $e = E.prototype, ze = "@@observable";
2317
- $e[ze] || ($e[ze] = function() {
2282
+ var xt;
2283
+ typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2284
+ Rr(xt);
2285
+ var Pe = E.prototype, $e = "@@observable";
2286
+ Pe[$e] || (Pe[$e] = function() {
2318
2287
  return this;
2319
2288
  });
2320
- function Wr(t) {
2289
+ function Kr(t) {
2321
2290
  for (var e = [
2322
2291
  "query",
2323
2292
  "operationName",
@@ -2327,13 +2296,13 @@ function Wr(t) {
2327
2296
  ], r = 0, o = Object.keys(t); r < o.length; r++) {
2328
2297
  var n = o[r];
2329
2298
  if (e.indexOf(n) < 0)
2330
- throw We(58, n);
2299
+ throw Ke(58, n);
2331
2300
  }
2332
2301
  return t;
2333
2302
  }
2334
- function Gr(t, e) {
2335
- var r = X({}, t), o = function(s) {
2336
- typeof s == "function" ? r = X(X({}, r), s(r)) : r = X(X({}, r), s);
2303
+ function Jr(t, e) {
2304
+ var r = X({}, t), o = function(l) {
2305
+ typeof l == "function" ? r = X(X({}, r), l(r)) : r = X(X({}, r), l);
2337
2306
  }, n = function() {
2338
2307
  return X({}, r);
2339
2308
  };
@@ -2345,32 +2314,32 @@ function Gr(t, e) {
2345
2314
  value: n
2346
2315
  }), e;
2347
2316
  }
2348
- function Xr(t) {
2317
+ function Wr(t) {
2349
2318
  var e = {
2350
2319
  variables: t.variables || {},
2351
2320
  extensions: t.extensions || {},
2352
2321
  operationName: t.operationName,
2353
2322
  query: t.query
2354
2323
  };
2355
- return e.operationName || (e.operationName = typeof e.query != "string" ? Dr(e.query) || void 0 : ""), e;
2324
+ return e.operationName || (e.operationName = typeof e.query != "string" ? jr(e.query) || void 0 : ""), e;
2356
2325
  }
2357
- var Qr = Symbol.for("apollo.deprecations"), Zr = ae, to = new de();
2358
- function eo(t) {
2359
- return Zr[Qr] || (to.getValue() || []).includes(t);
2326
+ var Gr = Symbol.for("apollo.deprecations"), Xr = ae, Qr = new de();
2327
+ function Zr(t) {
2328
+ return Xr[Gr] || (Qr.getValue() || []).includes(t);
2360
2329
  }
2361
- function ro(t, e) {
2362
- eo(t) || e();
2330
+ function to(t, e) {
2331
+ Zr(t) || e();
2363
2332
  }
2364
- function je(t, e) {
2333
+ function ze(t, e) {
2365
2334
  return e ? e(t) : E.of();
2366
2335
  }
2367
- function Et(t) {
2368
- return typeof t == "function" ? new tr(t) : t;
2336
+ function Nt(t) {
2337
+ return typeof t == "function" ? new Qe(t) : t;
2369
2338
  }
2370
- function qt(t) {
2339
+ function Ut(t) {
2371
2340
  return t.request.length <= 1;
2372
2341
  }
2373
- var tr = (
2342
+ var Qe = (
2374
2343
  /** @class */
2375
2344
  (function() {
2376
2345
  function t(e) {
@@ -2381,40 +2350,40 @@ var tr = (
2381
2350
  return E.of();
2382
2351
  });
2383
2352
  }, t.from = function(e) {
2384
- return e.length === 0 ? t.empty() : e.map(Et).reduce(function(r, o) {
2353
+ return e.length === 0 ? t.empty() : e.map(Nt).reduce(function(r, o) {
2385
2354
  return r.concat(o);
2386
2355
  });
2387
2356
  }, t.split = function(e, r, o) {
2388
- var n = Et(r), s = Et(o || new t(je)), l;
2389
- return qt(n) && qt(s) ? l = new t(function(d) {
2390
- return e(d) ? n.request(d) || E.of() : s.request(d) || E.of();
2391
- }) : l = new t(function(d, i) {
2392
- return e(d) ? n.request(d, i) || E.of() : s.request(d, i) || E.of();
2393
- }), Object.assign(l, { left: n, right: s });
2357
+ var n = Nt(r), l = Nt(o || new t(ze)), c;
2358
+ return Ut(n) && Ut(l) ? c = new t(function(d) {
2359
+ return e(d) ? n.request(d) || E.of() : l.request(d) || E.of();
2360
+ }) : c = new t(function(d, i) {
2361
+ return e(d) ? n.request(d, i) || E.of() : l.request(d, i) || E.of();
2362
+ }), Object.assign(c, { left: n, right: l });
2394
2363
  }, t.execute = function(e, r) {
2395
- return e.request(Gr(r.context, Xr(Wr(r)))) || E.of();
2364
+ return e.request(Jr(r.context, Wr(Kr(r)))) || E.of();
2396
2365
  }, t.concat = function(e, r) {
2397
- var o = Et(e);
2398
- if (qt(o))
2366
+ var o = Nt(e);
2367
+ if (Ut(o))
2399
2368
  return globalThis.__DEV__ !== !1 && Zt.warn(47, o), o;
2400
- var n = Et(r), s;
2401
- return qt(n) ? s = new t(function(l) {
2402
- return o.request(l, function(d) {
2369
+ var n = Nt(r), l;
2370
+ return Ut(n) ? l = new t(function(c) {
2371
+ return o.request(c, function(d) {
2403
2372
  return n.request(d) || E.of();
2404
2373
  }) || E.of();
2405
- }) : s = new t(function(l, d) {
2406
- return o.request(l, function(i) {
2374
+ }) : l = new t(function(c, d) {
2375
+ return o.request(c, function(i) {
2407
2376
  return n.request(i, d) || E.of();
2408
2377
  }) || E.of();
2409
- }), Object.assign(s, { left: o, right: n });
2378
+ }), Object.assign(l, { left: o, right: n });
2410
2379
  }, t.prototype.split = function(e, r, o) {
2411
- return this.concat(t.split(e, r, o || new t(je)));
2380
+ return this.concat(t.split(e, r, o || new t(ze)));
2412
2381
  }, t.prototype.concat = function(e) {
2413
2382
  return t.concat(this, e);
2414
2383
  }, t.prototype.request = function(e, r) {
2415
- throw We(48);
2384
+ throw Ke(48);
2416
2385
  }, t.prototype.onError = function(e, r) {
2417
- if (globalThis.__DEV__ !== !1 && ro("onError", function() {
2386
+ if (globalThis.__DEV__ !== !1 && to("onError", function() {
2418
2387
  globalThis.__DEV__ !== !1 && Zt.warn(49);
2419
2388
  }), r && r.error)
2420
2389
  return r.error(e), !1;
@@ -2424,26 +2393,26 @@ var tr = (
2424
2393
  }, t;
2425
2394
  })()
2426
2395
  );
2427
- function oo(t) {
2428
- return new tr(function(e, r) {
2429
- var o = Pr(e, []);
2396
+ function eo(t) {
2397
+ return new Qe(function(e, r) {
2398
+ var o = Tr(e, []);
2430
2399
  return new E(function(n) {
2431
- var s, l = !1;
2400
+ var l, c = !1;
2432
2401
  return Promise.resolve(o).then(function(d) {
2433
2402
  return t(d, e.getContext());
2434
2403
  }).then(e.setContext).then(function() {
2435
- l || (s = r(e).subscribe({
2404
+ c || (l = r(e).subscribe({
2436
2405
  next: n.next.bind(n),
2437
2406
  error: n.error.bind(n),
2438
2407
  complete: n.complete.bind(n)
2439
2408
  }));
2440
2409
  }).catch(n.error.bind(n)), function() {
2441
- l = !0, s && s.unsubscribe();
2410
+ c = !0, l && l.unsubscribe();
2442
2411
  };
2443
2412
  });
2444
2413
  });
2445
2414
  }
2446
- const no = async () => {
2415
+ const ro = async () => {
2447
2416
  const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", o = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2448
2417
  try {
2449
2418
  const n = await T.post(
@@ -2461,30 +2430,30 @@ const no = async () => {
2461
2430
  } catch (n) {
2462
2431
  return T.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2463
2432
  }
2464
- }, ao = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", io = sr({
2465
- uri: `${ao}`
2466
- }), so = oo(async (t, { headers: e }) => {
2467
- const r = await no();
2433
+ }, oo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", no = ar({
2434
+ uri: `${oo}`
2435
+ }), ao = eo(async (t, { headers: e }) => {
2436
+ const r = await ro();
2468
2437
  return {
2469
2438
  headers: {
2470
2439
  ...e,
2471
2440
  authorization: `Bearer ${r}`
2472
2441
  }
2473
2442
  };
2474
- }), lo = new lr({
2475
- link: so.concat(io),
2476
- cache: new cr(),
2443
+ }), io = new ir({
2444
+ link: ao.concat(no),
2445
+ cache: new sr(),
2477
2446
  defaultOptions: {
2478
2447
  watchQuery: {
2479
2448
  fetchPolicy: "cache-and-network"
2480
2449
  }
2481
2450
  }
2482
- }), Fo = (t) => {
2451
+ }), Co = (t) => {
2483
2452
  const { tanyaConfig: e } = t;
2484
- return /* @__PURE__ */ a(dr, { client: lo, children: /* @__PURE__ */ a(xr, { children: /* @__PURE__ */ a(Tr, { tanyaConfig: e }) }) });
2453
+ return /* @__PURE__ */ a(lr, { client: io, children: /* @__PURE__ */ a(gr, { children: /* @__PURE__ */ a(Nr, { tanyaConfig: e }) }) });
2485
2454
  };
2486
2455
  export {
2487
- Fo as TanyaChatbot,
2488
- vo as TanyaChatbotProvider
2456
+ Co as TanyaChatbot,
2457
+ bo as TanyaChatbotProvider
2489
2458
  };
2490
2459
  //# sourceMappingURL=tanya-chatbot.es.js.map