tanya-chatbot 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
- import { useEffect as me, useState as k, useRef as He, forwardRef as Fn, createElement as fr, useMemo as Kr } from "react";
1
+ import { useEffect as me, useState as v, useRef as He, forwardRef as En, createElement as mr, useMemo as Wr } from "react";
2
2
  import { jsx as a, jsxs as d, Fragment as ge } from "react/jsx-runtime";
3
- import { createHttpLink as Lo, ApolloClient as Do, InMemoryCache as zo, ApolloProvider as Mo } from "@apollo/client";
4
- import { Provider as Bo, useDispatch as En, useSelector as Jt } from "react-redux";
5
- import { createSlice as Tn, configureStore as Uo } from "@reduxjs/toolkit";
6
- import * as An from "@radix-ui/react-popover";
3
+ import { createHttpLink as $o, ApolloClient as Do, InMemoryCache as zo, ApolloProvider as Mo } from "@apollo/client";
4
+ import { Provider as Bo, useDispatch as Tn, useSelector as Wt } from "react-redux";
5
+ import { createSlice as An, configureStore as Uo } from "@reduxjs/toolkit";
6
+ import * as On from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
9
  import he from "axios";
10
10
  import "crypto-js";
11
11
  import { Icon as qo } from "@iconify/react";
12
- import { toast as Me } from "react-toastify";
12
+ import { toast as ze } from "react-toastify";
13
13
  import { createPortal as Ro } from "react-dom";
14
14
  const Ho = '*,: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}.visible{visibility:visible}.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}.m-\\[15px\\]{margin:15px}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.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-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[150px\\]{height:150px}.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-12{width:3rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\/4{width:75%}.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-\\[64\\.7vw\\]{width:64.7vw}.w-\\[96\\%\\]{width:96%}.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%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-md{max-width:28rem}.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-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.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}.gap-y-2{row-gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.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-bl-xl{border-bottom-left-radius:.75rem}.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-2{border-width:2px}.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-\\[\\#804c9e\\]{--tw-border-opacity: 1;border-color:rgb(128 76 158 / var(--tw-border-opacity, 1))}.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-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / 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-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.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))}.bg-white\\/70{background-color:#ffffffb3}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.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-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.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-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,.text-sm\\/5{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.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-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / 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-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.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))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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_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-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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}.drop-shadow-xl{--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / .03)) drop-shadow(0 8px 5px rgb(0 0 0 / .08));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)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-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-150{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-150{animation-duration:.15s}.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}}.placeholder\\:text-red-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.placeholder\\:text-red-400::placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:-translate-y-0\\.5:hover{--tw-translate-y: -.125rem;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\\: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\\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--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)}.hover\\:shadow-sm:hover{--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)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.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\\:col-span-10{grid-column:span 10 / span 10}.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-\\[80vw\\]{width:80vw}.sm\\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}}@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\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.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}}';
15
15
  function ci() {
@@ -56,7 +56,7 @@ const Vo = {
56
56
  mobile: []
57
57
  }
58
58
  }
59
- }, On = Tn({
59
+ }, jn = An({
60
60
  name: "store",
61
61
  initialState: Vo,
62
62
  reducers: {
@@ -64,9 +64,9 @@ const Vo = {
64
64
  e.store = t.payload;
65
65
  }
66
66
  }
67
- }), { setStore: di } = On.actions, Yo = On.reducer, Jo = {
67
+ }), { setStore: di } = jn.actions, Yo = jn.reducer, Jo = {
68
68
  product: null
69
- }, jn = Tn({
69
+ }, Ln = An({
70
70
  name: "product",
71
71
  initialState: Jo,
72
72
  reducers: {
@@ -74,12 +74,12 @@ const Vo = {
74
74
  e.product = t.payload;
75
75
  }
76
76
  }
77
- }), { setProduct: mr } = jn.actions, Ko = jn.reducer, Wo = Uo({
77
+ }), { setProduct: hr } = Ln.actions, Ko = Ln.reducer, Wo = Uo({
78
78
  reducer: {
79
79
  store: Yo,
80
80
  product: Ko
81
81
  }
82
- }), Qo = ({ children: e }) => /* @__PURE__ */ a(Bo, { store: Wo, children: e }), Kt = (e) => {
82
+ }), Qo = ({ children: e }) => /* @__PURE__ */ a(Bo, { store: Wo, children: e }), Qt = (e) => {
83
83
  const t = new CustomEvent("reactCartUpdated", {
84
84
  detail: {
85
85
  cartUpdated: !0,
@@ -91,12 +91,12 @@ const Vo = {
91
91
  function Go({
92
92
  ...e
93
93
  }) {
94
- return /* @__PURE__ */ a(An.Root, { "data-slot": "popover", ...e });
94
+ return /* @__PURE__ */ a(On.Root, { "data-slot": "popover", ...e });
95
95
  }
96
96
  function Xo({
97
97
  ...e
98
98
  }) {
99
- return /* @__PURE__ */ a(An.Trigger, { "data-slot": "popover-trigger", ...e });
99
+ return /* @__PURE__ */ a(On.Trigger, { "data-slot": "popover-trigger", ...e });
100
100
  }
101
101
  const it = () => ({ 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" }), $n = async () => {
102
102
  const e = "https://tanya-sfcc-server.vercel.app/";
@@ -108,7 +108,7 @@ const it = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
108
108
  } catch (t) {
109
109
  return he.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
110
110
  }
111
- }, Ln = async (e) => {
111
+ }, Dn = async (e) => {
112
112
  const t = "https://tanya-sfcc-server.vercel.app/";
113
113
  try {
114
114
  const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await he.post(
@@ -126,12 +126,12 @@ const it = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
126
126
  return he.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
127
127
  }
128
128
  };
129
- async function vt() {
129
+ async function kt() {
130
130
  var s;
131
131
  const e = Ve(), t = "access_token_" + e, r = "expires_in_" + e, n = localStorage.getItem(r), o = localStorage.getItem(t);
132
132
  return console.log(o), (s = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && s.isGuest, console.log("access token found in local storage"), { access_token: o, expires_in: n };
133
133
  }
134
- const hr = async (e, t) => {
134
+ const pr = async (e, t) => {
135
135
  if (e && t && Date.now() < t)
136
136
  return e;
137
137
  try {
@@ -161,7 +161,7 @@ const hr = async (e, t) => {
161
161
  const { serverUrl: t, basePath: r } = it();
162
162
  let n = "";
163
163
  {
164
- const o = await vt();
164
+ const o = await kt();
165
165
  console.log("the token from getSearchResults", o), n = o.access_token;
166
166
  }
167
167
  try {
@@ -178,11 +178,11 @@ const hr = async (e, t) => {
178
178
  } catch (o) {
179
179
  throw console.error("Error fetching search results:", o), o;
180
180
  }
181
- }, Dn = async (e) => {
181
+ }, zn = async (e) => {
182
182
  if (!e) throw new Error("Product ID is required");
183
183
  const { serverUrl: t, basePath: r } = it(), n = Xe();
184
184
  console.log("calling access");
185
- const { access_token: o } = await vt();
185
+ const { access_token: o } = await kt();
186
186
  return (await he.get(
187
187
  `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ve()}&pubCfg=${lt()}&envRef=${ct()}&orgRef=${dt()}`,
188
188
  {
@@ -194,9 +194,9 @@ const hr = async (e, t) => {
194
194
  )).data;
195
195
  }, ea = async (e) => {
196
196
  if (!e) throw new Error("customerId is required");
197
- const t = await $n(), { customer_token: r } = await Ln(
197
+ const t = await $n(), { customer_token: r } = await Dn(
198
198
  t
199
- ), { serverUrl: n, basePath: o } = it(), i = (await vt()).access_token;
199
+ ), { serverUrl: n, basePath: o } = it(), i = (await kt()).access_token;
200
200
  return (await he.get(
201
201
  `${n}${o}/get-interest?baseUrl=${Xe()}&customerId=${e}&siteId=${Ve()}&pubCfg=${lt()}&envRef=${ct()}&orgRef=${dt()}`,
202
202
  {
@@ -206,10 +206,10 @@ const hr = async (e, t) => {
206
206
  }
207
207
  }
208
208
  )).data;
209
- }, Wr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Qr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), ta = (e, t) => e.toLocaleString("en-US", {
209
+ }, Qr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Gr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), ta = (e, t) => e.toLocaleString("en-US", {
210
210
  style: "currency",
211
211
  currency: t || "USD"
212
- }), Gr = (e) => {
212
+ }), Xr = (e) => {
213
213
  var t, r, n;
214
214
  return "variants" in e ? {
215
215
  centAmount: (t = e.variants[0]) == null ? void 0 : t.prices.EUR.max,
@@ -218,12 +218,12 @@ const hr = async (e, t) => {
218
218
  centAmount: (r = e.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
219
219
  currencyCode: (n = e.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
220
220
  };
221
- }, ra = (e) => e.charAt(0).toUpperCase() + e.slice(1), Xr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", ar = (e) => e.split("\\n").map((t, r) => {
221
+ }, ra = (e) => e.charAt(0).toUpperCase() + e.slice(1), Zr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", sr = (e) => e.split("\\n").map((t, r) => {
222
222
  const n = t.match(/^(\d+)\.\s(.+)/);
223
223
  return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : t.trim() ? `<p key=${r} class="mb-2">${t}</p>` : "<br/>";
224
224
  }).join("");
225
225
  function na() {
226
- const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = k(e);
226
+ const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = v(e);
227
227
  return me(() => {
228
228
  const n = () => r(e());
229
229
  return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
@@ -232,7 +232,7 @@ function na() {
232
232
  const oa = ({
233
233
  product: e
234
234
  }) => {
235
- const t = En(), r = na(), [n, o] = k(0), s = () => {
235
+ const t = Tn(), r = na(), [n, o] = v(0), s = () => {
236
236
  o(
237
237
  (l) => l + r >= e.length ? 0 : l + r
238
238
  );
@@ -241,8 +241,8 @@ const oa = ({
241
241
  (l) => l - r < 0 ? e.length - (e.length % r || r) : l - r
242
242
  );
243
243
  }, c = async (l) => {
244
- const p = await Dn(l);
245
- t(mr(p));
244
+ const p = await zn(l);
245
+ t(hr(p));
246
246
  };
247
247
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-4 relative", children: [
248
248
  (e == null ? void 0 : e.length) > r && /* @__PURE__ */ a(
@@ -271,7 +271,7 @@ const oa = ({
271
271
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
272
272
  "img",
273
273
  {
274
- src: ((p = Qr(l)[0]) == null ? void 0 : p.link) || Qr(l)[0] || // fallback if it's a string
274
+ src: ((p = Gr(l)[0]) == null ? void 0 : p.link) || Gr(l)[0] || // fallback if it's a string
275
275
  "https://via.placeholder.com/120",
276
276
  alt: l != null && l.productName ? l.productName : "Product",
277
277
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -283,8 +283,8 @@ const oa = ({
283
283
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
284
284
  children: [
285
285
  /* @__PURE__ */ d("div", { className: "relative inline-block group", children: [
286
- /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Xr(
287
- Wr((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
286
+ /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Zr(
287
+ Qr((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
288
288
  60
289
289
  ) || "Product" }),
290
290
  /* @__PURE__ */ a(
@@ -298,8 +298,8 @@ const oa = ({
298
298
  marginBottom: "5px",
299
299
  zIndex: 50
300
300
  },
301
- children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Xr(
302
- Wr((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
301
+ children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Zr(
302
+ Qr((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
303
303
  60
304
304
  ) || "Product"
305
305
  }
@@ -307,8 +307,8 @@ const oa = ({
307
307
  ] }),
308
308
  /* @__PURE__ */ d("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
309
  /* @__PURE__ */ a("p", { children: ta(
310
- l != null && l.price ? Number(l == null ? void 0 : l.price) : Gr(l).centAmount || 0,
311
- (x = Gr(l)) == null ? void 0 : x.currencyCode
310
+ l != null && l.price ? Number(l == null ? void 0 : l.price) : Xr(l).centAmount || 0,
311
+ (x = Xr(l)) == null ? void 0 : x.currencyCode
312
312
  ) }),
313
313
  /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
314
314
  "$",
@@ -363,7 +363,7 @@ const oa = ({
363
363
  ]
364
364
  },
365
365
  n
366
- )) }), zn = async (e, t) => {
366
+ )) }), Mn = async (e, t) => {
367
367
  var s, i;
368
368
  const { serverUrl: r, basePath: n } = it(), o = `${r}`;
369
369
  try {
@@ -387,7 +387,7 @@ const oa = ({
387
387
  } catch (c) {
388
388
  return he.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
389
389
  }
390
- }, pr = async (e, t, r) => {
390
+ }, gr = async (e, t, r) => {
391
391
  const { serverUrl: n, basePath: o } = it(), s = `${n}`;
392
392
  try {
393
393
  const i = await he.post(
@@ -407,7 +407,7 @@ const oa = ({
407
407
  i.response || i.message
408
408
  ) : console.error("Unexpected error:", i), null;
409
409
  }
410
- }, Mn = async ({
410
+ }, Bn = async ({
411
411
  basketId: e,
412
412
  customer_token: t
413
413
  }) => {
@@ -427,35 +427,35 @@ const oa = ({
427
427
  } catch (i) {
428
428
  return he.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
429
429
  }
430
- }, Wt = "sfcc_basket_id", Zr = "sfcc_customer_token", Et = "sfcc_token_expiry", sa = 300 * 1e3, zt = "1.0.0";
430
+ }, Gt = "sfcc_basket_id", en = "sfcc_customer_token", At = "sfcc_token_expiry", sa = 300 * 1e3, Bt = "1.0.0";
431
431
  const at = (e) => {
432
432
  try {
433
- e ? localStorage.setItem(Wt, e) : localStorage.removeItem(Wt);
433
+ e ? localStorage.setItem(Gt, e) : localStorage.removeItem(Gt);
434
434
  } catch (t) {
435
435
  console.error("Error saving basket ID to storage:", t);
436
436
  }
437
- }, Qt = (e) => {
437
+ }, Xt = (e) => {
438
438
  try {
439
439
  if (e) {
440
- localStorage.setItem(Zr, e);
440
+ localStorage.setItem(en, e);
441
441
  const t = Date.now() + sa;
442
- localStorage.setItem(Et, t.toString());
442
+ localStorage.setItem(At, t.toString());
443
443
  } else
444
- localStorage.removeItem(Zr);
444
+ localStorage.removeItem(en);
445
445
  } catch (t) {
446
446
  console.error("Error storing token:", t);
447
447
  }
448
- }, en = 300, ia = ({ addToCartPwa: e }) => {
448
+ }, tn = 300, ia = ({ addToCartPwa: e }) => {
449
449
  var l, p, g, y, x, P;
450
- const t = En(), r = Jt((S) => S.product.product), n = Jt((S) => S.store.store), [o, s] = k(!!r);
450
+ const t = Tn(), r = Wt((S) => S.product.product), n = Wt((S) => S.store.store), [o, s] = v(!!r);
451
451
  if (me(() => {
452
452
  s(!!r);
453
453
  }, [r]), !r) return null;
454
454
  const i = async () => {
455
- var S, A, N, I, V, q, M, Te, F, K, we, ye, b, Ye, Be, ue;
455
+ var S, A, N, I, V, q, M, Ee, F, K, we, ye, k, Ye, Me, ue;
456
456
  try {
457
457
  if (!((A = (S = r == null ? void 0 : r.variants) == null ? void 0 : S[0]) != null && A.product_id) && !(r.type.item || r.type.bundle) && !((I = (N = r == null ? void 0 : r.variants) == null ? void 0 : N[0]) != null && I.productId)) {
458
- Me.error("Variants not available", {
458
+ ze.error("Variants not available", {
459
459
  position: "bottom-right",
460
460
  autoClose: 1e3
461
461
  }), console.error("No product variant found");
@@ -468,33 +468,33 @@ const at = (e) => {
468
468
  }
469
469
  ], D = JSON.parse(
470
470
  sessionStorage.getItem("customerData") || "{}"
471
- ), Se = (D == null ? void 0 : D.basketId) || localStorage.getItem(Wt), Ae = !1, Oe = localStorage.getItem(Et), Ze = Date.now();
472
- if (!Ae || !Oe || Ze >= parseInt(Oe)) {
471
+ ), Ne = (D == null ? void 0 : D.basketId) || localStorage.getItem(Gt), Te = !1, Ae = localStorage.getItem(At), Ze = Date.now();
472
+ if (!Te || !Ae || Ze >= parseInt(Ae)) {
473
473
  let xe = "";
474
- if (xe = "Bearer " + (await vt()).access_token, !xe) {
474
+ if (xe = "Bearer " + (await kt()).access_token, !xe) {
475
475
  console.error("Failed to get customer_token");
476
476
  return;
477
477
  }
478
- const $e = Ze + 300 * 1e3;
479
- if (Qt(xe), localStorage.setItem(Et, $e.toString()), Se) {
480
- const je = await Mn({
481
- basketId: Se,
478
+ const je = Ze + 300 * 1e3;
479
+ if (Xt(xe), localStorage.setItem(At, je.toString()), Ne) {
480
+ const Oe = await Bn({
481
+ basketId: Ne,
482
482
  customer_token: xe
483
483
  });
484
- if (je.status === 200 && je) {
485
- const se = await pr(
486
- Se,
484
+ if (Oe.status === 200 && Oe) {
485
+ const se = await gr(
486
+ Ne,
487
487
  B,
488
488
  xe
489
489
  );
490
- (((M = se == null ? void 0 : se.product_items) == null ? void 0 : M.length) > 0 || ((Te = se == null ? void 0 : se.productItems) == null ? void 0 : Te.length) > 0) && (Me.success("Added to cart", {
490
+ (((M = se == null ? void 0 : se.product_items) == null ? void 0 : M.length) > 0 || ((Ee = se == null ? void 0 : se.productItems) == null ? void 0 : Ee.length) > 0) && (ze.success("Added to cart", {
491
491
  position: "bottom-right",
492
492
  autoClose: 3e3,
493
493
  hideProgressBar: !1,
494
494
  closeOnClick: !0,
495
495
  pauseOnHover: !0,
496
496
  draggable: !0
497
- }), Kt(Se));
497
+ }), Qt(Ne));
498
498
  return;
499
499
  }
500
500
  }
@@ -505,7 +505,7 @@ const at = (e) => {
505
505
  quantity: 1
506
506
  }
507
507
  ]
508
- }, C = await zn(xe, be);
508
+ }, C = await Mn(xe, be);
509
509
  if (!(C != null && C.basket_id) && !(C != null && C.basketId)) {
510
510
  console.error("Failed to create basket");
511
511
  return;
@@ -513,26 +513,26 @@ const at = (e) => {
513
513
  at(
514
514
  (C == null ? void 0 : C.basket_id) || (C == null ? void 0 : C.basketId)
515
515
  ), console.log("adding product to basket");
516
- const Ce = await pr(
516
+ const Se = await gr(
517
517
  (C == null ? void 0 : C.basket_id) || (C == null ? void 0 : C.basketId),
518
518
  B,
519
519
  xe
520
520
  );
521
- console.log("object added to basket"), (((we = Ce == null ? void 0 : Ce.product_items) == null ? void 0 : we.length) > 0 || ((ye = Ce == null ? void 0 : Ce.productItems) == null ? void 0 : ye.length) > 0) && Me.success("Added to cart", {
521
+ console.log("object added to basket"), (((we = Se == null ? void 0 : Se.product_items) == null ? void 0 : we.length) > 0 || ((ye = Se == null ? void 0 : Se.productItems) == null ? void 0 : ye.length) > 0) && ze.success("Added to cart", {
522
522
  position: "bottom-right",
523
523
  autoClose: 3e3,
524
524
  hideProgressBar: !1,
525
525
  closeOnClick: !0,
526
526
  pauseOnHover: !0,
527
527
  draggable: !0
528
- }), Kt(C.basket_id || (C == null ? void 0 : C.basketId));
528
+ }), Qt(C.basket_id || (C == null ? void 0 : C.basketId));
529
529
  }
530
530
  } catch (B) {
531
- console.error("Error adding to cart:", B), Me.error("Failed to add product to cart", {
531
+ console.error("Error adding to cart:", B), ze.error("Failed to add product to cart", {
532
532
  position: "bottom-right",
533
533
  autoClose: 3e3
534
- }), ((b = B == null ? void 0 : B.response) == null ? void 0 : b.status) === 404 || // Basket not found
535
- ((Ye = B == null ? void 0 : B.response) == null ? void 0 : Ye.status) === 401 ? (((Be = B == null ? void 0 : B.response) == null ? void 0 : Be.status) === 404 && at(null), ((ue = B == null ? void 0 : B.response) == null ? void 0 : ue.status) === 401 && (at(null), Qt(null))) : (console.error("Failed to add product to basket:", B.message), Me.error("Failed to add product to cart", {
534
+ }), ((k = B == null ? void 0 : B.response) == null ? void 0 : k.status) === 404 || // Basket not found
535
+ ((Ye = B == null ? void 0 : B.response) == null ? void 0 : Ye.status) === 401 ? (((Me = B == null ? void 0 : B.response) == null ? void 0 : Me.status) === 404 && at(null), ((ue = B == null ? void 0 : B.response) == null ? void 0 : ue.status) === 401 && (at(null), Xt(null))) : (console.error("Failed to add product to basket:", B.message), ze.error("Failed to add product to cart", {
536
536
  position: "bottom-right",
537
537
  autoClose: 3e3
538
538
  }));
@@ -548,7 +548,7 @@ const at = (e) => {
548
548
  {
549
549
  className: "fixed inset-0 z-40 bg-black/30",
550
550
  onClick: () => {
551
- s(!1), setTimeout(() => t(mr(null)), en);
551
+ s(!1), setTimeout(() => t(hr(null)), tn);
552
552
  }
553
553
  }
554
554
  ),
@@ -571,8 +571,8 @@ const at = (e) => {
571
571
  className: "text-[#555555] w-6 h-6 cursor-pointer",
572
572
  onClick: () => {
573
573
  s(!1), setTimeout(
574
- () => t(mr(null)),
575
- en
574
+ () => t(hr(null)),
575
+ tn
576
576
  );
577
577
  },
578
578
  children: "✕"
@@ -709,14 +709,14 @@ const at = (e) => {
709
709
  "Niece/Nephew": "his/her niece/nephew",
710
710
  "My Friends": "his/her friends",
711
711
  Others: "others"
712
- }, s = He(null), i = He(null), c = He(null), l = He(null), [p, g] = k(null);
712
+ }, s = He(null), i = He(null), c = He(null), l = He(null), [p, g] = v(null);
713
713
  He(null);
714
- const [y, x] = k(!1), [P, S] = k(!1), [A, N] = k(!1), [I, V] = k(!1), [q, M] = k(!1), [Te, F] = k(!1), [K, we] = k(""), [ye, b] = k(""), Ye = (m) => ({
714
+ const [y, x] = v(!1), [P, S] = v(!1), [A, N] = v(!1), [I, V] = v(!1), [q, M] = v(!1), [Ee, F] = v(!1), [K, we] = v(""), [ye, k] = v(""), Ye = (m) => ({
715
715
  id: m.id,
716
716
  title: m.name,
717
717
  image: m.image ?? "",
718
718
  price: m.price ?? 0
719
- }), [Be, ue] = k([]), B = He(null), D = Jt((m) => m.store.store), Se = Jt((m) => m.product.product);
719
+ }), [Me, ue] = v([]), B = He(null), D = Wt((m) => m.store.store), Ne = Wt((m) => m.product.product);
720
720
  me(() => {
721
721
  const m = localStorage.getItem(
722
722
  `access_token_${e.siteId}`
@@ -732,31 +732,31 @@ const at = (e) => {
732
732
  m || ""
733
733
  );
734
734
  }, []), me(() => {
735
- localStorage.setItem("chatHistory", JSON.stringify(Be));
735
+ localStorage.setItem("chatHistory", JSON.stringify(Me));
736
736
  const m = localStorage.getItem(
737
737
  `access_token_${e.siteId}`
738
738
  );
739
739
  m && localStorage.setItem(`chat-token-${e.siteId}`, m);
740
- }, [Be]);
741
- const Ae = () => {
740
+ }, [Me]);
741
+ const Te = () => {
742
742
  N(!0), setTimeout(() => S(!0), 10);
743
- }, Oe = () => {
743
+ }, Ae = () => {
744
744
  S(!1), setTimeout(() => N(!1), 300);
745
745
  };
746
746
  me(() => {
747
- y ? Ae() : Oe();
747
+ y ? Te() : Ae();
748
748
  }, [y]);
749
749
  const Ze = (m) => {
750
- b(o[m]);
750
+ k(o[m]);
751
751
  };
752
752
  me(() => {
753
753
  A && B.current && B.current.scrollTo({
754
754
  top: B.current.scrollHeight,
755
755
  behavior: "smooth"
756
756
  });
757
- }, [Be, A]);
758
- const xe = null, $e = null, be = async () => {
759
- const m = await vt();
757
+ }, [Me, A]);
758
+ const xe = null, je = null, be = async () => {
759
+ const m = await kt();
760
760
  m != null && g(m);
761
761
  };
762
762
  me(() => {
@@ -773,22 +773,22 @@ const at = (e) => {
773
773
  sessionStorage.getItem("customerData") || "{}"
774
774
  ).customerId;
775
775
  return (await ea(m || "")).c_interests;
776
- }, Ce = async (m, R) => {
777
- console.log("in secondary flow", zt);
776
+ }, Se = async (m, R) => {
777
+ console.log("in secondary flow", Bt);
778
778
  const j = await C();
779
- if (console.log(j, "interests of customer", zt), !!j)
779
+ if (console.log(j, "interests of customer", Bt), !!j)
780
780
  try {
781
781
  ue(
782
782
  (ke) => ke.map(
783
783
  (Z, ne) => ne === ke.length - 1 ? { ...Z, secondaryLoading: !0 } : Z
784
784
  )
785
785
  );
786
- const W = await hr(xe, $e);
786
+ const W = await pr(xe, je);
787
787
  if (!W) throw new Error("Failed to fetch token");
788
788
  const Y = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), te = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
789
789
  registered: String(z || !1),
790
790
  userId: String(Y || (/* @__PURE__ */ new Date()).getTime())
791
- }).toString()}`, L = JSON.stringify({
791
+ }).toString()}`, $ = JSON.stringify({
792
792
  flowId: "Q166PR519W",
793
793
  flowAliasId: "HKFUVLWVH2",
794
794
  input: {
@@ -804,23 +804,23 @@ const at = (e) => {
804
804
  "Content-Type": "application/json",
805
805
  Authorization: `Bearer ${W}`
806
806
  },
807
- body: L
807
+ body: $
808
808
  });
809
809
  if (!Q.body) throw new Error("Readable stream not supported");
810
- const _e = Q.body.getReader(), ve = new TextDecoder();
810
+ const Ce = Q.body.getReader(), ve = new TextDecoder();
811
811
  let re = "";
812
812
  for (; ; ) {
813
- const { done: ke, value: Z } = await _e.read();
813
+ const { done: ke, value: Z } = await Ce.read();
814
814
  if (ke) break;
815
815
  re += ve.decode(Z, { stream: !0 });
816
816
  const ne = re.split(`
817
817
  `);
818
818
  re = ne.pop() || "";
819
- for (const Ie of ne)
820
- if (Ie.startsWith("data:")) {
821
- const v = Ie.slice(5).trim();
819
+ for (const _e of ne)
820
+ if (_e.startsWith("data:")) {
821
+ const b = _e.slice(5).trim();
822
822
  try {
823
- const le = JSON.parse(v);
823
+ const le = JSON.parse(b);
824
824
  le.index === 0 && ue(
825
825
  (G) => G.map(
826
826
  (J, X) => X === G.length - 1 ? {
@@ -842,7 +842,7 @@ const at = (e) => {
842
842
  } catch (W) {
843
843
  console.error("Secondary flow error:", W);
844
844
  }
845
- }, je = async (m) => {
845
+ }, Oe = async (m) => {
846
846
  const R = m || K.trim();
847
847
  if (R) {
848
848
  M(!0), we(""), s.current = null, i.current = null, c.current = null, l.current = null, ue((j) => [
@@ -856,13 +856,13 @@ const at = (e) => {
856
856
  }
857
857
  ]);
858
858
  try {
859
- const j = ye, W = localStorage.getItem("customerNumber"), Y = localStorage.getItem("isLoggedIn"), z = await hr(xe, $e);
859
+ const j = ye, W = localStorage.getItem("customerNumber"), Y = localStorage.getItem("isLoggedIn"), z = await pr(xe, je);
860
860
  if (!z)
861
861
  throw new Error("Failed to obtain access token");
862
862
  const te = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
863
863
  registered: String(Y || !1),
864
864
  userId: String(W || (/* @__PURE__ */ new Date()).getTime())
865
- }).toString()}`, L = JSON.stringify({
865
+ }).toString()}`, $ = JSON.stringify({
866
866
  flowId: "MMHQKYI1NE",
867
867
  flowAliasId: "SZF9ZK1ATE",
868
868
  input: {
@@ -876,24 +876,24 @@ const at = (e) => {
876
876
  "Content-Type": "application/json",
877
877
  Authorization: `Bearer ${z}`
878
878
  },
879
- body: L
879
+ body: $
880
880
  });
881
881
  if (!Q.ok)
882
882
  throw new Error(`HTTP error! status: ${Q.status}`);
883
883
  if (!Q.body) throw new Error("Readable stream not supported");
884
- const _e = Q.body.getReader(), ve = new TextDecoder();
884
+ const Ce = Q.body.getReader(), ve = new TextDecoder();
885
885
  let re = "", ke = "";
886
886
  for (; ; ) {
887
887
  F(!0);
888
- const { done: Z, value: ne } = await _e.read();
888
+ const { done: Z, value: ne } = await Ce.read();
889
889
  if (Z) break;
890
890
  re += ve.decode(ne, { stream: !0 });
891
- const Ie = re.split(`
891
+ const _e = re.split(`
892
892
  `);
893
- re = Ie.pop() || "";
894
- for (const v of Ie)
895
- if (v.startsWith("data:")) {
896
- const le = v.slice(5).trim();
893
+ re = _e.pop() || "";
894
+ for (const b of _e)
895
+ if (b.startsWith("data:")) {
896
+ const le = b.slice(5).trim();
897
897
  try {
898
898
  const G = JSON.parse(le);
899
899
  G.index == 1 && (ke = G.data), ue(
@@ -909,7 +909,7 @@ const at = (e) => {
909
909
  }
910
910
  }
911
911
  }
912
- er(se(ke));
912
+ rr(se(ke));
913
913
  } catch (j) {
914
914
  console.error("Error sending message to Tanya:", j);
915
915
  } finally {
@@ -921,27 +921,27 @@ const at = (e) => {
921
921
  /top five relevant product or category names are: (.*)/i
922
922
  ), Y = (R ? R[1] : m).split(", ").map((fe) => fe.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
923
923
  return [...new Set(Y)].filter(Boolean).join(",");
924
- }, er = async (m) => {
924
+ }, rr = async (m) => {
925
925
  var j, W, Y;
926
926
  const R = typeof m == "string" ? m.split(",") : m;
927
927
  F(!0);
928
928
  try {
929
929
  const z = await Promise.all(
930
- R.map((L) => Zo(L).catch(() => []))
930
+ R.map(($) => Zo($).catch(() => []))
931
931
  // prevent Promise.all crash
932
- ), fe = R.map((L, Q) => ({
933
- keyword: L,
932
+ ), fe = R.map(($, Q) => ({
933
+ keyword: $,
934
934
  items: z[Q] ?? [],
935
935
  loading: !1
936
- })).filter((L) => L.items.length > 0), te = (W = (j = fe[0]) == null ? void 0 : j.items) == null ? void 0 : W[0];
936
+ })).filter(($) => $.items.length > 0), te = (W = (j = fe[0]) == null ? void 0 : j.items) == null ? void 0 : W[0];
937
937
  if (te) {
938
938
  i.current = te.product_id, s.current = te.product_name, c.current = (Y = te.image) == null ? void 0 : Y.link;
939
- const L = typeof te.price == "number" ? te.price : null;
940
- l.current = L;
939
+ const $ = typeof te.price == "number" ? te.price : null;
940
+ l.current = $;
941
941
  }
942
942
  if (ue(
943
- (L) => L.map(
944
- (Q, _e) => _e === L.length - 1 ? {
943
+ ($) => $.map(
944
+ (Q, Ce) => Ce === $.length - 1 ? {
945
945
  ...Q,
946
946
  products: fe,
947
947
  productSnapshot: te ? {
@@ -955,23 +955,23 @@ const at = (e) => {
955
955
  } : Q
956
956
  )
957
957
  ), te) {
958
- const L = JSON.parse(
958
+ const $ = JSON.parse(
959
959
  sessionStorage.getItem("customerData") || "{}"
960
960
  );
961
- L != null && L.isGuest || (console.log("running secondary flow", zt), Ce(s.current, 0));
961
+ $ != null && $.isGuest || (console.log("running secondary flow", Bt), Se(s.current, 0));
962
962
  }
963
963
  } catch (z) {
964
964
  console.error("error in keyword search", z);
965
965
  } finally {
966
966
  F(!1);
967
967
  }
968
- }, tr = async (m, R) => {
969
- var j, W, Y, z, fe, te, L, Q, _e, ve, re, ke, Z, ne, Ie;
968
+ }, nr = async (m, R) => {
969
+ var j, W, Y, z, fe, te, $, Q, Ce, ve, re, ke, Z, ne, _e;
970
970
  V(!0);
971
971
  try {
972
- const v = await Dn(m.id);
973
- if (!((W = (j = v == null ? void 0 : v.variants) == null ? void 0 : j[0]) != null && W.product_id || (z = (Y = v == null ? void 0 : v.variants) == null ? void 0 : Y[0]) != null && z.productId) && !(v.type.item || v.type.bundle)) {
974
- V(!1), Me.error("Variants not found", {
972
+ const b = await zn(m.id);
973
+ if (!((W = (j = b == null ? void 0 : b.variants) == null ? void 0 : j[0]) != null && W.product_id || (z = (Y = b == null ? void 0 : b.variants) == null ? void 0 : Y[0]) != null && z.productId) && !(b.type.item || b.type.bundle)) {
974
+ V(!1), ze.error("Variants not found", {
975
975
  position: "bottom-right",
976
976
  autoClose: 1e3
977
977
  }), console.error("No product variant found");
@@ -979,54 +979,54 @@ const at = (e) => {
979
979
  }
980
980
  const le = [
981
981
  {
982
- product_id: ((fe = v.variants) == null ? void 0 : fe[0].product_id) || ((te = v.variants) == null ? void 0 : te[0].productId) || (v == null ? void 0 : v.id),
982
+ product_id: ((fe = b.variants) == null ? void 0 : fe[0].product_id) || ((te = b.variants) == null ? void 0 : te[0].productId) || (b == null ? void 0 : b.id),
983
983
  quantity: R
984
984
  }
985
985
  ];
986
- console.log(le, "product data", "app version", zt);
986
+ console.log(le, "product data", "app version", Bt);
987
987
  const G = JSON.parse(
988
988
  sessionStorage.getItem("customerData") || "{}"
989
- ), J = (G == null ? void 0 : G.basketId) || localStorage.getItem(Wt), X = !1, Je = localStorage.getItem(Et), pe = Date.now();
989
+ ), J = (G == null ? void 0 : G.basketId) || localStorage.getItem(Gt), X = !1, Je = localStorage.getItem(At), pe = Date.now();
990
990
  if (!X || !Je || pe >= parseInt(Je)) {
991
- const Ue = await $n();
992
- let { customer_token: ee } = await Ln(
993
- Ue
991
+ const Be = await $n();
992
+ let { customer_token: ee } = await Dn(
993
+ Be
994
994
  );
995
995
  if (ee = "Bearer " + p.access_token, !ee) {
996
996
  console.error("Failed to get customer_token");
997
997
  return;
998
998
  }
999
- const At = pe + 300 * 1e3;
1000
- if (Qt(ee), localStorage.setItem(Et, At.toString()), console.log(J, "basketIdFromCustomer"), J) {
1001
- const ut = await Mn({
999
+ const jt = pe + 300 * 1e3;
1000
+ if (Xt(ee), localStorage.setItem(At, jt.toString()), console.log(J, "basketIdFromCustomer"), J) {
1001
+ const ut = await Bn({
1002
1002
  basketId: J,
1003
1003
  customer_token: ee
1004
1004
  });
1005
1005
  if (ut.status === 200 && ut) {
1006
- const ft = await pr(
1006
+ const ft = await gr(
1007
1007
  J,
1008
1008
  le,
1009
1009
  ee
1010
1010
  );
1011
- ((L = ft == null ? void 0 : ft.product_items) == null ? void 0 : L.length) > 0 && (Me.success("Added to cart", {
1011
+ (($ = ft == null ? void 0 : ft.product_items) == null ? void 0 : $.length) > 0 && (ze.success("Added to cart", {
1012
1012
  position: "bottom-right",
1013
1013
  autoClose: 3e3,
1014
1014
  hideProgressBar: !1,
1015
1015
  closeOnClick: !0,
1016
1016
  pauseOnHover: !0,
1017
1017
  draggable: !0
1018
- }), Kt(J), V(!1));
1018
+ }), Qt(J), V(!1));
1019
1019
  return;
1020
1020
  }
1021
1021
  }
1022
- const rr = {
1022
+ const or = {
1023
1023
  productItems: [
1024
1024
  {
1025
- productId: ((Q = v.variants) == null ? void 0 : Q[0].product_id) || ((_e = v.variants) == null ? void 0 : _e[0].productId) || (v == null ? void 0 : v.id),
1025
+ productId: ((Q = b.variants) == null ? void 0 : Q[0].product_id) || ((Ce = b.variants) == null ? void 0 : Ce[0].productId) || (b == null ? void 0 : b.id),
1026
1026
  quantity: 1
1027
1027
  }
1028
1028
  ]
1029
- }, T = await zn(ee, rr);
1029
+ }, T = await Mn(ee, or);
1030
1030
  if (console.log(
1031
1031
  T,
1032
1032
  T == null ? void 0 : T.basket_id,
@@ -1039,28 +1039,28 @@ const at = (e) => {
1039
1039
  at(
1040
1040
  (T == null ? void 0 : T.basket_id) || (T == null ? void 0 : T.basketId)
1041
1041
  );
1042
- const qe = await r(
1042
+ const Ue = await r(
1043
1043
  {
1044
1044
  productId: i,
1045
1045
  quantity: R
1046
1046
  },
1047
1047
  (T == null ? void 0 : T.basket_id) || (T == null ? void 0 : T.basketId)
1048
1048
  );
1049
- (((ve = qe == null ? void 0 : qe.product_items) == null ? void 0 : ve.length) > 0 || ((re = qe == null ? void 0 : qe.productItems) == null ? void 0 : re.length) > 0) && Me.success("Added to cart", {
1049
+ (((ve = Ue == null ? void 0 : Ue.product_items) == null ? void 0 : ve.length) > 0 || ((re = Ue == null ? void 0 : Ue.productItems) == null ? void 0 : re.length) > 0) && ze.success("Added to cart", {
1050
1050
  position: "bottom-right",
1051
1051
  autoClose: 3e3,
1052
1052
  hideProgressBar: !1,
1053
1053
  closeOnClick: !0,
1054
1054
  pauseOnHover: !0,
1055
1055
  draggable: !0
1056
- }), Kt(T.basket_id || (T == null ? void 0 : T.basketId));
1056
+ }), Qt(T.basket_id || (T == null ? void 0 : T.basketId));
1057
1057
  }
1058
- } catch (v) {
1059
- V(!1), console.error("Error adding to cart:", v), Me.error("Failed to add product to cart", {
1058
+ } catch (b) {
1059
+ V(!1), console.error("Error adding to cart:", b), ze.error("Failed to add product to cart", {
1060
1060
  position: "bottom-right",
1061
1061
  autoClose: 3e3
1062
- }), ((ke = v == null ? void 0 : v.response) == null ? void 0 : ke.status) === 404 || // Basket not found
1063
- ((Z = v == null ? void 0 : v.response) == null ? void 0 : Z.status) === 401 ? (((ne = v == null ? void 0 : v.response) == null ? void 0 : ne.status) === 404 && at(null), ((Ie = v == null ? void 0 : v.response) == null ? void 0 : Ie.status) === 401 && (at(null), Qt(null))) : (console.error("Failed to add product to basket:", v.message), Me.error("Failed to add product to cart", {
1062
+ }), ((ke = b == null ? void 0 : b.response) == null ? void 0 : ke.status) === 404 || // Basket not found
1063
+ ((Z = b == null ? void 0 : b.response) == null ? void 0 : Z.status) === 401 ? (((ne = b == null ? void 0 : b.response) == null ? void 0 : ne.status) === 404 && at(null), ((_e = b == null ? void 0 : b.response) == null ? void 0 : _e.status) === 401 && (at(null), Xt(null))) : (console.error("Failed to add product to basket:", b.message), ze.error("Failed to add product to cart", {
1064
1064
  position: "bottom-right",
1065
1065
  autoClose: 3e3
1066
1066
  }));
@@ -1277,7 +1277,7 @@ const at = (e) => {
1277
1277
  /* @__PURE__ */ d(
1278
1278
  "div",
1279
1279
  {
1280
- className: `flex flex-col h-full ${Se ? "lg:w-2/3 w-full" : "w-full"}`,
1280
+ className: `flex flex-col h-full ${Ne ? "lg:w-2/3 w-full" : "w-full"}`,
1281
1281
  children: [
1282
1282
  /* @__PURE__ */ d(
1283
1283
  "div",
@@ -1307,7 +1307,7 @@ const at = (e) => {
1307
1307
  ]
1308
1308
  }
1309
1309
  ),
1310
- Be.map((m, R) => {
1310
+ Me.map((m, R) => {
1311
1311
  var j, W;
1312
1312
  return /* @__PURE__ */ d("div", { children: [
1313
1313
  /* @__PURE__ */ a(
@@ -1322,7 +1322,7 @@ const at = (e) => {
1322
1322
  {
1323
1323
  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",
1324
1324
  dangerouslySetInnerHTML: {
1325
- __html: ar(m.response)
1325
+ __html: sr(m.response)
1326
1326
  }
1327
1327
  }
1328
1328
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1330,11 +1330,11 @@ const at = (e) => {
1330
1330
  {
1331
1331
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1332
1332
  dangerouslySetInnerHTML: {
1333
- __html: ar(m.response)
1333
+ __html: sr(m.response)
1334
1334
  }
1335
1335
  }
1336
1336
  ) }),
1337
- Te && !m.response.includes("Thinking") && ((j = m.products) == null ? void 0 : j.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" }) }),
1337
+ Ee && !m.response.includes("Thinking") && ((j = m.products) == null ? void 0 : j.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" }) }),
1338
1338
  (m == null ? void 0 : m.products) && ((W = m == null ? void 0 : m.products) == null ? void 0 : W.length) > 0 && /* @__PURE__ */ a(
1339
1339
  aa,
1340
1340
  {
@@ -1355,7 +1355,7 @@ const at = (e) => {
1355
1355
  "button",
1356
1356
  {
1357
1357
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${D.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1358
- onClick: () => je(Y),
1358
+ onClick: () => Oe(Y),
1359
1359
  style: {
1360
1360
  backgroundColor: D.tanyaThemeColorLight
1361
1361
  },
@@ -1406,7 +1406,7 @@ const at = (e) => {
1406
1406
  backgroundColor: D.tanyaThemeColorLight
1407
1407
  },
1408
1408
  dangerouslySetInnerHTML: {
1409
- __html: ar(
1409
+ __html: sr(
1410
1410
  m.secondaryResponse
1411
1411
  )
1412
1412
  }
@@ -1514,7 +1514,7 @@ const at = (e) => {
1514
1514
  "button",
1515
1515
  {
1516
1516
  onClick: () => {
1517
- tr(
1517
+ nr(
1518
1518
  Ye(
1519
1519
  m.productSnapshot
1520
1520
  ),
@@ -1560,7 +1560,7 @@ const at = (e) => {
1560
1560
  autoFocus: !0,
1561
1561
  onChange: (m) => we(m.target.value),
1562
1562
  onKeyDown: (m) => {
1563
- m.key === "Enter" && !q && je();
1563
+ m.key === "Enter" && !q && Oe();
1564
1564
  }
1565
1565
  }
1566
1566
  ),
@@ -1570,7 +1570,7 @@ const at = (e) => {
1570
1570
  type: "submit",
1571
1571
  disabled: q,
1572
1572
  className: "p-3",
1573
- onClick: () => je(),
1573
+ onClick: () => Oe(),
1574
1574
  children: q ? /* @__PURE__ */ a(
1575
1575
  "div",
1576
1576
  {
@@ -1613,17 +1613,17 @@ const at = (e) => {
1613
1613
  ] })
1614
1614
  ] }) });
1615
1615
  };
1616
- var gr = function(e, t) {
1617
- return gr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1616
+ var wr = function(e, t) {
1617
+ return wr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1618
1618
  r.__proto__ = n;
1619
1619
  } || function(r, n) {
1620
1620
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
1621
- }, gr(e, t);
1621
+ }, wr(e, t);
1622
1622
  };
1623
1623
  function ca(e, t) {
1624
1624
  if (typeof t != "function" && t !== null)
1625
1625
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1626
- gr(e, t);
1626
+ wr(e, t);
1627
1627
  function r() {
1628
1628
  this.constructor = e;
1629
1629
  }
@@ -1646,50 +1646,50 @@ function da(e, t) {
1646
1646
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1647
1647
  return r;
1648
1648
  }
1649
- var sr = "Invariant Violation", tn = Object.setPrototypeOf, ua = tn === void 0 ? function(e, t) {
1649
+ var ir = "Invariant Violation", rn = Object.setPrototypeOf, ua = rn === void 0 ? function(e, t) {
1650
1650
  return e.__proto__ = t, e;
1651
- } : tn, Bn = (
1651
+ } : rn, Un = (
1652
1652
  /** @class */
1653
1653
  (function(e) {
1654
1654
  ca(t, e);
1655
1655
  function t(r) {
1656
- r === void 0 && (r = sr);
1657
- var n = e.call(this, typeof r == "number" ? sr + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1658
- return n.framesToPop = 1, n.name = sr, ua(n, t.prototype), n;
1656
+ r === void 0 && (r = ir);
1657
+ var n = e.call(this, typeof r == "number" ? ir + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1658
+ return n.framesToPop = 1, n.name = ir, ua(n, t.prototype), n;
1659
1659
  }
1660
1660
  return t;
1661
1661
  })(Error)
1662
1662
  );
1663
1663
  function ot(e, t) {
1664
1664
  if (!e)
1665
- throw new Bn(t);
1665
+ throw new Un(t);
1666
1666
  }
1667
- var Un = ["debug", "log", "warn", "error", "silent"], fa = Un.indexOf("log");
1668
- function Mt(e) {
1667
+ var qn = ["debug", "log", "warn", "error", "silent"], fa = qn.indexOf("log");
1668
+ function Ut(e) {
1669
1669
  return function() {
1670
- if (Un.indexOf(e) >= fa) {
1670
+ if (qn.indexOf(e) >= fa) {
1671
1671
  var t = console[e] || console.log;
1672
1672
  return t.apply(console, arguments);
1673
1673
  }
1674
1674
  };
1675
1675
  }
1676
1676
  (function(e) {
1677
- e.debug = Mt("debug"), e.log = Mt("log"), e.warn = Mt("warn"), e.error = Mt("error");
1677
+ e.debug = Ut("debug"), e.log = Ut("log"), e.warn = Ut("warn"), e.error = Ut("error");
1678
1678
  })(ot || (ot = {}));
1679
- var qn = "3.14.0";
1680
- function pt(e) {
1679
+ var Rn = "3.14.0";
1680
+ function gt(e) {
1681
1681
  try {
1682
1682
  return e();
1683
1683
  } catch {
1684
1684
  }
1685
1685
  }
1686
- const wr = pt(function() {
1686
+ const yr = gt(function() {
1687
1687
  return globalThis;
1688
- }) || pt(function() {
1688
+ }) || gt(function() {
1689
1689
  return window;
1690
- }) || pt(function() {
1690
+ }) || gt(function() {
1691
1691
  return self;
1692
- }) || pt(function() {
1692
+ }) || gt(function() {
1693
1693
  return global;
1694
1694
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1695
1695
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1697,13 +1697,13 @@ const wr = pt(function() {
1697
1697
  // detect syntactic usage of the Function constructor. If you think you can
1698
1698
  // improve your static analysis to detect this obfuscation, think again. This
1699
1699
  // is an arms race you cannot win, at least not in JavaScript.
1700
- pt(function() {
1701
- return pt.constructor("return this")();
1700
+ gt(function() {
1701
+ return gt.constructor("return this")();
1702
1702
  });
1703
- var rn = /* @__PURE__ */ new Map();
1703
+ var nn = /* @__PURE__ */ new Map();
1704
1704
  function ma(e) {
1705
- var t = rn.get(e) || 1;
1706
- return rn.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1705
+ var t = nn.get(e) || 1;
1706
+ return nn.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1707
1707
  }
1708
1708
  function ha(e, t) {
1709
1709
  var r = ma("stringifyForDisplay");
@@ -1711,34 +1711,34 @@ function ha(e, t) {
1711
1711
  return o === void 0 ? r : o;
1712
1712
  }, t).split(JSON.stringify(r)).join("<undefined>");
1713
1713
  }
1714
- function Bt(e) {
1714
+ function qt(e) {
1715
1715
  return function(t) {
1716
1716
  for (var r = [], n = 1; n < arguments.length; n++)
1717
1717
  r[n - 1] = arguments[n];
1718
1718
  if (typeof t == "number") {
1719
1719
  var o = t;
1720
- t = Sr(o), t || (t = Cr(o, r), r = []);
1720
+ t = Cr(o), t || (t = _r(o, r), r = []);
1721
1721
  }
1722
1722
  e.apply(void 0, [t].concat(r));
1723
1723
  };
1724
1724
  }
1725
- var ir = Object.assign(function(t, r) {
1725
+ var lr = Object.assign(function(t, r) {
1726
1726
  for (var n = [], o = 2; o < arguments.length; o++)
1727
1727
  n[o - 2] = arguments[o];
1728
- t || ot(t, Sr(r, n) || Cr(r, n));
1728
+ t || ot(t, Cr(r, n) || _r(r, n));
1729
1729
  }, {
1730
- debug: Bt(ot.debug),
1731
- log: Bt(ot.log),
1732
- warn: Bt(ot.warn),
1733
- error: Bt(ot.error)
1730
+ debug: qt(ot.debug),
1731
+ log: qt(ot.log),
1732
+ warn: qt(ot.warn),
1733
+ error: qt(ot.error)
1734
1734
  });
1735
- function Rn(e) {
1735
+ function Hn(e) {
1736
1736
  for (var t = [], r = 1; r < arguments.length; r++)
1737
1737
  t[r - 1] = arguments[r];
1738
- return new Bn(Sr(e, t) || Cr(e, t));
1738
+ return new Un(Cr(e, t) || _r(e, t));
1739
1739
  }
1740
- var nn = Symbol.for("ApolloErrorMessageHandler_" + qn);
1741
- function Hn(e) {
1740
+ var on = Symbol.for("ApolloErrorMessageHandler_" + Rn);
1741
+ function Vn(e) {
1742
1742
  if (typeof e == "string")
1743
1743
  return e;
1744
1744
  try {
@@ -1747,16 +1747,16 @@ function Hn(e) {
1747
1747
  return "<non-serializable>";
1748
1748
  }
1749
1749
  }
1750
- function Sr(e, t) {
1750
+ function Cr(e, t) {
1751
1751
  if (t === void 0 && (t = []), !!e)
1752
- return wr[nn] && wr[nn](e, t.map(Hn));
1752
+ return yr[on] && yr[on](e, t.map(Vn));
1753
1753
  }
1754
- function Cr(e, t) {
1754
+ function _r(e, t) {
1755
1755
  if (t === void 0 && (t = []), !!e)
1756
1756
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1757
- version: qn,
1757
+ version: Rn,
1758
1758
  message: e,
1759
- args: t.map(Hn)
1759
+ args: t.map(Vn)
1760
1760
  })));
1761
1761
  }
1762
1762
  function pa(e) {
@@ -1767,7 +1767,7 @@ function pa(e) {
1767
1767
  })[0] || null;
1768
1768
  }
1769
1769
  let ie = null;
1770
- const on = {};
1770
+ const an = {};
1771
1771
  let ga = 1;
1772
1772
  const wa = () => class {
1773
1773
  constructor() {
@@ -1782,11 +1782,11 @@ const wa = () => class {
1782
1782
  for (let t = ie; t; t = t.parent)
1783
1783
  if (this.id in t.slots) {
1784
1784
  const r = t.slots[this.id];
1785
- if (r === on)
1785
+ if (r === an)
1786
1786
  break;
1787
1787
  return t !== ie && (ie.slots[this.id] = r), !0;
1788
1788
  }
1789
- return ie && (ie.slots[this.id] = on), !1;
1789
+ return ie && (ie.slots[this.id] = an), !1;
1790
1790
  }
1791
1791
  getValue() {
1792
1792
  if (this.hasValue())
@@ -1830,27 +1830,27 @@ const wa = () => class {
1830
1830
  return t.apply(n, r);
1831
1831
  }
1832
1832
  };
1833
- function an(e) {
1833
+ function sn(e) {
1834
1834
  try {
1835
1835
  return e();
1836
1836
  } catch {
1837
1837
  }
1838
1838
  }
1839
- const lr = "@wry/context:Slot", ya = (
1839
+ const cr = "@wry/context:Slot", ya = (
1840
1840
  // Prefer globalThis when available.
1841
1841
  // https://github.com/benjamn/wryware/issues/347
1842
- an(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1842
+ sn(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1843
1843
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1844
1844
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1845
- an(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1845
+ sn(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1846
1846
  // back to using the Array constructor as a namespace, but that was flagged in
1847
1847
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1848
1848
  /* @__PURE__ */ Object.create(null)
1849
- ), sn = ya, _r = sn[lr] || // Earlier versions of this package stored the globalKey property on the Array
1849
+ ), ln = ya, Ir = ln[cr] || // Earlier versions of this package stored the globalKey property on the Array
1850
1850
  // constructor, so we check there as well, to prevent Slot class duplication.
1851
- Array[lr] || (function(e) {
1851
+ Array[cr] || (function(e) {
1852
1852
  try {
1853
- Object.defineProperty(sn, lr, {
1853
+ Object.defineProperty(ln, cr, {
1854
1854
  value: e,
1855
1855
  enumerable: !1,
1856
1856
  writable: !1,
@@ -1865,8 +1865,8 @@ Array[lr] || (function(e) {
1865
1865
  } finally {
1866
1866
  return e;
1867
1867
  }
1868
- })(wa()), { bind: fi, noContext: mi } = _r;
1869
- new _r();
1868
+ })(wa()), { bind: fi, noContext: mi } = Ir;
1869
+ new Ir();
1870
1870
  function xa(e, t) {
1871
1871
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1872
1872
  if (r) return (r = r.call(e)).next.bind(r);
@@ -1882,112 +1882,112 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1882
1882
  }
1883
1883
  function ba(e, t) {
1884
1884
  if (e) {
1885
- if (typeof e == "string") return ln(e, t);
1885
+ if (typeof e == "string") return cn(e, t);
1886
1886
  var r = Object.prototype.toString.call(e).slice(8, -1);
1887
1887
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
1888
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ln(e, t);
1888
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return cn(e, t);
1889
1889
  }
1890
1890
  }
1891
- function ln(e, t) {
1891
+ function cn(e, t) {
1892
1892
  (t == null || t > e.length) && (t = e.length);
1893
1893
  for (var r = 0, n = new Array(t); r < t; r++)
1894
1894
  n[r] = e[r];
1895
1895
  return n;
1896
1896
  }
1897
- function cn(e, t) {
1897
+ function dn(e, t) {
1898
1898
  for (var r = 0; r < t.length; r++) {
1899
1899
  var n = t[r];
1900
1900
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1901
1901
  }
1902
1902
  }
1903
- function Ir(e, t, r) {
1904
- return t && cn(e.prototype, t), r && cn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1903
+ function Pr(e, t, r) {
1904
+ return t && dn(e.prototype, t), r && dn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1905
1905
  }
1906
- var Pr = function() {
1906
+ var Fr = function() {
1907
1907
  return typeof Symbol == "function";
1908
- }, Fr = function(e) {
1909
- return Pr() && !!Symbol[e];
1910
1908
  }, Er = function(e) {
1911
- return Fr(e) ? Symbol[e] : "@@" + e;
1909
+ return Fr() && !!Symbol[e];
1910
+ }, Tr = function(e) {
1911
+ return Er(e) ? Symbol[e] : "@@" + e;
1912
1912
  };
1913
- Pr() && !Fr("observable") && (Symbol.observable = Symbol("observable"));
1914
- var va = Er("iterator"), yr = Er("observable"), Vn = Er("species");
1915
- function Gt(e, t) {
1913
+ Fr() && !Er("observable") && (Symbol.observable = Symbol("observable"));
1914
+ var va = Tr("iterator"), xr = Tr("observable"), Yn = Tr("species");
1915
+ function Zt(e, t) {
1916
1916
  var r = e[t];
1917
1917
  if (r != null) {
1918
1918
  if (typeof r != "function") throw new TypeError(r + " is not a function");
1919
1919
  return r;
1920
1920
  }
1921
1921
  }
1922
- function Ct(e) {
1922
+ function It(e) {
1923
1923
  var t = e.constructor;
1924
- return t !== void 0 && (t = t[Vn], t === null && (t = void 0)), t !== void 0 ? t : de;
1924
+ return t !== void 0 && (t = t[Yn], t === null && (t = void 0)), t !== void 0 ? t : de;
1925
1925
  }
1926
1926
  function ka(e) {
1927
1927
  return e instanceof de;
1928
1928
  }
1929
- function xt(e) {
1930
- xt.log ? xt.log(e) : setTimeout(function() {
1929
+ function bt(e) {
1930
+ bt.log ? bt.log(e) : setTimeout(function() {
1931
1931
  throw e;
1932
1932
  });
1933
1933
  }
1934
- function qt(e) {
1934
+ function Ht(e) {
1935
1935
  Promise.resolve().then(function() {
1936
1936
  try {
1937
1937
  e();
1938
1938
  } catch (t) {
1939
- xt(t);
1939
+ bt(t);
1940
1940
  }
1941
1941
  });
1942
1942
  }
1943
- function Yn(e) {
1943
+ function Jn(e) {
1944
1944
  var t = e._cleanup;
1945
1945
  if (t !== void 0 && (e._cleanup = void 0, !!t))
1946
1946
  try {
1947
1947
  if (typeof t == "function")
1948
1948
  t();
1949
1949
  else {
1950
- var r = Gt(t, "unsubscribe");
1950
+ var r = Zt(t, "unsubscribe");
1951
1951
  r && r.call(t);
1952
1952
  }
1953
1953
  } catch (n) {
1954
- xt(n);
1954
+ bt(n);
1955
1955
  }
1956
1956
  }
1957
- function xr(e) {
1957
+ function br(e) {
1958
1958
  e._observer = void 0, e._queue = void 0, e._state = "closed";
1959
1959
  }
1960
1960
  function Na(e) {
1961
1961
  var t = e._queue;
1962
1962
  if (t) {
1963
1963
  e._queue = void 0, e._state = "ready";
1964
- for (var r = 0; r < t.length && (Jn(e, t[r].type, t[r].value), e._state !== "closed"); ++r)
1964
+ for (var r = 0; r < t.length && (Kn(e, t[r].type, t[r].value), e._state !== "closed"); ++r)
1965
1965
  ;
1966
1966
  }
1967
1967
  }
1968
- function Jn(e, t, r) {
1968
+ function Kn(e, t, r) {
1969
1969
  e._state = "running";
1970
1970
  var n = e._observer;
1971
1971
  try {
1972
- var o = Gt(n, t);
1972
+ var o = Zt(n, t);
1973
1973
  switch (t) {
1974
1974
  case "next":
1975
1975
  o && o.call(n, r);
1976
1976
  break;
1977
1977
  case "error":
1978
- if (xr(e), o) o.call(n, r);
1978
+ if (br(e), o) o.call(n, r);
1979
1979
  else throw r;
1980
1980
  break;
1981
1981
  case "complete":
1982
- xr(e), o && o.call(n);
1982
+ br(e), o && o.call(n);
1983
1983
  break;
1984
1984
  }
1985
1985
  } catch (s) {
1986
- xt(s);
1986
+ bt(s);
1987
1987
  }
1988
- e._state === "closed" ? Yn(e) : e._state === "running" && (e._state = "ready");
1988
+ e._state === "closed" ? Jn(e) : e._state === "running" && (e._state = "ready");
1989
1989
  }
1990
- function cr(e, t, r) {
1990
+ function dr(e, t, r) {
1991
1991
  if (e._state !== "closed") {
1992
1992
  if (e._state === "buffering") {
1993
1993
  e._queue.push({
@@ -2000,12 +2000,12 @@ function cr(e, t, r) {
2000
2000
  e._state = "buffering", e._queue = [{
2001
2001
  type: t,
2002
2002
  value: r
2003
- }], qt(function() {
2003
+ }], Ht(function() {
2004
2004
  return Na(e);
2005
2005
  });
2006
2006
  return;
2007
2007
  }
2008
- Jn(e, t, r);
2008
+ Kn(e, t, r);
2009
2009
  }
2010
2010
  }
2011
2011
  var Sa = /* @__PURE__ */ (function() {
@@ -2021,8 +2021,8 @@ var Sa = /* @__PURE__ */ (function() {
2021
2021
  }
2022
2022
  var t = e.prototype;
2023
2023
  return t.unsubscribe = function() {
2024
- this._state !== "closed" && (xr(this), Yn(this));
2025
- }, Ir(e, [{
2024
+ this._state !== "closed" && (br(this), Jn(this));
2025
+ }, Pr(e, [{
2026
2026
  key: "closed",
2027
2027
  get: function() {
2028
2028
  return this._state === "closed";
@@ -2034,12 +2034,12 @@ var Sa = /* @__PURE__ */ (function() {
2034
2034
  }
2035
2035
  var t = e.prototype;
2036
2036
  return t.next = function(n) {
2037
- cr(this._subscription, "next", n);
2037
+ dr(this._subscription, "next", n);
2038
2038
  }, t.error = function(n) {
2039
- cr(this._subscription, "error", n);
2039
+ dr(this._subscription, "error", n);
2040
2040
  }, t.complete = function() {
2041
- cr(this._subscription, "complete");
2042
- }, Ir(e, [{
2041
+ dr(this._subscription, "complete");
2042
+ }, Pr(e, [{
2043
2043
  key: "closed",
2044
2044
  get: function() {
2045
2045
  return this._subscription._state === "closed";
@@ -2083,7 +2083,7 @@ var Sa = /* @__PURE__ */ (function() {
2083
2083
  }, t.map = function(n) {
2084
2084
  var o = this;
2085
2085
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2086
- var s = Ct(this);
2086
+ var s = It(this);
2087
2087
  return new s(function(i) {
2088
2088
  return o.subscribe({
2089
2089
  next: function(c) {
@@ -2105,7 +2105,7 @@ var Sa = /* @__PURE__ */ (function() {
2105
2105
  }, t.filter = function(n) {
2106
2106
  var o = this;
2107
2107
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2108
- var s = Ct(this);
2108
+ var s = It(this);
2109
2109
  return new s(function(i) {
2110
2110
  return o.subscribe({
2111
2111
  next: function(c) {
@@ -2127,7 +2127,7 @@ var Sa = /* @__PURE__ */ (function() {
2127
2127
  }, t.reduce = function(n) {
2128
2128
  var o = this;
2129
2129
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2130
- var s = Ct(this), i = arguments.length > 1, c = !1, l = arguments[1], p = l;
2130
+ var s = It(this), i = arguments.length > 1, c = !1, l = arguments[1], p = l;
2131
2131
  return new s(function(g) {
2132
2132
  return o.subscribe({
2133
2133
  next: function(y) {
@@ -2153,7 +2153,7 @@ var Sa = /* @__PURE__ */ (function() {
2153
2153
  }, t.concat = function() {
2154
2154
  for (var n = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
2155
2155
  s[i] = arguments[i];
2156
- var c = Ct(this);
2156
+ var c = It(this);
2157
2157
  return new c(function(l) {
2158
2158
  var p, g = 0;
2159
2159
  function y(x) {
@@ -2176,7 +2176,7 @@ var Sa = /* @__PURE__ */ (function() {
2176
2176
  }, t.flatMap = function(n) {
2177
2177
  var o = this;
2178
2178
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2179
- var s = Ct(this);
2179
+ var s = It(this);
2180
2180
  return new s(function(i) {
2181
2181
  var c = [], l = o.subscribe({
2182
2182
  next: function(g) {
@@ -2216,12 +2216,12 @@ var Sa = /* @__PURE__ */ (function() {
2216
2216
  }), l.unsubscribe();
2217
2217
  };
2218
2218
  });
2219
- }, t[yr] = function() {
2219
+ }, t[xr] = function() {
2220
2220
  return this;
2221
2221
  }, e.from = function(n) {
2222
2222
  var o = typeof this == "function" ? this : e;
2223
2223
  if (n == null) throw new TypeError(n + " is not an object");
2224
- var s = Gt(n, yr);
2224
+ var s = Zt(n, xr);
2225
2225
  if (s) {
2226
2226
  var i = s.call(n);
2227
2227
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
@@ -2229,9 +2229,9 @@ var Sa = /* @__PURE__ */ (function() {
2229
2229
  return i.subscribe(c);
2230
2230
  });
2231
2231
  }
2232
- if (Fr("iterator") && (s = Gt(n, va), s))
2232
+ if (Er("iterator") && (s = Zt(n, va), s))
2233
2233
  return new o(function(c) {
2234
- qt(function() {
2234
+ Ht(function() {
2235
2235
  if (!c.closed) {
2236
2236
  for (var l = xa(s.call(n)), p; !(p = l()).done; ) {
2237
2237
  var g = p.value;
@@ -2243,7 +2243,7 @@ var Sa = /* @__PURE__ */ (function() {
2243
2243
  });
2244
2244
  if (Array.isArray(n))
2245
2245
  return new o(function(c) {
2246
- qt(function() {
2246
+ Ht(function() {
2247
2247
  if (!c.closed) {
2248
2248
  for (var l = 0; l < n.length; ++l)
2249
2249
  if (c.next(n[l]), c.closed) return;
@@ -2257,7 +2257,7 @@ var Sa = /* @__PURE__ */ (function() {
2257
2257
  o[s] = arguments[s];
2258
2258
  var i = typeof this == "function" ? this : e;
2259
2259
  return new i(function(c) {
2260
- qt(function() {
2260
+ Ht(function() {
2261
2261
  if (!c.closed) {
2262
2262
  for (var l = 0; l < o.length; ++l)
2263
2263
  if (c.next(o[l]), c.closed) return;
@@ -2265,17 +2265,17 @@ var Sa = /* @__PURE__ */ (function() {
2265
2265
  }
2266
2266
  });
2267
2267
  });
2268
- }, Ir(e, null, [{
2269
- key: Vn,
2268
+ }, Pr(e, null, [{
2269
+ key: Yn,
2270
2270
  get: function() {
2271
2271
  return this;
2272
2272
  }
2273
2273
  }]), e;
2274
2274
  })();
2275
- Pr() && Object.defineProperty(de, Symbol("extensions"), {
2275
+ Fr() && Object.defineProperty(de, Symbol("extensions"), {
2276
2276
  value: {
2277
- symbol: yr,
2278
- hostReportError: xt
2277
+ symbol: xr,
2278
+ hostReportError: bt
2279
2279
  },
2280
2280
  configurable: !0
2281
2281
  });
@@ -2295,11 +2295,11 @@ function _a(e) {
2295
2295
  t = "@@observable";
2296
2296
  return t;
2297
2297
  }
2298
- var yt;
2299
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2300
- _a(yt);
2301
- var dn = de.prototype, un = "@@observable";
2302
- dn[un] || (dn[un] = function() {
2298
+ var xt;
2299
+ typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2300
+ _a(xt);
2301
+ var un = de.prototype, fn = "@@observable";
2302
+ un[fn] || (un[fn] = function() {
2303
2303
  return this;
2304
2304
  });
2305
2305
  function Ia(e) {
@@ -2312,7 +2312,7 @@ function Ia(e) {
2312
2312
  ], r = 0, n = Object.keys(e); r < n.length; r++) {
2313
2313
  var o = n[r];
2314
2314
  if (t.indexOf(o) < 0)
2315
- throw Rn(58, o);
2315
+ throw Hn(58, o);
2316
2316
  }
2317
2317
  return e;
2318
2318
  }
@@ -2339,23 +2339,23 @@ function Fa(e) {
2339
2339
  };
2340
2340
  return t.operationName || (t.operationName = typeof t.query != "string" ? pa(t.query) || void 0 : ""), t;
2341
2341
  }
2342
- var Ea = Symbol.for("apollo.deprecations"), Ta = wr, Aa = new _r();
2342
+ var Ea = Symbol.for("apollo.deprecations"), Ta = yr, Aa = new Ir();
2343
2343
  function Oa(e) {
2344
2344
  return Ta[Ea] || (Aa.getValue() || []).includes(e);
2345
2345
  }
2346
2346
  function ja(e, t) {
2347
2347
  Oa(e) || t();
2348
2348
  }
2349
- function fn(e, t) {
2349
+ function mn(e, t) {
2350
2350
  return t ? t(e) : de.of();
2351
2351
  }
2352
- function _t(e) {
2353
- return typeof e == "function" ? new Kn(e) : e;
2352
+ function Pt(e) {
2353
+ return typeof e == "function" ? new Wn(e) : e;
2354
2354
  }
2355
- function Ut(e) {
2355
+ function Rt(e) {
2356
2356
  return e.request.length <= 1;
2357
2357
  }
2358
- var Kn = (
2358
+ var Wn = (
2359
2359
  /** @class */
2360
2360
  (function() {
2361
2361
  function e(t) {
@@ -2366,12 +2366,12 @@ var Kn = (
2366
2366
  return de.of();
2367
2367
  });
2368
2368
  }, e.from = function(t) {
2369
- return t.length === 0 ? e.empty() : t.map(_t).reduce(function(r, n) {
2369
+ return t.length === 0 ? e.empty() : t.map(Pt).reduce(function(r, n) {
2370
2370
  return r.concat(n);
2371
2371
  });
2372
2372
  }, e.split = function(t, r, n) {
2373
- var o = _t(r), s = _t(n || new e(fn)), i;
2374
- return Ut(o) && Ut(s) ? i = new e(function(c) {
2373
+ var o = Pt(r), s = Pt(n || new e(mn)), i;
2374
+ return Rt(o) && Rt(s) ? i = new e(function(c) {
2375
2375
  return t(c) ? o.request(c) || de.of() : s.request(c) || de.of();
2376
2376
  }) : i = new e(function(c, l) {
2377
2377
  return t(c) ? o.request(c, l) || de.of() : s.request(c, l) || de.of();
@@ -2379,11 +2379,11 @@ var Kn = (
2379
2379
  }, e.execute = function(t, r) {
2380
2380
  return t.request(Pa(r.context, Fa(Ia(r)))) || de.of();
2381
2381
  }, e.concat = function(t, r) {
2382
- var n = _t(t);
2383
- if (Ut(n))
2384
- return globalThis.__DEV__ !== !1 && ir.warn(47, n), n;
2385
- var o = _t(r), s;
2386
- return Ut(o) ? s = new e(function(i) {
2382
+ var n = Pt(t);
2383
+ if (Rt(n))
2384
+ return globalThis.__DEV__ !== !1 && lr.warn(47, n), n;
2385
+ var o = Pt(r), s;
2386
+ return Rt(o) ? s = new e(function(i) {
2387
2387
  return n.request(i, function(c) {
2388
2388
  return o.request(c) || de.of();
2389
2389
  }) || de.of();
@@ -2393,24 +2393,24 @@ var Kn = (
2393
2393
  }) || de.of();
2394
2394
  }), Object.assign(s, { left: n, right: o });
2395
2395
  }, e.prototype.split = function(t, r, n) {
2396
- return this.concat(e.split(t, r, n || new e(fn)));
2396
+ return this.concat(e.split(t, r, n || new e(mn)));
2397
2397
  }, e.prototype.concat = function(t) {
2398
2398
  return e.concat(this, t);
2399
2399
  }, e.prototype.request = function(t, r) {
2400
- throw Rn(48);
2400
+ throw Hn(48);
2401
2401
  }, e.prototype.onError = function(t, r) {
2402
2402
  if (globalThis.__DEV__ !== !1 && ja("onError", function() {
2403
- globalThis.__DEV__ !== !1 && ir.warn(49);
2403
+ globalThis.__DEV__ !== !1 && lr.warn(49);
2404
2404
  }), r && r.error)
2405
2405
  return r.error(t), !1;
2406
2406
  throw t;
2407
2407
  }, e.prototype.setOnError = function(t) {
2408
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && ir.warn(50), this.onError = t, this;
2408
+ return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && lr.warn(50), this.onError = t, this;
2409
2409
  }, e;
2410
2410
  })()
2411
2411
  );
2412
- function $a(e) {
2413
- return new Kn(function(t, r) {
2412
+ function La(e) {
2413
+ return new Wn(function(t, r) {
2414
2414
  var n = da(t, []);
2415
2415
  return new de(function(o) {
2416
2416
  var s, i = !1;
@@ -2428,7 +2428,7 @@ function $a(e) {
2428
2428
  });
2429
2429
  });
2430
2430
  }
2431
- const La = async () => {
2431
+ const $a = async () => {
2432
2432
  const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2433
2433
  try {
2434
2434
  const o = await he.post(
@@ -2446,10 +2446,10 @@ const La = async () => {
2446
2446
  } catch (o) {
2447
2447
  return he.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2448
2448
  }
2449
- }, Da = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", za = Lo({
2449
+ }, Da = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", za = $o({
2450
2450
  uri: `${Da}`
2451
- }), Ma = $a(async (e, { headers: t }) => {
2452
- const r = await La();
2451
+ }), Ma = La(async (e, { headers: t }) => {
2452
+ const r = await $a();
2453
2453
  return {
2454
2454
  headers: {
2455
2455
  ...t,
@@ -2481,20 +2481,20 @@ function Ua(e, t) {
2481
2481
  }
2482
2482
  return Object.keys(r).concat(Object.keys(n)).forEach(s), o;
2483
2483
  }
2484
- const Wn = Object.freeze({
2484
+ const Qn = Object.freeze({
2485
2485
  left: 0,
2486
2486
  top: 0,
2487
2487
  width: 16,
2488
2488
  height: 16
2489
- }), Xt = Object.freeze({
2489
+ }), er = Object.freeze({
2490
2490
  rotate: 0,
2491
2491
  vFlip: !1,
2492
2492
  hFlip: !1
2493
- }), Tr = Object.freeze({
2494
- ...Wn,
2495
- ...Xt
2496
- }), br = Object.freeze({
2497
- ...Tr,
2493
+ }), Ar = Object.freeze({
2494
+ ...Qn,
2495
+ ...er
2496
+ }), vr = Object.freeze({
2497
+ ...Ar,
2498
2498
  body: "",
2499
2499
  hidden: !1
2500
2500
  });
@@ -2504,20 +2504,20 @@ function qa(e, t) {
2504
2504
  const n = ((e.rotate || 0) + (t.rotate || 0)) % 4;
2505
2505
  return n && (r.rotate = n), r;
2506
2506
  }
2507
- function mn(e, t) {
2507
+ function hn(e, t) {
2508
2508
  const r = qa(e, t);
2509
- for (const n in br) n in Xt ? n in e && !(n in r) && (r[n] = Xt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2509
+ for (const n in vr) n in er ? n in e && !(n in r) && (r[n] = er[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2510
2510
  return r;
2511
2511
  }
2512
2512
  function Ra(e, t, r) {
2513
2513
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
2514
2514
  let s = {};
2515
2515
  function i(c) {
2516
- s = mn(n[c] || o[c], s);
2516
+ s = hn(n[c] || o[c], s);
2517
2517
  }
2518
- return i(t), r.forEach(i), mn(e, s);
2518
+ return i(t), r.forEach(i), hn(e, s);
2519
2519
  }
2520
- function Qn(e, t) {
2520
+ function Gn(e, t) {
2521
2521
  const r = [];
2522
2522
  if (typeof e != "object" || typeof e.icons != "object") return r;
2523
2523
  e.not_found instanceof Array && e.not_found.forEach((o) => {
@@ -2534,29 +2534,29 @@ const Ha = {
2534
2534
  provider: "",
2535
2535
  aliases: {},
2536
2536
  not_found: {},
2537
- ...Wn
2537
+ ...Qn
2538
2538
  };
2539
- function dr(e, t) {
2539
+ function ur(e, t) {
2540
2540
  for (const r in t) if (r in e && typeof e[r] != typeof t[r]) return !1;
2541
2541
  return !0;
2542
2542
  }
2543
- function Gn(e) {
2543
+ function Xn(e) {
2544
2544
  if (typeof e != "object" || e === null) return null;
2545
2545
  const t = e;
2546
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !dr(e, Ha)) return null;
2546
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ur(e, Ha)) return null;
2547
2547
  const r = t.icons;
2548
2548
  for (const o in r) {
2549
2549
  const s = r[o];
2550
- if (!o || typeof s.body != "string" || !dr(s, br)) return null;
2550
+ if (!o || typeof s.body != "string" || !ur(s, vr)) return null;
2551
2551
  }
2552
2552
  const n = t.aliases || /* @__PURE__ */ Object.create(null);
2553
2553
  for (const o in n) {
2554
2554
  const s = n[o], i = s.parent;
2555
- if (!o || typeof i != "string" || !r[i] && !n[i] || !dr(s, br)) return null;
2555
+ if (!o || typeof i != "string" || !r[i] && !n[i] || !ur(s, vr)) return null;
2556
2556
  }
2557
2557
  return t;
2558
2558
  }
2559
- const hn = /* @__PURE__ */ Object.create(null);
2559
+ const pn = /* @__PURE__ */ Object.create(null);
2560
2560
  function Va(e, t) {
2561
2561
  return {
2562
2562
  provider: e,
@@ -2565,12 +2565,12 @@ function Va(e, t) {
2565
2565
  missing: /* @__PURE__ */ new Set()
2566
2566
  };
2567
2567
  }
2568
- function bt(e, t) {
2569
- const r = hn[e] || (hn[e] = /* @__PURE__ */ Object.create(null));
2568
+ function vt(e, t) {
2569
+ const r = pn[e] || (pn[e] = /* @__PURE__ */ Object.create(null));
2570
2570
  return r[t] || (r[t] = Va(e, t));
2571
2571
  }
2572
- function Xn(e, t) {
2573
- return Gn(t) ? Qn(t, (r, n) => {
2572
+ function Zn(e, t) {
2573
+ return Xn(t) ? Gn(t, (r, n) => {
2574
2574
  n ? e.icons[r] = n : e.missing.add(r);
2575
2575
  }) : [];
2576
2576
  }
@@ -2582,7 +2582,7 @@ function Ya(e, t, r) {
2582
2582
  }
2583
2583
  return !1;
2584
2584
  }
2585
- const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Zt = (e, t, r, n = "") => {
2585
+ const eo = /^[a-z0-9]+(-[a-z0-9]+)*$/, tr = (e, t, r, n = "") => {
2586
2586
  const o = e.split(":");
2587
2587
  if (e.slice(0, 1) === "@") {
2588
2588
  if (o.length < 2 || o.length > 3) return null;
@@ -2595,7 +2595,7 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Zt = (e, t, r, n = "") => {
2595
2595
  prefix: l,
2596
2596
  name: c
2597
2597
  };
2598
- return t && !Rt(p) ? null : p;
2598
+ return t && !Vt(p) ? null : p;
2599
2599
  }
2600
2600
  const s = o[0], i = s.split("-");
2601
2601
  if (i.length > 1) {
@@ -2604,7 +2604,7 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Zt = (e, t, r, n = "") => {
2604
2604
  prefix: i.shift(),
2605
2605
  name: i.join("-")
2606
2606
  };
2607
- return t && !Rt(c) ? null : c;
2607
+ return t && !Vt(c) ? null : c;
2608
2608
  }
2609
2609
  if (r && n === "") {
2610
2610
  const c = {
@@ -2612,51 +2612,51 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Zt = (e, t, r, n = "") => {
2612
2612
  prefix: "",
2613
2613
  name: s
2614
2614
  };
2615
- return t && !Rt(c, r) ? null : c;
2615
+ return t && !Vt(c, r) ? null : c;
2616
2616
  }
2617
2617
  return null;
2618
- }, Rt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2619
- let Tt = !1;
2620
- function eo(e) {
2621
- return typeof e == "boolean" && (Tt = e), Tt;
2618
+ }, Vt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2619
+ let Ot = !1;
2620
+ function to(e) {
2621
+ return typeof e == "boolean" && (Ot = e), Ot;
2622
2622
  }
2623
- function pn(e) {
2624
- const t = typeof e == "string" ? Zt(e, !0, Tt) : e;
2623
+ function gn(e) {
2624
+ const t = typeof e == "string" ? tr(e, !0, Ot) : e;
2625
2625
  if (t) {
2626
- const r = bt(t.provider, t.prefix), n = t.name;
2626
+ const r = vt(t.provider, t.prefix), n = t.name;
2627
2627
  return r.icons[n] || (r.missing.has(n) ? null : void 0);
2628
2628
  }
2629
2629
  }
2630
2630
  function Ja(e, t) {
2631
- const r = Zt(e, !0, Tt);
2631
+ const r = tr(e, !0, Ot);
2632
2632
  if (!r) return !1;
2633
- const n = bt(r.provider, r.prefix);
2633
+ const n = vt(r.provider, r.prefix);
2634
2634
  return t ? Ya(n, r.name, t) : (n.missing.add(r.name), !0);
2635
2635
  }
2636
2636
  function Ka(e, t) {
2637
2637
  if (typeof e != "object") return !1;
2638
- if (typeof t != "string" && (t = e.provider || ""), Tt && !t && !e.prefix) {
2638
+ if (typeof t != "string" && (t = e.provider || ""), Ot && !t && !e.prefix) {
2639
2639
  let o = !1;
2640
- return Gn(e) && (e.prefix = "", Qn(e, (s, i) => {
2640
+ return Xn(e) && (e.prefix = "", Gn(e, (s, i) => {
2641
2641
  Ja(s, i) && (o = !0);
2642
2642
  })), o;
2643
2643
  }
2644
2644
  const r = e.prefix;
2645
- if (!Rt({
2645
+ if (!Vt({
2646
2646
  prefix: r,
2647
2647
  name: "a"
2648
2648
  })) return !1;
2649
- const n = bt(t, r);
2650
- return !!Xn(n, e);
2649
+ const n = vt(t, r);
2650
+ return !!Zn(n, e);
2651
2651
  }
2652
- const to = Object.freeze({
2652
+ const ro = Object.freeze({
2653
2653
  width: null,
2654
2654
  height: null
2655
- }), ro = Object.freeze({
2656
- ...to,
2657
- ...Xt
2655
+ }), no = Object.freeze({
2656
+ ...ro,
2657
+ ...er
2658
2658
  }), Wa = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Qa = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2659
- function gn(e, t, r) {
2659
+ function wn(e, t, r) {
2660
2660
  if (t === 1) return e;
2661
2661
  if (r = r || 100, typeof e == "number") return Math.ceil(e * t * r) / r;
2662
2662
  if (typeof e != "string") return e;
@@ -2698,10 +2698,10 @@ function Za(e, t, r) {
2698
2698
  const es = (e) => e === "unset" || e === "undefined" || e === "none";
2699
2699
  function ts(e, t) {
2700
2700
  const r = {
2701
- ...Tr,
2701
+ ...Ar,
2702
2702
  ...e
2703
2703
  }, n = {
2704
- ...ro,
2704
+ ...no,
2705
2705
  ...t
2706
2706
  }, o = {
2707
2707
  left: r.left,
@@ -2730,7 +2730,7 @@ function ts(e, t) {
2730
2730
  });
2731
2731
  const i = n.width, c = n.height, l = o.width, p = o.height;
2732
2732
  let g, y;
2733
- i === null ? (y = c === null ? "1em" : c === "auto" ? p : c, g = gn(y, l / p)) : (g = i === "auto" ? l : i, y = c === null ? gn(g, p / l) : c === "auto" ? p : c);
2733
+ i === null ? (y = c === null ? "1em" : c === "auto" ? p : c, g = wn(y, l / p)) : (g = i === "auto" ? l : i, y = c === null ? wn(g, p / l) : c === "auto" ? p : c);
2734
2734
  const x = {}, P = (A, N) => {
2735
2735
  es(N) || (x[A] = N.toString());
2736
2736
  };
@@ -2760,14 +2760,14 @@ function as(e, t = ns) {
2760
2760
  e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2761
2761
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2762
2762
  }
2763
- const vr = /* @__PURE__ */ Object.create(null);
2763
+ const kr = /* @__PURE__ */ Object.create(null);
2764
2764
  function ss(e, t) {
2765
- vr[e] = t;
2765
+ kr[e] = t;
2766
2766
  }
2767
- function kr(e) {
2768
- return vr[e] || vr[""];
2767
+ function Nr(e) {
2768
+ return kr[e] || kr[""];
2769
2769
  }
2770
- function Ar(e) {
2770
+ function Or(e) {
2771
2771
  let t;
2772
2772
  if (typeof e.resources == "string") t = [e.resources];
2773
2773
  else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
@@ -2782,15 +2782,15 @@ function Ar(e) {
2782
2782
  dataAfterTimeout: e.dataAfterTimeout !== !1
2783
2783
  };
2784
2784
  }
2785
- const Or = /* @__PURE__ */ Object.create(null), It = ["https://api.simplesvg.com", "https://api.unisvg.com"], Ht = [];
2786
- for (; It.length > 0; ) It.length === 1 || Math.random() > 0.5 ? Ht.push(It.shift()) : Ht.push(It.pop());
2787
- Or[""] = Ar({ resources: ["https://api.iconify.design"].concat(Ht) });
2785
+ const jr = /* @__PURE__ */ Object.create(null), Ft = ["https://api.simplesvg.com", "https://api.unisvg.com"], Yt = [];
2786
+ for (; Ft.length > 0; ) Ft.length === 1 || Math.random() > 0.5 ? Yt.push(Ft.shift()) : Yt.push(Ft.pop());
2787
+ jr[""] = Or({ resources: ["https://api.iconify.design"].concat(Yt) });
2788
2788
  function is(e, t) {
2789
- const r = Ar(t);
2790
- return r === null ? !1 : (Or[e] = r, !0);
2789
+ const r = Or(t);
2790
+ return r === null ? !1 : (jr[e] = r, !0);
2791
2791
  }
2792
- function jr(e) {
2793
- return Or[e];
2792
+ function Lr(e) {
2793
+ return jr[e];
2794
2794
  }
2795
2795
  const ls = () => {
2796
2796
  let e;
@@ -2799,9 +2799,9 @@ const ls = () => {
2799
2799
  } catch {
2800
2800
  }
2801
2801
  };
2802
- let wn = ls();
2802
+ let yn = ls();
2803
2803
  function cs(e, t) {
2804
- const r = jr(e);
2804
+ const r = Lr(e);
2805
2805
  if (!r) return 0;
2806
2806
  let n;
2807
2807
  if (!r.maxURL) n = 0;
@@ -2837,13 +2837,13 @@ const us = (e, t, r) => {
2837
2837
  };
2838
2838
  function fs(e) {
2839
2839
  if (typeof e == "string") {
2840
- const t = jr(e);
2840
+ const t = Lr(e);
2841
2841
  if (t) return t.path;
2842
2842
  }
2843
2843
  return "/";
2844
2844
  }
2845
2845
  const ms = (e, t, r) => {
2846
- if (!wn) {
2846
+ if (!yn) {
2847
2847
  r("abort", 424);
2848
2848
  return;
2849
2849
  }
@@ -2864,7 +2864,7 @@ const ms = (e, t, r) => {
2864
2864
  return;
2865
2865
  }
2866
2866
  let o = 503;
2867
- wn(e + n).then((s) => {
2867
+ yn(e + n).then((s) => {
2868
2868
  const i = s.status;
2869
2869
  if (i !== 200) {
2870
2870
  setTimeout(() => {
@@ -2890,7 +2890,7 @@ const ms = (e, t, r) => {
2890
2890
  prepare: us,
2891
2891
  send: ms
2892
2892
  };
2893
- function no(e, t) {
2893
+ function oo(e, t) {
2894
2894
  e.forEach((r) => {
2895
2895
  const n = r.loaderCallbacks;
2896
2896
  n && (r.loaderCallbacks = n.filter((o) => o.id !== t));
@@ -2921,13 +2921,13 @@ function ps(e) {
2921
2921
  else
2922
2922
  return r = !0, !0;
2923
2923
  return !1;
2924
- }), i.pending.length !== c && (r || no([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2924
+ }), i.pending.length !== c && (r || oo([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2925
2925
  });
2926
2926
  }));
2927
2927
  }
2928
2928
  let gs = 0;
2929
2929
  function ws(e, t, r) {
2930
- const n = gs++, o = no.bind(null, r, n);
2930
+ const n = gs++, o = oo.bind(null, r, n);
2931
2931
  if (!t.pending.length) return o;
2932
2932
  const s = {
2933
2933
  id: n,
@@ -2954,7 +2954,7 @@ function ys(e) {
2954
2954
  return e.forEach((o) => {
2955
2955
  if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
2956
2956
  n = o;
2957
- const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), p = l[i] || (l[i] = bt(s, i));
2957
+ const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), p = l[i] || (l[i] = vt(s, i));
2958
2958
  let g;
2959
2959
  c in p.icons ? g = t.loaded : i === "" || p.missing.has(c) ? g = t.missing : g = t.pending;
2960
2960
  const y = {
@@ -2968,7 +2968,7 @@ function ys(e) {
2968
2968
  function xs(e, t = !0, r = !1) {
2969
2969
  const n = [];
2970
2970
  return e.forEach((o) => {
2971
- const s = typeof o == "string" ? Zt(o, t, r) : o;
2971
+ const s = typeof o == "string" ? tr(o, t, r) : o;
2972
2972
  s && n.push(s);
2973
2973
  }), n;
2974
2974
  }
@@ -3028,7 +3028,7 @@ function vs(e, t, r, n) {
3028
3028
  }
3029
3029
  function M(F, K, we) {
3030
3030
  const ye = K !== "success";
3031
- switch (x = x.filter((b) => b !== F), l) {
3031
+ switch (x = x.filter((k) => k !== F), l) {
3032
3032
  case "pending":
3033
3033
  break;
3034
3034
  case "failed":
@@ -3042,18 +3042,18 @@ function vs(e, t, r, n) {
3042
3042
  return;
3043
3043
  }
3044
3044
  if (ye) {
3045
- g = we, x.length || (i.length ? Te() : V());
3045
+ g = we, x.length || (i.length ? Ee() : V());
3046
3046
  return;
3047
3047
  }
3048
3048
  if (S(), q(), !e.random) {
3049
- const b = e.resources.indexOf(F.resource);
3050
- b !== -1 && b !== e.index && (e.index = b);
3049
+ const k = e.resources.indexOf(F.resource);
3050
+ k !== -1 && k !== e.index && (e.index = k);
3051
3051
  }
3052
- l = "completed", P.forEach((b) => {
3053
- b(we);
3052
+ l = "completed", P.forEach((k) => {
3053
+ k(we);
3054
3054
  });
3055
3055
  }
3056
- function Te() {
3056
+ function Ee() {
3057
3057
  if (l !== "pending") return;
3058
3058
  S();
3059
3059
  const F = i.shift();
@@ -3074,11 +3074,11 @@ function vs(e, t, r, n) {
3074
3074
  M(K, we, ye);
3075
3075
  }
3076
3076
  };
3077
- x.push(K), p++, y = setTimeout(Te, e.rotate), r(F, t, K.callback);
3077
+ x.push(K), p++, y = setTimeout(Ee, e.rotate), r(F, t, K.callback);
3078
3078
  }
3079
- return setTimeout(Te), I;
3079
+ return setTimeout(Ee), I;
3080
3080
  }
3081
- function oo(e) {
3081
+ function ao(e) {
3082
3082
  const t = {
3083
3083
  ...bs,
3084
3084
  ...e
@@ -3106,41 +3106,41 @@ function oo(e) {
3106
3106
  cleanup: n
3107
3107
  };
3108
3108
  }
3109
- function yn() {
3109
+ function xn() {
3110
3110
  }
3111
- const ur = /* @__PURE__ */ Object.create(null);
3111
+ const fr = /* @__PURE__ */ Object.create(null);
3112
3112
  function ks(e) {
3113
- if (!ur[e]) {
3114
- const t = jr(e);
3113
+ if (!fr[e]) {
3114
+ const t = Lr(e);
3115
3115
  if (!t) return;
3116
- const r = oo(t), n = {
3116
+ const r = ao(t), n = {
3117
3117
  config: t,
3118
3118
  redundancy: r
3119
3119
  };
3120
- ur[e] = n;
3120
+ fr[e] = n;
3121
3121
  }
3122
- return ur[e];
3122
+ return fr[e];
3123
3123
  }
3124
3124
  function Ns(e, t, r) {
3125
3125
  let n, o;
3126
3126
  if (typeof e == "string") {
3127
- const s = kr(e);
3127
+ const s = Nr(e);
3128
3128
  if (!s)
3129
- return r(void 0, 424), yn;
3129
+ return r(void 0, 424), xn;
3130
3130
  o = s.send;
3131
3131
  const i = ks(e);
3132
3132
  i && (n = i.redundancy);
3133
3133
  } else {
3134
- const s = Ar(e);
3134
+ const s = Or(e);
3135
3135
  if (s) {
3136
- n = oo(s);
3137
- const i = e.resources ? e.resources[0] : "", c = kr(i);
3136
+ n = ao(s);
3137
+ const i = e.resources ? e.resources[0] : "", c = Nr(i);
3138
3138
  c && (o = c.send);
3139
3139
  }
3140
3140
  }
3141
- return !n || !o ? (r(void 0, 424), yn) : n.query(t, o, r)().abort;
3141
+ return !n || !o ? (r(void 0, 424), xn) : n.query(t, o, r)().abort;
3142
3142
  }
3143
- function xn() {
3143
+ function bn() {
3144
3144
  }
3145
3145
  function Ss(e) {
3146
3146
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
@@ -3150,13 +3150,13 @@ function Ss(e) {
3150
3150
  function Cs(e) {
3151
3151
  const t = [], r = [];
3152
3152
  return e.forEach((n) => {
3153
- (n.match(Zn) ? t : r).push(n);
3153
+ (n.match(eo) ? t : r).push(n);
3154
3154
  }), {
3155
3155
  valid: t,
3156
3156
  invalid: r
3157
3157
  };
3158
3158
  }
3159
- function Pt(e, t, r) {
3159
+ function Et(e, t, r) {
3160
3160
  function n() {
3161
3161
  const o = e.pendingIcons;
3162
3162
  t.forEach((s) => {
@@ -3164,7 +3164,7 @@ function Pt(e, t, r) {
3164
3164
  });
3165
3165
  }
3166
3166
  if (r && typeof r == "object") try {
3167
- if (!Xn(e, r).length) {
3167
+ if (!Zn(e, r).length) {
3168
3168
  n();
3169
3169
  return;
3170
3170
  }
@@ -3173,7 +3173,7 @@ function Pt(e, t, r) {
3173
3173
  }
3174
3174
  n(), Ss(e);
3175
3175
  }
3176
- function bn(e, t) {
3176
+ function vn(e, t) {
3177
3177
  e instanceof Promise ? e.then((r) => {
3178
3178
  t(r);
3179
3179
  }).catch(() => {
@@ -3187,44 +3187,44 @@ function _s(e, t) {
3187
3187
  if (delete e.iconsToLoad, !o || !o.length) return;
3188
3188
  const s = e.loadIcon;
3189
3189
  if (e.loadIcons && (o.length > 1 || !s)) {
3190
- bn(e.loadIcons(o, n, r), (g) => {
3191
- Pt(e, o, g);
3190
+ vn(e.loadIcons(o, n, r), (g) => {
3191
+ Et(e, o, g);
3192
3192
  });
3193
3193
  return;
3194
3194
  }
3195
3195
  if (s) {
3196
3196
  o.forEach((g) => {
3197
3197
  const y = s(g, n, r);
3198
- bn(y, (x) => {
3198
+ vn(y, (x) => {
3199
3199
  const P = x ? {
3200
3200
  prefix: n,
3201
3201
  icons: { [g]: x }
3202
3202
  } : null;
3203
- Pt(e, [g], P);
3203
+ Et(e, [g], P);
3204
3204
  });
3205
3205
  });
3206
3206
  return;
3207
3207
  }
3208
3208
  const { valid: i, invalid: c } = Cs(o);
3209
- if (c.length && Pt(e, c, null), !i.length) return;
3210
- const l = n.match(Zn) ? kr(r) : null;
3209
+ if (c.length && Et(e, c, null), !i.length) return;
3210
+ const l = n.match(eo) ? Nr(r) : null;
3211
3211
  if (!l) {
3212
- Pt(e, i, null);
3212
+ Et(e, i, null);
3213
3213
  return;
3214
3214
  }
3215
3215
  l.prepare(r, n, i).forEach((g) => {
3216
3216
  Ns(r, g, (y) => {
3217
- Pt(e, g.icons, y);
3217
+ Et(e, g.icons, y);
3218
3218
  });
3219
3219
  });
3220
3220
  }));
3221
3221
  }
3222
3222
  const Is = (e, t) => {
3223
- const r = xs(e, !0, eo()), n = ys(r);
3223
+ const r = xs(e, !0, to()), n = ys(r);
3224
3224
  if (!n.pending.length) {
3225
3225
  let l = !0;
3226
3226
  return t && setTimeout(() => {
3227
- l && t(n.loaded, n.missing, n.pending, xn);
3227
+ l && t(n.loaded, n.missing, n.pending, bn);
3228
3228
  }), () => {
3229
3229
  l = !1;
3230
3230
  };
@@ -3234,22 +3234,22 @@ const Is = (e, t) => {
3234
3234
  return n.pending.forEach((l) => {
3235
3235
  const { provider: p, prefix: g } = l;
3236
3236
  if (g === c && p === i) return;
3237
- i = p, c = g, s.push(bt(p, g));
3237
+ i = p, c = g, s.push(vt(p, g));
3238
3238
  const y = o[p] || (o[p] = /* @__PURE__ */ Object.create(null));
3239
3239
  y[g] || (y[g] = []);
3240
3240
  }), n.pending.forEach((l) => {
3241
- const { provider: p, prefix: g, name: y } = l, x = bt(p, g), P = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3241
+ const { provider: p, prefix: g, name: y } = l, x = vt(p, g), P = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
3242
  P.has(y) || (P.add(y), o[p][g].push(y));
3243
3243
  }), s.forEach((l) => {
3244
3244
  const p = o[l.provider][l.prefix];
3245
3245
  p.length && _s(l, p);
3246
- }), t ? ws(t, n, s) : xn;
3246
+ }), t ? ws(t, n, s) : bn;
3247
3247
  };
3248
3248
  function Ps(e, t) {
3249
3249
  const r = { ...e };
3250
3250
  for (const n in t) {
3251
3251
  const o = t[n], s = typeof o;
3252
- n in to ? (o === null || o && (s === "string" || s === "number")) && (r[n] = o) : s === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
3252
+ n in ro ? (o === null || o && (s === "string" || s === "number")) && (r[n] = o) : s === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
3253
3253
  }
3254
3254
  return r;
3255
3255
  }
@@ -3302,22 +3302,22 @@ function Os(e) {
3302
3302
  function js(e) {
3303
3303
  return "data:image/svg+xml," + Os(e);
3304
3304
  }
3305
- function $s(e) {
3305
+ function Ls(e) {
3306
3306
  return 'url("' + js(e) + '")';
3307
3307
  }
3308
- let Ft;
3309
- function Ls() {
3308
+ let Tt;
3309
+ function $s() {
3310
3310
  try {
3311
- Ft = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3311
+ Tt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3312
3312
  } catch {
3313
- Ft = null;
3313
+ Tt = null;
3314
3314
  }
3315
3315
  }
3316
3316
  function Ds(e) {
3317
- return Ft === void 0 && Ls(), Ft ? Ft.createHTML(e) : e;
3317
+ return Tt === void 0 && $s(), Tt ? Tt.createHTML(e) : e;
3318
3318
  }
3319
- const ao = {
3320
- ...ro,
3319
+ const so = {
3320
+ ...no,
3321
3321
  inline: !1
3322
3322
  }, zs = {
3323
3323
  xmlns: "http://www.w3.org/2000/svg",
@@ -3326,37 +3326,37 @@ const ao = {
3326
3326
  role: "img"
3327
3327
  }, Ms = {
3328
3328
  display: "inline-block"
3329
- }, Nr = {
3329
+ }, Sr = {
3330
3330
  backgroundColor: "currentColor"
3331
- }, so = {
3331
+ }, io = {
3332
3332
  backgroundColor: "transparent"
3333
- }, vn = {
3333
+ }, kn = {
3334
3334
  Image: "var(--svg)",
3335
3335
  Repeat: "no-repeat",
3336
3336
  Size: "100% 100%"
3337
- }, kn = {
3338
- WebkitMask: Nr,
3339
- mask: Nr,
3340
- background: so
3337
+ }, Nn = {
3338
+ WebkitMask: Sr,
3339
+ mask: Sr,
3340
+ background: io
3341
3341
  };
3342
- for (const e in kn) {
3343
- const t = kn[e];
3344
- for (const r in vn)
3345
- t[e + r] = vn[r];
3342
+ for (const e in Nn) {
3343
+ const t = Nn[e];
3344
+ for (const r in kn)
3345
+ t[e + r] = kn[r];
3346
3346
  }
3347
3347
  const Bs = {
3348
- ...ao,
3348
+ ...so,
3349
3349
  inline: !0
3350
3350
  };
3351
- function Nn(e) {
3351
+ function Sn(e) {
3352
3352
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3353
3353
  }
3354
3354
  const Us = (e, t, r) => {
3355
- const n = t.inline ? Bs : ao, o = Ps(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3355
+ const n = t.inline ? Bs : so, o = Ps(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3356
3356
  ...s === "svg" ? zs : {}
3357
3357
  };
3358
3358
  if (r) {
3359
- const N = Zt(r, !1, !0);
3359
+ const N = tr(r, !1, !0);
3360
3360
  if (N) {
3361
3361
  const I = ["iconify"], V = [
3362
3362
  "provider",
@@ -3425,7 +3425,7 @@ const Us = (e, t, r) => {
3425
3425
  let N = 0, I = t.id;
3426
3426
  return typeof I == "string" && (I = I.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3427
3427
  __html: Ds(as(p.body, I ? () => I + "ID" + N++ : "iconifyReact"))
3428
- }, fr("svg", l);
3428
+ }, mr("svg", l);
3429
3429
  }
3430
3430
  const { body: y, width: x, height: P } = e, S = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), A = As(y, {
3431
3431
  ...g,
@@ -3434,15 +3434,15 @@ const Us = (e, t, r) => {
3434
3434
  });
3435
3435
  return l.style = {
3436
3436
  ...i,
3437
- "--svg": $s(A),
3438
- width: Nn(g.width),
3439
- height: Nn(g.height),
3437
+ "--svg": Ls(A),
3438
+ width: Sn(g.width),
3439
+ height: Sn(g.height),
3440
3440
  ...Ms,
3441
- ...S ? Nr : so,
3441
+ ...S ? Sr : io,
3442
3442
  ...c
3443
- }, fr("span", l);
3443
+ }, mr("span", l);
3444
3444
  };
3445
- eo(!0);
3445
+ to(!0);
3446
3446
  ss("", hs);
3447
3447
  if (typeof document < "u" && typeof window < "u") {
3448
3448
  const e = window;
@@ -3475,8 +3475,8 @@ if (typeof document < "u" && typeof window < "u") {
3475
3475
  }
3476
3476
  }
3477
3477
  }
3478
- function io(e) {
3479
- const [t, r] = k(!!e.ssr), [n, o] = k({});
3478
+ function lo(e) {
3479
+ const [t, r] = v(!!e.ssr), [n, o] = v({});
3480
3480
  function s(P) {
3481
3481
  if (P) {
3482
3482
  const S = e.icon;
@@ -3485,7 +3485,7 @@ function io(e) {
3485
3485
  name: "",
3486
3486
  data: S
3487
3487
  };
3488
- const A = pn(S);
3488
+ const A = gn(S);
3489
3489
  if (A)
3490
3490
  return {
3491
3491
  name: S,
@@ -3496,7 +3496,7 @@ function io(e) {
3496
3496
  name: ""
3497
3497
  };
3498
3498
  }
3499
- const [i, c] = k(s(!!e.ssr));
3499
+ const [i, c] = v(s(!!e.ssr));
3500
3500
  function l() {
3501
3501
  const P = n.callback;
3502
3502
  P && (P(), o({}));
@@ -3515,7 +3515,7 @@ function io(e) {
3515
3515
  });
3516
3516
  return;
3517
3517
  }
3518
- const A = pn(S);
3518
+ const A = gn(S);
3519
3519
  if (p({
3520
3520
  name: S,
3521
3521
  data: A
@@ -3532,15 +3532,15 @@ function io(e) {
3532
3532
  }, [e.icon, t]);
3533
3533
  const { name: y, data: x } = i;
3534
3534
  return x ? Us({
3535
- ...Tr,
3535
+ ...Ar,
3536
3536
  ...x
3537
- }, e, y) : e.children ? e.children : e.fallback ? e.fallback : fr("span", {});
3537
+ }, e, y) : e.children ? e.children : e.fallback ? e.fallback : mr("span", {});
3538
3538
  }
3539
- const ae = Fn((e, t) => io({
3539
+ const ae = En((e, t) => lo({
3540
3540
  ...e,
3541
3541
  _ref: t
3542
3542
  }));
3543
- Fn((e, t) => io({
3543
+ En((e, t) => lo({
3544
3544
  inline: !0,
3545
3545
  ...e,
3546
3546
  _ref: t
@@ -3583,7 +3583,7 @@ const st = "USD", qs = (e, t = st) => {
3583
3583
  r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
3584
3584
  }
3585
3585
  return { sizeLabel: t };
3586
- }, gt = (e) => Rs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), wt = (e) => Hs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, We = (e) => e.charAt(0).toUpperCase() + e.slice(1), nt = {
3586
+ }, wt = (e) => Rs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), yt = (e) => Hs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, We = (e) => e.charAt(0).toUpperCase() + e.slice(1), nt = {
3587
3587
  standard: {
3588
3588
  label: "Standard Delivery",
3589
3589
  fee: 0,
@@ -3615,16 +3615,16 @@ const st = "USD", qs = (e, t = st) => {
3615
3615
  } catch {
3616
3616
  return `${t} ${e.toFixed(2)}`;
3617
3617
  }
3618
- }, lo = (e) => e == null ? void 0 : e.masterVariant, Sn = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Vt = (e) => {
3619
- const t = lo(e);
3620
- return t ? [t, ...Sn(e)] : Sn(e);
3621
- }, Ys = (e, t = 0) => Vt(e)[t], Js = (e) => {
3618
+ }, co = (e) => e == null ? void 0 : e.masterVariant, Cn = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Jt = (e) => {
3619
+ const t = co(e);
3620
+ return t ? [t, ...Cn(e)] : Cn(e);
3621
+ }, Ys = (e, t = 0) => Jt(e)[t], Js = (e) => {
3622
3622
  var t, r;
3623
3623
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3624
- }, Cn = (e, t) => {
3624
+ }, _n = (e, t) => {
3625
3625
  var r, n, o, s, i, c, l, p;
3626
3626
  return Js(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((p = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : p.link) || "";
3627
- }, _n = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Yt = (e) => {
3627
+ }, In = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Kt = (e) => {
3628
3628
  var s, i, c, l, p, g;
3629
3629
  const t = e ? qs(e, st) : null;
3630
3630
  if (t != null && t.cent && (t != null && t.cur))
@@ -3635,8 +3635,8 @@ const st = "USD", qs = (e, t = st) => {
3635
3635
  };
3636
3636
  const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (p = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : p.value) == null ? void 0 : g.currencyCode) ?? st;
3637
3637
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3638
- }, In = (e, t) => {
3639
- const { amount: r } = Yt(t);
3638
+ }, Pn = (e, t) => {
3639
+ const { amount: r } = Kt(t);
3640
3640
  if (r) return r;
3641
3641
  const n = (e == null ? void 0 : e.price) ?? (e == null ? void 0 : e.sellingPrice) ?? (e == null ? void 0 : e.unitPrice) ?? (e == null ? void 0 : e.mrp) ?? 0, o = Number(n);
3642
3642
  return Number.isFinite(o) ? o : 0;
@@ -3649,7 +3649,7 @@ const st = "USD", qs = (e, t = st) => {
3649
3649
  }, Qs = (e) => {
3650
3650
  var t;
3651
3651
  return (e == null ? void 0 : e.size) || (e == null ? void 0 : e.selectedSize) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.size) || "";
3652
- }, Pn = 20, pi = ({
3652
+ }, Fn = 20, pi = ({
3653
3653
  open: e,
3654
3654
  onClose: t,
3655
3655
  product: r,
@@ -3658,10 +3658,10 @@ const st = "USD", qs = (e, t = st) => {
3658
3658
  addressLoading: s,
3659
3659
  variationAttributes: i
3660
3660
  }) => {
3661
- const p = Vt(r), g = Math.min(
3661
+ const p = Jt(r), g = Math.min(
3662
3662
  Math.max(0, n || 0),
3663
3663
  Math.max(0, p.length - 1)
3664
- ), [y, x] = k([]), [P, S] = k(0);
3664
+ ), [y, x] = v([]), [P, S] = v(0);
3665
3665
  me(() => {
3666
3666
  if (r != null && r.variants) {
3667
3667
  const u = A(
@@ -3673,13 +3673,13 @@ const st = "USD", qs = (e, t = st) => {
3673
3673
  }
3674
3674
  }, [r]);
3675
3675
  const A = (u, h, f) => {
3676
- const { colorMap: w, sizeMap: _ } = N(f), $ = {};
3676
+ const { colorMap: w, sizeMap: _ } = N(f), L = {};
3677
3677
  h == null || h.forEach((E) => {
3678
- var oe, Pe, Le;
3678
+ var oe, Ie, Le;
3679
3679
  const U = (oe = E.variationAttributes) == null ? void 0 : oe.find(
3680
- (De) => De.id === "color"
3681
- ), O = (Le = (Pe = U == null ? void 0 : U.values) == null ? void 0 : Pe[0]) == null ? void 0 : Le.value;
3682
- O && ($[O] || ($[O] = {}), $[O][E.viewType] = E.images);
3680
+ ($e) => $e.id === "color"
3681
+ ), O = (Le = (Ie = U == null ? void 0 : U.values) == null ? void 0 : Ie[0]) == null ? void 0 : Le.value;
3682
+ O && (L[O] || (L[O] = {}), L[O][E.viewType] = E.images);
3683
3683
  });
3684
3684
  const H = u.reduce((E, U) => {
3685
3685
  const O = U.variationValues.color, oe = U.variationValues.size;
@@ -3687,7 +3687,7 @@ const st = "USD", qs = (e, t = st) => {
3687
3687
  color: O,
3688
3688
  name: w[O] || O,
3689
3689
  // ✅ DISPLAY NAME
3690
- images: $[O] || {},
3690
+ images: L[O] || {},
3691
3691
  variants: []
3692
3692
  }), E[O].variants.push({
3693
3693
  size: oe,
@@ -3714,39 +3714,39 @@ const st = "USD", qs = (e, t = st) => {
3714
3714
  f[_.value] = _.name;
3715
3715
  });
3716
3716
  }), { colorMap: h, sizeMap: f };
3717
- }, I = p.length, [V, q] = k(g), [M, Te] = k(null), [F, K] = k(null), we = He(null), ye = He(null), b = Ys(r, V), [Ye, Be] = k(""), [ue, B] = k(!1), [D, Se] = k(!1), [Ae, Oe] = k(!1), [Ze, xe] = k(""), [$e, be] = k(!1), [C, Ce] = k(null), [je, se] = k([]), [er, tr] = k([]), [m, R] = k([]), [j, W] = k(!1), [Y, z] = k(), [fe, te] = k(!0), [L, Q] = k(!1), [_e, ve] = k(!1), [re, ke] = k("standard"), [Z, ne] = k(!1), [Ie, v] = k(!1), [le, G] = k("card"), [J, X] = k(!1), [Je, pe] = k(!1), [Ue, ee] = k(!1), [At, rr] = k(null), [T, qe] = k(null), [ut, ft] = k(""), [$r, Lr] = k(!1), [Dr, co] = k(r == null ? void 0 : r.id), Ot = He(null);
3717
+ }, I = p.length, [V, q] = v(g), [M, Ee] = v(null), [F, K] = v(null), we = He(null), ye = He(null), k = Ys(r, V), [Ye, Me] = v(""), [ue, B] = v(!1), [D, Ne] = v(!1), [Te, Ae] = v(!1), [Ze, xe] = v(""), [je, be] = v(!1), [C, Se] = v(null), [Oe, se] = v([]), [rr, nr] = v([]), [m, R] = v([]), [j, W] = v(!1), [Y, z] = v(), [fe, te] = v(!0), [$, Q] = v(!1), [Ce, ve] = v(!1), [re, ke] = v("standard"), [Z, ne] = v(!1), [_e, b] = v(!1), [le, G] = v("card"), [J, X] = v(!1), [Je, pe] = v(!1), [Be, ee] = v(!1), [jt, or] = v(null), [T, Ue] = v(null), [ut, ft] = v(""), [$r, Dr] = v(!1), [Nt, uo] = v(r == null ? void 0 : r.id), Lt = He(null);
3718
3718
  me(() => {
3719
- const u = Vt(r), h = Math.min(
3719
+ const u = Jt(r), h = Math.min(
3720
3720
  Math.max(0, n || 0),
3721
3721
  Math.max(0, u.length - 1)
3722
3722
  );
3723
3723
  q(h);
3724
- const f = lo(r), w = gt(f), _ = wt(f);
3725
- we.current = w || null, ye.current = _ || null, Te(w || null), K(_ || null);
3724
+ const f = co(r), w = wt(f), _ = yt(f);
3725
+ we.current = w || null, ye.current = _ || null, Ee(w || null), K(_ || null);
3726
3726
  }, [n, r]), me(() => {
3727
- Ot.current && (Ot.current.scrollTop = Ot.current.scrollHeight);
3727
+ Lt.current && (Lt.current.scrollTop = Lt.current.scrollHeight);
3728
3728
  }, [
3729
- je,
3729
+ Oe,
3730
3730
  j,
3731
- L,
3732
- _e,
3731
+ $,
3732
+ Ce,
3733
3733
  Z,
3734
- Ie,
3734
+ _e,
3735
3735
  J,
3736
3736
  Je,
3737
- Ue,
3737
+ Be,
3738
3738
  ue,
3739
3739
  D
3740
3740
  ]);
3741
- const Ne = "var(--tanya)", nr = "var(--tanya-contrast)", jt = Ne, uo = "#804c9e", fo = () => {
3741
+ const mt = "var(--tanya)", zr = "var(--tanya-contrast)", $t = mt, qe = "#804c9e", fo = () => {
3742
3742
  console.log("AgenticShopping feedback:", {
3743
3743
  rating: T,
3744
3744
  comment: ut
3745
- }), Lr(!0);
3745
+ }), Dr(!0);
3746
3746
  }, mo = () => {
3747
- qe(null), ft(""), Lr(!0);
3748
- }, zr = (u) => {
3749
- const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? At;
3747
+ Ue(null), ft(""), Dr(!0);
3748
+ }, Mr = (u) => {
3749
+ const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? jt;
3750
3750
  return e ? /* @__PURE__ */ d("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
3751
3751
  /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ae, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3752
3752
  /* @__PURE__ */ d("div", { className: "text-sm w-full", children: [
@@ -3769,7 +3769,7 @@ const st = "USD", qs = (e, t = st) => {
3769
3769
  "button",
3770
3770
  {
3771
3771
  type: "button",
3772
- onClick: () => qe(w),
3772
+ onClick: () => Ue(w),
3773
3773
  className: "p-0.5",
3774
3774
  children: /* @__PURE__ */ a(
3775
3775
  ae,
@@ -3809,7 +3809,7 @@ const st = "USD", qs = (e, t = st) => {
3809
3809
  type: "button",
3810
3810
  onClick: fo,
3811
3811
  className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
3812
- style: { background: Ne },
3812
+ style: { background: mt },
3813
3813
  disabled: !T && !ut.trim(),
3814
3814
  children: "Submit"
3815
3815
  }
@@ -3825,7 +3825,7 @@ const st = "USD", qs = (e, t = st) => {
3825
3825
  } catch (u) {
3826
3826
  console.error("Error fetching addresses:", u);
3827
3827
  }
3828
- }, kt = (u, h) => {
3828
+ }, St = (u, h) => {
3829
3829
  se((f) => [
3830
3830
  ...f,
3831
3831
  {
@@ -3835,7 +3835,7 @@ const st = "USD", qs = (e, t = st) => {
3835
3835
  snapshotPayload: h
3836
3836
  }
3837
3837
  ]);
3838
- }, Mr = (u, h) => {
3838
+ }, Br = (u, h) => {
3839
3839
  se(
3840
3840
  (f) => f.map(
3841
3841
  (w) => w.response === "__CARD__" ? {
@@ -3852,33 +3852,33 @@ const st = "USD", qs = (e, t = st) => {
3852
3852
  (h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
3853
3853
  )
3854
3854
  );
3855
- }, $t = () => {
3856
- pe(!1), W(!1), ve(!1), v(!1), Q(!1), ne(!1), X(!1), ee(!1), be(!1), Ce(null), po(), B(!1), Se(!1);
3855
+ }, Dt = () => {
3856
+ pe(!1), W(!1), ve(!1), b(!1), Q(!1), ne(!1), X(!1), ee(!1), be(!1), Se(null), po(), B(!1), Ne(!1);
3857
3857
  }, go = () => {
3858
- W(!1), Q(!1), ve(!1), ke("standard"), ne(!1), v(!1), G("card"), X(!1), pe(!1), ee(!1), te(!0), Ce(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3859
- }, Lt = Kr(() => Vt(r).map((h, f) => ({
3858
+ W(!1), Q(!1), ve(!1), ke("standard"), ne(!1), b(!1), G("card"), X(!1), pe(!1), ee(!1), te(!0), Se(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3859
+ }, zt = Wr(() => Jt(r).map((h, f) => ({
3860
3860
  index: f,
3861
3861
  variant: h,
3862
3862
  images: ((h == null ? void 0 : h.images) || []).map((w) => (w == null ? void 0 : w.url) || "").filter(Boolean)
3863
- })), [r]), Nt = Kr(() => Lt.length ? !!((M || void 0) && (F || void 0)) : !1, [Lt, M, F, b]), wo = Ae || $e || !Nt, St = (u) => {
3863
+ })), [r]), Ct = Wr(() => zt.length ? !!((M || void 0) && (F || void 0)) : !1, [zt, M, F, k]), wo = Te || je || !Ct, _t = (u) => {
3864
3864
  const h = Number((u == null ? void 0 : u.quantity) ?? 1);
3865
3865
  return Number.isFinite(h) && h > 0 ? h : 1;
3866
- }, Br = (u) => {
3867
- const h = St(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3868
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(In(r, b) * h);
3869
3866
  }, Ur = (u) => {
3867
+ const h = _t(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3868
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Pn(r, k) * h);
3869
+ }, qr = (u) => {
3870
3870
  var E;
3871
- const h = C, f = Yt(b), w = u || (h == null ? void 0 : h.currency) || f.currency || st, _ = Br(h), $ = +(_ * 0.08).toFixed(2), H = ((E = nt[re]) == null ? void 0 : E.fee) || 0;
3872
- return { product_total: _, tax: $, shipping_fee: H, currency: w };
3873
- }, or = async (u, h, f) => {
3874
- Mr(), go(), Oe(!0), be(!0), B(!1), Se(!1);
3875
- const w = er.slice(-Pn);
3871
+ const h = C, f = Kt(k), w = u || (h == null ? void 0 : h.currency) || f.currency || st, _ = Ur(h), L = +(_ * 0.08).toFixed(2), H = ((E = nt[re]) == null ? void 0 : E.fee) || 0;
3872
+ return { product_total: _, tax: L, shipping_fee: H, currency: w };
3873
+ }, ar = async (u, h, f) => {
3874
+ Br(), go(), Ae(!0), be(!0), B(!1), Ne(!1);
3875
+ const w = rr.slice(-Fn);
3876
3876
  try {
3877
- const _ = await hr(null, null);
3877
+ const _ = await pr(null, null);
3878
3878
  if (!_) throw new Error("Failed to fetch token");
3879
- const $ = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), U = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3879
+ const L = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), U = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3880
3880
  registered: String(H || !1),
3881
- userId: String($ || (/* @__PURE__ */ new Date()).getTime())
3881
+ userId: String(L || (/* @__PURE__ */ new Date()).getTime())
3882
3882
  }).toString()}`, O = await fetch(`${U}`, {
3883
3883
  method: "POST",
3884
3884
  headers: {
@@ -3900,82 +3900,81 @@ const st = "USD", qs = (e, t = st) => {
3900
3900
  })
3901
3901
  });
3902
3902
  if (!O.body) throw new Error("Readable stream not supported");
3903
- const oe = O.body.getReader(), Pe = new TextDecoder();
3904
- let Le = "", De = "", et = "";
3903
+ const oe = O.body.getReader(), Ie = new TextDecoder();
3904
+ let Le = "", $e = "", et = "";
3905
3905
  for (; ; ) {
3906
- const { done: Ee, value: Ke } = await oe.read();
3907
- if (Ee) break;
3908
- Le += Pe.decode(Ke, { stream: !0 });
3909
- const mt = Le.split(`
3906
+ const { done: Fe, value: Ke } = await oe.read();
3907
+ if (Fe) break;
3908
+ Le += Ie.decode(Ke, { stream: !0 });
3909
+ const ht = Le.split(`
3910
3910
  `);
3911
- Le = mt.pop() || "";
3912
- for (const ht of mt) {
3913
- if (!ht.startsWith("data:")) continue;
3914
- const tt = ht.slice(5).trim();
3911
+ Le = ht.pop() || "";
3912
+ for (const pt of ht) {
3913
+ if (!pt.startsWith("data:")) continue;
3914
+ const tt = pt.slice(5).trim();
3915
3915
  try {
3916
- const Re = JSON.parse(tt), ze = Re.index, ce = Re.data;
3917
- ze === 0 ? De = String(ce ?? "") : ze === 1 && (et = String(ce ?? ""));
3916
+ const Re = JSON.parse(tt), De = Re.index, ce = Re.data;
3917
+ De === 0 ? $e = String(ce ?? "") : De === 1 && (et = String(ce ?? ""));
3918
3918
  } catch (Re) {
3919
3919
  console.error("Error parsing JSON chunk:", Re);
3920
3920
  }
3921
3921
  }
3922
3922
  }
3923
- let Fe = null;
3924
- if (De) {
3925
- const Ee = String(De).replace(/\\n/g, "").trim();
3926
- if (Ee.startsWith("{") && Ee.endsWith("}"))
3923
+ let Pe = null;
3924
+ if ($e) {
3925
+ const Fe = String($e).replace(/\\n/g, "").trim();
3926
+ if (Fe.startsWith("{") && Fe.endsWith("}"))
3927
3927
  try {
3928
- Fe = JSON.parse(Ee), Fe.product_id = h, Fe.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(Fe));
3928
+ Pe = JSON.parse(Fe), Pe.product_id = h, Pe.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(Pe));
3929
3929
  } catch (Ke) {
3930
3930
  console.log(Ke);
3931
3931
  }
3932
3932
  }
3933
- Ce(Fe), Fe && se((Ee) => [
3934
- ...Ee,
3933
+ Se(Pe), Pe && se((Fe) => [
3934
+ ...Fe,
3935
3935
  {
3936
3936
  query: "",
3937
3937
  response: "__CARD__",
3938
- snapshotPayload: { extractedDetails: Fe }
3938
+ snapshotPayload: { extractedDetails: Pe }
3939
3939
  }
3940
- ]), tr((Ee) => [
3941
- ...Ee,
3940
+ ]), nr((Fe) => [
3941
+ ...Fe,
3942
3942
  {
3943
3943
  userQuery: u,
3944
- mainResponse: De || "",
3944
+ mainResponse: $e || "",
3945
3945
  keywords: et || ""
3946
3946
  }
3947
- ].slice(-Pn));
3947
+ ].slice(-Fn));
3948
3948
  } catch (_) {
3949
3949
  console.error("Error sending message to Tanya:", _), be(!1);
3950
3950
  } finally {
3951
- Oe(!1);
3951
+ Ae(!1);
3952
3952
  }
3953
- }, qr = async (u) => {
3954
- if ($e || Ae || !Nt) return;
3953
+ }, Rr = async (u) => {
3954
+ if (je || Te || !Ct) return;
3955
3955
  const h = Ze.trim();
3956
3956
  if (!h) return;
3957
- se((w) => [...w, { query: h, response: "" }]), xe(""), Be(h);
3958
- const f = Dr || "";
3957
+ se((w) => [...w, { query: h, response: "" }]), xe(""), Me(h);
3958
+ const f = Nt || "";
3959
3959
  if (I <= 1) {
3960
3960
  if (f) {
3961
- or(h, f, V);
3961
+ ar(h, f, V);
3962
3962
  return;
3963
3963
  }
3964
- Se(!0), be(!0);
3964
+ Ne(!0), be(!0);
3965
3965
  return;
3966
3966
  }
3967
- f ? (B(!0), be(!0)) : (Se(!0), be(!0));
3967
+ f ? (B(!0), be(!0)) : (Ne(!0), be(!0));
3968
3968
  }, yo = () => {
3969
- const u = b == null ? void 0 : b.sku;
3970
- u && or(Ye, u, V);
3969
+ const u = Nt;
3970
+ u && ar(Ye, u, V);
3971
3971
  }, xo = () => {
3972
- B(!1), Se(!0), be(!0);
3972
+ B(!1), Ne(!0), be(!0);
3973
3973
  }, bo = () => {
3974
- if (!b || !b.sku) return;
3975
- const u = b.sku;
3976
- or(Ye, u, V);
3974
+ if (!Nt) return;
3975
+ ar(Ye, Nt, V);
3977
3976
  }, vo = async () => {
3978
- W(!0), ve(!1), v(!1), pe(!1), Q(!1), ne(!1), X(!1), ee(!1), await ho(), Mr("initial", {
3977
+ W(!0), ve(!1), b(!1), pe(!1), Q(!1), ne(!1), X(!1), ee(!1), await ho(), Br("initial", {
3979
3978
  extractedDetails: C ?? void 0
3980
3979
  });
3981
3980
  }, ko = () => {
@@ -3983,16 +3982,16 @@ const st = "USD", qs = (e, t = st) => {
3983
3982
  const u = m.find(
3984
3983
  (h) => String(h.addressId ?? h.id) === Y
3985
3984
  ) || null;
3986
- u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), Q(!0), ve(!0), ne(!1), v(!1), X(!1), pe(!1), ee(!1), kt("address", u));
3985
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), Q(!0), ve(!0), ne(!1), b(!1), X(!1), pe(!1), ee(!1), St("address", u));
3987
3986
  }, No = () => {
3988
- Q(!1), ve(!1), ne(!1), v(!1), X(!1), pe(!1), ee(!1), localStorage.removeItem("agentic_order_address");
3987
+ Q(!1), ve(!1), ne(!1), b(!1), X(!1), pe(!1), ee(!1), localStorage.removeItem("agentic_order_address");
3989
3988
  }, So = () => {
3990
- re && (localStorage.setItem("agentic_order_delivery", re), ne(!0), v(!0), X(!1), pe(!1), ee(!1), kt("delivery", {
3989
+ re && (localStorage.setItem("agentic_order_delivery", re), ne(!0), b(!0), X(!1), pe(!1), ee(!1), St("delivery", {
3991
3990
  method: re,
3992
3991
  ...nt[re]
3993
3992
  }));
3994
- }, Rr = () => {
3995
- ve(!1), ne(!1), v(!1), X(!1), pe(!1), ee(!1), be(!1), $t(), se((u) => [
3993
+ }, Hr = () => {
3994
+ ve(!1), ne(!1), b(!1), X(!1), pe(!1), ee(!1), be(!1), Dt(), se((u) => [
3996
3995
  ...u,
3997
3996
  {
3998
3997
  query: "",
@@ -4003,11 +4002,11 @@ const st = "USD", qs = (e, t = st) => {
4003
4002
  }
4004
4003
  ]);
4005
4004
  }, Co = () => {
4006
- ne(!1), v(!1), X(!1), pe(!1), ee(!1), localStorage.removeItem("agentic_order_delivery");
4005
+ ne(!1), b(!1), X(!1), pe(!1), ee(!1), localStorage.removeItem("agentic_order_delivery");
4007
4006
  }, _o = () => {
4008
- le && (localStorage.setItem("agentic_order_payment", le), X(!0), pe(!0), ee(!1), kt("payment", { method: le }));
4007
+ le && (localStorage.setItem("agentic_order_payment", le), X(!0), pe(!0), ee(!1), St("payment", { method: le }));
4009
4008
  }, Io = () => {
4010
- v(!1), X(!1), pe(!1), ee(!1), be(!1), $t(), se((u) => [
4009
+ b(!1), X(!1), pe(!1), ee(!1), be(!1), Dt(), se((u) => [
4011
4010
  ...u,
4012
4011
  {
4013
4012
  query: "",
@@ -4021,22 +4020,22 @@ const st = "USD", qs = (e, t = st) => {
4021
4020
  X(!1), pe(!1), ee(!1), localStorage.removeItem("agentic_order_payment");
4022
4021
  }, Fo = async () => {
4023
4022
  try {
4024
- Oe(!0);
4023
+ Ae(!0);
4025
4024
  const u = C || {}, h = JSON.parse(
4026
4025
  localStorage.getItem("agentic_order_address") || "null"
4027
4026
  ), f = localStorage.getItem(
4028
4027
  "agentic_order_delivery"
4029
- ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: _, tax: $, shipping_fee: H, currency: E } = Ur(), U = u.shopper_id || localStorage.getItem("customerId") || void 0, O = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, oe = f ? Vs[f] : "GROUND", Pe = "card-visa", Le = b == null ? void 0 : b.sku, De = (r == null ? void 0 : r.id) || "", et = St(u), Fe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(_ * 100), mt = {
4028
+ ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: _, tax: L, shipping_fee: H, currency: E } = qr(), U = u.shopper_id || localStorage.getItem("customerId") || void 0, O = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, oe = f ? Vs[f] : "GROUND", Ie = "card-visa", Le = k == null ? void 0 : k.sku, $e = (r == null ? void 0 : r.id) || "", et = _t(u), Pe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(_ * 100), ht = {
4030
4029
  shopper_id: U,
4031
4030
  shipping_address_id: O,
4032
4031
  shipping_method_id: oe,
4033
- payment_method_id: Pe,
4032
+ payment_method_id: Ie,
4034
4033
  sku: Le,
4035
4034
  platform: "SFCC",
4036
4035
  storeCode: "Sites-SiteGenesis-Site",
4037
- product_id: De,
4036
+ product_id: $e,
4038
4037
  quantity: et,
4039
- max_price_minor: Fe,
4038
+ max_price_minor: Pe,
4040
4039
  currency: E,
4041
4040
  instruction_text: Ye
4042
4041
  };
@@ -4049,49 +4048,49 @@ const st = "USD", qs = (e, t = st) => {
4049
4048
  }
4050
4049
  ), alert(
4051
4050
  "Missing customer or address information. Please re-select address and try again."
4052
- ), Oe(!1);
4051
+ ), Ae(!1);
4053
4052
  return;
4054
4053
  }
4055
- const tt = (await vt()).access_token;
4054
+ const tt = (await kt()).access_token;
4056
4055
  if (!tt)
4057
4056
  throw new Error("Failed to fetch auth token for intent-mandate");
4058
- const { serverUrl: Re } = it(), ze = await fetch(`${Re}/api/intent-mandate`, {
4057
+ const { serverUrl: Re } = it(), De = await fetch(`${Re}/api/intent-mandate`, {
4059
4058
  method: "POST",
4060
4059
  headers: {
4061
4060
  "Content-Type": "application/json",
4062
4061
  Authorization: `Bearer ${tt}`
4063
4062
  },
4064
- body: JSON.stringify(mt)
4063
+ body: JSON.stringify(ht)
4065
4064
  });
4066
- if (!ze.ok) {
4067
- const $o = await ze.text().catch(() => "");
4068
- console.error("intent-mandate failed", ze.status, $o), alert(
4065
+ if (!De.ok) {
4066
+ const Lo = await De.text().catch(() => "");
4067
+ console.error("intent-mandate failed", De.status, Lo), alert(
4069
4068
  "Something went wrong while saving your smart order. Please try again."
4070
- ), Oe(!1);
4069
+ ), Ae(!1);
4071
4070
  return;
4072
4071
  }
4073
- const ce = await ze.json().catch(() => null);
4072
+ const ce = await De.json().catch(() => null);
4074
4073
  console.log("intent-mandate success:", ce);
4075
4074
  const rt = (ce == null ? void 0 : ce.intent_mandate_id) || (ce == null ? void 0 : ce.intent_mandateId) || (ce == null ? void 0 : ce.key) || null;
4076
- rt && rr(rt);
4077
- const Dt = {
4075
+ rt && or(rt);
4076
+ const Mt = {
4078
4077
  ...u,
4079
4078
  address: h,
4080
4079
  delivery: f,
4081
4080
  payment: w,
4082
- summary: { product_total: _, tax: $, shipping_fee: H, currency: E },
4081
+ summary: { product_total: _, tax: L, shipping_fee: H, currency: E },
4083
4082
  intent_mandate_id: rt
4084
4083
  };
4085
- localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), ee(!0), te(!1), kt("final", Dt), kt("success", { intentMandateId: rt }), $t();
4084
+ localStorage.setItem("agentic_order_final", JSON.stringify(Mt)), ee(!0), te(!1), St("final", Mt), St("success", { intentMandateId: rt }), Dt();
4086
4085
  } catch (u) {
4087
4086
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4088
4087
  "Unable to complete your smart order right now. Please try again in a moment."
4089
4088
  );
4090
4089
  } finally {
4091
- Oe(!1);
4090
+ Ae(!1);
4092
4091
  }
4093
- }, Hr = () => {
4094
- $t(), se((u) => [
4092
+ }, Vr = () => {
4093
+ Dt(), se((u) => [
4095
4094
  ...u,
4096
4095
  {
4097
4096
  query: "",
@@ -4103,7 +4102,7 @@ const st = "USD", qs = (e, t = st) => {
4103
4102
  ]);
4104
4103
  }, Eo = ({ selectedIndex: u }) => {
4105
4104
  var O;
4106
- const h = ((O = y[u]) == null ? void 0 : O.images.large[0].link) || Cn(r, b), f = _n(r), w = Dr || "", _ = gt(b) || "", $ = wt(b) || "", { amount: H } = Yt(b), E = !!(r != null && r.id), U = E;
4105
+ const h = ((O = y[u]) == null ? void 0 : O.images.large[0].link) || _n(r, k), f = In(r), w = Nt || "", _ = wt(k) || "", L = yt(k) || "", { amount: H } = Kt(k), E = !!(r != null && r.id), U = E;
4107
4106
  return /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ d("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4108
4107
  /* @__PURE__ */ a("div", { className: "flex-shrink-0 flex justify-center sm:justify-start", children: /* @__PURE__ */ a("div", { className: "w-[150px] h-[150px] rounded-lg bg-gray-50 border border-gray-200 flex items-center justify-center overflow-hidden", children: h ? /* @__PURE__ */ a(
4109
4108
  "img",
@@ -4125,7 +4124,7 @@ const st = "USD", qs = (e, t = st) => {
4125
4124
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700 mb-1", children: [
4126
4125
  w && `SKU: ${w}`,
4127
4126
  _ && `Color: ${_}`,
4128
- $ && `Size: ${$}`
4127
+ L && `Size: ${L}`
4129
4128
  ].filter(Boolean).join(" • ") || "—" }),
4130
4129
  /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: E ? (
4131
4130
  // ? formatCurrency(Number(unitPrice) || 0, CURRENCY_PREF)
@@ -4134,13 +4133,13 @@ const st = "USD", qs = (e, t = st) => {
4134
4133
  E && !U && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4135
4134
  ] })
4136
4135
  ] }) });
4137
- }, Vr = ({
4136
+ }, Yr = ({
4138
4137
  showSubmit: u = !0
4139
4138
  }) => {
4140
4139
  const h = {};
4141
- Lt.map((w) => gt(w.variant)).filter((w) => !!w && !h[w] && (h[w] = !0));
4140
+ zt.map((w) => wt(w.variant)).filter((w) => !!w && !h[w] && (h[w] = !0));
4142
4141
  const f = {};
4143
- return Lt.map((w) => wt(w.variant)).filter((w) => !!w && !f[w] && (f[w] = !0)), /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4142
+ return zt.map((w) => yt(w.variant)).filter((w) => !!w && !f[w] && (f[w] = !0)), /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4144
4143
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4145
4144
  /* @__PURE__ */ d("div", { className: "mt-4", children: [
4146
4145
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
@@ -4148,7 +4147,7 @@ const st = "USD", qs = (e, t = st) => {
4148
4147
  M && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: M })
4149
4148
  ] }),
4150
4149
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: y.map((w, _) => {
4151
- const $ = w.name, H = M === $, E = w.images.large[0].disBaseLink || w.images.large[0].link;
4150
+ const L = w.name, H = M === L, E = w.images.large[0].disBaseLink || w.images.large[0].link;
4152
4151
  return /* @__PURE__ */ a(
4153
4152
  "div",
4154
4153
  {
@@ -4158,22 +4157,22 @@ const st = "USD", qs = (e, t = st) => {
4158
4157
  "button",
4159
4158
  {
4160
4159
  onClick: () => {
4161
- Te($), K(null), q(null), S(_);
4160
+ Ee(L), K(null), q(null), S(_);
4162
4161
  },
4163
4162
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4164
- title: $,
4163
+ title: L,
4165
4164
  children: E ? /* @__PURE__ */ a(
4166
4165
  "img",
4167
4166
  {
4168
4167
  src: E,
4169
- alt: $,
4168
+ alt: L,
4170
4169
  className: "w/full h-full object-contain"
4171
4170
  }
4172
- ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children: $ })
4171
+ ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children: L })
4173
4172
  }
4174
4173
  )
4175
4174
  },
4176
- $
4175
+ L
4177
4176
  );
4178
4177
  }) })
4179
4178
  ] }),
@@ -4186,13 +4185,13 @@ const st = "USD", qs = (e, t = st) => {
4186
4185
  const w = y.find(
4187
4186
  (_) => _.name === M
4188
4187
  );
4189
- return w ? w.variants.map((_, $) => {
4188
+ return w ? w.variants.map((_, L) => {
4190
4189
  const H = _.name;
4191
4190
  return /* @__PURE__ */ a(
4192
4191
  "button",
4193
4192
  {
4194
4193
  onClick: () => {
4195
- K(H), q($), co(_.productId);
4194
+ K(H), q(L), uo(_.productId);
4196
4195
  },
4197
4196
  className: `px-4 py-2 rounded-md border text-sm ${F === H ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4198
4197
  title: H,
@@ -4208,28 +4207,28 @@ const st = "USD", qs = (e, t = st) => {
4208
4207
  {
4209
4208
  onClick: bo,
4210
4209
  className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
4211
- style: { background: Ne },
4212
- disabled: !Nt,
4210
+ style: { background: qe },
4211
+ disabled: !Ct,
4213
4212
  children: "Submit"
4214
4213
  }
4215
4214
  ) })
4216
4215
  ] });
4217
- }, Yr = (u, h = !0) => {
4216
+ }, Jr = (u, h = !0) => {
4218
4217
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4219
4218
  const f = (u == null ? void 0 : u.extractedDetails) || C;
4220
4219
  if (!f) return null;
4221
- const w = St(f), { currency: _ } = Yt(b), $ = In(r, b), H = Number((f == null ? void 0 : f.max_price_minor) ?? 0), U = Number.isFinite(H) && H > 0 ? +(H / 100) : +($ * w), O = (f == null ? void 0 : f.currency) || _ || st, oe = b != null && b.sku ? b.sku : f.product_id;
4220
+ const w = _t(f), { currency: _ } = Kt(k), L = Pn(r, k), H = Number((f == null ? void 0 : f.max_price_minor) ?? 0), U = Number.isFinite(H) && H > 0 ? +(H / 100) : +(L * w), O = (f == null ? void 0 : f.currency) || _ || st, oe = k != null && k.sku ? k.sku : f.product_id;
4222
4221
  return /* @__PURE__ */ d(
4223
4222
  "div",
4224
4223
  {
4225
4224
  className: "px-6 pb-6 flex flex-col items-center space-y-4",
4226
- style: { backgroundColor: "#14377D" },
4225
+ style: { backgroundColor: "#e5dbeb" },
4227
4226
  children: [
4228
4227
  /* @__PURE__ */ a(
4229
4228
  "p",
4230
4229
  {
4231
4230
  className: "text-base font-semibold text-center mt-2",
4232
- style: { color: nr },
4231
+ style: { color: zr },
4233
4232
  children: "Here’s what I found from your instruction:"
4234
4233
  }
4235
4234
  ),
@@ -4238,24 +4237,24 @@ const st = "USD", qs = (e, t = st) => {
4238
4237
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4239
4238
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: oe }),
4240
4239
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4241
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: St(f) }),
4240
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: _t(f) }),
4242
4241
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4243
4242
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: O }),
4244
4243
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4245
4244
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Qe(U, O) })
4246
4245
  ] }),
4247
4246
  /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4248
- gt(b) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4247
+ wt(k) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4249
4248
  "Color: ",
4250
- gt(b)
4249
+ wt(k)
4251
4250
  ] }),
4252
- wt(b) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4251
+ yt(k) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4253
4252
  "Size: ",
4254
- wt(b)
4253
+ yt(k)
4255
4254
  ] }),
4256
- (b == null ? void 0 : b.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4255
+ (k == null ? void 0 : k.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4257
4256
  "SKU: ",
4258
- b.sku
4257
+ k.sku
4259
4258
  ] })
4260
4259
  ] })
4261
4260
  ] }),
@@ -4264,7 +4263,7 @@ const st = "USD", qs = (e, t = st) => {
4264
4263
  "p",
4265
4264
  {
4266
4265
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
4267
- style: { color: nr },
4266
+ style: { color: zr },
4268
4267
  children: [
4269
4268
  "Would you like me to ",
4270
4269
  /* @__PURE__ */ a("strong", { children: "lock this in" }),
@@ -4279,7 +4278,7 @@ const st = "USD", qs = (e, t = st) => {
4279
4278
  onClick: vo,
4280
4279
  disabled: j,
4281
4280
  className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${j ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4282
- style: { background: `${Ne}` },
4281
+ style: { background: qe },
4283
4282
  children: [
4284
4283
  /* @__PURE__ */ a(
4285
4284
  ae,
@@ -4297,10 +4296,10 @@ const st = "USD", qs = (e, t = st) => {
4297
4296
  /* @__PURE__ */ d(
4298
4297
  "button",
4299
4298
  {
4300
- onClick: Hr,
4299
+ onClick: Vr,
4301
4300
  disabled: j,
4302
4301
  className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${j ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4303
- style: { borderColor: Ne, color: nr },
4302
+ style: { borderColor: qe, color: qe },
4304
4303
  children: [
4305
4304
  /* @__PURE__ */ a(
4306
4305
  ae,
@@ -4320,15 +4319,15 @@ const st = "USD", qs = (e, t = st) => {
4320
4319
  ]
4321
4320
  }
4322
4321
  );
4323
- }, Jr = (u, h = !0) => {
4324
- var ht, tt, Re, ze, ce, rt;
4325
- const f = u || {}, w = ((ht = f == null ? void 0 : f.summary) == null ? void 0 : ht.currency) || (C == null ? void 0 : C.currency) || st, _ = Cn(r, b), $ = _n(r), H = b != null && b.sku ? b.sku : (r == null ? void 0 : r.id) ?? (C == null ? void 0 : C.product_id), E = (b == null ? void 0 : b.sku) ?? Ks(r), U = gt(b) || Ws(r), O = wt(b) || Qs(r), oe = St(f), Pe = ((tt = f == null ? void 0 : f.summary) == null ? void 0 : tt.product_total) != null ? +f.summary.product_total : Br(f), Le = oe > 0 ? +(Pe / oe).toFixed(2) : 0, De = Pe, et = ((Re = f == null ? void 0 : f.summary) == null ? void 0 : Re.tax) ?? +(Pe * 0.08).toFixed(2), Fe = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((ce = nt[re]) == null ? void 0 : ce.fee) || 0), Ee = f != null && f.address ? [
4322
+ }, Kr = (u, h = !0) => {
4323
+ var pt, tt, Re, De, ce, rt;
4324
+ const f = u || {}, w = ((pt = f == null ? void 0 : f.summary) == null ? void 0 : pt.currency) || (C == null ? void 0 : C.currency) || st, _ = _n(r, k), L = In(r), H = k != null && k.sku ? k.sku : (r == null ? void 0 : r.id) ?? (C == null ? void 0 : C.product_id), E = (k == null ? void 0 : k.sku) ?? Ks(r), U = wt(k) || Ws(r), O = yt(k) || Qs(r), oe = _t(f), Ie = ((tt = f == null ? void 0 : f.summary) == null ? void 0 : tt.product_total) != null ? +f.summary.product_total : Ur(f), Le = oe > 0 ? +(Ie / oe).toFixed(2) : 0, $e = Ie, et = ((Re = f == null ? void 0 : f.summary) == null ? void 0 : Re.tax) ?? +(Ie * 0.08).toFixed(2), Pe = ((De = f == null ? void 0 : f.summary) == null ? void 0 : De.shipping_fee) ?? (((ce = nt[re]) == null ? void 0 : ce.fee) || 0), Fe = f != null && f.address ? [
4326
4325
  f.address.addressLine1,
4327
4326
  f.address.addressLine2,
4328
4327
  f.address.street,
4329
4328
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4330
4329
  f.address.country
4331
- ].filter(Boolean).map((Dt) => We(String(Dt))).join(", ") : "—", Ke = (f == null ? void 0 : f.payment) || "card", mt = Ke === "card" ? /* @__PURE__ */ d(ge, { children: [
4330
+ ].filter(Boolean).map((Mt) => We(String(Mt))).join(", ") : "—", Ke = (f == null ? void 0 : f.payment) || "card", ht = Ke === "card" ? /* @__PURE__ */ d(ge, { children: [
4332
4331
  "Credit Card — Mastercard",
4333
4332
  /* @__PURE__ */ a("br", {}),
4334
4333
  "•••• 7820 Exp: 12/26"
@@ -4340,7 +4339,7 @@ const st = "USD", qs = (e, t = st) => {
4340
4339
  {
4341
4340
  icon: "mdi:receipt-text-check-outline",
4342
4341
  width: "24",
4343
- color: Ne
4342
+ color: mt
4344
4343
  }
4345
4344
  ),
4346
4345
  "All set! Here’s what your smart order looks like 🧾"
@@ -4350,7 +4349,7 @@ const st = "USD", qs = (e, t = st) => {
4350
4349
  "img",
4351
4350
  {
4352
4351
  src: _,
4353
- alt: $,
4352
+ alt: L,
4354
4353
  className: "w-full h-full object-contain"
4355
4354
  }
4356
4355
  ) : /* @__PURE__ */ a(
@@ -4363,7 +4362,7 @@ const st = "USD", qs = (e, t = st) => {
4363
4362
  ) }) }),
4364
4363
  /* @__PURE__ */ d("div", { className: "sm:col-span-10", children: [
4365
4364
  /* @__PURE__ */ d("div", { className: "mb-3", children: [
4366
- /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: $ }),
4365
+ /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: L }),
4367
4366
  /* @__PURE__ */ d("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4368
4367
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4369
4368
  " ",
@@ -4400,7 +4399,7 @@ const st = "USD", qs = (e, t = st) => {
4400
4399
  ] }),
4401
4400
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4402
4401
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4403
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Qe(De, w) })
4402
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Qe($e, w) })
4404
4403
  ] })
4405
4404
  ] })
4406
4405
  ] })
@@ -4409,11 +4408,11 @@ const st = "USD", qs = (e, t = st) => {
4409
4408
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4410
4409
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4411
4410
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
4412
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: Ee })
4411
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: Fe })
4413
4412
  ] }),
4414
4413
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4415
4414
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4416
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: mt })
4415
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ht })
4417
4416
  ] }),
4418
4417
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4419
4418
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
@@ -4423,7 +4422,7 @@ const st = "USD", qs = (e, t = st) => {
4423
4422
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4424
4423
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4425
4424
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4426
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Qe(Pe, w) })
4425
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Qe(Ie, w) })
4427
4426
  ] }),
4428
4427
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4429
4428
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
@@ -4431,40 +4430,40 @@ const st = "USD", qs = (e, t = st) => {
4431
4430
  ] }),
4432
4431
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4433
4432
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4434
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Qe(Fe, w) })
4433
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Qe(Pe, w) })
4435
4434
  ] })
4436
4435
  ] }),
4437
4436
  /* @__PURE__ */ d(
4438
4437
  "div",
4439
4438
  {
4440
4439
  className: "mt-4 rounded-xl p-4 text-center text-white shadow-sm",
4441
- style: { background: jt },
4440
+ style: { background: $t },
4442
4441
  children: [
4443
4442
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4444
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: Qe(Pe + et + Fe, w) })
4443
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: Qe(Ie + et + Pe, w) })
4445
4444
  ]
4446
4445
  }
4447
4446
  )
4448
4447
  ] }),
4449
4448
  !h && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
4450
- !Ue && /* @__PURE__ */ a("p", { className: "mt-3 text-center text-sm text-gray-700", children: "Everything looks good! Do you want me to watch this product and buy it automatically when it meets your condition?" }),
4451
- Ue && zr({ intentMandateId: At }),
4452
- fe && !Ue && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4449
+ !Be && /* @__PURE__ */ a("p", { className: "mt-3 text-center text-sm text-gray-700", children: "Everything looks good! Do you want me to watch this product and buy it automatically when it meets your condition?" }),
4450
+ Be && Mr({ intentMandateId: jt }),
4451
+ fe && !Be && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4453
4452
  /* @__PURE__ */ a(
4454
4453
  "button",
4455
4454
  {
4456
4455
  onClick: Fo,
4457
4456
  className: "inline-flex items-center justify-center rounded-full px-6 py-2.5 font-semibold text-white shadow-md transition-transform duration-150 hover:-translate-y-0.5 hover:shadow-lg",
4458
- style: { background: jt },
4457
+ style: { background: $t },
4459
4458
  children: "Confirm"
4460
4459
  }
4461
4460
  ),
4462
4461
  /* @__PURE__ */ a(
4463
4462
  "button",
4464
4463
  {
4465
- onClick: Hr,
4464
+ onClick: Vr,
4466
4465
  className: "inline-flex items-center justify-center rounded-full border px-6 py-2.5 font-semibold hover:bg-gray-50",
4467
- style: { borderColor: jt, color: jt },
4466
+ style: { borderColor: $t, color: $t },
4468
4467
  children: "Cancel"
4469
4468
  }
4470
4469
  )
@@ -4487,7 +4486,7 @@ const st = "USD", qs = (e, t = st) => {
4487
4486
  style: { backgroundColor: "var(--tanya-light)" },
4488
4487
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4489
4488
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4490
- /* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: Ne }),
4489
+ /* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: mt }),
4491
4490
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4492
4491
  ] }),
4493
4492
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
@@ -4503,7 +4502,7 @@ const st = "USD", qs = (e, t = st) => {
4503
4502
  style: { backgroundColor: "var(--tanya-light)" },
4504
4503
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4505
4504
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4506
- /* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: Ne }),
4505
+ /* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: mt }),
4507
4506
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4508
4507
  ] }),
4509
4508
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(ge, { children: [
@@ -4530,7 +4529,7 @@ const st = "USD", qs = (e, t = st) => {
4530
4529
  {
4531
4530
  icon: "mdi:credit-card-outline",
4532
4531
  width: "20",
4533
- color: Ne
4532
+ color: mt
4534
4533
  }
4535
4534
  ),
4536
4535
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
@@ -4545,11 +4544,11 @@ const st = "USD", qs = (e, t = st) => {
4545
4544
  );
4546
4545
  }, jo = (u, h) => {
4547
4546
  const f = u.snapshotStage;
4548
- if (!f || f === "address" && j || f === "delivery" && _e || f === "payment" && Ie || f === "final" && Je)
4547
+ if (!f || f === "address" && j || f === "delivery" && Ce || f === "payment" && _e || f === "final" && Je)
4549
4548
  return null;
4550
4549
  switch (f) {
4551
4550
  case "initial":
4552
- return Yr(u.snapshotPayload, !h);
4551
+ return Jr(u.snapshotPayload, !h);
4553
4552
  case "address":
4554
4553
  return To(u.snapshotPayload);
4555
4554
  case "delivery":
@@ -4557,9 +4556,9 @@ const st = "USD", qs = (e, t = st) => {
4557
4556
  case "payment":
4558
4557
  return Oo(u.snapshotPayload);
4559
4558
  case "final":
4560
- return Jr(u.snapshotPayload, !h);
4559
+ return Kr(u.snapshotPayload, !h);
4561
4560
  case "success":
4562
- return zr(u.snapshotPayload);
4561
+ return Mr(u.snapshotPayload);
4563
4562
  default:
4564
4563
  return null;
4565
4564
  }
@@ -4591,7 +4590,7 @@ const st = "USD", qs = (e, t = st) => {
4591
4590
  borderTopLeftRadius: "0.75rem",
4592
4591
  borderBottomLeftRadius: "0.75rem",
4593
4592
  padding: "0.25rem",
4594
- background: uo
4593
+ background: qe
4595
4594
  },
4596
4595
  children: [
4597
4596
  /* @__PURE__ */ d(
@@ -4655,7 +4654,7 @@ const st = "USD", qs = (e, t = st) => {
4655
4654
  /* @__PURE__ */ d(
4656
4655
  "div",
4657
4656
  {
4658
- ref: Ot,
4657
+ ref: Lt,
4659
4658
  className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
4660
4659
  children: [
4661
4660
  /* @__PURE__ */ d(
@@ -4675,10 +4674,10 @@ const st = "USD", qs = (e, t = st) => {
4675
4674
  }
4676
4675
  ),
4677
4676
  /* @__PURE__ */ a(Eo, { selectedIndex: P }),
4678
- I > 1 && /* @__PURE__ */ a(Vr, { showSubmit: !1 }),
4679
- je.map((u, h) => {
4677
+ I > 1 && /* @__PURE__ */ a(Yr, { showSubmit: !1 }),
4678
+ Oe.map((u, h) => {
4680
4679
  var _;
4681
- const f = h === je.length - 1, w = !!u.snapshotStage;
4680
+ const f = h === Oe.length - 1, w = !!u.snapshotStage;
4682
4681
  return /* @__PURE__ */ d("div", { children: [
4683
4682
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
4684
4683
  "p",
@@ -4718,7 +4717,7 @@ const st = "USD", qs = (e, t = st) => {
4718
4717
  {
4719
4718
  onClick: yo,
4720
4719
  className: "px-5 py-2 rounded-full text-white font-semibold",
4721
- style: { background: Ne },
4720
+ style: { background: qe },
4722
4721
  children: "Yes"
4723
4722
  }
4724
4723
  ),
@@ -4728,16 +4727,16 @@ const st = "USD", qs = (e, t = st) => {
4728
4727
  onClick: xo,
4729
4728
  className: "px-5 py-2 rounded-full font-semibold border",
4730
4729
  style: {
4731
- borderColor: Ne,
4732
- color: Ne
4730
+ borderColor: qe,
4731
+ color: qe
4733
4732
  },
4734
4733
  children: "No, change SKU"
4735
4734
  }
4736
4735
  )
4737
4736
  ] })
4738
4737
  ] }),
4739
- f && D && /* @__PURE__ */ a(Vr, { showSubmit: !0 }),
4740
- f && Ae && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4738
+ f && D && /* @__PURE__ */ a(Yr, { showSubmit: !0 }),
4739
+ f && Te && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4741
4740
  "div",
4742
4741
  {
4743
4742
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4748,7 +4747,7 @@ const st = "USD", qs = (e, t = st) => {
4748
4747
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 tanya-pulse-text", children: /* @__PURE__ */ a("p", { children: "Reading your instruction and setting things up…" }) })
4749
4748
  }
4750
4749
  ) }),
4751
- (w || u.response === "__CARD__") && (!Ae || !f) && /* @__PURE__ */ a(
4750
+ (w || u.response === "__CARD__") && (!Te || !f) && /* @__PURE__ */ a(
4752
4751
  "div",
4753
4752
  {
4754
4753
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4758,7 +4757,7 @@ const st = "USD", qs = (e, t = st) => {
4758
4757
  boxShadow: "0 2px 8px rgba(0,0,0,0.08)",
4759
4758
  overflow: "hidden"
4760
4759
  },
4761
- children: w ? jo(u, f) : Yr(
4760
+ children: w ? jo(u, f) : Jr(
4762
4761
  u.snapshotPayload,
4763
4762
  !1
4764
4763
  )
@@ -4779,9 +4778,9 @@ const st = "USD", qs = (e, t = st) => {
4779
4778
  ),
4780
4779
  "Select a Delivery Address"
4781
4780
  ] }),
4782
- L && /* @__PURE__ */ d(ge, { children: [
4781
+ $ && /* @__PURE__ */ d(ge, { children: [
4783
4782
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4784
- !Ue && /* @__PURE__ */ a(
4783
+ !Be && /* @__PURE__ */ a(
4785
4784
  "button",
4786
4785
  {
4787
4786
  onClick: No,
@@ -4809,15 +4808,15 @@ const st = "USD", qs = (e, t = st) => {
4809
4808
  ] }) : m.length > 0 ? /* @__PURE__ */ d(
4810
4809
  "div",
4811
4810
  {
4812
- className: `space-y-3 ${L ? "opacity-70" : ""}`,
4811
+ className: `space-y-3 ${$ ? "opacity-70" : ""}`,
4813
4812
  children: [
4814
4813
  m.map((u) => {
4815
- const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((E) => We(E || "")).join(" "), f = We(u.city || ""), w = `${We(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, _ = We(u.country || ""), $ = String(u.addressId ?? u.id), H = Y === $;
4814
+ const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((E) => We(E || "")).join(" "), f = We(u.city || ""), w = `${We(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, _ = We(u.country || ""), L = String(u.addressId ?? u.id), H = Y === L;
4816
4815
  return /* @__PURE__ */ d(
4817
4816
  "label",
4818
4817
  {
4819
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${H ? "border-tanya-light" : "border-gray-300"} ${L ? "pointer-events-none" : ""}`,
4820
- title: L ? "Address already submitted" : "",
4818
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${H ? "border-tanya-light" : "border-gray-300"} ${$ ? "pointer-events-none" : ""}`,
4819
+ title: $ ? "Address already submitted" : "",
4821
4820
  children: [
4822
4821
  /* @__PURE__ */ a(
4823
4822
  "input",
@@ -4826,9 +4825,9 @@ const st = "USD", qs = (e, t = st) => {
4826
4825
  name: "address",
4827
4826
  className: "mt-1 accent-tanya-light",
4828
4827
  checked: H,
4829
- disabled: L,
4830
- onChange: () => z($),
4831
- value: $
4828
+ disabled: $,
4829
+ onChange: () => z(L),
4830
+ value: L
4832
4831
  }
4833
4832
  ),
4834
4833
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
@@ -4843,14 +4842,14 @@ const st = "USD", qs = (e, t = st) => {
4843
4842
  ] })
4844
4843
  ]
4845
4844
  },
4846
- $
4845
+ L
4847
4846
  );
4848
4847
  }),
4849
4848
  /* @__PURE__ */ d("div", { className: "flex justify-between pt-2", children: [
4850
4849
  /* @__PURE__ */ a(
4851
4850
  "button",
4852
4851
  {
4853
- onClick: Rr,
4852
+ onClick: Hr,
4854
4853
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
4855
4854
  style: {
4856
4855
  borderColor: "var(--tanya-light)",
@@ -4863,10 +4862,10 @@ const st = "USD", qs = (e, t = st) => {
4863
4862
  "button",
4864
4863
  {
4865
4864
  onClick: ko,
4866
- disabled: L,
4867
- className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${L ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4868
- style: { background: Ne },
4869
- children: L ? "Address Submitted" : "Submit Address"
4865
+ disabled: $,
4866
+ className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${$ ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4867
+ style: { background: qe },
4868
+ children: $ ? "Address Submitted" : "Submit Address"
4870
4869
  }
4871
4870
  )
4872
4871
  ] })
@@ -4874,7 +4873,7 @@ const st = "USD", qs = (e, t = st) => {
4874
4873
  }
4875
4874
  ) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
4876
4875
  ] }),
4877
- _e && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4876
+ Ce && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4878
4877
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4879
4878
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4880
4879
  /* @__PURE__ */ a(
@@ -4889,7 +4888,7 @@ const st = "USD", qs = (e, t = st) => {
4889
4888
  ] }),
4890
4889
  Z && /* @__PURE__ */ d(ge, { children: [
4891
4890
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4892
- !Ue && /* @__PURE__ */ a(
4891
+ !Be && /* @__PURE__ */ a(
4893
4892
  "button",
4894
4893
  {
4895
4894
  onClick: Co,
@@ -4953,7 +4952,7 @@ const st = "USD", qs = (e, t = st) => {
4953
4952
  /* @__PURE__ */ a(
4954
4953
  "button",
4955
4954
  {
4956
- onClick: Rr,
4955
+ onClick: Hr,
4957
4956
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
4958
4957
  style: {
4959
4958
  borderColor: "var(--tanya-light)",
@@ -4974,7 +4973,7 @@ const st = "USD", qs = (e, t = st) => {
4974
4973
  )
4975
4974
  ] })
4976
4975
  ] }),
4977
- Ie && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4976
+ _e && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4978
4977
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4979
4978
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4980
4979
  /* @__PURE__ */ a(
@@ -4989,7 +4988,7 @@ const st = "USD", qs = (e, t = st) => {
4989
4988
  ] }),
4990
4989
  J && /* @__PURE__ */ d(ge, { children: [
4991
4990
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4992
- !Ue && /* @__PURE__ */ a(
4991
+ !Be && /* @__PURE__ */ a(
4993
4992
  "button",
4994
4993
  {
4995
4994
  onClick: Po,
@@ -5068,7 +5067,7 @@ const st = "USD", qs = (e, t = st) => {
5068
5067
  )
5069
5068
  ] })
5070
5069
  ] }),
5071
- Je && Jr(
5070
+ Je && Kr(
5072
5071
  {
5073
5072
  ...C,
5074
5073
  address: JSON.parse(
@@ -5076,7 +5075,7 @@ const st = "USD", qs = (e, t = st) => {
5076
5075
  ),
5077
5076
  delivery: localStorage.getItem("agentic_order_delivery"),
5078
5077
  payment: localStorage.getItem("agentic_order_payment"),
5079
- summary: Ur(C == null ? void 0 : C.currency)
5078
+ summary: qr(C == null ? void 0 : C.currency)
5080
5079
  },
5081
5080
  !1
5082
5081
  )
@@ -5087,13 +5086,13 @@ const st = "USD", qs = (e, t = st) => {
5087
5086
  /* @__PURE__ */ a(
5088
5087
  "input",
5089
5088
  {
5090
- placeholder: $e ? "Complete the current step…" : Nt ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Please select a combination first.",
5089
+ placeholder: je ? "Complete the current step…" : Ct ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Please select a combination first.",
5091
5090
  disabled: wo,
5092
5091
  className: `w-full rounded-full p-4 outline-none border-none focus:ring-0 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed
5093
- ${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
5092
+ ${Ct ? "" : "placeholder:text-red-400 text-red-500"}`,
5094
5093
  value: Ze,
5095
5094
  onKeyDown: (u) => {
5096
- u.key === "Enter" && !Ae && !$e && qr();
5095
+ u.key === "Enter" && !Te && !je && Rr();
5097
5096
  },
5098
5097
  onChange: (u) => xe(u.target.value)
5099
5098
  }
@@ -5102,11 +5101,11 @@ const st = "USD", qs = (e, t = st) => {
5102
5101
  "button",
5103
5102
  {
5104
5103
  type: "submit",
5105
- disabled: Ae || $e,
5104
+ disabled: Te || je,
5106
5105
  className: "mr-6 font-medium",
5107
5106
  style: { color: "var(--tanya-light)" },
5108
- onClick: () => qr(),
5109
- children: Ae ? /* @__PURE__ */ a(
5107
+ onClick: () => Rr(),
5108
+ children: Te ? /* @__PURE__ */ a(
5110
5109
  "div",
5111
5110
  {
5112
5111
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",