tanya-chatbot 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tanya-chatbot.cjs.js +11 -11
- package/dist/tanya-chatbot.cjs.js.map +1 -1
- package/dist/tanya-chatbot.es.js +981 -980
- package/dist/tanya-chatbot.es.js.map +1 -1
- package/package.json +1 -1
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { useEffect as
|
|
1
|
+
import { useEffect as lt, forwardRef as hr, useState as L, createElement as fe, useRef as Pt } from "react";
|
|
2
2
|
import { jsx as l, jsxs as p, Fragment as pe } from "react/jsx-runtime";
|
|
3
|
-
import { createHttpLink as
|
|
4
|
-
import { Provider as
|
|
5
|
-
import { createSlice as gr, configureStore as
|
|
3
|
+
import { createHttpLink as Xr, ApolloClient as Zr, InMemoryCache as tn, ApolloProvider as en } from "@apollo/client";
|
|
4
|
+
import { Provider as rn, useDispatch as mr, useSelector as Gt } from "react-redux";
|
|
5
|
+
import { createSlice as gr, configureStore as nn } from "@reduxjs/toolkit";
|
|
6
6
|
import * as wr from "@radix-ui/react-popover";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
9
|
-
import
|
|
9
|
+
import D from "axios";
|
|
10
10
|
import "crypto-js";
|
|
11
11
|
import { Icon as Le } from "@iconify/react";
|
|
12
|
-
import { toast as
|
|
13
|
-
const nn = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.p-\\[5px\\]{padding:5px}.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
|
|
12
|
+
import { toast as W } from "react-toastify";
|
|
13
|
+
const on = '*,: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-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.p-\\[5px\\]{padding:5px}.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 hi() {
|
|
15
|
+
return lt(() => {
|
|
16
16
|
if (typeof document < "u") {
|
|
17
17
|
const t = document.createElement("style");
|
|
18
|
-
return t.textContent =
|
|
18
|
+
return t.textContent = on, document.head.appendChild(t), () => {
|
|
19
19
|
document.head.removeChild(t);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
}, []), null;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const an = {
|
|
25
25
|
store: {
|
|
26
26
|
storeCode: "",
|
|
27
27
|
storeName: "",
|
|
@@ -57,28 +57,28 @@ const on = {
|
|
|
57
57
|
}
|
|
58
58
|
}, yr = gr({
|
|
59
59
|
name: "store",
|
|
60
|
-
initialState:
|
|
60
|
+
initialState: an,
|
|
61
61
|
reducers: {
|
|
62
62
|
setStore: (t, e) => {
|
|
63
63
|
t.store = e.payload;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
}), { setStore:
|
|
66
|
+
}), { setStore: mi } = yr.actions, sn = yr.reducer, cn = {
|
|
67
67
|
product: null
|
|
68
68
|
}, br = gr({
|
|
69
69
|
name: "product",
|
|
70
|
-
initialState:
|
|
70
|
+
initialState: cn,
|
|
71
71
|
reducers: {
|
|
72
72
|
setProduct: (t, e) => {
|
|
73
73
|
t.product = e.payload;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}), { setProduct: he } = br.actions,
|
|
76
|
+
}), { setProduct: he } = br.actions, ln = br.reducer, un = nn({
|
|
77
77
|
reducer: {
|
|
78
|
-
store:
|
|
79
|
-
product:
|
|
78
|
+
store: sn,
|
|
79
|
+
product: ln
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), dn = ({ children: t }) => /* @__PURE__ */ l(rn, { store: un, children: t }), _t = (t) => {
|
|
82
82
|
const e = new CustomEvent("reactCartUpdated", {
|
|
83
83
|
detail: {
|
|
84
84
|
cartUpdated: !0,
|
|
@@ -88,12 +88,12 @@ const on = {
|
|
|
88
88
|
});
|
|
89
89
|
window.dispatchEvent(e);
|
|
90
90
|
};
|
|
91
|
-
function
|
|
91
|
+
function fn({
|
|
92
92
|
...t
|
|
93
93
|
}) {
|
|
94
94
|
return /* @__PURE__ */ l(wr.Root, { "data-slot": "popover", ...t });
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function pn({
|
|
97
97
|
...t
|
|
98
98
|
}) {
|
|
99
99
|
return /* @__PURE__ */ l(wr.Trigger, { "data-slot": "popover-trigger", ...t });
|
|
@@ -101,18 +101,18 @@ function fn({
|
|
|
101
101
|
const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), xr = async () => {
|
|
102
102
|
const t = "https://tanya-sfcc-server.vercel.app/";
|
|
103
103
|
try {
|
|
104
|
-
const e = await
|
|
105
|
-
`${t}api/auth/token-bm-grant?baseUrl=${
|
|
104
|
+
const e = await D.post(
|
|
105
|
+
`${t}api/auth/token-bm-grant?baseUrl=${ut()}&siteId=${et()}`
|
|
106
106
|
);
|
|
107
107
|
return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
|
|
108
108
|
} catch (e) {
|
|
109
|
-
return
|
|
109
|
+
return D.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
|
|
110
110
|
}
|
|
111
111
|
}, vr = async (t) => {
|
|
112
112
|
const e = "https://tanya-sfcc-server.vercel.app/";
|
|
113
113
|
try {
|
|
114
|
-
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await
|
|
115
|
-
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${
|
|
114
|
+
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await D.post(
|
|
115
|
+
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
116
116
|
{},
|
|
117
117
|
{
|
|
118
118
|
headers: {
|
|
@@ -123,10 +123,10 @@ const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
123
123
|
);
|
|
124
124
|
return n.status === 200 && n.data ? n.data : null;
|
|
125
125
|
} catch (r) {
|
|
126
|
-
return
|
|
126
|
+
return D.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
async function
|
|
129
|
+
async function te() {
|
|
130
130
|
const t = localStorage.getItem("expires_in"), e = localStorage.getItem("access_token"), r = JSON.parse(
|
|
131
131
|
sessionStorage.getItem("customerData") || "{}"
|
|
132
132
|
).isGuest;
|
|
@@ -134,27 +134,27 @@ async function Zt() {
|
|
|
134
134
|
return console.log("access token found in local storage"), { access_token: e, expires_in: t };
|
|
135
135
|
const { serverUrl: n } = wt(), o = JSON.parse(
|
|
136
136
|
sessionStorage.getItem("customerData") || "{}"
|
|
137
|
-
).dwsid,
|
|
137
|
+
).dwsid, i = JSON.parse(
|
|
138
138
|
sessionStorage.getItem("customerData") || "{}"
|
|
139
139
|
).usrRef;
|
|
140
140
|
try {
|
|
141
|
-
const
|
|
142
|
-
`${n}sc-api/${
|
|
141
|
+
const a = r ? "unregister-auth" : "register-auth", c = await D.get(
|
|
142
|
+
`${n}sc-api/${a}?dwsid=${o}&email=${i}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}&siteId=${et()}`
|
|
143
143
|
);
|
|
144
144
|
return localStorage.setItem("access_token", c.data.access_token), localStorage.setItem(
|
|
145
145
|
"expires_in",
|
|
146
146
|
String((/* @__PURE__ */ new Date()).getTime() + c.data.expires_in * 1e3)
|
|
147
147
|
), localStorage.setItem("isGuest", r.toString()), console.log(c.data), c.data;
|
|
148
|
-
} catch (
|
|
149
|
-
console.log(
|
|
148
|
+
} catch (a) {
|
|
149
|
+
console.log(a);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const ut = () => sessionStorage.getItem("Host"), et = () => sessionStorage.getItem("SiteId"), dt = () => sessionStorage.getItem("pubCfg"), ft = () => sessionStorage.getItem("envRef"), pt = () => sessionStorage.getItem("orgRef"), ze = async (t, e) => {
|
|
153
153
|
const { serverUrl: r, basePath: n } = wt();
|
|
154
154
|
try {
|
|
155
|
-
const o =
|
|
156
|
-
return (await
|
|
157
|
-
`${r}${n}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${
|
|
155
|
+
const o = ut();
|
|
156
|
+
return (await D.get(
|
|
157
|
+
`${r}${n}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
158
158
|
{
|
|
159
159
|
headers: {
|
|
160
160
|
"Content-Type": "application/json",
|
|
@@ -167,11 +167,11 @@ const lt = () => sessionStorage.getItem("Host"), rt = () => sessionStorage.getIt
|
|
|
167
167
|
}
|
|
168
168
|
}, kr = async (t) => {
|
|
169
169
|
if (!t) throw new Error("Product ID is required");
|
|
170
|
-
const { serverUrl: e, basePath: r } = wt(), n =
|
|
170
|
+
const { serverUrl: e, basePath: r } = wt(), n = ut();
|
|
171
171
|
console.log("calling access");
|
|
172
|
-
const { access_token: o } = await
|
|
173
|
-
return console.log(o), (await
|
|
174
|
-
`${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${
|
|
172
|
+
const { access_token: o } = await te();
|
|
173
|
+
return console.log(o), (await D.get(
|
|
174
|
+
`${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
175
175
|
{
|
|
176
176
|
headers: {
|
|
177
177
|
"Content-Type": "application/json",
|
|
@@ -179,21 +179,21 @@ const lt = () => sessionStorage.getItem("Host"), rt = () => sessionStorage.getIt
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
)).data;
|
|
182
|
-
},
|
|
182
|
+
}, hn = async (t) => {
|
|
183
183
|
if (!t) throw new Error("customerId is required");
|
|
184
184
|
const e = await xr(), { customer_token: r } = await vr(
|
|
185
185
|
e
|
|
186
|
-
), { serverUrl: n, basePath: o } = wt(),
|
|
187
|
-
return (await
|
|
188
|
-
`${n}${o}/get-interest?baseUrl=${
|
|
186
|
+
), { serverUrl: n, basePath: o } = wt(), a = (await te()).access_token;
|
|
187
|
+
return (await D.get(
|
|
188
|
+
`${n}${o}/get-interest?baseUrl=${ut()}&customerId=${t}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
189
189
|
{
|
|
190
190
|
headers: {
|
|
191
191
|
"Content-Type": "application/json",
|
|
192
|
-
Authorization: `Bearer ${
|
|
192
|
+
Authorization: `Bearer ${a}`
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
)).data;
|
|
196
|
-
}, De = (t) => String(typeof t == "string" ? t : t["en-US"] || t), Me = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url),
|
|
196
|
+
}, De = (t) => String(typeof t == "string" ? t : t["en-US"] || t), Me = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), mn = (t, e) => t.toLocaleString("en-US", {
|
|
197
197
|
style: "currency",
|
|
198
198
|
currency: e || "USD"
|
|
199
199
|
}), Ue = (t) => {
|
|
@@ -205,100 +205,100 @@ const lt = () => sessionStorage.getItem("Host"), rt = () => sessionStorage.getIt
|
|
|
205
205
|
centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
|
|
206
206
|
currencyCode: (n = t.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
|
|
207
207
|
};
|
|
208
|
-
},
|
|
208
|
+
}, gn = (t) => t.charAt(0).toUpperCase() + t.slice(1), Be = (t, e) => t.length < e ? t : t.slice(0, e) + "...", ie = (t) => t.split("\\n").map((e, r) => {
|
|
209
209
|
const n = e.match(/^(\d+)\.\s(.+)/);
|
|
210
210
|
return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
|
|
211
211
|
}).join("");
|
|
212
|
-
function
|
|
212
|
+
function wn(t, e) {
|
|
213
213
|
const r = t.icons, n = t.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
214
|
-
function a
|
|
215
|
-
if (r[
|
|
216
|
-
if (!(
|
|
217
|
-
o[
|
|
218
|
-
const c = n[
|
|
219
|
-
s && (o[
|
|
214
|
+
function i(a) {
|
|
215
|
+
if (r[a]) return o[a] = [];
|
|
216
|
+
if (!(a in o)) {
|
|
217
|
+
o[a] = null;
|
|
218
|
+
const c = n[a] && n[a].parent, s = c && i(c);
|
|
219
|
+
s && (o[a] = [c].concat(s));
|
|
220
220
|
}
|
|
221
|
-
return o[
|
|
221
|
+
return o[a];
|
|
222
222
|
}
|
|
223
|
-
return Object.keys(r).concat(Object.keys(n)).forEach(
|
|
223
|
+
return Object.keys(r).concat(Object.keys(n)).forEach(i), o;
|
|
224
224
|
}
|
|
225
225
|
const Sr = Object.freeze({
|
|
226
226
|
left: 0,
|
|
227
227
|
top: 0,
|
|
228
228
|
width: 16,
|
|
229
229
|
height: 16
|
|
230
|
-
}),
|
|
230
|
+
}), Wt = Object.freeze({
|
|
231
231
|
rotate: 0,
|
|
232
232
|
vFlip: !1,
|
|
233
233
|
hFlip: !1
|
|
234
234
|
}), Se = Object.freeze({
|
|
235
235
|
...Sr,
|
|
236
|
-
...
|
|
236
|
+
...Wt
|
|
237
237
|
}), me = Object.freeze({
|
|
238
238
|
...Se,
|
|
239
239
|
body: "",
|
|
240
240
|
hidden: !1
|
|
241
241
|
});
|
|
242
|
-
function
|
|
242
|
+
function yn(t, e) {
|
|
243
243
|
const r = {};
|
|
244
244
|
!t.hFlip != !e.hFlip && (r.hFlip = !0), !t.vFlip != !e.vFlip && (r.vFlip = !0);
|
|
245
245
|
const n = ((t.rotate || 0) + (e.rotate || 0)) % 4;
|
|
246
246
|
return n && (r.rotate = n), r;
|
|
247
247
|
}
|
|
248
248
|
function qe(t, e) {
|
|
249
|
-
const r =
|
|
250
|
-
for (const n in me) n in
|
|
249
|
+
const r = yn(t, e);
|
|
250
|
+
for (const n in me) n in Wt ? n in t && !(n in r) && (r[n] = Wt[n]) : n in e ? r[n] = e[n] : n in t && (r[n] = t[n]);
|
|
251
251
|
return r;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function bn(t, e, r) {
|
|
254
254
|
const n = t.icons, o = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
255
|
-
let
|
|
256
|
-
function
|
|
257
|
-
|
|
255
|
+
let i = {};
|
|
256
|
+
function a(c) {
|
|
257
|
+
i = qe(n[c] || o[c], i);
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return a(e), r.forEach(a), qe(t, i);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Ir(t, e) {
|
|
262
262
|
const r = [];
|
|
263
263
|
if (typeof t != "object" || typeof t.icons != "object") return r;
|
|
264
264
|
t.not_found instanceof Array && t.not_found.forEach((o) => {
|
|
265
265
|
e(o, null), r.push(o);
|
|
266
266
|
});
|
|
267
|
-
const n =
|
|
267
|
+
const n = wn(t);
|
|
268
268
|
for (const o in n) {
|
|
269
|
-
const
|
|
270
|
-
|
|
269
|
+
const i = n[o];
|
|
270
|
+
i && (e(o, bn(t, o, i)), r.push(o));
|
|
271
271
|
}
|
|
272
272
|
return r;
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const xn = {
|
|
275
275
|
provider: "",
|
|
276
276
|
aliases: {},
|
|
277
277
|
not_found: {},
|
|
278
278
|
...Sr
|
|
279
279
|
};
|
|
280
|
-
function
|
|
280
|
+
function ae(t, e) {
|
|
281
281
|
for (const r in e) if (r in t && typeof t[r] != typeof e[r]) return !1;
|
|
282
282
|
return !0;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Cr(t) {
|
|
285
285
|
if (typeof t != "object" || t === null) return null;
|
|
286
286
|
const e = t;
|
|
287
|
-
if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !
|
|
287
|
+
if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !ae(t, xn)) return null;
|
|
288
288
|
const r = e.icons;
|
|
289
289
|
for (const o in r) {
|
|
290
|
-
const
|
|
291
|
-
if (!o || typeof
|
|
290
|
+
const i = r[o];
|
|
291
|
+
if (!o || typeof i.body != "string" || !ae(i, me)) return null;
|
|
292
292
|
}
|
|
293
293
|
const n = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
294
294
|
for (const o in n) {
|
|
295
|
-
const
|
|
296
|
-
if (!o || typeof
|
|
295
|
+
const i = n[o], a = i.parent;
|
|
296
|
+
if (!o || typeof a != "string" || !r[a] && !n[a] || !ae(i, me)) return null;
|
|
297
297
|
}
|
|
298
298
|
return e;
|
|
299
299
|
}
|
|
300
300
|
const Re = /* @__PURE__ */ Object.create(null);
|
|
301
|
-
function
|
|
301
|
+
function vn(t, e) {
|
|
302
302
|
return {
|
|
303
303
|
provider: t,
|
|
304
304
|
prefix: e,
|
|
@@ -306,16 +306,16 @@ function xn(t, e) {
|
|
|
306
306
|
missing: /* @__PURE__ */ new Set()
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Nt(t, e) {
|
|
310
310
|
const r = Re[t] || (Re[t] = /* @__PURE__ */ Object.create(null));
|
|
311
|
-
return r[e] || (r[e] =
|
|
311
|
+
return r[e] || (r[e] = vn(t, e));
|
|
312
312
|
}
|
|
313
313
|
function _r(t, e) {
|
|
314
|
-
return
|
|
314
|
+
return Cr(e) ? Ir(e, (r, n) => {
|
|
315
315
|
n ? t.icons[r] = n : t.missing.add(r);
|
|
316
316
|
}) : [];
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function kn(t, e, r) {
|
|
319
319
|
try {
|
|
320
320
|
if (typeof r.body == "string")
|
|
321
321
|
return t.icons[e] = { ...r }, !0;
|
|
@@ -323,7 +323,7 @@ function vn(t, e, r) {
|
|
|
323
323
|
}
|
|
324
324
|
return !1;
|
|
325
325
|
}
|
|
326
|
-
const Fr = /^[a-z0-9]+(-[a-z0-9]+)*$/,
|
|
326
|
+
const Fr = /^[a-z0-9]+(-[a-z0-9]+)*$/, ee = (t, e, r, n = "") => {
|
|
327
327
|
const o = t.split(":");
|
|
328
328
|
if (t.slice(0, 1) === "@") {
|
|
329
329
|
if (o.length < 2 || o.length > 3) return null;
|
|
@@ -331,63 +331,63 @@ const Fr = /^[a-z0-9]+(-[a-z0-9]+)*$/, te = (t, e, r, n = "") => {
|
|
|
331
331
|
}
|
|
332
332
|
if (o.length > 3 || !o.length) return null;
|
|
333
333
|
if (o.length > 1) {
|
|
334
|
-
const c = o.pop(), s = o.pop(),
|
|
334
|
+
const c = o.pop(), s = o.pop(), d = {
|
|
335
335
|
provider: o.length > 0 ? o[0] : n,
|
|
336
336
|
prefix: s,
|
|
337
337
|
name: c
|
|
338
338
|
};
|
|
339
|
-
return e && !
|
|
339
|
+
return e && !Yt(d) ? null : d;
|
|
340
340
|
}
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
341
|
+
const i = o[0], a = i.split("-");
|
|
342
|
+
if (a.length > 1) {
|
|
343
343
|
const c = {
|
|
344
344
|
provider: n,
|
|
345
|
-
prefix:
|
|
346
|
-
name:
|
|
345
|
+
prefix: a.shift(),
|
|
346
|
+
name: a.join("-")
|
|
347
347
|
};
|
|
348
|
-
return e && !
|
|
348
|
+
return e && !Yt(c) ? null : c;
|
|
349
349
|
}
|
|
350
350
|
if (r && n === "") {
|
|
351
351
|
const c = {
|
|
352
352
|
provider: n,
|
|
353
353
|
prefix: "",
|
|
354
|
-
name:
|
|
354
|
+
name: i
|
|
355
355
|
};
|
|
356
|
-
return e && !
|
|
356
|
+
return e && !Yt(c, r) ? null : c;
|
|
357
357
|
}
|
|
358
358
|
return null;
|
|
359
|
-
},
|
|
360
|
-
let
|
|
359
|
+
}, Yt = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
|
|
360
|
+
let Dt = !1;
|
|
361
361
|
function Nr(t) {
|
|
362
|
-
return typeof t == "boolean" && (
|
|
362
|
+
return typeof t == "boolean" && (Dt = t), Dt;
|
|
363
363
|
}
|
|
364
364
|
function He(t) {
|
|
365
|
-
const e = typeof t == "string" ?
|
|
365
|
+
const e = typeof t == "string" ? ee(t, !0, Dt) : t;
|
|
366
366
|
if (e) {
|
|
367
|
-
const r =
|
|
367
|
+
const r = Nt(e.provider, e.prefix), n = e.name;
|
|
368
368
|
return r.icons[n] || (r.missing.has(n) ? null : void 0);
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
const r =
|
|
371
|
+
function Sn(t, e) {
|
|
372
|
+
const r = ee(t, !0, Dt);
|
|
373
373
|
if (!r) return !1;
|
|
374
|
-
const n =
|
|
375
|
-
return e ?
|
|
374
|
+
const n = Nt(r.provider, r.prefix);
|
|
375
|
+
return e ? kn(n, r.name, e) : (n.missing.add(r.name), !0);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function In(t, e) {
|
|
378
378
|
if (typeof t != "object") return !1;
|
|
379
|
-
if (typeof e != "string" && (e = t.provider || ""),
|
|
379
|
+
if (typeof e != "string" && (e = t.provider || ""), Dt && !e && !t.prefix) {
|
|
380
380
|
let o = !1;
|
|
381
|
-
return
|
|
382
|
-
|
|
381
|
+
return Cr(t) && (t.prefix = "", Ir(t, (i, a) => {
|
|
382
|
+
Sn(i, a) && (o = !0);
|
|
383
383
|
})), o;
|
|
384
384
|
}
|
|
385
385
|
const r = t.prefix;
|
|
386
|
-
if (!
|
|
386
|
+
if (!Yt({
|
|
387
387
|
prefix: r,
|
|
388
388
|
name: "a"
|
|
389
389
|
})) return !1;
|
|
390
|
-
const n =
|
|
390
|
+
const n = Nt(e, r);
|
|
391
391
|
return !!_r(n, t);
|
|
392
392
|
}
|
|
393
393
|
const Er = Object.freeze({
|
|
@@ -395,8 +395,8 @@ const Er = Object.freeze({
|
|
|
395
395
|
height: null
|
|
396
396
|
}), Tr = Object.freeze({
|
|
397
397
|
...Er,
|
|
398
|
-
...
|
|
399
|
-
}), Cn = /(-?[0-9.]*[0-9]+[0-9.]*)/g,
|
|
398
|
+
...Wt
|
|
399
|
+
}), Cn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, _n = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
400
400
|
function Ve(t, e, r) {
|
|
401
401
|
if (e === 1) return t;
|
|
402
402
|
if (r = r || 100, typeof t == "number") return Math.ceil(t * e * r) / r;
|
|
@@ -404,40 +404,40 @@ function Ve(t, e, r) {
|
|
|
404
404
|
const n = t.split(Cn);
|
|
405
405
|
if (n === null || !n.length) return t;
|
|
406
406
|
const o = [];
|
|
407
|
-
let
|
|
407
|
+
let i = n.shift(), a = _n.test(i);
|
|
408
408
|
for (; ; ) {
|
|
409
|
-
if (
|
|
410
|
-
const c = parseFloat(
|
|
411
|
-
isNaN(c) ? o.push(
|
|
412
|
-
} else o.push(
|
|
413
|
-
if (
|
|
414
|
-
|
|
409
|
+
if (a) {
|
|
410
|
+
const c = parseFloat(i);
|
|
411
|
+
isNaN(c) ? o.push(i) : o.push(Math.ceil(c * e * r) / r);
|
|
412
|
+
} else o.push(i);
|
|
413
|
+
if (i = n.shift(), i === void 0) return o.join("");
|
|
414
|
+
a = !a;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Fn(t, e = "defs") {
|
|
418
418
|
let r = "";
|
|
419
419
|
const n = t.indexOf("<" + e);
|
|
420
420
|
for (; n >= 0; ) {
|
|
421
|
-
const o = t.indexOf(">", n),
|
|
422
|
-
if (o === -1 ||
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
r += t.slice(o + 1,
|
|
421
|
+
const o = t.indexOf(">", n), i = t.indexOf("</" + e);
|
|
422
|
+
if (o === -1 || i === -1) break;
|
|
423
|
+
const a = t.indexOf(">", i);
|
|
424
|
+
if (a === -1) break;
|
|
425
|
+
r += t.slice(o + 1, i).trim(), t = t.slice(0, n).trim() + t.slice(a + 1);
|
|
426
426
|
}
|
|
427
427
|
return {
|
|
428
428
|
defs: r,
|
|
429
429
|
content: t
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Nn(t, e) {
|
|
433
433
|
return t ? "<defs>" + t + "</defs>" + e : e;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
const n =
|
|
437
|
-
return
|
|
435
|
+
function En(t, e, r) {
|
|
436
|
+
const n = Fn(t);
|
|
437
|
+
return Nn(n.defs, e + n.content + r);
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
function
|
|
439
|
+
const Tn = (t) => t === "unset" || t === "undefined" || t === "none";
|
|
440
|
+
function Pn(t, e) {
|
|
441
441
|
const r = {
|
|
442
442
|
...Se,
|
|
443
443
|
...t
|
|
@@ -450,65 +450,65 @@ function Tn(t, e) {
|
|
|
450
450
|
width: r.width,
|
|
451
451
|
height: r.height
|
|
452
452
|
};
|
|
453
|
-
let
|
|
454
|
-
[r, n].forEach((
|
|
455
|
-
const w = [],
|
|
456
|
-
let
|
|
457
|
-
|
|
458
|
-
let
|
|
459
|
-
switch (
|
|
453
|
+
let i = r.body;
|
|
454
|
+
[r, n].forEach((T) => {
|
|
455
|
+
const w = [], k = T.hFlip, M = T.vFlip;
|
|
456
|
+
let O = T.rotate;
|
|
457
|
+
k ? M ? O += 2 : (w.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), w.push("scale(-1 1)"), o.top = o.left = 0) : M && (w.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), w.push("scale(1 -1)"), o.top = o.left = 0);
|
|
458
|
+
let P;
|
|
459
|
+
switch (O < 0 && (O -= Math.floor(O / 4) * 4), O = O % 4, O) {
|
|
460
460
|
case 1:
|
|
461
|
-
|
|
461
|
+
P = o.height / 2 + o.top, w.unshift("rotate(90 " + P.toString() + " " + P.toString() + ")");
|
|
462
462
|
break;
|
|
463
463
|
case 2:
|
|
464
464
|
w.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
|
|
465
465
|
break;
|
|
466
466
|
case 3:
|
|
467
|
-
|
|
467
|
+
P = o.width / 2 + o.left, w.unshift("rotate(-90 " + P.toString() + " " + P.toString() + ")");
|
|
468
468
|
break;
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
O % 2 === 1 && (o.left !== o.top && (P = o.left, o.left = o.top, o.top = P), o.width !== o.height && (P = o.width, o.width = o.height, o.height = P)), w.length && (i = En(i, '<g transform="' + w.join(" ") + '">', "</g>"));
|
|
471
471
|
});
|
|
472
|
-
const
|
|
472
|
+
const a = n.width, c = n.height, s = o.width, d = o.height;
|
|
473
473
|
let f, h;
|
|
474
|
-
|
|
475
|
-
const m = {}, g = (
|
|
476
|
-
|
|
474
|
+
a === null ? (h = c === null ? "1em" : c === "auto" ? d : c, f = Ve(h, s / d)) : (f = a === "auto" ? s : a, h = c === null ? Ve(f, d / s) : c === "auto" ? d : c);
|
|
475
|
+
const m = {}, g = (T, w) => {
|
|
476
|
+
Tn(w) || (m[T] = w.toString());
|
|
477
477
|
};
|
|
478
478
|
g("width", f), g("height", h);
|
|
479
|
-
const
|
|
479
|
+
const S = [
|
|
480
480
|
o.left,
|
|
481
481
|
o.top,
|
|
482
482
|
s,
|
|
483
|
-
|
|
483
|
+
d
|
|
484
484
|
];
|
|
485
|
-
return m.viewBox =
|
|
485
|
+
return m.viewBox = S.join(" "), {
|
|
486
486
|
attributes: m,
|
|
487
|
-
viewBox:
|
|
488
|
-
body:
|
|
487
|
+
viewBox: S,
|
|
488
|
+
body: i
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
const
|
|
492
|
-
let
|
|
493
|
-
function
|
|
491
|
+
const On = /\sid="(\S+)"/g, jn = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
492
|
+
let $n = 0;
|
|
493
|
+
function An(t, e = jn) {
|
|
494
494
|
const r = [];
|
|
495
495
|
let n;
|
|
496
|
-
for (; n =
|
|
496
|
+
for (; n = On.exec(t); ) r.push(n[1]);
|
|
497
497
|
if (!r.length) return t;
|
|
498
498
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
499
|
-
return r.forEach((
|
|
500
|
-
const
|
|
501
|
-
t = t.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" +
|
|
499
|
+
return r.forEach((i) => {
|
|
500
|
+
const a = typeof e == "function" ? e(i) : e + ($n++).toString(), c = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
501
|
+
t = t.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + a + o + "$3");
|
|
502
502
|
}), t = t.replace(new RegExp(o, "g"), ""), t;
|
|
503
503
|
}
|
|
504
504
|
const ge = /* @__PURE__ */ Object.create(null);
|
|
505
|
-
function
|
|
505
|
+
function Ln(t, e) {
|
|
506
506
|
ge[t] = e;
|
|
507
507
|
}
|
|
508
508
|
function we(t) {
|
|
509
509
|
return ge[t] || ge[""];
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Ie(t) {
|
|
512
512
|
let e;
|
|
513
513
|
if (typeof t.resources == "string") e = [t.resources];
|
|
514
514
|
else if (e = t.resources, !(e instanceof Array) || !e.length) return null;
|
|
@@ -523,81 +523,81 @@ function Ce(t) {
|
|
|
523
523
|
dataAfterTimeout: t.dataAfterTimeout !== !1
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
|
-
const
|
|
527
|
-
for (;
|
|
528
|
-
|
|
529
|
-
function
|
|
530
|
-
const r =
|
|
531
|
-
return r === null ? !1 : (
|
|
526
|
+
const Ce = /* @__PURE__ */ Object.create(null), Ot = ["https://api.simplesvg.com", "https://api.unisvg.com"], Jt = [];
|
|
527
|
+
for (; Ot.length > 0; ) Ot.length === 1 || Math.random() > 0.5 ? Jt.push(Ot.shift()) : Jt.push(Ot.pop());
|
|
528
|
+
Ce[""] = Ie({ resources: ["https://api.iconify.design"].concat(Jt) });
|
|
529
|
+
function zn(t, e) {
|
|
530
|
+
const r = Ie(e);
|
|
531
|
+
return r === null ? !1 : (Ce[t] = r, !0);
|
|
532
532
|
}
|
|
533
533
|
function _e(t) {
|
|
534
|
-
return
|
|
534
|
+
return Ce[t];
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const Dn = () => {
|
|
537
537
|
let t;
|
|
538
538
|
try {
|
|
539
539
|
if (t = fetch, typeof t == "function") return t;
|
|
540
540
|
} catch {
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
let Ye =
|
|
544
|
-
function
|
|
543
|
+
let Ye = Dn();
|
|
544
|
+
function Mn(t, e) {
|
|
545
545
|
const r = _e(t);
|
|
546
546
|
if (!r) return 0;
|
|
547
547
|
let n;
|
|
548
548
|
if (!r.maxURL) n = 0;
|
|
549
549
|
else {
|
|
550
550
|
let o = 0;
|
|
551
|
-
r.resources.forEach((
|
|
552
|
-
o = Math.max(o,
|
|
551
|
+
r.resources.forEach((a) => {
|
|
552
|
+
o = Math.max(o, a.length);
|
|
553
553
|
});
|
|
554
|
-
const
|
|
555
|
-
n = r.maxURL - o - r.path.length -
|
|
554
|
+
const i = e + ".json?icons=";
|
|
555
|
+
n = r.maxURL - o - r.path.length - i.length;
|
|
556
556
|
}
|
|
557
557
|
return n;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Un(t) {
|
|
560
560
|
return t === 404;
|
|
561
561
|
}
|
|
562
|
-
const
|
|
563
|
-
const n = [], o =
|
|
564
|
-
let
|
|
565
|
-
type:
|
|
562
|
+
const Bn = (t, e, r) => {
|
|
563
|
+
const n = [], o = Mn(t, e), i = "icons";
|
|
564
|
+
let a = {
|
|
565
|
+
type: i,
|
|
566
566
|
provider: t,
|
|
567
567
|
prefix: e,
|
|
568
568
|
icons: []
|
|
569
569
|
}, c = 0;
|
|
570
|
-
return r.forEach((s,
|
|
571
|
-
c += s.length + 1, c >= o &&
|
|
572
|
-
type:
|
|
570
|
+
return r.forEach((s, d) => {
|
|
571
|
+
c += s.length + 1, c >= o && d > 0 && (n.push(a), a = {
|
|
572
|
+
type: i,
|
|
573
573
|
provider: t,
|
|
574
574
|
prefix: e,
|
|
575
575
|
icons: []
|
|
576
|
-
}, c = s.length),
|
|
577
|
-
}), n.push(
|
|
576
|
+
}, c = s.length), a.icons.push(s);
|
|
577
|
+
}), n.push(a), n;
|
|
578
578
|
};
|
|
579
|
-
function
|
|
579
|
+
function qn(t) {
|
|
580
580
|
if (typeof t == "string") {
|
|
581
581
|
const e = _e(t);
|
|
582
582
|
if (e) return e.path;
|
|
583
583
|
}
|
|
584
584
|
return "/";
|
|
585
585
|
}
|
|
586
|
-
const
|
|
586
|
+
const Rn = (t, e, r) => {
|
|
587
587
|
if (!Ye) {
|
|
588
588
|
r("abort", 424);
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
|
-
let n =
|
|
591
|
+
let n = qn(e.provider);
|
|
592
592
|
switch (e.type) {
|
|
593
593
|
case "icons": {
|
|
594
|
-
const
|
|
595
|
-
n +=
|
|
594
|
+
const i = e.prefix, c = e.icons.join(","), s = new URLSearchParams({ icons: c });
|
|
595
|
+
n += i + ".json?" + s.toString();
|
|
596
596
|
break;
|
|
597
597
|
}
|
|
598
598
|
case "custom": {
|
|
599
|
-
const
|
|
600
|
-
n +=
|
|
599
|
+
const i = e.uri;
|
|
600
|
+
n += i.slice(0, 1) === "/" ? i.slice(1) : i;
|
|
601
601
|
break;
|
|
602
602
|
}
|
|
603
603
|
default:
|
|
@@ -605,31 +605,31 @@ const qn = (t, e, r) => {
|
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
607
|
let o = 503;
|
|
608
|
-
Ye(t + n).then((
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
608
|
+
Ye(t + n).then((i) => {
|
|
609
|
+
const a = i.status;
|
|
610
|
+
if (a !== 200) {
|
|
611
611
|
setTimeout(() => {
|
|
612
|
-
r(
|
|
612
|
+
r(Un(a) ? "abort" : "next", a);
|
|
613
613
|
});
|
|
614
614
|
return;
|
|
615
615
|
}
|
|
616
|
-
return o = 501,
|
|
617
|
-
}).then((
|
|
618
|
-
if (typeof
|
|
616
|
+
return o = 501, i.json();
|
|
617
|
+
}).then((i) => {
|
|
618
|
+
if (typeof i != "object" || i === null) {
|
|
619
619
|
setTimeout(() => {
|
|
620
|
-
|
|
620
|
+
i === 404 ? r("abort", i) : r("next", o);
|
|
621
621
|
});
|
|
622
622
|
return;
|
|
623
623
|
}
|
|
624
624
|
setTimeout(() => {
|
|
625
|
-
r("success",
|
|
625
|
+
r("success", i);
|
|
626
626
|
});
|
|
627
627
|
}).catch(() => {
|
|
628
628
|
r("next", o);
|
|
629
629
|
});
|
|
630
|
-
},
|
|
631
|
-
prepare:
|
|
632
|
-
send:
|
|
630
|
+
}, Hn = {
|
|
631
|
+
prepare: Bn,
|
|
632
|
+
send: Rn
|
|
633
633
|
};
|
|
634
634
|
function Pr(t, e) {
|
|
635
635
|
t.forEach((r) => {
|
|
@@ -637,56 +637,56 @@ function Pr(t, e) {
|
|
|
637
637
|
n && (r.loaderCallbacks = n.filter((o) => o.id !== e));
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Vn(t) {
|
|
641
641
|
t.pendingCallbacksFlag || (t.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
642
642
|
t.pendingCallbacksFlag = !1;
|
|
643
643
|
const e = t.loaderCallbacks ? t.loaderCallbacks.slice(0) : [];
|
|
644
644
|
if (!e.length) return;
|
|
645
645
|
let r = !1;
|
|
646
646
|
const n = t.provider, o = t.prefix;
|
|
647
|
-
e.forEach((
|
|
648
|
-
const
|
|
649
|
-
|
|
647
|
+
e.forEach((i) => {
|
|
648
|
+
const a = i.icons, c = a.pending.length;
|
|
649
|
+
a.pending = a.pending.filter((s) => {
|
|
650
650
|
if (s.prefix !== o) return !0;
|
|
651
|
-
const
|
|
652
|
-
if (t.icons[
|
|
651
|
+
const d = s.name;
|
|
652
|
+
if (t.icons[d]) a.loaded.push({
|
|
653
653
|
provider: n,
|
|
654
654
|
prefix: o,
|
|
655
|
-
name:
|
|
655
|
+
name: d
|
|
656
656
|
});
|
|
657
|
-
else if (t.missing.has(
|
|
657
|
+
else if (t.missing.has(d)) a.missing.push({
|
|
658
658
|
provider: n,
|
|
659
659
|
prefix: o,
|
|
660
|
-
name:
|
|
660
|
+
name: d
|
|
661
661
|
});
|
|
662
662
|
else
|
|
663
663
|
return r = !0, !0;
|
|
664
664
|
return !1;
|
|
665
|
-
}),
|
|
665
|
+
}), a.pending.length !== c && (r || Pr([t], i.id), i.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), i.abort));
|
|
666
666
|
});
|
|
667
667
|
}));
|
|
668
668
|
}
|
|
669
|
-
let
|
|
670
|
-
function
|
|
671
|
-
const n =
|
|
669
|
+
let Yn = 0;
|
|
670
|
+
function Jn(t, e, r) {
|
|
671
|
+
const n = Yn++, o = Pr.bind(null, r, n);
|
|
672
672
|
if (!e.pending.length) return o;
|
|
673
|
-
const
|
|
673
|
+
const i = {
|
|
674
674
|
id: n,
|
|
675
675
|
icons: e,
|
|
676
676
|
callback: t,
|
|
677
677
|
abort: o
|
|
678
678
|
};
|
|
679
|
-
return r.forEach((
|
|
680
|
-
(
|
|
679
|
+
return r.forEach((a) => {
|
|
680
|
+
(a.loaderCallbacks || (a.loaderCallbacks = [])).push(i);
|
|
681
681
|
}), o;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function Kn(t) {
|
|
684
684
|
const e = {
|
|
685
685
|
loaded: [],
|
|
686
686
|
missing: [],
|
|
687
687
|
pending: []
|
|
688
688
|
}, r = /* @__PURE__ */ Object.create(null);
|
|
689
|
-
t.sort((o,
|
|
689
|
+
t.sort((o, i) => o.provider !== i.provider ? o.provider.localeCompare(i.provider) : o.prefix !== i.prefix ? o.prefix.localeCompare(i.prefix) : o.name.localeCompare(i.name));
|
|
690
690
|
let n = {
|
|
691
691
|
provider: "",
|
|
692
692
|
prefix: "",
|
|
@@ -695,25 +695,25 @@ function Jn(t) {
|
|
|
695
695
|
return t.forEach((o) => {
|
|
696
696
|
if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
|
|
697
697
|
n = o;
|
|
698
|
-
const
|
|
698
|
+
const i = o.provider, a = o.prefix, c = o.name, s = r[i] || (r[i] = /* @__PURE__ */ Object.create(null)), d = s[a] || (s[a] = Nt(i, a));
|
|
699
699
|
let f;
|
|
700
|
-
c in
|
|
700
|
+
c in d.icons ? f = e.loaded : a === "" || d.missing.has(c) ? f = e.missing : f = e.pending;
|
|
701
701
|
const h = {
|
|
702
|
-
provider:
|
|
703
|
-
prefix:
|
|
702
|
+
provider: i,
|
|
703
|
+
prefix: a,
|
|
704
704
|
name: c
|
|
705
705
|
};
|
|
706
706
|
f.push(h);
|
|
707
707
|
}), e;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Gn(t, e = !0, r = !1) {
|
|
710
710
|
const n = [];
|
|
711
711
|
return t.forEach((o) => {
|
|
712
|
-
const
|
|
713
|
-
|
|
712
|
+
const i = typeof o == "string" ? ee(o, e, r) : o;
|
|
713
|
+
i && n.push(i);
|
|
714
714
|
}), n;
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const Wn = {
|
|
717
717
|
resources: [],
|
|
718
718
|
index: 0,
|
|
719
719
|
timeout: 2e3,
|
|
@@ -721,125 +721,125 @@ const Gn = {
|
|
|
721
721
|
random: !1,
|
|
722
722
|
dataAfterTimeout: !1
|
|
723
723
|
};
|
|
724
|
-
function
|
|
725
|
-
const o = t.resources.length,
|
|
726
|
-
let
|
|
724
|
+
function Qn(t, e, r, n) {
|
|
725
|
+
const o = t.resources.length, i = t.random ? Math.floor(Math.random() * o) : t.index;
|
|
726
|
+
let a;
|
|
727
727
|
if (t.random) {
|
|
728
|
-
let
|
|
729
|
-
for (
|
|
730
|
-
const
|
|
731
|
-
|
|
728
|
+
let _ = t.resources.slice(0);
|
|
729
|
+
for (a = []; _.length > 1; ) {
|
|
730
|
+
const j = Math.floor(Math.random() * _.length);
|
|
731
|
+
a.push(_[j]), _ = _.slice(0, j).concat(_.slice(j + 1));
|
|
732
732
|
}
|
|
733
|
-
|
|
734
|
-
} else
|
|
733
|
+
a = a.concat(_);
|
|
734
|
+
} else a = t.resources.slice(i).concat(t.resources.slice(0, i));
|
|
735
735
|
const c = Date.now();
|
|
736
|
-
let s = "pending",
|
|
736
|
+
let s = "pending", d = 0, f, h = null, m = [], g = [];
|
|
737
737
|
typeof n == "function" && g.push(n);
|
|
738
|
-
function
|
|
738
|
+
function S() {
|
|
739
739
|
h && (clearTimeout(h), h = null);
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
s === "pending" && (s = "aborted"),
|
|
743
|
-
|
|
741
|
+
function T() {
|
|
742
|
+
s === "pending" && (s = "aborted"), S(), m.forEach((_) => {
|
|
743
|
+
_.status === "pending" && (_.status = "aborted");
|
|
744
744
|
}), m = [];
|
|
745
745
|
}
|
|
746
|
-
function w(
|
|
747
|
-
|
|
746
|
+
function w(_, j) {
|
|
747
|
+
j && (g = []), typeof _ == "function" && g.push(_);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function k() {
|
|
750
750
|
return {
|
|
751
751
|
startTime: c,
|
|
752
752
|
payload: e,
|
|
753
753
|
status: s,
|
|
754
|
-
queriesSent:
|
|
754
|
+
queriesSent: d,
|
|
755
755
|
queriesPending: m.length,
|
|
756
756
|
subscribe: w,
|
|
757
|
-
abort:
|
|
757
|
+
abort: T
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
s = "failed", g.forEach((
|
|
762
|
-
|
|
760
|
+
function M() {
|
|
761
|
+
s = "failed", g.forEach((_) => {
|
|
762
|
+
_(void 0, f);
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
m.forEach((
|
|
767
|
-
|
|
765
|
+
function O() {
|
|
766
|
+
m.forEach((_) => {
|
|
767
|
+
_.status === "pending" && (_.status = "aborted");
|
|
768
768
|
}), m = [];
|
|
769
769
|
}
|
|
770
|
-
function
|
|
771
|
-
const
|
|
772
|
-
switch (m = m.filter((
|
|
770
|
+
function P(_, j, V) {
|
|
771
|
+
const X = j !== "success";
|
|
772
|
+
switch (m = m.filter((U) => U !== _), s) {
|
|
773
773
|
case "pending":
|
|
774
774
|
break;
|
|
775
775
|
case "failed":
|
|
776
|
-
if (
|
|
776
|
+
if (X || !t.dataAfterTimeout) return;
|
|
777
777
|
break;
|
|
778
778
|
default:
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
if (
|
|
782
|
-
f =
|
|
781
|
+
if (j === "abort") {
|
|
782
|
+
f = V, M();
|
|
783
783
|
return;
|
|
784
784
|
}
|
|
785
|
-
if (
|
|
786
|
-
f =
|
|
785
|
+
if (X) {
|
|
786
|
+
f = V, m.length || (a.length ? Q() : M());
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
|
|
789
|
+
if (S(), O(), !t.random) {
|
|
790
|
+
const U = t.resources.indexOf(_.resource);
|
|
791
|
+
U !== -1 && U !== t.index && (t.index = U);
|
|
792
792
|
}
|
|
793
|
-
s = "completed", g.forEach((
|
|
794
|
-
|
|
793
|
+
s = "completed", g.forEach((U) => {
|
|
794
|
+
U(V);
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Q() {
|
|
798
798
|
if (s !== "pending") return;
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
799
|
+
S();
|
|
800
|
+
const _ = a.shift();
|
|
801
|
+
if (_ === void 0) {
|
|
802
802
|
if (m.length) {
|
|
803
803
|
h = setTimeout(() => {
|
|
804
|
-
|
|
804
|
+
S(), s === "pending" && (O(), M());
|
|
805
805
|
}, t.timeout);
|
|
806
806
|
return;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
M();
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
const
|
|
811
|
+
const j = {
|
|
812
812
|
status: "pending",
|
|
813
|
-
resource:
|
|
814
|
-
callback: (
|
|
815
|
-
|
|
813
|
+
resource: _,
|
|
814
|
+
callback: (V, X) => {
|
|
815
|
+
P(j, V, X);
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
|
-
m.push(
|
|
818
|
+
m.push(j), d++, h = setTimeout(Q, t.rotate), r(_, e, j.callback);
|
|
819
819
|
}
|
|
820
|
-
return setTimeout(
|
|
820
|
+
return setTimeout(Q), k;
|
|
821
821
|
}
|
|
822
822
|
function Or(t) {
|
|
823
823
|
const e = {
|
|
824
|
-
...
|
|
824
|
+
...Wn,
|
|
825
825
|
...t
|
|
826
826
|
};
|
|
827
827
|
let r = [];
|
|
828
828
|
function n() {
|
|
829
829
|
r = r.filter((c) => c().status === "pending");
|
|
830
830
|
}
|
|
831
|
-
function o(c, s,
|
|
832
|
-
const f =
|
|
833
|
-
n(),
|
|
831
|
+
function o(c, s, d) {
|
|
832
|
+
const f = Qn(e, c, s, (h, m) => {
|
|
833
|
+
n(), d && d(h, m);
|
|
834
834
|
});
|
|
835
835
|
return r.push(f), f;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function i(c) {
|
|
838
838
|
return r.find((s) => c(s)) || null;
|
|
839
839
|
}
|
|
840
840
|
return {
|
|
841
841
|
query: o,
|
|
842
|
-
find:
|
|
842
|
+
find: i,
|
|
843
843
|
setIndex: (c) => {
|
|
844
844
|
e.index = c;
|
|
845
845
|
},
|
|
@@ -850,7 +850,7 @@ function Or(t) {
|
|
|
850
850
|
function Je() {
|
|
851
851
|
}
|
|
852
852
|
const se = /* @__PURE__ */ Object.create(null);
|
|
853
|
-
function
|
|
853
|
+
function Xn(t) {
|
|
854
854
|
if (!se[t]) {
|
|
855
855
|
const e = _e(t);
|
|
856
856
|
if (!e) return;
|
|
@@ -862,20 +862,20 @@ function Qn(t) {
|
|
|
862
862
|
}
|
|
863
863
|
return se[t];
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Zn(t, e, r) {
|
|
866
866
|
let n, o;
|
|
867
867
|
if (typeof t == "string") {
|
|
868
|
-
const
|
|
869
|
-
if (!
|
|
868
|
+
const i = we(t);
|
|
869
|
+
if (!i)
|
|
870
870
|
return r(void 0, 424), Je;
|
|
871
|
-
o =
|
|
872
|
-
const
|
|
873
|
-
|
|
871
|
+
o = i.send;
|
|
872
|
+
const a = Xn(t);
|
|
873
|
+
a && (n = a.redundancy);
|
|
874
874
|
} else {
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
n = Or(
|
|
878
|
-
const
|
|
875
|
+
const i = Ie(t);
|
|
876
|
+
if (i) {
|
|
877
|
+
n = Or(i);
|
|
878
|
+
const a = t.resources ? t.resources[0] : "", c = we(a);
|
|
879
879
|
c && (o = c.send);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
@@ -883,12 +883,12 @@ function Xn(t, e, r) {
|
|
|
883
883
|
}
|
|
884
884
|
function Ke() {
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function to(t) {
|
|
887
887
|
t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
|
|
888
|
-
t.iconsLoaderFlag = !1,
|
|
888
|
+
t.iconsLoaderFlag = !1, Vn(t);
|
|
889
889
|
}));
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function eo(t) {
|
|
892
892
|
const e = [], r = [];
|
|
893
893
|
return t.forEach((n) => {
|
|
894
894
|
(n.match(Fr) ? e : r).push(n);
|
|
@@ -897,11 +897,11 @@ function to(t) {
|
|
|
897
897
|
invalid: r
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function jt(t, e, r) {
|
|
901
901
|
function n() {
|
|
902
902
|
const o = t.pendingIcons;
|
|
903
|
-
e.forEach((
|
|
904
|
-
o && o.delete(
|
|
903
|
+
e.forEach((i) => {
|
|
904
|
+
o && o.delete(i), t.icons[i] || t.missing.add(i);
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
if (r && typeof r == "object") try {
|
|
@@ -912,7 +912,7 @@ function $t(t, e, r) {
|
|
|
912
912
|
} catch (o) {
|
|
913
913
|
console.error(o);
|
|
914
914
|
}
|
|
915
|
-
n(),
|
|
915
|
+
n(), to(t);
|
|
916
916
|
}
|
|
917
917
|
function Ge(t, e) {
|
|
918
918
|
t instanceof Promise ? t.then((r) => {
|
|
@@ -921,47 +921,47 @@ function Ge(t, e) {
|
|
|
921
921
|
e(null);
|
|
922
922
|
}) : e(t);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function ro(t, e) {
|
|
925
925
|
t.iconsToLoad ? t.iconsToLoad = t.iconsToLoad.concat(e).sort() : t.iconsToLoad = e, t.iconsQueueFlag || (t.iconsQueueFlag = !0, setTimeout(() => {
|
|
926
926
|
t.iconsQueueFlag = !1;
|
|
927
927
|
const { provider: r, prefix: n } = t, o = t.iconsToLoad;
|
|
928
928
|
if (delete t.iconsToLoad, !o || !o.length) return;
|
|
929
|
-
const
|
|
930
|
-
if (t.loadIcons && (o.length > 1 || !
|
|
929
|
+
const i = t.loadIcon;
|
|
930
|
+
if (t.loadIcons && (o.length > 1 || !i)) {
|
|
931
931
|
Ge(t.loadIcons(o, n, r), (f) => {
|
|
932
|
-
|
|
932
|
+
jt(t, o, f);
|
|
933
933
|
});
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
-
if (
|
|
936
|
+
if (i) {
|
|
937
937
|
o.forEach((f) => {
|
|
938
|
-
const h =
|
|
938
|
+
const h = i(f, n, r);
|
|
939
939
|
Ge(h, (m) => {
|
|
940
940
|
const g = m ? {
|
|
941
941
|
prefix: n,
|
|
942
942
|
icons: { [f]: m }
|
|
943
943
|
} : null;
|
|
944
|
-
|
|
944
|
+
jt(t, [f], g);
|
|
945
945
|
});
|
|
946
946
|
});
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
|
-
const { valid:
|
|
950
|
-
if (c.length &&
|
|
949
|
+
const { valid: a, invalid: c } = eo(o);
|
|
950
|
+
if (c.length && jt(t, c, null), !a.length) return;
|
|
951
951
|
const s = n.match(Fr) ? we(r) : null;
|
|
952
952
|
if (!s) {
|
|
953
|
-
|
|
953
|
+
jt(t, a, null);
|
|
954
954
|
return;
|
|
955
955
|
}
|
|
956
|
-
s.prepare(r, n,
|
|
957
|
-
|
|
958
|
-
|
|
956
|
+
s.prepare(r, n, a).forEach((f) => {
|
|
957
|
+
Zn(r, f, (h) => {
|
|
958
|
+
jt(t, f.icons, h);
|
|
959
959
|
});
|
|
960
960
|
});
|
|
961
961
|
}));
|
|
962
962
|
}
|
|
963
|
-
const
|
|
964
|
-
const r =
|
|
963
|
+
const no = (t, e) => {
|
|
964
|
+
const r = Gn(t, !0, Nr()), n = Kn(r);
|
|
965
965
|
if (!n.pending.length) {
|
|
966
966
|
let s = !0;
|
|
967
967
|
return e && setTimeout(() => {
|
|
@@ -970,33 +970,33 @@ const ro = (t, e) => {
|
|
|
970
970
|
s = !1;
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
|
-
const o = /* @__PURE__ */ Object.create(null),
|
|
974
|
-
let
|
|
973
|
+
const o = /* @__PURE__ */ Object.create(null), i = [];
|
|
974
|
+
let a, c;
|
|
975
975
|
return n.pending.forEach((s) => {
|
|
976
|
-
const { provider:
|
|
977
|
-
if (f === c &&
|
|
978
|
-
|
|
979
|
-
const h = o[
|
|
976
|
+
const { provider: d, prefix: f } = s;
|
|
977
|
+
if (f === c && d === a) return;
|
|
978
|
+
a = d, c = f, i.push(Nt(d, f));
|
|
979
|
+
const h = o[d] || (o[d] = /* @__PURE__ */ Object.create(null));
|
|
980
980
|
h[f] || (h[f] = []);
|
|
981
981
|
}), n.pending.forEach((s) => {
|
|
982
|
-
const { provider:
|
|
983
|
-
g.has(h) || (g.add(h), o[
|
|
984
|
-
}),
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
}), e ?
|
|
982
|
+
const { provider: d, prefix: f, name: h } = s, m = Nt(d, f), g = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
|
|
983
|
+
g.has(h) || (g.add(h), o[d][f].push(h));
|
|
984
|
+
}), i.forEach((s) => {
|
|
985
|
+
const d = o[s.provider][s.prefix];
|
|
986
|
+
d.length && ro(s, d);
|
|
987
|
+
}), e ? Jn(e, n, i) : Ke;
|
|
988
988
|
};
|
|
989
|
-
function
|
|
989
|
+
function oo(t, e) {
|
|
990
990
|
const r = { ...t };
|
|
991
991
|
for (const n in e) {
|
|
992
|
-
const o = e[n],
|
|
993
|
-
n in Er ? (o === null || o && (
|
|
992
|
+
const o = e[n], i = typeof o;
|
|
993
|
+
n in Er ? (o === null || o && (i === "string" || i === "number")) && (r[n] = o) : i === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
|
|
994
994
|
}
|
|
995
995
|
return r;
|
|
996
996
|
}
|
|
997
|
-
const
|
|
997
|
+
const io = /[\s,]+/;
|
|
998
998
|
function ao(t, e) {
|
|
999
|
-
e.split(
|
|
999
|
+
e.split(io).forEach((r) => {
|
|
1000
1000
|
switch (r.trim()) {
|
|
1001
1001
|
case "horizontal":
|
|
1002
1002
|
t.hFlip = !0;
|
|
@@ -1007,7 +1007,7 @@ function ao(t, e) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function so(t, e = 0) {
|
|
1011
1011
|
const r = t.replace(/^-?[0-9.]*/, "");
|
|
1012
1012
|
function n(o) {
|
|
1013
1013
|
for (; o < 0; ) o += 4;
|
|
@@ -1026,46 +1026,46 @@ function io(t, e = 0) {
|
|
|
1026
1026
|
o = 90;
|
|
1027
1027
|
}
|
|
1028
1028
|
if (o) {
|
|
1029
|
-
let
|
|
1030
|
-
return isNaN(
|
|
1029
|
+
let i = parseFloat(t.slice(0, t.length - r.length));
|
|
1030
|
+
return isNaN(i) ? 0 : (i = i / o, i % 1 === 0 ? n(i) : 0);
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
return e;
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1035
|
+
function co(t, e) {
|
|
1036
1036
|
let r = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1037
1037
|
for (const n in e) r += " " + n + '="' + e[n] + '"';
|
|
1038
1038
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + r + ">" + t + "</svg>";
|
|
1039
1039
|
}
|
|
1040
|
-
function co(t) {
|
|
1041
|
-
return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1042
|
-
}
|
|
1043
1040
|
function lo(t) {
|
|
1044
|
-
return "
|
|
1041
|
+
return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1045
1042
|
}
|
|
1046
1043
|
function uo(t) {
|
|
1047
|
-
return
|
|
1044
|
+
return "data:image/svg+xml," + lo(t);
|
|
1045
|
+
}
|
|
1046
|
+
function fo(t) {
|
|
1047
|
+
return 'url("' + uo(t) + '")';
|
|
1048
1048
|
}
|
|
1049
|
-
let
|
|
1050
|
-
function
|
|
1049
|
+
let zt;
|
|
1050
|
+
function po() {
|
|
1051
1051
|
try {
|
|
1052
|
-
|
|
1052
|
+
zt = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
|
|
1053
1053
|
} catch {
|
|
1054
|
-
|
|
1054
|
+
zt = null;
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1058
|
-
return
|
|
1057
|
+
function ho(t) {
|
|
1058
|
+
return zt === void 0 && po(), zt ? zt.createHTML(t) : t;
|
|
1059
1059
|
}
|
|
1060
1060
|
const jr = {
|
|
1061
1061
|
...Tr,
|
|
1062
1062
|
inline: !1
|
|
1063
|
-
},
|
|
1063
|
+
}, mo = {
|
|
1064
1064
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1065
1065
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1066
1066
|
"aria-hidden": !0,
|
|
1067
1067
|
role: "img"
|
|
1068
|
-
},
|
|
1068
|
+
}, go = {
|
|
1069
1069
|
display: "inline-block"
|
|
1070
1070
|
}, ye = {
|
|
1071
1071
|
backgroundColor: "currentColor"
|
|
@@ -1085,32 +1085,32 @@ for (const t in Qe) {
|
|
|
1085
1085
|
for (const r in We)
|
|
1086
1086
|
e[t + r] = We[r];
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1088
|
+
const wo = {
|
|
1089
1089
|
...jr,
|
|
1090
1090
|
inline: !0
|
|
1091
1091
|
};
|
|
1092
1092
|
function Xe(t) {
|
|
1093
1093
|
return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1094
1094
|
}
|
|
1095
|
-
const
|
|
1096
|
-
const n = e.inline ?
|
|
1097
|
-
...
|
|
1095
|
+
const yo = (t, e, r) => {
|
|
1096
|
+
const n = e.inline ? wo : jr, o = oo(n, e), i = e.mode || "svg", a = {}, c = e.style || {}, s = {
|
|
1097
|
+
...i === "svg" ? mo : {}
|
|
1098
1098
|
};
|
|
1099
1099
|
if (r) {
|
|
1100
|
-
const w =
|
|
1100
|
+
const w = ee(r, !1, !0);
|
|
1101
1101
|
if (w) {
|
|
1102
|
-
const
|
|
1102
|
+
const k = ["iconify"], M = [
|
|
1103
1103
|
"provider",
|
|
1104
1104
|
"prefix"
|
|
1105
1105
|
];
|
|
1106
|
-
for (const
|
|
1107
|
-
w[
|
|
1108
|
-
s.className =
|
|
1106
|
+
for (const O of M)
|
|
1107
|
+
w[O] && k.push("iconify--" + w[O]);
|
|
1108
|
+
s.className = k.join(" ");
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
for (let w in e) {
|
|
1112
|
-
const
|
|
1113
|
-
if (
|
|
1112
|
+
const k = e[w];
|
|
1113
|
+
if (k !== void 0)
|
|
1114
1114
|
switch (w) {
|
|
1115
1115
|
// Properties to ignore
|
|
1116
1116
|
case "icon":
|
|
@@ -1123,68 +1123,68 @@ const wo = (t, e, r) => {
|
|
|
1123
1123
|
break;
|
|
1124
1124
|
// Forward ref
|
|
1125
1125
|
case "_ref":
|
|
1126
|
-
s.ref =
|
|
1126
|
+
s.ref = k;
|
|
1127
1127
|
break;
|
|
1128
1128
|
// Merge class names
|
|
1129
1129
|
case "className":
|
|
1130
|
-
s[w] = (s[w] ? s[w] + " " : "") +
|
|
1130
|
+
s[w] = (s[w] ? s[w] + " " : "") + k;
|
|
1131
1131
|
break;
|
|
1132
1132
|
// Boolean attributes
|
|
1133
1133
|
case "inline":
|
|
1134
1134
|
case "hFlip":
|
|
1135
1135
|
case "vFlip":
|
|
1136
|
-
o[w] =
|
|
1136
|
+
o[w] = k === !0 || k === "true" || k === 1;
|
|
1137
1137
|
break;
|
|
1138
1138
|
// Flip as string: 'horizontal,vertical'
|
|
1139
1139
|
case "flip":
|
|
1140
|
-
typeof
|
|
1140
|
+
typeof k == "string" && ao(o, k);
|
|
1141
1141
|
break;
|
|
1142
1142
|
// Color: copy to style
|
|
1143
1143
|
case "color":
|
|
1144
|
-
|
|
1144
|
+
a.color = k;
|
|
1145
1145
|
break;
|
|
1146
1146
|
// Rotation as string
|
|
1147
1147
|
case "rotate":
|
|
1148
|
-
typeof
|
|
1148
|
+
typeof k == "string" ? o[w] = so(k) : typeof k == "number" && (o[w] = k);
|
|
1149
1149
|
break;
|
|
1150
1150
|
// Remove aria-hidden
|
|
1151
1151
|
case "ariaHidden":
|
|
1152
1152
|
case "aria-hidden":
|
|
1153
|
-
|
|
1153
|
+
k !== !0 && k !== "true" && delete s["aria-hidden"];
|
|
1154
1154
|
break;
|
|
1155
1155
|
// Copy missing property if it does not exist in customisations
|
|
1156
1156
|
default:
|
|
1157
|
-
n[w] === void 0 && (s[w] =
|
|
1157
|
+
n[w] === void 0 && (s[w] = k);
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
const
|
|
1161
|
-
if (o.inline && (
|
|
1160
|
+
const d = Pn(t, o), f = d.attributes;
|
|
1161
|
+
if (o.inline && (a.verticalAlign = "-0.125em"), i === "svg") {
|
|
1162
1162
|
s.style = {
|
|
1163
|
-
...
|
|
1163
|
+
...a,
|
|
1164
1164
|
...c
|
|
1165
1165
|
}, Object.assign(s, f);
|
|
1166
|
-
let w = 0,
|
|
1167
|
-
return typeof
|
|
1168
|
-
__html:
|
|
1166
|
+
let w = 0, k = e.id;
|
|
1167
|
+
return typeof k == "string" && (k = k.replace(/-/g, "_")), s.dangerouslySetInnerHTML = {
|
|
1168
|
+
__html: ho(An(d.body, k ? () => k + "ID" + w++ : "iconifyReact"))
|
|
1169
1169
|
}, fe("svg", s);
|
|
1170
1170
|
}
|
|
1171
|
-
const { body: h, width: m, height: g } = t,
|
|
1171
|
+
const { body: h, width: m, height: g } = t, S = i === "mask" || (i === "bg" ? !1 : h.indexOf("currentColor") !== -1), T = co(h, {
|
|
1172
1172
|
...f,
|
|
1173
1173
|
width: m + "",
|
|
1174
1174
|
height: g + ""
|
|
1175
1175
|
});
|
|
1176
1176
|
return s.style = {
|
|
1177
|
-
...
|
|
1178
|
-
"--svg":
|
|
1177
|
+
...a,
|
|
1178
|
+
"--svg": fo(T),
|
|
1179
1179
|
width: Xe(f.width),
|
|
1180
1180
|
height: Xe(f.height),
|
|
1181
|
-
...
|
|
1182
|
-
...
|
|
1181
|
+
...go,
|
|
1182
|
+
...S ? ye : $r,
|
|
1183
1183
|
...c
|
|
1184
1184
|
}, fe("span", s);
|
|
1185
1185
|
};
|
|
1186
1186
|
Nr(!0);
|
|
1187
|
-
|
|
1187
|
+
Ln("", Hn);
|
|
1188
1188
|
if (typeof document < "u" && typeof window < "u") {
|
|
1189
1189
|
const t = window;
|
|
1190
1190
|
if (t.IconifyPreload !== void 0) {
|
|
@@ -1194,7 +1194,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1194
1194
|
// Check if item is an object and not null/array
|
|
1195
1195
|
(typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
|
|
1196
1196
|
typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
|
|
1197
|
-
!
|
|
1197
|
+
!In(n)) && console.error(r);
|
|
1198
1198
|
} catch {
|
|
1199
1199
|
console.error(r);
|
|
1200
1200
|
}
|
|
@@ -1209,7 +1209,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1209
1209
|
const o = e[r];
|
|
1210
1210
|
if (typeof o != "object" || !o || o.resources === void 0)
|
|
1211
1211
|
continue;
|
|
1212
|
-
|
|
1212
|
+
zn(r, o) || console.error(n);
|
|
1213
1213
|
} catch {
|
|
1214
1214
|
console.error(n);
|
|
1215
1215
|
}
|
|
@@ -1217,62 +1217,62 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
function Ar(t) {
|
|
1220
|
-
const [e, r] =
|
|
1221
|
-
function
|
|
1220
|
+
const [e, r] = L(!!t.ssr), [n, o] = L({});
|
|
1221
|
+
function i(g) {
|
|
1222
1222
|
if (g) {
|
|
1223
|
-
const
|
|
1224
|
-
if (typeof
|
|
1223
|
+
const S = t.icon;
|
|
1224
|
+
if (typeof S == "object")
|
|
1225
1225
|
return {
|
|
1226
1226
|
name: "",
|
|
1227
|
-
data:
|
|
1227
|
+
data: S
|
|
1228
1228
|
};
|
|
1229
|
-
const
|
|
1230
|
-
if (
|
|
1229
|
+
const T = He(S);
|
|
1230
|
+
if (T)
|
|
1231
1231
|
return {
|
|
1232
|
-
name:
|
|
1233
|
-
data:
|
|
1232
|
+
name: S,
|
|
1233
|
+
data: T
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
1236
|
return {
|
|
1237
1237
|
name: ""
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
const [
|
|
1240
|
+
const [a, c] = L(i(!!t.ssr));
|
|
1241
1241
|
function s() {
|
|
1242
1242
|
const g = n.callback;
|
|
1243
1243
|
g && (g(), o({}));
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1246
|
-
if (JSON.stringify(
|
|
1245
|
+
function d(g) {
|
|
1246
|
+
if (JSON.stringify(a) !== JSON.stringify(g))
|
|
1247
1247
|
return s(), c(g), !0;
|
|
1248
1248
|
}
|
|
1249
1249
|
function f() {
|
|
1250
1250
|
var g;
|
|
1251
|
-
const
|
|
1252
|
-
if (typeof
|
|
1253
|
-
|
|
1251
|
+
const S = t.icon;
|
|
1252
|
+
if (typeof S == "object") {
|
|
1253
|
+
d({
|
|
1254
1254
|
name: "",
|
|
1255
|
-
data:
|
|
1255
|
+
data: S
|
|
1256
1256
|
});
|
|
1257
1257
|
return;
|
|
1258
1258
|
}
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
name:
|
|
1262
|
-
data:
|
|
1259
|
+
const T = He(S);
|
|
1260
|
+
if (d({
|
|
1261
|
+
name: S,
|
|
1262
|
+
data: T
|
|
1263
1263
|
}))
|
|
1264
|
-
if (
|
|
1265
|
-
const w =
|
|
1264
|
+
if (T === void 0) {
|
|
1265
|
+
const w = no([S], f);
|
|
1266
1266
|
o({
|
|
1267
1267
|
callback: w
|
|
1268
1268
|
});
|
|
1269
|
-
} else
|
|
1269
|
+
} else T && ((g = t.onLoad) === null || g === void 0 || g.call(t, S));
|
|
1270
1270
|
}
|
|
1271
|
-
|
|
1271
|
+
lt(() => (r(!0), s), []), lt(() => {
|
|
1272
1272
|
e && f();
|
|
1273
1273
|
}, [t.icon, e]);
|
|
1274
|
-
const { name: h, data: m } =
|
|
1275
|
-
return m ?
|
|
1274
|
+
const { name: h, data: m } = a;
|
|
1275
|
+
return m ? yo({
|
|
1276
1276
|
...Se,
|
|
1277
1277
|
...m
|
|
1278
1278
|
}, t, h) : t.children ? t.children : t.fallback ? t.fallback : fe("span", {});
|
|
@@ -1286,39 +1286,39 @@ hr((t, e) => Ar({
|
|
|
1286
1286
|
...t,
|
|
1287
1287
|
_ref: e
|
|
1288
1288
|
}));
|
|
1289
|
-
function
|
|
1290
|
-
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] =
|
|
1291
|
-
return
|
|
1289
|
+
function bo() {
|
|
1290
|
+
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = L(t);
|
|
1291
|
+
return lt(() => {
|
|
1292
1292
|
const n = () => r(t());
|
|
1293
1293
|
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
1294
1294
|
}, []), e;
|
|
1295
1295
|
}
|
|
1296
|
-
const
|
|
1296
|
+
const xo = ({
|
|
1297
1297
|
product: t
|
|
1298
1298
|
}) => {
|
|
1299
|
-
const e = mr(), r =
|
|
1299
|
+
const e = mr(), r = bo(), [n, o] = L(0), i = () => {
|
|
1300
1300
|
o(
|
|
1301
1301
|
(s) => s + r >= t.length ? 0 : s + r
|
|
1302
1302
|
);
|
|
1303
|
-
},
|
|
1303
|
+
}, a = () => {
|
|
1304
1304
|
o(
|
|
1305
1305
|
(s) => s - r < 0 ? t.length - (t.length % r || r) : s - r
|
|
1306
1306
|
);
|
|
1307
1307
|
}, c = async (s) => {
|
|
1308
|
-
const
|
|
1309
|
-
e(he(
|
|
1308
|
+
const d = await kr(s);
|
|
1309
|
+
e(he(d));
|
|
1310
1310
|
};
|
|
1311
1311
|
return /* @__PURE__ */ l("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ p("div", { className: "flex items-center justify-center gap-4 relative", children: [
|
|
1312
1312
|
(t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
|
|
1313
1313
|
"button",
|
|
1314
1314
|
{
|
|
1315
|
-
onClick:
|
|
1315
|
+
onClick: a,
|
|
1316
1316
|
className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
|
|
1317
1317
|
children: /* @__PURE__ */ l(Ze, { icon: "mdi:chevron-left", width: "25" })
|
|
1318
1318
|
}
|
|
1319
1319
|
),
|
|
1320
1320
|
/* @__PURE__ */ l("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(n, n + r).map((s) => {
|
|
1321
|
-
var
|
|
1321
|
+
var d, f, h, m;
|
|
1322
1322
|
return /* @__PURE__ */ p(
|
|
1323
1323
|
"div",
|
|
1324
1324
|
{
|
|
@@ -1330,7 +1330,7 @@ const bo = ({
|
|
|
1330
1330
|
/* @__PURE__ */ l("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ l(
|
|
1331
1331
|
"img",
|
|
1332
1332
|
{
|
|
1333
|
-
src: ((
|
|
1333
|
+
src: ((d = Me(s)[0]) == null ? void 0 : d.link) || Me(s)[0] || // fallback if it's a string
|
|
1334
1334
|
"https://via.placeholder.com/120",
|
|
1335
1335
|
alt: s != null && s.productName ? s.productName : "Product",
|
|
1336
1336
|
className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
|
|
@@ -1365,7 +1365,7 @@ const bo = ({
|
|
|
1365
1365
|
)
|
|
1366
1366
|
] }),
|
|
1367
1367
|
/* @__PURE__ */ p("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
|
|
1368
|
-
/* @__PURE__ */ l("p", { children:
|
|
1368
|
+
/* @__PURE__ */ l("p", { children: mn(
|
|
1369
1369
|
s != null && s.price ? Number(s == null ? void 0 : s.price) : Ue(s).centAmount || 0,
|
|
1370
1370
|
(m = Ue(s)) == null ? void 0 : m.currencyCode
|
|
1371
1371
|
) }),
|
|
@@ -1385,13 +1385,13 @@ const bo = ({
|
|
|
1385
1385
|
(t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
|
|
1386
1386
|
"button",
|
|
1387
1387
|
{
|
|
1388
|
-
onClick:
|
|
1388
|
+
onClick: i,
|
|
1389
1389
|
className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
|
|
1390
1390
|
children: /* @__PURE__ */ l(Ze, { icon: "mdi:chevron-right", width: "25" })
|
|
1391
1391
|
}
|
|
1392
1392
|
)
|
|
1393
1393
|
] }) });
|
|
1394
|
-
},
|
|
1394
|
+
}, vo = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ l("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, n) => /* @__PURE__ */ p(
|
|
1395
1395
|
"div",
|
|
1396
1396
|
{
|
|
1397
1397
|
className: "mb-4 p-3 rounded-xl",
|
|
@@ -1404,11 +1404,11 @@ const bo = ({
|
|
|
1404
1404
|
"div",
|
|
1405
1405
|
{
|
|
1406
1406
|
className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
|
|
1407
|
-
children:
|
|
1407
|
+
children: gn(r.keyword) || "No keyword"
|
|
1408
1408
|
}
|
|
1409
1409
|
),
|
|
1410
1410
|
/* @__PURE__ */ l(
|
|
1411
|
-
|
|
1411
|
+
xo,
|
|
1412
1412
|
{
|
|
1413
1413
|
product: r.items,
|
|
1414
1414
|
storeDetails: e
|
|
@@ -1422,8 +1422,8 @@ const bo = ({
|
|
|
1422
1422
|
console.log(`customer_token
|
|
1423
1423
|
`, t);
|
|
1424
1424
|
try {
|
|
1425
|
-
return (await
|
|
1426
|
-
`${o}${n}/basket/create?baseUrl=${
|
|
1425
|
+
return (await D.post(
|
|
1426
|
+
`${o}${n}/basket/create?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
1427
1427
|
e,
|
|
1428
1428
|
{
|
|
1429
1429
|
headers: {
|
|
@@ -1432,14 +1432,14 @@ const bo = ({
|
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
1434
|
)).data;
|
|
1435
|
-
} catch (
|
|
1436
|
-
return
|
|
1435
|
+
} catch (i) {
|
|
1436
|
+
return D.isAxiosError(i) ? console.error("Error creating basket:", i.response || i.message) : console.error("Unexpected error:", i), null;
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1439
|
-
const { serverUrl: n, basePath: o } = wt(),
|
|
1438
|
+
}, Qt = async (t, e, r) => {
|
|
1439
|
+
const { serverUrl: n, basePath: o } = wt(), i = `${n}`;
|
|
1440
1440
|
try {
|
|
1441
|
-
const
|
|
1442
|
-
`${
|
|
1441
|
+
const a = await D.post(
|
|
1442
|
+
`${i}${o}/basket/add-product/${t}?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
1443
1443
|
e,
|
|
1444
1444
|
{
|
|
1445
1445
|
headers: {
|
|
@@ -1448,22 +1448,22 @@ const bo = ({
|
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
);
|
|
1451
|
-
return
|
|
1452
|
-
} catch (
|
|
1453
|
-
return
|
|
1451
|
+
return a.status === 200 && a.data ? a.data : null;
|
|
1452
|
+
} catch (a) {
|
|
1453
|
+
return D.isAxiosError(a) ? console.error(
|
|
1454
1454
|
"Error adding products to basket:",
|
|
1455
|
-
|
|
1456
|
-
) : console.error("Unexpected error:",
|
|
1455
|
+
a.response || a.message
|
|
1456
|
+
) : console.error("Unexpected error:", a), null;
|
|
1457
1457
|
}
|
|
1458
1458
|
}, zr = async ({
|
|
1459
1459
|
basketId: t,
|
|
1460
1460
|
customer_token: e
|
|
1461
1461
|
}) => {
|
|
1462
|
-
var
|
|
1462
|
+
var i;
|
|
1463
1463
|
const { serverUrl: r, basePath: n } = wt(), o = `${r}`;
|
|
1464
1464
|
try {
|
|
1465
|
-
const
|
|
1466
|
-
`${o}${n}/basket/${t}?baseUrl=${
|
|
1465
|
+
const a = await D.get(
|
|
1466
|
+
`${o}${n}/basket/${t}?baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
1467
1467
|
{
|
|
1468
1468
|
headers: {
|
|
1469
1469
|
"Content-Type": "application/json",
|
|
@@ -1471,140 +1471,140 @@ const bo = ({
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
);
|
|
1474
|
-
return { status:
|
|
1475
|
-
} catch (
|
|
1476
|
-
return
|
|
1474
|
+
return { status: a.status, data: a.data };
|
|
1475
|
+
} catch (a) {
|
|
1476
|
+
return D.isAxiosError(a) ? { status: (i = a.response) == null ? void 0 : i.status, data: null } : { status: null, data: null };
|
|
1477
1477
|
}
|
|
1478
|
-
}, tr = "sfcc_basket_id", er = "sfcc_customer_token",
|
|
1479
|
-
const
|
|
1478
|
+
}, tr = "sfcc_basket_id", er = "sfcc_customer_token", Mt = "sfcc_token_expiry", ko = 300 * 1e3, $t = "1.0.0";
|
|
1479
|
+
const Ft = (t) => {
|
|
1480
1480
|
try {
|
|
1481
1481
|
t ? localStorage.setItem(tr, t) : localStorage.removeItem(tr);
|
|
1482
1482
|
} catch (e) {
|
|
1483
1483
|
console.error("Error saving basket ID to storage:", e);
|
|
1484
1484
|
}
|
|
1485
|
-
},
|
|
1485
|
+
}, Xt = (t) => {
|
|
1486
1486
|
try {
|
|
1487
1487
|
if (t) {
|
|
1488
1488
|
localStorage.setItem(er, t);
|
|
1489
|
-
const e = Date.now() +
|
|
1490
|
-
localStorage.setItem(
|
|
1489
|
+
const e = Date.now() + ko;
|
|
1490
|
+
localStorage.setItem(Mt, e.toString());
|
|
1491
1491
|
} else
|
|
1492
1492
|
localStorage.removeItem(er);
|
|
1493
1493
|
} catch (e) {
|
|
1494
1494
|
console.error("Error storing token:", e);
|
|
1495
1495
|
}
|
|
1496
|
-
}, rr = 300,
|
|
1497
|
-
var c, s,
|
|
1498
|
-
const t = mr(), e =
|
|
1499
|
-
if (
|
|
1496
|
+
}, rr = 300, So = () => {
|
|
1497
|
+
var c, s, d, f, h, m;
|
|
1498
|
+
const t = mr(), e = Gt((g) => g.product.product), r = Gt((g) => g.store.store), [n, o] = L(!!e);
|
|
1499
|
+
if (lt(() => {
|
|
1500
1500
|
o(!!e);
|
|
1501
1501
|
}, [e]), !e) return null;
|
|
1502
|
-
const
|
|
1503
|
-
var g,
|
|
1502
|
+
const i = async () => {
|
|
1503
|
+
var g, S, T, w, k, M, O, P, Q, _, j, V, X, U, B, yt;
|
|
1504
1504
|
console.log(e, "the prod");
|
|
1505
1505
|
try {
|
|
1506
|
-
if (!((
|
|
1507
|
-
|
|
1506
|
+
if (!((S = (g = e == null ? void 0 : e.variants) == null ? void 0 : g[0]) != null && S.product_id) && !(e.type.item || e.type.bundle) && !((w = (T = e == null ? void 0 : e.variants) == null ? void 0 : T[0]) != null && w.productId)) {
|
|
1507
|
+
W.error("Variants not available", {
|
|
1508
1508
|
position: "bottom-right",
|
|
1509
1509
|
autoClose: 1e3
|
|
1510
1510
|
}), console.error("No product variant found");
|
|
1511
1511
|
return;
|
|
1512
1512
|
}
|
|
1513
|
-
const
|
|
1513
|
+
const y = [
|
|
1514
1514
|
{
|
|
1515
|
-
product_id: ((
|
|
1515
|
+
product_id: ((k = e.variants) == null ? void 0 : k[0].product_id) || ((M = e.variants) == null ? void 0 : M[0].productId) || (e == null ? void 0 : e.id),
|
|
1516
1516
|
quantity: 1
|
|
1517
1517
|
}
|
|
1518
1518
|
];
|
|
1519
|
-
console.log(
|
|
1520
|
-
const
|
|
1519
|
+
console.log(y, "the product data");
|
|
1520
|
+
const Tt = JSON.parse(
|
|
1521
1521
|
sessionStorage.getItem("customerData") || "{}"
|
|
1522
|
-
),
|
|
1523
|
-
if (!
|
|
1524
|
-
let
|
|
1522
|
+
), ht = Tt == null ? void 0 : Tt.basketId, re = !1, Ut = localStorage.getItem(Mt), rt = Date.now();
|
|
1523
|
+
if (!re || !Ut || rt >= parseInt(Ut)) {
|
|
1524
|
+
let R = "";
|
|
1525
1525
|
{
|
|
1526
|
-
const
|
|
1527
|
-
console.log("token from auth data"),
|
|
1526
|
+
const ot = await te();
|
|
1527
|
+
console.log("token from auth data"), R = "Bearer " + ot.access_token;
|
|
1528
1528
|
}
|
|
1529
|
-
if (!
|
|
1529
|
+
if (!R) {
|
|
1530
1530
|
console.error("Failed to get customer_token");
|
|
1531
1531
|
return;
|
|
1532
1532
|
}
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
basketId:
|
|
1537
|
-
customer_token:
|
|
1533
|
+
const Bt = rt + 300 * 1e3;
|
|
1534
|
+
if (Xt(R), localStorage.setItem(Mt, Bt.toString()), ht) {
|
|
1535
|
+
const ot = await zr({
|
|
1536
|
+
basketId: ht,
|
|
1537
|
+
customer_token: R
|
|
1538
1538
|
});
|
|
1539
|
-
if (console.log(
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1539
|
+
if (console.log(ht, "basket id from customer"), ot.status === 200 && ot) {
|
|
1540
|
+
const it = await Qt(
|
|
1541
|
+
ht,
|
|
1542
|
+
y,
|
|
1543
|
+
R
|
|
1544
1544
|
);
|
|
1545
|
-
(((
|
|
1545
|
+
(((O = it == null ? void 0 : it.product_items) == null ? void 0 : O.length) > 0 || ((P = it == null ? void 0 : it.productItems) == null ? void 0 : P.length) > 0) && (W.success("Added to cart", {
|
|
1546
1546
|
position: "bottom-right",
|
|
1547
1547
|
autoClose: 3e3,
|
|
1548
1548
|
hideProgressBar: !1,
|
|
1549
1549
|
closeOnClick: !0,
|
|
1550
1550
|
pauseOnHover: !0,
|
|
1551
1551
|
draggable: !0
|
|
1552
|
-
}),
|
|
1552
|
+
}), _t(ht));
|
|
1553
1553
|
return;
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
1556
|
const ne = {
|
|
1557
1557
|
productItems: [
|
|
1558
1558
|
{
|
|
1559
|
-
productId: ((
|
|
1559
|
+
productId: ((Q = e.variants) == null ? void 0 : Q[0].product_id) || ((_ = e.variants) == null ? void 0 : _[0].productId) || (e == null ? void 0 : e.id),
|
|
1560
1560
|
quantity: 1
|
|
1561
1561
|
}
|
|
1562
1562
|
]
|
|
1563
1563
|
};
|
|
1564
1564
|
console.log("before create basket");
|
|
1565
|
-
const
|
|
1565
|
+
const v = await Lr(R, ne);
|
|
1566
1566
|
if (console.log(
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1567
|
+
v,
|
|
1568
|
+
v == null ? void 0 : v.basket_id,
|
|
1569
|
+
v == null ? void 0 : v.basketId,
|
|
1570
1570
|
"the basket response"
|
|
1571
|
-
), !(
|
|
1571
|
+
), !(v != null && v.basket_id) && !(v != null && v.basketId)) {
|
|
1572
1572
|
console.error("Failed to create basket");
|
|
1573
1573
|
return;
|
|
1574
1574
|
}
|
|
1575
1575
|
console.log(
|
|
1576
1576
|
"setting stored id",
|
|
1577
|
-
(
|
|
1578
|
-
),
|
|
1579
|
-
(
|
|
1577
|
+
(v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
|
|
1578
|
+
), Ft(
|
|
1579
|
+
(v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
|
|
1580
1580
|
), console.log("adding product to basket");
|
|
1581
|
-
const
|
|
1582
|
-
(
|
|
1583
|
-
|
|
1584
|
-
|
|
1581
|
+
const nt = await Qt(
|
|
1582
|
+
(v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId),
|
|
1583
|
+
y,
|
|
1584
|
+
R
|
|
1585
1585
|
);
|
|
1586
|
-
console.log("object added to basket"), (((
|
|
1586
|
+
console.log("object added to basket"), (((j = nt == null ? void 0 : nt.product_items) == null ? void 0 : j.length) > 0 || ((V = nt == null ? void 0 : nt.productItems) == null ? void 0 : V.length) > 0) && W.success("Added to cart", {
|
|
1587
1587
|
position: "bottom-right",
|
|
1588
1588
|
autoClose: 3e3,
|
|
1589
1589
|
hideProgressBar: !1,
|
|
1590
1590
|
closeOnClick: !0,
|
|
1591
1591
|
pauseOnHover: !0,
|
|
1592
1592
|
draggable: !0
|
|
1593
|
-
}),
|
|
1593
|
+
}), _t(v.basket_id || (v == null ? void 0 : v.basketId));
|
|
1594
1594
|
}
|
|
1595
|
-
} catch (
|
|
1596
|
-
console.error("Error adding to cart:",
|
|
1595
|
+
} catch (y) {
|
|
1596
|
+
console.error("Error adding to cart:", y), W.error("Failed to add product to cart", {
|
|
1597
1597
|
position: "bottom-right",
|
|
1598
1598
|
autoClose: 3e3
|
|
1599
|
-
}), ((
|
|
1600
|
-
((
|
|
1599
|
+
}), ((X = y == null ? void 0 : y.response) == null ? void 0 : X.status) === 404 || // Basket not found
|
|
1600
|
+
((U = y == null ? void 0 : y.response) == null ? void 0 : U.status) === 401 ? (((B = y == null ? void 0 : y.response) == null ? void 0 : B.status) === 404 && Ft(null), ((yt = y == null ? void 0 : y.response) == null ? void 0 : yt.status) === 401 && (Ft(null), Xt(null))) : (console.error("Failed to add product to basket:", y.message), W.error("Failed to add product to cart", {
|
|
1601
1601
|
position: "bottom-right",
|
|
1602
1602
|
autoClose: 3e3
|
|
1603
1603
|
}));
|
|
1604
1604
|
} finally {
|
|
1605
|
-
|
|
1605
|
+
_t();
|
|
1606
1606
|
}
|
|
1607
|
-
},
|
|
1607
|
+
}, a = () => {
|
|
1608
1608
|
e && (window.location.href = e.c_pdpUrl);
|
|
1609
1609
|
};
|
|
1610
1610
|
return console.log(e, "the prod"), /* @__PURE__ */ p(pe, { children: [
|
|
@@ -1648,20 +1648,20 @@ const Nt = (t) => {
|
|
|
1648
1648
|
/* @__PURE__ */ l("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ l(
|
|
1649
1649
|
"img",
|
|
1650
1650
|
{
|
|
1651
|
-
src: (f = (
|
|
1651
|
+
src: (f = (d = (s = (c = e.imageGroups) == null ? void 0 : c[0]) == null ? void 0 : s.images) == null ? void 0 : d[0]) == null ? void 0 : f.link,
|
|
1652
1652
|
alt: e.name,
|
|
1653
1653
|
className: "rounded-[10px]"
|
|
1654
1654
|
}
|
|
1655
1655
|
) }),
|
|
1656
1656
|
/* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
|
|
1657
|
-
(g) => g.images.slice(1, 2).map((
|
|
1657
|
+
(g) => g.images.slice(1, 2).map((S) => /* @__PURE__ */ l(
|
|
1658
1658
|
"img",
|
|
1659
1659
|
{
|
|
1660
|
-
src:
|
|
1660
|
+
src: S.link,
|
|
1661
1661
|
alt: e.name,
|
|
1662
1662
|
className: "rounded-[10px] w-[60px] h-[60px]"
|
|
1663
1663
|
},
|
|
1664
|
-
|
|
1664
|
+
S.link
|
|
1665
1665
|
))
|
|
1666
1666
|
) })
|
|
1667
1667
|
] }),
|
|
@@ -1706,8 +1706,8 @@ const Nt = (t) => {
|
|
|
1706
1706
|
" ratings"
|
|
1707
1707
|
] })
|
|
1708
1708
|
] }) }),
|
|
1709
|
-
/* @__PURE__ */ l("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((g,
|
|
1710
|
-
var
|
|
1709
|
+
/* @__PURE__ */ l("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((g, S) => {
|
|
1710
|
+
var T;
|
|
1711
1711
|
return /* @__PURE__ */ l(
|
|
1712
1712
|
Le,
|
|
1713
1713
|
{
|
|
@@ -1715,10 +1715,10 @@ const Nt = (t) => {
|
|
|
1715
1715
|
width: "20",
|
|
1716
1716
|
height: "20",
|
|
1717
1717
|
className: `text-yellow-500
|
|
1718
|
-
${((
|
|
1718
|
+
${((T = e == null ? void 0 : e.rating) == null ? void 0 : T.rate) > S ? "text-yellow-500" : "text-gray-300"}
|
|
1719
1719
|
`
|
|
1720
1720
|
},
|
|
1721
|
-
|
|
1721
|
+
S
|
|
1722
1722
|
);
|
|
1723
1723
|
}) })
|
|
1724
1724
|
] }),
|
|
@@ -1733,7 +1733,7 @@ const Nt = (t) => {
|
|
|
1733
1733
|
{
|
|
1734
1734
|
className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
|
|
1735
1735
|
style: { backgroundColor: r.tanyaThemeColor },
|
|
1736
|
-
onClick:
|
|
1736
|
+
onClick: i,
|
|
1737
1737
|
children: "Add to Cart"
|
|
1738
1738
|
}
|
|
1739
1739
|
),
|
|
@@ -1742,7 +1742,7 @@ const Nt = (t) => {
|
|
|
1742
1742
|
{
|
|
1743
1743
|
className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
|
|
1744
1744
|
style: { backgroundColor: r.tanyaThemeColor },
|
|
1745
|
-
onClick:
|
|
1745
|
+
onClick: a,
|
|
1746
1746
|
children: "View more"
|
|
1747
1747
|
}
|
|
1748
1748
|
)
|
|
@@ -1753,53 +1753,53 @@ const Nt = (t) => {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
)
|
|
1755
1755
|
] });
|
|
1756
|
-
},
|
|
1757
|
-
|
|
1756
|
+
}, Io = ({
|
|
1757
|
+
tanyaConfig: t
|
|
1758
|
+
}) => {
|
|
1759
|
+
const e = [
|
|
1758
1760
|
"Myself",
|
|
1759
1761
|
"My Child",
|
|
1760
1762
|
"My Grandchild",
|
|
1761
1763
|
"Niece/Nephew",
|
|
1762
1764
|
"My Friends",
|
|
1763
1765
|
"Others"
|
|
1764
|
-
],
|
|
1766
|
+
], r = {
|
|
1765
1767
|
Myself: "himself/herself",
|
|
1766
1768
|
"My Child": "his/her child",
|
|
1767
1769
|
"My Grandchild": "his/her grandchild",
|
|
1768
1770
|
"Niece/Nephew": "his/her niece/nephew",
|
|
1769
1771
|
"My Friends": "his/her friends",
|
|
1770
1772
|
Others: "others"
|
|
1771
|
-
},
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
}, pt = () => {
|
|
1781
|
-
h(!1), setTimeout(() => g(!1), 300);
|
|
1773
|
+
}, n = Pt(null), o = Pt(null), i = Pt(null), a = Pt(null), [c, s] = L(null), [d, f] = L(!1), [h, m] = L(!1), [g, S] = L(!1), [T, w] = L(!1), [k, M] = L(!1), [O, P] = L(!1), [Q, _] = L(""), [j, V] = L(""), X = (u) => ({
|
|
1774
|
+
id: u.id,
|
|
1775
|
+
title: u.name,
|
|
1776
|
+
image: u.image ?? "",
|
|
1777
|
+
price: u.price ?? 0
|
|
1778
|
+
}), [U, B] = L([]), yt = Pt(null), y = Gt((u) => u.store.store), Tt = Gt((u) => u.product.product), ht = () => {
|
|
1779
|
+
S(!0), setTimeout(() => m(!0), 10);
|
|
1780
|
+
}, re = () => {
|
|
1781
|
+
m(!1), setTimeout(() => S(!1), 300);
|
|
1782
1782
|
};
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
}, [
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1783
|
+
lt(() => {
|
|
1784
|
+
d ? ht() : re();
|
|
1785
|
+
}, [d]);
|
|
1786
|
+
const Ut = (u) => {
|
|
1787
|
+
V(r[u]);
|
|
1788
1788
|
};
|
|
1789
|
-
|
|
1789
|
+
lt(() => {
|
|
1790
1790
|
yt.current && (yt.current.scrollTop += 150);
|
|
1791
|
-
}, [
|
|
1792
|
-
let
|
|
1793
|
-
const
|
|
1794
|
-
if (
|
|
1795
|
-
return
|
|
1791
|
+
}, [U]);
|
|
1792
|
+
let rt = null, R = null;
|
|
1793
|
+
const Bt = async () => {
|
|
1794
|
+
if (rt && R && Date.now() < R)
|
|
1795
|
+
return rt;
|
|
1796
1796
|
try {
|
|
1797
|
-
const
|
|
1797
|
+
const u = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", E = new URLSearchParams({
|
|
1798
1798
|
grant_type: "client_credentials",
|
|
1799
1799
|
client_id: "4i8rd70sgt961tc4dhskgf08c",
|
|
1800
1800
|
client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
|
|
1801
1801
|
scope: "default-m2m-resource-server-8xzfzo/read"
|
|
1802
|
-
}), I = await fetch(
|
|
1802
|
+
}), I = await fetch(u, {
|
|
1803
1803
|
method: "POST",
|
|
1804
1804
|
headers: {
|
|
1805
1805
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -1810,98 +1810,99 @@ const Nt = (t) => {
|
|
|
1810
1810
|
throw new Error(
|
|
1811
1811
|
`Token request failed! status: ${I.status}`
|
|
1812
1812
|
);
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1815
|
-
const
|
|
1816
|
-
return
|
|
1817
|
-
} catch (
|
|
1818
|
-
return console.error("Error obtaining JWT token:",
|
|
1813
|
+
const F = await I.json();
|
|
1814
|
+
rt = F.access_token;
|
|
1815
|
+
const b = F.expires_in || 3600;
|
|
1816
|
+
return R = Date.now() + (b - 60) * 1e3, rt;
|
|
1817
|
+
} catch (u) {
|
|
1818
|
+
return console.error("Error obtaining JWT token:", u), rt = null, R = null, null;
|
|
1819
1819
|
}
|
|
1820
|
-
},
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1820
|
+
}, ne = async () => {
|
|
1821
|
+
const u = await te();
|
|
1822
|
+
u != null && s(u);
|
|
1823
1823
|
};
|
|
1824
|
-
|
|
1825
|
-
|
|
1824
|
+
lt(() => {
|
|
1825
|
+
const { clientID: u, host: E, organizationID: I, shortCode: F, siteId: b } = t;
|
|
1826
|
+
console.log(t, "tanyaConfig"), t.siteId && (sessionStorage.setItem("Host", E), sessionStorage.setItem("SiteId", b), sessionStorage.setItem("pubCfg", u), sessionStorage.setItem("envRef", F), sessionStorage.setItem("orgRef", I)), ne(), console.log("scapi environment v1");
|
|
1826
1827
|
}, []);
|
|
1827
|
-
const
|
|
1828
|
-
const
|
|
1828
|
+
const v = async () => {
|
|
1829
|
+
const u = JSON.parse(
|
|
1829
1830
|
sessionStorage.getItem("customerData") || "{}"
|
|
1830
1831
|
).customerId;
|
|
1831
|
-
return (await
|
|
1832
|
-
},
|
|
1833
|
-
console.log("in secondary flow",
|
|
1834
|
-
const I = await
|
|
1835
|
-
if (console.log(I, "interests of customer",
|
|
1832
|
+
return (await hn(u || "")).c_interests;
|
|
1833
|
+
}, nt = async (u, E) => {
|
|
1834
|
+
console.log("in secondary flow", $t);
|
|
1835
|
+
const I = await v();
|
|
1836
|
+
if (console.log(I, "interests of customer", $t), !!I)
|
|
1836
1837
|
try {
|
|
1837
|
-
|
|
1838
|
-
(
|
|
1839
|
-
(
|
|
1838
|
+
B(
|
|
1839
|
+
(K) => K.map(
|
|
1840
|
+
(Z, tt) => tt === K.length - 1 ? { ...Z, secondaryLoading: !0 } : Z
|
|
1840
1841
|
)
|
|
1841
1842
|
);
|
|
1842
|
-
const
|
|
1843
|
-
if (!
|
|
1844
|
-
const
|
|
1843
|
+
const F = await Bt();
|
|
1844
|
+
if (!F) throw new Error("Failed to fetch token");
|
|
1845
|
+
const b = localStorage.getItem("customerNumber"), C = localStorage.getItem("isLoggedIn"), bt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
1845
1846
|
registered: String(C || !1),
|
|
1846
|
-
userId: String(
|
|
1847
|
-
}).toString()}`,
|
|
1847
|
+
userId: String(b || (/* @__PURE__ */ new Date()).getTime())
|
|
1848
|
+
}).toString()}`, xt = JSON.stringify({
|
|
1848
1849
|
flowId: "Q166PR519W",
|
|
1849
1850
|
flowAliasId: "HKFUVLWVH2",
|
|
1850
1851
|
input: {
|
|
1851
1852
|
loyaltyPoints: "",
|
|
1852
|
-
productName:
|
|
1853
|
+
productName: u,
|
|
1853
1854
|
productPoints: String(E || 0),
|
|
1854
1855
|
interests: I
|
|
1855
1856
|
}
|
|
1856
|
-
}),
|
|
1857
|
+
}), Y = await fetch(bt, {
|
|
1857
1858
|
signal: AbortSignal.timeout(3e4),
|
|
1858
1859
|
method: "POST",
|
|
1859
1860
|
headers: {
|
|
1860
1861
|
"Content-Type": "application/json",
|
|
1861
|
-
Authorization: `Bearer ${
|
|
1862
|
+
Authorization: `Bearer ${F}`
|
|
1862
1863
|
},
|
|
1863
|
-
body:
|
|
1864
|
+
body: xt
|
|
1864
1865
|
});
|
|
1865
|
-
if (!
|
|
1866
|
-
const
|
|
1867
|
-
let
|
|
1866
|
+
if (!Y.body) throw new Error("Readable stream not supported");
|
|
1867
|
+
const vt = Y.body.getReader(), kt = new TextDecoder();
|
|
1868
|
+
let J = "";
|
|
1868
1869
|
for (; ; ) {
|
|
1869
|
-
const { done:
|
|
1870
|
-
if (
|
|
1871
|
-
|
|
1872
|
-
const
|
|
1870
|
+
const { done: K, value: Z } = await vt.read();
|
|
1871
|
+
if (K) break;
|
|
1872
|
+
J += kt.decode(Z, { stream: !0 });
|
|
1873
|
+
const tt = J.split(`
|
|
1873
1874
|
`);
|
|
1874
|
-
|
|
1875
|
-
for (const at of
|
|
1875
|
+
J = tt.pop() || "";
|
|
1876
|
+
for (const at of tt)
|
|
1876
1877
|
if (at.startsWith("data:")) {
|
|
1877
|
-
const
|
|
1878
|
+
const x = at.slice(5).trim();
|
|
1878
1879
|
try {
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1881
|
-
(
|
|
1882
|
-
(q,
|
|
1880
|
+
const G = JSON.parse(x);
|
|
1881
|
+
G.index === 0 && B(
|
|
1882
|
+
($) => $.map(
|
|
1883
|
+
(q, st) => st === $.length - 1 ? {
|
|
1883
1884
|
...q,
|
|
1884
|
-
secondaryResponse:
|
|
1885
|
+
secondaryResponse: G.data,
|
|
1885
1886
|
secondaryLoading: !1
|
|
1886
1887
|
} : q
|
|
1887
1888
|
)
|
|
1888
1889
|
);
|
|
1889
|
-
} catch (
|
|
1890
|
-
|
|
1891
|
-
(
|
|
1892
|
-
(q,
|
|
1890
|
+
} catch (G) {
|
|
1891
|
+
B(
|
|
1892
|
+
($) => $.map(
|
|
1893
|
+
(q, st) => st === $.length - 1 ? { ...q, secondaryLoading: !1 } : q
|
|
1893
1894
|
)
|
|
1894
|
-
), console.error("Secondary flow JSON parse error:",
|
|
1895
|
+
), console.error("Secondary flow JSON parse error:", G);
|
|
1895
1896
|
}
|
|
1896
1897
|
}
|
|
1897
1898
|
}
|
|
1898
|
-
} catch (
|
|
1899
|
-
console.error("Secondary flow error:",
|
|
1899
|
+
} catch (F) {
|
|
1900
|
+
console.error("Secondary flow error:", F);
|
|
1900
1901
|
}
|
|
1901
|
-
},
|
|
1902
|
-
const E =
|
|
1902
|
+
}, ot = async (u) => {
|
|
1903
|
+
const E = u || Q.trim();
|
|
1903
1904
|
if (E) {
|
|
1904
|
-
|
|
1905
|
+
M(!0), _(""), n.current = null, o.current = null, i.current = null, a.current = null, B((I) => [
|
|
1905
1906
|
...I,
|
|
1906
1907
|
{
|
|
1907
1908
|
query: E,
|
|
@@ -1912,244 +1913,244 @@ const Nt = (t) => {
|
|
|
1912
1913
|
}
|
|
1913
1914
|
]);
|
|
1914
1915
|
try {
|
|
1915
|
-
const I =
|
|
1916
|
+
const I = j, F = localStorage.getItem("customerNumber"), b = localStorage.getItem("isLoggedIn"), C = await Bt();
|
|
1916
1917
|
if (!C)
|
|
1917
1918
|
throw new Error("Failed to obtain access token");
|
|
1918
|
-
const
|
|
1919
|
-
registered: String(
|
|
1920
|
-
userId: String(
|
|
1921
|
-
}).toString()}`,
|
|
1919
|
+
const bt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
1920
|
+
registered: String(b || !1),
|
|
1921
|
+
userId: String(F || (/* @__PURE__ */ new Date()).getTime())
|
|
1922
|
+
}).toString()}`, xt = JSON.stringify({
|
|
1922
1923
|
flowId: "MMHQKYI1NE",
|
|
1923
1924
|
flowAliasId: "SZF9ZK1ATE",
|
|
1924
1925
|
input: {
|
|
1925
1926
|
userPrompt: E,
|
|
1926
1927
|
whom: I
|
|
1927
1928
|
}
|
|
1928
|
-
}),
|
|
1929
|
+
}), Y = await fetch(bt, {
|
|
1929
1930
|
signal: AbortSignal.timeout(3e4),
|
|
1930
1931
|
method: "POST",
|
|
1931
1932
|
headers: {
|
|
1932
1933
|
"Content-Type": "application/json",
|
|
1933
1934
|
Authorization: `Bearer ${C}`
|
|
1934
1935
|
},
|
|
1935
|
-
body:
|
|
1936
|
+
body: xt
|
|
1936
1937
|
});
|
|
1937
|
-
if (!
|
|
1938
|
-
throw new Error(`HTTP error! status: ${
|
|
1939
|
-
if (!
|
|
1940
|
-
const
|
|
1941
|
-
let
|
|
1938
|
+
if (!Y.ok)
|
|
1939
|
+
throw new Error(`HTTP error! status: ${Y.status}`);
|
|
1940
|
+
if (!Y.body) throw new Error("Readable stream not supported");
|
|
1941
|
+
const vt = Y.body.getReader(), kt = new TextDecoder();
|
|
1942
|
+
let J = "", K = "";
|
|
1942
1943
|
for (; ; ) {
|
|
1943
1944
|
P(!0);
|
|
1944
|
-
const { done:
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
1947
|
-
const at =
|
|
1945
|
+
const { done: Z, value: tt } = await vt.read();
|
|
1946
|
+
if (Z) break;
|
|
1947
|
+
J += kt.decode(tt, { stream: !0 });
|
|
1948
|
+
const at = J.split(`
|
|
1948
1949
|
`);
|
|
1949
|
-
|
|
1950
|
-
for (const
|
|
1951
|
-
if (
|
|
1952
|
-
const
|
|
1950
|
+
J = at.pop() || "";
|
|
1951
|
+
for (const x of at)
|
|
1952
|
+
if (x.startsWith("data:")) {
|
|
1953
|
+
const G = x.slice(5).trim();
|
|
1953
1954
|
try {
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1955
|
+
const $ = JSON.parse(G);
|
|
1956
|
+
$.index == 1 && (K = $.data), B(
|
|
1956
1957
|
(q) => q.map(
|
|
1957
|
-
(
|
|
1958
|
-
...
|
|
1959
|
-
[
|
|
1960
|
-
} :
|
|
1958
|
+
(st, qt) => qt === q.length - 1 ? {
|
|
1959
|
+
...st,
|
|
1960
|
+
[$.index == 0 ? "response" : $.index == 1 ? "keywords" : $.index == 2 ? "potentialQuestions" : "end"]: $.data
|
|
1961
|
+
} : st
|
|
1961
1962
|
)
|
|
1962
1963
|
);
|
|
1963
|
-
} catch (
|
|
1964
|
-
console.error("Error parsing JSON:",
|
|
1964
|
+
} catch ($) {
|
|
1965
|
+
console.error("Error parsing JSON:", $);
|
|
1965
1966
|
}
|
|
1966
1967
|
}
|
|
1967
1968
|
}
|
|
1968
|
-
|
|
1969
|
+
Jr(it(K));
|
|
1969
1970
|
} catch (I) {
|
|
1970
1971
|
console.error("Error sending message to Tanya:", I);
|
|
1971
1972
|
} finally {
|
|
1972
|
-
|
|
1973
|
+
M(!1);
|
|
1973
1974
|
}
|
|
1974
1975
|
}
|
|
1975
|
-
},
|
|
1976
|
-
const E =
|
|
1976
|
+
}, it = (u) => {
|
|
1977
|
+
const E = u.match(
|
|
1977
1978
|
/top five relevant product or category names are: (.*)/i
|
|
1978
|
-
),
|
|
1979
|
-
return [...new Set(
|
|
1980
|
-
},
|
|
1981
|
-
if (console.log(
|
|
1982
|
-
console.log(
|
|
1983
|
-
const E =
|
|
1979
|
+
), b = (E ? E[1] : u).split(", ").map((H) => H.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
1980
|
+
return [...new Set(b)].filter(Boolean).join(",");
|
|
1981
|
+
}, Jr = async (u) => {
|
|
1982
|
+
if (console.log(c == null ? void 0 : c.access_token, "access_token"), typeof u == "string") {
|
|
1983
|
+
console.log(u, "keywords");
|
|
1984
|
+
const E = u.split(",");
|
|
1984
1985
|
for (const I of E) {
|
|
1985
|
-
const
|
|
1986
|
+
const F = await ze(
|
|
1986
1987
|
I,
|
|
1987
|
-
|
|
1988
|
+
c == null ? void 0 : c.access_token
|
|
1988
1989
|
);
|
|
1989
|
-
if (P(!1), (
|
|
1990
|
-
(
|
|
1991
|
-
(C,
|
|
1990
|
+
if (P(!1), (F == null ? void 0 : F.length) > 0 && (B(
|
|
1991
|
+
(b) => b.map(
|
|
1992
|
+
(C, H) => H === b.length - 1 ? {
|
|
1992
1993
|
...C,
|
|
1993
1994
|
products: [
|
|
1994
1995
|
...C.products || [],
|
|
1995
|
-
{ keyword: I, items:
|
|
1996
|
+
{ keyword: I, items: F, loading: !1 }
|
|
1996
1997
|
]
|
|
1997
1998
|
} : C
|
|
1998
1999
|
)
|
|
1999
|
-
), !
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2002
|
-
const C = typeof (
|
|
2000
|
+
), !n.current || o.current == null)) {
|
|
2001
|
+
const b = F[0];
|
|
2002
|
+
n.current = String((b == null ? void 0 : b.product_name) ?? ""), i.current = b.image.link, o.current = b.product_id;
|
|
2003
|
+
const C = typeof (b == null ? void 0 : b.price) == "number" ? b.price : void 0;
|
|
2003
2004
|
a.current = typeof C == "number" && Number.isFinite(C) ? C : null;
|
|
2004
2005
|
}
|
|
2005
2006
|
}
|
|
2006
2007
|
} else
|
|
2007
|
-
for (const E of
|
|
2008
|
+
for (const E of u) {
|
|
2008
2009
|
const I = await ze(
|
|
2009
2010
|
E,
|
|
2010
|
-
|
|
2011
|
+
c == null ? void 0 : c.access_token
|
|
2011
2012
|
);
|
|
2012
|
-
P(!1), (I == null ? void 0 : I.length) > 0 &&
|
|
2013
|
-
(
|
|
2014
|
-
(
|
|
2015
|
-
...
|
|
2013
|
+
P(!1), (I == null ? void 0 : I.length) > 0 && B(
|
|
2014
|
+
(F) => F.map(
|
|
2015
|
+
(b, C) => C === F.length - 1 ? {
|
|
2016
|
+
...b,
|
|
2016
2017
|
products: [
|
|
2017
|
-
...
|
|
2018
|
+
...b.products || [],
|
|
2018
2019
|
{ keyword: E, items: I, loading: !1 }
|
|
2019
2020
|
]
|
|
2020
|
-
} :
|
|
2021
|
+
} : b
|
|
2021
2022
|
)
|
|
2022
2023
|
);
|
|
2023
2024
|
}
|
|
2024
|
-
if (
|
|
2025
|
-
|
|
2025
|
+
if (n.current) {
|
|
2026
|
+
B(
|
|
2026
2027
|
(I) => I.map(
|
|
2027
|
-
(
|
|
2028
|
-
...
|
|
2028
|
+
(F, b) => b === I.length - 1 ? {
|
|
2029
|
+
...F,
|
|
2029
2030
|
productSnapshot: {
|
|
2030
|
-
id:
|
|
2031
|
-
name:
|
|
2032
|
-
image:
|
|
2031
|
+
id: o.current,
|
|
2032
|
+
name: n.current,
|
|
2033
|
+
image: i.current,
|
|
2033
2034
|
price: a.current ?? null,
|
|
2034
2035
|
points: 0,
|
|
2035
2036
|
quantity: 1
|
|
2036
2037
|
}
|
|
2037
|
-
} :
|
|
2038
|
+
} : F
|
|
2038
2039
|
)
|
|
2039
2040
|
);
|
|
2040
2041
|
const E = JSON.parse(
|
|
2041
2042
|
sessionStorage.getItem("customerData") || "{}"
|
|
2042
2043
|
);
|
|
2043
|
-
(E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow",
|
|
2044
|
+
(E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow", $t), nt(n.current, 0)) : console.log("not running secondary flow", $t);
|
|
2044
2045
|
}
|
|
2045
2046
|
P(!1);
|
|
2046
|
-
},
|
|
2047
|
-
var I,
|
|
2048
|
-
|
|
2047
|
+
}, Kr = async (u, E) => {
|
|
2048
|
+
var I, F, b, C, H, bt, xt, Y, vt, kt, J, K, Z, tt, at;
|
|
2049
|
+
w(!0);
|
|
2049
2050
|
try {
|
|
2050
|
-
const
|
|
2051
|
-
if (!((
|
|
2052
|
-
|
|
2051
|
+
const x = await kr(u.id);
|
|
2052
|
+
if (!((F = (I = x == null ? void 0 : x.variants) == null ? void 0 : I[0]) != null && F.product_id || (C = (b = x == null ? void 0 : x.variants) == null ? void 0 : b[0]) != null && C.productId) && !(x.type.item || x.type.bundle)) {
|
|
2053
|
+
w(!1), W.error("Variants not found", {
|
|
2053
2054
|
position: "bottom-right",
|
|
2054
2055
|
autoClose: 1e3
|
|
2055
2056
|
}), console.error("No product variant found");
|
|
2056
2057
|
return;
|
|
2057
2058
|
}
|
|
2058
|
-
const
|
|
2059
|
+
const G = [
|
|
2059
2060
|
{
|
|
2060
|
-
product_id: ((
|
|
2061
|
+
product_id: ((H = x.variants) == null ? void 0 : H[0].product_id) || ((bt = x.variants) == null ? void 0 : bt[0].productId) || (x == null ? void 0 : x.id),
|
|
2061
2062
|
quantity: E
|
|
2062
2063
|
}
|
|
2063
2064
|
];
|
|
2064
|
-
console.log(
|
|
2065
|
-
const
|
|
2065
|
+
console.log(G, "product data", "app version", $t);
|
|
2066
|
+
const $ = JSON.parse(
|
|
2066
2067
|
sessionStorage.getItem("customerData") || "{}"
|
|
2067
|
-
), q =
|
|
2068
|
-
if (!
|
|
2069
|
-
const
|
|
2068
|
+
), q = $ == null ? void 0 : $.basketId, st = !1, qt = localStorage.getItem(Mt), $e = Date.now();
|
|
2069
|
+
if (!st || !qt || $e >= parseInt(qt)) {
|
|
2070
|
+
const Gr = await xr();
|
|
2070
2071
|
let { customer_token: mt } = await vr(
|
|
2071
|
-
|
|
2072
|
+
Gr
|
|
2072
2073
|
);
|
|
2073
|
-
if (mt = "Bearer " +
|
|
2074
|
+
if (mt = "Bearer " + c.access_token, !mt) {
|
|
2074
2075
|
console.error("Failed to get customer_token");
|
|
2075
2076
|
return;
|
|
2076
2077
|
}
|
|
2077
|
-
const
|
|
2078
|
-
if (
|
|
2078
|
+
const Wr = $e + 300 * 1e3;
|
|
2079
|
+
if (Xt(mt), localStorage.setItem(Mt, Wr.toString()), q) {
|
|
2079
2080
|
const Ae = await zr({
|
|
2080
2081
|
basketId: q,
|
|
2081
2082
|
customer_token: mt
|
|
2082
2083
|
});
|
|
2083
2084
|
if (Ae.status === 200 && Ae) {
|
|
2084
|
-
const oe = await
|
|
2085
|
+
const oe = await Qt(
|
|
2085
2086
|
q,
|
|
2086
|
-
|
|
2087
|
+
G,
|
|
2087
2088
|
mt
|
|
2088
2089
|
);
|
|
2089
|
-
((
|
|
2090
|
+
((xt = oe == null ? void 0 : oe.product_items) == null ? void 0 : xt.length) > 0 && (W.success("Added to cart", {
|
|
2090
2091
|
position: "bottom-right",
|
|
2091
2092
|
autoClose: 3e3,
|
|
2092
2093
|
hideProgressBar: !1,
|
|
2093
2094
|
closeOnClick: !0,
|
|
2094
2095
|
pauseOnHover: !0,
|
|
2095
2096
|
draggable: !0
|
|
2096
|
-
}),
|
|
2097
|
+
}), _t(q), w(!1));
|
|
2097
2098
|
return;
|
|
2098
2099
|
}
|
|
2099
2100
|
}
|
|
2100
|
-
const
|
|
2101
|
+
const Qr = {
|
|
2101
2102
|
productItems: [
|
|
2102
2103
|
{
|
|
2103
|
-
productId: ((
|
|
2104
|
+
productId: ((Y = x.variants) == null ? void 0 : Y[0].product_id) || ((vt = x.variants) == null ? void 0 : vt[0].productId) || (x == null ? void 0 : x.id),
|
|
2104
2105
|
quantity: 1
|
|
2105
2106
|
}
|
|
2106
2107
|
]
|
|
2107
|
-
},
|
|
2108
|
+
}, N = await Lr(mt, Qr);
|
|
2108
2109
|
if (console.log(
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2110
|
+
N,
|
|
2111
|
+
N == null ? void 0 : N.basket_id,
|
|
2112
|
+
N == null ? void 0 : N.basketId,
|
|
2112
2113
|
"the basket response"
|
|
2113
|
-
), !(
|
|
2114
|
-
|
|
2114
|
+
), !(N != null && N.basket_id || !(N != null && N.basketId))) {
|
|
2115
|
+
w(!1), console.error("Failed to create basket");
|
|
2115
2116
|
return;
|
|
2116
2117
|
}
|
|
2117
|
-
|
|
2118
|
-
(
|
|
2118
|
+
Ft(
|
|
2119
|
+
(N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId)
|
|
2119
2120
|
);
|
|
2120
|
-
const
|
|
2121
|
-
(
|
|
2122
|
-
|
|
2121
|
+
const St = await Qt(
|
|
2122
|
+
(N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId),
|
|
2123
|
+
G,
|
|
2123
2124
|
mt
|
|
2124
2125
|
);
|
|
2125
|
-
(((
|
|
2126
|
+
(((kt = St == null ? void 0 : St.product_items) == null ? void 0 : kt.length) > 0 || ((J = St == null ? void 0 : St.productItems) == null ? void 0 : J.length) > 0) && W.success("Added to cart", {
|
|
2126
2127
|
position: "bottom-right",
|
|
2127
2128
|
autoClose: 3e3,
|
|
2128
2129
|
hideProgressBar: !1,
|
|
2129
2130
|
closeOnClick: !0,
|
|
2130
2131
|
pauseOnHover: !0,
|
|
2131
2132
|
draggable: !0
|
|
2132
|
-
}),
|
|
2133
|
+
}), _t(N.basket_id || (N == null ? void 0 : N.basketId));
|
|
2133
2134
|
}
|
|
2134
|
-
} catch (
|
|
2135
|
-
|
|
2135
|
+
} catch (x) {
|
|
2136
|
+
w(!1), console.error("Error adding to cart:", x), W.error("Failed to add product to cart", {
|
|
2136
2137
|
position: "bottom-right",
|
|
2137
2138
|
autoClose: 3e3
|
|
2138
|
-
}), ((
|
|
2139
|
-
((
|
|
2139
|
+
}), ((K = x == null ? void 0 : x.response) == null ? void 0 : K.status) === 404 || // Basket not found
|
|
2140
|
+
((Z = x == null ? void 0 : x.response) == null ? void 0 : Z.status) === 401 ? (((tt = x == null ? void 0 : x.response) == null ? void 0 : tt.status) === 404 && Ft(null), ((at = x == null ? void 0 : x.response) == null ? void 0 : at.status) === 401 && (Ft(null), Xt(null))) : (console.error("Failed to add product to basket:", x.message), W.error("Failed to add product to cart", {
|
|
2140
2141
|
position: "bottom-right",
|
|
2141
2142
|
autoClose: 3e3
|
|
2142
2143
|
}));
|
|
2143
2144
|
} finally {
|
|
2144
|
-
|
|
2145
|
+
_t();
|
|
2145
2146
|
}
|
|
2146
|
-
|
|
2147
|
+
w(!1);
|
|
2147
2148
|
};
|
|
2148
|
-
return /* @__PURE__ */ l("div", { className: "relative flex justify-center", children: /* @__PURE__ */ p(
|
|
2149
|
+
return /* @__PURE__ */ l("div", { className: "relative flex justify-center", children: /* @__PURE__ */ p(fn, { open: d, onOpenChange: f, children: [
|
|
2149
2150
|
/* @__PURE__ */ l(
|
|
2150
|
-
|
|
2151
|
+
pn,
|
|
2151
2152
|
{
|
|
2152
|
-
onClick: () =>
|
|
2153
|
+
onClick: () => f(!0),
|
|
2153
2154
|
style: {
|
|
2154
2155
|
// background: storeDetails.tanyaThemeColor,
|
|
2155
2156
|
},
|
|
@@ -2209,12 +2210,12 @@ const Nt = (t) => {
|
|
|
2209
2210
|
) })
|
|
2210
2211
|
}
|
|
2211
2212
|
),
|
|
2212
|
-
|
|
2213
|
+
g && /* @__PURE__ */ p(pe, { children: [
|
|
2213
2214
|
/* @__PURE__ */ l(
|
|
2214
2215
|
"div",
|
|
2215
2216
|
{
|
|
2216
2217
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
2217
|
-
onClick: () =>
|
|
2218
|
+
onClick: () => f(!1)
|
|
2218
2219
|
}
|
|
2219
2220
|
),
|
|
2220
2221
|
/* @__PURE__ */ p(
|
|
@@ -2225,9 +2226,9 @@ const Nt = (t) => {
|
|
|
2225
2226
|
top-0 right-0
|
|
2226
2227
|
transition-transform duration-300 ease-in-out
|
|
2227
2228
|
lg:transform
|
|
2228
|
-
${
|
|
2229
|
+
${h ? "lg:translate-x-0" : "lg:translate-x-full"}
|
|
2229
2230
|
// For mobile: animate from bottom
|
|
2230
|
-
${
|
|
2231
|
+
${h ? "translate-y-0" : "translate-y-full"}
|
|
2231
2232
|
lg:translate-y-0
|
|
2232
2233
|
`,
|
|
2233
2234
|
style: {
|
|
@@ -2244,7 +2245,7 @@ const Nt = (t) => {
|
|
|
2244
2245
|
{
|
|
2245
2246
|
style: {
|
|
2246
2247
|
display: "flex",
|
|
2247
|
-
color:
|
|
2248
|
+
color: y.tanyaThemeContrastColor,
|
|
2248
2249
|
alignItems: "center",
|
|
2249
2250
|
gap: "0.5rem"
|
|
2250
2251
|
},
|
|
@@ -2305,7 +2306,7 @@ const Nt = (t) => {
|
|
|
2305
2306
|
gap: "1.25rem",
|
|
2306
2307
|
margin: "0.75rem"
|
|
2307
2308
|
},
|
|
2308
|
-
children: /* @__PURE__ */ l("button", { onClick: () =>
|
|
2309
|
+
children: /* @__PURE__ */ l("button", { onClick: () => f(!1), children: /* @__PURE__ */ p(
|
|
2309
2310
|
"svg",
|
|
2310
2311
|
{
|
|
2311
2312
|
width: "24",
|
|
@@ -2357,7 +2358,7 @@ const Nt = (t) => {
|
|
|
2357
2358
|
/* @__PURE__ */ p(
|
|
2358
2359
|
"div",
|
|
2359
2360
|
{
|
|
2360
|
-
className: `flex flex-col h-full ${
|
|
2361
|
+
className: `flex flex-col h-full ${Tt ? "lg:w-2/3 w-full" : "w-full"}`,
|
|
2361
2362
|
children: [
|
|
2362
2363
|
/* @__PURE__ */ p(
|
|
2363
2364
|
"div",
|
|
@@ -2365,38 +2366,38 @@ const Nt = (t) => {
|
|
|
2365
2366
|
ref: yt,
|
|
2366
2367
|
className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
|
|
2367
2368
|
children: [
|
|
2368
|
-
(
|
|
2369
|
+
(y == null ? void 0 : y.whomRequired) && /* @__PURE__ */ p(
|
|
2369
2370
|
"div",
|
|
2370
2371
|
{
|
|
2371
2372
|
className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
|
|
2372
2373
|
children: [
|
|
2373
2374
|
/* @__PURE__ */ l("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ l("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
|
|
2374
|
-
/* @__PURE__ */ l("div", { className: "flex flex-wrap gap-2 mt-2", children:
|
|
2375
|
+
/* @__PURE__ */ l("div", { className: "flex flex-wrap gap-2 mt-2", children: e.map((u) => /* @__PURE__ */ l(
|
|
2375
2376
|
"button",
|
|
2376
2377
|
{
|
|
2377
|
-
onClick: () =>
|
|
2378
|
+
onClick: () => Ut(u),
|
|
2378
2379
|
className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
|
|
2379
2380
|
style: {
|
|
2380
|
-
backgroundColor:
|
|
2381
|
-
borderColor:
|
|
2381
|
+
backgroundColor: j === r[u] ? "#FFFFFF" : "#F3F3F3",
|
|
2382
|
+
borderColor: j === r[u] ? "#BBB3DD" : ""
|
|
2382
2383
|
},
|
|
2383
|
-
children:
|
|
2384
|
+
children: u
|
|
2384
2385
|
},
|
|
2385
|
-
|
|
2386
|
+
u
|
|
2386
2387
|
)) })
|
|
2387
2388
|
]
|
|
2388
2389
|
}
|
|
2389
2390
|
),
|
|
2390
|
-
|
|
2391
|
-
var I,
|
|
2391
|
+
U.map((u, E) => {
|
|
2392
|
+
var I, F;
|
|
2392
2393
|
return /* @__PURE__ */ p("div", { children: [
|
|
2393
|
-
/* @__PURE__ */ l("div", { className: "flex justify-end", children: /* @__PURE__ */ l("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children:
|
|
2394
|
-
|
|
2394
|
+
/* @__PURE__ */ l("div", { className: "flex justify-end", children: /* @__PURE__ */ l("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: u.query }) }),
|
|
2395
|
+
u.response && u.response.includes("Thinking") ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
2395
2396
|
"div",
|
|
2396
2397
|
{
|
|
2397
2398
|
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",
|
|
2398
2399
|
dangerouslySetInnerHTML: {
|
|
2399
|
-
__html:
|
|
2400
|
+
__html: ie(u.response)
|
|
2400
2401
|
}
|
|
2401
2402
|
}
|
|
2402
2403
|
) }) : /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
@@ -2404,41 +2405,41 @@ const Nt = (t) => {
|
|
|
2404
2405
|
{
|
|
2405
2406
|
className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
|
|
2406
2407
|
dangerouslySetInnerHTML: {
|
|
2407
|
-
__html:
|
|
2408
|
+
__html: ie(u.response)
|
|
2408
2409
|
}
|
|
2409
2410
|
}
|
|
2410
2411
|
) }),
|
|
2411
|
-
|
|
2412
|
-
(
|
|
2413
|
-
|
|
2412
|
+
O && !u.response.includes("Thinking") && ((I = u.products) == null ? void 0 : I.length) == 0 && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
|
|
2413
|
+
(u == null ? void 0 : u.products) && ((F = u == null ? void 0 : u.products) == null ? void 0 : F.length) > 0 && /* @__PURE__ */ l(
|
|
2414
|
+
vo,
|
|
2414
2415
|
{
|
|
2415
|
-
chat:
|
|
2416
|
-
storeDetails:
|
|
2416
|
+
chat: u.products,
|
|
2417
|
+
storeDetails: y
|
|
2417
2418
|
}
|
|
2418
2419
|
),
|
|
2419
|
-
|
|
2420
|
+
u.potentialQuestions.length > 0 && /* @__PURE__ */ p("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
|
|
2420
2421
|
/* @__PURE__ */ l(
|
|
2421
2422
|
"p",
|
|
2422
2423
|
{
|
|
2423
2424
|
className: "font-nunitoSans font-bold text-sm text-[#494949]",
|
|
2424
|
-
style: { color:
|
|
2425
|
+
style: { color: y.themeDarkColor },
|
|
2425
2426
|
children: "Why not explore these inquiries..."
|
|
2426
2427
|
}
|
|
2427
2428
|
),
|
|
2428
|
-
|
|
2429
|
+
u.potentialQuestions.split(",").map((b, C) => /* @__PURE__ */ l(
|
|
2429
2430
|
"button",
|
|
2430
2431
|
{
|
|
2431
|
-
className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${
|
|
2432
|
-
onClick: () =>
|
|
2432
|
+
className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${y.themeDarkColor} m-1 rounded-xl px-2 py-1`,
|
|
2433
|
+
onClick: () => ot(b),
|
|
2433
2434
|
style: {
|
|
2434
|
-
backgroundColor:
|
|
2435
|
+
backgroundColor: y.tanyaThemeColorLight
|
|
2435
2436
|
},
|
|
2436
|
-
children:
|
|
2437
|
+
children: b
|
|
2437
2438
|
},
|
|
2438
2439
|
C
|
|
2439
2440
|
))
|
|
2440
2441
|
] }),
|
|
2441
|
-
|
|
2442
|
+
u.secondaryLoading && /* @__PURE__ */ l("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ p(
|
|
2442
2443
|
"div",
|
|
2443
2444
|
{
|
|
2444
2445
|
className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
|
|
@@ -2456,7 +2457,7 @@ const Nt = (t) => {
|
|
|
2456
2457
|
"p",
|
|
2457
2458
|
{
|
|
2458
2459
|
className: "font-semibold tanya-pulse",
|
|
2459
|
-
style: { color:
|
|
2460
|
+
style: { color: y.themeDarkColor },
|
|
2460
2461
|
children: "I’ve found a special surprise crafted just for you… hang on a sec!"
|
|
2461
2462
|
}
|
|
2462
2463
|
),
|
|
@@ -2464,35 +2465,35 @@ const Nt = (t) => {
|
|
|
2464
2465
|
"p",
|
|
2465
2466
|
{
|
|
2466
2467
|
className: "tanya-dots mt-1",
|
|
2467
|
-
style: { color:
|
|
2468
|
+
style: { color: y.themeDarkColor },
|
|
2468
2469
|
children: "• • •"
|
|
2469
2470
|
}
|
|
2470
2471
|
)
|
|
2471
2472
|
]
|
|
2472
2473
|
}
|
|
2473
2474
|
) }),
|
|
2474
|
-
|
|
2475
|
+
u.secondaryResponse && /* @__PURE__ */ l(pe, { children: /* @__PURE__ */ p("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
|
|
2475
2476
|
/* @__PURE__ */ l(
|
|
2476
2477
|
"div",
|
|
2477
2478
|
{
|
|
2478
2479
|
className: "text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",
|
|
2479
2480
|
style: {
|
|
2480
|
-
backgroundColor:
|
|
2481
|
+
backgroundColor: y.tanyaThemeColorLight
|
|
2481
2482
|
},
|
|
2482
2483
|
dangerouslySetInnerHTML: {
|
|
2483
|
-
__html:
|
|
2484
|
-
|
|
2484
|
+
__html: ie(
|
|
2485
|
+
u.secondaryResponse
|
|
2485
2486
|
)
|
|
2486
2487
|
}
|
|
2487
2488
|
}
|
|
2488
2489
|
),
|
|
2489
|
-
|
|
2490
|
+
u.productSnapshot && // chat.productSnapshot.points > 0 &&
|
|
2490
2491
|
/* @__PURE__ */ l("div", { className: "mt-4 w-full", children: /* @__PURE__ */ p(
|
|
2491
2492
|
"div",
|
|
2492
2493
|
{
|
|
2493
2494
|
className: "flex gap-4 items-stretch rounded-2xl p-4",
|
|
2494
2495
|
style: {
|
|
2495
|
-
backgroundColor:
|
|
2496
|
+
backgroundColor: y.tanyaThemeColorLight
|
|
2496
2497
|
},
|
|
2497
2498
|
children: [
|
|
2498
2499
|
/* @__PURE__ */ l(
|
|
@@ -2504,11 +2505,11 @@ const Nt = (t) => {
|
|
|
2504
2505
|
height: 112,
|
|
2505
2506
|
borderColor: "#eee"
|
|
2506
2507
|
},
|
|
2507
|
-
children:
|
|
2508
|
+
children: u.productSnapshot.image ? /* @__PURE__ */ l(
|
|
2508
2509
|
"img",
|
|
2509
2510
|
{
|
|
2510
|
-
src:
|
|
2511
|
-
alt:
|
|
2511
|
+
src: u.productSnapshot.image,
|
|
2512
|
+
alt: u.productSnapshot.name,
|
|
2512
2513
|
className: "w-full h-full object-cover"
|
|
2513
2514
|
}
|
|
2514
2515
|
) : /* @__PURE__ */ l("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
|
|
@@ -2516,18 +2517,18 @@ const Nt = (t) => {
|
|
|
2516
2517
|
),
|
|
2517
2518
|
/* @__PURE__ */ p("div", { className: "flex flex-col flex-1 justify-between", children: [
|
|
2518
2519
|
/* @__PURE__ */ p("div", { children: [
|
|
2519
|
-
/* @__PURE__ */ l("p", { className: "font-semibold text-[15px] leading-snug", children:
|
|
2520
|
-
/* @__PURE__ */ l("p", { className: "mt-1 text-[14px] font-medium", children:
|
|
2520
|
+
/* @__PURE__ */ l("p", { className: "font-semibold text-[15px] leading-snug", children: u.productSnapshot.name }),
|
|
2521
|
+
/* @__PURE__ */ l("p", { className: "mt-1 text-[14px] font-medium", children: u.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
|
|
2521
2522
|
style: "currency",
|
|
2522
|
-
currency: (
|
|
2523
|
+
currency: (y == null ? void 0 : y.currency) || "USD"
|
|
2523
2524
|
}).format(
|
|
2524
|
-
|
|
2525
|
+
u.productSnapshot.price
|
|
2525
2526
|
) : "" }),
|
|
2526
|
-
|
|
2527
|
+
u.productSnapshot.points > 0 && /* @__PURE__ */ p("p", { className: "mt-1 text-xs opacity-80", children: [
|
|
2527
2528
|
"You will earn",
|
|
2528
2529
|
" ",
|
|
2529
2530
|
/* @__PURE__ */ p("strong", { children: [
|
|
2530
|
-
|
|
2531
|
+
u.productSnapshot.points,
|
|
2531
2532
|
" ",
|
|
2532
2533
|
"points"
|
|
2533
2534
|
] })
|
|
@@ -2539,9 +2540,9 @@ const Nt = (t) => {
|
|
|
2539
2540
|
"button",
|
|
2540
2541
|
{
|
|
2541
2542
|
className: "px-3 py-1 text-sm",
|
|
2542
|
-
onClick: () =>
|
|
2543
|
-
(
|
|
2544
|
-
(C,
|
|
2543
|
+
onClick: () => B(
|
|
2544
|
+
(b) => b.map(
|
|
2545
|
+
(C, H) => H === E && C.productSnapshot ? {
|
|
2545
2546
|
...C,
|
|
2546
2547
|
productSnapshot: {
|
|
2547
2548
|
...C.productSnapshot,
|
|
@@ -2555,19 +2556,19 @@ const Nt = (t) => {
|
|
|
2555
2556
|
),
|
|
2556
2557
|
style: {
|
|
2557
2558
|
background: "transparent",
|
|
2558
|
-
color:
|
|
2559
|
+
color: y.themeDarkColor
|
|
2559
2560
|
},
|
|
2560
2561
|
children: "−"
|
|
2561
2562
|
}
|
|
2562
2563
|
),
|
|
2563
|
-
/* @__PURE__ */ l("div", { className: "px-3 py-1 text-sm select-none", children:
|
|
2564
|
+
/* @__PURE__ */ l("div", { className: "px-3 py-1 text-sm select-none", children: u.productSnapshot.quantity }),
|
|
2564
2565
|
/* @__PURE__ */ l(
|
|
2565
2566
|
"button",
|
|
2566
2567
|
{
|
|
2567
2568
|
className: "px-3 py-1 text-sm",
|
|
2568
|
-
onClick: () =>
|
|
2569
|
-
(
|
|
2570
|
-
(C,
|
|
2569
|
+
onClick: () => B(
|
|
2570
|
+
(b) => b.map(
|
|
2571
|
+
(C, H) => H === E && C.productSnapshot ? {
|
|
2571
2572
|
...C,
|
|
2572
2573
|
productSnapshot: {
|
|
2573
2574
|
...C.productSnapshot,
|
|
@@ -2578,7 +2579,7 @@ const Nt = (t) => {
|
|
|
2578
2579
|
),
|
|
2579
2580
|
style: {
|
|
2580
2581
|
background: "transparent",
|
|
2581
|
-
color:
|
|
2582
|
+
color: y.themeDarkColor
|
|
2582
2583
|
},
|
|
2583
2584
|
children: "+"
|
|
2584
2585
|
}
|
|
@@ -2588,21 +2589,21 @@ const Nt = (t) => {
|
|
|
2588
2589
|
"button",
|
|
2589
2590
|
{
|
|
2590
2591
|
onClick: () => {
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2592
|
+
Kr(
|
|
2593
|
+
X(
|
|
2594
|
+
u.productSnapshot
|
|
2594
2595
|
),
|
|
2595
|
-
|
|
2596
|
+
u.productSnapshot.quantity
|
|
2596
2597
|
);
|
|
2597
2598
|
},
|
|
2598
|
-
disabled:
|
|
2599
|
+
disabled: T,
|
|
2599
2600
|
className: "px-4 py-2 rounded-full font-medium",
|
|
2600
2601
|
style: {
|
|
2601
|
-
background:
|
|
2602
|
-
color: (
|
|
2603
|
-
opacity:
|
|
2602
|
+
background: y.tanyaThemeColor,
|
|
2603
|
+
color: (y == null ? void 0 : y.tanyaThemeContrastColor) || "#fff",
|
|
2604
|
+
opacity: T ? 0.8 : 1
|
|
2604
2605
|
},
|
|
2605
|
-
children:
|
|
2606
|
+
children: T ? "Adding..." : "Add to cart"
|
|
2606
2607
|
}
|
|
2607
2608
|
)
|
|
2608
2609
|
] })
|
|
@@ -2630,11 +2631,11 @@ const Nt = (t) => {
|
|
|
2630
2631
|
{
|
|
2631
2632
|
className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
|
|
2632
2633
|
placeholder: "How can I help you...",
|
|
2633
|
-
value:
|
|
2634
|
+
value: Q,
|
|
2634
2635
|
autoFocus: !0,
|
|
2635
|
-
onChange: (
|
|
2636
|
-
onKeyDown: (
|
|
2637
|
-
|
|
2636
|
+
onChange: (u) => _(u.target.value),
|
|
2637
|
+
onKeyDown: (u) => {
|
|
2638
|
+
u.key === "Enter" && !k && ot();
|
|
2638
2639
|
}
|
|
2639
2640
|
}
|
|
2640
2641
|
),
|
|
@@ -2642,16 +2643,16 @@ const Nt = (t) => {
|
|
|
2642
2643
|
"button",
|
|
2643
2644
|
{
|
|
2644
2645
|
type: "submit",
|
|
2645
|
-
disabled:
|
|
2646
|
+
disabled: k,
|
|
2646
2647
|
className: "p-3",
|
|
2647
|
-
onClick: () =>
|
|
2648
|
-
children:
|
|
2648
|
+
onClick: () => ot(),
|
|
2649
|
+
children: k ? /* @__PURE__ */ l(
|
|
2649
2650
|
"div",
|
|
2650
2651
|
{
|
|
2651
2652
|
className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
|
|
2652
2653
|
style: {
|
|
2653
2654
|
borderBottom: "2px solid",
|
|
2654
|
-
color:
|
|
2655
|
+
color: y.tanyaThemeColor
|
|
2655
2656
|
}
|
|
2656
2657
|
}
|
|
2657
2658
|
) : /* @__PURE__ */ l(
|
|
@@ -2679,7 +2680,7 @@ const Nt = (t) => {
|
|
|
2679
2680
|
]
|
|
2680
2681
|
}
|
|
2681
2682
|
),
|
|
2682
|
-
/* @__PURE__ */ l(
|
|
2683
|
+
/* @__PURE__ */ l(So, {})
|
|
2683
2684
|
] })
|
|
2684
2685
|
]
|
|
2685
2686
|
}
|
|
@@ -2703,16 +2704,16 @@ function Co(t, e) {
|
|
|
2703
2704
|
}
|
|
2704
2705
|
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
2705
2706
|
}
|
|
2706
|
-
var
|
|
2707
|
-
return
|
|
2707
|
+
var ct = function() {
|
|
2708
|
+
return ct = Object.assign || function(e) {
|
|
2708
2709
|
for (var r, n = 1, o = arguments.length; n < o; n++) {
|
|
2709
2710
|
r = arguments[n];
|
|
2710
|
-
for (var
|
|
2711
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
2711
2712
|
}
|
|
2712
2713
|
return e;
|
|
2713
|
-
},
|
|
2714
|
+
}, ct.apply(this, arguments);
|
|
2714
2715
|
};
|
|
2715
|
-
function
|
|
2716
|
+
function _o(t, e) {
|
|
2716
2717
|
var r = {};
|
|
2717
2718
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
|
|
2718
2719
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2720,7 +2721,7 @@ function Io(t, e) {
|
|
|
2720
2721
|
e.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[o]) && (r[n[o]] = t[n[o]]);
|
|
2721
2722
|
return r;
|
|
2722
2723
|
}
|
|
2723
|
-
var ce = "Invariant Violation", nr = Object.setPrototypeOf,
|
|
2724
|
+
var ce = "Invariant Violation", nr = Object.setPrototypeOf, Fo = nr === void 0 ? function(t, e) {
|
|
2724
2725
|
return t.__proto__ = e, t;
|
|
2725
2726
|
} : nr, Dr = (
|
|
2726
2727
|
/** @class */
|
|
@@ -2729,7 +2730,7 @@ var ce = "Invariant Violation", nr = Object.setPrototypeOf, _o = nr === void 0 ?
|
|
|
2729
2730
|
function e(r) {
|
|
2730
2731
|
r === void 0 && (r = ce);
|
|
2731
2732
|
var n = t.call(this, typeof r == "number" ? ce + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
|
|
2732
|
-
return n.framesToPop = 1, n.name = ce,
|
|
2733
|
+
return n.framesToPop = 1, n.name = ce, Fo(n, e.prototype), n;
|
|
2733
2734
|
}
|
|
2734
2735
|
return e;
|
|
2735
2736
|
})(Error)
|
|
@@ -2738,17 +2739,17 @@ function gt(t, e) {
|
|
|
2738
2739
|
if (!t)
|
|
2739
2740
|
throw new Dr(e);
|
|
2740
2741
|
}
|
|
2741
|
-
var Mr = ["debug", "log", "warn", "error", "silent"],
|
|
2742
|
-
function
|
|
2742
|
+
var Mr = ["debug", "log", "warn", "error", "silent"], No = Mr.indexOf("log");
|
|
2743
|
+
function Rt(t) {
|
|
2743
2744
|
return function() {
|
|
2744
|
-
if (Mr.indexOf(t) >=
|
|
2745
|
+
if (Mr.indexOf(t) >= No) {
|
|
2745
2746
|
var e = console[t] || console.log;
|
|
2746
2747
|
return e.apply(console, arguments);
|
|
2747
2748
|
}
|
|
2748
2749
|
};
|
|
2749
2750
|
}
|
|
2750
2751
|
(function(t) {
|
|
2751
|
-
t.debug =
|
|
2752
|
+
t.debug = Rt("debug"), t.log = Rt("log"), t.warn = Rt("warn"), t.error = Rt("error");
|
|
2752
2753
|
})(gt || (gt = {}));
|
|
2753
2754
|
var Ur = "3.14.0";
|
|
2754
2755
|
function It(t) {
|
|
@@ -2775,17 +2776,17 @@ It(function() {
|
|
|
2775
2776
|
return It.constructor("return this")();
|
|
2776
2777
|
});
|
|
2777
2778
|
var or = /* @__PURE__ */ new Map();
|
|
2778
|
-
function
|
|
2779
|
+
function Eo(t) {
|
|
2779
2780
|
var e = or.get(t) || 1;
|
|
2780
2781
|
return or.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
|
|
2781
2782
|
}
|
|
2782
|
-
function
|
|
2783
|
-
var r =
|
|
2783
|
+
function To(t, e) {
|
|
2784
|
+
var r = Eo("stringifyForDisplay");
|
|
2784
2785
|
return JSON.stringify(t, function(n, o) {
|
|
2785
2786
|
return o === void 0 ? r : o;
|
|
2786
2787
|
}, e).split(JSON.stringify(r)).join("<undefined>");
|
|
2787
2788
|
}
|
|
2788
|
-
function
|
|
2789
|
+
function Ht(t) {
|
|
2789
2790
|
return function(e) {
|
|
2790
2791
|
for (var r = [], n = 1; n < arguments.length; n++)
|
|
2791
2792
|
r[n - 1] = arguments[n];
|
|
@@ -2801,29 +2802,29 @@ var le = Object.assign(function(e, r) {
|
|
|
2801
2802
|
n[o - 2] = arguments[o];
|
|
2802
2803
|
e || gt(e, Fe(r, n) || Ne(r, n));
|
|
2803
2804
|
}, {
|
|
2804
|
-
debug:
|
|
2805
|
-
log:
|
|
2806
|
-
warn:
|
|
2807
|
-
error:
|
|
2805
|
+
debug: Ht(gt.debug),
|
|
2806
|
+
log: Ht(gt.log),
|
|
2807
|
+
warn: Ht(gt.warn),
|
|
2808
|
+
error: Ht(gt.error)
|
|
2808
2809
|
});
|
|
2809
2810
|
function Br(t) {
|
|
2810
2811
|
for (var e = [], r = 1; r < arguments.length; r++)
|
|
2811
2812
|
e[r - 1] = arguments[r];
|
|
2812
2813
|
return new Dr(Fe(t, e) || Ne(t, e));
|
|
2813
2814
|
}
|
|
2814
|
-
var
|
|
2815
|
+
var ir = Symbol.for("ApolloErrorMessageHandler_" + Ur);
|
|
2815
2816
|
function qr(t) {
|
|
2816
2817
|
if (typeof t == "string")
|
|
2817
2818
|
return t;
|
|
2818
2819
|
try {
|
|
2819
|
-
return
|
|
2820
|
+
return To(t, 2).slice(0, 1e3);
|
|
2820
2821
|
} catch {
|
|
2821
2822
|
return "<non-serializable>";
|
|
2822
2823
|
}
|
|
2823
2824
|
}
|
|
2824
2825
|
function Fe(t, e) {
|
|
2825
2826
|
if (e === void 0 && (e = []), !!t)
|
|
2826
|
-
return xe[
|
|
2827
|
+
return xe[ir] && xe[ir](t, e.map(qr));
|
|
2827
2828
|
}
|
|
2828
2829
|
function Ne(t, e) {
|
|
2829
2830
|
if (e === void 0 && (e = []), !!t)
|
|
@@ -2833,72 +2834,72 @@ function Ne(t, e) {
|
|
|
2833
2834
|
args: e.map(qr)
|
|
2834
2835
|
})));
|
|
2835
2836
|
}
|
|
2836
|
-
function
|
|
2837
|
+
function Po(t) {
|
|
2837
2838
|
return t.definitions.filter(function(e) {
|
|
2838
2839
|
return e.kind === "OperationDefinition" && !!e.name;
|
|
2839
2840
|
}).map(function(e) {
|
|
2840
2841
|
return e.name.value;
|
|
2841
2842
|
})[0] || null;
|
|
2842
2843
|
}
|
|
2843
|
-
let
|
|
2844
|
-
const
|
|
2845
|
-
let
|
|
2846
|
-
const
|
|
2844
|
+
let A = null;
|
|
2845
|
+
const ar = {};
|
|
2846
|
+
let Oo = 1;
|
|
2847
|
+
const jo = () => class {
|
|
2847
2848
|
constructor() {
|
|
2848
2849
|
this.id = [
|
|
2849
2850
|
"slot",
|
|
2850
|
-
|
|
2851
|
+
Oo++,
|
|
2851
2852
|
Date.now(),
|
|
2852
2853
|
Math.random().toString(36).slice(2)
|
|
2853
2854
|
].join(":");
|
|
2854
2855
|
}
|
|
2855
2856
|
hasValue() {
|
|
2856
|
-
for (let e =
|
|
2857
|
+
for (let e = A; e; e = e.parent)
|
|
2857
2858
|
if (this.id in e.slots) {
|
|
2858
2859
|
const r = e.slots[this.id];
|
|
2859
|
-
if (r ===
|
|
2860
|
+
if (r === ar)
|
|
2860
2861
|
break;
|
|
2861
|
-
return e !==
|
|
2862
|
+
return e !== A && (A.slots[this.id] = r), !0;
|
|
2862
2863
|
}
|
|
2863
|
-
return
|
|
2864
|
+
return A && (A.slots[this.id] = ar), !1;
|
|
2864
2865
|
}
|
|
2865
2866
|
getValue() {
|
|
2866
2867
|
if (this.hasValue())
|
|
2867
|
-
return
|
|
2868
|
+
return A.slots[this.id];
|
|
2868
2869
|
}
|
|
2869
2870
|
withValue(e, r, n, o) {
|
|
2870
|
-
const
|
|
2871
|
+
const i = {
|
|
2871
2872
|
__proto__: null,
|
|
2872
2873
|
[this.id]: e
|
|
2873
|
-
},
|
|
2874
|
-
|
|
2874
|
+
}, a = A;
|
|
2875
|
+
A = { parent: a, slots: i };
|
|
2875
2876
|
try {
|
|
2876
2877
|
return r.apply(o, n);
|
|
2877
2878
|
} finally {
|
|
2878
|
-
|
|
2879
|
+
A = a;
|
|
2879
2880
|
}
|
|
2880
2881
|
}
|
|
2881
2882
|
// Capture the current context and wrap a callback function so that it
|
|
2882
2883
|
// reestablishes the captured context when called.
|
|
2883
2884
|
static bind(e) {
|
|
2884
|
-
const r =
|
|
2885
|
+
const r = A;
|
|
2885
2886
|
return function() {
|
|
2886
|
-
const n =
|
|
2887
|
+
const n = A;
|
|
2887
2888
|
try {
|
|
2888
|
-
return
|
|
2889
|
+
return A = r, e.apply(this, arguments);
|
|
2889
2890
|
} finally {
|
|
2890
|
-
|
|
2891
|
+
A = n;
|
|
2891
2892
|
}
|
|
2892
2893
|
};
|
|
2893
2894
|
}
|
|
2894
2895
|
// Immediately run a callback function without any captured context.
|
|
2895
2896
|
static noContext(e, r, n) {
|
|
2896
|
-
if (
|
|
2897
|
-
const o =
|
|
2897
|
+
if (A) {
|
|
2898
|
+
const o = A;
|
|
2898
2899
|
try {
|
|
2899
|
-
return
|
|
2900
|
+
return A = null, e.apply(n, r);
|
|
2900
2901
|
} finally {
|
|
2901
|
-
|
|
2902
|
+
A = o;
|
|
2902
2903
|
}
|
|
2903
2904
|
} else
|
|
2904
2905
|
return e.apply(n, r);
|
|
@@ -2910,7 +2911,7 @@ function sr(t) {
|
|
|
2910
2911
|
} catch {
|
|
2911
2912
|
}
|
|
2912
2913
|
}
|
|
2913
|
-
const ue = "@wry/context:Slot",
|
|
2914
|
+
const ue = "@wry/context:Slot", $o = (
|
|
2914
2915
|
// Prefer globalThis when available.
|
|
2915
2916
|
// https://github.com/benjamn/wryware/issues/347
|
|
2916
2917
|
sr(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
|
|
@@ -2920,7 +2921,7 @@ const ue = "@wry/context:Slot", jo = (
|
|
|
2920
2921
|
// back to using the Array constructor as a namespace, but that was flagged in
|
|
2921
2922
|
// https://github.com/benjamn/wryware/issues/347, and can be avoided.
|
|
2922
2923
|
/* @__PURE__ */ Object.create(null)
|
|
2923
|
-
), cr =
|
|
2924
|
+
), cr = $o, Ee = cr[ue] || // Earlier versions of this package stored the globalKey property on the Array
|
|
2924
2925
|
// constructor, so we check there as well, to prevent Slot class duplication.
|
|
2925
2926
|
Array[ue] || (function(t) {
|
|
2926
2927
|
try {
|
|
@@ -2939,12 +2940,12 @@ Array[ue] || (function(t) {
|
|
|
2939
2940
|
} finally {
|
|
2940
2941
|
return t;
|
|
2941
2942
|
}
|
|
2942
|
-
})(
|
|
2943
|
+
})(jo()), { bind: wi, noContext: yi } = Ee;
|
|
2943
2944
|
new Ee();
|
|
2944
|
-
function
|
|
2945
|
+
function Ao(t, e) {
|
|
2945
2946
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
2946
2947
|
if (r) return (r = r.call(t)).next.bind(r);
|
|
2947
|
-
if (Array.isArray(t) || (r =
|
|
2948
|
+
if (Array.isArray(t) || (r = Lo(t)) || e) {
|
|
2948
2949
|
r && (t = r);
|
|
2949
2950
|
var n = 0;
|
|
2950
2951
|
return function() {
|
|
@@ -2954,7 +2955,7 @@ function $o(t, e) {
|
|
|
2954
2955
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2955
2956
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2956
2957
|
}
|
|
2957
|
-
function
|
|
2958
|
+
function Lo(t, e) {
|
|
2958
2959
|
if (t) {
|
|
2959
2960
|
if (typeof t == "string") return lr(t, e);
|
|
2960
2961
|
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -2985,32 +2986,32 @@ var Pe = function() {
|
|
|
2985
2986
|
return Oe(t) ? Symbol[t] : "@@" + t;
|
|
2986
2987
|
};
|
|
2987
2988
|
Pe() && !Oe("observable") && (Symbol.observable = Symbol("observable"));
|
|
2988
|
-
var
|
|
2989
|
-
function
|
|
2989
|
+
var zo = je("iterator"), ve = je("observable"), Rr = je("species");
|
|
2990
|
+
function Zt(t, e) {
|
|
2990
2991
|
var r = t[e];
|
|
2991
2992
|
if (r != null) {
|
|
2992
2993
|
if (typeof r != "function") throw new TypeError(r + " is not a function");
|
|
2993
2994
|
return r;
|
|
2994
2995
|
}
|
|
2995
2996
|
}
|
|
2996
|
-
function
|
|
2997
|
+
function At(t) {
|
|
2997
2998
|
var e = t.constructor;
|
|
2998
|
-
return e !== void 0 && (e = e[Rr], e === null && (e = void 0)), e !== void 0 ? e :
|
|
2999
|
+
return e !== void 0 && (e = e[Rr], e === null && (e = void 0)), e !== void 0 ? e : z;
|
|
2999
3000
|
}
|
|
3000
|
-
function
|
|
3001
|
-
return t instanceof
|
|
3001
|
+
function Do(t) {
|
|
3002
|
+
return t instanceof z;
|
|
3002
3003
|
}
|
|
3003
|
-
function
|
|
3004
|
-
|
|
3004
|
+
function Et(t) {
|
|
3005
|
+
Et.log ? Et.log(t) : setTimeout(function() {
|
|
3005
3006
|
throw t;
|
|
3006
3007
|
});
|
|
3007
3008
|
}
|
|
3008
|
-
function
|
|
3009
|
+
function Kt(t) {
|
|
3009
3010
|
Promise.resolve().then(function() {
|
|
3010
3011
|
try {
|
|
3011
3012
|
t();
|
|
3012
3013
|
} catch (e) {
|
|
3013
|
-
|
|
3014
|
+
Et(e);
|
|
3014
3015
|
}
|
|
3015
3016
|
});
|
|
3016
3017
|
}
|
|
@@ -3021,17 +3022,17 @@ function Hr(t) {
|
|
|
3021
3022
|
if (typeof e == "function")
|
|
3022
3023
|
e();
|
|
3023
3024
|
else {
|
|
3024
|
-
var r =
|
|
3025
|
+
var r = Zt(e, "unsubscribe");
|
|
3025
3026
|
r && r.call(e);
|
|
3026
3027
|
}
|
|
3027
3028
|
} catch (n) {
|
|
3028
|
-
|
|
3029
|
+
Et(n);
|
|
3029
3030
|
}
|
|
3030
3031
|
}
|
|
3031
3032
|
function ke(t) {
|
|
3032
3033
|
t._observer = void 0, t._queue = void 0, t._state = "closed";
|
|
3033
3034
|
}
|
|
3034
|
-
function
|
|
3035
|
+
function Mo(t) {
|
|
3035
3036
|
var e = t._queue;
|
|
3036
3037
|
if (e) {
|
|
3037
3038
|
t._queue = void 0, t._state = "ready";
|
|
@@ -3043,7 +3044,7 @@ function Vr(t, e, r) {
|
|
|
3043
3044
|
t._state = "running";
|
|
3044
3045
|
var n = t._observer;
|
|
3045
3046
|
try {
|
|
3046
|
-
var o =
|
|
3047
|
+
var o = Zt(n, e);
|
|
3047
3048
|
switch (e) {
|
|
3048
3049
|
case "next":
|
|
3049
3050
|
o && o.call(n, r);
|
|
@@ -3056,8 +3057,8 @@ function Vr(t, e, r) {
|
|
|
3056
3057
|
ke(t), o && o.call(n);
|
|
3057
3058
|
break;
|
|
3058
3059
|
}
|
|
3059
|
-
} catch (
|
|
3060
|
-
|
|
3060
|
+
} catch (i) {
|
|
3061
|
+
Et(i);
|
|
3061
3062
|
}
|
|
3062
3063
|
t._state === "closed" ? Hr(t) : t._state === "running" && (t._state = "ready");
|
|
3063
3064
|
}
|
|
@@ -3074,22 +3075,22 @@ function de(t, e, r) {
|
|
|
3074
3075
|
t._state = "buffering", t._queue = [{
|
|
3075
3076
|
type: e,
|
|
3076
3077
|
value: r
|
|
3077
|
-
}],
|
|
3078
|
-
return
|
|
3078
|
+
}], Kt(function() {
|
|
3079
|
+
return Mo(t);
|
|
3079
3080
|
});
|
|
3080
3081
|
return;
|
|
3081
3082
|
}
|
|
3082
3083
|
Vr(t, e, r);
|
|
3083
3084
|
}
|
|
3084
3085
|
}
|
|
3085
|
-
var
|
|
3086
|
+
var Uo = /* @__PURE__ */ (function() {
|
|
3086
3087
|
function t(r, n) {
|
|
3087
3088
|
this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
|
|
3088
|
-
var o = new
|
|
3089
|
+
var o = new Bo(this);
|
|
3089
3090
|
try {
|
|
3090
3091
|
this._cleanup = n.call(void 0, o);
|
|
3091
|
-
} catch (
|
|
3092
|
-
o.error(
|
|
3092
|
+
} catch (i) {
|
|
3093
|
+
o.error(i);
|
|
3093
3094
|
}
|
|
3094
3095
|
this._state === "initializing" && (this._state = "ready");
|
|
3095
3096
|
}
|
|
@@ -3102,7 +3103,7 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3102
3103
|
return this._state === "closed";
|
|
3103
3104
|
}
|
|
3104
3105
|
}]), t;
|
|
3105
|
-
})(),
|
|
3106
|
+
})(), Bo = /* @__PURE__ */ (function() {
|
|
3106
3107
|
function t(r) {
|
|
3107
3108
|
this._subscription = r;
|
|
3108
3109
|
}
|
|
@@ -3119,7 +3120,7 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3119
3120
|
return this._subscription._state === "closed";
|
|
3120
3121
|
}
|
|
3121
3122
|
}]), t;
|
|
3122
|
-
})(),
|
|
3123
|
+
})(), z = /* @__PURE__ */ (function() {
|
|
3123
3124
|
function t(r) {
|
|
3124
3125
|
if (!(this instanceof t)) throw new TypeError("Observable cannot be called as a function");
|
|
3125
3126
|
if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
|
|
@@ -3131,107 +3132,107 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3131
3132
|
next: n,
|
|
3132
3133
|
error: arguments[1],
|
|
3133
3134
|
complete: arguments[2]
|
|
3134
|
-
}), new
|
|
3135
|
+
}), new Uo(n, this._subscriber);
|
|
3135
3136
|
}, e.forEach = function(n) {
|
|
3136
3137
|
var o = this;
|
|
3137
|
-
return new Promise(function(
|
|
3138
|
+
return new Promise(function(i, a) {
|
|
3138
3139
|
if (typeof n != "function") {
|
|
3139
|
-
|
|
3140
|
+
a(new TypeError(n + " is not a function"));
|
|
3140
3141
|
return;
|
|
3141
3142
|
}
|
|
3142
3143
|
function c() {
|
|
3143
|
-
s.unsubscribe(),
|
|
3144
|
+
s.unsubscribe(), i();
|
|
3144
3145
|
}
|
|
3145
3146
|
var s = o.subscribe({
|
|
3146
|
-
next: function(
|
|
3147
|
+
next: function(d) {
|
|
3147
3148
|
try {
|
|
3148
|
-
n(
|
|
3149
|
+
n(d, c);
|
|
3149
3150
|
} catch (f) {
|
|
3150
|
-
|
|
3151
|
+
a(f), s.unsubscribe();
|
|
3151
3152
|
}
|
|
3152
3153
|
},
|
|
3153
|
-
error:
|
|
3154
|
-
complete:
|
|
3154
|
+
error: a,
|
|
3155
|
+
complete: i
|
|
3155
3156
|
});
|
|
3156
3157
|
});
|
|
3157
3158
|
}, e.map = function(n) {
|
|
3158
3159
|
var o = this;
|
|
3159
3160
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3160
|
-
var
|
|
3161
|
-
return new
|
|
3161
|
+
var i = At(this);
|
|
3162
|
+
return new i(function(a) {
|
|
3162
3163
|
return o.subscribe({
|
|
3163
3164
|
next: function(c) {
|
|
3164
3165
|
try {
|
|
3165
3166
|
c = n(c);
|
|
3166
3167
|
} catch (s) {
|
|
3167
|
-
return
|
|
3168
|
+
return a.error(s);
|
|
3168
3169
|
}
|
|
3169
|
-
|
|
3170
|
+
a.next(c);
|
|
3170
3171
|
},
|
|
3171
3172
|
error: function(c) {
|
|
3172
|
-
|
|
3173
|
+
a.error(c);
|
|
3173
3174
|
},
|
|
3174
3175
|
complete: function() {
|
|
3175
|
-
|
|
3176
|
+
a.complete();
|
|
3176
3177
|
}
|
|
3177
3178
|
});
|
|
3178
3179
|
});
|
|
3179
3180
|
}, e.filter = function(n) {
|
|
3180
3181
|
var o = this;
|
|
3181
3182
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3182
|
-
var
|
|
3183
|
-
return new
|
|
3183
|
+
var i = At(this);
|
|
3184
|
+
return new i(function(a) {
|
|
3184
3185
|
return o.subscribe({
|
|
3185
3186
|
next: function(c) {
|
|
3186
3187
|
try {
|
|
3187
3188
|
if (!n(c)) return;
|
|
3188
3189
|
} catch (s) {
|
|
3189
|
-
return
|
|
3190
|
+
return a.error(s);
|
|
3190
3191
|
}
|
|
3191
|
-
|
|
3192
|
+
a.next(c);
|
|
3192
3193
|
},
|
|
3193
3194
|
error: function(c) {
|
|
3194
|
-
|
|
3195
|
+
a.error(c);
|
|
3195
3196
|
},
|
|
3196
3197
|
complete: function() {
|
|
3197
|
-
|
|
3198
|
+
a.complete();
|
|
3198
3199
|
}
|
|
3199
3200
|
});
|
|
3200
3201
|
});
|
|
3201
3202
|
}, e.reduce = function(n) {
|
|
3202
3203
|
var o = this;
|
|
3203
3204
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3204
|
-
var
|
|
3205
|
-
return new
|
|
3205
|
+
var i = At(this), a = arguments.length > 1, c = !1, s = arguments[1], d = s;
|
|
3206
|
+
return new i(function(f) {
|
|
3206
3207
|
return o.subscribe({
|
|
3207
3208
|
next: function(h) {
|
|
3208
3209
|
var m = !c;
|
|
3209
|
-
if (c = !0, !m ||
|
|
3210
|
+
if (c = !0, !m || a)
|
|
3210
3211
|
try {
|
|
3211
|
-
|
|
3212
|
+
d = n(d, h);
|
|
3212
3213
|
} catch (g) {
|
|
3213
3214
|
return f.error(g);
|
|
3214
3215
|
}
|
|
3215
3216
|
else
|
|
3216
|
-
|
|
3217
|
+
d = h;
|
|
3217
3218
|
},
|
|
3218
3219
|
error: function(h) {
|
|
3219
3220
|
f.error(h);
|
|
3220
3221
|
},
|
|
3221
3222
|
complete: function() {
|
|
3222
|
-
if (!c && !
|
|
3223
|
-
f.next(
|
|
3223
|
+
if (!c && !a) return f.error(new TypeError("Cannot reduce an empty sequence"));
|
|
3224
|
+
f.next(d), f.complete();
|
|
3224
3225
|
}
|
|
3225
3226
|
});
|
|
3226
3227
|
});
|
|
3227
3228
|
}, e.concat = function() {
|
|
3228
|
-
for (var n = this, o = arguments.length,
|
|
3229
|
-
a
|
|
3230
|
-
var c =
|
|
3229
|
+
for (var n = this, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
|
|
3230
|
+
i[a] = arguments[a];
|
|
3231
|
+
var c = At(this);
|
|
3231
3232
|
return new c(function(s) {
|
|
3232
|
-
var
|
|
3233
|
+
var d, f = 0;
|
|
3233
3234
|
function h(m) {
|
|
3234
|
-
|
|
3235
|
+
d = m.subscribe({
|
|
3235
3236
|
next: function(g) {
|
|
3236
3237
|
s.next(g);
|
|
3237
3238
|
},
|
|
@@ -3239,50 +3240,50 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3239
3240
|
s.error(g);
|
|
3240
3241
|
},
|
|
3241
3242
|
complete: function() {
|
|
3242
|
-
f ===
|
|
3243
|
+
f === i.length ? (d = void 0, s.complete()) : h(c.from(i[f++]));
|
|
3243
3244
|
}
|
|
3244
3245
|
});
|
|
3245
3246
|
}
|
|
3246
3247
|
return h(n), function() {
|
|
3247
|
-
|
|
3248
|
+
d && (d.unsubscribe(), d = void 0);
|
|
3248
3249
|
};
|
|
3249
3250
|
});
|
|
3250
3251
|
}, e.flatMap = function(n) {
|
|
3251
3252
|
var o = this;
|
|
3252
3253
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3253
|
-
var
|
|
3254
|
-
return new
|
|
3254
|
+
var i = At(this);
|
|
3255
|
+
return new i(function(a) {
|
|
3255
3256
|
var c = [], s = o.subscribe({
|
|
3256
3257
|
next: function(f) {
|
|
3257
3258
|
if (n)
|
|
3258
3259
|
try {
|
|
3259
3260
|
f = n(f);
|
|
3260
3261
|
} catch (m) {
|
|
3261
|
-
return
|
|
3262
|
+
return a.error(m);
|
|
3262
3263
|
}
|
|
3263
|
-
var h =
|
|
3264
|
+
var h = i.from(f).subscribe({
|
|
3264
3265
|
next: function(m) {
|
|
3265
|
-
|
|
3266
|
+
a.next(m);
|
|
3266
3267
|
},
|
|
3267
3268
|
error: function(m) {
|
|
3268
|
-
|
|
3269
|
+
a.error(m);
|
|
3269
3270
|
},
|
|
3270
3271
|
complete: function() {
|
|
3271
3272
|
var m = c.indexOf(h);
|
|
3272
|
-
m >= 0 && c.splice(m, 1),
|
|
3273
|
+
m >= 0 && c.splice(m, 1), d();
|
|
3273
3274
|
}
|
|
3274
3275
|
});
|
|
3275
3276
|
c.push(h);
|
|
3276
3277
|
},
|
|
3277
3278
|
error: function(f) {
|
|
3278
|
-
|
|
3279
|
+
a.error(f);
|
|
3279
3280
|
},
|
|
3280
3281
|
complete: function() {
|
|
3281
|
-
|
|
3282
|
+
d();
|
|
3282
3283
|
}
|
|
3283
3284
|
});
|
|
3284
|
-
function
|
|
3285
|
-
s.closed && c.length === 0 &&
|
|
3285
|
+
function d() {
|
|
3286
|
+
s.closed && c.length === 0 && a.complete();
|
|
3286
3287
|
}
|
|
3287
3288
|
return function() {
|
|
3288
3289
|
c.forEach(function(f) {
|
|
@@ -3295,20 +3296,20 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3295
3296
|
}, t.from = function(n) {
|
|
3296
3297
|
var o = typeof this == "function" ? this : t;
|
|
3297
3298
|
if (n == null) throw new TypeError(n + " is not an object");
|
|
3298
|
-
var
|
|
3299
|
-
if (
|
|
3300
|
-
var
|
|
3301
|
-
if (Object(
|
|
3302
|
-
return
|
|
3303
|
-
return
|
|
3299
|
+
var i = Zt(n, ve);
|
|
3300
|
+
if (i) {
|
|
3301
|
+
var a = i.call(n);
|
|
3302
|
+
if (Object(a) !== a) throw new TypeError(a + " is not an object");
|
|
3303
|
+
return Do(a) && a.constructor === o ? a : new o(function(c) {
|
|
3304
|
+
return a.subscribe(c);
|
|
3304
3305
|
});
|
|
3305
3306
|
}
|
|
3306
|
-
if (Oe("iterator") && (
|
|
3307
|
+
if (Oe("iterator") && (i = Zt(n, zo), i))
|
|
3307
3308
|
return new o(function(c) {
|
|
3308
|
-
|
|
3309
|
+
Kt(function() {
|
|
3309
3310
|
if (!c.closed) {
|
|
3310
|
-
for (var s =
|
|
3311
|
-
var f =
|
|
3311
|
+
for (var s = Ao(i.call(n)), d; !(d = s()).done; ) {
|
|
3312
|
+
var f = d.value;
|
|
3312
3313
|
if (c.next(f), c.closed) return;
|
|
3313
3314
|
}
|
|
3314
3315
|
c.complete();
|
|
@@ -3317,7 +3318,7 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3317
3318
|
});
|
|
3318
3319
|
if (Array.isArray(n))
|
|
3319
3320
|
return new o(function(c) {
|
|
3320
|
-
|
|
3321
|
+
Kt(function() {
|
|
3321
3322
|
if (!c.closed) {
|
|
3322
3323
|
for (var s = 0; s < n.length; ++s)
|
|
3323
3324
|
if (c.next(n[s]), c.closed) return;
|
|
@@ -3327,11 +3328,11 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3327
3328
|
});
|
|
3328
3329
|
throw new TypeError(n + " is not observable");
|
|
3329
3330
|
}, t.of = function() {
|
|
3330
|
-
for (var n = arguments.length, o = new Array(n),
|
|
3331
|
-
o[
|
|
3332
|
-
var
|
|
3333
|
-
return new
|
|
3334
|
-
|
|
3331
|
+
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
|
|
3332
|
+
o[i] = arguments[i];
|
|
3333
|
+
var a = typeof this == "function" ? this : t;
|
|
3334
|
+
return new a(function(c) {
|
|
3335
|
+
Kt(function() {
|
|
3335
3336
|
if (!c.closed) {
|
|
3336
3337
|
for (var s = 0; s < o.length; ++s)
|
|
3337
3338
|
if (c.next(o[s]), c.closed) return;
|
|
@@ -3346,14 +3347,14 @@ var Mo = /* @__PURE__ */ (function() {
|
|
|
3346
3347
|
}
|
|
3347
3348
|
}]), t;
|
|
3348
3349
|
})();
|
|
3349
|
-
Pe() && Object.defineProperty(
|
|
3350
|
+
Pe() && Object.defineProperty(z, Symbol("extensions"), {
|
|
3350
3351
|
value: {
|
|
3351
3352
|
symbol: ve,
|
|
3352
|
-
hostReportError:
|
|
3353
|
+
hostReportError: Et
|
|
3353
3354
|
},
|
|
3354
3355
|
configurable: !0
|
|
3355
3356
|
});
|
|
3356
|
-
function
|
|
3357
|
+
function qo(t) {
|
|
3357
3358
|
var e, r = t.Symbol;
|
|
3358
3359
|
if (typeof r == "function")
|
|
3359
3360
|
if (r.observable)
|
|
@@ -3369,14 +3370,14 @@ function Bo(t) {
|
|
|
3369
3370
|
e = "@@observable";
|
|
3370
3371
|
return e;
|
|
3371
3372
|
}
|
|
3372
|
-
var
|
|
3373
|
-
typeof self < "u" ?
|
|
3374
|
-
|
|
3375
|
-
var dr =
|
|
3373
|
+
var Ct;
|
|
3374
|
+
typeof self < "u" ? Ct = self : typeof window < "u" ? Ct = window : typeof global < "u" ? Ct = global : typeof module < "u" ? Ct = module : Ct = Function("return this")();
|
|
3375
|
+
qo(Ct);
|
|
3376
|
+
var dr = z.prototype, fr = "@@observable";
|
|
3376
3377
|
dr[fr] || (dr[fr] = function() {
|
|
3377
3378
|
return this;
|
|
3378
3379
|
});
|
|
3379
|
-
function
|
|
3380
|
+
function Ro(t) {
|
|
3380
3381
|
for (var e = [
|
|
3381
3382
|
"query",
|
|
3382
3383
|
"operationName",
|
|
@@ -3390,11 +3391,11 @@ function qo(t) {
|
|
|
3390
3391
|
}
|
|
3391
3392
|
return t;
|
|
3392
3393
|
}
|
|
3393
|
-
function
|
|
3394
|
-
var r =
|
|
3395
|
-
typeof
|
|
3394
|
+
function Ho(t, e) {
|
|
3395
|
+
var r = ct({}, t), n = function(i) {
|
|
3396
|
+
typeof i == "function" ? r = ct(ct({}, r), i(r)) : r = ct(ct({}, r), i);
|
|
3396
3397
|
}, o = function() {
|
|
3397
|
-
return
|
|
3398
|
+
return ct({}, r);
|
|
3398
3399
|
};
|
|
3399
3400
|
return Object.defineProperty(e, "setContext", {
|
|
3400
3401
|
enumerable: !1,
|
|
@@ -3404,29 +3405,29 @@ function Ro(t, e) {
|
|
|
3404
3405
|
value: o
|
|
3405
3406
|
}), e;
|
|
3406
3407
|
}
|
|
3407
|
-
function
|
|
3408
|
+
function Vo(t) {
|
|
3408
3409
|
var e = {
|
|
3409
3410
|
variables: t.variables || {},
|
|
3410
3411
|
extensions: t.extensions || {},
|
|
3411
3412
|
operationName: t.operationName,
|
|
3412
3413
|
query: t.query
|
|
3413
3414
|
};
|
|
3414
|
-
return e.operationName || (e.operationName = typeof e.query != "string" ?
|
|
3415
|
+
return e.operationName || (e.operationName = typeof e.query != "string" ? Po(e.query) || void 0 : ""), e;
|
|
3415
3416
|
}
|
|
3416
|
-
var
|
|
3417
|
-
function
|
|
3418
|
-
return Yo
|
|
3417
|
+
var Yo = Symbol.for("apollo.deprecations"), Jo = xe, Ko = new Ee();
|
|
3418
|
+
function Go(t) {
|
|
3419
|
+
return Jo[Yo] || (Ko.getValue() || []).includes(t);
|
|
3419
3420
|
}
|
|
3420
|
-
function
|
|
3421
|
-
|
|
3421
|
+
function Wo(t, e) {
|
|
3422
|
+
Go(t) || e();
|
|
3422
3423
|
}
|
|
3423
3424
|
function pr(t, e) {
|
|
3424
|
-
return e ? e(t) :
|
|
3425
|
+
return e ? e(t) : z.of();
|
|
3425
3426
|
}
|
|
3426
|
-
function
|
|
3427
|
+
function Lt(t) {
|
|
3427
3428
|
return typeof t == "function" ? new Yr(t) : t;
|
|
3428
3429
|
}
|
|
3429
|
-
function
|
|
3430
|
+
function Vt(t) {
|
|
3430
3431
|
return t.request.length <= 1;
|
|
3431
3432
|
}
|
|
3432
3433
|
var Yr = (
|
|
@@ -3437,35 +3438,35 @@ var Yr = (
|
|
|
3437
3438
|
}
|
|
3438
3439
|
return t.empty = function() {
|
|
3439
3440
|
return new t(function() {
|
|
3440
|
-
return
|
|
3441
|
+
return z.of();
|
|
3441
3442
|
});
|
|
3442
3443
|
}, t.from = function(e) {
|
|
3443
|
-
return e.length === 0 ? t.empty() : e.map(
|
|
3444
|
+
return e.length === 0 ? t.empty() : e.map(Lt).reduce(function(r, n) {
|
|
3444
3445
|
return r.concat(n);
|
|
3445
3446
|
});
|
|
3446
3447
|
}, t.split = function(e, r, n) {
|
|
3447
|
-
var o =
|
|
3448
|
-
return
|
|
3449
|
-
return e(c) ? o.request(c) ||
|
|
3450
|
-
}) :
|
|
3451
|
-
return e(c) ? o.request(c, s) ||
|
|
3452
|
-
}), Object.assign(
|
|
3448
|
+
var o = Lt(r), i = Lt(n || new t(pr)), a;
|
|
3449
|
+
return Vt(o) && Vt(i) ? a = new t(function(c) {
|
|
3450
|
+
return e(c) ? o.request(c) || z.of() : i.request(c) || z.of();
|
|
3451
|
+
}) : a = new t(function(c, s) {
|
|
3452
|
+
return e(c) ? o.request(c, s) || z.of() : i.request(c, s) || z.of();
|
|
3453
|
+
}), Object.assign(a, { left: o, right: i });
|
|
3453
3454
|
}, t.execute = function(e, r) {
|
|
3454
|
-
return e.request(
|
|
3455
|
+
return e.request(Ho(r.context, Vo(Ro(r)))) || z.of();
|
|
3455
3456
|
}, t.concat = function(e, r) {
|
|
3456
|
-
var n =
|
|
3457
|
-
if (
|
|
3457
|
+
var n = Lt(e);
|
|
3458
|
+
if (Vt(n))
|
|
3458
3459
|
return globalThis.__DEV__ !== !1 && le.warn(47, n), n;
|
|
3459
|
-
var o =
|
|
3460
|
-
return
|
|
3461
|
-
return n.request(
|
|
3462
|
-
return o.request(c) ||
|
|
3463
|
-
}) ||
|
|
3464
|
-
}) :
|
|
3465
|
-
return n.request(
|
|
3466
|
-
return o.request(s, c) ||
|
|
3467
|
-
}) ||
|
|
3468
|
-
}), Object.assign(
|
|
3460
|
+
var o = Lt(r), i;
|
|
3461
|
+
return Vt(o) ? i = new t(function(a) {
|
|
3462
|
+
return n.request(a, function(c) {
|
|
3463
|
+
return o.request(c) || z.of();
|
|
3464
|
+
}) || z.of();
|
|
3465
|
+
}) : i = new t(function(a, c) {
|
|
3466
|
+
return n.request(a, function(s) {
|
|
3467
|
+
return o.request(s, c) || z.of();
|
|
3468
|
+
}) || z.of();
|
|
3469
|
+
}), Object.assign(i, { left: n, right: o });
|
|
3469
3470
|
}, t.prototype.split = function(e, r, n) {
|
|
3470
3471
|
return this.concat(t.split(e, r, n || new t(pr)));
|
|
3471
3472
|
}, t.prototype.concat = function(e) {
|
|
@@ -3473,7 +3474,7 @@ var Yr = (
|
|
|
3473
3474
|
}, t.prototype.request = function(e, r) {
|
|
3474
3475
|
throw Br(48);
|
|
3475
3476
|
}, t.prototype.onError = function(e, r) {
|
|
3476
|
-
if (globalThis.__DEV__ !== !1 &&
|
|
3477
|
+
if (globalThis.__DEV__ !== !1 && Wo("onError", function() {
|
|
3477
3478
|
globalThis.__DEV__ !== !1 && le.warn(49);
|
|
3478
3479
|
}), r && r.error)
|
|
3479
3480
|
return r.error(e), !1;
|
|
@@ -3483,29 +3484,29 @@ var Yr = (
|
|
|
3483
3484
|
}, t;
|
|
3484
3485
|
})()
|
|
3485
3486
|
);
|
|
3486
|
-
function
|
|
3487
|
+
function Qo(t) {
|
|
3487
3488
|
return new Yr(function(e, r) {
|
|
3488
|
-
var n =
|
|
3489
|
-
return new
|
|
3490
|
-
var
|
|
3489
|
+
var n = _o(e, []);
|
|
3490
|
+
return new z(function(o) {
|
|
3491
|
+
var i, a = !1;
|
|
3491
3492
|
return Promise.resolve(n).then(function(c) {
|
|
3492
3493
|
return t(c, e.getContext());
|
|
3493
3494
|
}).then(e.setContext).then(function() {
|
|
3494
|
-
|
|
3495
|
+
a || (i = r(e).subscribe({
|
|
3495
3496
|
next: o.next.bind(o),
|
|
3496
3497
|
error: o.error.bind(o),
|
|
3497
3498
|
complete: o.complete.bind(o)
|
|
3498
3499
|
}));
|
|
3499
3500
|
}).catch(o.error.bind(o)), function() {
|
|
3500
|
-
|
|
3501
|
+
a = !0, i && i.unsubscribe();
|
|
3501
3502
|
};
|
|
3502
3503
|
});
|
|
3503
3504
|
});
|
|
3504
3505
|
}
|
|
3505
|
-
const
|
|
3506
|
+
const Xo = async () => {
|
|
3506
3507
|
const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
|
|
3507
3508
|
try {
|
|
3508
|
-
const o = await
|
|
3509
|
+
const o = await D.post(
|
|
3509
3510
|
t,
|
|
3510
3511
|
new URLSearchParams({ grant_type: "client_credentials" }),
|
|
3511
3512
|
// Only grant_type in body
|
|
@@ -3518,32 +3519,32 @@ const Qo = async () => {
|
|
|
3518
3519
|
);
|
|
3519
3520
|
return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
|
|
3520
3521
|
} catch (o) {
|
|
3521
|
-
return
|
|
3522
|
+
return D.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
|
|
3522
3523
|
}
|
|
3523
|
-
},
|
|
3524
|
-
uri: `${
|
|
3525
|
-
}),
|
|
3526
|
-
const r = await
|
|
3524
|
+
}, Zo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", ti = Xr({
|
|
3525
|
+
uri: `${Zo}`
|
|
3526
|
+
}), ei = Qo(async (t, { headers: e }) => {
|
|
3527
|
+
const r = await Xo();
|
|
3527
3528
|
return {
|
|
3528
3529
|
headers: {
|
|
3529
3530
|
...e,
|
|
3530
3531
|
authorization: `Bearer ${r}`
|
|
3531
3532
|
}
|
|
3532
3533
|
};
|
|
3533
|
-
}),
|
|
3534
|
-
link:
|
|
3535
|
-
cache: new
|
|
3534
|
+
}), ri = new Zr({
|
|
3535
|
+
link: ei.concat(ti),
|
|
3536
|
+
cache: new tn(),
|
|
3536
3537
|
defaultOptions: {
|
|
3537
3538
|
watchQuery: {
|
|
3538
3539
|
fetchPolicy: "cache-and-network"
|
|
3539
3540
|
}
|
|
3540
3541
|
}
|
|
3541
|
-
}),
|
|
3542
|
-
const { tanyaConfig: e } = t
|
|
3543
|
-
return
|
|
3542
|
+
}), bi = (t) => {
|
|
3543
|
+
const { tanyaConfig: e } = t;
|
|
3544
|
+
return /* @__PURE__ */ l(en, { client: ri, children: /* @__PURE__ */ l(dn, { children: /* @__PURE__ */ l(Io, { tanyaConfig: e }) }) });
|
|
3544
3545
|
};
|
|
3545
3546
|
export {
|
|
3546
|
-
|
|
3547
|
-
|
|
3547
|
+
bi as TanyaChatbot,
|
|
3548
|
+
hi as TanyaChatbotProvider
|
|
3548
3549
|
};
|
|
3549
3550
|
//# sourceMappingURL=tanya-chatbot.es.js.map
|