tanya-chatbot 0.3.1 → 0.3.3

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 lt, forwardRef as pr, useState as L, createElement as fe, useRef as Pt } from "react";
2
- import { jsx as l, jsxs as p, Fragment as pe } from "react/jsx-runtime";
3
- import { createHttpLink as Qr, ApolloClient as Xr, InMemoryCache as Zr, ApolloProvider as tn } from "@apollo/client";
4
- import { Provider as en, useDispatch as hr, useSelector as Wt } from "react-redux";
5
- import { createSlice as mr, configureStore as rn } from "@reduxjs/toolkit";
6
- import * as gr from "@radix-ui/react-popover";
1
+ import { useEffect as bt, useState as P, useRef as Ft } from "react";
2
+ import { jsx as a, jsxs as u, Fragment as ee } from "react/jsx-runtime";
3
+ import { createHttpLink as ir, ApolloClient as sr, InMemoryCache as lr, ApolloProvider as cr } from "@apollo/client";
4
+ import { Provider as dr, useDispatch as Ae, useSelector as Mt } from "react-redux";
5
+ import { createSlice as De, configureStore as ur } from "@reduxjs/toolkit";
6
+ import * as Le from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import z from "axios";
9
+ import E from "axios";
10
10
  import "crypto-js";
11
- import { Icon as Le } from "@iconify/react";
12
- import { toast as W } from "react-toastify";
13
- const nn = '*,: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 pa() {
15
- return lt(() => {
11
+ import { Icon as ge } from "@iconify/react";
12
+ import { toast as U } from "react-toastify";
13
+ const pr = '*,: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 yo() {
15
+ return bt(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
- return t.textContent = nn, document.head.appendChild(t), () => {
18
+ return t.textContent = pr, document.head.appendChild(t), () => {
19
19
  document.head.removeChild(t);
20
20
  };
21
21
  }
22
22
  }, []), null;
23
23
  }
24
- const on = {
24
+ const fr = {
25
25
  store: {
26
26
  storeCode: "",
27
27
  storeName: "",
@@ -55,64 +55,63 @@ const on = {
55
55
  mobile: []
56
56
  }
57
57
  }
58
- }, wr = mr({
58
+ }, Be = De({
59
59
  name: "store",
60
- initialState: on,
60
+ initialState: fr,
61
61
  reducers: {
62
62
  setStore: (t, e) => {
63
63
  t.store = e.payload;
64
64
  }
65
65
  }
66
- }), { setStore: ha } = wr.actions, an = wr.reducer, sn = {
66
+ }), { setStore: vo } = Be.actions, mr = Be.reducer, hr = {
67
67
  product: null
68
- }, yr = mr({
68
+ }, Ue = De({
69
69
  name: "product",
70
- initialState: sn,
70
+ initialState: hr,
71
71
  reducers: {
72
72
  setProduct: (t, e) => {
73
73
  t.product = e.payload;
74
74
  }
75
75
  }
76
- }), { setProduct: he } = yr.actions, cn = yr.reducer, ln = rn({
76
+ }), { setProduct: re } = Ue.actions, wr = Ue.reducer, gr = ur({
77
77
  reducer: {
78
- store: an,
79
- product: cn
78
+ store: mr,
79
+ product: wr
80
80
  }
81
- }), un = ({ children: t }) => /* @__PURE__ */ l(en, { store: ln, children: t }), _t = (t) => {
81
+ }), br = ({ children: t }) => /* @__PURE__ */ a(dr, { store: gr, children: t }), Ht = (t) => {
82
82
  const e = new CustomEvent("reactCartUpdated", {
83
83
  detail: {
84
84
  cartUpdated: !0,
85
85
  basketId: t
86
- // any other data SFCC needs
87
86
  }
88
87
  });
89
88
  window.dispatchEvent(e);
90
89
  };
91
- function dn({
90
+ function xr({
92
91
  ...t
93
92
  }) {
94
- return /* @__PURE__ */ l(gr.Root, { "data-slot": "popover", ...t });
93
+ return /* @__PURE__ */ a(Le.Root, { "data-slot": "popover", ...t });
95
94
  }
96
- function fn({
95
+ function yr({
97
96
  ...t
98
97
  }) {
99
- return /* @__PURE__ */ l(gr.Trigger, { "data-slot": "popover-trigger", ...t });
98
+ return /* @__PURE__ */ a(Le.Trigger, { "data-slot": "popover-trigger", ...t });
100
99
  }
101
- const wt = () => ({ 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" }), br = async () => {
100
+ const st = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), qe = async () => {
102
101
  const t = "https://tanya-sfcc-server.vercel.app/";
103
102
  try {
104
- const e = await z.post(
105
- `${t}api/auth/token-bm-grant?baseUrl=${ut()}&siteId=${et()}`
103
+ const e = await E.post(
104
+ `${t}api/auth/token-bm-grant?baseUrl=${Z()}&siteId=${R()}`
106
105
  );
107
106
  return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
108
107
  } catch (e) {
109
- return z.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
108
+ return E.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
110
109
  }
111
- }, xr = async (t) => {
110
+ }, Me = async (t) => {
112
111
  const e = "https://tanya-sfcc-server.vercel.app/";
113
112
  try {
114
- const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await z.post(
115
- `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
113
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Z()}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
116
115
  {},
117
116
  {
118
117
  headers: {
@@ -121,1240 +120,167 @@ const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
121
120
  }
122
121
  }
123
122
  );
124
- return n.status === 200 && n.data ? n.data : null;
123
+ return o.status === 200 && o.data ? o.data : null;
125
124
  } catch (r) {
126
- return z.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
125
+ return E.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
127
126
  }
128
127
  };
129
- async function Ut() {
130
- var i;
131
- const t = localStorage.getItem("expires_in"), e = localStorage.getItem("access_token"), r = ((i = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : i.isGuest) || !0;
128
+ async function Ot() {
129
+ var s;
130
+ const t = localStorage.getItem("expires_in"), e = localStorage.getItem("access_token"), r = ((s = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : s.isGuest) || !0;
132
131
  if (t && e && (/* @__PURE__ */ new Date()).getTime() < parseInt(t) && (r === localStorage.getItem("isGuest") || !0))
133
132
  return console.log("access token found in local storage"), { access_token: e, expires_in: t };
134
- const { serverUrl: n } = wt(), o = JSON.parse(
133
+ const { serverUrl: o } = st(), n = JSON.parse(
135
134
  sessionStorage.getItem("customerData") || "{}"
136
- ).dwsid, a = JSON.parse(
135
+ ).dwsid, l = JSON.parse(
137
136
  sessionStorage.getItem("customerData") || "{}"
138
137
  ).usrRef;
139
138
  try {
140
- const c = r ? "unregister-auth" : "register-auth", s = await z.get(
141
- `${n}sc-api/${c}?dwsid=${o}&email=${a}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}&siteId=${et()}&token=true`,
139
+ const d = r ? "unregister-auth" : "register-auth", i = await E.get(
140
+ `${o}sc-api/${d}?dwsid=${n}&email=${l}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}&siteId=${R()}&token=true`,
142
141
  {
143
142
  withCredentials: !0
144
143
  }
145
144
  );
146
- return localStorage.setItem("access_token", s.data.access_token), localStorage.setItem(
145
+ return localStorage.setItem("access_token", i.data.access_token), localStorage.setItem(
147
146
  "expires_in",
148
- String((/* @__PURE__ */ new Date()).getTime() + s.data.expires_in * 1e3)
149
- ), localStorage.setItem("isGuest", r ? "true" : "false"), s.data;
150
- } catch (c) {
151
- console.log(c);
147
+ String((/* @__PURE__ */ new Date()).getTime() + i.data.expires_in * 1e3)
148
+ ), localStorage.setItem("isGuest", r ? "true" : "false"), i.data;
149
+ } catch (d) {
150
+ console.log(d);
152
151
  }
153
152
  }
154
- const ut = () => sessionStorage.getItem("Host"), et = () => sessionStorage.getItem("SiteId"), dt = () => sessionStorage.getItem("pubCfg"), ft = () => sessionStorage.getItem("envRef"), pt = () => sessionStorage.getItem("orgRef"), De = async (t) => {
153
+ const Z = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getItem("SiteId"), tt = () => sessionStorage.getItem("pubCfg"), et = () => sessionStorage.getItem("envRef"), rt = () => sessionStorage.getItem("orgRef"), be = async (t) => {
155
154
  console.log("fetching results");
156
- const { serverUrl: e, basePath: r } = wt();
157
- let n = "";
155
+ const { serverUrl: e, basePath: r } = st();
156
+ let o = "";
158
157
  {
159
- const o = await Ut();
160
- console.log("the token from getSearchResults", o), n = o.access_token;
158
+ const n = await Ot();
159
+ console.log("the token from getSearchResults", n), o = n.access_token;
161
160
  }
162
161
  try {
163
- const o = ut();
164
- return (await z.get(
165
- `${e}${r}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
162
+ const n = Z();
163
+ return (await E.get(
164
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
166
165
  {
167
166
  headers: {
168
167
  "Content-Type": "application/json",
169
- Authorization: `Bearer ${n}`
168
+ Authorization: `Bearer ${o}`
170
169
  }
171
170
  }
172
171
  )).data.hits;
173
- } catch (o) {
174
- throw console.error("Error fetching search results:", o), o;
172
+ } catch (n) {
173
+ throw console.error("Error fetching search results:", n), n;
175
174
  }
176
- }, vr = async (t) => {
175
+ }, He = async (t) => {
177
176
  if (!t) throw new Error("Product ID is required");
178
- const { serverUrl: e, basePath: r } = wt(), n = ut();
177
+ const { serverUrl: e, basePath: r } = st(), o = Z();
179
178
  console.log("calling access");
180
- const { access_token: o } = await Ut();
181
- return console.log(o), (await z.get(
182
- `${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
179
+ const { access_token: n } = await Ot();
180
+ return console.log(n), (await E.get(
181
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
183
182
  {
184
183
  headers: {
185
184
  "Content-Type": "application/json",
186
- Authorization: `Bearer ${o}`
185
+ Authorization: `Bearer ${n}`
187
186
  }
188
187
  }
189
188
  )).data;
190
- }, pn = async (t) => {
189
+ }, vr = async (t) => {
191
190
  if (!t) throw new Error("customerId is required");
192
- const e = await br(), { customer_token: r } = await xr(
191
+ const e = await qe(), { customer_token: r } = await Me(
193
192
  e
194
- ), { serverUrl: n, basePath: o } = wt(), i = (await Ut()).access_token;
195
- return (await z.get(
196
- `${n}${o}/get-interest?baseUrl=${ut()}&customerId=${t}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
193
+ ), { serverUrl: o, basePath: n } = st(), s = (await Ot()).access_token;
194
+ return (await E.get(
195
+ `${o}${n}/get-interest?baseUrl=${Z()}&customerId=${t}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
197
196
  {
198
197
  headers: {
199
198
  "Content-Type": "application/json",
200
- Authorization: `Bearer ${i}`
199
+ Authorization: `Bearer ${s}`
201
200
  }
202
201
  }
203
202
  )).data;
204
- }, ze = (t) => String(typeof t == "string" ? t : t["en-US"] || t), Me = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), hn = (t, e) => t.toLocaleString("en-US", {
203
+ }, 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), kr = (t, e) => t.toLocaleString("en-US", {
205
204
  style: "currency",
206
205
  currency: e || "USD"
207
- }), Ue = (t) => {
208
- var e, r, n;
206
+ }), ve = (t) => {
207
+ var e, r, o;
209
208
  return "variants" in t ? {
210
209
  centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
211
210
  currencyCode: "DOL"
212
211
  } : {
213
212
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
214
- currencyCode: (n = t.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
213
+ currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
215
214
  };
216
- }, mn = (t) => t.charAt(0).toUpperCase() + t.slice(1), Be = (t, e) => t.length < e ? t : t.slice(0, e) + "...", ae = (t) => t.split("\\n").map((e, r) => {
217
- const n = e.match(/^(\d+)\.\s(.+)/);
218
- return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
215
+ }, Sr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ke = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Wt = (t) => t.split("\\n").map((e, r) => {
216
+ const o = e.match(/^(\d+)\.\s(.+)/);
217
+ 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/>";
219
218
  }).join("");
220
- function gn(t, e) {
221
- const r = t.icons, n = t.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
222
- function a(i) {
223
- if (r[i]) return o[i] = [];
224
- if (!(i in o)) {
225
- o[i] = null;
226
- const c = n[i] && n[i].parent, s = c && a(c);
227
- s && (o[i] = [c].concat(s));
228
- }
229
- return o[i];
230
- }
231
- return Object.keys(r).concat(Object.keys(n)).forEach(a), o;
232
- }
233
- const kr = Object.freeze({
234
- left: 0,
235
- top: 0,
236
- width: 16,
237
- height: 16
238
- }), Qt = Object.freeze({
239
- rotate: 0,
240
- vFlip: !1,
241
- hFlip: !1
242
- }), Se = Object.freeze({
243
- ...kr,
244
- ...Qt
245
- }), me = Object.freeze({
246
- ...Se,
247
- body: "",
248
- hidden: !1
249
- });
250
- function wn(t, e) {
251
- const r = {};
252
- !t.hFlip != !e.hFlip && (r.hFlip = !0), !t.vFlip != !e.vFlip && (r.vFlip = !0);
253
- const n = ((t.rotate || 0) + (e.rotate || 0)) % 4;
254
- return n && (r.rotate = n), r;
255
- }
256
- function qe(t, e) {
257
- const r = wn(t, e);
258
- for (const n in me) n in Qt ? n in t && !(n in r) && (r[n] = Qt[n]) : n in e ? r[n] = e[n] : n in t && (r[n] = t[n]);
259
- return r;
260
- }
261
- function yn(t, e, r) {
262
- const n = t.icons, o = t.aliases || /* @__PURE__ */ Object.create(null);
263
- let a = {};
264
- function i(c) {
265
- a = qe(n[c] || o[c], a);
266
- }
267
- return i(e), r.forEach(i), qe(t, a);
268
- }
269
- function Sr(t, e) {
270
- const r = [];
271
- if (typeof t != "object" || typeof t.icons != "object") return r;
272
- t.not_found instanceof Array && t.not_found.forEach((o) => {
273
- e(o, null), r.push(o);
274
- });
275
- const n = gn(t);
276
- for (const o in n) {
277
- const a = n[o];
278
- a && (e(o, yn(t, o, a)), r.push(o));
279
- }
280
- return r;
281
- }
282
- const bn = {
283
- provider: "",
284
- aliases: {},
285
- not_found: {},
286
- ...kr
287
- };
288
- function ie(t, e) {
289
- for (const r in e) if (r in t && typeof t[r] != typeof e[r]) return !1;
290
- return !0;
291
- }
292
- function Ir(t) {
293
- if (typeof t != "object" || t === null) return null;
294
- const e = t;
295
- if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !ie(t, bn)) return null;
296
- const r = e.icons;
297
- for (const o in r) {
298
- const a = r[o];
299
- if (!o || typeof a.body != "string" || !ie(a, me)) return null;
300
- }
301
- const n = e.aliases || /* @__PURE__ */ Object.create(null);
302
- for (const o in n) {
303
- const a = n[o], i = a.parent;
304
- if (!o || typeof i != "string" || !r[i] && !n[i] || !ie(a, me)) return null;
305
- }
306
- return e;
307
- }
308
- const Re = /* @__PURE__ */ Object.create(null);
309
- function xn(t, e) {
310
- return {
311
- provider: t,
312
- prefix: e,
313
- icons: /* @__PURE__ */ Object.create(null),
314
- missing: /* @__PURE__ */ new Set()
315
- };
316
- }
317
- function Nt(t, e) {
318
- const r = Re[t] || (Re[t] = /* @__PURE__ */ Object.create(null));
319
- return r[e] || (r[e] = xn(t, e));
320
- }
321
- function Cr(t, e) {
322
- return Ir(e) ? Sr(e, (r, n) => {
323
- n ? t.icons[r] = n : t.missing.add(r);
324
- }) : [];
325
- }
326
- function vn(t, e, r) {
327
- try {
328
- if (typeof r.body == "string")
329
- return t.icons[e] = { ...r }, !0;
330
- } catch {
331
- }
332
- return !1;
333
- }
334
- const _r = /^[a-z0-9]+(-[a-z0-9]+)*$/, ee = (t, e, r, n = "") => {
335
- const o = t.split(":");
336
- if (t.slice(0, 1) === "@") {
337
- if (o.length < 2 || o.length > 3) return null;
338
- n = o.shift().slice(1);
339
- }
340
- if (o.length > 3 || !o.length) return null;
341
- if (o.length > 1) {
342
- const c = o.pop(), s = o.pop(), d = {
343
- provider: o.length > 0 ? o[0] : n,
344
- prefix: s,
345
- name: c
346
- };
347
- return e && !Jt(d) ? null : d;
348
- }
349
- const a = o[0], i = a.split("-");
350
- if (i.length > 1) {
351
- const c = {
352
- provider: n,
353
- prefix: i.shift(),
354
- name: i.join("-")
355
- };
356
- return e && !Jt(c) ? null : c;
357
- }
358
- if (r && n === "") {
359
- const c = {
360
- provider: n,
361
- prefix: "",
362
- name: a
363
- };
364
- return e && !Jt(c, r) ? null : c;
365
- }
366
- return null;
367
- }, Jt = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
368
- let zt = !1;
369
- function Fr(t) {
370
- return typeof t == "boolean" && (zt = t), zt;
371
- }
372
- function He(t) {
373
- const e = typeof t == "string" ? ee(t, !0, zt) : t;
374
- if (e) {
375
- const r = Nt(e.provider, e.prefix), n = e.name;
376
- return r.icons[n] || (r.missing.has(n) ? null : void 0);
377
- }
378
- }
379
- function kn(t, e) {
380
- const r = ee(t, !0, zt);
381
- if (!r) return !1;
382
- const n = Nt(r.provider, r.prefix);
383
- return e ? vn(n, r.name, e) : (n.missing.add(r.name), !0);
384
- }
385
- function Sn(t, e) {
386
- if (typeof t != "object") return !1;
387
- if (typeof e != "string" && (e = t.provider || ""), zt && !e && !t.prefix) {
388
- let o = !1;
389
- return Ir(t) && (t.prefix = "", Sr(t, (a, i) => {
390
- kn(a, i) && (o = !0);
391
- })), o;
392
- }
393
- const r = t.prefix;
394
- if (!Jt({
395
- prefix: r,
396
- name: "a"
397
- })) return !1;
398
- const n = Nt(e, r);
399
- return !!Cr(n, t);
400
- }
401
- const Nr = Object.freeze({
402
- width: null,
403
- height: null
404
- }), Er = Object.freeze({
405
- ...Nr,
406
- ...Qt
407
- }), In = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Cn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
408
- function Ve(t, e, r) {
409
- if (e === 1) return t;
410
- if (r = r || 100, typeof t == "number") return Math.ceil(t * e * r) / r;
411
- if (typeof t != "string") return t;
412
- const n = t.split(In);
413
- if (n === null || !n.length) return t;
414
- const o = [];
415
- let a = n.shift(), i = Cn.test(a);
416
- for (; ; ) {
417
- if (i) {
418
- const c = parseFloat(a);
419
- isNaN(c) ? o.push(a) : o.push(Math.ceil(c * e * r) / r);
420
- } else o.push(a);
421
- if (a = n.shift(), a === void 0) return o.join("");
422
- i = !i;
423
- }
424
- }
425
- function _n(t, e = "defs") {
426
- let r = "";
427
- const n = t.indexOf("<" + e);
428
- for (; n >= 0; ) {
429
- const o = t.indexOf(">", n), a = t.indexOf("</" + e);
430
- if (o === -1 || a === -1) break;
431
- const i = t.indexOf(">", a);
432
- if (i === -1) break;
433
- r += t.slice(o + 1, a).trim(), t = t.slice(0, n).trim() + t.slice(i + 1);
434
- }
435
- return {
436
- defs: r,
437
- content: t
438
- };
439
- }
440
- function Fn(t, e) {
441
- return t ? "<defs>" + t + "</defs>" + e : e;
442
- }
443
- function Nn(t, e, r) {
444
- const n = _n(t);
445
- return Fn(n.defs, e + n.content + r);
446
- }
447
- const En = (t) => t === "unset" || t === "undefined" || t === "none";
448
- function Tn(t, e) {
449
- const r = {
450
- ...Se,
451
- ...t
452
- }, n = {
453
- ...Er,
454
- ...e
455
- }, o = {
456
- left: r.left,
457
- top: r.top,
458
- width: r.width,
459
- height: r.height
460
- };
461
- let a = r.body;
462
- [r, n].forEach((T) => {
463
- const w = [], k = T.hFlip, M = T.vFlip;
464
- let O = T.rotate;
465
- k ? M ? O += 2 : (w.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), w.push("scale(-1 1)"), o.top = o.left = 0) : M && (w.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), w.push("scale(1 -1)"), o.top = o.left = 0);
466
- let P;
467
- switch (O < 0 && (O -= Math.floor(O / 4) * 4), O = O % 4, O) {
468
- case 1:
469
- P = o.height / 2 + o.top, w.unshift("rotate(90 " + P.toString() + " " + P.toString() + ")");
470
- break;
471
- case 2:
472
- w.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
473
- break;
474
- case 3:
475
- P = o.width / 2 + o.left, w.unshift("rotate(-90 " + P.toString() + " " + P.toString() + ")");
476
- break;
477
- }
478
- O % 2 === 1 && (o.left !== o.top && (P = o.left, o.left = o.top, o.top = P), o.width !== o.height && (P = o.width, o.width = o.height, o.height = P)), w.length && (a = Nn(a, '<g transform="' + w.join(" ") + '">', "</g>"));
479
- });
480
- const i = n.width, c = n.height, s = o.width, d = o.height;
481
- let f, h;
482
- i === null ? (h = c === null ? "1em" : c === "auto" ? d : c, f = Ve(h, s / d)) : (f = i === "auto" ? s : i, h = c === null ? Ve(f, d / s) : c === "auto" ? d : c);
483
- const m = {}, g = (T, w) => {
484
- En(w) || (m[T] = w.toString());
485
- };
486
- g("width", f), g("height", h);
487
- const S = [
488
- o.left,
489
- o.top,
490
- s,
491
- d
492
- ];
493
- return m.viewBox = S.join(" "), {
494
- attributes: m,
495
- viewBox: S,
496
- body: a
497
- };
498
- }
499
- const Pn = /\sid="(\S+)"/g, On = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
500
- let jn = 0;
501
- function $n(t, e = On) {
502
- const r = [];
503
- let n;
504
- for (; n = Pn.exec(t); ) r.push(n[1]);
505
- if (!r.length) return t;
506
- const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
507
- return r.forEach((a) => {
508
- const i = typeof e == "function" ? e(a) : e + (jn++).toString(), c = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
509
- t = t.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
510
- }), t = t.replace(new RegExp(o, "g"), ""), t;
511
- }
512
- const ge = /* @__PURE__ */ Object.create(null);
513
- function An(t, e) {
514
- ge[t] = e;
515
- }
516
- function we(t) {
517
- return ge[t] || ge[""];
518
- }
519
- function Ie(t) {
520
- let e;
521
- if (typeof t.resources == "string") e = [t.resources];
522
- else if (e = t.resources, !(e instanceof Array) || !e.length) return null;
523
- return {
524
- resources: e,
525
- path: t.path || "/",
526
- maxURL: t.maxURL || 500,
527
- rotate: t.rotate || 750,
528
- timeout: t.timeout || 5e3,
529
- random: t.random === !0,
530
- index: t.index || 0,
531
- dataAfterTimeout: t.dataAfterTimeout !== !1
532
- };
533
- }
534
- const Ce = /* @__PURE__ */ Object.create(null), Ot = ["https://api.simplesvg.com", "https://api.unisvg.com"], Kt = [];
535
- for (; Ot.length > 0; ) Ot.length === 1 || Math.random() > 0.5 ? Kt.push(Ot.shift()) : Kt.push(Ot.pop());
536
- Ce[""] = Ie({ resources: ["https://api.iconify.design"].concat(Kt) });
537
- function Ln(t, e) {
538
- const r = Ie(e);
539
- return r === null ? !1 : (Ce[t] = r, !0);
540
- }
541
- function _e(t) {
542
- return Ce[t];
543
- }
544
- const Dn = () => {
545
- let t;
546
- try {
547
- if (t = fetch, typeof t == "function") return t;
548
- } catch {
549
- }
550
- };
551
- let Ye = Dn();
552
- function zn(t, e) {
553
- const r = _e(t);
554
- if (!r) return 0;
555
- let n;
556
- if (!r.maxURL) n = 0;
557
- else {
558
- let o = 0;
559
- r.resources.forEach((i) => {
560
- o = Math.max(o, i.length);
561
- });
562
- const a = e + ".json?icons=";
563
- n = r.maxURL - o - r.path.length - a.length;
564
- }
565
- return n;
566
- }
567
- function Mn(t) {
568
- return t === 404;
569
- }
570
- const Un = (t, e, r) => {
571
- const n = [], o = zn(t, e), a = "icons";
572
- let i = {
573
- type: a,
574
- provider: t,
575
- prefix: e,
576
- icons: []
577
- }, c = 0;
578
- return r.forEach((s, d) => {
579
- c += s.length + 1, c >= o && d > 0 && (n.push(i), i = {
580
- type: a,
581
- provider: t,
582
- prefix: e,
583
- icons: []
584
- }, c = s.length), i.icons.push(s);
585
- }), n.push(i), n;
586
- };
587
- function Bn(t) {
588
- if (typeof t == "string") {
589
- const e = _e(t);
590
- if (e) return e.path;
591
- }
592
- return "/";
593
- }
594
- const qn = (t, e, r) => {
595
- if (!Ye) {
596
- r("abort", 424);
597
- return;
598
- }
599
- let n = Bn(e.provider);
600
- switch (e.type) {
601
- case "icons": {
602
- const a = e.prefix, c = e.icons.join(","), s = new URLSearchParams({ icons: c });
603
- n += a + ".json?" + s.toString();
604
- break;
605
- }
606
- case "custom": {
607
- const a = e.uri;
608
- n += a.slice(0, 1) === "/" ? a.slice(1) : a;
609
- break;
610
- }
611
- default:
612
- r("abort", 400);
613
- return;
614
- }
615
- let o = 503;
616
- Ye(t + n).then((a) => {
617
- const i = a.status;
618
- if (i !== 200) {
619
- setTimeout(() => {
620
- r(Mn(i) ? "abort" : "next", i);
621
- });
622
- return;
623
- }
624
- return o = 501, a.json();
625
- }).then((a) => {
626
- if (typeof a != "object" || a === null) {
627
- setTimeout(() => {
628
- a === 404 ? r("abort", a) : r("next", o);
629
- });
630
- return;
631
- }
632
- setTimeout(() => {
633
- r("success", a);
634
- });
635
- }).catch(() => {
636
- r("next", o);
637
- });
638
- }, Rn = {
639
- prepare: Un,
640
- send: qn
641
- };
642
- function Tr(t, e) {
643
- t.forEach((r) => {
644
- const n = r.loaderCallbacks;
645
- n && (r.loaderCallbacks = n.filter((o) => o.id !== e));
646
- });
647
- }
648
- function Hn(t) {
649
- t.pendingCallbacksFlag || (t.pendingCallbacksFlag = !0, setTimeout(() => {
650
- t.pendingCallbacksFlag = !1;
651
- const e = t.loaderCallbacks ? t.loaderCallbacks.slice(0) : [];
652
- if (!e.length) return;
653
- let r = !1;
654
- const n = t.provider, o = t.prefix;
655
- e.forEach((a) => {
656
- const i = a.icons, c = i.pending.length;
657
- i.pending = i.pending.filter((s) => {
658
- if (s.prefix !== o) return !0;
659
- const d = s.name;
660
- if (t.icons[d]) i.loaded.push({
661
- provider: n,
662
- prefix: o,
663
- name: d
664
- });
665
- else if (t.missing.has(d)) i.missing.push({
666
- provider: n,
667
- prefix: o,
668
- name: d
669
- });
670
- else
671
- return r = !0, !0;
672
- return !1;
673
- }), i.pending.length !== c && (r || Tr([t], a.id), a.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), a.abort));
674
- });
675
- }));
676
- }
677
- let Vn = 0;
678
- function Yn(t, e, r) {
679
- const n = Vn++, o = Tr.bind(null, r, n);
680
- if (!e.pending.length) return o;
681
- const a = {
682
- id: n,
683
- icons: e,
684
- callback: t,
685
- abort: o
686
- };
687
- return r.forEach((i) => {
688
- (i.loaderCallbacks || (i.loaderCallbacks = [])).push(a);
689
- }), o;
690
- }
691
- function Jn(t) {
692
- const e = {
693
- loaded: [],
694
- missing: [],
695
- pending: []
696
- }, r = /* @__PURE__ */ Object.create(null);
697
- t.sort((o, a) => o.provider !== a.provider ? o.provider.localeCompare(a.provider) : o.prefix !== a.prefix ? o.prefix.localeCompare(a.prefix) : o.name.localeCompare(a.name));
698
- let n = {
699
- provider: "",
700
- prefix: "",
701
- name: ""
702
- };
703
- return t.forEach((o) => {
704
- if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
705
- n = o;
706
- const a = o.provider, i = o.prefix, c = o.name, s = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), d = s[i] || (s[i] = Nt(a, i));
707
- let f;
708
- c in d.icons ? f = e.loaded : i === "" || d.missing.has(c) ? f = e.missing : f = e.pending;
709
- const h = {
710
- provider: a,
711
- prefix: i,
712
- name: c
713
- };
714
- f.push(h);
715
- }), e;
716
- }
717
- function Kn(t, e = !0, r = !1) {
718
- const n = [];
719
- return t.forEach((o) => {
720
- const a = typeof o == "string" ? ee(o, e, r) : o;
721
- a && n.push(a);
722
- }), n;
723
- }
724
- const Gn = {
725
- resources: [],
726
- index: 0,
727
- timeout: 2e3,
728
- rotate: 750,
729
- random: !1,
730
- dataAfterTimeout: !1
731
- };
732
- function Wn(t, e, r, n) {
733
- const o = t.resources.length, a = t.random ? Math.floor(Math.random() * o) : t.index;
734
- let i;
735
- if (t.random) {
736
- let _ = t.resources.slice(0);
737
- for (i = []; _.length > 1; ) {
738
- const j = Math.floor(Math.random() * _.length);
739
- i.push(_[j]), _ = _.slice(0, j).concat(_.slice(j + 1));
740
- }
741
- i = i.concat(_);
742
- } else i = t.resources.slice(a).concat(t.resources.slice(0, a));
743
- const c = Date.now();
744
- let s = "pending", d = 0, f, h = null, m = [], g = [];
745
- typeof n == "function" && g.push(n);
746
- function S() {
747
- h && (clearTimeout(h), h = null);
748
- }
749
- function T() {
750
- s === "pending" && (s = "aborted"), S(), m.forEach((_) => {
751
- _.status === "pending" && (_.status = "aborted");
752
- }), m = [];
753
- }
754
- function w(_, j) {
755
- j && (g = []), typeof _ == "function" && g.push(_);
756
- }
757
- function k() {
758
- return {
759
- startTime: c,
760
- payload: e,
761
- status: s,
762
- queriesSent: d,
763
- queriesPending: m.length,
764
- subscribe: w,
765
- abort: T
766
- };
767
- }
768
- function M() {
769
- s = "failed", g.forEach((_) => {
770
- _(void 0, f);
771
- });
772
- }
773
- function O() {
774
- m.forEach((_) => {
775
- _.status === "pending" && (_.status = "aborted");
776
- }), m = [];
777
- }
778
- function P(_, j, V) {
779
- const X = j !== "success";
780
- switch (m = m.filter((U) => U !== _), s) {
781
- case "pending":
782
- break;
783
- case "failed":
784
- if (X || !t.dataAfterTimeout) return;
785
- break;
786
- default:
787
- return;
788
- }
789
- if (j === "abort") {
790
- f = V, M();
791
- return;
792
- }
793
- if (X) {
794
- f = V, m.length || (i.length ? Q() : M());
795
- return;
796
- }
797
- if (S(), O(), !t.random) {
798
- const U = t.resources.indexOf(_.resource);
799
- U !== -1 && U !== t.index && (t.index = U);
800
- }
801
- s = "completed", g.forEach((U) => {
802
- U(V);
803
- });
804
- }
805
- function Q() {
806
- if (s !== "pending") return;
807
- S();
808
- const _ = i.shift();
809
- if (_ === void 0) {
810
- if (m.length) {
811
- h = setTimeout(() => {
812
- S(), s === "pending" && (O(), M());
813
- }, t.timeout);
814
- return;
815
- }
816
- M();
817
- return;
818
- }
819
- const j = {
820
- status: "pending",
821
- resource: _,
822
- callback: (V, X) => {
823
- P(j, V, X);
824
- }
825
- };
826
- m.push(j), d++, h = setTimeout(Q, t.rotate), r(_, e, j.callback);
827
- }
828
- return setTimeout(Q), k;
829
- }
830
- function Pr(t) {
831
- const e = {
832
- ...Gn,
833
- ...t
834
- };
835
- let r = [];
836
- function n() {
837
- r = r.filter((c) => c().status === "pending");
838
- }
839
- function o(c, s, d) {
840
- const f = Wn(e, c, s, (h, m) => {
841
- n(), d && d(h, m);
842
- });
843
- return r.push(f), f;
844
- }
845
- function a(c) {
846
- return r.find((s) => c(s)) || null;
847
- }
848
- return {
849
- query: o,
850
- find: a,
851
- setIndex: (c) => {
852
- e.index = c;
853
- },
854
- getIndex: () => e.index,
855
- cleanup: n
856
- };
857
- }
858
- function Je() {
859
- }
860
- const se = /* @__PURE__ */ Object.create(null);
861
- function Qn(t) {
862
- if (!se[t]) {
863
- const e = _e(t);
864
- if (!e) return;
865
- const r = Pr(e), n = {
866
- config: e,
867
- redundancy: r
868
- };
869
- se[t] = n;
870
- }
871
- return se[t];
872
- }
873
- function Xn(t, e, r) {
874
- let n, o;
875
- if (typeof t == "string") {
876
- const a = we(t);
877
- if (!a)
878
- return r(void 0, 424), Je;
879
- o = a.send;
880
- const i = Qn(t);
881
- i && (n = i.redundancy);
882
- } else {
883
- const a = Ie(t);
884
- if (a) {
885
- n = Pr(a);
886
- const i = t.resources ? t.resources[0] : "", c = we(i);
887
- c && (o = c.send);
888
- }
889
- }
890
- return !n || !o ? (r(void 0, 424), Je) : n.query(e, o, r)().abort;
891
- }
892
- function Ke() {
893
- }
894
- function Zn(t) {
895
- t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
896
- t.iconsLoaderFlag = !1, Hn(t);
897
- }));
898
- }
899
- function to(t) {
900
- const e = [], r = [];
901
- return t.forEach((n) => {
902
- (n.match(_r) ? e : r).push(n);
903
- }), {
904
- valid: e,
905
- invalid: r
906
- };
907
- }
908
- function jt(t, e, r) {
909
- function n() {
910
- const o = t.pendingIcons;
911
- e.forEach((a) => {
912
- o && o.delete(a), t.icons[a] || t.missing.add(a);
913
- });
914
- }
915
- if (r && typeof r == "object") try {
916
- if (!Cr(t, r).length) {
917
- n();
918
- return;
919
- }
920
- } catch (o) {
921
- console.error(o);
922
- }
923
- n(), Zn(t);
924
- }
925
- function Ge(t, e) {
926
- t instanceof Promise ? t.then((r) => {
927
- e(r);
928
- }).catch(() => {
929
- e(null);
930
- }) : e(t);
931
- }
932
- function eo(t, e) {
933
- t.iconsToLoad ? t.iconsToLoad = t.iconsToLoad.concat(e).sort() : t.iconsToLoad = e, t.iconsQueueFlag || (t.iconsQueueFlag = !0, setTimeout(() => {
934
- t.iconsQueueFlag = !1;
935
- const { provider: r, prefix: n } = t, o = t.iconsToLoad;
936
- if (delete t.iconsToLoad, !o || !o.length) return;
937
- const a = t.loadIcon;
938
- if (t.loadIcons && (o.length > 1 || !a)) {
939
- Ge(t.loadIcons(o, n, r), (f) => {
940
- jt(t, o, f);
941
- });
942
- return;
943
- }
944
- if (a) {
945
- o.forEach((f) => {
946
- const h = a(f, n, r);
947
- Ge(h, (m) => {
948
- const g = m ? {
949
- prefix: n,
950
- icons: { [f]: m }
951
- } : null;
952
- jt(t, [f], g);
953
- });
954
- });
955
- return;
956
- }
957
- const { valid: i, invalid: c } = to(o);
958
- if (c.length && jt(t, c, null), !i.length) return;
959
- const s = n.match(_r) ? we(r) : null;
960
- if (!s) {
961
- jt(t, i, null);
962
- return;
963
- }
964
- s.prepare(r, n, i).forEach((f) => {
965
- Xn(r, f, (h) => {
966
- jt(t, f.icons, h);
967
- });
968
- });
969
- }));
970
- }
971
- const ro = (t, e) => {
972
- const r = Kn(t, !0, Fr()), n = Jn(r);
973
- if (!n.pending.length) {
974
- let s = !0;
975
- return e && setTimeout(() => {
976
- s && e(n.loaded, n.missing, n.pending, Ke);
977
- }), () => {
978
- s = !1;
979
- };
980
- }
981
- const o = /* @__PURE__ */ Object.create(null), a = [];
982
- let i, c;
983
- return n.pending.forEach((s) => {
984
- const { provider: d, prefix: f } = s;
985
- if (f === c && d === i) return;
986
- i = d, c = f, a.push(Nt(d, f));
987
- const h = o[d] || (o[d] = /* @__PURE__ */ Object.create(null));
988
- h[f] || (h[f] = []);
989
- }), n.pending.forEach((s) => {
990
- const { provider: d, prefix: f, name: h } = s, m = Nt(d, f), g = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
991
- g.has(h) || (g.add(h), o[d][f].push(h));
992
- }), a.forEach((s) => {
993
- const d = o[s.provider][s.prefix];
994
- d.length && eo(s, d);
995
- }), e ? Yn(e, n, a) : Ke;
996
- };
997
- function no(t, e) {
998
- const r = { ...t };
999
- for (const n in e) {
1000
- const o = e[n], a = typeof o;
1001
- n in Nr ? (o === null || o && (a === "string" || a === "number")) && (r[n] = o) : a === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
1002
- }
1003
- return r;
1004
- }
1005
- const oo = /[\s,]+/;
1006
- function ao(t, e) {
1007
- e.split(oo).forEach((r) => {
1008
- switch (r.trim()) {
1009
- case "horizontal":
1010
- t.hFlip = !0;
1011
- break;
1012
- case "vertical":
1013
- t.vFlip = !0;
1014
- break;
1015
- }
1016
- });
1017
- }
1018
- function io(t, e = 0) {
1019
- const r = t.replace(/^-?[0-9.]*/, "");
1020
- function n(o) {
1021
- for (; o < 0; ) o += 4;
1022
- return o % 4;
1023
- }
1024
- if (r === "") {
1025
- const o = parseInt(t);
1026
- return isNaN(o) ? 0 : n(o);
1027
- } else if (r !== t) {
1028
- let o = 0;
1029
- switch (r) {
1030
- case "%":
1031
- o = 25;
1032
- break;
1033
- case "deg":
1034
- o = 90;
1035
- }
1036
- if (o) {
1037
- let a = parseFloat(t.slice(0, t.length - r.length));
1038
- return isNaN(a) ? 0 : (a = a / o, a % 1 === 0 ? n(a) : 0);
1039
- }
1040
- }
1041
- return e;
1042
- }
1043
- function so(t, e) {
1044
- let r = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1045
- for (const n in e) r += " " + n + '="' + e[n] + '"';
1046
- return '<svg xmlns="http://www.w3.org/2000/svg"' + r + ">" + t + "</svg>";
1047
- }
1048
- function co(t) {
1049
- return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1050
- }
1051
- function lo(t) {
1052
- return "data:image/svg+xml," + co(t);
1053
- }
1054
- function uo(t) {
1055
- return 'url("' + lo(t) + '")';
1056
- }
1057
- let Dt;
1058
- function fo() {
1059
- try {
1060
- Dt = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
1061
- } catch {
1062
- Dt = null;
1063
- }
1064
- }
1065
- function po(t) {
1066
- return Dt === void 0 && fo(), Dt ? Dt.createHTML(t) : t;
1067
- }
1068
- const Or = {
1069
- ...Er,
1070
- inline: !1
1071
- }, ho = {
1072
- xmlns: "http://www.w3.org/2000/svg",
1073
- xmlnsXlink: "http://www.w3.org/1999/xlink",
1074
- "aria-hidden": !0,
1075
- role: "img"
1076
- }, mo = {
1077
- display: "inline-block"
1078
- }, ye = {
1079
- backgroundColor: "currentColor"
1080
- }, jr = {
1081
- backgroundColor: "transparent"
1082
- }, We = {
1083
- Image: "var(--svg)",
1084
- Repeat: "no-repeat",
1085
- Size: "100% 100%"
1086
- }, Qe = {
1087
- WebkitMask: ye,
1088
- mask: ye,
1089
- background: jr
1090
- };
1091
- for (const t in Qe) {
1092
- const e = Qe[t];
1093
- for (const r in We)
1094
- e[t + r] = We[r];
1095
- }
1096
- const go = {
1097
- ...Or,
1098
- inline: !0
1099
- };
1100
- function Xe(t) {
1101
- return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
1102
- }
1103
- const wo = (t, e, r) => {
1104
- const n = e.inline ? go : Or, o = no(n, e), a = e.mode || "svg", i = {}, c = e.style || {}, s = {
1105
- ...a === "svg" ? ho : {}
1106
- };
1107
- if (r) {
1108
- const w = ee(r, !1, !0);
1109
- if (w) {
1110
- const k = ["iconify"], M = [
1111
- "provider",
1112
- "prefix"
1113
- ];
1114
- for (const O of M)
1115
- w[O] && k.push("iconify--" + w[O]);
1116
- s.className = k.join(" ");
1117
- }
1118
- }
1119
- for (let w in e) {
1120
- const k = e[w];
1121
- if (k !== void 0)
1122
- switch (w) {
1123
- // Properties to ignore
1124
- case "icon":
1125
- case "style":
1126
- case "children":
1127
- case "onLoad":
1128
- case "mode":
1129
- case "ssr":
1130
- case "fallback":
1131
- break;
1132
- // Forward ref
1133
- case "_ref":
1134
- s.ref = k;
1135
- break;
1136
- // Merge class names
1137
- case "className":
1138
- s[w] = (s[w] ? s[w] + " " : "") + k;
1139
- break;
1140
- // Boolean attributes
1141
- case "inline":
1142
- case "hFlip":
1143
- case "vFlip":
1144
- o[w] = k === !0 || k === "true" || k === 1;
1145
- break;
1146
- // Flip as string: 'horizontal,vertical'
1147
- case "flip":
1148
- typeof k == "string" && ao(o, k);
1149
- break;
1150
- // Color: copy to style
1151
- case "color":
1152
- i.color = k;
1153
- break;
1154
- // Rotation as string
1155
- case "rotate":
1156
- typeof k == "string" ? o[w] = io(k) : typeof k == "number" && (o[w] = k);
1157
- break;
1158
- // Remove aria-hidden
1159
- case "ariaHidden":
1160
- case "aria-hidden":
1161
- k !== !0 && k !== "true" && delete s["aria-hidden"];
1162
- break;
1163
- // Copy missing property if it does not exist in customisations
1164
- default:
1165
- n[w] === void 0 && (s[w] = k);
1166
- }
1167
- }
1168
- const d = Tn(t, o), f = d.attributes;
1169
- if (o.inline && (i.verticalAlign = "-0.125em"), a === "svg") {
1170
- s.style = {
1171
- ...i,
1172
- ...c
1173
- }, Object.assign(s, f);
1174
- let w = 0, k = e.id;
1175
- return typeof k == "string" && (k = k.replace(/-/g, "_")), s.dangerouslySetInnerHTML = {
1176
- __html: po($n(d.body, k ? () => k + "ID" + w++ : "iconifyReact"))
1177
- }, fe("svg", s);
1178
- }
1179
- const { body: h, width: m, height: g } = t, S = a === "mask" || (a === "bg" ? !1 : h.indexOf("currentColor") !== -1), T = so(h, {
1180
- ...f,
1181
- width: m + "",
1182
- height: g + ""
1183
- });
1184
- return s.style = {
1185
- ...i,
1186
- "--svg": uo(T),
1187
- width: Xe(f.width),
1188
- height: Xe(f.height),
1189
- ...mo,
1190
- ...S ? ye : jr,
1191
- ...c
1192
- }, fe("span", s);
1193
- };
1194
- Fr(!0);
1195
- An("", Rn);
1196
- if (typeof document < "u" && typeof window < "u") {
1197
- const t = window;
1198
- if (t.IconifyPreload !== void 0) {
1199
- const e = t.IconifyPreload, r = "Invalid IconifyPreload syntax.";
1200
- typeof e == "object" && e !== null && (e instanceof Array ? e : [e]).forEach((n) => {
1201
- try {
1202
- // Check if item is an object and not null/array
1203
- (typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
1204
- typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
1205
- !Sn(n)) && console.error(r);
1206
- } catch {
1207
- console.error(r);
1208
- }
1209
- });
1210
- }
1211
- if (t.IconifyProviders !== void 0) {
1212
- const e = t.IconifyProviders;
1213
- if (typeof e == "object" && e !== null)
1214
- for (let r in e) {
1215
- const n = "IconifyProviders[" + r + "] is invalid.";
1216
- try {
1217
- const o = e[r];
1218
- if (typeof o != "object" || !o || o.resources === void 0)
1219
- continue;
1220
- Ln(r, o) || console.error(n);
1221
- } catch {
1222
- console.error(n);
1223
- }
1224
- }
1225
- }
1226
- }
1227
- function $r(t) {
1228
- const [e, r] = L(!!t.ssr), [n, o] = L({});
1229
- function a(g) {
1230
- if (g) {
1231
- const S = t.icon;
1232
- if (typeof S == "object")
1233
- return {
1234
- name: "",
1235
- data: S
1236
- };
1237
- const T = He(S);
1238
- if (T)
1239
- return {
1240
- name: S,
1241
- data: T
1242
- };
1243
- }
1244
- return {
1245
- name: ""
1246
- };
1247
- }
1248
- const [i, c] = L(a(!!t.ssr));
1249
- function s() {
1250
- const g = n.callback;
1251
- g && (g(), o({}));
1252
- }
1253
- function d(g) {
1254
- if (JSON.stringify(i) !== JSON.stringify(g))
1255
- return s(), c(g), !0;
1256
- }
1257
- function f() {
1258
- var g;
1259
- const S = t.icon;
1260
- if (typeof S == "object") {
1261
- d({
1262
- name: "",
1263
- data: S
1264
- });
1265
- return;
1266
- }
1267
- const T = He(S);
1268
- if (d({
1269
- name: S,
1270
- data: T
1271
- }))
1272
- if (T === void 0) {
1273
- const w = ro([S], f);
1274
- o({
1275
- callback: w
1276
- });
1277
- } else T && ((g = t.onLoad) === null || g === void 0 || g.call(t, S));
1278
- }
1279
- lt(() => (r(!0), s), []), lt(() => {
1280
- e && f();
1281
- }, [t.icon, e]);
1282
- const { name: h, data: m } = i;
1283
- return m ? wo({
1284
- ...Se,
1285
- ...m
1286
- }, t, h) : t.children ? t.children : t.fallback ? t.fallback : fe("span", {});
1287
- }
1288
- pr((t, e) => $r({
1289
- ...t,
1290
- _ref: e
1291
- }));
1292
- pr((t, e) => $r({
1293
- inline: !0,
1294
- ...t,
1295
- _ref: e
1296
- }));
1297
- function yo() {
1298
- const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = L(t);
1299
- return lt(() => {
1300
- const n = () => r(t());
1301
- return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
219
+ function Cr() {
220
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = P(t);
221
+ return bt(() => {
222
+ const o = () => r(t());
223
+ return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
1302
224
  }, []), e;
1303
225
  }
1304
- const bo = ({
226
+ const _r = ({
1305
227
  product: t
1306
228
  }) => {
1307
- const e = hr(), r = yo(), [n, o] = L(0), a = () => {
1308
- o(
1309
- (s) => s + r >= t.length ? 0 : s + r
229
+ const e = Ae(), r = Cr(), [o, n] = P(0), l = () => {
230
+ n(
231
+ (i) => i + r >= t.length ? 0 : i + r
1310
232
  );
1311
- }, i = () => {
1312
- o(
1313
- (s) => s - r < 0 ? t.length - (t.length % r || r) : s - r
233
+ }, s = () => {
234
+ n(
235
+ (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
1314
236
  );
1315
- }, c = async (s) => {
1316
- const d = await vr(s);
1317
- e(he(d));
237
+ }, d = async (i) => {
238
+ const x = await He(i);
239
+ e(re(x));
1318
240
  };
1319
- return /* @__PURE__ */ l("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ p("div", { className: "flex items-center justify-center gap-4 relative", children: [
1320
- (t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
241
+ return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
242
+ (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
1321
243
  "button",
1322
244
  {
1323
- onClick: i,
245
+ onClick: s,
1324
246
  className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
247
+ style: {
248
+ height: "30px",
249
+ width: "30px"
250
+ },
1325
251
  children: "<"
1326
252
  }
1327
253
  ),
1328
- /* @__PURE__ */ l("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(n, n + r).map((s) => {
1329
- var d, f, h, m;
1330
- return /* @__PURE__ */ p(
254
+ /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
255
+ var x, b, C, S;
256
+ return /* @__PURE__ */ u(
1331
257
  "div",
1332
258
  {
1333
259
  className: "flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",
1334
260
  onClick: () => {
1335
- c(s.product_id ?? s.productId);
261
+ d(i.product_id ?? i.productId);
1336
262
  },
1337
263
  children: [
1338
- /* @__PURE__ */ l("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ l(
264
+ /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
1339
265
  "img",
1340
266
  {
1341
- src: ((d = Me(s)[0]) == null ? void 0 : d.link) || Me(s)[0] || // fallback if it's a string
267
+ src: ((x = ye(i)[0]) == null ? void 0 : x.link) || ye(i)[0] || // fallback if it's a string
1342
268
  "https://via.placeholder.com/120",
1343
- alt: s != null && s.productName ? s.productName : "Product",
269
+ alt: i != null && i.productName ? i.productName : "Product",
1344
270
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
1345
271
  }
1346
272
  ) }),
1347
- /* @__PURE__ */ p(
273
+ /* @__PURE__ */ u(
1348
274
  "div",
1349
275
  {
1350
276
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
1351
277
  children: [
1352
- /* @__PURE__ */ p("div", { className: "relative inline-block group", children: [
1353
- /* @__PURE__ */ l("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : Be(
1354
- ze((f = s == null ? void 0 : s.name) == null ? void 0 : f["en-US"]),
278
+ /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
279
+ /* @__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(
280
+ xe((b = i == null ? void 0 : i.name) == null ? void 0 : b["en-US"]),
1355
281
  60
1356
282
  ) || "Product" }),
1357
- /* @__PURE__ */ l(
283
+ /* @__PURE__ */ a(
1358
284
  "div",
1359
285
  {
1360
286
  className: "absolute left-0 top-full mt-1 w-max max-w-[200px] p-2 bg-white shadow-lg text-black text-xs rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100 z-50 pointer-events-auto",
@@ -1365,21 +291,21 @@ const bo = ({
1365
291
  marginBottom: "5px",
1366
292
  zIndex: 50
1367
293
  },
1368
- children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : Be(
1369
- ze((h = s == null ? void 0 : s.name) == null ? void 0 : h["en-US"]),
294
+ children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
295
+ xe((C = i == null ? void 0 : i.name) == null ? void 0 : C["en-US"]),
1370
296
  60
1371
297
  ) || "Product"
1372
298
  }
1373
299
  )
1374
300
  ] }),
1375
- /* @__PURE__ */ p("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
1376
- /* @__PURE__ */ l("p", { children: hn(
1377
- s != null && s.price ? Number(s == null ? void 0 : s.price) : Ue(s).centAmount || 0,
1378
- (m = Ue(s)) == null ? void 0 : m.currencyCode
301
+ /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
302
+ /* @__PURE__ */ a("p", { children: kr(
303
+ i != null && i.price ? Number(i == null ? void 0 : i.price) : ve(i).centAmount || 0,
304
+ (S = ve(i)) == null ? void 0 : S.currencyCode
1379
305
  ) }),
1380
- /* @__PURE__ */ p("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
306
+ /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
1381
307
  "$",
1382
- Number(s == null ? void 0 : s.price).toFixed(2) ?? 5
308
+ Number(i == null ? void 0 : i.price).toFixed(2) ?? 5
1383
309
  ] })
1384
310
  ] })
1385
311
  ]
@@ -1387,19 +313,23 @@ const bo = ({
1387
313
  )
1388
314
  ]
1389
315
  },
1390
- s.productId
316
+ i.productId
1391
317
  );
1392
318
  }) }),
1393
- (t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
319
+ (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
1394
320
  "button",
1395
321
  {
1396
- onClick: a,
322
+ onClick: l,
1397
323
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
324
+ style: {
325
+ height: "30px",
326
+ width: "30px"
327
+ },
1398
328
  children: ">"
1399
329
  }
1400
330
  )
1401
331
  ] }) });
1402
- }, xo = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ l("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, n) => /* @__PURE__ */ p(
332
+ }, Fr = ({ 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(
1403
333
  "div",
1404
334
  {
1405
335
  className: "mb-4 p-3 rounded-xl",
@@ -1408,15 +338,15 @@ const bo = ({
1408
338
  // backgroundColor: storeDetails.tanyaThemeColorLight
1409
339
  },
1410
340
  children: [
1411
- /* @__PURE__ */ l(
341
+ /* @__PURE__ */ a(
1412
342
  "div",
1413
343
  {
1414
344
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
1415
- children: mn(r.keyword) || "No keyword"
345
+ children: Sr(r.keyword) || "No keyword"
1416
346
  }
1417
347
  ),
1418
- /* @__PURE__ */ l(
1419
- bo,
348
+ /* @__PURE__ */ a(
349
+ _r,
1420
350
  {
1421
351
  product: r.items,
1422
352
  storeDetails: e
@@ -1424,14 +354,14 @@ const bo = ({
1424
354
  )
1425
355
  ]
1426
356
  },
1427
- n
1428
- )) }), Ar = async (t, e) => {
1429
- const { serverUrl: r, basePath: n } = wt(), o = `${r}`;
357
+ o
358
+ )) }), Ve = async (t, e) => {
359
+ const { serverUrl: r, basePath: o } = st(), n = `${r}`;
1430
360
  console.log(`customer_token
1431
361
  `, t);
1432
362
  try {
1433
- return (await z.post(
1434
- `${o}${n}/basket/create?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
363
+ return (await E.post(
364
+ `${n}${o}/basket/create?baseUrl=${Z()}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
1435
365
  e,
1436
366
  {
1437
367
  headers: {
@@ -1440,14 +370,14 @@ const bo = ({
1440
370
  }
1441
371
  }
1442
372
  )).data;
1443
- } catch (a) {
1444
- return z.isAxiosError(a) ? console.error("Error creating basket:", a.response || a.message) : console.error("Unexpected error:", a), null;
373
+ } catch (l) {
374
+ return E.isAxiosError(l) ? console.error("Error creating basket:", l.response || l.message) : console.error("Unexpected error:", l), null;
1445
375
  }
1446
- }, Xt = async (t, e, r) => {
1447
- const { serverUrl: n, basePath: o } = wt(), a = `${n}`;
376
+ }, Vt = async (t, e, r) => {
377
+ const { serverUrl: o, basePath: n } = st(), l = `${o}`;
1448
378
  try {
1449
- const i = await z.post(
1450
- `${a}${o}/basket/add-product/${t}?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
379
+ const s = await E.post(
380
+ `${l}${n}/basket/add-product/${t}?baseUrl=${Z()}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
1451
381
  e,
1452
382
  {
1453
383
  headers: {
@@ -1456,22 +386,22 @@ const bo = ({
1456
386
  }
1457
387
  }
1458
388
  );
1459
- return i.status === 200 && i.data ? i.data : null;
1460
- } catch (i) {
1461
- return z.isAxiosError(i) ? console.error(
389
+ return s.status === 200 && s.data ? s.data : null;
390
+ } catch (s) {
391
+ return E.isAxiosError(s) ? console.error(
1462
392
  "Error adding products to basket:",
1463
- i.response || i.message
1464
- ) : console.error("Unexpected error:", i), null;
393
+ s.response || s.message
394
+ ) : console.error("Unexpected error:", s), null;
1465
395
  }
1466
- }, Lr = async ({
396
+ }, Re = async ({
1467
397
  basketId: t,
1468
398
  customer_token: e
1469
399
  }) => {
1470
- var a;
1471
- const { serverUrl: r, basePath: n } = wt(), o = `${r}`;
400
+ var l;
401
+ const { serverUrl: r, basePath: o } = st(), n = `${r}`;
1472
402
  try {
1473
- const i = await z.get(
1474
- `${o}${n}/basket/${t}?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
403
+ const s = await E.get(
404
+ `${n}${o}/basket/${t}?baseUrl=${Z()}&siteId=${R()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
1475
405
  {
1476
406
  headers: {
1477
407
  "Content-Type": "application/json",
@@ -1479,220 +409,218 @@ const bo = ({
1479
409
  }
1480
410
  }
1481
411
  );
1482
- return { status: i.status, data: i.data };
1483
- } catch (i) {
1484
- return z.isAxiosError(i) ? { status: (a = i.response) == null ? void 0 : a.status, data: null } : { status: null, data: null };
412
+ return { status: s.status, data: s.data };
413
+ } catch (s) {
414
+ return E.isAxiosError(s) ? { status: (l = s.response) == null ? void 0 : l.status, data: null } : { status: null, data: null };
1485
415
  }
1486
- }, Ze = "sfcc_basket_id", tr = "sfcc_customer_token", Mt = "sfcc_token_expiry", vo = 300 * 1e3, $t = "1.0.0";
1487
- const Ft = (t) => {
416
+ }, oe = "sfcc_basket_id", Se = "sfcc_customer_token", Tt = "sfcc_token_expiry", Ir = 300 * 1e3, It = "1.0.0";
417
+ const xt = (t) => {
1488
418
  try {
1489
- t ? localStorage.setItem(Ze, t) : localStorage.removeItem(Ze);
419
+ t ? localStorage.setItem(oe, t) : localStorage.removeItem(oe);
1490
420
  } catch (e) {
1491
421
  console.error("Error saving basket ID to storage:", e);
1492
422
  }
1493
- }, Zt = (t) => {
423
+ }, Rt = (t) => {
1494
424
  try {
1495
425
  if (t) {
1496
- localStorage.setItem(tr, t);
1497
- const e = Date.now() + vo;
1498
- localStorage.setItem(Mt, e.toString());
426
+ localStorage.setItem(Se, t);
427
+ const e = Date.now() + Ir;
428
+ localStorage.setItem(Tt, e.toString());
1499
429
  } else
1500
- localStorage.removeItem(tr);
430
+ localStorage.removeItem(Se);
1501
431
  } catch (e) {
1502
432
  console.error("Error storing token:", e);
1503
433
  }
1504
- }, er = 300, ko = () => {
1505
- var c, s, d, f, h, m;
1506
- const t = hr(), e = Wt((g) => g.product.product), r = Wt((g) => g.store.store), [n, o] = L(!!e);
1507
- if (lt(() => {
1508
- o(!!e);
434
+ }, Ce = 300, Nr = () => {
435
+ var d, i, x, b, C, S;
436
+ const t = Ae(), e = Mt((_) => _.product.product), r = Mt((_) => _.store.store), [o, n] = P(!!e);
437
+ if (bt(() => {
438
+ n(!!e);
1509
439
  }, [e]), !e) return null;
1510
- const a = async () => {
1511
- var g, S, T, w, k, M, O, P, Q, _, j, V, X, U, B, yt;
440
+ const l = async () => {
441
+ var _, j, q, M, lt, vt, Pt, ot, kt, St, ct, $t, zt, Ct, O, dt;
1512
442
  console.log(e, "the prod");
1513
443
  try {
1514
- if (!((S = (g = e == null ? void 0 : e.variants) == null ? void 0 : g[0]) != null && S.product_id) && !(e.type.item || e.type.bundle) && !((w = (T = e == null ? void 0 : e.variants) == null ? void 0 : T[0]) != null && w.productId)) {
1515
- W.error("Variants not available", {
444
+ if (!((j = (_ = e == null ? void 0 : e.variants) == null ? void 0 : _[0]) != null && j.product_id) && !(e.type.item || e.type.bundle) && !((M = (q = e == null ? void 0 : e.variants) == null ? void 0 : q[0]) != null && M.productId)) {
445
+ U.error("Variants not available", {
1516
446
  position: "bottom-right",
1517
447
  autoClose: 1e3
1518
448
  }), console.error("No product variant found");
1519
449
  return;
1520
450
  }
1521
- const y = [
451
+ const p = [
1522
452
  {
1523
- product_id: ((k = e.variants) == null ? void 0 : k[0].product_id) || ((M = e.variants) == null ? void 0 : M[0].productId) || (e == null ? void 0 : e.id),
453
+ product_id: ((lt = e.variants) == null ? void 0 : lt[0].product_id) || ((vt = e.variants) == null ? void 0 : vt[0].productId) || (e == null ? void 0 : e.id),
1524
454
  quantity: 1
1525
455
  }
1526
456
  ];
1527
- console.log(y, "the product data");
1528
- const Tt = JSON.parse(
457
+ console.log(p, "the product data");
458
+ const _t = JSON.parse(
1529
459
  sessionStorage.getItem("customerData") || "{}"
1530
- ), ht = Tt == null ? void 0 : Tt.basketId, re = !1, Bt = localStorage.getItem(Mt), rt = Date.now();
1531
- if (!re || !Bt || rt >= parseInt(Bt)) {
1532
- let R = "";
460
+ ), nt = _t == null ? void 0 : _t.basketId, Jt = !1, jt = localStorage.getItem(Tt), Y = Date.now();
461
+ if (!Jt || !jt || Y >= parseInt(jt)) {
462
+ let $ = "";
1533
463
  {
1534
- const ot = await Ut();
1535
- console.log("token from auth data"), R = "Bearer " + ot.access_token;
464
+ const K = await Ot();
465
+ console.log("token from auth data"), $ = "Bearer " + K.access_token;
1536
466
  }
1537
- if (!R) {
467
+ if (!$) {
1538
468
  console.error("Failed to get customer_token");
1539
469
  return;
1540
470
  }
1541
- const qt = rt + 300 * 1e3;
1542
- if (Zt(R), localStorage.setItem(Mt, qt.toString()), ht) {
1543
- const ot = await Lr({
1544
- basketId: ht,
1545
- customer_token: R
471
+ const At = Y + 300 * 1e3;
472
+ if (Rt($), localStorage.setItem(Tt, At.toString()), nt) {
473
+ const K = await Re({
474
+ basketId: nt,
475
+ customer_token: $
1546
476
  });
1547
- if (console.log(ht, "basket id from customer"), ot.status === 200 && ot) {
1548
- const at = await Xt(
1549
- ht,
1550
- y,
1551
- R
477
+ if (console.log(nt, "basket id from customer"), K.status === 200 && K) {
478
+ const G = await Vt(
479
+ nt,
480
+ p,
481
+ $
1552
482
  );
1553
- (((O = at == null ? void 0 : at.product_items) == null ? void 0 : O.length) > 0 || ((P = at == null ? void 0 : at.productItems) == null ? void 0 : P.length) > 0) && (W.success("Added to cart", {
483
+ (((Pt = G == null ? void 0 : G.product_items) == null ? void 0 : Pt.length) > 0 || ((ot = G == null ? void 0 : G.productItems) == null ? void 0 : ot.length) > 0) && (U.success("Added to cart", {
1554
484
  position: "bottom-right",
1555
485
  autoClose: 3e3,
1556
486
  hideProgressBar: !1,
1557
487
  closeOnClick: !0,
1558
488
  pauseOnHover: !0,
1559
489
  draggable: !0
1560
- }), _t(ht));
490
+ }), Ht(nt));
1561
491
  return;
1562
492
  }
1563
493
  }
1564
- const ne = {
494
+ const Kt = {
1565
495
  productItems: [
1566
496
  {
1567
- productId: ((Q = e.variants) == null ? void 0 : Q[0].product_id) || ((_ = e.variants) == null ? void 0 : _[0].productId) || (e == null ? void 0 : e.id),
497
+ productId: ((kt = e.variants) == null ? void 0 : kt[0].product_id) || ((St = e.variants) == null ? void 0 : St[0].productId) || (e == null ? void 0 : e.id),
1568
498
  quantity: 1
1569
499
  }
1570
500
  ]
1571
501
  };
1572
502
  console.log("before create basket");
1573
- const v = await Ar(R, ne);
503
+ const h = await Ve($, Kt);
1574
504
  if (console.log(
1575
- v,
1576
- v == null ? void 0 : v.basket_id,
1577
- v == null ? void 0 : v.basketId,
505
+ h,
506
+ h == null ? void 0 : h.basket_id,
507
+ h == null ? void 0 : h.basketId,
1578
508
  "the basket response"
1579
- ), !(v != null && v.basket_id) && !(v != null && v.basketId)) {
509
+ ), !(h != null && h.basket_id) && !(h != null && h.basketId)) {
1580
510
  console.error("Failed to create basket");
1581
511
  return;
1582
512
  }
1583
513
  console.log(
1584
514
  "setting stored id",
1585
- (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
1586
- ), Ft(
1587
- (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
515
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
516
+ ), xt(
517
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
1588
518
  ), console.log("adding product to basket");
1589
- const nt = await Xt(
1590
- (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId),
1591
- y,
1592
- R
519
+ const J = await Vt(
520
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId),
521
+ p,
522
+ $
1593
523
  );
1594
- console.log("object added to basket"), (((j = nt == null ? void 0 : nt.product_items) == null ? void 0 : j.length) > 0 || ((V = nt == null ? void 0 : nt.productItems) == null ? void 0 : V.length) > 0) && W.success("Added to cart", {
524
+ console.log("object added to basket"), (((ct = J == null ? void 0 : J.product_items) == null ? void 0 : ct.length) > 0 || (($t = J == null ? void 0 : J.productItems) == null ? void 0 : $t.length) > 0) && U.success("Added to cart", {
1595
525
  position: "bottom-right",
1596
526
  autoClose: 3e3,
1597
527
  hideProgressBar: !1,
1598
528
  closeOnClick: !0,
1599
529
  pauseOnHover: !0,
1600
530
  draggable: !0
1601
- }), _t(v.basket_id || (v == null ? void 0 : v.basketId));
531
+ }), Ht(h.basket_id || (h == null ? void 0 : h.basketId));
1602
532
  }
1603
- } catch (y) {
1604
- console.error("Error adding to cart:", y), W.error("Failed to add product to cart", {
533
+ } catch (p) {
534
+ console.error("Error adding to cart:", p), U.error("Failed to add product to cart", {
1605
535
  position: "bottom-right",
1606
536
  autoClose: 3e3
1607
- }), ((X = y == null ? void 0 : y.response) == null ? void 0 : X.status) === 404 || // Basket not found
1608
- ((U = y == null ? void 0 : y.response) == null ? void 0 : U.status) === 401 ? (((B = y == null ? void 0 : y.response) == null ? void 0 : B.status) === 404 && Ft(null), ((yt = y == null ? void 0 : y.response) == null ? void 0 : yt.status) === 401 && (Ft(null), Zt(null))) : (console.error("Failed to add product to basket:", y.message), W.error("Failed to add product to cart", {
537
+ }), ((zt = p == null ? void 0 : p.response) == null ? void 0 : zt.status) === 404 || // Basket not found
538
+ ((Ct = p == null ? void 0 : p.response) == null ? void 0 : Ct.status) === 401 ? (((O = p == null ? void 0 : p.response) == null ? void 0 : O.status) === 404 && xt(null), ((dt = p == null ? void 0 : p.response) == null ? void 0 : dt.status) === 401 && (xt(null), Rt(null))) : (console.error("Failed to add product to basket:", p.message), U.error("Failed to add product to cart", {
1609
539
  position: "bottom-right",
1610
540
  autoClose: 3e3
1611
541
  }));
1612
- } finally {
1613
- _t();
1614
542
  }
1615
- }, i = () => {
543
+ }, s = () => {
1616
544
  e && (window.location.href = e.c_pdpUrl);
1617
545
  };
1618
- return console.log(e, "the prod"), /* @__PURE__ */ p(pe, { children: [
1619
- /* @__PURE__ */ l(
546
+ return console.log(e, "the prod"), /* @__PURE__ */ u(ee, { children: [
547
+ /* @__PURE__ */ a(
1620
548
  "div",
1621
549
  {
1622
550
  className: "fixed inset-0 z-40 bg-black/30",
1623
551
  onClick: () => {
1624
- o(!1), setTimeout(() => t(he(null)), er);
552
+ n(!1), setTimeout(() => t(re(null)), Ce);
1625
553
  }
1626
554
  }
1627
555
  ),
1628
- /* @__PURE__ */ p(
556
+ /* @__PURE__ */ u(
1629
557
  "div",
1630
558
  {
1631
559
  className: `
1632
560
  flex flex-col gap-2 items-center h-[90vh] absolute right-0 bottom-0 z-50 w-full md:w-1/2 md:h-[100vh] lg:w-1/2 lg:h-[100vh] shadow-xl p-2 border-l-2 bg-white border-gray-200 overflow-y-scroll
1633
561
  transition-all duration-300
1634
- ${n ? "translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100" : "translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
562
+ ${o ? "translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100" : "translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
1635
563
  `,
1636
564
  style: { willChange: "transform, opacity" },
1637
- onClick: (g) => g.stopPropagation(),
565
+ onClick: (_) => _.stopPropagation(),
1638
566
  children: [
1639
- /* @__PURE__ */ p("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
1640
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
1641
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
1642
- Le,
567
+ /* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
568
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
569
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
570
+ ge,
1643
571
  {
1644
572
  icon: "mdi:close",
1645
573
  className: "text-[#555555] w-6 h-6 cursor-pointer",
1646
574
  onClick: () => {
1647
- o(!1), setTimeout(
1648
- () => t(he(null)),
1649
- er
575
+ n(!1), setTimeout(
576
+ () => t(re(null)),
577
+ Ce
1650
578
  );
1651
579
  }
1652
580
  }
1653
581
  ) })
1654
582
  ] }),
1655
- /* @__PURE__ */ p("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
1656
- /* @__PURE__ */ l("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ l(
583
+ /* @__PURE__ */ u("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
584
+ /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
1657
585
  "img",
1658
586
  {
1659
- src: (f = (d = (s = (c = e.imageGroups) == null ? void 0 : c[0]) == null ? void 0 : s.images) == null ? void 0 : d[0]) == null ? void 0 : f.link,
587
+ src: (b = (x = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : x[0]) == null ? void 0 : b.link,
1660
588
  alt: e.name,
1661
589
  className: "rounded-[10px]"
1662
590
  }
1663
591
  ) }),
1664
- /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
1665
- (g) => g.images.slice(1, 2).map((S) => /* @__PURE__ */ l(
592
+ /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
593
+ (_) => _.images.slice(1, 2).map((j) => /* @__PURE__ */ a(
1666
594
  "img",
1667
595
  {
1668
- src: S.link,
596
+ src: j.link,
1669
597
  alt: e.name,
1670
598
  className: "rounded-[10px] w-[60px] h-[60px]"
1671
599
  },
1672
- S.link
600
+ j.link
1673
601
  ))
1674
602
  ) })
1675
603
  ] }),
1676
- /* @__PURE__ */ p("div", { className: "flex flex-row items-center justify-between w-full", children: [
1677
- /* @__PURE__ */ p("div", { className: "flex flex-row items-center gap-2", children: [
1678
- /* @__PURE__ */ p("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
604
+ /* @__PURE__ */ u("div", { className: "flex flex-row items-center justify-between w-full", children: [
605
+ /* @__PURE__ */ u("div", { className: "flex flex-row items-center gap-2", children: [
606
+ /* @__PURE__ */ u("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
1679
607
  " ",
1680
608
  "$",
1681
609
  e.price.toFixed(2)
1682
610
  ] }),
1683
611
  " ",
1684
- /* @__PURE__ */ p("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
612
+ /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
1685
613
  " ",
1686
614
  "$",
1687
615
  (e.price + 5).toFixed(2)
1688
616
  ] })
1689
617
  ] }),
1690
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: e.discount }) })
618
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: e.discount }) })
1691
619
  ] }),
1692
- /* @__PURE__ */ l("div", { className: "mt-2 w-full border-t-2 border-gray-200" }),
1693
- /* @__PURE__ */ p("div", { className: "w-full text-left", children: [
1694
- /* @__PURE__ */ l("div", { className: "text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]", children: "Product Details" }),
1695
- /* @__PURE__ */ l(
620
+ /* @__PURE__ */ a("div", { className: "mt-2 w-full border-t-2 border-gray-200" }),
621
+ /* @__PURE__ */ u("div", { className: "w-full text-left", children: [
622
+ /* @__PURE__ */ a("div", { className: "text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]", children: "Product Details" }),
623
+ /* @__PURE__ */ a(
1696
624
  "div",
1697
625
  {
1698
626
  className: "text-[#68656E] font-normal font-nunitoSans text-xs pl-2 mt-3",
@@ -1700,57 +628,57 @@ const Ft = (t) => {
1700
628
  }
1701
629
  )
1702
630
  ] }),
1703
- /* @__PURE__ */ p("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
1704
- /* @__PURE__ */ l("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
1705
- /* @__PURE__ */ p("div", { className: "text-[#323135] font-bold", children: [
1706
- ((h = e == null ? void 0 : e.rating) == null ? void 0 : h.rate) || 0,
631
+ /* @__PURE__ */ u("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
632
+ /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
633
+ /* @__PURE__ */ u("div", { className: "text-[#323135] font-bold", children: [
634
+ ((C = e == null ? void 0 : e.rating) == null ? void 0 : C.rate) || 0,
1707
635
  " /",
1708
636
  " ",
1709
- /* @__PURE__ */ l("span", { className: "text-[#68656E]", children: "5" })
637
+ /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
1710
638
  ] }),
1711
- /* @__PURE__ */ l("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
1712
- /* @__PURE__ */ p("div", { className: "text-[#68656E] font-semibold text-sm", children: [
1713
- ((m = e == null ? void 0 : e.rating) == null ? void 0 : m.count) || 0,
639
+ /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
640
+ /* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
641
+ ((S = e == null ? void 0 : e.rating) == null ? void 0 : S.count) || 0,
1714
642
  " ratings"
1715
643
  ] })
1716
644
  ] }) }),
1717
- /* @__PURE__ */ l("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((g, S) => {
1718
- var T;
1719
- return /* @__PURE__ */ l(
1720
- Le,
645
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((_, j) => {
646
+ var q;
647
+ return /* @__PURE__ */ a(
648
+ ge,
1721
649
  {
1722
650
  icon: "mdi:star",
1723
651
  width: "20",
1724
652
  height: "20",
1725
653
  className: `text-yellow-500
1726
- ${((T = e == null ? void 0 : e.rating) == null ? void 0 : T.rate) > S ? "text-yellow-500" : "text-gray-300"}
654
+ ${((q = e == null ? void 0 : e.rating) == null ? void 0 : q.rate) > j ? "text-yellow-500" : "text-gray-300"}
1727
655
  `
1728
656
  },
1729
- S
657
+ j
1730
658
  );
1731
659
  }) })
1732
660
  ] }),
1733
- /* @__PURE__ */ p(
661
+ /* @__PURE__ */ u(
1734
662
  "div",
1735
663
  {
1736
664
  className: "flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",
1737
665
  style: { marginTop: "150px" },
1738
666
  children: [
1739
- /* @__PURE__ */ l(
667
+ /* @__PURE__ */ a(
1740
668
  "button",
1741
669
  {
1742
670
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
1743
671
  style: { backgroundColor: r.tanyaThemeColor },
1744
- onClick: a,
672
+ onClick: l,
1745
673
  children: "Add to Cart"
1746
674
  }
1747
675
  ),
1748
- /* @__PURE__ */ l(
676
+ /* @__PURE__ */ a(
1749
677
  "button",
1750
678
  {
1751
679
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
1752
680
  style: { backgroundColor: r.tanyaThemeColor },
1753
- onClick: i,
681
+ onClick: s,
1754
682
  children: "View more"
1755
683
  }
1756
684
  )
@@ -1761,7 +689,7 @@ const Ft = (t) => {
1761
689
  }
1762
690
  )
1763
691
  ] });
1764
- }, So = ({
692
+ }, Er = ({
1765
693
  tanyaConfig: t
1766
694
  }) => {
1767
695
  const e = [
@@ -1778,145 +706,145 @@ const Ft = (t) => {
1778
706
  "Niece/Nephew": "his/her niece/nephew",
1779
707
  "My Friends": "his/her friends",
1780
708
  Others: "others"
1781
- }, n = Pt(null), o = Pt(null), a = Pt(null), i = Pt(null), [c, s] = L(null), [d, f] = L(!1), [h, m] = L(!1), [g, S] = L(!1), [T, w] = L(!1), [k, M] = L(!1), [O, P] = L(!1), [Q, _] = L(""), [j, V] = L(""), X = (u) => ({
1782
- id: u.id,
1783
- title: u.name,
1784
- image: u.image ?? "",
1785
- price: u.price ?? 0
1786
- }), [U, B] = L([]), yt = Pt(null), y = Wt((u) => u.store.store), Tt = Wt((u) => u.product.product), ht = () => {
1787
- S(!0), setTimeout(() => m(!0), 10);
1788
- }, re = () => {
1789
- m(!1), setTimeout(() => S(!1), 300);
709
+ }, o = Ft(null), n = Ft(null), l = Ft(null), s = Ft(null), [d, i] = P(null), [x, b] = P(!1), [C, S] = P(!1), [_, j] = P(!1), [q, M] = P(!1), [lt, vt] = P(!1), [Pt, ot] = P(!1), [kt, St] = P(""), [ct, $t] = P(""), zt = (c) => ({
710
+ id: c.id,
711
+ title: c.name,
712
+ image: c.image ?? "",
713
+ price: c.price ?? 0
714
+ }), [Ct, O] = P([]), dt = Ft(null), p = Mt((c) => c.store.store), _t = Mt((c) => c.product.product), nt = () => {
715
+ j(!0), setTimeout(() => S(!0), 10);
716
+ }, Jt = () => {
717
+ S(!1), setTimeout(() => j(!1), 300);
1790
718
  };
1791
- lt(() => {
1792
- d ? ht() : re();
1793
- }, [d]);
1794
- const Bt = (u) => {
1795
- V(r[u]);
719
+ bt(() => {
720
+ x ? nt() : Jt();
721
+ }, [x]);
722
+ const jt = (c) => {
723
+ $t(r[c]);
1796
724
  };
1797
- lt(() => {
1798
- yt.current && (yt.current.scrollTop += 150);
1799
- }, [U]);
1800
- let rt = null, R = null;
1801
- const qt = async () => {
1802
- if (rt && R && Date.now() < R)
1803
- return rt;
725
+ bt(() => {
726
+ dt.current && (dt.current.scrollTop += 150);
727
+ }, [Ct]);
728
+ let Y = null, $ = null;
729
+ const At = async () => {
730
+ if (Y && $ && Date.now() < $)
731
+ return Y;
1804
732
  try {
1805
- const u = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", E = new URLSearchParams({
733
+ const c = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", k = new URLSearchParams({
1806
734
  grant_type: "client_credentials",
1807
735
  client_id: "4i8rd70sgt961tc4dhskgf08c",
1808
736
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
1809
737
  scope: "default-m2m-resource-server-8xzfzo/read"
1810
- }), I = await fetch(u, {
738
+ }), w = await fetch(c, {
1811
739
  method: "POST",
1812
740
  headers: {
1813
741
  "Content-Type": "application/x-www-form-urlencoded"
1814
742
  },
1815
- body: E
743
+ body: k
1816
744
  });
1817
- if (!I.ok)
745
+ if (!w.ok)
1818
746
  throw new Error(
1819
- `Token request failed! status: ${I.status}`
747
+ `Token request failed! status: ${w.status}`
1820
748
  );
1821
- const F = await I.json();
1822
- rt = F.access_token;
1823
- const b = F.expires_in || 3600;
1824
- return R = Date.now() + (b - 60) * 1e3, rt;
1825
- } catch (u) {
1826
- return console.error("Error obtaining JWT token:", u), rt = null, R = null, null;
749
+ const y = await w.json();
750
+ Y = y.access_token;
751
+ const f = y.expires_in || 3600;
752
+ return $ = Date.now() + (f - 60) * 1e3, Y;
753
+ } catch (c) {
754
+ return console.error("Error obtaining JWT token:", c), Y = null, $ = null, null;
1827
755
  }
1828
- }, ne = async () => {
1829
- const u = await Ut();
1830
- u != null && s(u);
756
+ }, Kt = async () => {
757
+ const c = await Ot();
758
+ c != null && i(c);
1831
759
  };
1832
- lt(() => {
760
+ bt(() => {
1833
761
  if (t != null && t.siteId) {
1834
- const { clientID: u, host: E, organizationID: I, shortCode: F, siteId: b } = t;
1835
- sessionStorage.setItem("Host", E), sessionStorage.setItem("SiteId", b), sessionStorage.setItem("pubCfg", btoa(u)), sessionStorage.setItem("envRef", F), sessionStorage.setItem("orgRef", I);
762
+ const { clientID: c, host: k, organizationID: w, shortCode: y, siteId: f } = t;
763
+ sessionStorage.setItem("Host", k), sessionStorage.setItem("SiteId", f), sessionStorage.setItem("pubCfg", btoa(c)), sessionStorage.setItem("envRef", y), sessionStorage.setItem("orgRef", w);
1836
764
  }
1837
- ne(), console.log("scapi environment v1");
765
+ Kt(), console.log("scapi environment v1");
1838
766
  }, []);
1839
- const v = async () => {
1840
- const u = JSON.parse(
767
+ const h = async () => {
768
+ const c = JSON.parse(
1841
769
  sessionStorage.getItem("customerData") || "{}"
1842
770
  ).customerId;
1843
- return (await pn(u || "")).c_interests;
1844
- }, nt = async (u, E) => {
1845
- console.log("in secondary flow", $t);
1846
- const I = await v();
1847
- if (console.log(I, "interests of customer", $t), !!I)
771
+ return (await vr(c || "")).c_interests;
772
+ }, J = async (c, k) => {
773
+ console.log("in secondary flow", It);
774
+ const w = await h();
775
+ if (console.log(w, "interests of customer", It), !!w)
1848
776
  try {
1849
- B(
1850
- (K) => K.map(
1851
- (Z, tt) => tt === K.length - 1 ? { ...Z, secondaryLoading: !0 } : Z
777
+ O(
778
+ (L) => L.map(
779
+ (H, V) => V === L.length - 1 ? { ...H, secondaryLoading: !0 } : H
1852
780
  )
1853
781
  );
1854
- const F = await qt();
1855
- if (!F) throw new Error("Failed to fetch token");
1856
- const b = localStorage.getItem("customerNumber"), C = localStorage.getItem("isLoggedIn"), bt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1857
- registered: String(C || !1),
1858
- userId: String(b || (/* @__PURE__ */ new Date()).getTime())
1859
- }).toString()}`, xt = JSON.stringify({
782
+ const y = await At();
783
+ if (!y) throw new Error("Failed to fetch token");
784
+ const f = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
785
+ registered: String(g || !1),
786
+ userId: String(f || (/* @__PURE__ */ new Date()).getTime())
787
+ }).toString()}`, pt = JSON.stringify({
1860
788
  flowId: "Q166PR519W",
1861
789
  flowAliasId: "HKFUVLWVH2",
1862
790
  input: {
1863
791
  loyaltyPoints: "",
1864
- productName: u,
1865
- productPoints: String(E || 0),
1866
- interests: I
792
+ productName: c,
793
+ productPoints: String(k || 0),
794
+ interests: w
1867
795
  }
1868
- }), Y = await fetch(bt, {
796
+ }), A = await fetch(ut, {
1869
797
  signal: AbortSignal.timeout(3e4),
1870
798
  method: "POST",
1871
799
  headers: {
1872
800
  "Content-Type": "application/json",
1873
- Authorization: `Bearer ${F}`
801
+ Authorization: `Bearer ${y}`
1874
802
  },
1875
- body: xt
803
+ body: pt
1876
804
  });
1877
- if (!Y.body) throw new Error("Readable stream not supported");
1878
- const vt = Y.body.getReader(), kt = new TextDecoder();
1879
- let J = "";
805
+ if (!A.body) throw new Error("Readable stream not supported");
806
+ const ft = A.body.getReader(), mt = new TextDecoder();
807
+ let D = "";
1880
808
  for (; ; ) {
1881
- const { done: K, value: Z } = await vt.read();
1882
- if (K) break;
1883
- J += kt.decode(Z, { stream: !0 });
1884
- const tt = J.split(`
809
+ const { done: L, value: H } = await ft.read();
810
+ if (L) break;
811
+ D += mt.decode(H, { stream: !0 });
812
+ const V = D.split(`
1885
813
  `);
1886
- J = tt.pop() || "";
1887
- for (const it of tt)
1888
- if (it.startsWith("data:")) {
1889
- const x = it.slice(5).trim();
814
+ D = V.pop() || "";
815
+ for (const W of V)
816
+ if (W.startsWith("data:")) {
817
+ const m = W.slice(5).trim();
1890
818
  try {
1891
- const G = JSON.parse(x);
1892
- G.index === 0 && B(
1893
- ($) => $.map(
1894
- (q, st) => st === $.length - 1 ? {
1895
- ...q,
1896
- secondaryResponse: G.data,
819
+ const B = JSON.parse(m);
820
+ B.index === 0 && O(
821
+ (F) => F.map(
822
+ (T, X) => X === F.length - 1 ? {
823
+ ...T,
824
+ secondaryResponse: B.data,
1897
825
  secondaryLoading: !1
1898
- } : q
826
+ } : T
1899
827
  )
1900
828
  );
1901
- } catch (G) {
1902
- B(
1903
- ($) => $.map(
1904
- (q, st) => st === $.length - 1 ? { ...q, secondaryLoading: !1 } : q
829
+ } catch (B) {
830
+ O(
831
+ (F) => F.map(
832
+ (T, X) => X === F.length - 1 ? { ...T, secondaryLoading: !1 } : T
1905
833
  )
1906
- ), console.error("Secondary flow JSON parse error:", G);
834
+ ), console.error("Secondary flow JSON parse error:", B);
1907
835
  }
1908
836
  }
1909
837
  }
1910
- } catch (F) {
1911
- console.error("Secondary flow error:", F);
838
+ } catch (y) {
839
+ console.error("Secondary flow error:", y);
1912
840
  }
1913
- }, ot = async (u) => {
1914
- const E = u || Q.trim();
1915
- if (E) {
1916
- M(!0), _(""), n.current = null, o.current = null, a.current = null, i.current = null, B((I) => [
1917
- ...I,
841
+ }, K = async (c) => {
842
+ const k = c || kt.trim();
843
+ if (k) {
844
+ vt(!0), St(""), o.current = null, n.current = null, l.current = null, s.current = null, O((w) => [
845
+ ...w,
1918
846
  {
1919
- query: E,
847
+ query: k,
1920
848
  response: "Thinking for what suits you best...",
1921
849
  potentialQuestions: "",
1922
850
  products: [],
@@ -1924,247 +852,241 @@ const Ft = (t) => {
1924
852
  }
1925
853
  ]);
1926
854
  try {
1927
- const I = j, F = localStorage.getItem("customerNumber"), b = localStorage.getItem("isLoggedIn"), C = await qt();
1928
- if (!C)
855
+ const w = ct, y = localStorage.getItem("customerNumber"), f = localStorage.getItem("isLoggedIn"), g = await At();
856
+ if (!g)
1929
857
  throw new Error("Failed to obtain access token");
1930
- const bt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1931
- registered: String(b || !1),
1932
- userId: String(F || (/* @__PURE__ */ new Date()).getTime())
1933
- }).toString()}`, xt = JSON.stringify({
858
+ const ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
859
+ registered: String(f || !1),
860
+ userId: String(y || (/* @__PURE__ */ new Date()).getTime())
861
+ }).toString()}`, pt = JSON.stringify({
1934
862
  flowId: "MMHQKYI1NE",
1935
863
  flowAliasId: "SZF9ZK1ATE",
1936
864
  input: {
1937
- userPrompt: E,
1938
- whom: I
865
+ userPrompt: k,
866
+ whom: w
1939
867
  }
1940
- }), Y = await fetch(bt, {
868
+ }), A = await fetch(ut, {
1941
869
  signal: AbortSignal.timeout(3e4),
1942
870
  method: "POST",
1943
871
  headers: {
1944
872
  "Content-Type": "application/json",
1945
- Authorization: `Bearer ${C}`
873
+ Authorization: `Bearer ${g}`
1946
874
  },
1947
- body: xt
875
+ body: pt
1948
876
  });
1949
- if (!Y.ok)
1950
- throw new Error(`HTTP error! status: ${Y.status}`);
1951
- if (!Y.body) throw new Error("Readable stream not supported");
1952
- const vt = Y.body.getReader(), kt = new TextDecoder();
1953
- let J = "", K = "";
877
+ if (!A.ok)
878
+ throw new Error(`HTTP error! status: ${A.status}`);
879
+ if (!A.body) throw new Error("Readable stream not supported");
880
+ const ft = A.body.getReader(), mt = new TextDecoder();
881
+ let D = "", L = "";
1954
882
  for (; ; ) {
1955
- P(!0);
1956
- const { done: Z, value: tt } = await vt.read();
1957
- if (Z) break;
1958
- J += kt.decode(tt, { stream: !0 });
1959
- const it = J.split(`
883
+ ot(!0);
884
+ const { done: H, value: V } = await ft.read();
885
+ if (H) break;
886
+ D += mt.decode(V, { stream: !0 });
887
+ const W = D.split(`
1960
888
  `);
1961
- J = it.pop() || "";
1962
- for (const x of it)
1963
- if (x.startsWith("data:")) {
1964
- const G = x.slice(5).trim();
889
+ D = W.pop() || "";
890
+ for (const m of W)
891
+ if (m.startsWith("data:")) {
892
+ const B = m.slice(5).trim();
1965
893
  try {
1966
- const $ = JSON.parse(G);
1967
- $.index == 1 && (K = $.data), B(
1968
- (q) => q.map(
1969
- (st, Rt) => Rt === q.length - 1 ? {
1970
- ...st,
1971
- [$.index == 0 ? "response" : $.index == 1 ? "keywords" : $.index == 2 ? "potentialQuestions" : "end"]: $.data
1972
- } : st
894
+ const F = JSON.parse(B);
895
+ F.index == 1 && (L = F.data), O(
896
+ (T) => T.map(
897
+ (X, Dt) => Dt === T.length - 1 ? {
898
+ ...X,
899
+ [F.index == 0 ? "response" : F.index == 1 ? "keywords" : F.index == 2 ? "potentialQuestions" : "end"]: F.data
900
+ } : X
1973
901
  )
1974
902
  );
1975
- } catch ($) {
1976
- console.error("Error parsing JSON:", $);
903
+ } catch (F) {
904
+ console.error("Error parsing JSON:", F);
1977
905
  }
1978
906
  }
1979
907
  }
1980
- Yr(at(K));
1981
- } catch (I) {
1982
- console.error("Error sending message to Tanya:", I);
908
+ er(G(L));
909
+ } catch (w) {
910
+ console.error("Error sending message to Tanya:", w);
1983
911
  } finally {
1984
- M(!1);
912
+ vt(!1);
1985
913
  }
1986
914
  }
1987
- }, at = (u) => {
1988
- const E = u.match(
915
+ }, G = (c) => {
916
+ const k = c.match(
1989
917
  /top five relevant product or category names are: (.*)/i
1990
- ), b = (E ? E[1] : u).split(", ").map((H) => H.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
1991
- return [...new Set(b)].filter(Boolean).join(",");
1992
- }, Yr = async (u) => {
1993
- if (typeof u == "string") {
1994
- console.log(u, "keywords");
1995
- const E = u.split(",");
1996
- for (const I of E) {
1997
- const F = await De(
1998
- I
1999
- );
2000
- if (P(!1), (F == null ? void 0 : F.length) > 0 && (B(
2001
- (b) => b.map(
2002
- (C, H) => H === b.length - 1 ? {
2003
- ...C,
918
+ ), f = (k ? k[1] : c).split(", ").map((z) => z.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
919
+ return [...new Set(f)].filter(Boolean).join(",");
920
+ }, er = async (c) => {
921
+ if (typeof c == "string") {
922
+ console.log(c, "keywords");
923
+ const k = c.split(",");
924
+ for (const w of k) {
925
+ const y = await be(w);
926
+ if (ot(!1), (y == null ? void 0 : y.length) > 0 && (O(
927
+ (f) => f.map(
928
+ (g, z) => z === f.length - 1 ? {
929
+ ...g,
2004
930
  products: [
2005
- ...C.products || [],
2006
- { keyword: I, items: F, loading: !1 }
931
+ ...g.products || [],
932
+ { keyword: w, items: y, loading: !1 }
2007
933
  ]
2008
- } : C
934
+ } : g
2009
935
  )
2010
- ), !n.current || o.current == null)) {
2011
- const b = F[0];
2012
- n.current = String((b == null ? void 0 : b.product_name) ?? ""), a.current = b.image.link, o.current = b.product_id;
2013
- const C = typeof (b == null ? void 0 : b.price) == "number" ? b.price : void 0;
2014
- i.current = typeof C == "number" && Number.isFinite(C) ? C : null;
936
+ ), !o.current || n.current == null)) {
937
+ const f = y[0];
938
+ o.current = String((f == null ? void 0 : f.product_name) ?? ""), l.current = f.image.link, n.current = f.product_id;
939
+ const g = typeof (f == null ? void 0 : f.price) == "number" ? f.price : void 0;
940
+ s.current = typeof g == "number" && Number.isFinite(g) ? g : null;
2015
941
  }
2016
942
  }
2017
943
  } else
2018
- for (const E of u) {
2019
- const I = await De(
2020
- E
2021
- );
2022
- P(!1), (I == null ? void 0 : I.length) > 0 && B(
2023
- (F) => F.map(
2024
- (b, C) => C === F.length - 1 ? {
2025
- ...b,
944
+ for (const k of c) {
945
+ const w = await be(k);
946
+ ot(!1), (w == null ? void 0 : w.length) > 0 && O(
947
+ (y) => y.map(
948
+ (f, g) => g === y.length - 1 ? {
949
+ ...f,
2026
950
  products: [
2027
- ...b.products || [],
2028
- { keyword: E, items: I, loading: !1 }
951
+ ...f.products || [],
952
+ { keyword: k, items: w, loading: !1 }
2029
953
  ]
2030
- } : b
954
+ } : f
2031
955
  )
2032
956
  );
2033
957
  }
2034
- if (n.current) {
2035
- B(
2036
- (I) => I.map(
2037
- (F, b) => b === I.length - 1 ? {
2038
- ...F,
958
+ if (o.current) {
959
+ O(
960
+ (w) => w.map(
961
+ (y, f) => f === w.length - 1 ? {
962
+ ...y,
2039
963
  productSnapshot: {
2040
- id: o.current,
2041
- name: n.current,
2042
- image: a.current,
2043
- price: i.current ?? null,
964
+ id: n.current,
965
+ name: o.current,
966
+ image: l.current,
967
+ price: s.current ?? null,
2044
968
  points: 0,
2045
969
  quantity: 1
2046
970
  }
2047
- } : F
971
+ } : y
2048
972
  )
2049
973
  );
2050
- const E = JSON.parse(
974
+ const k = JSON.parse(
2051
975
  sessionStorage.getItem("customerData") || "{}"
2052
976
  );
2053
- (E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow", $t), nt(n.current, 0)) : console.log("not running secondary flow", $t);
977
+ (k == null ? void 0 : k.isGuest) == !1 ? (console.log("running secondary flow", It), J(o.current, 0)) : console.log("not running secondary flow", It);
2054
978
  }
2055
- P(!1);
2056
- }, Jr = async (u, E) => {
2057
- var I, F, b, C, H, bt, xt, Y, vt, kt, J, K, Z, tt, it;
2058
- w(!0);
979
+ ot(!1);
980
+ }, rr = async (c, k) => {
981
+ var w, y, f, g, z, ut, pt, A, ft, mt, D, L, H, V, W;
982
+ M(!0);
2059
983
  try {
2060
- const x = await vr(u.id);
2061
- if (!((F = (I = x == null ? void 0 : x.variants) == null ? void 0 : I[0]) != null && F.product_id || (C = (b = x == null ? void 0 : x.variants) == null ? void 0 : b[0]) != null && C.productId) && !(x.type.item || x.type.bundle)) {
2062
- w(!1), W.error("Variants not found", {
984
+ const m = await He(c.id);
985
+ if (!((y = (w = m == null ? void 0 : m.variants) == null ? void 0 : w[0]) != null && y.product_id || (g = (f = m == null ? void 0 : m.variants) == null ? void 0 : f[0]) != null && g.productId) && !(m.type.item || m.type.bundle)) {
986
+ M(!1), U.error("Variants not found", {
2063
987
  position: "bottom-right",
2064
988
  autoClose: 1e3
2065
989
  }), console.error("No product variant found");
2066
990
  return;
2067
991
  }
2068
- const G = [
992
+ const B = [
2069
993
  {
2070
- product_id: ((H = x.variants) == null ? void 0 : H[0].product_id) || ((bt = x.variants) == null ? void 0 : bt[0].productId) || (x == null ? void 0 : x.id),
2071
- quantity: E
994
+ product_id: ((z = m.variants) == null ? void 0 : z[0].product_id) || ((ut = m.variants) == null ? void 0 : ut[0].productId) || (m == null ? void 0 : m.id),
995
+ quantity: k
2072
996
  }
2073
997
  ];
2074
- console.log(G, "product data", "app version", $t);
2075
- const $ = JSON.parse(
998
+ console.log(B, "product data", "app version", It);
999
+ const F = JSON.parse(
2076
1000
  sessionStorage.getItem("customerData") || "{}"
2077
- ), q = $ == null ? void 0 : $.basketId, st = !1, Rt = localStorage.getItem(Mt), $e = Date.now();
2078
- if (!st || !Rt || $e >= parseInt(Rt)) {
2079
- const Kr = await br();
2080
- let { customer_token: mt } = await xr(
2081
- Kr
1001
+ ), T = (F == null ? void 0 : F.basketId) || localStorage.getItem(oe), X = !1, Dt = localStorage.getItem(Tt), he = Date.now();
1002
+ if (!X || !Dt || he >= parseInt(Dt)) {
1003
+ const or = await qe();
1004
+ let { customer_token: at } = await Me(
1005
+ or
2082
1006
  );
2083
- if (mt = "Bearer " + c.access_token, !mt) {
1007
+ if (at = "Bearer " + d.access_token, !at) {
2084
1008
  console.error("Failed to get customer_token");
2085
1009
  return;
2086
1010
  }
2087
- const Gr = $e + 300 * 1e3;
2088
- if (Zt(mt), localStorage.setItem(Mt, Gr.toString()), q) {
2089
- const Ae = await Lr({
2090
- basketId: q,
2091
- customer_token: mt
1011
+ const nr = he + 300 * 1e3;
1012
+ if (Rt(at), localStorage.setItem(Tt, nr.toString()), console.log(T, "basketIdFromCustomer"), T) {
1013
+ const we = await Re({
1014
+ basketId: T,
1015
+ customer_token: at
2092
1016
  });
2093
- if (Ae.status === 200 && Ae) {
2094
- const oe = await Xt(
2095
- q,
2096
- G,
2097
- mt
1017
+ if (we.status === 200 && we) {
1018
+ const Gt = await Vt(
1019
+ T,
1020
+ B,
1021
+ at
2098
1022
  );
2099
- ((xt = oe == null ? void 0 : oe.product_items) == null ? void 0 : xt.length) > 0 && (W.success("Added to cart", {
1023
+ ((pt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : pt.length) > 0 && (U.success("Added to cart", {
2100
1024
  position: "bottom-right",
2101
1025
  autoClose: 3e3,
2102
1026
  hideProgressBar: !1,
2103
1027
  closeOnClick: !0,
2104
1028
  pauseOnHover: !0,
2105
1029
  draggable: !0
2106
- }), _t(q), w(!1));
1030
+ }), Ht(T), M(!1));
2107
1031
  return;
2108
1032
  }
2109
1033
  }
2110
- const Wr = {
1034
+ const ar = {
2111
1035
  productItems: [
2112
1036
  {
2113
- productId: ((Y = x.variants) == null ? void 0 : Y[0].product_id) || ((vt = x.variants) == null ? void 0 : vt[0].productId) || (x == null ? void 0 : x.id),
1037
+ productId: ((A = m.variants) == null ? void 0 : A[0].product_id) || ((ft = m.variants) == null ? void 0 : ft[0].productId) || (m == null ? void 0 : m.id),
2114
1038
  quantity: 1
2115
1039
  }
2116
1040
  ]
2117
- }, N = await Ar(mt, Wr);
1041
+ }, v = await Ve(at, ar);
2118
1042
  if (console.log(
2119
- N,
2120
- N == null ? void 0 : N.basket_id,
2121
- N == null ? void 0 : N.basketId,
1043
+ v,
1044
+ v == null ? void 0 : v.basket_id,
1045
+ v == null ? void 0 : v.basketId,
2122
1046
  "the basket response"
2123
- ), !(N != null && N.basket_id || !(N != null && N.basketId))) {
2124
- w(!1), console.error("Failed to create basket");
1047
+ ), !(v != null && v.basket_id || !(v != null && v.basketId))) {
1048
+ M(!1), console.error("Failed to create basket");
2125
1049
  return;
2126
1050
  }
2127
- Ft(
2128
- (N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId)
1051
+ xt(
1052
+ (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
2129
1053
  );
2130
- const St = await Xt(
2131
- (N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId),
2132
- G,
2133
- mt
1054
+ const ht = await Vt(
1055
+ (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId),
1056
+ B,
1057
+ at
2134
1058
  );
2135
- (((kt = St == null ? void 0 : St.product_items) == null ? void 0 : kt.length) > 0 || ((J = St == null ? void 0 : St.productItems) == null ? void 0 : J.length) > 0) && W.success("Added to cart", {
1059
+ (((mt = ht == null ? void 0 : ht.product_items) == null ? void 0 : mt.length) > 0 || ((D = ht == null ? void 0 : ht.productItems) == null ? void 0 : D.length) > 0) && U.success("Added to cart", {
2136
1060
  position: "bottom-right",
2137
1061
  autoClose: 3e3,
2138
1062
  hideProgressBar: !1,
2139
1063
  closeOnClick: !0,
2140
1064
  pauseOnHover: !0,
2141
1065
  draggable: !0
2142
- }), _t(N.basket_id || (N == null ? void 0 : N.basketId));
1066
+ }), Ht(v.basket_id || (v == null ? void 0 : v.basketId));
2143
1067
  }
2144
- } catch (x) {
2145
- w(!1), console.error("Error adding to cart:", x), W.error("Failed to add product to cart", {
1068
+ } catch (m) {
1069
+ M(!1), console.error("Error adding to cart:", m), U.error("Failed to add product to cart", {
2146
1070
  position: "bottom-right",
2147
1071
  autoClose: 3e3
2148
- }), ((K = x == null ? void 0 : x.response) == null ? void 0 : K.status) === 404 || // Basket not found
2149
- ((Z = x == null ? void 0 : x.response) == null ? void 0 : Z.status) === 401 ? (((tt = x == null ? void 0 : x.response) == null ? void 0 : tt.status) === 404 && Ft(null), ((it = x == null ? void 0 : x.response) == null ? void 0 : it.status) === 401 && (Ft(null), Zt(null))) : (console.error("Failed to add product to basket:", x.message), W.error("Failed to add product to cart", {
1072
+ }), ((L = m == null ? void 0 : m.response) == null ? void 0 : L.status) === 404 || // Basket not found
1073
+ ((H = m == null ? void 0 : m.response) == null ? void 0 : H.status) === 401 ? (((V = m == null ? void 0 : m.response) == null ? void 0 : V.status) === 404 && xt(null), ((W = m == null ? void 0 : m.response) == null ? void 0 : W.status) === 401 && (xt(null), Rt(null))) : (console.error("Failed to add product to basket:", m.message), U.error("Failed to add product to cart", {
2150
1074
  position: "bottom-right",
2151
1075
  autoClose: 3e3
2152
1076
  }));
2153
- } finally {
2154
- _t();
2155
1077
  }
2156
- w(!1);
1078
+ M(!1);
2157
1079
  };
2158
- return /* @__PURE__ */ l("div", { className: "relative flex justify-center", children: /* @__PURE__ */ p(dn, { open: d, onOpenChange: f, children: [
2159
- /* @__PURE__ */ l(
2160
- fn,
1080
+ return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(xr, { open: x, onOpenChange: b, children: [
1081
+ /* @__PURE__ */ a(
1082
+ yr,
2161
1083
  {
2162
- onClick: () => f(!0),
1084
+ onClick: () => b(!0),
2163
1085
  style: {
2164
1086
  // background: storeDetails.tanyaThemeColor,
2165
1087
  },
2166
1088
  className: "flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity p-0",
2167
- children: /* @__PURE__ */ l("div", { className: "flex flex-col", children: /* @__PURE__ */ p(
1089
+ children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: /* @__PURE__ */ u(
2168
1090
  "svg",
2169
1091
  {
2170
1092
  width: "40",
@@ -2173,22 +1095,22 @@ const Ft = (t) => {
2173
1095
  fill: "none",
2174
1096
  xmlns: "http://www.w3.org/2000/svg",
2175
1097
  children: [
2176
- /* @__PURE__ */ p("g", { clipPath: "url(#clip0_958_585)", children: [
2177
- /* @__PURE__ */ l(
1098
+ /* @__PURE__ */ u("g", { clipPath: "url(#clip0_958_585)", children: [
1099
+ /* @__PURE__ */ a(
2178
1100
  "path",
2179
1101
  {
2180
1102
  d: "M30.0002 5C31.7683 5 33.464 5.70238 34.7142 6.95262C35.9644 8.20286 36.6668 9.89856 36.6668 11.6667V25C36.6668 26.7681 35.9644 28.4638 34.7142 29.714C33.464 30.9643 31.7683 31.6667 30.0002 31.6667H25.6902L21.1785 36.1783C20.8915 36.4653 20.5097 36.6377 20.1046 36.6631C19.6996 36.6886 19.2992 36.5654 18.9785 36.3167L18.8218 36.1783L14.3085 31.6667H10.0002C8.28976 31.6667 6.64478 31.0093 5.40548 29.8305C4.16617 28.6516 3.42735 27.0416 3.34183 25.3333L3.3335 25V11.6667C3.3335 9.89856 4.03588 8.20286 5.28612 6.95262C6.53636 5.70238 8.23205 5 10.0002 5H30.0002Z",
2181
1103
  fill: "url(#paint0_linear_958_585)"
2182
1104
  }
2183
1105
  ),
2184
- /* @__PURE__ */ l(
1106
+ /* @__PURE__ */ a(
2185
1107
  "path",
2186
1108
  {
2187
1109
  d: "M28.3335 15.6511V11.6667C28.3335 11.6667 22.2774 12.6042 20.1148 15.4167C17.9521 18.2292 18.6644 26.6667 18.6644 26.6667H22.5321C22.5321 26.6667 22.0614 18.9323 23.4989 17.2917C24.9364 15.6511 28.3335 15.6511 28.3335 15.6511Z",
2188
1110
  fill: "white"
2189
1111
  }
2190
1112
  ),
2191
- /* @__PURE__ */ l(
1113
+ /* @__PURE__ */ a(
2192
1114
  "path",
2193
1115
  {
2194
1116
  d: "M13.3335 11.6667H19.6184V15.4167H13.3335V11.6667Z",
@@ -2196,8 +1118,8 @@ const Ft = (t) => {
2196
1118
  }
2197
1119
  )
2198
1120
  ] }),
2199
- /* @__PURE__ */ p("defs", { children: [
2200
- /* @__PURE__ */ p(
1121
+ /* @__PURE__ */ u("defs", { children: [
1122
+ /* @__PURE__ */ u(
2201
1123
  "linearGradient",
2202
1124
  {
2203
1125
  id: "paint0_linear_958_585",
@@ -2207,27 +1129,27 @@ const Ft = (t) => {
2207
1129
  y2: "30",
2208
1130
  gradientUnits: "userSpaceOnUse",
2209
1131
  children: [
2210
- /* @__PURE__ */ l("stop", { stopColor: "#452697" }),
2211
- /* @__PURE__ */ l("stop", { offset: "1", stopColor: "#7C5BFF" })
1132
+ /* @__PURE__ */ a("stop", { stopColor: "#452697" }),
1133
+ /* @__PURE__ */ a("stop", { offset: "1", stopColor: "#7C5BFF" })
2212
1134
  ]
2213
1135
  }
2214
1136
  ),
2215
- /* @__PURE__ */ l("clipPath", { id: "clip0_958_585", children: /* @__PURE__ */ l("rect", { width: "40", height: "40", fill: "white" }) })
1137
+ /* @__PURE__ */ a("clipPath", { id: "clip0_958_585", children: /* @__PURE__ */ a("rect", { width: "40", height: "40", fill: "white" }) })
2216
1138
  ] })
2217
1139
  ]
2218
1140
  }
2219
1141
  ) })
2220
1142
  }
2221
1143
  ),
2222
- g && /* @__PURE__ */ p(pe, { children: [
2223
- /* @__PURE__ */ l(
1144
+ _ && /* @__PURE__ */ u(ee, { children: [
1145
+ /* @__PURE__ */ a(
2224
1146
  "div",
2225
1147
  {
2226
1148
  className: "fixed inset-0 z-40 bg-black/30",
2227
- onClick: () => f(!1)
1149
+ onClick: () => b(!1)
2228
1150
  }
2229
1151
  ),
2230
- /* @__PURE__ */ p(
1152
+ /* @__PURE__ */ u(
2231
1153
  "div",
2232
1154
  {
2233
1155
  className: `
@@ -2235,31 +1157,31 @@ const Ft = (t) => {
2235
1157
  top-0 right-0
2236
1158
  transition-transform duration-300 ease-in-out
2237
1159
  lg:transform
2238
- ${h ? "lg:translate-x-0" : "lg:translate-x-full"}
1160
+ ${C ? "lg:translate-x-0" : "lg:translate-x-full"}
2239
1161
  // For mobile: animate from bottom
2240
- ${h ? "translate-y-0" : "translate-y-full"}
1162
+ ${C ? "translate-y-0" : "translate-y-full"}
2241
1163
  lg:translate-y-0
2242
1164
  `,
2243
1165
  style: {
2244
1166
  background: "linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"
2245
1167
  },
2246
1168
  children: [
2247
- /* @__PURE__ */ p(
1169
+ /* @__PURE__ */ u(
2248
1170
  "div",
2249
1171
  {
2250
1172
  className: "flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",
2251
1173
  children: [
2252
- /* @__PURE__ */ l(
1174
+ /* @__PURE__ */ a(
2253
1175
  "div",
2254
1176
  {
2255
1177
  style: {
2256
1178
  display: "flex",
2257
- color: y.tanyaThemeContrastColor,
1179
+ color: p.tanyaThemeContrastColor,
2258
1180
  alignItems: "center",
2259
1181
  gap: "0.5rem"
2260
1182
  },
2261
- children: /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: [
2262
- /* @__PURE__ */ p(
1183
+ children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
1184
+ /* @__PURE__ */ u(
2263
1185
  "div",
2264
1186
  {
2265
1187
  className: "flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",
@@ -2267,7 +1189,7 @@ const Ft = (t) => {
2267
1189
  background: "linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"
2268
1190
  },
2269
1191
  children: [
2270
- /* @__PURE__ */ p(
1192
+ /* @__PURE__ */ u(
2271
1193
  "svg",
2272
1194
  {
2273
1195
  width: "20",
@@ -2276,22 +1198,22 @@ const Ft = (t) => {
2276
1198
  fill: "none",
2277
1199
  xmlns: "http://www.w3.org/2000/svg",
2278
1200
  children: [
2279
- /* @__PURE__ */ l(
1201
+ /* @__PURE__ */ a(
2280
1202
  "path",
2281
1203
  {
2282
1204
  d: "M15 4.48438V0.5C15 0.5 8.94395 1.4375 6.78127 4.25C4.61859 7.0625 5.33095 15.5 5.33095 15.5H9.19857C9.19857 15.5 8.72793 7.76562 10.1654 6.125C11.6029 4.48438 15 4.48438 15 4.48438Z",
2283
1205
  fill: "white"
2284
1206
  }
2285
1207
  ),
2286
- /* @__PURE__ */ l("path", { d: "M0 0.5H6.28488V4.25H0V0.5Z", fill: "white" })
1208
+ /* @__PURE__ */ a("path", { d: "M0 0.5H6.28488V4.25H0V0.5Z", fill: "white" })
2287
1209
  ]
2288
1210
  }
2289
1211
  ),
2290
- /* @__PURE__ */ l("p", { className: "text-[#FFFFFF] font-nunitoSans font-semibold", children: "TANYA" })
1212
+ /* @__PURE__ */ a("p", { className: "text-[#FFFFFF] font-nunitoSans font-semibold", children: "TANYA" })
2291
1213
  ]
2292
1214
  }
2293
1215
  ),
2294
- /* @__PURE__ */ p(
1216
+ /* @__PURE__ */ u(
2295
1217
  "p",
2296
1218
  {
2297
1219
  className: "text-[#5B5B5B] font-nunitoSans font-semibold",
@@ -2306,7 +1228,7 @@ const Ft = (t) => {
2306
1228
  ] })
2307
1229
  }
2308
1230
  ),
2309
- /* @__PURE__ */ l(
1231
+ /* @__PURE__ */ a(
2310
1232
  "div",
2311
1233
  {
2312
1234
  style: {
@@ -2315,7 +1237,7 @@ const Ft = (t) => {
2315
1237
  gap: "1.25rem",
2316
1238
  margin: "0.75rem"
2317
1239
  },
2318
- children: /* @__PURE__ */ l("button", { onClick: () => f(!1), children: /* @__PURE__ */ p(
1240
+ children: /* @__PURE__ */ a("button", { onClick: () => b(!1), children: /* @__PURE__ */ u(
2319
1241
  "svg",
2320
1242
  {
2321
1243
  width: "24",
@@ -2324,8 +1246,8 @@ const Ft = (t) => {
2324
1246
  fill: "none",
2325
1247
  xmlns: "http://www.w3.org/2000/svg",
2326
1248
  children: [
2327
- /* @__PURE__ */ p("g", { clipPath: "url(#clip0_501_6036)", children: [
2328
- /* @__PURE__ */ l(
1249
+ /* @__PURE__ */ u("g", { clipPath: "url(#clip0_501_6036)", children: [
1250
+ /* @__PURE__ */ a(
2329
1251
  "path",
2330
1252
  {
2331
1253
  d: "M18 6.5L6 18.5",
@@ -2335,7 +1257,7 @@ const Ft = (t) => {
2335
1257
  strokeLinejoin: "round"
2336
1258
  }
2337
1259
  ),
2338
- /* @__PURE__ */ l(
1260
+ /* @__PURE__ */ a(
2339
1261
  "path",
2340
1262
  {
2341
1263
  d: "M6 6.5L18 18.5",
@@ -2346,7 +1268,7 @@ const Ft = (t) => {
2346
1268
  }
2347
1269
  )
2348
1270
  ] }),
2349
- /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l("clipPath", { id: "clip0_501_6036", children: /* @__PURE__ */ l(
1271
+ /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("clipPath", { id: "clip0_501_6036", children: /* @__PURE__ */ a(
2350
1272
  "rect",
2351
1273
  {
2352
1274
  width: "24",
@@ -2363,92 +1285,92 @@ const Ft = (t) => {
2363
1285
  ]
2364
1286
  }
2365
1287
  ),
2366
- /* @__PURE__ */ p("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
2367
- /* @__PURE__ */ p(
1288
+ /* @__PURE__ */ u("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
1289
+ /* @__PURE__ */ u(
2368
1290
  "div",
2369
1291
  {
2370
- className: `flex flex-col h-full ${Tt ? "lg:w-2/3 w-full" : "w-full"}`,
1292
+ className: `flex flex-col h-full ${_t ? "lg:w-2/3 w-full" : "w-full"}`,
2371
1293
  children: [
2372
- /* @__PURE__ */ p(
1294
+ /* @__PURE__ */ u(
2373
1295
  "div",
2374
1296
  {
2375
- ref: yt,
1297
+ ref: dt,
2376
1298
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
2377
1299
  children: [
2378
- (y == null ? void 0 : y.whomRequired) && /* @__PURE__ */ p(
1300
+ (p == null ? void 0 : p.whomRequired) && /* @__PURE__ */ u(
2379
1301
  "div",
2380
1302
  {
2381
1303
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
2382
1304
  children: [
2383
- /* @__PURE__ */ l("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ l("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
2384
- /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-2 mt-2", children: e.map((u) => /* @__PURE__ */ l(
1305
+ /* @__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?" }) }),
1306
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: e.map((c) => /* @__PURE__ */ a(
2385
1307
  "button",
2386
1308
  {
2387
- onClick: () => Bt(u),
1309
+ onClick: () => jt(c),
2388
1310
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
2389
1311
  style: {
2390
- backgroundColor: j === r[u] ? "#FFFFFF" : "#F3F3F3",
2391
- borderColor: j === r[u] ? "#BBB3DD" : ""
1312
+ backgroundColor: ct === r[c] ? "#FFFFFF" : "#F3F3F3",
1313
+ borderColor: ct === r[c] ? "#BBB3DD" : ""
2392
1314
  },
2393
- children: u
1315
+ children: c
2394
1316
  },
2395
- u
1317
+ c
2396
1318
  )) })
2397
1319
  ]
2398
1320
  }
2399
1321
  ),
2400
- U.map((u, E) => {
2401
- var I, F;
2402
- return /* @__PURE__ */ p("div", { children: [
2403
- /* @__PURE__ */ l("div", { className: "flex justify-end", children: /* @__PURE__ */ l("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: u.query }) }),
2404
- u.response && u.response.includes("Thinking") ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
1322
+ Ct.map((c, k) => {
1323
+ var w, y;
1324
+ return /* @__PURE__ */ u("div", { children: [
1325
+ /* @__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 }) }),
1326
+ c.response && c.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
2405
1327
  "div",
2406
1328
  {
2407
1329
  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",
2408
1330
  dangerouslySetInnerHTML: {
2409
- __html: ae(u.response)
1331
+ __html: Wt(c.response)
2410
1332
  }
2411
1333
  }
2412
- ) }) : /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
1334
+ ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
2413
1335
  "div",
2414
1336
  {
2415
1337
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
2416
1338
  dangerouslySetInnerHTML: {
2417
- __html: ae(u.response)
1339
+ __html: Wt(c.response)
2418
1340
  }
2419
1341
  }
2420
1342
  ) }),
2421
- O && !u.response.includes("Thinking") && ((I = u.products) == null ? void 0 : I.length) == 0 && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("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" }) }),
2422
- (u == null ? void 0 : u.products) && ((F = u == null ? void 0 : u.products) == null ? void 0 : F.length) > 0 && /* @__PURE__ */ l(
2423
- xo,
1343
+ 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" }) }),
1344
+ (c == null ? void 0 : c.products) && ((y = c == null ? void 0 : c.products) == null ? void 0 : y.length) > 0 && /* @__PURE__ */ a(
1345
+ Fr,
2424
1346
  {
2425
- chat: u.products,
2426
- storeDetails: y
1347
+ chat: c.products,
1348
+ storeDetails: p
2427
1349
  }
2428
1350
  ),
2429
- u.potentialQuestions.length > 0 && /* @__PURE__ */ p("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
2430
- /* @__PURE__ */ l(
1351
+ c.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1352
+ /* @__PURE__ */ a(
2431
1353
  "p",
2432
1354
  {
2433
1355
  className: "font-nunitoSans font-bold text-sm text-[#494949]",
2434
- style: { color: y.themeDarkColor },
1356
+ style: { color: p.themeDarkColor },
2435
1357
  children: "Why not explore these inquiries..."
2436
1358
  }
2437
1359
  ),
2438
- u.potentialQuestions.split(",").map((b, C) => /* @__PURE__ */ l(
1360
+ c.potentialQuestions.split(",").map((f, g) => /* @__PURE__ */ a(
2439
1361
  "button",
2440
1362
  {
2441
- className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${y.themeDarkColor} m-1 rounded-xl px-2 py-1`,
2442
- onClick: () => ot(b),
1363
+ className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${p.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1364
+ onClick: () => K(f),
2443
1365
  style: {
2444
- backgroundColor: y.tanyaThemeColorLight
1366
+ backgroundColor: p.tanyaThemeColorLight
2445
1367
  },
2446
- children: b
1368
+ children: f
2447
1369
  },
2448
- C
1370
+ g
2449
1371
  ))
2450
1372
  ] }),
2451
- u.secondaryLoading && /* @__PURE__ */ l("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ p(
1373
+ c.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
2452
1374
  "div",
2453
1375
  {
2454
1376
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -2456,56 +1378,56 @@ const Ft = (t) => {
2456
1378
  margin: "0.75rem"
2457
1379
  },
2458
1380
  children: [
2459
- /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
2460
- /* @__PURE__ */ l("div", { className: "tanya-sparkle tanya-sparkle-1", children: "✨" }),
2461
- /* @__PURE__ */ l("div", { className: "tanya-sparkle tanya-sparkle-2", children: "✨" }),
2462
- /* @__PURE__ */ l("div", { className: "tanya-sparkle tanya-sparkle-3", children: "✨" })
1381
+ /* @__PURE__ */ u("div", { className: "flex gap-1", children: [
1382
+ /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-1", children: "✨" }),
1383
+ /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-2", children: "✨" }),
1384
+ /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-3", children: "✨" })
2463
1385
  ] }),
2464
- /* @__PURE__ */ l("div", { className: "tanya-shimmer" }),
2465
- /* @__PURE__ */ l(
1386
+ /* @__PURE__ */ a("div", { className: "tanya-shimmer" }),
1387
+ /* @__PURE__ */ a(
2466
1388
  "p",
2467
1389
  {
2468
1390
  className: "font-semibold tanya-pulse",
2469
- style: { color: y.themeDarkColor },
1391
+ style: { color: p.themeDarkColor },
2470
1392
  children: "I’ve found a special surprise crafted just for you… hang on a sec!"
2471
1393
  }
2472
1394
  ),
2473
- /* @__PURE__ */ l(
1395
+ /* @__PURE__ */ a(
2474
1396
  "p",
2475
1397
  {
2476
1398
  className: "tanya-dots mt-1",
2477
- style: { color: y.themeDarkColor },
1399
+ style: { color: p.themeDarkColor },
2478
1400
  children: "• • •"
2479
1401
  }
2480
1402
  )
2481
1403
  ]
2482
1404
  }
2483
1405
  ) }),
2484
- u.secondaryResponse && /* @__PURE__ */ l(pe, { children: /* @__PURE__ */ p("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
2485
- /* @__PURE__ */ l(
1406
+ c.secondaryResponse && /* @__PURE__ */ a(ee, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1407
+ /* @__PURE__ */ a(
2486
1408
  "div",
2487
1409
  {
2488
1410
  className: "text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",
2489
1411
  style: {
2490
- backgroundColor: y.tanyaThemeColorLight
1412
+ backgroundColor: p.tanyaThemeColorLight
2491
1413
  },
2492
1414
  dangerouslySetInnerHTML: {
2493
- __html: ae(
2494
- u.secondaryResponse
1415
+ __html: Wt(
1416
+ c.secondaryResponse
2495
1417
  )
2496
1418
  }
2497
1419
  }
2498
1420
  ),
2499
- u.productSnapshot && // chat.productSnapshot.points > 0 &&
2500
- /* @__PURE__ */ l("div", { className: "mt-4 w-full", children: /* @__PURE__ */ p(
1421
+ c.productSnapshot && // chat.productSnapshot.points > 0 &&
1422
+ /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
2501
1423
  "div",
2502
1424
  {
2503
1425
  className: "flex gap-4 items-stretch rounded-2xl p-4",
2504
1426
  style: {
2505
- backgroundColor: y.tanyaThemeColorLight
1427
+ backgroundColor: p.tanyaThemeColorLight
2506
1428
  },
2507
1429
  children: [
2508
- /* @__PURE__ */ l(
1430
+ /* @__PURE__ */ a(
2509
1431
  "div",
2510
1432
  {
2511
1433
  className: "flex-shrink-0 rounded-xl overflow-hidden border",
@@ -2514,105 +1436,105 @@ const Ft = (t) => {
2514
1436
  height: 112,
2515
1437
  borderColor: "#eee"
2516
1438
  },
2517
- children: u.productSnapshot.image ? /* @__PURE__ */ l(
1439
+ children: c.productSnapshot.image ? /* @__PURE__ */ a(
2518
1440
  "img",
2519
1441
  {
2520
- src: u.productSnapshot.image,
2521
- alt: u.productSnapshot.name,
1442
+ src: c.productSnapshot.image,
1443
+ alt: c.productSnapshot.name,
2522
1444
  className: "w-full h-full object-cover"
2523
1445
  }
2524
- ) : /* @__PURE__ */ l("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
1446
+ ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
2525
1447
  }
2526
1448
  ),
2527
- /* @__PURE__ */ p("div", { className: "flex flex-col flex-1 justify-between", children: [
2528
- /* @__PURE__ */ p("div", { children: [
2529
- /* @__PURE__ */ l("p", { className: "font-semibold text-[15px] leading-snug", children: u.productSnapshot.name }),
2530
- /* @__PURE__ */ l("p", { className: "mt-1 text-[14px] font-medium", children: u.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1449
+ /* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
1450
+ /* @__PURE__ */ u("div", { children: [
1451
+ /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: c.productSnapshot.name }),
1452
+ /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: c.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
2531
1453
  style: "currency",
2532
- currency: (y == null ? void 0 : y.currency) || "USD"
1454
+ currency: (p == null ? void 0 : p.currency) || "USD"
2533
1455
  }).format(
2534
- u.productSnapshot.price
1456
+ c.productSnapshot.price
2535
1457
  ) : "" }),
2536
- u.productSnapshot.points > 0 && /* @__PURE__ */ p("p", { className: "mt-1 text-xs opacity-80", children: [
1458
+ c.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
2537
1459
  "You will earn",
2538
1460
  " ",
2539
- /* @__PURE__ */ p("strong", { children: [
2540
- u.productSnapshot.points,
1461
+ /* @__PURE__ */ u("strong", { children: [
1462
+ c.productSnapshot.points,
2541
1463
  " ",
2542
1464
  "points"
2543
1465
  ] })
2544
1466
  ] })
2545
1467
  ] }),
2546
- /* @__PURE__ */ p("div", { className: "mt-3 flex items-center gap-3", children: [
2547
- /* @__PURE__ */ p("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
2548
- /* @__PURE__ */ l(
1468
+ /* @__PURE__ */ u("div", { className: "mt-3 flex items-center gap-3", children: [
1469
+ /* @__PURE__ */ u("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
1470
+ /* @__PURE__ */ a(
2549
1471
  "button",
2550
1472
  {
2551
1473
  className: "px-3 py-1 text-sm",
2552
- onClick: () => B(
2553
- (b) => b.map(
2554
- (C, H) => H === E && C.productSnapshot ? {
2555
- ...C,
1474
+ onClick: () => O(
1475
+ (f) => f.map(
1476
+ (g, z) => z === k && g.productSnapshot ? {
1477
+ ...g,
2556
1478
  productSnapshot: {
2557
- ...C.productSnapshot,
1479
+ ...g.productSnapshot,
2558
1480
  quantity: Math.max(
2559
1481
  1,
2560
- C.productSnapshot.quantity - 1
1482
+ g.productSnapshot.quantity - 1
2561
1483
  )
2562
1484
  }
2563
- } : C
1485
+ } : g
2564
1486
  )
2565
1487
  ),
2566
1488
  style: {
2567
1489
  background: "transparent",
2568
- color: y.themeDarkColor
1490
+ color: p.themeDarkColor
2569
1491
  },
2570
1492
  children: "−"
2571
1493
  }
2572
1494
  ),
2573
- /* @__PURE__ */ l("div", { className: "px-3 py-1 text-sm select-none", children: u.productSnapshot.quantity }),
2574
- /* @__PURE__ */ l(
1495
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: c.productSnapshot.quantity }),
1496
+ /* @__PURE__ */ a(
2575
1497
  "button",
2576
1498
  {
2577
1499
  className: "px-3 py-1 text-sm",
2578
- onClick: () => B(
2579
- (b) => b.map(
2580
- (C, H) => H === E && C.productSnapshot ? {
2581
- ...C,
1500
+ onClick: () => O(
1501
+ (f) => f.map(
1502
+ (g, z) => z === k && g.productSnapshot ? {
1503
+ ...g,
2582
1504
  productSnapshot: {
2583
- ...C.productSnapshot,
2584
- quantity: C.productSnapshot.quantity + 1
1505
+ ...g.productSnapshot,
1506
+ quantity: g.productSnapshot.quantity + 1
2585
1507
  }
2586
- } : C
1508
+ } : g
2587
1509
  )
2588
1510
  ),
2589
1511
  style: {
2590
1512
  background: "transparent",
2591
- color: y.themeDarkColor
1513
+ color: p.themeDarkColor
2592
1514
  },
2593
1515
  children: "+"
2594
1516
  }
2595
1517
  )
2596
1518
  ] }),
2597
- /* @__PURE__ */ l(
1519
+ /* @__PURE__ */ a(
2598
1520
  "button",
2599
1521
  {
2600
1522
  onClick: () => {
2601
- Jr(
2602
- X(
2603
- u.productSnapshot
1523
+ rr(
1524
+ zt(
1525
+ c.productSnapshot
2604
1526
  ),
2605
- u.productSnapshot.quantity
1527
+ c.productSnapshot.quantity
2606
1528
  );
2607
1529
  },
2608
- disabled: T,
1530
+ disabled: q,
2609
1531
  className: "px-4 py-2 rounded-full font-medium",
2610
1532
  style: {
2611
- background: y.tanyaThemeColor,
2612
- color: (y == null ? void 0 : y.tanyaThemeContrastColor) || "#fff",
2613
- opacity: T ? 0.8 : 1
1533
+ background: p.tanyaThemeColor,
1534
+ color: (p == null ? void 0 : p.tanyaThemeContrastColor) || "#fff",
1535
+ opacity: q ? 0.8 : 1
2614
1536
  },
2615
- children: T ? "Adding..." : "Add to cart"
1537
+ children: q ? "Adding..." : "Add to cart"
2616
1538
  }
2617
1539
  )
2618
1540
  ] })
@@ -2621,50 +1543,50 @@ const Ft = (t) => {
2621
1543
  }
2622
1544
  ) })
2623
1545
  ] }) }),
2624
- /* @__PURE__ */ l("div", { className: "mb-20" })
2625
- ] }, E);
1546
+ /* @__PURE__ */ a("div", { className: "mb-20" })
1547
+ ] }, k);
2626
1548
  })
2627
1549
  ]
2628
1550
  }
2629
1551
  ),
2630
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-2 sticky bottom-0 left-0 right-0 bg-[#E3DEEF] z-50 px-4 py-2", children: /* @__PURE__ */ l(
1552
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-2 sticky bottom-0 left-0 right-0 bg-[#E3DEEF] z-50 px-4 py-2", children: /* @__PURE__ */ a(
2631
1553
  "div",
2632
1554
  {
2633
1555
  className: "p-[1px] rounded-xl",
2634
1556
  style: {
2635
1557
  background: "linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"
2636
1558
  },
2637
- children: /* @__PURE__ */ p("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
2638
- /* @__PURE__ */ l(
1559
+ children: /* @__PURE__ */ u("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
1560
+ /* @__PURE__ */ a(
2639
1561
  "input",
2640
1562
  {
2641
1563
  className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
2642
1564
  placeholder: "How can I help you...",
2643
- value: Q,
1565
+ value: kt,
2644
1566
  autoFocus: !0,
2645
- onChange: (u) => _(u.target.value),
2646
- onKeyDown: (u) => {
2647
- u.key === "Enter" && !k && ot();
1567
+ onChange: (c) => St(c.target.value),
1568
+ onKeyDown: (c) => {
1569
+ c.key === "Enter" && !lt && K();
2648
1570
  }
2649
1571
  }
2650
1572
  ),
2651
- /* @__PURE__ */ l(
1573
+ /* @__PURE__ */ a(
2652
1574
  "button",
2653
1575
  {
2654
1576
  type: "submit",
2655
- disabled: k,
1577
+ disabled: lt,
2656
1578
  className: "p-3",
2657
- onClick: () => ot(),
2658
- children: k ? /* @__PURE__ */ l(
1579
+ onClick: () => K(),
1580
+ children: lt ? /* @__PURE__ */ a(
2659
1581
  "div",
2660
1582
  {
2661
1583
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
2662
1584
  style: {
2663
1585
  borderBottom: "2px solid",
2664
- color: y.tanyaThemeColor
1586
+ color: p.tanyaThemeColor
2665
1587
  }
2666
1588
  }
2667
- ) : /* @__PURE__ */ l(
1589
+ ) : /* @__PURE__ */ a(
2668
1590
  "svg",
2669
1591
  {
2670
1592
  width: "20",
@@ -2672,7 +1594,7 @@ const Ft = (t) => {
2672
1594
  viewBox: "0 0 20 20",
2673
1595
  fill: "none",
2674
1596
  xmlns: "http://www.w3.org/2000/svg",
2675
- children: /* @__PURE__ */ l(
1597
+ children: /* @__PURE__ */ a(
2676
1598
  "path",
2677
1599
  {
2678
1600
  d: "M16.6357 13.6701L18.3521 8.5208C19.8516 4.02242 20.6013 1.77322 19.414 0.585948C18.2268 -0.601312 15.9776 0.148418 11.4792 1.64788L6.32987 3.36432C2.69923 4.57453 0.883923 5.17964 0.368062 6.06698C-0.122688 6.91112 -0.122688 7.95369 0.368062 8.7978C0.883923 9.6852 2.69923 10.2903 6.32987 11.5005C6.77981 11.6505 7.28601 11.5434 7.62294 11.2096L13.1286 5.75495C13.4383 5.44808 13.9382 5.45041 14.245 5.76015C14.5519 6.06989 14.5496 6.56975 14.2398 6.87662L8.8231 12.2432C8.4518 12.6111 8.3342 13.1742 8.4995 13.6701C9.7097 17.3007 10.3148 19.1161 11.2022 19.6319C12.0463 20.1227 13.0889 20.1227 13.933 19.6319C14.8204 19.1161 15.4255 17.3008 16.6357 13.6701Z",
@@ -2689,7 +1611,7 @@ const Ft = (t) => {
2689
1611
  ]
2690
1612
  }
2691
1613
  ),
2692
- /* @__PURE__ */ l(ko, {})
1614
+ /* @__PURE__ */ a(Nr, {})
2693
1615
  ] })
2694
1616
  ]
2695
1617
  }
@@ -2697,83 +1619,83 @@ const Ft = (t) => {
2697
1619
  ] })
2698
1620
  ] }) });
2699
1621
  };
2700
- var be = function(t, e) {
2701
- return be = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
2702
- r.__proto__ = n;
2703
- } || function(r, n) {
2704
- for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
2705
- }, be(t, e);
1622
+ var ne = function(t, e) {
1623
+ return ne = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, o) {
1624
+ r.__proto__ = o;
1625
+ } || function(r, o) {
1626
+ for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1627
+ }, ne(t, e);
2706
1628
  };
2707
- function Io(t, e) {
1629
+ function Tr(t, e) {
2708
1630
  if (typeof e != "function" && e !== null)
2709
1631
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
2710
- be(t, e);
1632
+ ne(t, e);
2711
1633
  function r() {
2712
1634
  this.constructor = t;
2713
1635
  }
2714
1636
  t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
2715
1637
  }
2716
- var ct = function() {
2717
- return ct = Object.assign || function(e) {
2718
- for (var r, n = 1, o = arguments.length; n < o; n++) {
2719
- r = arguments[n];
2720
- for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
1638
+ var Q = function() {
1639
+ return Q = Object.assign || function(e) {
1640
+ for (var r, o = 1, n = arguments.length; o < n; o++) {
1641
+ r = arguments[o];
1642
+ for (var l in r) Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
2721
1643
  }
2722
1644
  return e;
2723
- }, ct.apply(this, arguments);
1645
+ }, Q.apply(this, arguments);
2724
1646
  };
2725
- function Co(t, e) {
1647
+ function Or(t, e) {
2726
1648
  var r = {};
2727
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
1649
+ for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
2728
1650
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
2729
- for (var o = 0, n = Object.getOwnPropertySymbols(t); o < n.length; o++)
2730
- e.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[o]) && (r[n[o]] = t[n[o]]);
1651
+ for (var n = 0, o = Object.getOwnPropertySymbols(t); n < o.length; n++)
1652
+ e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
2731
1653
  return r;
2732
1654
  }
2733
- var ce = "Invariant Violation", rr = Object.setPrototypeOf, _o = rr === void 0 ? function(t, e) {
1655
+ var Xt = "Invariant Violation", _e = Object.setPrototypeOf, Pr = _e === void 0 ? function(t, e) {
2734
1656
  return t.__proto__ = e, t;
2735
- } : rr, Dr = (
1657
+ } : _e, Ye = (
2736
1658
  /** @class */
2737
1659
  (function(t) {
2738
- Io(e, t);
1660
+ Tr(e, t);
2739
1661
  function e(r) {
2740
- r === void 0 && (r = ce);
2741
- var n = t.call(this, typeof r == "number" ? ce + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
2742
- return n.framesToPop = 1, n.name = ce, _o(n, e.prototype), n;
1662
+ r === void 0 && (r = Xt);
1663
+ var o = t.call(this, typeof r == "number" ? Xt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1664
+ return o.framesToPop = 1, o.name = Xt, Pr(o, e.prototype), o;
2743
1665
  }
2744
1666
  return e;
2745
1667
  })(Error)
2746
1668
  );
2747
- function gt(t, e) {
1669
+ function it(t, e) {
2748
1670
  if (!t)
2749
- throw new Dr(e);
1671
+ throw new Ye(e);
2750
1672
  }
2751
- var zr = ["debug", "log", "warn", "error", "silent"], Fo = zr.indexOf("log");
2752
- function Ht(t) {
1673
+ var Je = ["debug", "log", "warn", "error", "silent"], $r = Je.indexOf("log");
1674
+ function Lt(t) {
2753
1675
  return function() {
2754
- if (zr.indexOf(t) >= Fo) {
1676
+ if (Je.indexOf(t) >= $r) {
2755
1677
  var e = console[t] || console.log;
2756
1678
  return e.apply(console, arguments);
2757
1679
  }
2758
1680
  };
2759
1681
  }
2760
1682
  (function(t) {
2761
- t.debug = Ht("debug"), t.log = Ht("log"), t.warn = Ht("warn"), t.error = Ht("error");
2762
- })(gt || (gt = {}));
2763
- var Mr = "3.14.0";
2764
- function It(t) {
1683
+ t.debug = Lt("debug"), t.log = Lt("log"), t.warn = Lt("warn"), t.error = Lt("error");
1684
+ })(it || (it = {}));
1685
+ var Ke = "3.14.0";
1686
+ function wt(t) {
2765
1687
  try {
2766
1688
  return t();
2767
1689
  } catch {
2768
1690
  }
2769
1691
  }
2770
- const xe = It(function() {
1692
+ const ae = wt(function() {
2771
1693
  return globalThis;
2772
- }) || It(function() {
1694
+ }) || wt(function() {
2773
1695
  return window;
2774
- }) || It(function() {
1696
+ }) || wt(function() {
2775
1697
  return self;
2776
- }) || It(function() {
1698
+ }) || wt(function() {
2777
1699
  return global;
2778
1700
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
2779
1701
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -2781,160 +1703,160 @@ const xe = It(function() {
2781
1703
  // detect syntactic usage of the Function constructor. If you think you can
2782
1704
  // improve your static analysis to detect this obfuscation, think again. This
2783
1705
  // is an arms race you cannot win, at least not in JavaScript.
2784
- It(function() {
2785
- return It.constructor("return this")();
1706
+ wt(function() {
1707
+ return wt.constructor("return this")();
2786
1708
  });
2787
- var nr = /* @__PURE__ */ new Map();
2788
- function No(t) {
2789
- var e = nr.get(t) || 1;
2790
- return nr.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
2791
- }
2792
- function Eo(t, e) {
2793
- var r = No("stringifyForDisplay");
2794
- return JSON.stringify(t, function(n, o) {
2795
- return o === void 0 ? r : o;
1709
+ var Fe = /* @__PURE__ */ new Map();
1710
+ function zr(t) {
1711
+ var e = Fe.get(t) || 1;
1712
+ return Fe.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1713
+ }
1714
+ function jr(t, e) {
1715
+ var r = zr("stringifyForDisplay");
1716
+ return JSON.stringify(t, function(o, n) {
1717
+ return n === void 0 ? r : n;
2796
1718
  }, e).split(JSON.stringify(r)).join("<undefined>");
2797
1719
  }
2798
- function Vt(t) {
1720
+ function Bt(t) {
2799
1721
  return function(e) {
2800
- for (var r = [], n = 1; n < arguments.length; n++)
2801
- r[n - 1] = arguments[n];
1722
+ for (var r = [], o = 1; o < arguments.length; o++)
1723
+ r[o - 1] = arguments[o];
2802
1724
  if (typeof e == "number") {
2803
- var o = e;
2804
- e = Fe(o), e || (e = Ne(o, r), r = []);
1725
+ var n = e;
1726
+ e = le(n), e || (e = ce(n, r), r = []);
2805
1727
  }
2806
1728
  t.apply(void 0, [e].concat(r));
2807
1729
  };
2808
1730
  }
2809
- var le = Object.assign(function(e, r) {
2810
- for (var n = [], o = 2; o < arguments.length; o++)
2811
- n[o - 2] = arguments[o];
2812
- e || gt(e, Fe(r, n) || Ne(r, n));
1731
+ var Qt = Object.assign(function(e, r) {
1732
+ for (var o = [], n = 2; n < arguments.length; n++)
1733
+ o[n - 2] = arguments[n];
1734
+ e || it(e, le(r, o) || ce(r, o));
2813
1735
  }, {
2814
- debug: Vt(gt.debug),
2815
- log: Vt(gt.log),
2816
- warn: Vt(gt.warn),
2817
- error: Vt(gt.error)
1736
+ debug: Bt(it.debug),
1737
+ log: Bt(it.log),
1738
+ warn: Bt(it.warn),
1739
+ error: Bt(it.error)
2818
1740
  });
2819
- function Ur(t) {
1741
+ function Ge(t) {
2820
1742
  for (var e = [], r = 1; r < arguments.length; r++)
2821
1743
  e[r - 1] = arguments[r];
2822
- return new Dr(Fe(t, e) || Ne(t, e));
1744
+ return new Ye(le(t, e) || ce(t, e));
2823
1745
  }
2824
- var or = Symbol.for("ApolloErrorMessageHandler_" + Mr);
2825
- function Br(t) {
1746
+ var Ie = Symbol.for("ApolloErrorMessageHandler_" + Ke);
1747
+ function We(t) {
2826
1748
  if (typeof t == "string")
2827
1749
  return t;
2828
1750
  try {
2829
- return Eo(t, 2).slice(0, 1e3);
1751
+ return jr(t, 2).slice(0, 1e3);
2830
1752
  } catch {
2831
1753
  return "<non-serializable>";
2832
1754
  }
2833
1755
  }
2834
- function Fe(t, e) {
1756
+ function le(t, e) {
2835
1757
  if (e === void 0 && (e = []), !!t)
2836
- return xe[or] && xe[or](t, e.map(Br));
1758
+ return ae[Ie] && ae[Ie](t, e.map(We));
2837
1759
  }
2838
- function Ne(t, e) {
1760
+ function ce(t, e) {
2839
1761
  if (e === void 0 && (e = []), !!t)
2840
1762
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
2841
- version: Mr,
1763
+ version: Ke,
2842
1764
  message: t,
2843
- args: e.map(Br)
1765
+ args: e.map(We)
2844
1766
  })));
2845
1767
  }
2846
- function To(t) {
1768
+ function Ar(t) {
2847
1769
  return t.definitions.filter(function(e) {
2848
1770
  return e.kind === "OperationDefinition" && !!e.name;
2849
1771
  }).map(function(e) {
2850
1772
  return e.name.value;
2851
1773
  })[0] || null;
2852
1774
  }
2853
- let A = null;
2854
- const ar = {};
2855
- let Po = 1;
2856
- const Oo = () => class {
1775
+ let I = null;
1776
+ const Ne = {};
1777
+ let Dr = 1;
1778
+ const Lr = () => class {
2857
1779
  constructor() {
2858
1780
  this.id = [
2859
1781
  "slot",
2860
- Po++,
1782
+ Dr++,
2861
1783
  Date.now(),
2862
1784
  Math.random().toString(36).slice(2)
2863
1785
  ].join(":");
2864
1786
  }
2865
1787
  hasValue() {
2866
- for (let e = A; e; e = e.parent)
1788
+ for (let e = I; e; e = e.parent)
2867
1789
  if (this.id in e.slots) {
2868
1790
  const r = e.slots[this.id];
2869
- if (r === ar)
1791
+ if (r === Ne)
2870
1792
  break;
2871
- return e !== A && (A.slots[this.id] = r), !0;
1793
+ return e !== I && (I.slots[this.id] = r), !0;
2872
1794
  }
2873
- return A && (A.slots[this.id] = ar), !1;
1795
+ return I && (I.slots[this.id] = Ne), !1;
2874
1796
  }
2875
1797
  getValue() {
2876
1798
  if (this.hasValue())
2877
- return A.slots[this.id];
1799
+ return I.slots[this.id];
2878
1800
  }
2879
- withValue(e, r, n, o) {
2880
- const a = {
1801
+ withValue(e, r, o, n) {
1802
+ const l = {
2881
1803
  __proto__: null,
2882
1804
  [this.id]: e
2883
- }, i = A;
2884
- A = { parent: i, slots: a };
1805
+ }, s = I;
1806
+ I = { parent: s, slots: l };
2885
1807
  try {
2886
- return r.apply(o, n);
1808
+ return r.apply(n, o);
2887
1809
  } finally {
2888
- A = i;
1810
+ I = s;
2889
1811
  }
2890
1812
  }
2891
1813
  // Capture the current context and wrap a callback function so that it
2892
1814
  // reestablishes the captured context when called.
2893
1815
  static bind(e) {
2894
- const r = A;
1816
+ const r = I;
2895
1817
  return function() {
2896
- const n = A;
1818
+ const o = I;
2897
1819
  try {
2898
- return A = r, e.apply(this, arguments);
1820
+ return I = r, e.apply(this, arguments);
2899
1821
  } finally {
2900
- A = n;
1822
+ I = o;
2901
1823
  }
2902
1824
  };
2903
1825
  }
2904
1826
  // Immediately run a callback function without any captured context.
2905
- static noContext(e, r, n) {
2906
- if (A) {
2907
- const o = A;
1827
+ static noContext(e, r, o) {
1828
+ if (I) {
1829
+ const n = I;
2908
1830
  try {
2909
- return A = null, e.apply(n, r);
1831
+ return I = null, e.apply(o, r);
2910
1832
  } finally {
2911
- A = o;
1833
+ I = n;
2912
1834
  }
2913
1835
  } else
2914
- return e.apply(n, r);
1836
+ return e.apply(o, r);
2915
1837
  }
2916
1838
  };
2917
- function ir(t) {
1839
+ function Ee(t) {
2918
1840
  try {
2919
1841
  return t();
2920
1842
  } catch {
2921
1843
  }
2922
1844
  }
2923
- const ue = "@wry/context:Slot", jo = (
1845
+ const Zt = "@wry/context:Slot", Br = (
2924
1846
  // Prefer globalThis when available.
2925
1847
  // https://github.com/benjamn/wryware/issues/347
2926
- ir(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1848
+ Ee(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
2927
1849
  // bundlers to the appropriate identifier (window, self, ...) depending on the
2928
1850
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
2929
- ir(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1851
+ Ee(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
2930
1852
  // back to using the Array constructor as a namespace, but that was flagged in
2931
1853
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
2932
1854
  /* @__PURE__ */ Object.create(null)
2933
- ), sr = jo, Ee = sr[ue] || // Earlier versions of this package stored the globalKey property on the Array
1855
+ ), Te = Br, de = Te[Zt] || // Earlier versions of this package stored the globalKey property on the Array
2934
1856
  // constructor, so we check there as well, to prevent Slot class duplication.
2935
- Array[ue] || (function(t) {
1857
+ Array[Zt] || (function(t) {
2936
1858
  try {
2937
- Object.defineProperty(sr, ue, {
1859
+ Object.defineProperty(Te, Zt, {
2938
1860
  value: t,
2939
1861
  enumerable: !1,
2940
1862
  writable: !1,
@@ -2949,129 +1871,129 @@ Array[ue] || (function(t) {
2949
1871
  } finally {
2950
1872
  return t;
2951
1873
  }
2952
- })(Oo()), { bind: ga, noContext: wa } = Ee;
2953
- new Ee();
2954
- function $o(t, e) {
1874
+ })(Lr()), { bind: So, noContext: Co } = de;
1875
+ new de();
1876
+ function Ur(t, e) {
2955
1877
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2956
1878
  if (r) return (r = r.call(t)).next.bind(r);
2957
- if (Array.isArray(t) || (r = Ao(t)) || e) {
1879
+ if (Array.isArray(t) || (r = qr(t)) || e) {
2958
1880
  r && (t = r);
2959
- var n = 0;
1881
+ var o = 0;
2960
1882
  return function() {
2961
- return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
1883
+ return o >= t.length ? { done: !0 } : { done: !1, value: t[o++] };
2962
1884
  };
2963
1885
  }
2964
1886
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2965
1887
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2966
1888
  }
2967
- function Ao(t, e) {
1889
+ function qr(t, e) {
2968
1890
  if (t) {
2969
- if (typeof t == "string") return cr(t, e);
1891
+ if (typeof t == "string") return Oe(t, e);
2970
1892
  var r = Object.prototype.toString.call(t).slice(8, -1);
2971
1893
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
2972
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return cr(t, e);
1894
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
2973
1895
  }
2974
1896
  }
2975
- function cr(t, e) {
1897
+ function Oe(t, e) {
2976
1898
  (e == null || e > t.length) && (e = t.length);
2977
- for (var r = 0, n = new Array(e); r < e; r++)
2978
- n[r] = t[r];
2979
- return n;
1899
+ for (var r = 0, o = new Array(e); r < e; r++)
1900
+ o[r] = t[r];
1901
+ return o;
2980
1902
  }
2981
- function lr(t, e) {
1903
+ function Pe(t, e) {
2982
1904
  for (var r = 0; r < e.length; r++) {
2983
- var n = e[r];
2984
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
1905
+ var o = e[r];
1906
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
2985
1907
  }
2986
1908
  }
2987
- function Te(t, e, r) {
2988
- return e && lr(t.prototype, e), r && lr(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1909
+ function ue(t, e, r) {
1910
+ return e && Pe(t.prototype, e), r && Pe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2989
1911
  }
2990
- var Pe = function() {
1912
+ var pe = function() {
2991
1913
  return typeof Symbol == "function";
2992
- }, Oe = function(t) {
2993
- return Pe() && !!Symbol[t];
2994
- }, je = function(t) {
2995
- return Oe(t) ? Symbol[t] : "@@" + t;
1914
+ }, fe = function(t) {
1915
+ return pe() && !!Symbol[t];
1916
+ }, me = function(t) {
1917
+ return fe(t) ? Symbol[t] : "@@" + t;
2996
1918
  };
2997
- Pe() && !Oe("observable") && (Symbol.observable = Symbol("observable"));
2998
- var Lo = je("iterator"), ve = je("observable"), qr = je("species");
2999
- function te(t, e) {
1919
+ pe() && !fe("observable") && (Symbol.observable = Symbol("observable"));
1920
+ var Mr = me("iterator"), ie = me("observable"), Xe = me("species");
1921
+ function Yt(t, e) {
3000
1922
  var r = t[e];
3001
1923
  if (r != null) {
3002
1924
  if (typeof r != "function") throw new TypeError(r + " is not a function");
3003
1925
  return r;
3004
1926
  }
3005
1927
  }
3006
- function At(t) {
1928
+ function Nt(t) {
3007
1929
  var e = t.constructor;
3008
- return e !== void 0 && (e = e[qr], e === null && (e = void 0)), e !== void 0 ? e : D;
1930
+ return e !== void 0 && (e = e[Xe], e === null && (e = void 0)), e !== void 0 ? e : N;
3009
1931
  }
3010
- function Do(t) {
3011
- return t instanceof D;
1932
+ function Hr(t) {
1933
+ return t instanceof N;
3012
1934
  }
3013
- function Et(t) {
3014
- Et.log ? Et.log(t) : setTimeout(function() {
1935
+ function yt(t) {
1936
+ yt.log ? yt.log(t) : setTimeout(function() {
3015
1937
  throw t;
3016
1938
  });
3017
1939
  }
3018
- function Gt(t) {
1940
+ function qt(t) {
3019
1941
  Promise.resolve().then(function() {
3020
1942
  try {
3021
1943
  t();
3022
1944
  } catch (e) {
3023
- Et(e);
1945
+ yt(e);
3024
1946
  }
3025
1947
  });
3026
1948
  }
3027
- function Rr(t) {
1949
+ function Qe(t) {
3028
1950
  var e = t._cleanup;
3029
1951
  if (e !== void 0 && (t._cleanup = void 0, !!e))
3030
1952
  try {
3031
1953
  if (typeof e == "function")
3032
1954
  e();
3033
1955
  else {
3034
- var r = te(e, "unsubscribe");
1956
+ var r = Yt(e, "unsubscribe");
3035
1957
  r && r.call(e);
3036
1958
  }
3037
- } catch (n) {
3038
- Et(n);
1959
+ } catch (o) {
1960
+ yt(o);
3039
1961
  }
3040
1962
  }
3041
- function ke(t) {
1963
+ function se(t) {
3042
1964
  t._observer = void 0, t._queue = void 0, t._state = "closed";
3043
1965
  }
3044
- function zo(t) {
1966
+ function Vr(t) {
3045
1967
  var e = t._queue;
3046
1968
  if (e) {
3047
1969
  t._queue = void 0, t._state = "ready";
3048
- for (var r = 0; r < e.length && (Hr(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1970
+ for (var r = 0; r < e.length && (Ze(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
3049
1971
  ;
3050
1972
  }
3051
1973
  }
3052
- function Hr(t, e, r) {
1974
+ function Ze(t, e, r) {
3053
1975
  t._state = "running";
3054
- var n = t._observer;
1976
+ var o = t._observer;
3055
1977
  try {
3056
- var o = te(n, e);
1978
+ var n = Yt(o, e);
3057
1979
  switch (e) {
3058
1980
  case "next":
3059
- o && o.call(n, r);
1981
+ n && n.call(o, r);
3060
1982
  break;
3061
1983
  case "error":
3062
- if (ke(t), o) o.call(n, r);
1984
+ if (se(t), n) n.call(o, r);
3063
1985
  else throw r;
3064
1986
  break;
3065
1987
  case "complete":
3066
- ke(t), o && o.call(n);
1988
+ se(t), n && n.call(o);
3067
1989
  break;
3068
1990
  }
3069
- } catch (a) {
3070
- Et(a);
1991
+ } catch (l) {
1992
+ yt(l);
3071
1993
  }
3072
- t._state === "closed" ? Rr(t) : t._state === "running" && (t._state = "ready");
1994
+ t._state === "closed" ? Qe(t) : t._state === "running" && (t._state = "ready");
3073
1995
  }
3074
- function de(t, e, r) {
1996
+ function te(t, e, r) {
3075
1997
  if (t._state !== "closed") {
3076
1998
  if (t._state === "buffering") {
3077
1999
  t._queue.push({
@@ -3084,286 +2006,286 @@ function de(t, e, r) {
3084
2006
  t._state = "buffering", t._queue = [{
3085
2007
  type: e,
3086
2008
  value: r
3087
- }], Gt(function() {
3088
- return zo(t);
2009
+ }], qt(function() {
2010
+ return Vr(t);
3089
2011
  });
3090
2012
  return;
3091
2013
  }
3092
- Hr(t, e, r);
2014
+ Ze(t, e, r);
3093
2015
  }
3094
2016
  }
3095
- var Mo = /* @__PURE__ */ (function() {
3096
- function t(r, n) {
2017
+ var Rr = /* @__PURE__ */ (function() {
2018
+ function t(r, o) {
3097
2019
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
3098
- var o = new Uo(this);
2020
+ var n = new Yr(this);
3099
2021
  try {
3100
- this._cleanup = n.call(void 0, o);
3101
- } catch (a) {
3102
- o.error(a);
2022
+ this._cleanup = o.call(void 0, n);
2023
+ } catch (l) {
2024
+ n.error(l);
3103
2025
  }
3104
2026
  this._state === "initializing" && (this._state = "ready");
3105
2027
  }
3106
2028
  var e = t.prototype;
3107
2029
  return e.unsubscribe = function() {
3108
- this._state !== "closed" && (ke(this), Rr(this));
3109
- }, Te(t, [{
2030
+ this._state !== "closed" && (se(this), Qe(this));
2031
+ }, ue(t, [{
3110
2032
  key: "closed",
3111
2033
  get: function() {
3112
2034
  return this._state === "closed";
3113
2035
  }
3114
2036
  }]), t;
3115
- })(), Uo = /* @__PURE__ */ (function() {
2037
+ })(), Yr = /* @__PURE__ */ (function() {
3116
2038
  function t(r) {
3117
2039
  this._subscription = r;
3118
2040
  }
3119
2041
  var e = t.prototype;
3120
- return e.next = function(n) {
3121
- de(this._subscription, "next", n);
3122
- }, e.error = function(n) {
3123
- de(this._subscription, "error", n);
2042
+ return e.next = function(o) {
2043
+ te(this._subscription, "next", o);
2044
+ }, e.error = function(o) {
2045
+ te(this._subscription, "error", o);
3124
2046
  }, e.complete = function() {
3125
- de(this._subscription, "complete");
3126
- }, Te(t, [{
2047
+ te(this._subscription, "complete");
2048
+ }, ue(t, [{
3127
2049
  key: "closed",
3128
2050
  get: function() {
3129
2051
  return this._subscription._state === "closed";
3130
2052
  }
3131
2053
  }]), t;
3132
- })(), D = /* @__PURE__ */ (function() {
2054
+ })(), N = /* @__PURE__ */ (function() {
3133
2055
  function t(r) {
3134
2056
  if (!(this instanceof t)) throw new TypeError("Observable cannot be called as a function");
3135
2057
  if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
3136
2058
  this._subscriber = r;
3137
2059
  }
3138
2060
  var e = t.prototype;
3139
- return e.subscribe = function(n) {
3140
- return (typeof n != "object" || n === null) && (n = {
3141
- next: n,
2061
+ return e.subscribe = function(o) {
2062
+ return (typeof o != "object" || o === null) && (o = {
2063
+ next: o,
3142
2064
  error: arguments[1],
3143
2065
  complete: arguments[2]
3144
- }), new Mo(n, this._subscriber);
3145
- }, e.forEach = function(n) {
3146
- var o = this;
3147
- return new Promise(function(a, i) {
3148
- if (typeof n != "function") {
3149
- i(new TypeError(n + " is not a function"));
2066
+ }), new Rr(o, this._subscriber);
2067
+ }, e.forEach = function(o) {
2068
+ var n = this;
2069
+ return new Promise(function(l, s) {
2070
+ if (typeof o != "function") {
2071
+ s(new TypeError(o + " is not a function"));
3150
2072
  return;
3151
2073
  }
3152
- function c() {
3153
- s.unsubscribe(), a();
2074
+ function d() {
2075
+ i.unsubscribe(), l();
3154
2076
  }
3155
- var s = o.subscribe({
3156
- next: function(d) {
2077
+ var i = n.subscribe({
2078
+ next: function(x) {
3157
2079
  try {
3158
- n(d, c);
3159
- } catch (f) {
3160
- i(f), s.unsubscribe();
2080
+ o(x, d);
2081
+ } catch (b) {
2082
+ s(b), i.unsubscribe();
3161
2083
  }
3162
2084
  },
3163
- error: i,
3164
- complete: a
2085
+ error: s,
2086
+ complete: l
3165
2087
  });
3166
2088
  });
3167
- }, e.map = function(n) {
3168
- var o = this;
3169
- if (typeof n != "function") throw new TypeError(n + " is not a function");
3170
- var a = At(this);
3171
- return new a(function(i) {
3172
- return o.subscribe({
3173
- next: function(c) {
2089
+ }, e.map = function(o) {
2090
+ var n = this;
2091
+ if (typeof o != "function") throw new TypeError(o + " is not a function");
2092
+ var l = Nt(this);
2093
+ return new l(function(s) {
2094
+ return n.subscribe({
2095
+ next: function(d) {
3174
2096
  try {
3175
- c = n(c);
3176
- } catch (s) {
3177
- return i.error(s);
2097
+ d = o(d);
2098
+ } catch (i) {
2099
+ return s.error(i);
3178
2100
  }
3179
- i.next(c);
2101
+ s.next(d);
3180
2102
  },
3181
- error: function(c) {
3182
- i.error(c);
2103
+ error: function(d) {
2104
+ s.error(d);
3183
2105
  },
3184
2106
  complete: function() {
3185
- i.complete();
2107
+ s.complete();
3186
2108
  }
3187
2109
  });
3188
2110
  });
3189
- }, e.filter = function(n) {
3190
- var o = this;
3191
- if (typeof n != "function") throw new TypeError(n + " is not a function");
3192
- var a = At(this);
3193
- return new a(function(i) {
3194
- return o.subscribe({
3195
- next: function(c) {
2111
+ }, e.filter = function(o) {
2112
+ var n = this;
2113
+ if (typeof o != "function") throw new TypeError(o + " is not a function");
2114
+ var l = Nt(this);
2115
+ return new l(function(s) {
2116
+ return n.subscribe({
2117
+ next: function(d) {
3196
2118
  try {
3197
- if (!n(c)) return;
3198
- } catch (s) {
3199
- return i.error(s);
2119
+ if (!o(d)) return;
2120
+ } catch (i) {
2121
+ return s.error(i);
3200
2122
  }
3201
- i.next(c);
2123
+ s.next(d);
3202
2124
  },
3203
- error: function(c) {
3204
- i.error(c);
2125
+ error: function(d) {
2126
+ s.error(d);
3205
2127
  },
3206
2128
  complete: function() {
3207
- i.complete();
2129
+ s.complete();
3208
2130
  }
3209
2131
  });
3210
2132
  });
3211
- }, e.reduce = function(n) {
3212
- var o = this;
3213
- if (typeof n != "function") throw new TypeError(n + " is not a function");
3214
- var a = At(this), i = arguments.length > 1, c = !1, s = arguments[1], d = s;
3215
- return new a(function(f) {
3216
- return o.subscribe({
3217
- next: function(h) {
3218
- var m = !c;
3219
- if (c = !0, !m || i)
2133
+ }, e.reduce = function(o) {
2134
+ var n = this;
2135
+ if (typeof o != "function") throw new TypeError(o + " is not a function");
2136
+ var l = Nt(this), s = arguments.length > 1, d = !1, i = arguments[1], x = i;
2137
+ return new l(function(b) {
2138
+ return n.subscribe({
2139
+ next: function(C) {
2140
+ var S = !d;
2141
+ if (d = !0, !S || s)
3220
2142
  try {
3221
- d = n(d, h);
3222
- } catch (g) {
3223
- return f.error(g);
2143
+ x = o(x, C);
2144
+ } catch (_) {
2145
+ return b.error(_);
3224
2146
  }
3225
2147
  else
3226
- d = h;
2148
+ x = C;
3227
2149
  },
3228
- error: function(h) {
3229
- f.error(h);
2150
+ error: function(C) {
2151
+ b.error(C);
3230
2152
  },
3231
2153
  complete: function() {
3232
- if (!c && !i) return f.error(new TypeError("Cannot reduce an empty sequence"));
3233
- f.next(d), f.complete();
2154
+ if (!d && !s) return b.error(new TypeError("Cannot reduce an empty sequence"));
2155
+ b.next(x), b.complete();
3234
2156
  }
3235
2157
  });
3236
2158
  });
3237
2159
  }, e.concat = function() {
3238
- for (var n = this, o = arguments.length, a = new Array(o), i = 0; i < o; i++)
3239
- a[i] = arguments[i];
3240
- var c = At(this);
3241
- return new c(function(s) {
3242
- var d, f = 0;
3243
- function h(m) {
3244
- d = m.subscribe({
3245
- next: function(g) {
3246
- s.next(g);
2160
+ for (var o = this, n = arguments.length, l = new Array(n), s = 0; s < n; s++)
2161
+ l[s] = arguments[s];
2162
+ var d = Nt(this);
2163
+ return new d(function(i) {
2164
+ var x, b = 0;
2165
+ function C(S) {
2166
+ x = S.subscribe({
2167
+ next: function(_) {
2168
+ i.next(_);
3247
2169
  },
3248
- error: function(g) {
3249
- s.error(g);
2170
+ error: function(_) {
2171
+ i.error(_);
3250
2172
  },
3251
2173
  complete: function() {
3252
- f === a.length ? (d = void 0, s.complete()) : h(c.from(a[f++]));
2174
+ b === l.length ? (x = void 0, i.complete()) : C(d.from(l[b++]));
3253
2175
  }
3254
2176
  });
3255
2177
  }
3256
- return h(n), function() {
3257
- d && (d.unsubscribe(), d = void 0);
2178
+ return C(o), function() {
2179
+ x && (x.unsubscribe(), x = void 0);
3258
2180
  };
3259
2181
  });
3260
- }, e.flatMap = function(n) {
3261
- var o = this;
3262
- if (typeof n != "function") throw new TypeError(n + " is not a function");
3263
- var a = At(this);
3264
- return new a(function(i) {
3265
- var c = [], s = o.subscribe({
3266
- next: function(f) {
3267
- if (n)
2182
+ }, e.flatMap = function(o) {
2183
+ var n = this;
2184
+ if (typeof o != "function") throw new TypeError(o + " is not a function");
2185
+ var l = Nt(this);
2186
+ return new l(function(s) {
2187
+ var d = [], i = n.subscribe({
2188
+ next: function(b) {
2189
+ if (o)
3268
2190
  try {
3269
- f = n(f);
3270
- } catch (m) {
3271
- return i.error(m);
2191
+ b = o(b);
2192
+ } catch (S) {
2193
+ return s.error(S);
3272
2194
  }
3273
- var h = a.from(f).subscribe({
3274
- next: function(m) {
3275
- i.next(m);
2195
+ var C = l.from(b).subscribe({
2196
+ next: function(S) {
2197
+ s.next(S);
3276
2198
  },
3277
- error: function(m) {
3278
- i.error(m);
2199
+ error: function(S) {
2200
+ s.error(S);
3279
2201
  },
3280
2202
  complete: function() {
3281
- var m = c.indexOf(h);
3282
- m >= 0 && c.splice(m, 1), d();
2203
+ var S = d.indexOf(C);
2204
+ S >= 0 && d.splice(S, 1), x();
3283
2205
  }
3284
2206
  });
3285
- c.push(h);
2207
+ d.push(C);
3286
2208
  },
3287
- error: function(f) {
3288
- i.error(f);
2209
+ error: function(b) {
2210
+ s.error(b);
3289
2211
  },
3290
2212
  complete: function() {
3291
- d();
2213
+ x();
3292
2214
  }
3293
2215
  });
3294
- function d() {
3295
- s.closed && c.length === 0 && i.complete();
2216
+ function x() {
2217
+ i.closed && d.length === 0 && s.complete();
3296
2218
  }
3297
2219
  return function() {
3298
- c.forEach(function(f) {
3299
- return f.unsubscribe();
3300
- }), s.unsubscribe();
2220
+ d.forEach(function(b) {
2221
+ return b.unsubscribe();
2222
+ }), i.unsubscribe();
3301
2223
  };
3302
2224
  });
3303
- }, e[ve] = function() {
2225
+ }, e[ie] = function() {
3304
2226
  return this;
3305
- }, t.from = function(n) {
3306
- var o = typeof this == "function" ? this : t;
3307
- if (n == null) throw new TypeError(n + " is not an object");
3308
- var a = te(n, ve);
3309
- if (a) {
3310
- var i = a.call(n);
3311
- if (Object(i) !== i) throw new TypeError(i + " is not an object");
3312
- return Do(i) && i.constructor === o ? i : new o(function(c) {
3313
- return i.subscribe(c);
2227
+ }, t.from = function(o) {
2228
+ var n = typeof this == "function" ? this : t;
2229
+ if (o == null) throw new TypeError(o + " is not an object");
2230
+ var l = Yt(o, ie);
2231
+ if (l) {
2232
+ var s = l.call(o);
2233
+ if (Object(s) !== s) throw new TypeError(s + " is not an object");
2234
+ return Hr(s) && s.constructor === n ? s : new n(function(d) {
2235
+ return s.subscribe(d);
3314
2236
  });
3315
2237
  }
3316
- if (Oe("iterator") && (a = te(n, Lo), a))
3317
- return new o(function(c) {
3318
- Gt(function() {
3319
- if (!c.closed) {
3320
- for (var s = $o(a.call(n)), d; !(d = s()).done; ) {
3321
- var f = d.value;
3322
- if (c.next(f), c.closed) return;
2238
+ if (fe("iterator") && (l = Yt(o, Mr), l))
2239
+ return new n(function(d) {
2240
+ qt(function() {
2241
+ if (!d.closed) {
2242
+ for (var i = Ur(l.call(o)), x; !(x = i()).done; ) {
2243
+ var b = x.value;
2244
+ if (d.next(b), d.closed) return;
3323
2245
  }
3324
- c.complete();
2246
+ d.complete();
3325
2247
  }
3326
2248
  });
3327
2249
  });
3328
- if (Array.isArray(n))
3329
- return new o(function(c) {
3330
- Gt(function() {
3331
- if (!c.closed) {
3332
- for (var s = 0; s < n.length; ++s)
3333
- if (c.next(n[s]), c.closed) return;
3334
- c.complete();
2250
+ if (Array.isArray(o))
2251
+ return new n(function(d) {
2252
+ qt(function() {
2253
+ if (!d.closed) {
2254
+ for (var i = 0; i < o.length; ++i)
2255
+ if (d.next(o[i]), d.closed) return;
2256
+ d.complete();
3335
2257
  }
3336
2258
  });
3337
2259
  });
3338
- throw new TypeError(n + " is not observable");
2260
+ throw new TypeError(o + " is not observable");
3339
2261
  }, t.of = function() {
3340
- for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++)
3341
- o[a] = arguments[a];
3342
- var i = typeof this == "function" ? this : t;
3343
- return new i(function(c) {
3344
- Gt(function() {
3345
- if (!c.closed) {
3346
- for (var s = 0; s < o.length; ++s)
3347
- if (c.next(o[s]), c.closed) return;
3348
- c.complete();
2262
+ for (var o = arguments.length, n = new Array(o), l = 0; l < o; l++)
2263
+ n[l] = arguments[l];
2264
+ var s = typeof this == "function" ? this : t;
2265
+ return new s(function(d) {
2266
+ qt(function() {
2267
+ if (!d.closed) {
2268
+ for (var i = 0; i < n.length; ++i)
2269
+ if (d.next(n[i]), d.closed) return;
2270
+ d.complete();
3349
2271
  }
3350
2272
  });
3351
2273
  });
3352
- }, Te(t, null, [{
3353
- key: qr,
2274
+ }, ue(t, null, [{
2275
+ key: Xe,
3354
2276
  get: function() {
3355
2277
  return this;
3356
2278
  }
3357
2279
  }]), t;
3358
2280
  })();
3359
- Pe() && Object.defineProperty(D, Symbol("extensions"), {
2281
+ pe() && Object.defineProperty(N, Symbol("extensions"), {
3360
2282
  value: {
3361
- symbol: ve,
3362
- hostReportError: Et
2283
+ symbol: ie,
2284
+ hostReportError: yt
3363
2285
  },
3364
2286
  configurable: !0
3365
2287
  });
3366
- function Bo(t) {
2288
+ function Jr(t) {
3367
2289
  var e, r = t.Symbol;
3368
2290
  if (typeof r == "function")
3369
2291
  if (r.observable)
@@ -3379,67 +2301,67 @@ function Bo(t) {
3379
2301
  e = "@@observable";
3380
2302
  return e;
3381
2303
  }
3382
- var Ct;
3383
- typeof self < "u" ? Ct = self : typeof window < "u" ? Ct = window : typeof global < "u" ? Ct = global : typeof module < "u" ? Ct = module : Ct = Function("return this")();
3384
- Bo(Ct);
3385
- var ur = D.prototype, dr = "@@observable";
3386
- ur[dr] || (ur[dr] = function() {
2304
+ var gt;
2305
+ typeof self < "u" ? gt = self : typeof window < "u" ? gt = window : typeof global < "u" ? gt = global : typeof module < "u" ? gt = module : gt = Function("return this")();
2306
+ Jr(gt);
2307
+ var $e = N.prototype, ze = "@@observable";
2308
+ $e[ze] || ($e[ze] = function() {
3387
2309
  return this;
3388
2310
  });
3389
- function qo(t) {
2311
+ function Kr(t) {
3390
2312
  for (var e = [
3391
2313
  "query",
3392
2314
  "operationName",
3393
2315
  "variables",
3394
2316
  "extensions",
3395
2317
  "context"
3396
- ], r = 0, n = Object.keys(t); r < n.length; r++) {
3397
- var o = n[r];
3398
- if (e.indexOf(o) < 0)
3399
- throw Ur(58, o);
2318
+ ], r = 0, o = Object.keys(t); r < o.length; r++) {
2319
+ var n = o[r];
2320
+ if (e.indexOf(n) < 0)
2321
+ throw Ge(58, n);
3400
2322
  }
3401
2323
  return t;
3402
2324
  }
3403
- function Ro(t, e) {
3404
- var r = ct({}, t), n = function(a) {
3405
- typeof a == "function" ? r = ct(ct({}, r), a(r)) : r = ct(ct({}, r), a);
3406
- }, o = function() {
3407
- return ct({}, r);
2325
+ function Gr(t, e) {
2326
+ var r = Q({}, t), o = function(l) {
2327
+ typeof l == "function" ? r = Q(Q({}, r), l(r)) : r = Q(Q({}, r), l);
2328
+ }, n = function() {
2329
+ return Q({}, r);
3408
2330
  };
3409
2331
  return Object.defineProperty(e, "setContext", {
3410
2332
  enumerable: !1,
3411
- value: n
2333
+ value: o
3412
2334
  }), Object.defineProperty(e, "getContext", {
3413
2335
  enumerable: !1,
3414
- value: o
2336
+ value: n
3415
2337
  }), e;
3416
2338
  }
3417
- function Ho(t) {
2339
+ function Wr(t) {
3418
2340
  var e = {
3419
2341
  variables: t.variables || {},
3420
2342
  extensions: t.extensions || {},
3421
2343
  operationName: t.operationName,
3422
2344
  query: t.query
3423
2345
  };
3424
- return e.operationName || (e.operationName = typeof e.query != "string" ? To(e.query) || void 0 : ""), e;
2346
+ return e.operationName || (e.operationName = typeof e.query != "string" ? Ar(e.query) || void 0 : ""), e;
3425
2347
  }
3426
- var Vo = Symbol.for("apollo.deprecations"), Yo = xe, Jo = new Ee();
3427
- function Ko(t) {
3428
- return Yo[Vo] || (Jo.getValue() || []).includes(t);
2348
+ var Xr = Symbol.for("apollo.deprecations"), Qr = ae, Zr = new de();
2349
+ function to(t) {
2350
+ return Qr[Xr] || (Zr.getValue() || []).includes(t);
3429
2351
  }
3430
- function Go(t, e) {
3431
- Ko(t) || e();
2352
+ function eo(t, e) {
2353
+ to(t) || e();
3432
2354
  }
3433
- function fr(t, e) {
3434
- return e ? e(t) : D.of();
2355
+ function je(t, e) {
2356
+ return e ? e(t) : N.of();
3435
2357
  }
3436
- function Lt(t) {
3437
- return typeof t == "function" ? new Vr(t) : t;
2358
+ function Et(t) {
2359
+ return typeof t == "function" ? new tr(t) : t;
3438
2360
  }
3439
- function Yt(t) {
2361
+ function Ut(t) {
3440
2362
  return t.request.length <= 1;
3441
2363
  }
3442
- var Vr = (
2364
+ var tr = (
3443
2365
  /** @class */
3444
2366
  (function() {
3445
2367
  function t(e) {
@@ -3447,113 +2369,113 @@ var Vr = (
3447
2369
  }
3448
2370
  return t.empty = function() {
3449
2371
  return new t(function() {
3450
- return D.of();
2372
+ return N.of();
3451
2373
  });
3452
2374
  }, t.from = function(e) {
3453
- return e.length === 0 ? t.empty() : e.map(Lt).reduce(function(r, n) {
3454
- return r.concat(n);
2375
+ return e.length === 0 ? t.empty() : e.map(Et).reduce(function(r, o) {
2376
+ return r.concat(o);
3455
2377
  });
3456
- }, t.split = function(e, r, n) {
3457
- var o = Lt(r), a = Lt(n || new t(fr)), i;
3458
- return Yt(o) && Yt(a) ? i = new t(function(c) {
3459
- return e(c) ? o.request(c) || D.of() : a.request(c) || D.of();
3460
- }) : i = new t(function(c, s) {
3461
- return e(c) ? o.request(c, s) || D.of() : a.request(c, s) || D.of();
3462
- }), Object.assign(i, { left: o, right: a });
2378
+ }, t.split = function(e, r, o) {
2379
+ var n = Et(r), l = Et(o || new t(je)), s;
2380
+ return Ut(n) && Ut(l) ? s = new t(function(d) {
2381
+ return e(d) ? n.request(d) || N.of() : l.request(d) || N.of();
2382
+ }) : s = new t(function(d, i) {
2383
+ return e(d) ? n.request(d, i) || N.of() : l.request(d, i) || N.of();
2384
+ }), Object.assign(s, { left: n, right: l });
3463
2385
  }, t.execute = function(e, r) {
3464
- return e.request(Ro(r.context, Ho(qo(r)))) || D.of();
2386
+ return e.request(Gr(r.context, Wr(Kr(r)))) || N.of();
3465
2387
  }, t.concat = function(e, r) {
3466
- var n = Lt(e);
3467
- if (Yt(n))
3468
- return globalThis.__DEV__ !== !1 && le.warn(47, n), n;
3469
- var o = Lt(r), a;
3470
- return Yt(o) ? a = new t(function(i) {
3471
- return n.request(i, function(c) {
3472
- return o.request(c) || D.of();
3473
- }) || D.of();
3474
- }) : a = new t(function(i, c) {
3475
- return n.request(i, function(s) {
3476
- return o.request(s, c) || D.of();
3477
- }) || D.of();
3478
- }), Object.assign(a, { left: n, right: o });
3479
- }, t.prototype.split = function(e, r, n) {
3480
- return this.concat(t.split(e, r, n || new t(fr)));
2388
+ var o = Et(e);
2389
+ if (Ut(o))
2390
+ return globalThis.__DEV__ !== !1 && Qt.warn(47, o), o;
2391
+ var n = Et(r), l;
2392
+ return Ut(n) ? l = new t(function(s) {
2393
+ return o.request(s, function(d) {
2394
+ return n.request(d) || N.of();
2395
+ }) || N.of();
2396
+ }) : l = new t(function(s, d) {
2397
+ return o.request(s, function(i) {
2398
+ return n.request(i, d) || N.of();
2399
+ }) || N.of();
2400
+ }), Object.assign(l, { left: o, right: n });
2401
+ }, t.prototype.split = function(e, r, o) {
2402
+ return this.concat(t.split(e, r, o || new t(je)));
3481
2403
  }, t.prototype.concat = function(e) {
3482
2404
  return t.concat(this, e);
3483
2405
  }, t.prototype.request = function(e, r) {
3484
- throw Ur(48);
2406
+ throw Ge(48);
3485
2407
  }, t.prototype.onError = function(e, r) {
3486
- if (globalThis.__DEV__ !== !1 && Go("onError", function() {
3487
- globalThis.__DEV__ !== !1 && le.warn(49);
2408
+ if (globalThis.__DEV__ !== !1 && eo("onError", function() {
2409
+ globalThis.__DEV__ !== !1 && Qt.warn(49);
3488
2410
  }), r && r.error)
3489
2411
  return r.error(e), !1;
3490
2412
  throw e;
3491
2413
  }, t.prototype.setOnError = function(e) {
3492
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && le.warn(50), this.onError = e, this;
2414
+ return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && Qt.warn(50), this.onError = e, this;
3493
2415
  }, t;
3494
2416
  })()
3495
2417
  );
3496
- function Wo(t) {
3497
- return new Vr(function(e, r) {
3498
- var n = Co(e, []);
3499
- return new D(function(o) {
3500
- var a, i = !1;
3501
- return Promise.resolve(n).then(function(c) {
3502
- return t(c, e.getContext());
2418
+ function ro(t) {
2419
+ return new tr(function(e, r) {
2420
+ var o = Or(e, []);
2421
+ return new N(function(n) {
2422
+ var l, s = !1;
2423
+ return Promise.resolve(o).then(function(d) {
2424
+ return t(d, e.getContext());
3503
2425
  }).then(e.setContext).then(function() {
3504
- i || (a = r(e).subscribe({
3505
- next: o.next.bind(o),
3506
- error: o.error.bind(o),
3507
- complete: o.complete.bind(o)
2426
+ s || (l = r(e).subscribe({
2427
+ next: n.next.bind(n),
2428
+ error: n.error.bind(n),
2429
+ complete: n.complete.bind(n)
3508
2430
  }));
3509
- }).catch(o.error.bind(o)), function() {
3510
- i = !0, a && a.unsubscribe();
2431
+ }).catch(n.error.bind(n)), function() {
2432
+ s = !0, l && l.unsubscribe();
3511
2433
  };
3512
2434
  });
3513
2435
  });
3514
2436
  }
3515
- const Qo = async () => {
3516
- const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2437
+ const oo = async () => {
2438
+ const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", o = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
3517
2439
  try {
3518
- const o = await z.post(
2440
+ const n = await E.post(
3519
2441
  t,
3520
2442
  new URLSearchParams({ grant_type: "client_credentials" }),
3521
2443
  // Only grant_type in body
3522
2444
  {
3523
2445
  headers: {
3524
2446
  "Content-Type": "application/x-www-form-urlencoded",
3525
- Authorization: n
2447
+ Authorization: o
3526
2448
  }
3527
2449
  }
3528
2450
  );
3529
- return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
3530
- } catch (o) {
3531
- return z.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
3532
- }
3533
- }, Xo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Zo = Qr({
3534
- uri: `${Xo}`
3535
- }), ta = Wo(async (t, { headers: e }) => {
3536
- const r = await Qo();
2451
+ return n.status === 200 && n.data.access_token ? n.data.access_token : (console.error("Failed to fetch token:", n.data), null);
2452
+ } catch (n) {
2453
+ return E.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2454
+ }
2455
+ }, no = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", ao = ir({
2456
+ uri: `${no}`
2457
+ }), io = ro(async (t, { headers: e }) => {
2458
+ const r = await oo();
3537
2459
  return {
3538
2460
  headers: {
3539
2461
  ...e,
3540
2462
  authorization: `Bearer ${r}`
3541
2463
  }
3542
2464
  };
3543
- }), ea = new Xr({
3544
- link: ta.concat(Zo),
3545
- cache: new Zr(),
2465
+ }), so = new sr({
2466
+ link: io.concat(ao),
2467
+ cache: new lr(),
3546
2468
  defaultOptions: {
3547
2469
  watchQuery: {
3548
2470
  fetchPolicy: "cache-and-network"
3549
2471
  }
3550
2472
  }
3551
- }), ya = (t) => {
2473
+ }), _o = (t) => {
3552
2474
  const { tanyaConfig: e } = t;
3553
- return /* @__PURE__ */ l(tn, { client: ea, children: /* @__PURE__ */ l(un, { children: /* @__PURE__ */ l(So, { tanyaConfig: e }) }) });
2475
+ return /* @__PURE__ */ a(cr, { client: so, children: /* @__PURE__ */ a(br, { children: /* @__PURE__ */ a(Er, { tanyaConfig: e }) }) });
3554
2476
  };
3555
2477
  export {
3556
- ya as TanyaChatbot,
3557
- pa as TanyaChatbotProvider
2478
+ _o as TanyaChatbot,
2479
+ yo as TanyaChatbotProvider
3558
2480
  };
3559
2481
  //# sourceMappingURL=tanya-chatbot.es.js.map