tanya-chatbot 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,79 +1,20 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),Y=require("react"),sa=require("react-dom"),ia=require("react-router-dom"),mt=require("react-redux"),aa=require("@reduxjs/toolkit");function is(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=is(Y),as=is(sa);function Ke(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ao(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ca(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Ao(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Ao(e[o],null)}}}}function Me(...e){return S.useCallback(ca(...e),e)}function cs(e,t=[]){let r=[];function n(s,i){const a=S.createContext(i),f=r.length;r=[...r,i];const c=d=>{var b;const{scope:u,children:p,...h}=d,m=((b=u==null?void 0:u[e])==null?void 0:b[f])||a,x=S.useMemo(()=>h,Object.values(h));return _.jsx(m.Provider,{value:x,children:p})};c.displayName=s+"Provider";function l(d,u){var m;const p=((m=u==null?void 0:u[e])==null?void 0:m[f])||a,h=S.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,l]}const o=()=>{const s=r.map(i=>S.createContext(i));return function(a){const f=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[n,la(o,...t)]}function la(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:f,scopeName:c})=>{const d=f(s)[`__scope${c}`];return{...a,...d}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function ls(e){const t=fa(e),r=S.forwardRef((n,o)=>{const{children:s,...i}=n,a=S.Children.toArray(s),f=a.find(da);if(f){const c=f.props.children,l=a.map(d=>d===f?S.Children.count(c)>1?S.Children.only(null):S.isValidElement(c)?c.props.children:null:d);return _.jsx(t,{...i,ref:o,children:S.isValidElement(c)?S.cloneElement(c,void 0,l):null})}return _.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function fa(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r,i=S.isValidElement(o)?pa(o):void 0,a=Me(i,n);if(S.isValidElement(o)){const f=xa(s,o.props);return o.type!==S.Fragment&&(f.ref=a),S.cloneElement(o,f)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ua=Symbol("radix.slottable");function da(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ua}function xa(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const f=s(...a);return o(...a),f}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function pa(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ha=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ye=ha.reduce((e,t)=>{const r=ls(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,f=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(f,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ma(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function Ct(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function va(e,t=globalThis==null?void 0:globalThis.document){const r=Ct(e);S.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ga="DismissableLayer",Nn="dismissableLayer.update",ya="dismissableLayer.pointerDownOutside",ba="dismissableLayer.focusOutside",_o,fs=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),us=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...f}=e,c=S.useContext(fs),[l,d]=S.useState(null),u=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=S.useState({}),h=Me(t,w=>d(w)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(x),v=l?m.indexOf(l):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,y=v>=b,C=wa(w=>{const F=w.target,O=[...c.branches].some(A=>A.contains(F));!y||O||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},u),E=Aa(w=>{const F=w.target;[...c.branches].some(A=>A.contains(F))||(s==null||s(w),i==null||i(w),w.defaultPrevented||a==null||a())},u);return va(w=>{v===c.layers.size-1&&(n==null||n(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},u),S.useEffect(()=>{if(l)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_o=u.body.style.pointerEvents,u.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(l)),c.layers.add(l),Bo(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(u.body.style.pointerEvents=_o)}},[l,u,r,c]),S.useEffect(()=>()=>{l&&(c.layers.delete(l),c.layersWithOutsidePointerEventsDisabled.delete(l),Bo())},[l,c]),S.useEffect(()=>{const w=()=>p({});return document.addEventListener(Nn,w),()=>document.removeEventListener(Nn,w)},[]),_.jsx(Ye.div,{...f,ref:h,style:{pointerEvents:g?y?"auto":"none":void 0,...e.style},onFocusCapture:Ke(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ke(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ke(e.onPointerDownCapture,C.onPointerDownCapture)})});us.displayName=ga;var Ca="DismissableLayerBranch",Ea=S.forwardRef((e,t)=>{const r=S.useContext(fs),n=S.useRef(null),o=Me(t,n);return S.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),_.jsx(Ye.div,{...e,ref:o})});Ea.displayName=Ca;function wa(e,t=globalThis==null?void 0:globalThis.document){const r=Ct(e),n=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let f=function(){ds(ya,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Aa(e,t=globalThis==null?void 0:globalThis.document){const r=Ct(e),n=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!n.current&&ds(ba,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Bo(){const e=new CustomEvent(Nn);document.dispatchEvent(e)}function ds(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ma(o,s):o.dispatchEvent(s)}var yn=0;function _a(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fo()),document.body.insertAdjacentElement("beforeend",e[1]??Fo()),yn++,()=>{yn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yn--}},[])}function Fo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bn="focusScope.autoFocusOnMount",Cn="focusScope.autoFocusOnUnmount",Do={bubbles:!1,cancelable:!0},Ba="FocusScope",xs=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,f]=S.useState(null),c=Ct(o),l=Ct(s),d=S.useRef(null),u=Me(t,m=>f(m)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let m=function(g){if(p.paused||!a)return;const y=g.target;a.contains(y)?d.current=y:Ve(d.current,{select:!0})},x=function(g){if(p.paused||!a)return;const y=g.relatedTarget;y!==null&&(a.contains(y)||Ve(d.current,{select:!0}))},b=function(g){if(document.activeElement===document.body)for(const C of g)C.removedNodes.length>0&&Ve(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const v=new MutationObserver(b);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),v.disconnect()}}},[n,a,p.paused]),S.useEffect(()=>{if(a){ko.add(p);const m=document.activeElement;if(!a.contains(m)){const b=new CustomEvent(bn,Do);a.addEventListener(bn,c),a.dispatchEvent(b),b.defaultPrevented||(Fa(Ra(ps(a)),{select:!0}),document.activeElement===m&&Ve(a))}return()=>{a.removeEventListener(bn,c),setTimeout(()=>{const b=new CustomEvent(Cn,Do);a.addEventListener(Cn,l),a.dispatchEvent(b),b.defaultPrevented||Ve(m??document.body,{select:!0}),a.removeEventListener(Cn,l),ko.remove(p)},0)}}},[a,c,l,p]);const h=S.useCallback(m=>{if(!r&&!n||p.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(x&&b){const v=m.currentTarget,[g,y]=Da(v);g&&y?!m.shiftKey&&b===y?(m.preventDefault(),r&&Ve(g,{select:!0})):m.shiftKey&&b===g&&(m.preventDefault(),r&&Ve(y,{select:!0})):b===v&&m.preventDefault()}},[r,n,p.paused]);return _.jsx(Ye.div,{tabIndex:-1,...i,ref:u,onKeyDown:h})});xs.displayName=Ba;function Fa(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ve(n,{select:t}),document.activeElement!==r)return}function Da(e){const t=ps(e),r=So(t,e),n=So(t.reverse(),e);return[r,n]}function ps(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function So(e,t){for(const r of e)if(!Sa(r,{upTo:t}))return r}function Sa(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ka(e){return e instanceof HTMLInputElement&&"select"in e}function Ve(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ka(e)&&t&&e.select()}}var ko=Ta();function Ta(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=To(e,t),e.unshift(t)},remove(t){var r;e=To(e,t),(r=e[0])==null||r.resume()}}}function To(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ra(e){return e.filter(t=>t.tagName!=="A")}var it=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Pa=S[" useId ".trim().toString()]||(()=>{}),Oa=0;function Na(e){const[t,r]=S.useState(Pa());return it(()=>{r(n=>n??String(Oa++))},[e]),e||(t?`radix-${t}`:"")}const Ia=["top","right","bottom","left"],Xe=Math.min,_e=Math.max,Wr=Math.round,Gt=Math.floor,Pe=e=>({x:e,y:e}),ja={left:"right",right:"left",bottom:"top",top:"bottom"},La={start:"end",end:"start"};function In(e,t,r){return _e(e,Xe(t,r))}function $e(e,t){return typeof e=="function"?e(t):e}function ze(e){return e.split("-")[0]}function _t(e){return e.split("-")[1]}function Qn(e){return e==="x"?"y":"x"}function Jn(e){return e==="y"?"height":"width"}function He(e){return["top","bottom"].includes(ze(e))?"y":"x"}function eo(e){return Qn(He(e))}function Ha(e,t,r){r===void 0&&(r=!1);const n=_t(e),o=eo(e),s=Jn(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Vr(i)),[i,Vr(i)]}function $a(e){const t=Vr(e);return[jn(e),t,jn(t)]}function jn(e){return e.replace(/start|end/g,t=>La[t])}function za(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:i;default:return[]}}function Ma(e,t,r,n){const o=_t(e);let s=za(ze(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jn)))),s}function Vr(e){return e.replace(/left|right|bottom|top/g,t=>ja[t])}function Ua(e){return{top:0,right:0,bottom:0,left:0,...e}}function hs(e){return typeof e!="number"?Ua(e):{top:e,right:e,bottom:e,left:e}}function Kr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Ro(e,t,r){let{reference:n,floating:o}=e;const s=He(t),i=eo(t),a=Jn(i),f=ze(t),c=s==="y",l=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,u=n[a]/2-o[a]/2;let p;switch(f){case"top":p={x:l,y:n.y-o.height};break;case"bottom":p={x:l,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(_t(t)){case"start":p[i]-=u*(r&&c?-1:1);break;case"end":p[i]+=u*(r&&c?-1:1);break}return p}const qa=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),f=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=Ro(c,n,f),u=n,p={},h=0;for(let m=0;m<a.length;m++){const{name:x,fn:b}=a[m],{x:v,y:g,data:y,reset:C}=await b({x:l,y:d,initialPlacement:n,placement:u,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});l=v??l,d=g??d,p={...p,[x]:{...p[x],...y}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(u=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:l,y:d}=Ro(c,u,f)),m=-1)}return{x:l,y:d,placement:u,strategy:o,middlewareData:p}};async function It(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=$e(t,e),h=hs(p),x=a[u?d==="floating"?"reference":"floating":d],b=Kr(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:f})),v=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),y=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},C=Kr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:f}):v);return{top:(b.top-C.top+h.top)/y.y,bottom:(C.bottom-b.bottom+h.bottom)/y.y,left:(b.left-C.left+h.left)/y.x,right:(C.right-b.right+h.right)/y.x}}const Wa=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:f}=t,{element:c,padding:l=0}=$e(e,t)||{};if(c==null)return{};const d=hs(l),u={x:r,y:n},p=eo(o),h=Jn(p),m=await i.getDimensions(c),x=p==="y",b=x?"top":"left",v=x?"bottom":"right",g=x?"clientHeight":"clientWidth",y=s.reference[h]+s.reference[p]-u[p]-s.floating[h],C=u[p]-s.reference[p],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let w=E?E[g]:0;(!w||!await(i.isElement==null?void 0:i.isElement(E)))&&(w=a.floating[g]||s.floating[h]);const F=y/2-C/2,O=w/2-m[h]/2-1,A=Xe(d[b],O),B=Xe(d[v],O),R=A,D=w-m[h]-B,L=w/2-m[h]/2+F,H=In(R,L,D),z=!f.arrow&&_t(o)!=null&&L!==H&&s.reference[h]/2-(L<R?A:B)-m[h]/2<0,W=z?L<R?L-R:L-D:0;return{[p]:u[p]+W,data:{[p]:H,centerOffset:L-H-W,...z&&{alignmentOffset:W}},reset:z}}}),Va=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:f,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...x}=$e(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=ze(o),v=He(a),g=ze(a)===a,y=await(f.isRTL==null?void 0:f.isRTL(c.floating)),C=u||(g||!m?[Vr(a)]:$a(a)),E=h!=="none";!u&&E&&C.push(...Ma(a,m,h,y));const w=[a,...C],F=await It(t,x),O=[];let A=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&O.push(F[b]),d){const H=Ha(o,i,y);O.push(F[H[0]],F[H[1]])}if(A=[...A,{placement:o,overflows:O}],!O.every(H=>H<=0)){var B,R;const H=(((B=s.flip)==null?void 0:B.index)||0)+1,z=w[H];if(z){var D;const $=d==="alignment"?v!==He(z):!1,M=((D=A[0])==null?void 0:D.overflows[0])>0;if(!$||M)return{data:{index:H,overflows:A},reset:{placement:z}}}let W=(R=A.filter($=>$.overflows[0]<=0).sort(($,M)=>$.overflows[1]-M.overflows[1])[0])==null?void 0:R.placement;if(!W)switch(p){case"bestFit":{var L;const $=(L=A.filter(M=>{if(E){const U=He(M.placement);return U===v||U==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(U=>U>0).reduce((U,P)=>U+P,0)]).sort((M,U)=>M[1]-U[1])[0])==null?void 0:L[0];$&&(W=$);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Po(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Oo(e){return Ia.some(t=>e[t]>=0)}const Ka=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=$e(e,t);switch(n){case"referenceHidden":{const s=await It(t,{...o,elementContext:"reference"}),i=Po(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Oo(i)}}}case"escaped":{const s=await It(t,{...o,altBoundary:!0}),i=Po(s,r.floating);return{data:{escapedOffsets:i,escaped:Oo(i)}}}default:return{}}}}};async function Xa(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=ze(r),a=_t(r),f=He(r)==="y",c=["left","top"].includes(i)?-1:1,l=s&&f?-1:1,d=$e(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),f?{x:p*l,y:u*c}:{x:u*c,y:p*l}}const Ga=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,f=await Xa(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+f.x,y:s+f.y,data:{...f,placement:i}}}}},Ya=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...f}=$e(e,t),c={x:r,y:n},l=await It(t,f),d=He(ze(o)),u=Qn(d);let p=c[u],h=c[d];if(s){const x=u==="y"?"top":"left",b=u==="y"?"bottom":"right",v=p+l[x],g=p-l[b];p=In(v,p,g)}if(i){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",v=h+l[x],g=h-l[b];h=In(v,h,g)}const m=a.fn({...t,[u]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[u]:s,[d]:i}}}}}},Za=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:f=!0,crossAxis:c=!0}=$e(e,t),l={x:r,y:n},d=He(o),u=Qn(d);let p=l[u],h=l[d];const m=$e(a,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(f){const g=u==="y"?"height":"width",y=s.reference[u]-s.floating[g]+x.mainAxis,C=s.reference[u]+s.reference[g]-x.mainAxis;p<y?p=y:p>C&&(p=C)}if(c){var b,v;const g=u==="y"?"width":"height",y=["top","left"].includes(ze(o)),C=s.reference[d]-s.floating[g]+(y&&((b=i.offset)==null?void 0:b[d])||0)+(y?0:x.crossAxis),E=s.reference[d]+s.reference[g]+(y?0:((v=i.offset)==null?void 0:v[d])||0)-(y?x.crossAxis:0);h<C?h=C:h>E&&(h=E)}return{[u]:p,[d]:h}}}},Qa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:f=()=>{},...c}=$e(e,t),l=await It(t,c),d=ze(o),u=_t(o),p=He(o)==="y",{width:h,height:m}=s.floating;let x,b;d==="top"||d==="bottom"?(x=d,b=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,x=u==="end"?"top":"bottom");const v=m-l.top-l.bottom,g=h-l.left-l.right,y=Xe(m-l[x],v),C=Xe(h-l[b],g),E=!t.middlewareData.shift;let w=y,F=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(F=g),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(w=v),E&&!u){const A=_e(l.left,0),B=_e(l.right,0),R=_e(l.top,0),D=_e(l.bottom,0);p?F=h-2*(A!==0||B!==0?A+B:_e(l.left,l.right)):w=m-2*(R!==0||D!==0?R+D:_e(l.top,l.bottom))}await f({...t,availableWidth:F,availableHeight:w});const O=await i.getDimensions(a.floating);return h!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function tn(){return typeof window<"u"}function Bt(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(ms(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ms(e){return tn()?e instanceof Node||e instanceof Be(e).Node:!1}function De(e){return tn()?e instanceof Element||e instanceof Be(e).Element:!1}function Ne(e){return tn()?e instanceof HTMLElement||e instanceof Be(e).HTMLElement:!1}function No(e){return!tn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot}function Mt(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ja(e){return["table","td","th"].includes(Bt(e))}function rn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function to(e){const t=ro(),r=De(e)?Se(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ec(e){let t=Ge(e);for(;Ne(t)&&!Et(t);){if(to(t))return t;if(rn(t))return null;t=Ge(t)}return null}function ro(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Et(e){return["html","body","#document"].includes(Bt(e))}function Se(e){return Be(e).getComputedStyle(e)}function nn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ge(e){if(Bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||No(e)&&e.host||Ie(e);return No(t)?t.host:t}function vs(e){const t=Ge(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&Mt(t)?t:vs(t)}function jt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=vs(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=Be(o);if(s){const a=Ln(i);return t.concat(i,i.visualViewport||[],Mt(o)?o:[],a&&r?jt(a):[])}return t.concat(o,jt(o,[],r))}function Ln(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gs(e){const t=Se(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ne(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Wr(r)!==s||Wr(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function no(e){return De(e)?e:e.contextElement}function vt(e){const t=no(e);if(!Ne(t))return Pe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=gs(t);let i=(s?Wr(r.width):r.width)/n,a=(s?Wr(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const tc=Pe(0);function ys(e){const t=Be(e);return!ro()||!t.visualViewport?tc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Be(e)?!1:t}function at(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=no(e);let i=Pe(1);t&&(n?De(n)&&(i=vt(n)):i=vt(e));const a=rc(s,r,n)?ys(s):Pe(0);let f=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,l=o.width/i.x,d=o.height/i.y;if(s){const u=Be(s),p=n&&De(n)?Be(n):n;let h=u,m=Ln(h);for(;m&&n&&p!==h;){const x=vt(m),b=m.getBoundingClientRect(),v=Se(m),g=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,y=b.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;f*=x.x,c*=x.y,l*=x.x,d*=x.y,f+=g,c+=y,h=Be(m),m=Ln(h)}}return Kr({width:l,height:d,x:f,y:c})}function oo(e,t){const r=nn(e).scrollLeft;return t?t.left+r:at(Ie(e)).left+r}function bs(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:oo(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function nc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ie(n),a=t?rn(t.floating):!1;if(n===i||a&&s)return r;let f={scrollLeft:0,scrollTop:0},c=Pe(1);const l=Pe(0),d=Ne(n);if((d||!d&&!s)&&((Bt(n)!=="body"||Mt(i))&&(f=nn(n)),Ne(n))){const p=at(n);c=vt(n),l.x=p.x+n.clientLeft,l.y=p.y+n.clientTop}const u=i&&!d&&!s?bs(i,f,!0):Pe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-f.scrollLeft*c.x+l.x+u.x,y:r.y*c.y-f.scrollTop*c.y+l.y+u.y}}function oc(e){return Array.from(e.getClientRects())}function sc(e){const t=Ie(e),r=nn(e),n=e.ownerDocument.body,o=_e(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=_e(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+oo(e);const a=-r.scrollTop;return Se(n).direction==="rtl"&&(i+=_e(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ic(e,t){const r=Be(e),n=Ie(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,f=0;if(o){s=o.width,i=o.height;const c=ro();(!c||c&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}return{width:s,height:i,x:a,y:f}}function ac(e,t){const r=at(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Ne(e)?vt(e):Pe(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,f=o*s.x,c=n*s.y;return{width:i,height:a,x:f,y:c}}function Io(e,t,r){let n;if(t==="viewport")n=ic(e,r);else if(t==="document")n=sc(Ie(e));else if(De(t))n=ac(t,r);else{const o=ys(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kr(n)}function Cs(e,t){const r=Ge(e);return r===t||!De(r)||Et(r)?!1:Se(r).position==="fixed"||Cs(r,t)}function cc(e,t){const r=t.get(e);if(r)return r;let n=jt(e,[],!1).filter(a=>De(a)&&Bt(a)!=="body"),o=null;const s=Se(e).position==="fixed";let i=s?Ge(e):e;for(;De(i)&&!Et(i);){const a=Se(i),f=to(i);!f&&a.position==="fixed"&&(o=null),(s?!f&&!o:!f&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Mt(i)&&!f&&Cs(e,i))?n=n.filter(l=>l!==i):o=a,i=Ge(i)}return t.set(e,n),n}function lc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?rn(t)?[]:cc(t,this._c):[].concat(r),n],a=i[0],f=i.reduce((c,l)=>{const d=Io(t,l,o);return c.top=_e(d.top,c.top),c.right=Xe(d.right,c.right),c.bottom=Xe(d.bottom,c.bottom),c.left=_e(d.left,c.left),c},Io(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function fc(e){const{width:t,height:r}=gs(e);return{width:t,height:r}}function uc(e,t,r){const n=Ne(t),o=Ie(t),s=r==="fixed",i=at(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const f=Pe(0);function c(){f.x=oo(o)}if(n||!n&&!s)if((Bt(t)!=="body"||Mt(o))&&(a=nn(t)),n){const p=at(t,!0,s,t);f.x=p.x+t.clientLeft,f.y=p.y+t.clientTop}else o&&c();s&&!n&&o&&c();const l=o&&!n&&!s?bs(o,a):Pe(0),d=i.left+a.scrollLeft-f.x-l.x,u=i.top+a.scrollTop-f.y-l.y;return{x:d,y:u,width:i.width,height:i.height}}function En(e){return Se(e).position==="static"}function jo(e,t){if(!Ne(e)||Se(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ie(e)===r&&(r=r.ownerDocument.body),r}function Es(e,t){const r=Be(e);if(rn(e))return r;if(!Ne(e)){let o=Ge(e);for(;o&&!Et(o);){if(De(o)&&!En(o))return o;o=Ge(o)}return r}let n=jo(e,t);for(;n&&Ja(n)&&En(n);)n=jo(n,t);return n&&Et(n)&&En(n)&&!to(n)?r:n||ec(e)||r}const dc=async function(e){const t=this.getOffsetParent||Es,r=this.getDimensions,n=await r(e.floating);return{reference:uc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xc(e){return Se(e).direction==="rtl"}const pc={convertOffsetParentRelativeRectToViewportRelativeRect:nc,getDocumentElement:Ie,getClippingRect:lc,getOffsetParent:Es,getElementRects:dc,getClientRects:oc,getDimensions:fc,getScale:vt,isElement:De,isRTL:xc};function ws(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hc(e,t){let r=null,n;const o=Ie(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),s();const c=e.getBoundingClientRect(),{left:l,top:d,width:u,height:p}=c;if(a||t(),!u||!p)return;const h=Gt(d),m=Gt(o.clientWidth-(l+u)),x=Gt(o.clientHeight-(d+p)),b=Gt(l),g={rootMargin:-h+"px "+-m+"px "+-x+"px "+-b+"px",threshold:_e(0,Xe(1,f))||1};let y=!0;function C(E){const w=E[0].intersectionRatio;if(w!==f){if(!y)return i();w?i(!1,w):n=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!ws(c,e.getBoundingClientRect())&&i(),y=!1}try{r=new IntersectionObserver(C,{...g,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,g)}r.observe(e)}return i(!0),s}function mc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=no(e),l=o||s?[...c?jt(c):[],...jt(t)]:[];l.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const d=c&&a?hc(c,r):null;let u=-1,p=null;i&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(t)})),r()}),c&&!f&&p.observe(c),p.observe(t));let h,m=f?at(e):null;f&&x();function x(){const b=at(e);m&&!ws(m,b)&&r(),m=b,h=requestAnimationFrame(x)}return r(),()=>{var b;l.forEach(v=>{o&&v.removeEventListener("scroll",r),s&&v.removeEventListener("resize",r)}),d==null||d(),(b=p)==null||b.disconnect(),p=null,f&&cancelAnimationFrame(h)}}const vc=Ga,gc=Ya,yc=Va,bc=Qa,Cc=Ka,Lo=Wa,Ec=Za,wc=(e,t,r)=>{const n=new Map,o={platform:pc,...r},s={...o.platform,_c:n};return qa(e,t,{...o,platform:s})};var tr=typeof document<"u"?Y.useLayoutEffect:Y.useEffect;function Xr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Xr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function As(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ho(e,t){const r=As(e);return Math.round(t*r)/r}function wn(e){const t=S.useRef(e);return tr(()=>{t.current=e}),t}function Ac(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:f,open:c}=e,[l,d]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[u,p]=S.useState(n);Xr(u,n)||p(n);const[h,m]=S.useState(null),[x,b]=S.useState(null),v=S.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=S.useCallback($=>{$!==w.current&&(w.current=$,b($))},[]),y=s||h,C=i||x,E=S.useRef(null),w=S.useRef(null),F=S.useRef(l),O=f!=null,A=wn(f),B=wn(o),R=wn(c),D=S.useCallback(()=>{if(!E.current||!w.current)return;const $={placement:t,strategy:r,middleware:u};B.current&&($.platform=B.current),wc(E.current,w.current,$).then(M=>{const U={...M,isPositioned:R.current!==!1};L.current&&!Xr(F.current,U)&&(F.current=U,as.flushSync(()=>{d(U)}))})},[u,t,r,B,R]);tr(()=>{c===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const L=S.useRef(!1);tr(()=>(L.current=!0,()=>{L.current=!1}),[]),tr(()=>{if(y&&(E.current=y),C&&(w.current=C),y&&C){if(A.current)return A.current(y,C,D);D()}},[y,C,D,A,O]);const H=S.useMemo(()=>({reference:E,floating:w,setReference:v,setFloating:g}),[v,g]),z=S.useMemo(()=>({reference:y,floating:C}),[y,C]),W=S.useMemo(()=>{const $={position:r,left:0,top:0};if(!z.floating)return $;const M=Ho(z.floating,l.x),U=Ho(z.floating,l.y);return a?{...$,transform:"translate("+M+"px, "+U+"px)",...As(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:U}},[r,a,z.floating,l.x,l.y]);return S.useMemo(()=>({...l,update:D,refs:H,elements:z,floatingStyles:W}),[l,D,H,z,W])}const _c=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Lo({element:n.current,padding:o}).fn(r):{}:n?Lo({element:n,padding:o}).fn(r):{}}}},Bc=(e,t)=>({...vc(e),options:[e,t]}),Fc=(e,t)=>({...gc(e),options:[e,t]}),Dc=(e,t)=>({...Ec(e),options:[e,t]}),Sc=(e,t)=>({...yc(e),options:[e,t]}),kc=(e,t)=>({...bc(e),options:[e,t]}),Tc=(e,t)=>({...Cc(e),options:[e,t]}),Rc=(e,t)=>({..._c(e),options:[e,t]});var Pc="Arrow",_s=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return _.jsx(Ye.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});_s.displayName=Pc;var Oc=_s;function Nc(e){const[t,r]=S.useState(void 0);return it(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const f=s.borderBoxSize,c=Array.isArray(f)?f[0]:f;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var so="Popper",[Bs,Fs]=cs(so),[Ic,Ds]=Bs(so),Ss=e=>{const{__scopePopper:t,children:r}=e,[n,o]=S.useState(null);return _.jsx(Ic,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ss.displayName=so;var ks="PopperAnchor",Ts=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Ds(ks,r),i=S.useRef(null),a=Me(t,i);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:_.jsx(Ye.div,{...o,ref:a})});Ts.displayName=ks;var io="PopperContent",[jc,Lc]=Bs(io),Rs=S.forwardRef((e,t)=>{var le,N,Q,X,J,V;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:c=[],collisionPadding:l=0,sticky:d="partial",hideWhenDetached:u=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,x=Ds(io,r),[b,v]=S.useState(null),g=Me(t,q=>v(q)),[y,C]=S.useState(null),E=Nc(y),w=(E==null?void 0:E.width)??0,F=(E==null?void 0:E.height)??0,O=n+(s!=="center"?"-"+s:""),A=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},B=Array.isArray(c)?c:[c],R=B.length>0,D={padding:A,boundary:B.filter($c),altBoundary:R},{refs:L,floatingStyles:H,placement:z,isPositioned:W,middlewareData:$}=Ac({strategy:"fixed",placement:O,whileElementsMounted:(...q)=>mc(...q,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Bc({mainAxis:o+F,alignmentAxis:i}),f&&Fc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Dc():void 0,...D}),f&&Sc({...D}),kc({...D,apply:({elements:q,rects:se,availableWidth:Ee,availableHeight:ge})=>{const{width:de,height:ye}=se.reference,me=q.floating.style;me.setProperty("--radix-popper-available-width",`${Ee}px`),me.setProperty("--radix-popper-available-height",`${ge}px`),me.setProperty("--radix-popper-anchor-width",`${de}px`),me.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),y&&Rc({element:y,padding:a}),zc({arrowWidth:w,arrowHeight:F}),u&&Tc({strategy:"referenceHidden",...D})]}),[M,U]=Ns(z),P=Ct(h);it(()=>{W&&(P==null||P())},[W,P]);const T=(le=$.arrow)==null?void 0:le.x,j=(N=$.arrow)==null?void 0:N.y,I=((Q=$.arrow)==null?void 0:Q.centerOffset)!==0,[Z,oe]=S.useState();return it(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),_.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:W?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(X=$.transformOrigin)==null?void 0:X.x,(J=$.transformOrigin)==null?void 0:J.y].join(" "),...((V=$.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(jc,{scope:r,placedSide:M,onArrowChange:C,arrowX:T,arrowY:j,shouldHideArrow:I,children:_.jsx(Ye.div,{"data-side":M,"data-align":U,...m,ref:g,style:{...m.style,animation:W?void 0:"none"}})})})});Rs.displayName=io;var Ps="PopperArrow",Hc={top:"bottom",right:"left",bottom:"top",left:"right"},Os=S.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Lc(Ps,n),i=Hc[s.placedSide];return _.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:_.jsx(Oc,{...o,ref:r,style:{...o.style,display:"block"}})})});Os.displayName=Ps;function $c(e){return e!==null}var zc=e=>({name:"transformOrigin",options:e,fn(t){var x,b,v;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,f=i?0:e.arrowHeight,[c,l]=Ns(r),d={start:"0%",center:"50%",end:"100%"}[l],u=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,p=(((v=o.arrow)==null?void 0:v.y)??0)+f/2;let h="",m="";return c==="bottom"?(h=i?d:`${u}px`,m=`${-f}px`):c==="top"?(h=i?d:`${u}px`,m=`${n.floating.height+f}px`):c==="right"?(h=`${-f}px`,m=i?d:`${p}px`):c==="left"&&(h=`${n.floating.width+f}px`,m=i?d:`${p}px`),{data:{x:h,y:m}}}});function Ns(e){const[t,r="center"]=e.split("-");return[t,r]}var Mc=Ss,Is=Ts,Uc=Rs,qc=Os;function Wc(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var js=e=>{const{present:t,children:r}=e,n=Vc(t),o=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Me(n.ref,Kc(o));return typeof r=="function"||n.isPresent?S.cloneElement(o,{ref:s}):null};js.displayName="Presence";function Vc(e){const[t,r]=S.useState(),n=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,f]=Wc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=Yt(n.current);s.current=a==="mounted"?c:"none"},[a]),it(()=>{const c=n.current,l=o.current;if(l!==e){const u=s.current,p=Yt(c);e?f("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?f("UNMOUNT"):f(l&&u!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),it(()=>{if(t){let c;const l=t.ownerDocument.defaultView??window,d=p=>{const m=Yt(n.current).includes(p.animationName);if(p.target===t&&m&&(f("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},u=p=>{p.target===t&&(s.current=Yt(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(c),t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Yt(e){return(e==null?void 0:e.animationName)||"none"}function Kc(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Xc=S[" useInsertionEffect ".trim().toString()]||it;function Gc({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=Yc({defaultProp:t,onChange:r}),a=e!==void 0,f=a?e:o;{const l=S.useRef(e!==void 0);S.useEffect(()=>{const d=l.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=a},[a,n])}const c=S.useCallback(l=>{var d;if(a){const u=Zc(l)?l(e):l;u!==e&&((d=i.current)==null||d.call(i,u))}else s(l)},[a,e,s,i]);return[f,c]}function Yc({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return Xc(()=>{s.current=t},[t]),S.useEffect(()=>{var i;o.current!==r&&((i=s.current)==null||i.call(s,r),o.current=r)},[r,o]),[r,n,s]}function Zc(e){return typeof e=="function"}var Qc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,Zt=new WeakMap,Qt={},An=0,Ls=function(e){return e&&(e.host||Ls(e.parentNode))},Jc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ls(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},el=function(e,t,r,n){var o=Jc(t,Array.isArray(e)?e:[e]);Qt[r]||(Qt[r]=new WeakMap);var s=Qt[r],i=[],a=new Set,f=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var l=function(d){!d||f.has(d)||Array.prototype.forEach.call(d.children,function(u){if(a.has(u))l(u);else try{var p=u.getAttribute(n),h=p!==null&&p!=="false",m=(xt.get(u)||0)+1,x=(s.get(u)||0)+1;xt.set(u,m),s.set(u,x),i.push(u),m===1&&h&&Zt.set(u,!0),x===1&&u.setAttribute(r,"true"),h||u.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",u,b)}})};return l(t),a.clear(),An++,function(){i.forEach(function(d){var u=xt.get(d)-1,p=s.get(d)-1;xt.set(d,u),s.set(d,p),u||(Zt.has(d)||d.removeAttribute(n),Zt.delete(d)),p||d.removeAttribute(r)}),An--,An||(xt=new WeakMap,xt=new WeakMap,Zt=new WeakMap,Qt={})}},tl=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Qc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),el(n,o,r,"aria-hidden")):function(){return null}},Re=function(){return Re=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Re.apply(this,arguments)};function Hs(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function rl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var rr="right-scroll-bar-position",nr="width-before-scroll-bar",nl="with-scroll-bars-hidden",ol="--removed-body-scroll-bar-size";function _n(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sl(e,t){var r=Y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var il=typeof window<"u"?S.useLayoutEffect:S.useEffect,$o=new WeakMap;function al(e,t){var r=sl(null,function(n){return e.forEach(function(o){return _n(o,n)})});return il(function(){var n=$o.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||_n(a,null)}),s.forEach(function(a){o.has(a)||_n(a,i)})}$o.set(r,e)},[e]),r}function cl(e){return e}function ll(e,t){t===void 0&&(t=cl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var f=function(){var l=i;i=[],l.forEach(s)},c=function(){return Promise.resolve().then(f)};c(),r={push:function(l){i.push(l),c()},filter:function(l){return i=i.filter(l),r}}}};return o}function fl(e){e===void 0&&(e={});var t=ll(null);return t.options=Re({async:!0,ssr:!1},e),t}var $s=function(e){var t=e.sideCar,r=Hs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,Re({},r))};$s.isSideCarExport=!0;function ul(e,t){return e.useMedium(t),$s}var zs=fl(),Bn=function(){},on=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:Bn,onWheelCapture:Bn,onTouchMoveCapture:Bn}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,f=e.className,c=e.removeScrollBar,l=e.enabled,d=e.shards,u=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,x=e.allowPinchZoom,b=e.as,v=b===void 0?"div":b,g=e.gapMode,y=Hs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=u,E=al([r,t]),w=Re(Re({},y),o);return S.createElement(S.Fragment,null,l&&S.createElement(C,{sideCar:zs,removeScrollBar:c,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:r,gapMode:g}),i?S.cloneElement(S.Children.only(a),Re(Re({},w),{ref:E})):S.createElement(v,Re({},w,{className:f,ref:E}),a))});on.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};on.classNames={fullWidth:nr,zeroRight:rr};var dl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dl();return t&&e.setAttribute("nonce",t),e}function pl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ml=function(){var e=0,t=null;return{add:function(r){e==0&&(t=xl())&&(pl(t,r),hl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vl=function(){var e=ml();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ms=function(){var e=vl(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},gl={left:0,top:0,right:0,gap:0},Fn=function(e){return parseInt(e||"",10)||0},yl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fn(r),Fn(n),Fn(o)]},bl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gl;var t=yl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Cl=Ms(),gt="data-scroll-locked",El=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
2
- .`.concat(nl,` {
3
- overflow: hidden `).concat(n,`;
4
- padding-right: `).concat(a,"px ").concat(n,`;
5
- }
6
- body[`).concat(gt,`] {
7
- overflow: hidden `).concat(n,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(i,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(a,"px ").concat(n,`;
16
- `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(rr,` {
20
- right: `).concat(a,"px ").concat(n,`;
21
- }
22
-
23
- .`).concat(nr,` {
24
- margin-right: `).concat(a,"px ").concat(n,`;
25
- }
26
-
27
- .`).concat(rr," .").concat(rr,` {
28
- right: 0 `).concat(n,`;
29
- }
30
-
31
- .`).concat(nr," .").concat(nr,` {
32
- margin-right: 0 `).concat(n,`;
33
- }
34
-
35
- body[`).concat(gt,`] {
36
- `).concat(ol,": ").concat(a,`px;
37
- }
38
- `)},zo=function(){var e=parseInt(document.body.getAttribute(gt)||"0",10);return isFinite(e)?e:0},wl=function(){S.useEffect(function(){return document.body.setAttribute(gt,(zo()+1).toString()),function(){var e=zo()-1;e<=0?document.body.removeAttribute(gt):document.body.setAttribute(gt,e.toString())}},[])},Al=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;wl();var s=S.useMemo(function(){return bl(o)},[o]);return S.createElement(Cl,{styles:El(s,!t,o,r?"":"!important")})},Hn=!1;if(typeof window<"u")try{var Jt=Object.defineProperty({},"passive",{get:function(){return Hn=!0,!0}});window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{Hn=!1}var pt=Hn?{passive:!1}:!1,_l=function(e){return e.tagName==="TEXTAREA"},Us=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!_l(e)&&r[t]==="visible")},Bl=function(e){return Us(e,"overflowY")},Fl=function(e){return Us(e,"overflowX")},Mo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=qs(e,n);if(o){var s=Ws(e,n),i=s[1],a=s[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Dl=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Sl=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},qs=function(e,t){return e==="v"?Bl(t):Fl(t)},Ws=function(e,t){return e==="v"?Dl(t):Sl(t)},kl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tl=function(e,t,r,n,o){var s=kl(e,window.getComputedStyle(t).direction),i=s*n,a=r.target,f=t.contains(a),c=!1,l=i>0,d=0,u=0;do{var p=Ws(e,a),h=p[0],m=p[1],x=p[2],b=m-x-s*h;(h||b)&&qs(e,a)&&(d+=b,u+=h),a=a.parentNode.host||a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(l&&Math.abs(d)<1||!l&&Math.abs(u)<1)&&(c=!0),c},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Uo=function(e){return[e.deltaX,e.deltaY]},qo=function(e){return e&&"current"in e?e.current:e},Rl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pl=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Ol=0,ht=[];function Nl(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),o=S.useState(Ol++)[0],s=S.useState(Ms)[0],i=S.useRef(e);S.useEffect(function(){i.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=rl([e.lockRef.current],(e.shards||[]).map(qo),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=er(m),v=r.current,g="deltaX"in m?m.deltaX:v[0]-b[0],y="deltaY"in m?m.deltaY:v[1]-b[1],C,E=m.target,w=Math.abs(g)>Math.abs(y)?"h":"v";if("touches"in m&&w==="h"&&E.type==="range")return!1;var F=Mo(w,E);if(!F)return!0;if(F?C=w:(C=w==="v"?"h":"v",F=Mo(w,E)),!F)return!1;if(!n.current&&"changedTouches"in m&&(g||y)&&(n.current=C),!C)return!0;var O=n.current||C;return Tl(O,x,m,O==="h"?g:y)},[]),f=S.useCallback(function(m){var x=m;if(!(!ht.length||ht[ht.length-1]!==s)){var b="deltaY"in x?Uo(x):er(x),v=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&Rl(C.delta,b)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var g=(i.current.shards||[]).map(qo).filter(Boolean).filter(function(C){return C.contains(x.target)}),y=g.length>0?a(x,g[0]):!i.current.noIsolation;y&&x.cancelable&&x.preventDefault()}}},[]),c=S.useCallback(function(m,x,b,v){var g={name:m,delta:x,target:b,should:v,shadowParent:Il(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(y){return y!==g})},1)},[]),l=S.useCallback(function(m){r.current=er(m),n.current=void 0},[]),d=S.useCallback(function(m){c(m.type,Uo(m),m.target,a(m,e.lockRef.current))},[]),u=S.useCallback(function(m){c(m.type,er(m),m.target,a(m,e.lockRef.current))},[]);S.useEffect(function(){return ht.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:u}),document.addEventListener("wheel",f,pt),document.addEventListener("touchmove",f,pt),document.addEventListener("touchstart",l,pt),function(){ht=ht.filter(function(m){return m!==s}),document.removeEventListener("wheel",f,pt),document.removeEventListener("touchmove",f,pt),document.removeEventListener("touchstart",l,pt)}},[]);var p=e.removeScrollBar,h=e.inert;return S.createElement(S.Fragment,null,h?S.createElement(s,{styles:Pl(o)}):null,p?S.createElement(Al,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Il(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jl=ul(zs,Nl);var Vs=S.forwardRef(function(e,t){return S.createElement(on,Re({},e,{ref:t,sideCar:jl}))});Vs.classNames=on.classNames;var sn="Popover",[Ks,xp]=cs(sn,[Fs]),Ut=Fs(),[Ll,lt]=Ks(sn),Xs=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Ut(t),f=S.useRef(null),[c,l]=S.useState(!1),[d,u]=Gc({prop:n,defaultProp:o??!1,onChange:s,caller:sn});return _.jsx(Mc,{...a,children:_.jsx(Ll,{scope:t,contentId:Na(),triggerRef:f,open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(p=>!p),[u]),hasCustomAnchor:c,onCustomAnchorAdd:S.useCallback(()=>l(!0),[]),onCustomAnchorRemove:S.useCallback(()=>l(!1),[]),modal:i,children:r})})};Xs.displayName=sn;var Gs="PopoverAnchor",Hl=S.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=lt(Gs,r),s=Ut(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),_.jsx(Is,{...s,...n,ref:t})});Hl.displayName=Gs;var Ys="PopoverTrigger",Zs=S.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=lt(Ys,r),s=Ut(r),i=Me(t,o.triggerRef),a=_.jsx(Ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ei(o.open),...n,ref:i,onClick:Ke(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:_.jsx(Is,{asChild:!0,...s,children:a})});Zs.displayName=Ys;var $l="PopoverPortal",[pp,zl]=Ks($l,{forceMount:void 0}),wt="PopoverContent",Ml=S.forwardRef((e,t)=>{const r=zl(wt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=lt(wt,e.__scopePopover);return _.jsx(js,{present:n||s.open,children:s.modal?_.jsx(ql,{...o,ref:t}):_.jsx(Wl,{...o,ref:t})})});Ml.displayName=wt;var Ul=ls("PopoverContent.RemoveScroll"),ql=S.forwardRef((e,t)=>{const r=lt(wt,e.__scopePopover),n=S.useRef(null),o=Me(t,n),s=S.useRef(!1);return S.useEffect(()=>{const i=n.current;if(i)return tl(i)},[]),_.jsx(Vs,{as:Ul,allowPinchZoom:!0,children:_.jsx(Qs,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ke(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Ke(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,f=a.button===0&&a.ctrlKey===!0,c=a.button===2||f;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ke(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wl=S.forwardRef((e,t)=>{const r=lt(wt,e.__scopePopover),n=S.useRef(!1),o=S.useRef(!1);return _.jsx(Qs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var f,c;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Qs=S.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:l,...d}=e,u=lt(wt,r),p=Ut(r);return _a(),_.jsx(xs,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:_.jsx(us,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:f,onFocusOutside:c,onDismiss:()=>u.onOpenChange(!1),children:_.jsx(Uc,{"data-state":ei(u.open),role:"dialog",id:u.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Js="PopoverClose",Vl=S.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=lt(Js,r);return _.jsx(Ye.button,{type:"button",...n,ref:t,onClick:Ke(e.onClick,()=>o.onOpenChange(!1))})});Vl.displayName=Js;var Kl="PopoverArrow",Xl=S.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ut(r);return _.jsx(qc,{...o,...n,ref:t})});Xl.displayName=Kl;function ei(e){return e?"open":"closed"}var Gl=Xs,Yl=Zs;const yt=e=>{const t=new CustomEvent("reactCartUpdated",{detail:{cartUpdated:!0,basketId:e}});window.dispatchEvent(t)};function Zl({...e}){return _.jsx(Gl,{"data-slot":"popover",...e})}function Ql({...e}){return _.jsx(Yl,{"data-slot":"popover-trigger",...e})}function ti(e,t){return function(){return e.apply(t,arguments)}}const{toString:Jl}=Object.prototype,{getPrototypeOf:ao}=Object,{iterator:an,toStringTag:ri}=Symbol,cn=(e=>t=>{const r=Jl.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ke=e=>(e=e.toLowerCase(),t=>cn(t)===e),ln=e=>t=>typeof t===e,{isArray:Ft}=Array,Lt=ln("undefined");function ef(e){return e!==null&&!Lt(e)&&e.constructor!==null&&!Lt(e.constructor)&&be(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ni=ke("ArrayBuffer");function tf(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ni(e.buffer),t}const rf=ln("string"),be=ln("function"),oi=ln("number"),fn=e=>e!==null&&typeof e=="object",nf=e=>e===!0||e===!1,or=e=>{if(cn(e)!=="object")return!1;const t=ao(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ri in e)&&!(an in e)},of=ke("Date"),sf=ke("File"),af=ke("Blob"),cf=ke("FileList"),lf=e=>fn(e)&&be(e.pipe),ff=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||be(e.append)&&((t=cn(e))==="formdata"||t==="object"&&be(e.toString)&&e.toString()==="[object FormData]"))},uf=ke("URLSearchParams"),[df,xf,pf,hf]=["ReadableStream","Request","Response","Headers"].map(ke),mf=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Ft(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(n=0;n<i;n++)a=s[n],t.call(null,e[a],a,e)}}function si(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ii=e=>!Lt(e)&&e!==ot;function $n(){const{caseless:e}=ii(this)&&this||{},t={},r=(n,o)=>{const s=e&&si(t,o)||o;or(t[s])&&or(n)?t[s]=$n(t[s],n):or(n)?t[s]=$n({},n):Ft(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&qt(arguments[n],r);return t}const vf=(e,t,r,{allOwnKeys:n}={})=>(qt(t,(o,s)=>{r&&be(o)?e[s]=ti(o,r):e[s]=o},{allOwnKeys:n}),e),gf=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yf=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},bf=(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&ao(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Cf=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ef=e=>{if(!e)return null;if(Ft(e))return e;let t=e.length;if(!oi(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},wf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ao(Uint8Array)),Af=(e,t)=>{const n=(e&&e[an]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},_f=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Bf=ke("HTMLFormElement"),Ff=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Wo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Df=ke("RegExp"),ai=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};qt(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},Sf=e=>{ai(e,(t,r)=>{if(be(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(be(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},kf=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Ft(e)?n(e):n(String(e).split(t)),r},Tf=()=>{},Rf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Pf(e){return!!(e&&be(e.append)&&e[ri]==="FormData"&&e[an])}const Of=e=>{const t=new Array(10),r=(n,o)=>{if(fn(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const s=Ft(n)?[]:{};return qt(n,(i,a)=>{const f=r(i,o+1);!Lt(f)&&(s[a]=f)}),t[o]=void 0,s}}return n};return r(e,0)},Nf=ke("AsyncFunction"),If=e=>e&&(fn(e)||be(e))&&be(e.then)&&be(e.catch),ci=((e,t)=>e?setImmediate:t?((r,n)=>(ot.addEventListener("message",({source:o,data:s})=>{o===ot&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),ot.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",be(ot.postMessage)),jf=typeof queueMicrotask<"u"?queueMicrotask.bind(ot):typeof process<"u"&&process.nextTick||ci,Lf=e=>e!=null&&be(e[an]),k={isArray:Ft,isArrayBuffer:ni,isBuffer:ef,isFormData:ff,isArrayBufferView:tf,isString:rf,isNumber:oi,isBoolean:nf,isObject:fn,isPlainObject:or,isReadableStream:df,isRequest:xf,isResponse:pf,isHeaders:hf,isUndefined:Lt,isDate:of,isFile:sf,isBlob:af,isRegExp:Df,isFunction:be,isStream:lf,isURLSearchParams:uf,isTypedArray:wf,isFileList:cf,forEach:qt,merge:$n,extend:vf,trim:mf,stripBOM:gf,inherits:yf,toFlatObject:bf,kindOf:cn,kindOfTest:ke,endsWith:Cf,toArray:Ef,forEachEntry:Af,matchAll:_f,isHTMLForm:Bf,hasOwnProperty:Wo,hasOwnProp:Wo,reduceDescriptors:ai,freezeMethods:Sf,toObjectSet:kf,toCamelCase:Ff,noop:Tf,toFiniteNumber:Rf,findKey:si,global:ot,isContextDefined:ii,isSpecCompliantForm:Pf,toJSONObject:Of,isAsyncFn:Nf,isThenable:If,setImmediate:ci,asap:jf,isIterable:Lf};function K(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}k.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const li=K.prototype,fi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fi[e]={value:e}});Object.defineProperties(K,fi);Object.defineProperty(li,"isAxiosError",{value:!0});K.from=(e,t,r,n,o,s)=>{const i=Object.create(li);return k.toFlatObject(e,i,function(f){return f!==Error.prototype},a=>a!=="isAxiosError"),K.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Hf=null;function zn(e){return k.isPlainObject(e)||k.isArray(e)}function ui(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function Vo(e,t,r){return e?e.concat(t).map(function(o,s){return o=ui(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function $f(e){return k.isArray(e)&&!e.some(zn)}const zf=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function un(e,t,r){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=k.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,x){return!k.isUndefined(x[m])});const n=r.metaTokens,o=r.visitor||l,s=r.dots,i=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(k.isDate(h))return h.toISOString();if(!f&&k.isBlob(h))throw new K("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(h)||k.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,m,x){let b=h;if(h&&!x&&typeof h=="object"){if(k.endsWith(m,"{}"))m=n?m:m.slice(0,-2),h=JSON.stringify(h);else if(k.isArray(h)&&$f(h)||(k.isFileList(h)||k.endsWith(m,"[]"))&&(b=k.toArray(h)))return m=ui(m),b.forEach(function(g,y){!(k.isUndefined(g)||g===null)&&t.append(i===!0?Vo([m],y,s):i===null?m:m+"[]",c(g))}),!1}return zn(h)?!0:(t.append(Vo(x,m,s),c(h)),!1)}const d=[],u=Object.assign(zf,{defaultVisitor:l,convertValue:c,isVisitable:zn});function p(h,m){if(!k.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),k.forEach(h,function(b,v){(!(k.isUndefined(b)||b===null)&&o.call(t,b,k.isString(v)?v.trim():v,m,u))===!0&&p(b,m?m.concat(v):[v])}),d.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Ko(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function co(e,t){this._pairs=[],e&&un(e,this,t)}const di=co.prototype;di.append=function(t,r){this._pairs.push([t,r])};di.toString=function(t){const r=t?function(n){return t.call(this,n,Ko)}:Ko;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Mf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xi(e,t,r){if(!t)return e;const n=r&&r.encode||Mf;k.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=k.isURLSearchParams(t)?t.toString():new co(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Xo{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Uf=typeof URLSearchParams<"u"?URLSearchParams:co,qf=typeof FormData<"u"?FormData:null,Wf=typeof Blob<"u"?Blob:null,Vf={isBrowser:!0,classes:{URLSearchParams:Uf,FormData:qf,Blob:Wf},protocols:["http","https","file","blob","url","data"]},lo=typeof window<"u"&&typeof document<"u",Mn=typeof navigator=="object"&&navigator||void 0,Kf=lo&&(!Mn||["ReactNative","NativeScript","NS"].indexOf(Mn.product)<0),Xf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Gf=lo&&window.location.href||"http://localhost",Yf=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lo,hasStandardBrowserEnv:Kf,hasStandardBrowserWebWorkerEnv:Xf,navigator:Mn,origin:Gf},Symbol.toStringTag,{value:"Module"})),he={...Yf,...Vf};function Zf(e,t){return un(e,new he.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return he.isNode&&k.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Qf(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jf(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function hi(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=s>=r.length;return i=!i&&k.isArray(o)?o.length:i,f?(k.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!k.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&k.isArray(o[i])&&(o[i]=Jf(o[i])),!a)}if(k.isFormData(e)&&k.isFunction(e.entries)){const r={};return k.forEachEntry(e,(n,o)=>{t(Qf(n),o,r,0)}),r}return null}function eu(e,t,r){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Wt={transitional:pi,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=k.isObject(t);if(s&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return o?JSON.stringify(hi(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Zf(t,this.formSerializer).toString();if((a=k.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return un(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),eu(t)):t}],transformResponse:[function(t){const r=this.transitional||Wt.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?K.from(a,K.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:he.classes.FormData,Blob:he.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{Wt.headers[e]={}});const tu=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ru=e=>{const t={};let r,n,o;return e&&e.split(`
42
- `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&tu[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Go=Symbol("internals");function Tt(e){return e&&String(e).trim().toLowerCase()}function sr(e){return e===!1||e==null?e:k.isArray(e)?e.map(sr):String(e)}function nu(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const ou=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Dn(e,t,r,n,o){if(k.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!k.isString(t)){if(k.isString(n))return t.indexOf(n)!==-1;if(k.isRegExp(n))return n.test(t)}}function su(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function iu(e,t){const r=k.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let Ce=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,f,c){const l=Tt(f);if(!l)throw new Error("header name must be a non-empty string");const d=k.findKey(o,l);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||f]=sr(a))}const i=(a,f)=>k.forEach(a,(c,l)=>s(c,l,f));if(k.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(k.isString(t)&&(t=t.trim())&&!ou(t))i(ru(t),r);else if(k.isObject(t)&&k.isIterable(t)){let a={},f,c;for(const l of t){if(!k.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(f=a[c])?k.isArray(f)?[...f,l[1]]:[f,l[1]]:l[1]}i(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Tt(t),t){const n=k.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return nu(o);if(k.isFunction(r))return r.call(this,o,n);if(k.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Tt(t),t){const n=k.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Dn(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=Tt(i),i){const a=k.findKey(n,i);a&&(!r||Dn(n,n[a],a,r))&&(delete n[a],o=!0)}}return k.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||Dn(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return k.forEach(this,(o,s)=>{const i=k.findKey(n,s);if(i){r[i]=sr(o),delete r[s];return}const a=t?su(s):String(s).trim();a!==s&&delete r[s],r[a]=sr(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return k.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&k.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
43
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Go]=this[Go]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Tt(i);n[a]||(iu(o,i),n[a]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}};Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Ce.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});k.freezeMethods(Ce);function Sn(e,t){const r=this||Wt,n=t||r,o=Ce.from(n.headers);let s=n.data;return k.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function mi(e){return!!(e&&e.__CANCEL__)}function Dt(e,t,r){K.call(this,e??"canceled",K.ERR_CANCELED,t,r),this.name="CanceledError"}k.inherits(Dt,K,{__CANCEL__:!0});function vi(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function au(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cu(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),l=n[s];i||(i=c),r[o]=f,n[o]=c;let d=s,u=0;for(;d!==o;)u+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const p=l&&c-l;return p?Math.round(u*1e3/p):void 0}}function lu(e,t){let r=0,n=1e3/t,o,s;const i=(c,l=Date.now())=>{r=l,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const l=Date.now(),d=l-r;d>=n?i(c,l):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},n-d)))},()=>o&&i(o)]}const Gr=(e,t,r=3)=>{let n=0;const o=cu(50,250);return lu(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,f=i-n,c=o(f),l=i<=a;n=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},Yo=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Zo=e=>(...t)=>k.asap(()=>e(...t)),fu=he.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,he.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(he.origin),he.navigator&&/(msie|trident)/i.test(he.navigator.userAgent)):()=>!0,uu=he.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];k.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),k.isString(n)&&i.push("path="+n),k.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function du(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xu(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gi(e,t,r){let n=!du(t);return e&&(n||r==!1)?xu(e,t):t}const Qo=e=>e instanceof Ce?{...e}:e;function ct(e,t){t=t||{};const r={};function n(c,l,d,u){return k.isPlainObject(c)&&k.isPlainObject(l)?k.merge.call({caseless:u},c,l):k.isPlainObject(l)?k.merge({},l):k.isArray(l)?l.slice():l}function o(c,l,d,u){if(k.isUndefined(l)){if(!k.isUndefined(c))return n(void 0,c,d,u)}else return n(c,l,d,u)}function s(c,l){if(!k.isUndefined(l))return n(void 0,l)}function i(c,l){if(k.isUndefined(l)){if(!k.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,d){if(d in t)return n(c,l);if(d in e)return n(void 0,c)}const f={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,l,d)=>o(Qo(c),Qo(l),d,!0)};return k.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=f[l]||o,u=d(e[l],t[l],l);k.isUndefined(u)&&d!==a||(r[l]=u)}),r}const yi=e=>{const t=ct({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=Ce.from(i),t.url=xi(gi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let f;if(k.isFormData(r)){if(he.hasStandardBrowserEnv||he.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[c,...l]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...l].join("; "))}}if(he.hasStandardBrowserEnv&&(n&&k.isFunction(n)&&(n=n(t)),n||n!==!1&&fu(t.url))){const c=o&&s&&uu.read(s);c&&i.set(o,c)}return t},pu=typeof XMLHttpRequest<"u",hu=pu&&function(e){return new Promise(function(r,n){const o=yi(e);let s=o.data;const i=Ce.from(o.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:c}=o,l,d,u,p,h;function m(){p&&p(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const g=Ce.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:g,config:e,request:x};vi(function(w){r(w),m()},function(w){n(w),m()},C),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new K("Request aborted",K.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new K("Network Error",K.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||pi;o.timeoutErrorMessage&&(y=o.timeoutErrorMessage),n(new K(y,C.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,x)),x=null},s===void 0&&i.setContentType(null),"setRequestHeader"in x&&k.forEach(i.toJSON(),function(y,C){x.setRequestHeader(C,y)}),k.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),c&&([u,h]=Gr(c,!0),x.addEventListener("progress",u)),f&&x.upload&&([d,p]=Gr(f),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(l=g=>{x&&(n(!g||g.type?new Dt(null,e,x):g),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const v=au(o.url);if(v&&he.protocols.indexOf(v)===-1){n(new K("Unsupported protocol "+v+":",K.ERR_BAD_REQUEST,e));return}x.send(s||null)})},mu=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof K?l:new Dt(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,s(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>k.asap(a),f}},vu=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},gu=async function*(e,t){for await(const r of yu(e))yield*vu(r,t)},yu=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Jo=(e,t,r,n)=>{const o=gu(e,t);let s=0,i,a=f=>{i||(i=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:c,value:l}=await o.next();if(c){a(),f.close();return}let d=l.byteLength;if(r){let u=s+=d;r(u)}f.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(f){return a(f),o.return()}},{highWaterMark:2})},dn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bi=dn&&typeof ReadableStream=="function",bu=dn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ci=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Cu=bi&&Ci(()=>{let e=!1;const t=new Request(he.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),e0=64*1024,Un=bi&&Ci(()=>k.isReadableStream(new Response("").body)),Yr={stream:Un&&(e=>e.body)};dn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yr[t]&&(Yr[t]=k.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new K(`Response type '${t}' is not supported`,K.ERR_NOT_SUPPORT,n)})})})(new Response);const Eu=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new Request(he.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e=e+""),k.isString(e))return(await bu(e)).byteLength},wu=async(e,t)=>{const r=k.toFiniteNumber(e.getContentLength());return r??Eu(t)},Au=dn&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:f,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:u}=yi(e);c=c?(c+"").toLowerCase():"text";let p=mu([o,s&&s.toAbortSignal()],i),h;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(f&&Cu&&r!=="get"&&r!=="head"&&(x=await wu(l,n))!==0){let C=new Request(t,{method:"POST",body:n,duplex:"half"}),E;if(k.isFormData(n)&&(E=C.headers.get("content-type"))&&l.setContentType(E),C.body){const[w,F]=Yo(x,Gr(Zo(f)));n=Jo(C.body,e0,w,F)}}k.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;h=new Request(t,{...u,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:b?d:void 0});let v=await fetch(h);const g=Un&&(c==="stream"||c==="response");if(Un&&(a||g&&m)){const C={};["status","statusText","headers"].forEach(O=>{C[O]=v[O]});const E=k.toFiniteNumber(v.headers.get("content-length")),[w,F]=a&&Yo(E,Gr(Zo(a),!0))||[];v=new Response(Jo(v.body,e0,w,()=>{F&&F(),m&&m()}),C)}c=c||"text";let y=await Yr[k.findKey(Yr,c)||"text"](v,e);return!g&&m&&m(),await new Promise((C,E)=>{vi(C,E,{data:y,headers:Ce.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:h})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new K("Network Error",K.ERR_NETWORK,e,h),{cause:b.cause||b}):K.from(b,b&&b.code,e,h)}}),qn={http:Hf,xhr:hu,fetch:Au};k.forEach(qn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const t0=e=>`- ${e}`,_u=e=>k.isFunction(e)||e===null||e===!1,Ei={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let i;if(n=r,!_u(r)&&(n=qn[(i=String(r)).toLowerCase()],n===void 0))throw new K(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){const s=Object.entries(o).map(([a,f])=>`adapter ${a} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
44
- `+s.map(t0).join(`
45
- `):" "+t0(s[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:qn};function kn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dt(null,e)}function r0(e){return kn(e),e.headers=Ce.from(e.headers),e.data=Sn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ei.getAdapter(e.adapter||Wt.adapter)(e).then(function(n){return kn(e),n.data=Sn.call(e,e.transformResponse,n),n.headers=Ce.from(n.headers),n},function(n){return mi(n)||(kn(e),n&&n.response&&(n.response.data=Sn.call(e,e.transformResponse,n.response),n.response.headers=Ce.from(n.response.headers))),Promise.reject(n)})}const wi="1.9.0",xn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const n0={};xn.transitional=function(t,r,n){function o(s,i){return"[Axios v"+wi+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new K(o(i," has been removed"+(r?" in "+r:"")),K.ERR_DEPRECATED);return r&&!n0[i]&&(n0[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,a):!0}};xn.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Bu(e,t,r){if(typeof e!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const a=e[s],f=a===void 0||i(a,s,e);if(f!==!0)throw new K("option "+s+" must be "+f,K.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new K("Unknown option "+s,K.ERR_BAD_OPTION)}}const ir={assertOptions:Bu,validators:xn},Te=ir.validators;let st=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Xo,response:new Xo}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
46
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ct(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&ir.assertOptions(n,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),o!=null&&(k.isFunction(o)?r.paramsSerializer={serialize:o}:ir.assertOptions(o,{encode:Te.function,serialize:Te.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ir.assertOptions(r,{baseUrl:Te.spelling("baseURL"),withXsrfToken:Te.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&k.merge(s.common,s[r.method]);s&&k.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),r.headers=Ce.concat(i,s);const a=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(f=f&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let l,d=0,u;if(!f){const h=[r0.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,c),u=h.length,l=Promise.resolve(r);d<u;)l=l.then(h[d++],h[d++]);return l}u=a.length;let p=r;for(d=0;d<u;){const h=a[d++],m=a[d++];try{p=h(p)}catch(x){m.call(this,x);break}}try{l=r0.call(this,p)}catch(h){return Promise.reject(h)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(t){t=ct(this.defaults,t);const r=gi(t.baseURL,t.url,t.allowAbsoluteUrls);return xi(r,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(r,n){return this.request(ct(n||{},{method:t,url:r,data:(n||{}).data}))}});k.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,a){return this.request(ct(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}st.prototype[t]=r(),st.prototype[t+"Form"]=r(!0)});let Fu=class Ai{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,a){n.reason||(n.reason=new Dt(s,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ai(function(o){t=o}),cancel:t}}};function Du(e){return function(r){return e.apply(null,r)}}function Su(e){return k.isObject(e)&&e.isAxiosError===!0}const Wn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wn).forEach(([e,t])=>{Wn[t]=e});function _i(e){const t=new st(e),r=ti(st.prototype.request,t);return k.extend(r,st.prototype,t,{allOwnKeys:!0}),k.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return _i(ct(e,o))},r}const te=_i(Wt);te.Axios=st;te.CanceledError=Dt;te.CancelToken=Fu;te.isCancel=mi;te.VERSION=wi;te.toFormData=un;te.AxiosError=K;te.Cancel=te.CanceledError;te.all=function(t){return Promise.all(t)};te.spread=Du;te.isAxiosError=Su;te.mergeConfig=ct;te.AxiosHeaders=Ce;te.formToJSON=e=>hi(k.isHTMLForm(e)?new FormData(e):e);te.getAdapter=Ei.getAdapter;te.HttpStatusCode=Wn;te.default=te;const{Axios:vp,AxiosError:gp,CanceledError:yp,isCancel:bp,CancelToken:Cp,VERSION:Ep,all:wp,Cancel:Ap,isAxiosError:_p,spread:Bp,toFormData:Fp,AxiosHeaders:Dp,HttpStatusCode:Sp,formToJSON:kp,getAdapter:Tp,mergeConfig:Rp}=te,ft=()=>({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"}),Bi=async()=>{const e="https://tanya-sfcc-server.vercel.app/";try{const t=await te.post(`${e}api/auth/token-bm-grant?baseUrl=${Ze()}&siteId=${Ue()}`);return t.status===200&&t.data.access_token?t.data.access_token:(console.error("Failed to fetch token:",t.data),null)}catch(t){return te.isAxiosError(t)?console.error("Error fetching token:",t.response||t.message):console.error("Unexpected error:",t),null}},Fi=async e=>{const t="https://tanya-sfcc-server.vercel.app/";try{const r=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,n=await te.post(`${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ze()}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,{},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});return n.status===200&&n.data?n.data:null}catch(r){return te.isAxiosError(r)?console.error("Error creating basket:",r.response||r.message):console.error("Unexpected error:",r),null}};async function pn(){const e=localStorage.getItem("expires_in"),t=localStorage.getItem("access_token"),r=JSON.parse(sessionStorage.getItem("customerData")||"{}").isGuest;if(e&&t&&new Date().getTime()<parseInt(e)&&r===JSON.parse(localStorage.getItem("isGuest")||"false"))return console.log("access token found in local storage"),{access_token:t,expires_in:e};const{serverUrl:n}=ft(),o=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,s=JSON.parse(sessionStorage.getItem("customerData")||"{}").usrRef;try{const i=r?"unregister-auth":"register-auth",a=await te.get(`${n}sc-api/${i}?dwsid=${o}&email=${s}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}&siteId=${Ue()}`);return localStorage.setItem("access_token",a.data.access_token),localStorage.setItem("expires_in",String(new Date().getTime()+a.data.expires_in*1e3)),localStorage.setItem("isGuest",r.toString()),console.log(a.data),a.data}catch(i){console.log(i)}}const Ze=()=>sessionStorage.getItem("Host"),Ue=()=>sessionStorage.getItem("SiteId"),Qe=()=>sessionStorage.getItem("pubCfg"),Je=()=>sessionStorage.getItem("envRef"),et=()=>sessionStorage.getItem("orgRef"),o0=async(e,t)=>{const{serverUrl:r,basePath:n}=ft();try{const o=Ze();return(await te.get(`${r}${n}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}})).data.hits}catch(o){throw console.error("Error fetching search results:",o),o}},Di=async e=>{if(!e)throw new Error("Product ID is required");const{serverUrl:t,basePath:r}=ft(),n=Ze();console.log("calling access");const{access_token:o}=await pn();return console.log(o),(await te.get(`${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}})).data},ku=async e=>{if(!e)throw new Error("customerId is required");const t=await Bi(),{customer_token:r}=await Fi(t),{serverUrl:n,basePath:o}=ft(),i=(await pn()).access_token;return(await te.get(`${n}${o}/get-interest?baseUrl=${Ze()}&customerId=${e}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`}})).data};var Tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tu(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var ar={exports:{}};function Ru(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var cr={exports:{}};const Pu={},Ou=Object.freeze(Object.defineProperty({__proto__:null,default:Pu},Symbol.toStringTag,{value:"Module"})),Nu=Tu(Ou);var Iu=cr.exports,s0;function ee(){return s0||(s0=1,function(e,t){(function(r,n){e.exports=n()})(Iu,function(){var r=r||function(n,o){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof Tn<"u"&&Tn.crypto&&(s=Tn.crypto),!s&&typeof Ru=="function")try{s=Nu}catch{}var i=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function v(){}return function(g){var y;return v.prototype=g,y=new v,v.prototype=null,y}}(),f={},c=f.lib={},l=c.Base=function(){return{extend:function(v){var g=a(this);return v&&g.mixIn(v),(!g.hasOwnProperty("init")||this.init===g.init)&&(g.init=function(){g.$super.init.apply(this,arguments)}),g.init.prototype=g,g.$super=this,g},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var g in v)v.hasOwnProperty(g)&&(this[g]=v[g]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=c.WordArray=l.extend({init:function(v,g){v=this.words=v||[],g!=o?this.sigBytes=g:this.sigBytes=v.length*4},toString:function(v){return(v||p).stringify(this)},concat:function(v){var g=this.words,y=v.words,C=this.sigBytes,E=v.sigBytes;if(this.clamp(),C%4)for(var w=0;w<E;w++){var F=y[w>>>2]>>>24-w%4*8&255;g[C+w>>>2]|=F<<24-(C+w)%4*8}else for(var O=0;O<E;O+=4)g[C+O>>>2]=y[O>>>2];return this.sigBytes+=E,this},clamp:function(){var v=this.words,g=this.sigBytes;v[g>>>2]&=4294967295<<32-g%4*8,v.length=n.ceil(g/4)},clone:function(){var v=l.clone.call(this);return v.words=this.words.slice(0),v},random:function(v){for(var g=[],y=0;y<v;y+=4)g.push(i());return new d.init(g,v)}}),u=f.enc={},p=u.Hex={stringify:function(v){for(var g=v.words,y=v.sigBytes,C=[],E=0;E<y;E++){var w=g[E>>>2]>>>24-E%4*8&255;C.push((w>>>4).toString(16)),C.push((w&15).toString(16))}return C.join("")},parse:function(v){for(var g=v.length,y=[],C=0;C<g;C+=2)y[C>>>3]|=parseInt(v.substr(C,2),16)<<24-C%8*4;return new d.init(y,g/2)}},h=u.Latin1={stringify:function(v){for(var g=v.words,y=v.sigBytes,C=[],E=0;E<y;E++){var w=g[E>>>2]>>>24-E%4*8&255;C.push(String.fromCharCode(w))}return C.join("")},parse:function(v){for(var g=v.length,y=[],C=0;C<g;C++)y[C>>>2]|=(v.charCodeAt(C)&255)<<24-C%4*8;return new d.init(y,g)}},m=u.Utf8={stringify:function(v){try{return decodeURIComponent(escape(h.stringify(v)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(v){return h.parse(unescape(encodeURIComponent(v)))}},x=c.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(v){typeof v=="string"&&(v=m.parse(v)),this._data.concat(v),this._nDataBytes+=v.sigBytes},_process:function(v){var g,y=this._data,C=y.words,E=y.sigBytes,w=this.blockSize,F=w*4,O=E/F;v?O=n.ceil(O):O=n.max((O|0)-this._minBufferSize,0);var A=O*w,B=n.min(A*4,E);if(A){for(var R=0;R<A;R+=w)this._doProcessBlock(C,R);g=C.splice(0,A),y.sigBytes-=B}return new d.init(g,B)},clone:function(){var v=l.clone.call(this);return v._data=this._data.clone(),v},_minBufferSize:0});c.Hasher=x.extend({cfg:l.extend(),init:function(v){this.cfg=this.cfg.extend(v),this.reset()},reset:function(){x.reset.call(this),this._doReset()},update:function(v){return this._append(v),this._process(),this},finalize:function(v){v&&this._append(v);var g=this._doFinalize();return g},blockSize:16,_createHelper:function(v){return function(g,y){return new v.init(y).finalize(g)}},_createHmacHelper:function(v){return function(g,y){return new b.HMAC.init(v,y).finalize(g)}}});var b=f.algo={};return f}(Math);return r})}(cr)),cr.exports}var lr={exports:{}},ju=lr.exports,i0;function hn(){return i0||(i0=1,function(e,t){(function(r,n){e.exports=n(ee())})(ju,function(r){return function(n){var o=r,s=o.lib,i=s.Base,a=s.WordArray,f=o.x64={};f.Word=i.extend({init:function(c,l){this.high=c,this.low=l}}),f.WordArray=i.extend({init:function(c,l){c=this.words=c||[],l!=n?this.sigBytes=l:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,l=c.length,d=[],u=0;u<l;u++){var p=c[u];d.push(p.high),d.push(p.low)}return a.create(d,this.sigBytes)},clone:function(){for(var c=i.clone.call(this),l=c.words=this.words.slice(0),d=l.length,u=0;u<d;u++)l[u]=l[u].clone();return c}})}(),r})}(lr)),lr.exports}var fr={exports:{}},Lu=fr.exports,a0;function Hu(){return a0||(a0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Lu,function(r){return function(){if(typeof ArrayBuffer=="function"){var n=r,o=n.lib,s=o.WordArray,i=s.init,a=s.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var c=f.byteLength,l=[],d=0;d<c;d++)l[d>>>2]|=f[d]<<24-d%4*8;i.call(this,l,c)}else i.apply(this,arguments)};a.prototype=s}}(),r.lib.WordArray})}(fr)),fr.exports}var ur={exports:{}},$u=ur.exports,c0;function zu(){return c0||(c0=1,function(e,t){(function(r,n){e.exports=n(ee())})($u,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=n.enc;i.Utf16=i.Utf16BE={stringify:function(f){for(var c=f.words,l=f.sigBytes,d=[],u=0;u<l;u+=2){var p=c[u>>>2]>>>16-u%4*8&65535;d.push(String.fromCharCode(p))}return d.join("")},parse:function(f){for(var c=f.length,l=[],d=0;d<c;d++)l[d>>>1]|=f.charCodeAt(d)<<16-d%2*16;return s.create(l,c*2)}},i.Utf16LE={stringify:function(f){for(var c=f.words,l=f.sigBytes,d=[],u=0;u<l;u+=2){var p=a(c[u>>>2]>>>16-u%4*8&65535);d.push(String.fromCharCode(p))}return d.join("")},parse:function(f){for(var c=f.length,l=[],d=0;d<c;d++)l[d>>>1]|=a(f.charCodeAt(d)<<16-d%2*16);return s.create(l,c*2)}};function a(f){return f<<8&4278255360|f>>>8&16711935}}(),r.enc.Utf16})}(ur)),ur.exports}var dr={exports:{}},Mu=dr.exports,l0;function ut(){return l0||(l0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Mu,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=n.enc;i.Base64={stringify:function(f){var c=f.words,l=f.sigBytes,d=this._map;f.clamp();for(var u=[],p=0;p<l;p+=3)for(var h=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,x=c[p+2>>>2]>>>24-(p+2)%4*8&255,b=h<<16|m<<8|x,v=0;v<4&&p+v*.75<l;v++)u.push(d.charAt(b>>>6*(3-v)&63));var g=d.charAt(64);if(g)for(;u.length%4;)u.push(g);return u.join("")},parse:function(f){var c=f.length,l=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var u=0;u<l.length;u++)d[l.charCodeAt(u)]=u}var p=l.charAt(64);if(p){var h=f.indexOf(p);h!==-1&&(c=h)}return a(f,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(f,c,l){for(var d=[],u=0,p=0;p<c;p++)if(p%4){var h=l[f.charCodeAt(p-1)]<<p%4*2,m=l[f.charCodeAt(p)]>>>6-p%4*2,x=h|m;d[u>>>2]|=x<<24-u%4*8,u++}return s.create(d,u)}}(),r.enc.Base64})}(dr)),dr.exports}var xr={exports:{}},Uu=xr.exports,f0;function qu(){return f0||(f0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Uu,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=n.enc;i.Base64url={stringify:function(f,c){c===void 0&&(c=!0);var l=f.words,d=f.sigBytes,u=c?this._safe_map:this._map;f.clamp();for(var p=[],h=0;h<d;h+=3)for(var m=l[h>>>2]>>>24-h%4*8&255,x=l[h+1>>>2]>>>24-(h+1)%4*8&255,b=l[h+2>>>2]>>>24-(h+2)%4*8&255,v=m<<16|x<<8|b,g=0;g<4&&h+g*.75<d;g++)p.push(u.charAt(v>>>6*(3-g)&63));var y=u.charAt(64);if(y)for(;p.length%4;)p.push(y);return p.join("")},parse:function(f,c){c===void 0&&(c=!0);var l=f.length,d=c?this._safe_map:this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var p=0;p<d.length;p++)u[d.charCodeAt(p)]=p}var h=d.charAt(64);if(h){var m=f.indexOf(h);m!==-1&&(l=m)}return a(f,l,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(f,c,l){for(var d=[],u=0,p=0;p<c;p++)if(p%4){var h=l[f.charCodeAt(p-1)]<<p%4*2,m=l[f.charCodeAt(p)]>>>6-p%4*2,x=h|m;d[u>>>2]|=x<<24-u%4*8,u++}return s.create(d,u)}}(),r.enc.Base64url})}(xr)),xr.exports}var pr={exports:{}},Wu=pr.exports,u0;function dt(){return u0||(u0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Wu,function(r){return function(n){var o=r,s=o.lib,i=s.WordArray,a=s.Hasher,f=o.algo,c=[];(function(){for(var m=0;m<64;m++)c[m]=n.abs(n.sin(m+1))*4294967296|0})();var l=f.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,x){for(var b=0;b<16;b++){var v=x+b,g=m[v];m[v]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var y=this._hash.words,C=m[x+0],E=m[x+1],w=m[x+2],F=m[x+3],O=m[x+4],A=m[x+5],B=m[x+6],R=m[x+7],D=m[x+8],L=m[x+9],H=m[x+10],z=m[x+11],W=m[x+12],$=m[x+13],M=m[x+14],U=m[x+15],P=y[0],T=y[1],j=y[2],I=y[3];P=d(P,T,j,I,C,7,c[0]),I=d(I,P,T,j,E,12,c[1]),j=d(j,I,P,T,w,17,c[2]),T=d(T,j,I,P,F,22,c[3]),P=d(P,T,j,I,O,7,c[4]),I=d(I,P,T,j,A,12,c[5]),j=d(j,I,P,T,B,17,c[6]),T=d(T,j,I,P,R,22,c[7]),P=d(P,T,j,I,D,7,c[8]),I=d(I,P,T,j,L,12,c[9]),j=d(j,I,P,T,H,17,c[10]),T=d(T,j,I,P,z,22,c[11]),P=d(P,T,j,I,W,7,c[12]),I=d(I,P,T,j,$,12,c[13]),j=d(j,I,P,T,M,17,c[14]),T=d(T,j,I,P,U,22,c[15]),P=u(P,T,j,I,E,5,c[16]),I=u(I,P,T,j,B,9,c[17]),j=u(j,I,P,T,z,14,c[18]),T=u(T,j,I,P,C,20,c[19]),P=u(P,T,j,I,A,5,c[20]),I=u(I,P,T,j,H,9,c[21]),j=u(j,I,P,T,U,14,c[22]),T=u(T,j,I,P,O,20,c[23]),P=u(P,T,j,I,L,5,c[24]),I=u(I,P,T,j,M,9,c[25]),j=u(j,I,P,T,F,14,c[26]),T=u(T,j,I,P,D,20,c[27]),P=u(P,T,j,I,$,5,c[28]),I=u(I,P,T,j,w,9,c[29]),j=u(j,I,P,T,R,14,c[30]),T=u(T,j,I,P,W,20,c[31]),P=p(P,T,j,I,A,4,c[32]),I=p(I,P,T,j,D,11,c[33]),j=p(j,I,P,T,z,16,c[34]),T=p(T,j,I,P,M,23,c[35]),P=p(P,T,j,I,E,4,c[36]),I=p(I,P,T,j,O,11,c[37]),j=p(j,I,P,T,R,16,c[38]),T=p(T,j,I,P,H,23,c[39]),P=p(P,T,j,I,$,4,c[40]),I=p(I,P,T,j,C,11,c[41]),j=p(j,I,P,T,F,16,c[42]),T=p(T,j,I,P,B,23,c[43]),P=p(P,T,j,I,L,4,c[44]),I=p(I,P,T,j,W,11,c[45]),j=p(j,I,P,T,U,16,c[46]),T=p(T,j,I,P,w,23,c[47]),P=h(P,T,j,I,C,6,c[48]),I=h(I,P,T,j,R,10,c[49]),j=h(j,I,P,T,M,15,c[50]),T=h(T,j,I,P,A,21,c[51]),P=h(P,T,j,I,W,6,c[52]),I=h(I,P,T,j,F,10,c[53]),j=h(j,I,P,T,H,15,c[54]),T=h(T,j,I,P,E,21,c[55]),P=h(P,T,j,I,D,6,c[56]),I=h(I,P,T,j,U,10,c[57]),j=h(j,I,P,T,B,15,c[58]),T=h(T,j,I,P,$,21,c[59]),P=h(P,T,j,I,O,6,c[60]),I=h(I,P,T,j,z,10,c[61]),j=h(j,I,P,T,w,15,c[62]),T=h(T,j,I,P,L,21,c[63]),y[0]=y[0]+P|0,y[1]=y[1]+T|0,y[2]=y[2]+j|0,y[3]=y[3]+I|0},_doFinalize:function(){var m=this._data,x=m.words,b=this._nDataBytes*8,v=m.sigBytes*8;x[v>>>5]|=128<<24-v%32;var g=n.floor(b/4294967296),y=b;x[(v+64>>>9<<4)+15]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x[(v+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m.sigBytes=(x.length+1)*4,this._process();for(var C=this._hash,E=C.words,w=0;w<4;w++){var F=E[w];E[w]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360}return C},clone:function(){var m=a.clone.call(this);return m._hash=this._hash.clone(),m}});function d(m,x,b,v,g,y,C){var E=m+(x&b|~x&v)+g+C;return(E<<y|E>>>32-y)+x}function u(m,x,b,v,g,y,C){var E=m+(x&v|b&~v)+g+C;return(E<<y|E>>>32-y)+x}function p(m,x,b,v,g,y,C){var E=m+(x^b^v)+g+C;return(E<<y|E>>>32-y)+x}function h(m,x,b,v,g,y,C){var E=m+(b^(x|~v))+g+C;return(E<<y|E>>>32-y)+x}o.MD5=a._createHelper(l),o.HmacMD5=a._createHmacHelper(l)}(Math),r.MD5})}(pr)),pr.exports}var hr={exports:{}},Vu=hr.exports,d0;function Si(){return d0||(d0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Vu,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=o.Hasher,a=n.algo,f=[],c=a.SHA1=i.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,d){for(var u=this._hash.words,p=u[0],h=u[1],m=u[2],x=u[3],b=u[4],v=0;v<80;v++){if(v<16)f[v]=l[d+v]|0;else{var g=f[v-3]^f[v-8]^f[v-14]^f[v-16];f[v]=g<<1|g>>>31}var y=(p<<5|p>>>27)+b+f[v];v<20?y+=(h&m|~h&x)+1518500249:v<40?y+=(h^m^x)+1859775393:v<60?y+=(h&m|h&x|m&x)-1894007588:y+=(h^m^x)-899497514,b=x,x=m,m=h<<30|h>>>2,h=p,p=y}u[0]=u[0]+p|0,u[1]=u[1]+h|0,u[2]=u[2]+m|0,u[3]=u[3]+x|0,u[4]=u[4]+b|0},_doFinalize:function(){var l=this._data,d=l.words,u=this._nDataBytes*8,p=l.sigBytes*8;return d[p>>>5]|=128<<24-p%32,d[(p+64>>>9<<4)+14]=Math.floor(u/4294967296),d[(p+64>>>9<<4)+15]=u,l.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var l=i.clone.call(this);return l._hash=this._hash.clone(),l}});n.SHA1=i._createHelper(c),n.HmacSHA1=i._createHmacHelper(c)}(),r.SHA1})}(hr)),hr.exports}var mr={exports:{}},Ku=mr.exports,x0;function fo(){return x0||(x0=1,function(e,t){(function(r,n){e.exports=n(ee())})(Ku,function(r){return function(n){var o=r,s=o.lib,i=s.WordArray,a=s.Hasher,f=o.algo,c=[],l=[];(function(){function p(b){for(var v=n.sqrt(b),g=2;g<=v;g++)if(!(b%g))return!1;return!0}function h(b){return(b-(b|0))*4294967296|0}for(var m=2,x=0;x<64;)p(m)&&(x<8&&(c[x]=h(n.pow(m,1/2))),l[x]=h(n.pow(m,1/3)),x++),m++})();var d=[],u=f.SHA256=a.extend({_doReset:function(){this._hash=new i.init(c.slice(0))},_doProcessBlock:function(p,h){for(var m=this._hash.words,x=m[0],b=m[1],v=m[2],g=m[3],y=m[4],C=m[5],E=m[6],w=m[7],F=0;F<64;F++){if(F<16)d[F]=p[h+F]|0;else{var O=d[F-15],A=(O<<25|O>>>7)^(O<<14|O>>>18)^O>>>3,B=d[F-2],R=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;d[F]=A+d[F-7]+R+d[F-16]}var D=y&C^~y&E,L=x&b^x&v^b&v,H=(x<<30|x>>>2)^(x<<19|x>>>13)^(x<<10|x>>>22),z=(y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25),W=w+z+D+l[F]+d[F],$=H+L;w=E,E=C,C=y,y=g+W|0,g=v,v=b,b=x,x=W+$|0}m[0]=m[0]+x|0,m[1]=m[1]+b|0,m[2]=m[2]+v|0,m[3]=m[3]+g|0,m[4]=m[4]+y|0,m[5]=m[5]+C|0,m[6]=m[6]+E|0,m[7]=m[7]+w|0},_doFinalize:function(){var p=this._data,h=p.words,m=this._nDataBytes*8,x=p.sigBytes*8;return h[x>>>5]|=128<<24-x%32,h[(x+64>>>9<<4)+14]=n.floor(m/4294967296),h[(x+64>>>9<<4)+15]=m,p.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var p=a.clone.call(this);return p._hash=this._hash.clone(),p}});o.SHA256=a._createHelper(u),o.HmacSHA256=a._createHmacHelper(u)}(Math),r.SHA256})}(mr)),mr.exports}var vr={exports:{}},Xu=vr.exports,p0;function Gu(){return p0||(p0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),fo())})(Xu,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=n.algo,a=i.SHA256,f=i.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});n.SHA224=a._createHelper(f),n.HmacSHA224=a._createHmacHelper(f)}(),r.SHA224})}(vr)),vr.exports}var gr={exports:{}},Yu=gr.exports,h0;function ki(){return h0||(h0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),hn())})(Yu,function(r){return function(){var n=r,o=n.lib,s=o.Hasher,i=n.x64,a=i.Word,f=i.WordArray,c=n.algo;function l(){return a.create.apply(a,arguments)}var d=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var h=0;h<80;h++)u[h]=l()})();var p=c.SHA512=s.extend({_doReset:function(){this._hash=new f.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(h,m){for(var x=this._hash.words,b=x[0],v=x[1],g=x[2],y=x[3],C=x[4],E=x[5],w=x[6],F=x[7],O=b.high,A=b.low,B=v.high,R=v.low,D=g.high,L=g.low,H=y.high,z=y.low,W=C.high,$=C.low,M=E.high,U=E.low,P=w.high,T=w.low,j=F.high,I=F.low,Z=O,oe=A,le=B,N=R,Q=D,X=L,J=H,V=z,q=W,se=$,Ee=M,ge=U,de=P,ye=T,me=j,pe=I,ae=0;ae<80;ae++){var ce,fe,we=u[ae];if(ae<16)fe=we.high=h[m+ae*2]|0,ce=we.low=h[m+ae*2+1]|0;else{var G=u[ae-15],xe=G.high,ie=G.low,ve=(xe>>>1|ie<<31)^(xe>>>8|ie<<24)^xe>>>7,Fe=(ie>>>1|xe<<31)^(ie>>>8|xe<<24)^(ie>>>7|xe<<25),rt=u[ae-2],je=rt.high,nt=rt.low,Le=(je>>>19|nt<<13)^(je<<3|nt>>>29)^je>>>6,Kt=(nt>>>19|je<<13)^(nt<<3|je>>>29)^(nt>>>6|je<<26),Xt=u[ae-7],ne=Xt.high,qe=Xt.low,St=u[ae-16],kt=St.high,go=St.low;ce=Fe+qe,fe=ve+ne+(ce>>>0<Fe>>>0?1:0),ce=ce+Kt,fe=fe+Le+(ce>>>0<Kt>>>0?1:0),ce=ce+go,fe=fe+kt+(ce>>>0<go>>>0?1:0),we.high=fe,we.low=ce}var Zi=q&Ee^~q&de,yo=se&ge^~se&ye,Qi=Z&le^Z&Q^le&Q,Ji=oe&N^oe&X^N&X,ea=(Z>>>28|oe<<4)^(Z<<30|oe>>>2)^(Z<<25|oe>>>7),bo=(oe>>>28|Z<<4)^(oe<<30|Z>>>2)^(oe<<25|Z>>>7),ta=(q>>>14|se<<18)^(q>>>18|se<<14)^(q<<23|se>>>9),ra=(se>>>14|q<<18)^(se>>>18|q<<14)^(se<<23|q>>>9),Co=d[ae],na=Co.high,Eo=Co.low,Ae=pe+ra,We=me+ta+(Ae>>>0<pe>>>0?1:0),Ae=Ae+yo,We=We+Zi+(Ae>>>0<yo>>>0?1:0),Ae=Ae+Eo,We=We+na+(Ae>>>0<Eo>>>0?1:0),Ae=Ae+ce,We=We+fe+(Ae>>>0<ce>>>0?1:0),wo=bo+Ji,oa=ea+Qi+(wo>>>0<bo>>>0?1:0);me=de,pe=ye,de=Ee,ye=ge,Ee=q,ge=se,se=V+Ae|0,q=J+We+(se>>>0<V>>>0?1:0)|0,J=Q,V=X,Q=le,X=N,le=Z,N=oe,oe=Ae+wo|0,Z=We+oa+(oe>>>0<Ae>>>0?1:0)|0}A=b.low=A+oe,b.high=O+Z+(A>>>0<oe>>>0?1:0),R=v.low=R+N,v.high=B+le+(R>>>0<N>>>0?1:0),L=g.low=L+X,g.high=D+Q+(L>>>0<X>>>0?1:0),z=y.low=z+V,y.high=H+J+(z>>>0<V>>>0?1:0),$=C.low=$+se,C.high=W+q+($>>>0<se>>>0?1:0),U=E.low=U+ge,E.high=M+Ee+(U>>>0<ge>>>0?1:0),T=w.low=T+ye,w.high=P+de+(T>>>0<ye>>>0?1:0),I=F.low=I+pe,F.high=j+me+(I>>>0<pe>>>0?1:0)},_doFinalize:function(){var h=this._data,m=h.words,x=this._nDataBytes*8,b=h.sigBytes*8;m[b>>>5]|=128<<24-b%32,m[(b+128>>>10<<5)+30]=Math.floor(x/4294967296),m[(b+128>>>10<<5)+31]=x,h.sigBytes=m.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:1024/32});n.SHA512=s._createHelper(p),n.HmacSHA512=s._createHmacHelper(p)}(),r.SHA512})}(gr)),gr.exports}var yr={exports:{}},Zu=yr.exports,m0;function Qu(){return m0||(m0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),hn(),ki())})(Zu,function(r){return function(){var n=r,o=n.x64,s=o.Word,i=o.WordArray,a=n.algo,f=a.SHA512,c=a.SHA384=f.extend({_doReset:function(){this._hash=new i.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var l=f._doFinalize.call(this);return l.sigBytes-=16,l}});n.SHA384=f._createHelper(c),n.HmacSHA384=f._createHmacHelper(c)}(),r.SHA384})}(yr)),yr.exports}var br={exports:{}},Ju=br.exports,v0;function ed(){return v0||(v0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),hn())})(Ju,function(r){return function(n){var o=r,s=o.lib,i=s.WordArray,a=s.Hasher,f=o.x64,c=f.Word,l=o.algo,d=[],u=[],p=[];(function(){for(var x=1,b=0,v=0;v<24;v++){d[x+5*b]=(v+1)*(v+2)/2%64;var g=b%5,y=(2*x+3*b)%5;x=g,b=y}for(var x=0;x<5;x++)for(var b=0;b<5;b++)u[x+5*b]=b+(2*x+3*b)%5*5;for(var C=1,E=0;E<24;E++){for(var w=0,F=0,O=0;O<7;O++){if(C&1){var A=(1<<O)-1;A<32?F^=1<<A:w^=1<<A-32}C&128?C=C<<1^113:C<<=1}p[E]=c.create(w,F)}})();var h=[];(function(){for(var x=0;x<25;x++)h[x]=c.create()})();var m=l.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var x=this._state=[],b=0;b<25;b++)x[b]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(x,b){for(var v=this._state,g=this.blockSize/2,y=0;y<g;y++){var C=x[b+2*y],E=x[b+2*y+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var w=v[y];w.high^=E,w.low^=C}for(var F=0;F<24;F++){for(var O=0;O<5;O++){for(var A=0,B=0,R=0;R<5;R++){var w=v[O+5*R];A^=w.high,B^=w.low}var D=h[O];D.high=A,D.low=B}for(var O=0;O<5;O++)for(var L=h[(O+4)%5],H=h[(O+1)%5],z=H.high,W=H.low,A=L.high^(z<<1|W>>>31),B=L.low^(W<<1|z>>>31),R=0;R<5;R++){var w=v[O+5*R];w.high^=A,w.low^=B}for(var $=1;$<25;$++){var A,B,w=v[$],M=w.high,U=w.low,P=d[$];P<32?(A=M<<P|U>>>32-P,B=U<<P|M>>>32-P):(A=U<<P-32|M>>>64-P,B=M<<P-32|U>>>64-P);var T=h[u[$]];T.high=A,T.low=B}var j=h[0],I=v[0];j.high=I.high,j.low=I.low;for(var O=0;O<5;O++)for(var R=0;R<5;R++){var $=O+5*R,w=v[$],Z=h[$],oe=h[(O+1)%5+5*R],le=h[(O+2)%5+5*R];w.high=Z.high^~oe.high&le.high,w.low=Z.low^~oe.low&le.low}var w=v[0],N=p[F];w.high^=N.high,w.low^=N.low}},_doFinalize:function(){var x=this._data,b=x.words;this._nDataBytes*8;var v=x.sigBytes*8,g=this.blockSize*32;b[v>>>5]|=1<<24-v%32,b[(n.ceil((v+1)/g)*g>>>5)-1]|=128,x.sigBytes=b.length*4,this._process();for(var y=this._state,C=this.cfg.outputLength/8,E=C/8,w=[],F=0;F<E;F++){var O=y[F],A=O.high,B=O.low;A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,w.push(B),w.push(A)}return new i.init(w,C)},clone:function(){for(var x=a.clone.call(this),b=x._state=this._state.slice(0),v=0;v<25;v++)b[v]=b[v].clone();return x}});o.SHA3=a._createHelper(m),o.HmacSHA3=a._createHmacHelper(m)}(Math),r.SHA3})}(br)),br.exports}var Cr={exports:{}},td=Cr.exports,g0;function rd(){return g0||(g0=1,function(e,t){(function(r,n){e.exports=n(ee())})(td,function(r){/** @preserve
47
- (c) 2012 by Cédric Mesnil. All rights reserved.
48
-
49
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
50
-
51
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
52
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
53
-
54
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55
- */return function(n){var o=r,s=o.lib,i=s.WordArray,a=s.Hasher,f=o.algo,c=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),m=f.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,w){for(var F=0;F<16;F++){var O=w+F,A=E[O];E[O]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}var B=this._hash.words,R=p.words,D=h.words,L=c.words,H=l.words,z=d.words,W=u.words,$,M,U,P,T,j,I,Z,oe,le;j=$=B[0],I=M=B[1],Z=U=B[2],oe=P=B[3],le=T=B[4];for(var N,F=0;F<80;F+=1)N=$+E[w+L[F]]|0,F<16?N+=x(M,U,P)+R[0]:F<32?N+=b(M,U,P)+R[1]:F<48?N+=v(M,U,P)+R[2]:F<64?N+=g(M,U,P)+R[3]:N+=y(M,U,P)+R[4],N=N|0,N=C(N,z[F]),N=N+T|0,$=T,T=P,P=C(U,10),U=M,M=N,N=j+E[w+H[F]]|0,F<16?N+=y(I,Z,oe)+D[0]:F<32?N+=g(I,Z,oe)+D[1]:F<48?N+=v(I,Z,oe)+D[2]:F<64?N+=b(I,Z,oe)+D[3]:N+=x(I,Z,oe)+D[4],N=N|0,N=C(N,W[F]),N=N+le|0,j=le,le=oe,oe=C(Z,10),Z=I,I=N;N=B[1]+U+oe|0,B[1]=B[2]+P+le|0,B[2]=B[3]+T+j|0,B[3]=B[4]+$+I|0,B[4]=B[0]+M+Z|0,B[0]=N},_doFinalize:function(){var E=this._data,w=E.words,F=this._nDataBytes*8,O=E.sigBytes*8;w[O>>>5]|=128<<24-O%32,w[(O+64>>>9<<4)+14]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,E.sigBytes=(w.length+1)*4,this._process();for(var A=this._hash,B=A.words,R=0;R<5;R++){var D=B[R];B[R]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return A},clone:function(){var E=a.clone.call(this);return E._hash=this._hash.clone(),E}});function x(E,w,F){return E^w^F}function b(E,w,F){return E&w|~E&F}function v(E,w,F){return(E|~w)^F}function g(E,w,F){return E&F|w&~F}function y(E,w,F){return E^(w|~F)}function C(E,w){return E<<w|E>>>32-w}o.RIPEMD160=a._createHelper(m),o.HmacRIPEMD160=a._createHmacHelper(m)}(),r.RIPEMD160})}(Cr)),Cr.exports}var Er={exports:{}},nd=Er.exports,y0;function uo(){return y0||(y0=1,function(e,t){(function(r,n){e.exports=n(ee())})(nd,function(r){(function(){var n=r,o=n.lib,s=o.Base,i=n.enc,a=i.Utf8,f=n.algo;f.HMAC=s.extend({init:function(c,l){c=this._hasher=new c.init,typeof l=="string"&&(l=a.parse(l));var d=c.blockSize,u=d*4;l.sigBytes>u&&(l=c.finalize(l)),l.clamp();for(var p=this._oKey=l.clone(),h=this._iKey=l.clone(),m=p.words,x=h.words,b=0;b<d;b++)m[b]^=1549556828,x[b]^=909522486;p.sigBytes=h.sigBytes=u,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var l=this._hasher,d=l.finalize(c);l.reset();var u=l.finalize(this._oKey.clone().concat(d));return u}})})()})}(Er)),Er.exports}var wr={exports:{}},od=wr.exports,b0;function sd(){return b0||(b0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),fo(),uo())})(od,function(r){return function(){var n=r,o=n.lib,s=o.Base,i=o.WordArray,a=n.algo,f=a.SHA256,c=a.HMAC,l=a.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:25e4}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,u){for(var p=this.cfg,h=c.create(p.hasher,d),m=i.create(),x=i.create([1]),b=m.words,v=x.words,g=p.keySize,y=p.iterations;b.length<g;){var C=h.update(u).finalize(x);h.reset();for(var E=C.words,w=E.length,F=C,O=1;O<y;O++){F=h.finalize(F),h.reset();for(var A=F.words,B=0;B<w;B++)E[B]^=A[B]}m.concat(C),v[0]++}return m.sigBytes=g*4,m}});n.PBKDF2=function(d,u,p){return l.create(p).compute(d,u)}}(),r.PBKDF2})}(wr)),wr.exports}var Ar={exports:{}},id=Ar.exports,C0;function tt(){return C0||(C0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),Si(),uo())})(id,function(r){return function(){var n=r,o=n.lib,s=o.Base,i=o.WordArray,a=n.algo,f=a.MD5,c=a.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:f,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,d){for(var u,p=this.cfg,h=p.hasher.create(),m=i.create(),x=m.words,b=p.keySize,v=p.iterations;x.length<b;){u&&h.update(u),u=h.update(l).finalize(d),h.reset();for(var g=1;g<v;g++)u=h.finalize(u),h.reset();m.concat(u)}return m.sigBytes=b*4,m}});n.EvpKDF=function(l,d,u){return c.create(u).compute(l,d)}}(),r.EvpKDF})}(Ar)),Ar.exports}var _r={exports:{}},ad=_r.exports,E0;function ue(){return E0||(E0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),tt())})(ad,function(r){r.lib.Cipher||function(n){var o=r,s=o.lib,i=s.Base,a=s.WordArray,f=s.BufferedBlockAlgorithm,c=o.enc;c.Utf8;var l=c.Base64,d=o.algo,u=d.EvpKDF,p=s.Cipher=f.extend({cfg:i.extend(),createEncryptor:function(A,B){return this.create(this._ENC_XFORM_MODE,A,B)},createDecryptor:function(A,B){return this.create(this._DEC_XFORM_MODE,A,B)},init:function(A,B,R){this.cfg=this.cfg.extend(R),this._xformMode=A,this._key=B,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var B=this._doFinalize();return B},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function A(B){return typeof B=="string"?O:E}return function(B){return{encrypt:function(R,D,L){return A(D).encrypt(B,R,D,L)},decrypt:function(R,D,L){return A(D).decrypt(B,R,D,L)}}}}()});s.StreamCipher=p.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1});var h=o.mode={},m=s.BlockCipherMode=i.extend({createEncryptor:function(A,B){return this.Encryptor.create(A,B)},createDecryptor:function(A,B){return this.Decryptor.create(A,B)},init:function(A,B){this._cipher=A,this._iv=B}}),x=h.CBC=function(){var A=m.extend();A.Encryptor=A.extend({processBlock:function(R,D){var L=this._cipher,H=L.blockSize;B.call(this,R,D,H),L.encryptBlock(R,D),this._prevBlock=R.slice(D,D+H)}}),A.Decryptor=A.extend({processBlock:function(R,D){var L=this._cipher,H=L.blockSize,z=R.slice(D,D+H);L.decryptBlock(R,D),B.call(this,R,D,H),this._prevBlock=z}});function B(R,D,L){var H,z=this._iv;z?(H=z,this._iv=n):H=this._prevBlock;for(var W=0;W<L;W++)R[D+W]^=H[W]}return A}(),b=o.pad={},v=b.Pkcs7={pad:function(A,B){for(var R=B*4,D=R-A.sigBytes%R,L=D<<24|D<<16|D<<8|D,H=[],z=0;z<D;z+=4)H.push(L);var W=a.create(H,D);A.concat(W)},unpad:function(A){var B=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=B}};s.BlockCipher=p.extend({cfg:p.cfg.extend({mode:x,padding:v}),reset:function(){var A;p.reset.call(this);var B=this.cfg,R=B.iv,D=B.mode;this._xformMode==this._ENC_XFORM_MODE?A=D.createEncryptor:(A=D.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,R&&R.words):(this._mode=A.call(D,this,R&&R.words),this._mode.__creator=A)},_doProcessBlock:function(A,B){this._mode.processBlock(A,B)},_doFinalize:function(){var A,B=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(B.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),B.unpad(A)),A},blockSize:128/32});var g=s.CipherParams=i.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),y=o.format={},C=y.OpenSSL={stringify:function(A){var B,R=A.ciphertext,D=A.salt;return D?B=a.create([1398893684,1701076831]).concat(D).concat(R):B=R,B.toString(l)},parse:function(A){var B,R=l.parse(A),D=R.words;return D[0]==1398893684&&D[1]==1701076831&&(B=a.create(D.slice(2,4)),D.splice(0,4),R.sigBytes-=16),g.create({ciphertext:R,salt:B})}},E=s.SerializableCipher=i.extend({cfg:i.extend({format:C}),encrypt:function(A,B,R,D){D=this.cfg.extend(D);var L=A.createEncryptor(R,D),H=L.finalize(B),z=L.cfg;return g.create({ciphertext:H,key:R,iv:z.iv,algorithm:A,mode:z.mode,padding:z.padding,blockSize:A.blockSize,formatter:D.format})},decrypt:function(A,B,R,D){D=this.cfg.extend(D),B=this._parse(B,D.format);var L=A.createDecryptor(R,D).finalize(B.ciphertext);return L},_parse:function(A,B){return typeof A=="string"?B.parse(A,this):A}}),w=o.kdf={},F=w.OpenSSL={execute:function(A,B,R,D,L){if(D||(D=a.random(64/8)),L)var H=u.create({keySize:B+R,hasher:L}).compute(A,D);else var H=u.create({keySize:B+R}).compute(A,D);var z=a.create(H.words.slice(B),R*4);return H.sigBytes=B*4,g.create({key:H,iv:z,salt:D})}},O=s.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:F}),encrypt:function(A,B,R,D){D=this.cfg.extend(D);var L=D.kdf.execute(R,A.keySize,A.ivSize,D.salt,D.hasher);D.iv=L.iv;var H=E.encrypt.call(this,A,B,L.key,D);return H.mixIn(L),H},decrypt:function(A,B,R,D){D=this.cfg.extend(D),B=this._parse(B,D.format);var L=D.kdf.execute(R,A.keySize,A.ivSize,B.salt,D.hasher);D.iv=L.iv;var H=E.decrypt.call(this,A,B,L.key,D);return H}})}()})}(_r)),_r.exports}var Br={exports:{}},cd=Br.exports,w0;function ld(){return w0||(w0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(cd,function(r){return r.mode.CFB=function(){var n=r.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(s,i){var a=this._cipher,f=a.blockSize;o.call(this,s,i,f,a),this._prevBlock=s.slice(i,i+f)}}),n.Decryptor=n.extend({processBlock:function(s,i){var a=this._cipher,f=a.blockSize,c=s.slice(i,i+f);o.call(this,s,i,f,a),this._prevBlock=c}});function o(s,i,a,f){var c,l=this._iv;l?(c=l.slice(0),this._iv=void 0):c=this._prevBlock,f.encryptBlock(c,0);for(var d=0;d<a;d++)s[i+d]^=c[d]}return n}(),r.mode.CFB})}(Br)),Br.exports}var Fr={exports:{}},fd=Fr.exports,A0;function ud(){return A0||(A0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(fd,function(r){return r.mode.CTR=function(){var n=r.lib.BlockCipherMode.extend(),o=n.Encryptor=n.extend({processBlock:function(s,i){var a=this._cipher,f=a.blockSize,c=this._iv,l=this._counter;c&&(l=this._counter=c.slice(0),this._iv=void 0);var d=l.slice(0);a.encryptBlock(d,0),l[f-1]=l[f-1]+1|0;for(var u=0;u<f;u++)s[i+u]^=d[u]}});return n.Decryptor=o,n}(),r.mode.CTR})}(Fr)),Fr.exports}var Dr={exports:{}},dd=Dr.exports,_0;function xd(){return _0||(_0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(dd,function(r){/** @preserve
56
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
57
- * derived from CryptoJS.mode.CTR
58
- * Jan Hruby jhruby.web@gmail.com
59
- */return r.mode.CTRGladman=function(){var n=r.lib.BlockCipherMode.extend();function o(a){if((a>>24&255)===255){var f=a>>16&255,c=a>>8&255,l=a&255;f===255?(f=0,c===255?(c=0,l===255?l=0:++l):++c):++f,a=0,a+=f<<16,a+=c<<8,a+=l}else a+=1<<24;return a}function s(a){return(a[0]=o(a[0]))===0&&(a[1]=o(a[1])),a}var i=n.Encryptor=n.extend({processBlock:function(a,f){var c=this._cipher,l=c.blockSize,d=this._iv,u=this._counter;d&&(u=this._counter=d.slice(0),this._iv=void 0),s(u);var p=u.slice(0);c.encryptBlock(p,0);for(var h=0;h<l;h++)a[f+h]^=p[h]}});return n.Decryptor=i,n}(),r.mode.CTRGladman})}(Dr)),Dr.exports}var Sr={exports:{}},pd=Sr.exports,B0;function hd(){return B0||(B0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(pd,function(r){return r.mode.OFB=function(){var n=r.lib.BlockCipherMode.extend(),o=n.Encryptor=n.extend({processBlock:function(s,i){var a=this._cipher,f=a.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(l,0);for(var d=0;d<f;d++)s[i+d]^=l[d]}});return n.Decryptor=o,n}(),r.mode.OFB})}(Sr)),Sr.exports}var kr={exports:{}},md=kr.exports,F0;function vd(){return F0||(F0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(md,function(r){return r.mode.ECB=function(){var n=r.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(o,s){this._cipher.encryptBlock(o,s)}}),n.Decryptor=n.extend({processBlock:function(o,s){this._cipher.decryptBlock(o,s)}}),n}(),r.mode.ECB})}(kr)),kr.exports}var Tr={exports:{}},gd=Tr.exports,D0;function yd(){return D0||(D0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(gd,function(r){return r.pad.AnsiX923={pad:function(n,o){var s=n.sigBytes,i=o*4,a=i-s%i,f=s+a-1;n.clamp(),n.words[f>>>2]|=a<<24-f%4*8,n.sigBytes+=a},unpad:function(n){var o=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=o}},r.pad.Ansix923})}(Tr)),Tr.exports}var Rr={exports:{}},bd=Rr.exports,S0;function Cd(){return S0||(S0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(bd,function(r){return r.pad.Iso10126={pad:function(n,o){var s=o*4,i=s-n.sigBytes%s;n.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(n){var o=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=o}},r.pad.Iso10126})}(Rr)),Rr.exports}var Pr={exports:{}},Ed=Pr.exports,k0;function wd(){return k0||(k0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(Ed,function(r){return r.pad.Iso97971={pad:function(n,o){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,o)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})}(Pr)),Pr.exports}var Or={exports:{}},Ad=Or.exports,T0;function _d(){return T0||(T0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(Ad,function(r){return r.pad.ZeroPadding={pad:function(n,o){var s=o*4;n.clamp(),n.sigBytes+=s-(n.sigBytes%s||s)},unpad:function(n){for(var o=n.words,s=n.sigBytes-1,s=n.sigBytes-1;s>=0;s--)if(o[s>>>2]>>>24-s%4*8&255){n.sigBytes=s+1;break}}},r.pad.ZeroPadding})}(Or)),Or.exports}var Nr={exports:{}},Bd=Nr.exports,R0;function Fd(){return R0||(R0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(Bd,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(Nr)),Nr.exports}var Ir={exports:{}},Dd=Ir.exports,P0;function Sd(){return P0||(P0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ue())})(Dd,function(r){return function(n){var o=r,s=o.lib,i=s.CipherParams,a=o.enc,f=a.Hex,c=o.format;c.Hex={stringify:function(l){return l.ciphertext.toString(f)},parse:function(l){var d=f.parse(l);return i.create({ciphertext:d})}}}(),r.format.Hex})}(Ir)),Ir.exports}var jr={exports:{}},kd=jr.exports,O0;function Td(){return O0||(O0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})(kd,function(r){return function(){var n=r,o=n.lib,s=o.BlockCipher,i=n.algo,a=[],f=[],c=[],l=[],d=[],u=[],p=[],h=[],m=[],x=[];(function(){for(var g=[],y=0;y<256;y++)y<128?g[y]=y<<1:g[y]=y<<1^283;for(var C=0,E=0,y=0;y<256;y++){var w=E^E<<1^E<<2^E<<3^E<<4;w=w>>>8^w&255^99,a[C]=w,f[w]=C;var F=g[C],O=g[F],A=g[O],B=g[w]*257^w*16843008;c[C]=B<<24|B>>>8,l[C]=B<<16|B>>>16,d[C]=B<<8|B>>>24,u[C]=B;var B=A*16843009^O*65537^F*257^C*16843008;p[w]=B<<24|B>>>8,h[w]=B<<16|B>>>16,m[w]=B<<8|B>>>24,x[w]=B,C?(C=F^g[g[g[A^F]]],E^=g[g[E]]):C=E=1}})();var b=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=s.extend({_doReset:function(){var g;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var y=this._keyPriorReset=this._key,C=y.words,E=y.sigBytes/4,w=this._nRounds=E+6,F=(w+1)*4,O=this._keySchedule=[],A=0;A<F;A++)A<E?O[A]=C[A]:(g=O[A-1],A%E?E>6&&A%E==4&&(g=a[g>>>24]<<24|a[g>>>16&255]<<16|a[g>>>8&255]<<8|a[g&255]):(g=g<<8|g>>>24,g=a[g>>>24]<<24|a[g>>>16&255]<<16|a[g>>>8&255]<<8|a[g&255],g^=b[A/E|0]<<24),O[A]=O[A-E]^g);for(var B=this._invKeySchedule=[],R=0;R<F;R++){var A=F-R;if(R%4)var g=O[A];else var g=O[A-4];R<4||A<=4?B[R]=g:B[R]=p[a[g>>>24]]^h[a[g>>>16&255]]^m[a[g>>>8&255]]^x[a[g&255]]}}},encryptBlock:function(g,y){this._doCryptBlock(g,y,this._keySchedule,c,l,d,u,a)},decryptBlock:function(g,y){var C=g[y+1];g[y+1]=g[y+3],g[y+3]=C,this._doCryptBlock(g,y,this._invKeySchedule,p,h,m,x,f);var C=g[y+1];g[y+1]=g[y+3],g[y+3]=C},_doCryptBlock:function(g,y,C,E,w,F,O,A){for(var B=this._nRounds,R=g[y]^C[0],D=g[y+1]^C[1],L=g[y+2]^C[2],H=g[y+3]^C[3],z=4,W=1;W<B;W++){var $=E[R>>>24]^w[D>>>16&255]^F[L>>>8&255]^O[H&255]^C[z++],M=E[D>>>24]^w[L>>>16&255]^F[H>>>8&255]^O[R&255]^C[z++],U=E[L>>>24]^w[H>>>16&255]^F[R>>>8&255]^O[D&255]^C[z++],P=E[H>>>24]^w[R>>>16&255]^F[D>>>8&255]^O[L&255]^C[z++];R=$,D=M,L=U,H=P}var $=(A[R>>>24]<<24|A[D>>>16&255]<<16|A[L>>>8&255]<<8|A[H&255])^C[z++],M=(A[D>>>24]<<24|A[L>>>16&255]<<16|A[H>>>8&255]<<8|A[R&255])^C[z++],U=(A[L>>>24]<<24|A[H>>>16&255]<<16|A[R>>>8&255]<<8|A[D&255])^C[z++],P=(A[H>>>24]<<24|A[R>>>16&255]<<16|A[D>>>8&255]<<8|A[L&255])^C[z++];g[y]=$,g[y+1]=M,g[y+2]=U,g[y+3]=P},keySize:256/32});n.AES=s._createHelper(v)}(),r.AES})}(jr)),jr.exports}var Lr={exports:{}},Rd=Lr.exports,N0;function Pd(){return N0||(N0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})(Rd,function(r){return function(){var n=r,o=n.lib,s=o.WordArray,i=o.BlockCipher,a=n.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],p=a.DES=i.extend({_doReset:function(){for(var b=this._key,v=b.words,g=[],y=0;y<56;y++){var C=f[y]-1;g[y]=v[C>>>5]>>>31-C%32&1}for(var E=this._subKeys=[],w=0;w<16;w++){for(var F=E[w]=[],O=l[w],y=0;y<24;y++)F[y/6|0]|=g[(c[y]-1+O)%28]<<31-y%6,F[4+(y/6|0)]|=g[28+(c[y+24]-1+O)%28]<<31-y%6;F[0]=F[0]<<1|F[0]>>>31;for(var y=1;y<7;y++)F[y]=F[y]>>>(y-1)*4+3;F[7]=F[7]<<5|F[7]>>>27}for(var A=this._invSubKeys=[],y=0;y<16;y++)A[y]=E[15-y]},encryptBlock:function(b,v){this._doCryptBlock(b,v,this._subKeys)},decryptBlock:function(b,v){this._doCryptBlock(b,v,this._invSubKeys)},_doCryptBlock:function(b,v,g){this._lBlock=b[v],this._rBlock=b[v+1],h.call(this,4,252645135),h.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),h.call(this,1,1431655765);for(var y=0;y<16;y++){for(var C=g[y],E=this._lBlock,w=this._rBlock,F=0,O=0;O<8;O++)F|=d[O][((w^C[O])&u[O])>>>0];this._lBlock=w,this._rBlock=E^F}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,h.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),b[v]=this._lBlock,b[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(b,v){var g=(this._lBlock>>>b^this._rBlock)&v;this._rBlock^=g,this._lBlock^=g<<b}function m(b,v){var g=(this._rBlock>>>b^this._lBlock)&v;this._lBlock^=g,this._rBlock^=g<<b}n.DES=i._createHelper(p);var x=a.TripleDES=i.extend({_doReset:function(){var b=this._key,v=b.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var g=v.slice(0,2),y=v.length<4?v.slice(0,2):v.slice(2,4),C=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=p.createEncryptor(s.create(g)),this._des2=p.createEncryptor(s.create(y)),this._des3=p.createEncryptor(s.create(C))},encryptBlock:function(b,v){this._des1.encryptBlock(b,v),this._des2.decryptBlock(b,v),this._des3.encryptBlock(b,v)},decryptBlock:function(b,v){this._des3.decryptBlock(b,v),this._des2.encryptBlock(b,v),this._des1.decryptBlock(b,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=i._createHelper(x)}(),r.TripleDES})}(Lr)),Lr.exports}var Hr={exports:{}},Od=Hr.exports,I0;function Nd(){return I0||(I0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})(Od,function(r){return function(){var n=r,o=n.lib,s=o.StreamCipher,i=n.algo,a=i.RC4=s.extend({_doReset:function(){for(var l=this._key,d=l.words,u=l.sigBytes,p=this._S=[],h=0;h<256;h++)p[h]=h;for(var h=0,m=0;h<256;h++){var x=h%u,b=d[x>>>2]>>>24-x%4*8&255;m=(m+p[h]+b)%256;var v=p[h];p[h]=p[m],p[m]=v}this._i=this._j=0},_doProcessBlock:function(l,d){l[d]^=f.call(this)},keySize:256/32,ivSize:0});function f(){for(var l=this._S,d=this._i,u=this._j,p=0,h=0;h<4;h++){d=(d+1)%256,u=(u+l[d])%256;var m=l[d];l[d]=l[u],l[u]=m,p|=l[(l[d]+l[u])%256]<<24-h*8}return this._i=d,this._j=u,p}n.RC4=s._createHelper(a);var c=i.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)f.call(this)}});n.RC4Drop=s._createHelper(c)}(),r.RC4})}(Hr)),Hr.exports}var $r={exports:{}},Id=$r.exports,j0;function jd(){return j0||(j0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})(Id,function(r){return function(){var n=r,o=n.lib,s=o.StreamCipher,i=n.algo,a=[],f=[],c=[],l=i.Rabbit=s.extend({_doReset:function(){for(var u=this._key.words,p=this.cfg.iv,h=0;h<4;h++)u[h]=(u[h]<<8|u[h]>>>24)&16711935|(u[h]<<24|u[h]>>>8)&4278255360;var m=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],x=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var h=0;h<4;h++)d.call(this);for(var h=0;h<8;h++)x[h]^=m[h+4&7];if(p){var b=p.words,v=b[0],g=b[1],y=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,C=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,E=y>>>16|C&4294901760,w=C<<16|y&65535;x[0]^=y,x[1]^=E,x[2]^=C,x[3]^=w,x[4]^=y,x[5]^=E,x[6]^=C,x[7]^=w;for(var h=0;h<4;h++)d.call(this)}},_doProcessBlock:function(u,p){var h=this._X;d.call(this),a[0]=h[0]^h[5]>>>16^h[3]<<16,a[1]=h[2]^h[7]>>>16^h[5]<<16,a[2]=h[4]^h[1]>>>16^h[7]<<16,a[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360,u[p+m]^=a[m]},blockSize:128/32,ivSize:64/32});function d(){for(var u=this._X,p=this._C,h=0;h<8;h++)f[h]=p[h];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<f[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<f[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<f[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<f[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<f[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<f[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<f[6]>>>0?1:0)|0,this._b=p[7]>>>0<f[7]>>>0?1:0;for(var h=0;h<8;h++){var m=u[h]+p[h],x=m&65535,b=m>>>16,v=((x*x>>>17)+x*b>>>15)+b*b,g=((m&4294901760)*m|0)+((m&65535)*m|0);c[h]=v^g}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}n.Rabbit=s._createHelper(l)}(),r.Rabbit})}($r)),$r.exports}var zr={exports:{}},Ld=zr.exports,L0;function Hd(){return L0||(L0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})(Ld,function(r){return function(){var n=r,o=n.lib,s=o.StreamCipher,i=n.algo,a=[],f=[],c=[],l=i.RabbitLegacy=s.extend({_doReset:function(){var u=this._key.words,p=this.cfg.iv,h=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],m=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var x=0;x<4;x++)d.call(this);for(var x=0;x<8;x++)m[x]^=h[x+4&7];if(p){var b=p.words,v=b[0],g=b[1],y=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,C=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,E=y>>>16|C&4294901760,w=C<<16|y&65535;m[0]^=y,m[1]^=E,m[2]^=C,m[3]^=w,m[4]^=y,m[5]^=E,m[6]^=C,m[7]^=w;for(var x=0;x<4;x++)d.call(this)}},_doProcessBlock:function(u,p){var h=this._X;d.call(this),a[0]=h[0]^h[5]>>>16^h[3]<<16,a[1]=h[2]^h[7]>>>16^h[5]<<16,a[2]=h[4]^h[1]>>>16^h[7]<<16,a[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360,u[p+m]^=a[m]},blockSize:128/32,ivSize:64/32});function d(){for(var u=this._X,p=this._C,h=0;h<8;h++)f[h]=p[h];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<f[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<f[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<f[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<f[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<f[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<f[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<f[6]>>>0?1:0)|0,this._b=p[7]>>>0<f[7]>>>0?1:0;for(var h=0;h<8;h++){var m=u[h]+p[h],x=m&65535,b=m>>>16,v=((x*x>>>17)+x*b>>>15)+b*b,g=((m&4294901760)*m|0)+((m&65535)*m|0);c[h]=v^g}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}n.RabbitLegacy=s._createHelper(l)}(),r.RabbitLegacy})}(zr)),zr.exports}var Mr={exports:{}},$d=Mr.exports,H0;function zd(){return H0||(H0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),ut(),dt(),tt(),ue())})($d,function(r){return function(){var n=r,o=n.lib,s=o.BlockCipher,i=n.algo;const a=16,f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function d(x,b){let v=b>>24&255,g=b>>16&255,y=b>>8&255,C=b&255,E=x.sbox[0][v]+x.sbox[1][g];return E=E^x.sbox[2][y],E=E+x.sbox[3][C],E}function u(x,b,v){let g=b,y=v,C;for(let E=0;E<a;++E)g=g^x.pbox[E],y=d(x,g)^y,C=g,g=y,y=C;return C=g,g=y,y=C,y=y^x.pbox[a],g=g^x.pbox[a+1],{left:g,right:y}}function p(x,b,v){let g=b,y=v,C;for(let E=a+1;E>1;--E)g=g^x.pbox[E],y=d(x,g)^y,C=g,g=y,y=C;return C=g,g=y,y=C,y=y^x.pbox[1],g=g^x.pbox[0],{left:g,right:y}}function h(x,b,v){for(let w=0;w<4;w++){x.sbox[w]=[];for(let F=0;F<256;F++)x.sbox[w][F]=c[w][F]}let g=0;for(let w=0;w<a+2;w++)x.pbox[w]=f[w]^b[g],g++,g>=v&&(g=0);let y=0,C=0,E=0;for(let w=0;w<a+2;w+=2)E=u(x,y,C),y=E.left,C=E.right,x.pbox[w]=y,x.pbox[w+1]=C;for(let w=0;w<4;w++)for(let F=0;F<256;F+=2)E=u(x,y,C),y=E.left,C=E.right,x.sbox[w][F]=y,x.sbox[w][F+1]=C;return!0}var m=i.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var x=this._keyPriorReset=this._key,b=x.words,v=x.sigBytes/4;h(l,b,v)}},encryptBlock:function(x,b){var v=u(l,x[b],x[b+1]);x[b]=v.left,x[b+1]=v.right},decryptBlock:function(x,b){var v=p(l,x[b],x[b+1]);x[b]=v.left,x[b+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=s._createHelper(m)}(),r.Blowfish})}(Mr)),Mr.exports}var Md=ar.exports,$0;function Ud(){return $0||($0=1,function(e,t){(function(r,n,o){e.exports=n(ee(),hn(),Hu(),zu(),ut(),qu(),dt(),Si(),fo(),Gu(),ki(),Qu(),ed(),rd(),uo(),sd(),tt(),ue(),ld(),ud(),xd(),hd(),vd(),yd(),Cd(),wd(),_d(),Fd(),Sd(),Td(),Pd(),Nd(),jd(),Hd(),zd())})(Md,function(r){return r})}(ar)),ar.exports}Ud();const z0=e=>String(typeof e=="string"?e:e["en-US"]||e),M0=e=>e!=null&&e.image?[e.image]:"variants"in e?e.variants[0].images:e.masterVariant.images.map(t=>t.url),qd=(e,t)=>e.toLocaleString("en-US",{style:"currency",currency:t||"USD"}),U0=e=>{var t,r,n;return"variants"in e?{centAmount:(t=e.variants[0])==null?void 0:t.prices.EUR.max,currencyCode:"DOL"}:{centAmount:(r=e.masterVariant)==null?void 0:r.prices[0].value.centAmount,currencyCode:(n=e.masterVariant)==null?void 0:n.prices[0].value.currencyCode}},Wd=e=>e.charAt(0).toUpperCase()+e.slice(1),q0=(e,t)=>e.length<t?e:e.slice(0,t)+"...",Rn=e=>e.split("\\n").map((t,r)=>{const n=t.match(/^(\d+)\.\s(.+)/);return n?`<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>`:t.trim()?`<p key=${r} class="mb-2">${t}</p>`:"<br/>"}).join(""),Ti=Object.freeze({left:0,top:0,width:16,height:16}),Zr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xo=Object.freeze({...Ti,...Zr}),Vn=Object.freeze({...xo,body:"",hidden:!1});function Vd(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function W0(e,t){const r=Vd(e,t);for(const n in Vn)n in Zr?n in e&&!(n in r)&&(r[n]=Zr[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Kd(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(r[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=n[i]&&n[i].parent,f=a&&s(a);f&&(o[i]=[a].concat(f))}return o[i]}return Object.keys(r).concat(Object.keys(n)).forEach(s),o}function Xd(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=W0(n[a]||o[a],s)}return i(t),r.forEach(i),W0(e,s)}function Ri(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Kd(e);for(const o in n){const s=n[o];s&&(t(o,Xd(e,o,s)),r.push(o))}return r}const Gd={provider:"",aliases:{},not_found:{},...Ti};function Pn(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Pi(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Pn(e,Gd))return null;const r=t.icons;for(const o in r){const s=r[o];if(!o||typeof s.body!="string"||!Pn(s,Vn))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],i=s.parent;if(!o||typeof i!="string"||!r[i]&&!n[i]||!Pn(s,Vn))return null}return t}const Oi=/^[a-z0-9]+(-[a-z0-9]+)*$/,mn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),f=o.pop(),c={provider:o.length>0?o[0]:n,prefix:f,name:a};return t&&!Ur(c)?null:c}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:n,prefix:i.shift(),name:i.join("-")};return t&&!Ur(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:s};return t&&!Ur(a,r)?null:a}return null},Ur=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,V0=Object.create(null);function Yd(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function At(e,t){const r=V0[e]||(V0[e]=Object.create(null));return r[t]||(r[t]=Yd(e,t))}function Ni(e,t){return Pi(t)?Ri(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Zd(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Ht=!1;function Ii(e){return typeof e=="boolean"&&(Ht=e),Ht}function K0(e){const t=typeof e=="string"?mn(e,!0,Ht):e;if(t){const r=At(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Qd(e,t){const r=mn(e,!0,Ht);if(!r)return!1;const n=At(r.provider,r.prefix);return t?Zd(n,r.name,t):(n.missing.add(r.name),!0)}function Jd(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ht&&!t&&!e.prefix){let o=!1;return Pi(e)&&(e.prefix="",Ri(e,(s,i)=>{Qd(s,i)&&(o=!0)})),o}const r=e.prefix;if(!Ur({prefix:r,name:"a"}))return!1;const n=At(t,r);return!!Ni(n,e)}const ji=Object.freeze({width:null,height:null}),Li=Object.freeze({...ji,...Zr}),ex=/(-?[0-9.]*[0-9]+[0-9.]*)/g,tx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function X0(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(ex);if(n===null||!n.length)return e;const o=[];let s=n.shift(),i=tx.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*r)/r)}else o.push(s);if(s=n.shift(),s===void 0)return o.join("");i=!i}}function rx(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const i=e.indexOf(">",s);if(i===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(i+1)}return{defs:r,content:e}}function nx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ox(e,t,r){const n=rx(e);return nx(n.defs,t+n.content+r)}const sx=e=>e==="unset"||e==="undefined"||e==="none";function ix(e,t){const r={...xo,...e},n={...Li,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,n].forEach(m=>{const x=[],b=m.hFlip,v=m.vFlip;let g=m.rotate;b?v?g+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):v&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}g%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s=ox(s,'<g transform="'+x.join(" ")+'">',"</g>"))});const i=n.width,a=n.height,f=o.width,c=o.height;let l,d;i===null?(d=a===null?"1em":a==="auto"?c:a,l=X0(d,f/c)):(l=i==="auto"?f:i,d=a===null?X0(l,c/f):a==="auto"?c:a);const u={},p=(m,x)=>{sx(x)||(u[m]=x.toString())};p("width",l),p("height",d);const h=[o.left,o.top,f,c];return u.viewBox=h.join(" "),{attributes:u,viewBox:h,body:s}}const ax=/\sid="(\S+)"/g,cx="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let lx=0;function fx(e,t=cx){const r=[];let n;for(;n=ax.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const i=typeof t=="function"?t(s):t+(lx++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const Kn=Object.create(null);function ux(e,t){Kn[e]=t}function Xn(e){return Kn[e]||Kn[""]}function po(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ho=Object.create(null),Rt=["https://api.simplesvg.com","https://api.unisvg.com"],qr=[];for(;Rt.length>0;)Rt.length===1||Math.random()>.5?qr.push(Rt.shift()):qr.push(Rt.pop());ho[""]=po({resources:["https://api.iconify.design"].concat(qr)});function dx(e,t){const r=po(t);return r===null?!1:(ho[e]=r,!0)}function mo(e){return ho[e]}const xx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let G0=xx();function px(e,t){const r=mo(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";n=r.maxURL-o-r.path.length-s.length}return n}function hx(e){return e===404}const mx=(e,t,r)=>{const n=[],o=px(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return r.forEach((f,c)=>{a+=f.length+1,a>=o&&c>0&&(n.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=f.length),i.icons.push(f)}),n.push(i),n};function vx(e){if(typeof e=="string"){const t=mo(e);if(t)return t.path}return"/"}const gx=(e,t,r)=>{if(!G0){r("abort",424);return}let n=vx(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),f=new URLSearchParams({icons:a});n+=s+".json?"+f.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:r("abort",400);return}let o=503;G0(e+n).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{r(hx(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?r("abort",s):r("next",o)});return}setTimeout(()=>{r("success",s)})}).catch(()=>{r("next",o)})},yx={prepare:mx,send:gx};function bx(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,i=o.prefix,a=o.name,f=r[s]||(r[s]=Object.create(null)),c=f[i]||(f[i]=At(s,i));let l;a in c.icons?l=t.loaded:i===""||c.missing.has(a)?l=t.missing:l=t.pending;const d={provider:s,prefix:i,name:a};l.push(d)}),t}function Hi(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function Cx(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(f=>{if(f.prefix!==o)return!0;const c=f.name;if(e.icons[c])i.loaded.push({provider:n,prefix:o,name:c});else if(e.missing.has(c))i.missing.push({provider:n,prefix:o,name:c});else return r=!0,!0;return!1}),i.pending.length!==a&&(r||Hi([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Ex=0;function wx(e,t,r){const n=Ex++,o=Hi.bind(null,r,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return r.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Ax(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?mn(o,t,r):o;s&&n.push(s)}),n}var _x={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Bx(e,t,r,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let E=e.resources.slice(0);for(i=[];E.length>1;){const w=Math.floor(Math.random()*E.length);i.push(E[w]),E=E.slice(0,w).concat(E.slice(w+1))}i=i.concat(E)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let f="pending",c=0,l,d=null,u=[],p=[];typeof n=="function"&&p.push(n);function h(){d&&(clearTimeout(d),d=null)}function m(){f==="pending"&&(f="aborted"),h(),u.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),u=[]}function x(E,w){w&&(p=[]),typeof E=="function"&&p.push(E)}function b(){return{startTime:a,payload:t,status:f,queriesSent:c,queriesPending:u.length,subscribe:x,abort:m}}function v(){f="failed",p.forEach(E=>{E(void 0,l)})}function g(){u.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),u=[]}function y(E,w,F){const O=w!=="success";switch(u=u.filter(A=>A!==E),f){case"pending":break;case"failed":if(O||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){l=F,v();return}if(O){l=F,u.length||(i.length?C():v());return}if(h(),g(),!e.random){const A=e.resources.indexOf(E.resource);A!==-1&&A!==e.index&&(e.index=A)}f="completed",p.forEach(A=>{A(F)})}function C(){if(f!=="pending")return;h();const E=i.shift();if(E===void 0){if(u.length){d=setTimeout(()=>{h(),f==="pending"&&(g(),v())},e.timeout);return}v();return}const w={status:"pending",resource:E,callback:(F,O)=>{y(w,F,O)}};u.push(w),c++,d=setTimeout(C,e.rotate),r(E,t,w.callback)}return setTimeout(C),b}function $i(e){const t={..._x,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,f,c){const l=Bx(t,a,f,(d,u)=>{n(),c&&c(d,u)});return r.push(l),l}function s(a){return r.find(f=>a(f))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function Y0(){}const On=Object.create(null);function Fx(e){if(!On[e]){const t=mo(e);if(!t)return;const r=$i(t),n={config:t,redundancy:r};On[e]=n}return On[e]}function Dx(e,t,r){let n,o;if(typeof e=="string"){const s=Xn(e);if(!s)return r(void 0,424),Y0;o=s.send;const i=Fx(e);i&&(n=i.redundancy)}else{const s=po(e);if(s){n=$i(s);const i=e.resources?e.resources[0]:"",a=Xn(i);a&&(o=a.send)}}return!n||!o?(r(void 0,424),Y0):n.query(t,o,r)().abort}function Z0(){}function Sx(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Cx(e)}))}function kx(e){const t=[],r=[];return e.forEach(n=>{(n.match(Oi)?t:r).push(n)}),{valid:t,invalid:r}}function Pt(e,t,r){function n(){const o=e.pendingIcons;t.forEach(s=>{o&&o.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!Ni(e,r).length){n();return}}catch(o){console.error(o)}n(),Sx(e)}function Q0(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function Tx(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const s=e.loadIcon;if(e.loadIcons&&(o.length>1||!s)){Q0(e.loadIcons(o,n,r),l=>{Pt(e,o,l)});return}if(s){o.forEach(l=>{const d=s(l,n,r);Q0(d,u=>{const p=u?{prefix:n,icons:{[l]:u}}:null;Pt(e,[l],p)})});return}const{valid:i,invalid:a}=kx(o);if(a.length&&Pt(e,a,null),!i.length)return;const f=n.match(Oi)?Xn(r):null;if(!f){Pt(e,i,null);return}f.prepare(r,n,i).forEach(l=>{Dx(r,l,d=>{Pt(e,l.icons,d)})})}))}const Rx=(e,t)=>{const r=Ax(e,!0,Ii()),n=bx(r);if(!n.pending.length){let f=!0;return t&&setTimeout(()=>{f&&t(n.loaded,n.missing,n.pending,Z0)}),()=>{f=!1}}const o=Object.create(null),s=[];let i,a;return n.pending.forEach(f=>{const{provider:c,prefix:l}=f;if(l===a&&c===i)return;i=c,a=l,s.push(At(c,l));const d=o[c]||(o[c]=Object.create(null));d[l]||(d[l]=[])}),n.pending.forEach(f=>{const{provider:c,prefix:l,name:d}=f,u=At(c,l),p=u.pendingIcons||(u.pendingIcons=new Set);p.has(d)||(p.add(d),o[c][l].push(d))}),s.forEach(f=>{const c=o[f.provider][f.prefix];c.length&&Tx(f,c)}),t?wx(t,n,s):Z0};function Px(e,t){const r={...e};for(const n in t){const o=t[n],s=typeof o;n in ji?(o===null||o&&(s==="string"||s==="number"))&&(r[n]=o):s===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const Ox=/[\s,]+/;function Nx(e,t){t.split(Ox).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ix(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-r.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}function jx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Lx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Hx(e){return"data:image/svg+xml,"+Lx(e)}function $x(e){return'url("'+Hx(e)+'")'}let Nt;function zx(){try{Nt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Nt=null}}function Mx(e){return Nt===void 0&&zx(),Nt?Nt.createHTML(e):e}const zi={...Li,inline:!1},Ux={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},qx={display:"inline-block"},Gn={backgroundColor:"currentColor"},Mi={backgroundColor:"transparent"},J0={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},es={WebkitMask:Gn,mask:Gn,background:Mi};for(const e in es){const t=es[e];for(const r in J0)t[e+r]=J0[r]}const Wx={...zi,inline:!0};function ts(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Vx=(e,t,r)=>{const n=t.inline?Wx:zi,o=Px(n,t),s=t.mode||"svg",i={},a=t.style||{},f={...s==="svg"?Ux:{}};if(r){const x=mn(r,!1,!0);if(x){const b=["iconify"],v=["provider","prefix"];for(const g of v)x[g]&&b.push("iconify--"+x[g]);f.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":f.ref=b;break;case"className":f[x]=(f[x]?f[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&Nx(o,b);break;case"color":i.color=b;break;case"rotate":typeof b=="string"?o[x]=Ix(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete f["aria-hidden"];break;default:n[x]===void 0&&(f[x]=b)}}const c=ix(e,o),l=c.attributes;if(o.inline&&(i.verticalAlign="-0.125em"),s==="svg"){f.style={...i,...a},Object.assign(f,l);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:Mx(fx(c.body,b?()=>b+"ID"+x++:"iconifyReact"))},Y.createElement("svg",f)}const{body:d,width:u,height:p}=e,h=s==="mask"||(s==="bg"?!1:d.indexOf("currentColor")!==-1),m=jx(d,{...l,width:u+"",height:p+""});return f.style={...i,"--svg":$x(m),width:ts(l.width),height:ts(l.height),...qx,...h?Gn:Mi,...a},Y.createElement("span",f)};Ii(!0);ux("",yx);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Jd(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;dx(r,o)||console.error(n)}catch{console.error(n)}}}}function Ui(e){const[t,r]=Y.useState(!!e.ssr),[n,o]=Y.useState({});function s(p){if(p){const h=e.icon;if(typeof h=="object")return{name:"",data:h};const m=K0(h);if(m)return{name:h,data:m}}return{name:""}}const[i,a]=Y.useState(s(!!e.ssr));function f(){const p=n.callback;p&&(p(),o({}))}function c(p){if(JSON.stringify(i)!==JSON.stringify(p))return f(),a(p),!0}function l(){var p;const h=e.icon;if(typeof h=="object"){c({name:"",data:h});return}const m=K0(h);if(c({name:h,data:m}))if(m===void 0){const x=Rx([h],l);o({callback:x})}else m&&((p=e.onLoad)===null||p===void 0||p.call(e,h))}Y.useEffect(()=>(r(!0),f),[]),Y.useEffect(()=>{t&&l()},[e.icon,t]);const{name:d,data:u}=i;return u?Vx({...xo,...u},e,d):e.children?e.children:e.fallback?e.fallback:Y.createElement("span",{})}const Qr=Y.forwardRef((e,t)=>Ui({...e,_ref:t}));Y.forwardRef((e,t)=>Ui({inline:!0,...e,_ref:t}));const Kx={product:null},qi=aa.createSlice({name:"product",initialState:Kx,reducers:{setProduct:(e,t)=>{e.product=t.payload}}}),{setProduct:Yn}=qi.actions;qi.reducer;function Xx(){const e=()=>window.innerWidth<425?1:window.innerWidth<768?2:4,[t,r]=Y.useState(e);return Y.useEffect(()=>{const n=()=>r(e());return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t}const Gx=({product:e})=>{const t=mt.useDispatch(),r=Xx(),[n,o]=Y.useState(0),s=()=>{o(f=>f+r>=e.length?0:f+r)},i=()=>{o(f=>f-r<0?e.length-(e.length%r||r):f-r)},a=async f=>{const c=await Di(f);t(Yn(c))};return _.jsx("div",{className:"mt-2 overflow-x-hidden",children:_.jsxs("div",{className:"flex items-center justify-center gap-4 relative",children:[(e==null?void 0:e.length)>r&&_.jsx("button",{onClick:i,className:"absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:_.jsx(Qr,{icon:"mdi:chevron-left",width:"25"})}),_.jsx("div",{className:"flex gap-5 justify-center flex-1 overflow-hidden",children:e.slice(n,n+r).map(f=>{var c,l,d,u;return _.jsxs("div",{className:"flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",onClick:()=>{a(f.product_id??f.productId)},children:[_.jsx("div",{className:"w-full p-2 flex items-center justify-center bg-white",children:_.jsx("img",{src:((c=M0(f)[0])==null?void 0:c.link)||M0(f)[0]||"https://via.placeholder.com/120",alt:f!=null&&f.productName?f.productName:"Product",className:"w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"})}),_.jsxs("div",{className:"text-white w-full p-2 text-[12px] text-center h-[60px]",children:[_.jsxs("div",{className:"relative inline-block group",children:[_.jsx("div",{className:"w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans",children:f!=null&&f.productName?f.productName:f!=null&&f.product_name?f.product_name:q0(z0((l=f==null?void 0:f.name)==null?void 0:l["en-US"]),60)||"Product"}),_.jsx("div",{className:"absolute left-0 top-full mt-1 w-max max-w-[200px] p-2 bg-white shadow-lg text-black text-xs rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100 z-50 pointer-events-auto",style:{position:"absolute",top:"-100%",left:"0",marginBottom:"5px",zIndex:50},children:f!=null&&f.productName?f.productName:f!=null&&f.product_name?f.product_name:q0(z0((d=f==null?void 0:f.name)==null?void 0:d["en-US"]),60)||"Product"})]}),_.jsxs("div",{className:" flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1",children:[_.jsx("p",{children:qd(f!=null&&f.price?Number(f==null?void 0:f.price):U0(f).centAmount||0,(u=U0(f))==null?void 0:u.currencyCode)}),_.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate",children:["$",Number(f==null?void 0:f.price).toFixed(2)??5]})]})]})]},f.productId)})}),(e==null?void 0:e.length)>r&&_.jsx("button",{onClick:s,className:"absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:_.jsx(Qr,{icon:"mdi:chevron-right",width:"25"})})]})})},Yx=({chat:e,storeDetails:t})=>_.jsx("div",{className:"bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",children:e.map((r,n)=>_.jsxs("div",{className:"mb-4 p-3 rounded-xl",style:{background:"linear-gradient(109.52deg, #F0EEF5 36.91%, #F4F3EE 100.34%"},children:[_.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",children:Wd(r.keyword)||"No keyword"}),_.jsx(Gx,{product:r.items,storeDetails:t})]},n))}),Wi=async(e,t)=>{const{serverUrl:r,basePath:n}=ft(),o=`${r}`;console.log(`customer_token
60
- `,e);try{return(await te.post(`${o}${n}/basket/create?baseUrl=${Ze()}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,t,{headers:{"Content-Type":"application/json",Authorization:e}})).data}catch(s){return te.isAxiosError(s)?console.error("Error creating basket:",s.response||s.message):console.error("Unexpected error:",s),null}},Jr=async(e,t,r)=>{const{serverUrl:n,basePath:o}=ft(),s=`${n}`;try{const i=await te.post(`${s}${o}/basket/add-product/${e}?baseUrl=${Ze()}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,t,{headers:{"Content-Type":"application/json",Authorization:r}});return i.status===200&&i.data?i.data:null}catch(i){return te.isAxiosError(i)?console.error("Error adding products to basket:",i.response||i.message):console.error("Unexpected error:",i),null}},Vi=async({basketId:e,customer_token:t})=>{var s;const{serverUrl:r,basePath:n}=ft(),o=`${r}`;try{const i=await te.get(`${o}${n}/basket/${e}?baseUrl=${Ze()}&siteId=${Ue()}&pubCfg=${Qe()}&envRef=${Je()}&orgRef=${et()}`,{headers:{"Content-Type":"application/json",Authorization:t}});return{status:i.status,data:i.data}}catch(i){return te.isAxiosError(i)?{status:(s=i.response)==null?void 0:s.status,data:null}:{status:null,data:null}}},rs="sfcc_basket_id",ns="sfcc_customer_token",$t="sfcc_token_expiry",Zx=5*60*1e3,Ot="1.0.0";const bt=e=>{try{e?localStorage.setItem(rs,e):localStorage.removeItem(rs)}catch(t){console.error("Error saving basket ID to storage:",t)}},en=e=>{try{if(e){localStorage.setItem(ns,e);const t=Date.now()+Zx;localStorage.setItem($t,t.toString())}else localStorage.removeItem(ns)}catch(t){console.error("Error storing token:",t)}};function Qx(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Qx(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
61
- `);var vo=e=>typeof e=="number"&&!isNaN(e),zt=e=>typeof e=="string",Ki=e=>typeof e=="function",Jx=e=>zt(e)||vo(e),ep=e=>Y.isValidElement(e)||zt(e)||Ki(e)||vo(e),tp=1,Xi=()=>`${tp++}`,Oe=new Map,Zn=[],os=new Set,Gi=()=>Oe.size>0,rp=(e,{containerId:t})=>{var r;return(r=Oe.get(t||1))==null?void 0:r.toasts.get(e)};function np(e,t){var r;if(t)return!!((r=Oe.get(t))!=null&&r.isToastActive(e));let n=!1;return Oe.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function op(e){if(!Gi()){Zn=Zn.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Jx(e))Oe.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Oe.get(e.containerId);t?t.removeToast(e.id):Oe.forEach(r=>{r.removeToast(e.id)})}}var sp=(e={})=>{Oe.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ip(e,t){ep(e)&&(Gi()||Zn.push({content:e,options:t}),Oe.forEach(r=>{r.buildToast(e,t)}))}function Yi(e,t){Oe.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function ap(e){return os.add(e),()=>{os.delete(e)}}function cp(e){return e&&(zt(e.toastId)||vo(e.toastId))?e.toastId:Xi()}function Vt(e,t){return ip(e,t),t.toastId}function vn(e,t){return{...t,type:t&&t.type||e,toastId:cp(t)}}function gn(e){return(t,r)=>Vt(t,vn(e,r))}function re(e,t){return Vt(e,vn("default",t))}re.loading=(e,t)=>Vt(e,vn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function lp(e,{pending:t,error:r,success:n},o){let s;t&&(s=zt(t)?re.loading(t,o):re.loading(t.render,{...o,...t}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(c,l,d)=>{if(l==null){re.dismiss(s);return}let u={type:c,...i,...o,data:d},p=zt(l)?{render:l}:l;return s?re.update(s,{...u,...p}):re(p.render,{...u,...p}),d},f=Ki(e)?e():e;return f.then(c=>a("success",n,c)).catch(c=>a("error",r,c)),f}re.promise=lp;re.success=gn("success");re.info=gn("info");re.error=gn("error");re.warning=gn("warning");re.warn=re.warning;re.dark=(e,t)=>Vt(e,vn("default",{theme:"dark",...t}));function fp(e){op(e)}re.dismiss=fp;re.clearWaitingQueue=sp;re.isActive=np;re.update=(e,t={})=>{let r=rp(e,t);if(r){let{props:n,content:o}=r,s={delay:100,...n,...t,toastId:t.toastId||e,updateId:Xi()};s.toastId!==e&&(s.staleId=e);let i=s.render||o;delete s.render,Vt(i,s)}};re.done=e=>{re.update(e,{progress:1})};re.onChange=ap;re.play=e=>Yi(!0,e);re.pause=e=>Yi(!1,e);const ss=300,up=()=>{var a,f,c,l,d,u;const e=mt.useDispatch(),t=mt.useSelector(p=>p.product.product),r=mt.useSelector(p=>p.store.store),[n,o]=Y.useState(!!t);if(Y.useEffect(()=>{o(!!t)},[t]),!t)return null;const s=async()=>{var p,h,m,x,b,v,g,y,C,E,w,F,O,A,B,R;console.log(t,"the prod");try{if(!((h=(p=t==null?void 0:t.variants)==null?void 0:p[0])!=null&&h.product_id)&&!(t.type.item||t.type.bundle)&&!((x=(m=t==null?void 0:t.variants)==null?void 0:m[0])!=null&&x.productId)){re.error("Variants not available",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const D=[{product_id:((b=t.variants)==null?void 0:b[0].product_id)||((v=t.variants)==null?void 0:v[0].productId)||(t==null?void 0:t.id),quantity:1}];console.log(D,"the product data");const L=JSON.parse(sessionStorage.getItem("customerData")||"{}"),H=L==null?void 0:L.basketId,z=!1,W=localStorage.getItem($t),$=Date.now();if(!z||!W||$>=parseInt(W)){let M="";{const I=await pn();console.log("token from auth data"),M="Bearer "+I.access_token}if(!M){console.error("Failed to get customer_token");return}const U=$+5*60*1e3;if(en(M),localStorage.setItem($t,U.toString()),H){const I=await Vi({basketId:H,customer_token:M});if(console.log(H,"basket id from customer"),I.status===200&&I){const Z=await Jr(H,D,M);(((g=Z==null?void 0:Z.product_items)==null?void 0:g.length)>0||((y=Z==null?void 0:Z.productItems)==null?void 0:y.length)>0)&&(re.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),yt(H));return}}const P={productItems:[{productId:((C=t.variants)==null?void 0:C[0].product_id)||((E=t.variants)==null?void 0:E[0].productId)||(t==null?void 0:t.id),quantity:1}]};console.log("before create basket");const T=await Wi(M,P);if(console.log(T,T==null?void 0:T.basket_id,T==null?void 0:T.basketId,"the basket response"),!(T!=null&&T.basket_id)&&!(T!=null&&T.basketId)){console.error("Failed to create basket");return}console.log("setting stored id",(T==null?void 0:T.basket_id)||(T==null?void 0:T.basketId)),bt((T==null?void 0:T.basket_id)||(T==null?void 0:T.basketId)),console.log("adding product to basket");const j=await Jr((T==null?void 0:T.basket_id)||(T==null?void 0:T.basketId),D,M);console.log("object added to basket"),(((w=j==null?void 0:j.product_items)==null?void 0:w.length)>0||((F=j==null?void 0:j.productItems)==null?void 0:F.length)>0)&&re.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),yt(T.basket_id||(T==null?void 0:T.basketId))}}catch(D){console.error("Error adding to cart:",D),re.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((O=D==null?void 0:D.response)==null?void 0:O.status)===404||((A=D==null?void 0:D.response)==null?void 0:A.status)===401?(((B=D==null?void 0:D.response)==null?void 0:B.status)===404&&bt(null),((R=D==null?void 0:D.response)==null?void 0:R.status)===401&&(bt(null),en(null))):(console.error("Failed to add product to basket:",D.message),re.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}finally{yt()}},i=()=>{t&&(window.location.href=t.c_pdpUrl)};return console.log(t,"the prod"),_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>{o(!1),setTimeout(()=>e(Yn(null)),ss)}}),_.jsxs("div",{className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),S=require("react"),Gt=require("@radix-ui/react-popover");require("clsx");require("tailwind-merge");const L=require("axios");require("crypto-js");const Wt=require("react-router-dom"),ye=require("react-redux"),Qt=require("@reduxjs/toolkit"),nt=require("@iconify/react"),K=require("react-toastify");function Yt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const St=Yt(Gt),we=e=>{const t=new CustomEvent("reactCartUpdated",{detail:{cartUpdated:!0,basketId:e}});window.dispatchEvent(t)};function Zt({...e}){return r.jsx(St.Root,{"data-slot":"popover",...e})}function Xt({...e}){return r.jsx(St.Trigger,{"data-slot":"popover-trigger",...e})}const de=()=>({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"}),kt=async()=>{const e="https://tanya-sfcc-server.vercel.app/";try{const t=await L.post(`${e}api/auth/token-bm-grant?baseUrl=${re()}&siteId=${Z()}`);return t.status===200&&t.data.access_token?t.data.access_token:(console.error("Failed to fetch token:",t.data),null)}catch(t){return L.isAxiosError(t)?console.error("Error fetching token:",t.response||t.message):console.error("Unexpected error:",t),null}},It=async e=>{const t="https://tanya-sfcc-server.vercel.app/";try{const n=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,o=await L.post(`${t}api/auth/token-existing-guest-customer?dwsid=${n}&baseUrl=${re()}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,{},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});return o.status===200&&o.data?o.data:null}catch(n){return L.isAxiosError(n)?console.error("Error creating basket:",n.response||n.message):console.error("Unexpected error:",n),null}};async function De(){const e=localStorage.getItem("expires_in"),t=localStorage.getItem("access_token"),n=JSON.parse(sessionStorage.getItem("customerData")||"{}").isGuest;if(e&&t&&new Date().getTime()<parseInt(e)&&n===JSON.parse(localStorage.getItem("isGuest")||"false"))return console.log("access token found in local storage"),{access_token:t,expires_in:e};const{serverUrl:o}=de(),s=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,i=JSON.parse(sessionStorage.getItem("customerData")||"{}").usrRef;try{const a=n?"unregister-auth":"register-auth",l=await L.get(`${o}sc-api/${a}?dwsid=${s}&email=${i}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}&siteId=${Z()}`);return localStorage.setItem("access_token",l.data.access_token),localStorage.setItem("expires_in",String(new Date().getTime()+l.data.expires_in*1e3)),localStorage.setItem("isGuest",n.toString()),console.log(l.data),l.data}catch(a){console.log(a)}}const re=()=>sessionStorage.getItem("Host"),Z=()=>sessionStorage.getItem("SiteId"),ie=()=>sessionStorage.getItem("pubCfg"),ae=()=>sessionStorage.getItem("envRef"),ce=()=>sessionStorage.getItem("orgRef"),st=async(e,t)=>{const{serverUrl:n,basePath:o}=de();try{const s=re();return(await L.get(`${n}${o}/search-sfcc?baseUrl=${s}&query=${e}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}})).data.hits}catch(s){throw console.error("Error fetching search results:",s),s}},Ct=async e=>{if(!e)throw new Error("Product ID is required");const{serverUrl:t,basePath:n}=de(),o=re();console.log("calling access");const{access_token:s}=await De();return console.log(s),(await L.get(`${t}${n}/product-sfcc/${e}?baseUrl=${o}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`}})).data},en=async e=>{if(!e)throw new Error("customerId is required");const t=await kt(),{customer_token:n}=await It(t),{serverUrl:o,basePath:s}=de(),a=(await De()).access_token;return(await L.get(`${o}${s}/get-interest?baseUrl=${re()}&customerId=${e}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}})).data},ot=e=>String(typeof e=="string"?e:e["en-US"]||e),rt=e=>e!=null&&e.image?[e.image]:"variants"in e?e.variants[0].images:e.masterVariant.images.map(t=>t.url),tn=(e,t)=>e.toLocaleString("en-US",{style:"currency",currency:t||"USD"}),it=e=>{var t,n,o;return"variants"in e?{centAmount:(t=e.variants[0])==null?void 0:t.prices.EUR.max,currencyCode:"DOL"}:{centAmount:(n=e.masterVariant)==null?void 0:n.prices[0].value.centAmount,currencyCode:(o=e.masterVariant)==null?void 0:o.prices[0].value.currencyCode}},nn=e=>e.charAt(0).toUpperCase()+e.slice(1),at=(e,t)=>e.length<t?e:e.slice(0,t)+"...",Re=e=>e.split("\\n").map((t,n)=>{const o=t.match(/^(\d+)\.\s(.+)/);return o?`<p key=${n} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>`:t.trim()?`<p key=${n} class="mb-2">${t}</p>`:"<br/>"}).join("");function sn(e,t){const n=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function i(a){if(n[a])return s[a]=[];if(!(a in s)){s[a]=null;const l=o[a]&&o[a].parent,c=l&&i(l);c&&(s[a]=[l].concat(c))}return s[a]}return Object.keys(n).concat(Object.keys(o)).forEach(i),s}const Ft=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qe=Object.freeze({...Ft,...Ae}),Ve=Object.freeze({...Qe,body:"",hidden:!1});function on(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function ct(e,t){const n=on(e,t);for(const o in Ve)o in Ae?o in e&&!(o in n)&&(n[o]=Ae[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function rn(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let i={};function a(l){i=ct(o[l]||s[l],i)}return a(t),n.forEach(a),ct(e,i)}function Nt(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const o=sn(e);for(const s in o){const i=o[s];i&&(t(s,rn(e,s,i)),n.push(s))}return n}const an={provider:"",aliases:{},not_found:{},...Ft};function He(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Tt(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!He(e,an))return null;const n=t.icons;for(const s in n){const i=n[s];if(!s||typeof i.body!="string"||!He(i,Ve))return null}const o=t.aliases||Object.create(null);for(const s in o){const i=o[s],a=i.parent;if(!s||typeof a!="string"||!n[a]&&!o[a]||!He(i,Ve))return null}return t}const lt=Object.create(null);function cn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ve(e,t){const n=lt[e]||(lt[e]=Object.create(null));return n[t]||(n[t]=cn(e,t))}function _t(e,t){return Tt(t)?Nt(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const Pt=/^[a-z0-9]+(-[a-z0-9]+)*$/,Me=(e,t,n,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const l=s.pop(),c=s.pop(),d={provider:s.length>0?s[0]:o,prefix:c,name:l};return t&&!Ee(d)?null:d}const i=s[0],a=i.split("-");if(a.length>1){const l={provider:o,prefix:a.shift(),name:a.join("-")};return t&&!Ee(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!Ee(l,n)?null:l}return null},Ee=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let Fe=!1;function Et(e){return typeof e=="boolean"&&(Fe=e),Fe}function ut(e){const t=typeof e=="string"?Me(e,!0,Fe):e;if(t){const n=ve(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function un(e,t){const n=Me(e,!0,Fe);if(!n)return!1;const o=ve(n.provider,n.prefix);return t?ln(o,n.name,t):(o.missing.add(n.name),!0)}function dn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Fe&&!t&&!e.prefix){let s=!1;return Tt(e)&&(e.prefix="",Nt(e,(i,a)=>{un(i,a)&&(s=!0)})),s}const n=e.prefix;if(!Ee({prefix:n,name:"a"}))return!1;const o=ve(t,n);return!!_t(o,e)}const $t=Object.freeze({width:null,height:null}),At=Object.freeze({...$t,...Ae}),fn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(fn);if(o===null||!o.length)return e;const s=[];let i=o.shift(),a=pn.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?s.push(i):s.push(Math.ceil(l*t*n)/n)}else s.push(i);if(i=o.shift(),i===void 0)return s.join("");a=!a}}function hn(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const s=e.indexOf(">",o),i=e.indexOf("</"+t);if(s===-1||i===-1)break;const a=e.indexOf(">",i);if(a===-1)break;n+=e.slice(s+1,i).trim(),e=e.slice(0,o).trim()+e.slice(a+1)}return{defs:n,content:e}}function mn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function gn(e,t,n){const o=hn(e);return mn(o.defs,t+o.content+n)}const xn=e=>e==="unset"||e==="undefined"||e==="none";function yn(e,t){const n={...Qe,...e},o={...At,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(T=>{const p=[],b=T.hFlip,O=T.vFlip;let E=T.rotate;b?O?E+=2:(p.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),p.push("scale(-1 1)"),s.top=s.left=0):O&&(p.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),p.push("scale(1 -1)"),s.top=s.left=0);let P;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:P=s.height/2+s.top,p.unshift("rotate(90 "+P.toString()+" "+P.toString()+")");break;case 2:p.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:P=s.width/2+s.left,p.unshift("rotate(-90 "+P.toString()+" "+P.toString()+")");break}E%2===1&&(s.left!==s.top&&(P=s.left,s.left=s.top,s.top=P),s.width!==s.height&&(P=s.width,s.width=s.height,s.height=P)),p.length&&(i=gn(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const a=o.width,l=o.height,c=s.width,d=s.height;let f,g;a===null?(g=l===null?"1em":l==="auto"?d:l,f=dt(g,c/d)):(f=a==="auto"?c:a,g=l===null?dt(f,d/c):l==="auto"?d:l);const w={},h=(T,p)=>{xn(p)||(w[T]=p.toString())};h("width",f),h("height",g);const j=[s.left,s.top,c,d];return w.viewBox=j.join(" "),{attributes:w,viewBox:j,body:i}}const wn=/\sid="(\S+)"/g,bn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let vn=0;function jn(e,t=bn){const n=[];let o;for(;o=wn.exec(e);)n.push(o[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(vn++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const Je=Object.create(null);function Sn(e,t){Je[e]=t}function Ke(e){return Je[e]||Je[""]}function Ye(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ze=Object.create(null),Se=["https://api.simplesvg.com","https://api.unisvg.com"],$e=[];for(;Se.length>0;)Se.length===1||Math.random()>.5?$e.push(Se.shift()):$e.push(Se.pop());Ze[""]=Ye({resources:["https://api.iconify.design"].concat($e)});function kn(e,t){const n=Ye(t);return n===null?!1:(Ze[e]=n,!0)}function Xe(e){return Ze[e]}const In=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ft=In();function Cn(e,t){const n=Xe(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let s=0;n.resources.forEach(a=>{s=Math.max(s,a.length)});const i=t+".json?icons=";o=n.maxURL-s-n.path.length-i.length}return o}function Fn(e){return e===404}const Nn=(e,t,n)=>{const o=[],s=Cn(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,d)=>{l+=c.length+1,l>=s&&d>0&&(o.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),o.push(a),o};function Tn(e){if(typeof e=="string"){const t=Xe(e);if(t)return t.path}return"/"}const _n=(e,t,n)=>{if(!ft){n("abort",424);return}let o=Tn(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});o+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;ft(e+o).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(Fn(a)?"abort":"next",a)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},Pn={prepare:Nn,send:_n};function Ot(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function En(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,s=e.prefix;t.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==s)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:o,prefix:s,name:d});else if(e.missing.has(d))a.missing.push({provider:o,prefix:s,name:d});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Ot([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let $n=0;function An(e,t,n){const o=$n++,s=Ot.bind(null,n,o);if(!t.pending.length)return s;const i={id:o,icons:t,callback:e,abort:s};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),s}function On(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const i=s.provider,a=s.prefix,l=s.name,c=n[i]||(n[i]=Object.create(null)),d=c[a]||(c[a]=ve(i,a));let f;l in d.icons?f=t.loaded:a===""||d.missing.has(l)?f=t.missing:f=t.pending;const g={provider:i,prefix:a,name:l};f.push(g)}),t}function Ln(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const i=typeof s=="string"?Me(s,t,n):s;i&&o.push(i)}),o}const Dn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Mn(e,t,n,o){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let a;if(e.random){let I=e.resources.slice(0);for(a=[];I.length>1;){const $=Math.floor(Math.random()*I.length);a.push(I[$]),I=I.slice(0,$).concat(I.slice($+1))}a=a.concat(I)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,g=null,w=[],h=[];typeof o=="function"&&h.push(o);function j(){g&&(clearTimeout(g),g=null)}function T(){c==="pending"&&(c="aborted"),j(),w.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),w=[]}function p(I,$){$&&(h=[]),typeof I=="function"&&h.push(I)}function b(){return{startTime:l,payload:t,status:c,queriesSent:d,queriesPending:w.length,subscribe:p,abort:T}}function O(){c="failed",h.forEach(I=>{I(void 0,f)})}function E(){w.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),w=[]}function P(I,$,R){const W=$!=="success";switch(w=w.filter(D=>D!==I),c){case"pending":break;case"failed":if(W||!e.dataAfterTimeout)return;break;default:return}if($==="abort"){f=R,O();return}if(W){f=R,w.length||(a.length?G():O());return}if(j(),E(),!e.random){const D=e.resources.indexOf(I.resource);D!==-1&&D!==e.index&&(e.index=D)}c="completed",h.forEach(D=>{D(R)})}function G(){if(c!=="pending")return;j();const I=a.shift();if(I===void 0){if(w.length){g=setTimeout(()=>{j(),c==="pending"&&(E(),O())},e.timeout);return}O();return}const $={status:"pending",resource:I,callback:(R,W)=>{P($,R,W)}};w.push($),d++,g=setTimeout(G,e.rotate),n(I,t,$.callback)}return setTimeout(G),b}function Lt(e){const t={...Dn,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function s(l,c,d){const f=Mn(t,l,c,(g,w)=>{o(),d&&d(g,w)});return n.push(f),f}function i(l){return n.find(c=>l(c))||null}return{query:s,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function pt(){}const ze=Object.create(null);function Un(e){if(!ze[e]){const t=Xe(e);if(!t)return;const n=Lt(t),o={config:t,redundancy:n};ze[e]=o}return ze[e]}function Bn(e,t,n){let o,s;if(typeof e=="string"){const i=Ke(e);if(!i)return n(void 0,424),pt;s=i.send;const a=Un(e);a&&(o=a.redundancy)}else{const i=Ye(e);if(i){o=Lt(i);const a=e.resources?e.resources[0]:"",l=Ke(a);l&&(s=l.send)}}return!o||!s?(n(void 0,424),pt):o.query(t,s,n)().abort}function ht(){}function qn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,En(e)}))}function Rn(e){const t=[],n=[];return e.forEach(o=>{(o.match(Pt)?t:n).push(o)}),{valid:t,invalid:n}}function ke(e,t,n){function o(){const s=e.pendingIcons;t.forEach(i=>{s&&s.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!_t(e,n).length){o();return}}catch(s){console.error(s)}o(),qn(e)}function mt(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Hn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,s=e.iconsToLoad;if(delete e.iconsToLoad,!s||!s.length)return;const i=e.loadIcon;if(e.loadIcons&&(s.length>1||!i)){mt(e.loadIcons(s,o,n),f=>{ke(e,s,f)});return}if(i){s.forEach(f=>{const g=i(f,o,n);mt(g,w=>{const h=w?{prefix:o,icons:{[f]:w}}:null;ke(e,[f],h)})});return}const{valid:a,invalid:l}=Rn(s);if(l.length&&ke(e,l,null),!a.length)return;const c=o.match(Pt)?Ke(n):null;if(!c){ke(e,a,null);return}c.prepare(n,o,a).forEach(f=>{Bn(n,f,g=>{ke(e,f.icons,g)})})}))}const zn=(e,t)=>{const n=Ln(e,!0,Et()),o=On(n);if(!o.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(o.loaded,o.missing,o.pending,ht)}),()=>{c=!1}}const s=Object.create(null),i=[];let a,l;return o.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(ve(d,f));const g=s[d]||(s[d]=Object.create(null));g[f]||(g[f]=[])}),o.pending.forEach(c=>{const{provider:d,prefix:f,name:g}=c,w=ve(d,f),h=w.pendingIcons||(w.pendingIcons=new Set);h.has(g)||(h.add(g),s[d][f].push(g))}),i.forEach(c=>{const d=s[c.provider][c.prefix];d.length&&Hn(c,d)}),t?An(t,o,i):ht};function Vn(e,t){const n={...e};for(const o in t){const s=t[o],i=typeof s;o in $t?(s===null||s&&(i==="string"||i==="number"))&&(n[o]=s):i===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const Jn=/[\s,]+/;function Kn(e,t){t.split(Jn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Gn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?o(i):0)}}return t}function Wn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Qn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Yn(e){return"data:image/svg+xml,"+Qn(e)}function Zn(e){return'url("'+Yn(e)+'")'}let Ce;function Xn(){try{Ce=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ce=null}}function es(e){return Ce===void 0&&Xn(),Ce?Ce.createHTML(e):e}const Dt={...At,inline:!1},ts={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},ns={display:"inline-block"},Ge={backgroundColor:"currentColor"},Mt={backgroundColor:"transparent"},gt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},xt={WebkitMask:Ge,mask:Ge,background:Mt};for(const e in xt){const t=xt[e];for(const n in gt)t[e+n]=gt[n]}const ss={...Dt,inline:!0};function yt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const os=(e,t,n)=>{const o=t.inline?ss:Dt,s=Vn(o,t),i=t.mode||"svg",a={},l=t.style||{},c={...i==="svg"?ts:{}};if(n){const p=Me(n,!1,!0);if(p){const b=["iconify"],O=["provider","prefix"];for(const E of O)p[E]&&b.push("iconify--"+p[E]);c.className=b.join(" ")}}for(let p in t){const b=t[p];if(b!==void 0)switch(p){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[p]=(c[p]?c[p]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":s[p]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&Kn(s,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?s[p]=Gn(b):typeof b=="number"&&(s[p]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:o[p]===void 0&&(c[p]=b)}}const d=yn(e,s),f=d.attributes;if(s.inline&&(a.verticalAlign="-0.125em"),i==="svg"){c.style={...a,...l},Object.assign(c,f);let p=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:es(jn(d.body,b?()=>b+"ID"+p++:"iconifyReact"))},S.createElement("svg",c)}const{body:g,width:w,height:h}=e,j=i==="mask"||(i==="bg"?!1:g.indexOf("currentColor")!==-1),T=Wn(g,{...f,width:w+"",height:h+""});return c.style={...a,"--svg":Zn(T),width:yt(f.width),height:yt(f.height),...ns,...j?Ge:Mt,...l},S.createElement("span",c)};Et(!0);Sn("",Pn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!dn(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;kn(n,s)||console.error(o)}catch{console.error(o)}}}}function Ut(e){const[t,n]=S.useState(!!e.ssr),[o,s]=S.useState({});function i(h){if(h){const j=e.icon;if(typeof j=="object")return{name:"",data:j};const T=ut(j);if(T)return{name:j,data:T}}return{name:""}}const[a,l]=S.useState(i(!!e.ssr));function c(){const h=o.callback;h&&(h(),s({}))}function d(h){if(JSON.stringify(a)!==JSON.stringify(h))return c(),l(h),!0}function f(){var h;const j=e.icon;if(typeof j=="object"){d({name:"",data:j});return}const T=ut(j);if(d({name:j,data:T}))if(T===void 0){const p=zn([j],f);s({callback:p})}else T&&((h=e.onLoad)===null||h===void 0||h.call(e,j))}S.useEffect(()=>(n(!0),c),[]),S.useEffect(()=>{t&&f()},[e.icon,t]);const{name:g,data:w}=a;return w?os({...Qe,...w},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const wt=S.forwardRef((e,t)=>Ut({...e,_ref:t}));S.forwardRef((e,t)=>Ut({inline:!0,...e,_ref:t}));const rs={product:null},Bt=Qt.createSlice({name:"product",initialState:rs,reducers:{setProduct:(e,t)=>{e.product=t.payload}}}),{setProduct:We}=Bt.actions;Bt.reducer;function is(){const e=()=>window.innerWidth<425?1:window.innerWidth<768?2:4,[t,n]=S.useState(e);return S.useEffect(()=>{const o=()=>n(e());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),t}const as=({product:e})=>{const t=ye.useDispatch(),n=is(),[o,s]=S.useState(0),i=()=>{s(c=>c+n>=e.length?0:c+n)},a=()=>{s(c=>c-n<0?e.length-(e.length%n||n):c-n)},l=async c=>{const d=await Ct(c);t(We(d))};return r.jsx("div",{className:"mt-2 overflow-x-hidden",children:r.jsxs("div",{className:"flex items-center justify-center gap-4 relative",children:[(e==null?void 0:e.length)>n&&r.jsx("button",{onClick:a,className:"absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:r.jsx(wt,{icon:"mdi:chevron-left",width:"25"})}),r.jsx("div",{className:"flex gap-5 justify-center flex-1 overflow-hidden",children:e.slice(o,o+n).map(c=>{var d,f,g,w;return r.jsxs("div",{className:"flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",onClick:()=>{l(c.product_id??c.productId)},children:[r.jsx("div",{className:"w-full p-2 flex items-center justify-center bg-white",children:r.jsx("img",{src:((d=rt(c)[0])==null?void 0:d.link)||rt(c)[0]||"https://via.placeholder.com/120",alt:c!=null&&c.productName?c.productName:"Product",className:"w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"})}),r.jsxs("div",{className:"text-white w-full p-2 text-[12px] text-center h-[60px]",children:[r.jsxs("div",{className:"relative inline-block group",children:[r.jsx("div",{className:"w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans",children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:at(ot((f=c==null?void 0:c.name)==null?void 0:f["en-US"]),60)||"Product"}),r.jsx("div",{className:"absolute left-0 top-full mt-1 w-max max-w-[200px] p-2 bg-white shadow-lg text-black text-xs rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100 z-50 pointer-events-auto",style:{position:"absolute",top:"-100%",left:"0",marginBottom:"5px",zIndex:50},children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:at(ot((g=c==null?void 0:c.name)==null?void 0:g["en-US"]),60)||"Product"})]}),r.jsxs("div",{className:" flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1",children:[r.jsx("p",{children:tn(c!=null&&c.price?Number(c==null?void 0:c.price):it(c).centAmount||0,(w=it(c))==null?void 0:w.currencyCode)}),r.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate",children:["$",Number(c==null?void 0:c.price).toFixed(2)??5]})]})]})]},c.productId)})}),(e==null?void 0:e.length)>n&&r.jsx("button",{onClick:i,className:"absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:r.jsx(wt,{icon:"mdi:chevron-right",width:"25"})})]})})},cs=({chat:e,storeDetails:t})=>r.jsx("div",{className:"bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",children:e.map((n,o)=>r.jsxs("div",{className:"mb-4 p-3 rounded-xl",style:{background:"linear-gradient(109.52deg, #F0EEF5 36.91%, #F4F3EE 100.34%"},children:[r.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",children:nn(n.keyword)||"No keyword"}),r.jsx(as,{product:n.items,storeDetails:t})]},o))}),qt=async(e,t)=>{const{serverUrl:n,basePath:o}=de(),s=`${n}`;console.log(`customer_token
2
+ `,e);try{return(await L.post(`${s}${o}/basket/create?baseUrl=${re()}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,t,{headers:{"Content-Type":"application/json",Authorization:e}})).data}catch(i){return L.isAxiosError(i)?console.error("Error creating basket:",i.response||i.message):console.error("Unexpected error:",i),null}},Oe=async(e,t,n)=>{const{serverUrl:o,basePath:s}=de(),i=`${o}`;try{const a=await L.post(`${i}${s}/basket/add-product/${e}?baseUrl=${re()}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,t,{headers:{"Content-Type":"application/json",Authorization:n}});return a.status===200&&a.data?a.data:null}catch(a){return L.isAxiosError(a)?console.error("Error adding products to basket:",a.response||a.message):console.error("Unexpected error:",a),null}},Rt=async({basketId:e,customer_token:t})=>{var i;const{serverUrl:n,basePath:o}=de(),s=`${n}`;try{const a=await L.get(`${s}${o}/basket/${e}?baseUrl=${re()}&siteId=${Z()}&pubCfg=${ie()}&envRef=${ae()}&orgRef=${ce()}`,{headers:{"Content-Type":"application/json",Authorization:t}});return{status:a.status,data:a.data}}catch(a){return L.isAxiosError(a)?{status:(i=a.response)==null?void 0:i.status,data:null}:{status:null,data:null}}},bt="sfcc_basket_id",vt="sfcc_customer_token",Ne="sfcc_token_expiry",ls=300*1e3,Ie="1.0.0";const be=e=>{try{e?localStorage.setItem(bt,e):localStorage.removeItem(bt)}catch(t){console.error("Error saving basket ID to storage:",t)}},Le=e=>{try{if(e){localStorage.setItem(vt,e);const t=Date.now()+ls;localStorage.setItem(Ne,t.toString())}else localStorage.removeItem(vt)}catch(t){console.error("Error storing token:",t)}},jt=300,us=()=>{var l,c,d,f,g,w;const e=ye.useDispatch(),t=ye.useSelector(h=>h.product.product),n=ye.useSelector(h=>h.store.store),[o,s]=S.useState(!!t);if(S.useEffect(()=>{s(!!t)},[t]),!t)return null;const i=async()=>{var h,j,T,p,b,O,E,P,G,I,$,R,W,D,M,fe;console.log(t,"the prod");try{if(!((j=(h=t==null?void 0:t.variants)==null?void 0:h[0])!=null&&j.product_id)&&!(t.type.item||t.type.bundle)&&!((p=(T=t==null?void 0:t.variants)==null?void 0:T[0])!=null&&p.productId)){K.toast.error("Variants not available",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const m=[{product_id:((b=t.variants)==null?void 0:b[0].product_id)||((O=t.variants)==null?void 0:O[0].productId)||(t==null?void 0:t.id),quantity:1}];console.log(m,"the product data");const je=JSON.parse(sessionStorage.getItem("customerData")||"{}"),le=je==null?void 0:je.basketId,Ue=!1,Te=localStorage.getItem(Ne),X=Date.now();if(!Ue||!Te||X>=parseInt(Te)){let B="";{const te=await De();console.log("token from auth data"),B="Bearer "+te.access_token}if(!B){console.error("Failed to get customer_token");return}const _e=X+300*1e3;if(Le(B),localStorage.setItem(Ne,_e.toString()),le){const te=await Rt({basketId:le,customer_token:B});if(console.log(le,"basket id from customer"),te.status===200&&te){const ne=await Oe(le,m,B);(((E=ne==null?void 0:ne.product_items)==null?void 0:E.length)>0||((P=ne==null?void 0:ne.productItems)==null?void 0:P.length)>0)&&(K.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),we(le));return}}const Be={productItems:[{productId:((G=t.variants)==null?void 0:G[0].product_id)||((I=t.variants)==null?void 0:I[0].productId)||(t==null?void 0:t.id),quantity:1}]};console.log("before create basket");const y=await qt(B,Be);if(console.log(y,y==null?void 0:y.basket_id,y==null?void 0:y.basketId,"the basket response"),!(y!=null&&y.basket_id)&&!(y!=null&&y.basketId)){console.error("Failed to create basket");return}console.log("setting stored id",(y==null?void 0:y.basket_id)||(y==null?void 0:y.basketId)),be((y==null?void 0:y.basket_id)||(y==null?void 0:y.basketId)),console.log("adding product to basket");const ee=await Oe((y==null?void 0:y.basket_id)||(y==null?void 0:y.basketId),m,B);console.log("object added to basket"),((($=ee==null?void 0:ee.product_items)==null?void 0:$.length)>0||((R=ee==null?void 0:ee.productItems)==null?void 0:R.length)>0)&&K.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),we(y.basket_id||(y==null?void 0:y.basketId))}}catch(m){console.error("Error adding to cart:",m),K.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((W=m==null?void 0:m.response)==null?void 0:W.status)===404||((D=m==null?void 0:m.response)==null?void 0:D.status)===401?(((M=m==null?void 0:m.response)==null?void 0:M.status)===404&&be(null),((fe=m==null?void 0:m.response)==null?void 0:fe.status)===401&&(be(null),Le(null))):(console.error("Failed to add product to basket:",m.message),K.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}finally{we()}},a=()=>{t&&(window.location.href=t.c_pdpUrl)};return console.log(t,"the prod"),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>{s(!1),setTimeout(()=>e(We(null)),jt)}}),r.jsxs("div",{className:`
62
3
  flex flex-col gap-2 items-center h-[90vh] absolute right-0 bottom-0 z-50 w-full md:w-1/2 md:h-[100vh] lg:w-1/2 lg:h-[100vh] shadow-xl p-2 border-l-2 bg-white border-gray-200 overflow-y-scroll
63
4
  transition-all duration-300
64
- ${n?"translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100":"translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
65
- `,style:{willChange:"transform, opacity"},onClick:p=>p.stopPropagation(),children:[_.jsxs("div",{className:"mt-3 flex flex-row justify-between w-full ",children:[_.jsx("div",{children:_.jsx("p",{className:"text-[#000000] font-bold font-nunitoSans",children:t.name})}),_.jsx("div",{children:_.jsx(Qr,{icon:"mdi:close",className:"text-[#555555] w-6 h-6 cursor-pointer",onClick:()=>{o(!1),setTimeout(()=>e(Yn(null)),ss)}})})]}),_.jsxs("div",{className:"flex flex-row gap-2 items-center flex-wrap",children:[_.jsx("div",{className:"flex flex-row items-center justify-center w-[120px] h-[120px] my-5",children:_.jsx("img",{src:(l=(c=(f=(a=t.imageGroups)==null?void 0:a[0])==null?void 0:f.images)==null?void 0:c[0])==null?void 0:l.link,alt:t.name,className:"rounded-[10px]"})}),_.jsx("div",{className:"flex flex-col items-center gap-2",children:t.imageGroups.slice(1,2).map(p=>p.images.slice(1,2).map(h=>_.jsx("img",{src:h.link,alt:t.name,className:"rounded-[10px] w-[60px] h-[60px]"},h.link)))})]}),_.jsxs("div",{className:"flex flex-row items-center justify-between w-full",children:[_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[_.jsxs("p",{className:"text-[#14121F] font-bold font-nunitoSans",children:[" ","$",t.price.toFixed(2)]})," ",_.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans",children:[" ","$",(t.price+5).toFixed(2)]})]}),_.jsx("div",{children:_.jsx("p",{className:"text-[#EC5050] font-bold font-nunitoSans",children:t.discount})})]}),_.jsx("div",{className:"mt-2 w-full border-t-2 border-gray-200"}),_.jsxs("div",{className:"w-full text-left",children:[_.jsx("div",{className:"text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]",children:"Product Details"}),_.jsx("div",{className:"text-[#68656E] font-normal font-nunitoSans text-xs pl-2 mt-3",dangerouslySetInnerHTML:{__html:t.short_description||t.longDescription}})]}),_.jsxs("div",{className:"mt-4 flex flex-col gap-2 w-full p-2",children:[_.jsx("div",{className:"flex flex-row items-center gap-2",children:_.jsxs("div",{className:"flex items-center gap-2 text-left font-nunitoSans",children:[_.jsxs("div",{className:"text-[#323135] font-bold",children:[((d=t==null?void 0:t.rating)==null?void 0:d.rate)||0," /"," ",_.jsx("span",{className:"text-[#68656E]",children:"5"})]}),_.jsx("div",{className:"text-[#323135] font-semibold text-sm",children:"Overall Rating"}),_.jsxs("div",{className:"text-[#68656E] font-semibold text-sm",children:[((u=t==null?void 0:t.rating)==null?void 0:u.count)||0," ratings"]})]})}),_.jsx("div",{className:"mt-2 flex flex-row items-center gap-2",children:Array.from({length:5}).map((p,h)=>{var m;return _.jsx(Qr,{icon:"mdi:star",width:"20",height:"20",className:`text-yellow-500
66
- ${((m=t==null?void 0:t.rating)==null?void 0:m.rate)>h?"text-yellow-500":"text-gray-300"}
67
- `},h)})})]}),_.jsxs("div",{className:"flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",style:{marginTop:"150px"},children:[_.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",style:{backgroundColor:r.tanyaThemeColor},onClick:s,children:"Add to Cart"}),_.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",style:{backgroundColor:r.tanyaThemeColor},onClick:i,children:"View more"})]})]})]})},dp=()=>{const e=["Myself","My Child","My Grandchild","Niece/Nephew","My Friends","Others"],t={Myself:"himself/herself","My Child":"his/her child","My Grandchild":"his/her grandchild","Niece/Nephew":"his/her niece/nephew","My Friends":"his/her friends",Others:"others"},r=Y.useRef(null),n=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(null),[i,a]=Y.useState(null),[f]=ia.useSearchParams(),[c,l]=Y.useState(f.get("shoppingassist")==="true"),[d,u]=Y.useState(!1),[p,h]=Y.useState(!1),[m,x]=Y.useState(!1),[b,v]=Y.useState(!1),[g,y]=Y.useState(!1),[C,E]=Y.useState(""),[w,F]=Y.useState(""),O=N=>({id:N.id,title:N.name,image:N.image??"",price:N.price??0}),[A,B]=Y.useState([]),R=Y.useRef(null),D=mt.useSelector(N=>N.store.store),L=mt.useSelector(N=>N.product.product),H=()=>{h(!0),setTimeout(()=>u(!0),10)},z=()=>{u(!1),setTimeout(()=>h(!1),300)};Y.useEffect(()=>{c?H():z()},[c]);const W=N=>{F(t[N])};Y.useEffect(()=>{R.current&&(R.current.scrollTop+=150)},[A]);let $=null,M=null;const U=async()=>{if($&&M&&Date.now()<M)return $;try{const N="https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token",Q=new URLSearchParams({grant_type:"client_credentials",client_id:"4i8rd70sgt961tc4dhskgf08c",client_secret:"bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",scope:"default-m2m-resource-server-8xzfzo/read"}),X=await fetch(N,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q});if(!X.ok)throw new Error(`Token request failed! status: ${X.status}`);const J=await X.json();$=J.access_token;const V=J.expires_in||3600;return M=Date.now()+(V-60)*1e3,$}catch(N){return console.error("Error obtaining JWT token:",N),$=null,M=null,null}},P=async()=>{const N=await pn();N!=null&&a(N)};Y.useEffect(()=>{P(),console.log("scapi environment v1")},[]);const T=async()=>{const N=JSON.parse(sessionStorage.getItem("customerData")||"{}").customerId;return(await ku(N||"")).c_interests},j=async(N,Q)=>{console.log("in secondary flow",Ot);const X=await T();if(console.log(X,"interests of customer",Ot),!!X)try{B(ae=>ae.map((ce,fe)=>fe===ae.length-1?{...ce,secondaryLoading:!0}:ce));const J=await U();if(!J)throw new Error("Failed to fetch token");const V=localStorage.getItem("customerNumber"),q=localStorage.getItem("isLoggedIn"),Ee=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(q||!1),userId:String(V||new Date().getTime())}).toString()}`,ge=JSON.stringify({flowId:"Q166PR519W",flowAliasId:"HKFUVLWVH2",input:{loyaltyPoints:"",productName:N,productPoints:String(Q||0),interests:X}}),de=await fetch(Ee,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${J}`},body:ge});if(!de.body)throw new Error("Readable stream not supported");const ye=de.body.getReader(),me=new TextDecoder;let pe="";for(;;){const{done:ae,value:ce}=await ye.read();if(ae)break;pe+=me.decode(ce,{stream:!0});const fe=pe.split(`
68
- `);pe=fe.pop()||"";for(const we of fe)if(we.startsWith("data:")){const G=we.slice(5).trim();try{const xe=JSON.parse(G);xe.index===0&&B(ie=>ie.map((ve,Fe)=>Fe===ie.length-1?{...ve,secondaryResponse:xe.data,secondaryLoading:!1}:ve))}catch(xe){B(ie=>ie.map((ve,Fe)=>Fe===ie.length-1?{...ve,secondaryLoading:!1}:ve)),console.error("Secondary flow JSON parse error:",xe)}}}}catch(J){console.error("Secondary flow error:",J)}},I=async N=>{const Q=N||C.trim();if(Q){v(!0),E(""),r.current=null,n.current=null,o.current=null,s.current=null,B(X=>[...X,{query:Q,response:"Thinking for what suits you best...",potentialQuestions:"",products:[],keywords:"Thinking for best products..."}]);try{const X=w,J=localStorage.getItem("customerNumber"),V=localStorage.getItem("isLoggedIn"),q=await U();if(!q)throw new Error("Failed to obtain access token");const Ee=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(V||!1),userId:String(J||new Date().getTime())}).toString()}`,ge=JSON.stringify({flowId:"MMHQKYI1NE",flowAliasId:"SZF9ZK1ATE",input:{userPrompt:Q,whom:X}}),de=await fetch(Ee,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${q}`},body:ge});if(!de.ok)throw new Error(`HTTP error! status: ${de.status}`);if(!de.body)throw new Error("Readable stream not supported");const ye=de.body.getReader(),me=new TextDecoder;let pe="",ae="";for(;;){y(!0);const{done:ce,value:fe}=await ye.read();if(ce)break;pe+=me.decode(fe,{stream:!0});const we=pe.split(`
69
- `);pe=we.pop()||"";for(const G of we)if(G.startsWith("data:")){const xe=G.slice(5).trim();try{const ie=JSON.parse(xe);ie.index==1&&(ae=ie.data),B(ve=>ve.map((Fe,rt)=>rt===ve.length-1?{...Fe,[ie.index==0?"response":ie.index==1?"keywords":ie.index==2?"potentialQuestions":"end"]:ie.data}:Fe))}catch(ie){console.error("Error parsing JSON:",ie)}}}oe(Z(ae))}catch(X){console.error("Error sending message to Tanya:",X)}finally{v(!1)}}},Z=N=>{const Q=N.match(/top five relevant product or category names are: (.*)/i),V=(Q?Q[1]:N).split(", ").map(se=>se.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi,"").trim());return[...new Set(V)].filter(Boolean).join(",")},oe=async N=>{if(console.log(i==null?void 0:i.access_token,"access_token"),typeof N=="string"){console.log(N,"keywords");const Q=N.split(",");for(const X of Q){const J=await o0(X,i==null?void 0:i.access_token);if(y(!1),(J==null?void 0:J.length)>0&&(B(V=>V.map((q,se)=>se===V.length-1?{...q,products:[...q.products||[],{keyword:X,items:J,loading:!1}]}:q)),!r.current||n.current==null)){const V=J[0];r.current=String((V==null?void 0:V.product_name)??""),o.current=V.image.link,n.current=V.product_id;const q=typeof(V==null?void 0:V.price)=="number"?V.price:void 0;s.current=typeof q=="number"&&Number.isFinite(q)?q:null}}}else for(const Q of N){const X=await o0(Q,i==null?void 0:i.access_token);y(!1),(X==null?void 0:X.length)>0&&B(J=>J.map((V,q)=>q===J.length-1?{...V,products:[...V.products||[],{keyword:Q,items:X,loading:!1}]}:V))}if(r.current){B(X=>X.map((J,V)=>V===X.length-1?{...J,productSnapshot:{id:n.current,name:r.current,image:o.current,price:s.current??null,points:0,quantity:1}}:J));const Q=JSON.parse(sessionStorage.getItem("customerData")||"{}");(Q==null?void 0:Q.isGuest)==!1?(console.log("running secondary flow",Ot),j(r.current,0)):console.log("not running secondary flow",Ot)}y(!1)},le=async(N,Q)=>{var X,J,V,q,se,Ee,ge,de,ye,me,pe,ae,ce,fe,we;x(!0);try{const G=await Di(N.id);if(!((J=(X=G==null?void 0:G.variants)==null?void 0:X[0])!=null&&J.product_id||(q=(V=G==null?void 0:G.variants)==null?void 0:V[0])!=null&&q.productId)&&!(G.type.item||G.type.bundle)){x(!1),re.error("Variants not found",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const xe=[{product_id:((se=G.variants)==null?void 0:se[0].product_id)||((Ee=G.variants)==null?void 0:Ee[0].productId)||(G==null?void 0:G.id),quantity:Q}];console.log(xe,"product data","app version",Ot);const ie=JSON.parse(sessionStorage.getItem("customerData")||"{}"),ve=ie==null?void 0:ie.basketId,Fe=!1,rt=localStorage.getItem($t),je=Date.now();if(!Fe||!rt||je>=parseInt(rt)){const nt=await Bi();let{customer_token:Le}=await Fi(nt);if(Le="Bearer "+i.access_token,!Le){console.error("Failed to get customer_token");return}const Kt=je+5*60*1e3;if(en(Le),localStorage.setItem($t,Kt.toString()),ve){const St=await Vi({basketId:ve,customer_token:Le});if(St.status===200&&St){const kt=await Jr(ve,xe,Le);((ge=kt==null?void 0:kt.product_items)==null?void 0:ge.length)>0&&(re.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),yt(ve),x(!1));return}}const Xt={productItems:[{productId:((de=G.variants)==null?void 0:de[0].product_id)||((ye=G.variants)==null?void 0:ye[0].productId)||(G==null?void 0:G.id),quantity:1}]},ne=await Wi(Le,Xt);if(console.log(ne,ne==null?void 0:ne.basket_id,ne==null?void 0:ne.basketId,"the basket response"),!(ne!=null&&ne.basket_id||!(ne!=null&&ne.basketId))){x(!1),console.error("Failed to create basket");return}bt((ne==null?void 0:ne.basket_id)||(ne==null?void 0:ne.basketId));const qe=await Jr((ne==null?void 0:ne.basket_id)||(ne==null?void 0:ne.basketId),xe,Le);(((me=qe==null?void 0:qe.product_items)==null?void 0:me.length)>0||((pe=qe==null?void 0:qe.productItems)==null?void 0:pe.length)>0)&&re.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),yt(ne.basket_id||(ne==null?void 0:ne.basketId))}}catch(G){x(!1),console.error("Error adding to cart:",G),re.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((ae=G==null?void 0:G.response)==null?void 0:ae.status)===404||((ce=G==null?void 0:G.response)==null?void 0:ce.status)===401?(((fe=G==null?void 0:G.response)==null?void 0:fe.status)===404&&bt(null),((we=G==null?void 0:G.response)==null?void 0:we.status)===401&&(bt(null),en(null))):(console.error("Failed to add product to basket:",G.message),re.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}finally{yt()}x(!1)};return _.jsx("div",{className:"relative flex justify-center",children:_.jsxs(Zl,{open:c,onOpenChange:l,children:[_.jsx(Ql,{onClick:()=>l(!0),style:{},className:"flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity",children:_.jsx("div",{className:"flex flex-col p-[5px]",children:_.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsxs("g",{clipPath:"url(#clip0_958_585)",children:[_.jsx("path",{d:"M30.0002 5C31.7683 5 33.464 5.70238 34.7142 6.95262C35.9644 8.20286 36.6668 9.89856 36.6668 11.6667V25C36.6668 26.7681 35.9644 28.4638 34.7142 29.714C33.464 30.9643 31.7683 31.6667 30.0002 31.6667H25.6902L21.1785 36.1783C20.8915 36.4653 20.5097 36.6377 20.1046 36.6631C19.6996 36.6886 19.2992 36.5654 18.9785 36.3167L18.8218 36.1783L14.3085 31.6667H10.0002C8.28976 31.6667 6.64478 31.0093 5.40548 29.8305C4.16617 28.6516 3.42735 27.0416 3.34183 25.3333L3.3335 25V11.6667C3.3335 9.89856 4.03588 8.20286 5.28612 6.95262C6.53636 5.70238 8.23205 5 10.0002 5H30.0002Z",fill:"url(#paint0_linear_958_585)"}),_.jsx("path",{d:"M28.3335 15.6511V11.6667C28.3335 11.6667 22.2774 12.6042 20.1148 15.4167C17.9521 18.2292 18.6644 26.6667 18.6644 26.6667H22.5321C22.5321 26.6667 22.0614 18.9323 23.4989 17.2917C24.9364 15.6511 28.3335 15.6511 28.3335 15.6511Z",fill:"white"}),_.jsx("path",{d:"M13.3335 11.6667H19.6184V15.4167H13.3335V11.6667Z",fill:"white"})]}),_.jsxs("defs",{children:[_.jsxs("linearGradient",{id:"paint0_linear_958_585",x1:"20.0002",y1:"5",x2:"35.0002",y2:"30",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#452697"}),_.jsx("stop",{offset:"1",stopColor:"#7C5BFF"})]}),_.jsx("clipPath",{id:"clip0_958_585",children:_.jsx("rect",{width:"40",height:"40",fill:"white"})})]})]})})}),p&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>l(!1)}),_.jsxs("div",{className:`
5
+ ${o?"translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100":"translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
6
+ `,style:{willChange:"transform, opacity"},onClick:h=>h.stopPropagation(),children:[r.jsxs("div",{className:"mt-3 flex flex-row justify-between w-full ",children:[r.jsx("div",{children:r.jsx("p",{className:"text-[#000000] font-bold font-nunitoSans",children:t.name})}),r.jsx("div",{children:r.jsx(nt.Icon,{icon:"mdi:close",className:"text-[#555555] w-6 h-6 cursor-pointer",onClick:()=>{s(!1),setTimeout(()=>e(We(null)),jt)}})})]}),r.jsxs("div",{className:"flex flex-row gap-2 items-center flex-wrap",children:[r.jsx("div",{className:"flex flex-row items-center justify-center w-[120px] h-[120px] my-5",children:r.jsx("img",{src:(f=(d=(c=(l=t.imageGroups)==null?void 0:l[0])==null?void 0:c.images)==null?void 0:d[0])==null?void 0:f.link,alt:t.name,className:"rounded-[10px]"})}),r.jsx("div",{className:"flex flex-col items-center gap-2",children:t.imageGroups.slice(1,2).map(h=>h.images.slice(1,2).map(j=>r.jsx("img",{src:j.link,alt:t.name,className:"rounded-[10px] w-[60px] h-[60px]"},j.link)))})]}),r.jsxs("div",{className:"flex flex-row items-center justify-between w-full",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2",children:[r.jsxs("p",{className:"text-[#14121F] font-bold font-nunitoSans",children:[" ","$",t.price.toFixed(2)]})," ",r.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans",children:[" ","$",(t.price+5).toFixed(2)]})]}),r.jsx("div",{children:r.jsx("p",{className:"text-[#EC5050] font-bold font-nunitoSans",children:t.discount})})]}),r.jsx("div",{className:"mt-2 w-full border-t-2 border-gray-200"}),r.jsxs("div",{className:"w-full text-left",children:[r.jsx("div",{className:"text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]",children:"Product Details"}),r.jsx("div",{className:"text-[#68656E] font-normal font-nunitoSans text-xs pl-2 mt-3",dangerouslySetInnerHTML:{__html:t.short_description||t.longDescription}})]}),r.jsxs("div",{className:"mt-4 flex flex-col gap-2 w-full p-2",children:[r.jsx("div",{className:"flex flex-row items-center gap-2",children:r.jsxs("div",{className:"flex items-center gap-2 text-left font-nunitoSans",children:[r.jsxs("div",{className:"text-[#323135] font-bold",children:[((g=t==null?void 0:t.rating)==null?void 0:g.rate)||0," /"," ",r.jsx("span",{className:"text-[#68656E]",children:"5"})]}),r.jsx("div",{className:"text-[#323135] font-semibold text-sm",children:"Overall Rating"}),r.jsxs("div",{className:"text-[#68656E] font-semibold text-sm",children:[((w=t==null?void 0:t.rating)==null?void 0:w.count)||0," ratings"]})]})}),r.jsx("div",{className:"mt-2 flex flex-row items-center gap-2",children:Array.from({length:5}).map((h,j)=>{var T;return r.jsx(nt.Icon,{icon:"mdi:star",width:"20",height:"20",className:`text-yellow-500
7
+ ${((T=t==null?void 0:t.rating)==null?void 0:T.rate)>j?"text-yellow-500":"text-gray-300"}
8
+ `},j)})})]}),r.jsxs("div",{className:"flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",style:{marginTop:"150px"},children:[r.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",style:{backgroundColor:n.tanyaThemeColor},onClick:i,children:"Add to Cart"}),r.jsx("button",{className:"rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",style:{backgroundColor:n.tanyaThemeColor},onClick:a,children:"View more"})]})]})]})},ds=()=>{const e=["Myself","My Child","My Grandchild","Niece/Nephew","My Friends","Others"],t={Myself:"himself/herself","My Child":"his/her child","My Grandchild":"his/her grandchild","Niece/Nephew":"his/her niece/nephew","My Friends":"his/her friends",Others:"others"},n=S.useRef(null),o=S.useRef(null),s=S.useRef(null),i=S.useRef(null),[a,l]=S.useState(null),[c]=Wt.useSearchParams(),[d,f]=S.useState(c.get("shoppingassist")==="true"),[g,w]=S.useState(!1),[h,j]=S.useState(!1),[T,p]=S.useState(!1),[b,O]=S.useState(!1),[E,P]=S.useState(!1),[G,I]=S.useState(""),[$,R]=S.useState(""),W=u=>({id:u.id,title:u.name,image:u.image??"",price:u.price??0}),[D,M]=S.useState([]),fe=S.useRef(null),m=ye.useSelector(u=>u.store.store),je=ye.useSelector(u=>u.product.product),le=()=>{j(!0),setTimeout(()=>w(!0),10)},Ue=()=>{w(!1),setTimeout(()=>j(!1),300)};S.useEffect(()=>{d?le():Ue()},[d]);const Te=u=>{R(t[u])};S.useEffect(()=>{fe.current&&(fe.current.scrollTop+=150)},[D]);let X=null,B=null;const _e=async()=>{if(X&&B&&Date.now()<B)return X;try{const u="https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token",_=new URLSearchParams({grant_type:"client_credentials",client_id:"4i8rd70sgt961tc4dhskgf08c",client_secret:"bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",scope:"default-m2m-resource-server-8xzfzo/read"}),C=await fetch(u,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:_});if(!C.ok)throw new Error(`Token request failed! status: ${C.status}`);const N=await C.json();X=N.access_token;const v=N.expires_in||3600;return B=Date.now()+(v-60)*1e3,X}catch(u){return console.error("Error obtaining JWT token:",u),X=null,B=null,null}},Be=async()=>{const u=await De();u!=null&&l(u)};S.useEffect(()=>{Be(),console.log("scapi environment v1")},[]);const y=async()=>{const u=JSON.parse(sessionStorage.getItem("customerData")||"{}").customerId;return(await en(u||"")).c_interests},ee=async(u,_)=>{console.log("in secondary flow",Ie);const C=await y();if(console.log(C,"interests of customer",Ie),!!C)try{M(V=>V.map((Q,Y)=>Y===V.length-1?{...Q,secondaryLoading:!0}:Q));const N=await _e();if(!N)throw new Error("Failed to fetch token");const v=localStorage.getItem("customerNumber"),k=localStorage.getItem("isLoggedIn"),pe=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(k||!1),userId:String(v||new Date().getTime())}).toString()}`,he=JSON.stringify({flowId:"Q166PR519W",flowAliasId:"HKFUVLWVH2",input:{loyaltyPoints:"",productName:u,productPoints:String(_||0),interests:C}}),H=await fetch(pe,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${N}`},body:he});if(!H.body)throw new Error("Readable stream not supported");const me=H.body.getReader(),ge=new TextDecoder;let z="";for(;;){const{done:V,value:Q}=await me.read();if(V)break;z+=ge.decode(Q,{stream:!0});const Y=z.split(`
9
+ `);z=Y.pop()||"";for(const se of Y)if(se.startsWith("data:")){const x=se.slice(5).trim();try{const J=JSON.parse(x);J.index===0&&M(A=>A.map((U,oe)=>oe===A.length-1?{...U,secondaryResponse:J.data,secondaryLoading:!1}:U))}catch(J){M(A=>A.map((U,oe)=>oe===A.length-1?{...U,secondaryLoading:!1}:U)),console.error("Secondary flow JSON parse error:",J)}}}}catch(N){console.error("Secondary flow error:",N)}},te=async u=>{const _=u||G.trim();if(_){O(!0),I(""),n.current=null,o.current=null,s.current=null,i.current=null,M(C=>[...C,{query:_,response:"Thinking for what suits you best...",potentialQuestions:"",products:[],keywords:"Thinking for best products..."}]);try{const C=$,N=localStorage.getItem("customerNumber"),v=localStorage.getItem("isLoggedIn"),k=await _e();if(!k)throw new Error("Failed to obtain access token");const pe=`https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({registered:String(v||!1),userId:String(N||new Date().getTime())}).toString()}`,he=JSON.stringify({flowId:"MMHQKYI1NE",flowAliasId:"SZF9ZK1ATE",input:{userPrompt:_,whom:C}}),H=await fetch(pe,{signal:AbortSignal.timeout(3e4),method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${k}`},body:he});if(!H.ok)throw new Error(`HTTP error! status: ${H.status}`);if(!H.body)throw new Error("Readable stream not supported");const me=H.body.getReader(),ge=new TextDecoder;let z="",V="";for(;;){P(!0);const{done:Q,value:Y}=await me.read();if(Q)break;z+=ge.decode(Y,{stream:!0});const se=z.split(`
10
+ `);z=se.pop()||"";for(const x of se)if(x.startsWith("data:")){const J=x.slice(5).trim();try{const A=JSON.parse(J);A.index==1&&(V=A.data),M(U=>U.map((oe,Pe)=>Pe===U.length-1?{...oe,[A.index==0?"response":A.index==1?"keywords":A.index==2?"potentialQuestions":"end"]:A.data}:oe))}catch(A){console.error("Error parsing JSON:",A)}}}Ht(ne(V))}catch(C){console.error("Error sending message to Tanya:",C)}finally{O(!1)}}},ne=u=>{const _=u.match(/top five relevant product or category names are: (.*)/i),v=(_?_[1]:u).split(", ").map(q=>q.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi,"").trim());return[...new Set(v)].filter(Boolean).join(",")},Ht=async u=>{if(console.log(a==null?void 0:a.access_token,"access_token"),typeof u=="string"){console.log(u,"keywords");const _=u.split(",");for(const C of _){const N=await st(C,a==null?void 0:a.access_token);if(P(!1),(N==null?void 0:N.length)>0&&(M(v=>v.map((k,q)=>q===v.length-1?{...k,products:[...k.products||[],{keyword:C,items:N,loading:!1}]}:k)),!n.current||o.current==null)){const v=N[0];n.current=String((v==null?void 0:v.product_name)??""),s.current=v.image.link,o.current=v.product_id;const k=typeof(v==null?void 0:v.price)=="number"?v.price:void 0;i.current=typeof k=="number"&&Number.isFinite(k)?k:null}}}else for(const _ of u){const C=await st(_,a==null?void 0:a.access_token);P(!1),(C==null?void 0:C.length)>0&&M(N=>N.map((v,k)=>k===N.length-1?{...v,products:[...v.products||[],{keyword:_,items:C,loading:!1}]}:v))}if(n.current){M(C=>C.map((N,v)=>v===C.length-1?{...N,productSnapshot:{id:o.current,name:n.current,image:s.current,price:i.current??null,points:0,quantity:1}}:N));const _=JSON.parse(sessionStorage.getItem("customerData")||"{}");(_==null?void 0:_.isGuest)==!1?(console.log("running secondary flow",Ie),ee(n.current,0)):console.log("not running secondary flow",Ie)}P(!1)},zt=async(u,_)=>{var C,N,v,k,q,pe,he,H,me,ge,z,V,Q,Y,se;p(!0);try{const x=await Ct(u.id);if(!((N=(C=x==null?void 0:x.variants)==null?void 0:C[0])!=null&&N.product_id||(k=(v=x==null?void 0:x.variants)==null?void 0:v[0])!=null&&k.productId)&&!(x.type.item||x.type.bundle)){p(!1),K.toast.error("Variants not found",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const J=[{product_id:((q=x.variants)==null?void 0:q[0].product_id)||((pe=x.variants)==null?void 0:pe[0].productId)||(x==null?void 0:x.id),quantity:_}];console.log(J,"product data","app version",Ie);const A=JSON.parse(sessionStorage.getItem("customerData")||"{}"),U=A==null?void 0:A.basketId,oe=!1,Pe=localStorage.getItem(Ne),et=Date.now();if(!oe||!Pe||et>=parseInt(Pe)){const Vt=await kt();let{customer_token:ue}=await It(Vt);if(ue="Bearer "+a.access_token,!ue){console.error("Failed to get customer_token");return}const Jt=et+300*1e3;if(Le(ue),localStorage.setItem(Ne,Jt.toString()),U){const tt=await Rt({basketId:U,customer_token:ue});if(tt.status===200&&tt){const qe=await Oe(U,J,ue);((he=qe==null?void 0:qe.product_items)==null?void 0:he.length)>0&&(K.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),we(U),p(!1));return}}const Kt={productItems:[{productId:((H=x.variants)==null?void 0:H[0].product_id)||((me=x.variants)==null?void 0:me[0].productId)||(x==null?void 0:x.id),quantity:1}]},F=await qt(ue,Kt);if(console.log(F,F==null?void 0:F.basket_id,F==null?void 0:F.basketId,"the basket response"),!(F!=null&&F.basket_id||!(F!=null&&F.basketId))){p(!1),console.error("Failed to create basket");return}be((F==null?void 0:F.basket_id)||(F==null?void 0:F.basketId));const xe=await Oe((F==null?void 0:F.basket_id)||(F==null?void 0:F.basketId),J,ue);(((ge=xe==null?void 0:xe.product_items)==null?void 0:ge.length)>0||((z=xe==null?void 0:xe.productItems)==null?void 0:z.length)>0)&&K.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),we(F.basket_id||(F==null?void 0:F.basketId))}}catch(x){p(!1),console.error("Error adding to cart:",x),K.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((V=x==null?void 0:x.response)==null?void 0:V.status)===404||((Q=x==null?void 0:x.response)==null?void 0:Q.status)===401?(((Y=x==null?void 0:x.response)==null?void 0:Y.status)===404&&be(null),((se=x==null?void 0:x.response)==null?void 0:se.status)===401&&(be(null),Le(null))):(console.error("Failed to add product to basket:",x.message),K.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}finally{we()}p(!1)};return r.jsx("div",{className:"relative flex justify-center",children:r.jsxs(Zt,{open:d,onOpenChange:f,children:[r.jsx(Xt,{onClick:()=>f(!0),style:{},className:"flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity",children:r.jsx("div",{className:"flex flex-col p-[5px]",children:r.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsxs("g",{clipPath:"url(#clip0_958_585)",children:[r.jsx("path",{d:"M30.0002 5C31.7683 5 33.464 5.70238 34.7142 6.95262C35.9644 8.20286 36.6668 9.89856 36.6668 11.6667V25C36.6668 26.7681 35.9644 28.4638 34.7142 29.714C33.464 30.9643 31.7683 31.6667 30.0002 31.6667H25.6902L21.1785 36.1783C20.8915 36.4653 20.5097 36.6377 20.1046 36.6631C19.6996 36.6886 19.2992 36.5654 18.9785 36.3167L18.8218 36.1783L14.3085 31.6667H10.0002C8.28976 31.6667 6.64478 31.0093 5.40548 29.8305C4.16617 28.6516 3.42735 27.0416 3.34183 25.3333L3.3335 25V11.6667C3.3335 9.89856 4.03588 8.20286 5.28612 6.95262C6.53636 5.70238 8.23205 5 10.0002 5H30.0002Z",fill:"url(#paint0_linear_958_585)"}),r.jsx("path",{d:"M28.3335 15.6511V11.6667C28.3335 11.6667 22.2774 12.6042 20.1148 15.4167C17.9521 18.2292 18.6644 26.6667 18.6644 26.6667H22.5321C22.5321 26.6667 22.0614 18.9323 23.4989 17.2917C24.9364 15.6511 28.3335 15.6511 28.3335 15.6511Z",fill:"white"}),r.jsx("path",{d:"M13.3335 11.6667H19.6184V15.4167H13.3335V11.6667Z",fill:"white"})]}),r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"paint0_linear_958_585",x1:"20.0002",y1:"5",x2:"35.0002",y2:"30",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"#452697"}),r.jsx("stop",{offset:"1",stopColor:"#7C5BFF"})]}),r.jsx("clipPath",{id:"clip0_958_585",children:r.jsx("rect",{width:"40",height:"40",fill:"white"})})]})]})})}),h&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>f(!1)}),r.jsxs("div",{className:`
70
11
  fixed z-50 h-screen w-[100vw] sm:w-[80vw] md:w-[770px] border-0 bg-white lg:rounded-l-xl overflow-hidden flex flex-col shadow-[0px_4px_10px_0px_#5F499840]
71
12
  top-0 right-0
72
13
  transition-transform duration-300 ease-in-out
73
14
  lg:transform
74
- ${d?"lg:translate-x-0":"lg:translate-x-full"}
15
+ ${g?"lg:translate-x-0":"lg:translate-x-full"}
75
16
  // For mobile: animate from bottom
76
- ${d?"translate-y-0":"translate-y-full"}
17
+ ${g?"translate-y-0":"translate-y-full"}
77
18
  lg:translate-y-0
78
- `,style:{background:"linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"},children:[_.jsxs("div",{className:"flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",children:[_.jsx("div",{style:{display:"flex",color:D.tanyaThemeContrastColor,alignItems:"center",gap:"0.5rem"},children:_.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsxs("div",{className:"flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",style:{background:"linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"},children:[_.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("path",{d:"M15 4.48438V0.5C15 0.5 8.94395 1.4375 6.78127 4.25C4.61859 7.0625 5.33095 15.5 5.33095 15.5H9.19857C9.19857 15.5 8.72793 7.76562 10.1654 6.125C11.6029 4.48438 15 4.48438 15 4.48438Z",fill:"white"}),_.jsx("path",{d:"M0 0.5H6.28488V4.25H0V0.5Z",fill:"white"})]}),_.jsx("p",{className:"text-[#FFFFFF] font-nunitoSans font-semibold",children:"TANYA"})]}),_.jsxs("p",{className:"text-[#5B5B5B] font-nunitoSans font-semibold",style:{fontStyle:"italic"},children:[" ","Your AI shopping assistant !"," "]})]})}),_.jsx("div",{style:{display:"flex",alignItems:"center",gap:"1.25rem",margin:"0.75rem"},children:_.jsx("button",{onClick:()=>l(!1),children:_.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsxs("g",{clipPath:"url(#clip0_501_6036)",children:[_.jsx("path",{d:"M18 6.5L6 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),_.jsx("path",{d:"M6 6.5L18 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_501_6036",children:_.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 0.5)"})})})]})})})]}),_.jsxs("div",{className:"flex h-full md:flex-row lg:flex-row",children:[_.jsxs("div",{className:`flex flex-col h-full ${L?"lg:w-2/3 w-full":"w-full"}`,children:[_.jsxs("div",{ref:R,className:"overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",children:[(D==null?void 0:D.whomRequired)&&_.jsxs("div",{className:"mx-3 p-3 rounded-2xl bg-[#FFFFFF]",children:[_.jsx("div",{className:"flex gap-2 bg-[#FFFFFF]",children:_.jsx("p",{className:"font-bold font-nunitoSans text-[#494949]",children:"Is this for you or someone else?"})}),_.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:e.map(N=>_.jsx("button",{onClick:()=>W(N),className:"px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",style:{backgroundColor:w===t[N]?"#FFFFFF":"#F3F3F3",borderColor:w===t[N]?"#BBB3DD":""},children:N},N))})]}),A.map((N,Q)=>{var X,J;return _.jsxs("div",{children:[_.jsx("div",{className:"flex justify-end",children:_.jsx("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:N.query})}),N.response&&N.response.includes("Thinking")?_.jsx("div",{children:_.jsx("div",{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",dangerouslySetInnerHTML:{__html:Rn(N.response)}})}):_.jsx("div",{children:_.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",dangerouslySetInnerHTML:{__html:Rn(N.response)}})}),g&&!N.response.includes("Thinking")&&((X=N.products)==null?void 0:X.length)==0&&_.jsx("div",{children:_.jsx("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"})}),(N==null?void 0:N.products)&&((J=N==null?void 0:N.products)==null?void 0:J.length)>0&&_.jsx(Yx,{chat:N.products,storeDetails:D}),N.potentialQuestions.length>0&&_.jsxs("div",{className:"my-2 px-4 text-sm text-gray-700",children:[_.jsx("p",{className:"font-nunitoSans font-bold text-sm text-[#494949]",style:{color:D.themeDarkColor},children:"Why not explore these inquiries..."}),N.potentialQuestions.split(",").map((V,q)=>_.jsx("button",{className:`cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${D.themeDarkColor} m-1 rounded-xl px-2 py-1`,onClick:()=>I(V),style:{backgroundColor:D.tanyaThemeColorLight},children:V},q))]}),N.secondaryLoading&&_.jsx("div",{className:"mt-3 mb-4 px-4",children:_.jsxs("div",{className:"tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",style:{margin:"0.75rem"},children:[_.jsxs("div",{className:"flex gap-1",children:[_.jsx("div",{className:"tanya-sparkle tanya-sparkle-1",children:"✨"}),_.jsx("div",{className:"tanya-sparkle tanya-sparkle-2",children:"✨"}),_.jsx("div",{className:"tanya-sparkle tanya-sparkle-3",children:"✨"})]}),_.jsx("div",{className:"tanya-shimmer"}),_.jsx("p",{className:"font-semibold tanya-pulse",style:{color:D.themeDarkColor},children:"I’ve found a special surprise crafted just for you… hang on a sec!"}),_.jsx("p",{className:"tanya-dots mt-1",style:{color:D.themeDarkColor},children:"• • •"})]})}),N.secondaryResponse&&_.jsx(_.Fragment,{children:_.jsxs("div",{className:"mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]",children:[_.jsx("div",{className:"text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",style:{backgroundColor:D.tanyaThemeColorLight},dangerouslySetInnerHTML:{__html:Rn(N.secondaryResponse)}}),N.productSnapshot&&_.jsx("div",{className:"mt-4 w-full",children:_.jsxs("div",{className:"flex gap-4 items-stretch rounded-2xl p-4",style:{backgroundColor:D.tanyaThemeColorLight},children:[_.jsx("div",{className:"flex-shrink-0 rounded-xl overflow-hidden border",style:{width:112,height:112,borderColor:"#eee"},children:N.productSnapshot.image?_.jsx("img",{src:N.productSnapshot.image,alt:N.productSnapshot.name,className:"w-full h-full object-cover"}):_.jsx("div",{className:"w-full h-full flex items-center justify-center text-xs text-gray-500",children:"No Image"})}),_.jsxs("div",{className:"flex flex-col flex-1 justify-between",children:[_.jsxs("div",{children:[_.jsx("p",{className:"font-semibold text-[15px] leading-snug",children:N.productSnapshot.name}),_.jsx("p",{className:"mt-1 text-[14px] font-medium",children:N.productSnapshot.price!=null?new Intl.NumberFormat(void 0,{style:"currency",currency:(D==null?void 0:D.currency)||"USD"}).format(N.productSnapshot.price):""}),N.productSnapshot.points>0&&_.jsxs("p",{className:"mt-1 text-xs opacity-80",children:["You will earn"," ",_.jsxs("strong",{children:[N.productSnapshot.points," ","points"]})]})]}),_.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[_.jsxs("div",{className:"flex items-center border rounded-full overflow-hidden",children:[_.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>B(V=>V.map((q,se)=>se===Q&&q.productSnapshot?{...q,productSnapshot:{...q.productSnapshot,quantity:Math.max(1,q.productSnapshot.quantity-1)}}:q)),style:{background:"transparent",color:D.themeDarkColor},children:"−"}),_.jsx("div",{className:"px-3 py-1 text-sm select-none",children:N.productSnapshot.quantity}),_.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>B(V=>V.map((q,se)=>se===Q&&q.productSnapshot?{...q,productSnapshot:{...q.productSnapshot,quantity:q.productSnapshot.quantity+1}}:q)),style:{background:"transparent",color:D.themeDarkColor},children:"+"})]}),_.jsx("button",{onClick:()=>{le(O(N.productSnapshot),N.productSnapshot.quantity)},disabled:m,className:"px-4 py-2 rounded-full font-medium",style:{background:D.tanyaThemeColor,color:(D==null?void 0:D.tanyaThemeContrastColor)||"#fff",opacity:m?.8:1},children:m?"Adding...":"Add to cart"})]})]})]})})]})}),_.jsx("div",{className:"mb-20"})]},Q)})]}),_.jsx("div",{className:"flex flex-col gap-2 sticky bottom-0 left-0 right-0 bg-[#E3DEEF] z-50 px-4 py-2",children:_.jsx("div",{className:"p-[1px] rounded-xl",style:{background:"linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"},children:_.jsxs("div",{className:"flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1",children:[_.jsx("input",{className:"flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",placeholder:"How can I help you...",value:C,autoFocus:!0,onChange:N=>E(N.target.value),onKeyDown:N=>{N.key==="Enter"&&!b&&I()}}),_.jsx("button",{type:"submit",disabled:b,className:"p-3",onClick:()=>I(),children:b?_.jsx("div",{className:"p-3 animate-spin rounded-full h-3 w-3 border-b-2",style:{borderBottom:"2px solid",color:D.tanyaThemeColor}}):_.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M16.6357 13.6701L18.3521 8.5208C19.8516 4.02242 20.6013 1.77322 19.414 0.585948C18.2268 -0.601312 15.9776 0.148418 11.4792 1.64788L6.32987 3.36432C2.69923 4.57453 0.883923 5.17964 0.368062 6.06698C-0.122688 6.91112 -0.122688 7.95369 0.368062 8.7978C0.883923 9.6852 2.69923 10.2903 6.32987 11.5005C6.77981 11.6505 7.28601 11.5434 7.62294 11.2096L13.1286 5.75495C13.4383 5.44808 13.9382 5.45041 14.245 5.76015C14.5519 6.06989 14.5496 6.56975 14.2398 6.87662L8.8231 12.2432C8.4518 12.6111 8.3342 13.1742 8.4995 13.6701C9.7097 17.3007 10.3148 19.1161 11.2022 19.6319C12.0463 20.1227 13.0889 20.1227 13.933 19.6319C14.8204 19.1161 15.4255 17.3008 16.6357 13.6701Z",fill:"#6952C7"})})})]})})})]}),_.jsx(up,{})]})]})]})]})})};exports.TanyaChatbot=dp;
19
+ `,style:{background:"linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"},children:[r.jsxs("div",{className:"flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",children:[r.jsx("div",{style:{display:"flex",color:m.tanyaThemeContrastColor,alignItems:"center",gap:"0.5rem"},children:r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsxs("div",{className:"flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",style:{background:"linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"},children:[r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M15 4.48438V0.5C15 0.5 8.94395 1.4375 6.78127 4.25C4.61859 7.0625 5.33095 15.5 5.33095 15.5H9.19857C9.19857 15.5 8.72793 7.76562 10.1654 6.125C11.6029 4.48438 15 4.48438 15 4.48438Z",fill:"white"}),r.jsx("path",{d:"M0 0.5H6.28488V4.25H0V0.5Z",fill:"white"})]}),r.jsx("p",{className:"text-[#FFFFFF] font-nunitoSans font-semibold",children:"TANYA"})]}),r.jsxs("p",{className:"text-[#5B5B5B] font-nunitoSans font-semibold",style:{fontStyle:"italic"},children:[" ","Your AI shopping assistant !"," "]})]})}),r.jsx("div",{style:{display:"flex",alignItems:"center",gap:"1.25rem",margin:"0.75rem"},children:r.jsx("button",{onClick:()=>f(!1),children:r.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsxs("g",{clipPath:"url(#clip0_501_6036)",children:[r.jsx("path",{d:"M18 6.5L6 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M6 6.5L18 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_501_6036",children:r.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 0.5)"})})})]})})})]}),r.jsxs("div",{className:"flex h-full md:flex-row lg:flex-row",children:[r.jsxs("div",{className:`flex flex-col h-full ${je?"lg:w-2/3 w-full":"w-full"}`,children:[r.jsxs("div",{ref:fe,className:"overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",children:[(m==null?void 0:m.whomRequired)&&r.jsxs("div",{className:"mx-3 p-3 rounded-2xl bg-[#FFFFFF]",children:[r.jsx("div",{className:"flex gap-2 bg-[#FFFFFF]",children:r.jsx("p",{className:"font-bold font-nunitoSans text-[#494949]",children:"Is this for you or someone else?"})}),r.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:e.map(u=>r.jsx("button",{onClick:()=>Te(u),className:"px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",style:{backgroundColor:$===t[u]?"#FFFFFF":"#F3F3F3",borderColor:$===t[u]?"#BBB3DD":""},children:u},u))})]}),D.map((u,_)=>{var C,N;return r.jsxs("div",{children:[r.jsx("div",{className:"flex justify-end",children:r.jsx("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})}),u.response&&u.response.includes("Thinking")?r.jsx("div",{children:r.jsx("div",{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",dangerouslySetInnerHTML:{__html:Re(u.response)}})}):r.jsx("div",{children:r.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",dangerouslySetInnerHTML:{__html:Re(u.response)}})}),E&&!u.response.includes("Thinking")&&((C=u.products)==null?void 0:C.length)==0&&r.jsx("div",{children:r.jsx("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"})}),(u==null?void 0:u.products)&&((N=u==null?void 0:u.products)==null?void 0:N.length)>0&&r.jsx(cs,{chat:u.products,storeDetails:m}),u.potentialQuestions.length>0&&r.jsxs("div",{className:"my-2 px-4 text-sm text-gray-700",children:[r.jsx("p",{className:"font-nunitoSans font-bold text-sm text-[#494949]",style:{color:m.themeDarkColor},children:"Why not explore these inquiries..."}),u.potentialQuestions.split(",").map((v,k)=>r.jsx("button",{className:`cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${m.themeDarkColor} m-1 rounded-xl px-2 py-1`,onClick:()=>te(v),style:{backgroundColor:m.tanyaThemeColorLight},children:v},k))]}),u.secondaryLoading&&r.jsx("div",{className:"mt-3 mb-4 px-4",children:r.jsxs("div",{className:"tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",style:{margin:"0.75rem"},children:[r.jsxs("div",{className:"flex gap-1",children:[r.jsx("div",{className:"tanya-sparkle tanya-sparkle-1",children:"✨"}),r.jsx("div",{className:"tanya-sparkle tanya-sparkle-2",children:"✨"}),r.jsx("div",{className:"tanya-sparkle tanya-sparkle-3",children:"✨"})]}),r.jsx("div",{className:"tanya-shimmer"}),r.jsx("p",{className:"font-semibold tanya-pulse",style:{color:m.themeDarkColor},children:"I’ve found a special surprise crafted just for you… hang on a sec!"}),r.jsx("p",{className:"tanya-dots mt-1",style:{color:m.themeDarkColor},children:"• • •"})]})}),u.secondaryResponse&&r.jsx(r.Fragment,{children:r.jsxs("div",{className:"mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]",children:[r.jsx("div",{className:"text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",style:{backgroundColor:m.tanyaThemeColorLight},dangerouslySetInnerHTML:{__html:Re(u.secondaryResponse)}}),u.productSnapshot&&r.jsx("div",{className:"mt-4 w-full",children:r.jsxs("div",{className:"flex gap-4 items-stretch rounded-2xl p-4",style:{backgroundColor:m.tanyaThemeColorLight},children:[r.jsx("div",{className:"flex-shrink-0 rounded-xl overflow-hidden border",style:{width:112,height:112,borderColor:"#eee"},children:u.productSnapshot.image?r.jsx("img",{src:u.productSnapshot.image,alt:u.productSnapshot.name,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center text-xs text-gray-500",children:"No Image"})}),r.jsxs("div",{className:"flex flex-col flex-1 justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-[15px] leading-snug",children:u.productSnapshot.name}),r.jsx("p",{className:"mt-1 text-[14px] font-medium",children:u.productSnapshot.price!=null?new Intl.NumberFormat(void 0,{style:"currency",currency:(m==null?void 0:m.currency)||"USD"}).format(u.productSnapshot.price):""}),u.productSnapshot.points>0&&r.jsxs("p",{className:"mt-1 text-xs opacity-80",children:["You will earn"," ",r.jsxs("strong",{children:[u.productSnapshot.points," ","points"]})]})]}),r.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[r.jsxs("div",{className:"flex items-center border rounded-full overflow-hidden",children:[r.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>M(v=>v.map((k,q)=>q===_&&k.productSnapshot?{...k,productSnapshot:{...k.productSnapshot,quantity:Math.max(1,k.productSnapshot.quantity-1)}}:k)),style:{background:"transparent",color:m.themeDarkColor},children:"−"}),r.jsx("div",{className:"px-3 py-1 text-sm select-none",children:u.productSnapshot.quantity}),r.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>M(v=>v.map((k,q)=>q===_&&k.productSnapshot?{...k,productSnapshot:{...k.productSnapshot,quantity:k.productSnapshot.quantity+1}}:k)),style:{background:"transparent",color:m.themeDarkColor},children:"+"})]}),r.jsx("button",{onClick:()=>{zt(W(u.productSnapshot),u.productSnapshot.quantity)},disabled:T,className:"px-4 py-2 rounded-full font-medium",style:{background:m.tanyaThemeColor,color:(m==null?void 0:m.tanyaThemeContrastColor)||"#fff",opacity:T?.8:1},children:T?"Adding...":"Add to cart"})]})]})]})})]})}),r.jsx("div",{className:"mb-20"})]},_)})]}),r.jsx("div",{className:"flex flex-col gap-2 sticky bottom-0 left-0 right-0 bg-[#E3DEEF] z-50 px-4 py-2",children:r.jsx("div",{className:"p-[1px] rounded-xl",style:{background:"linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"},children:r.jsxs("div",{className:"flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1",children:[r.jsx("input",{className:"flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",placeholder:"How can I help you...",value:G,autoFocus:!0,onChange:u=>I(u.target.value),onKeyDown:u=>{u.key==="Enter"&&!b&&te()}}),r.jsx("button",{type:"submit",disabled:b,className:"p-3",onClick:()=>te(),children:b?r.jsx("div",{className:"p-3 animate-spin rounded-full h-3 w-3 border-b-2",style:{borderBottom:"2px solid",color:m.tanyaThemeColor}}):r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.6357 13.6701L18.3521 8.5208C19.8516 4.02242 20.6013 1.77322 19.414 0.585948C18.2268 -0.601312 15.9776 0.148418 11.4792 1.64788L6.32987 3.36432C2.69923 4.57453 0.883923 5.17964 0.368062 6.06698C-0.122688 6.91112 -0.122688 7.95369 0.368062 8.7978C0.883923 9.6852 2.69923 10.2903 6.32987 11.5005C6.77981 11.6505 7.28601 11.5434 7.62294 11.2096L13.1286 5.75495C13.4383 5.44808 13.9382 5.45041 14.245 5.76015C14.5519 6.06989 14.5496 6.56975 14.2398 6.87662L8.8231 12.2432C8.4518 12.6111 8.3342 13.1742 8.4995 13.6701C9.7097 17.3007 10.3148 19.1161 11.2022 19.6319C12.0463 20.1227 13.0889 20.1227 13.933 19.6319C14.8204 19.1161 15.4255 17.3008 16.6357 13.6701Z",fill:"#6952C7"})})})]})})})]}),r.jsx(us,{})]})]})]})]})})};exports.TanyaChatbot=ds;
79
20
  //# sourceMappingURL=tanya-chatbot.cjs.js.map