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