PageSourceSearch

https://arvoredobrasil.com.br/assets/index-970JJNzy.js

js arvoredobrasil.com.br collected 2026-10-02 23:28:44 UTC 160,219 bytes, 10 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-Cwrlvm2P.js","assets/vendor-libs-ueW8_MKk.js","assets/vendor-ui-C7TaAcqc.js","assets/button-CmqsQZxm.js","assets/PlantCard-BkFLJ3-h.js","assets/vendor-react-DHTSZICr.js","assets/seo-config-DfnsUVCM.js","assets/HeroCarousel-CaLgub_C.js","assets/vendor-heavy-Crj8Emav.js","assets/Editor-DfsY2D3L.js","assets/Editor-CP00zwgT.css","assets/Loja-BxBnSDV6.js","assets/Produto-DXQLcd4K.js","assets/Sobre-BD2x07bV.js","assets/Admin-g4OaSt_6.js"])))=>i.map(i=>d[i]);
2var no=Object.defineProperty;var ro=(t,e,n)=>e in t?no(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ue=(t,e,n)=>ro(t,typeof e!="symbol"?e+"":e,n);import{j as w,Q as so,u as oo,a as io}from"./vendor-libs-ueW8_MKk.js";import{g as Tt,a as y,R as Ur,b as Br,t as ao,X as co,d as fe}from"./vendor-ui-C7TaAcqc.js";import{r as uo,a as vn,u as lo,B as fo,R as ho,b as de}from"./vendor-react-DHTSZICr.js";import{_ as ke}from"./vendor-heavy-Crj8Emav.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var rt={},jn;function po(){if(jn)return rt;jn=1;var t=uo();return rt.createRoot=t.createRoot,rt.hydrateRoot=t.hydrateRoot,rt}var mo=po();const yo=Tt(mo),go=20,wo=5e3,le={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Dt=0;function bo(){return Dt=(Dt+1)%Number.MAX_VALUE,Dt.toString()}const It=new Map,$n=t=>{if(It.has(t))return;const e=setTimeout(()=>{It.delete(t),Ke({type:le.REMOVE_TOAST,toastId:t})},wo);It.set(t,e)},vo=(t,e)=>{switch(e.type){case le.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,go)};case le.UPDATE_TOAST:return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case le.DISMISS_TOAST:{const{toastId:n}=e;return n?$n(n):t.toasts.forEach(r=>{$n(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case le.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},dt=[];let ft={toasts:[]};function Ke(t){ft=vo(ft,t),dt.forEach(e=>{e(ft)})}function Eo({...t}){const e=bo(),n=s=>Ke({type:le.UPDATE_TOAST,toast:{...s,id:e}}),r=()=>Ke({type:le.DISMISS_TOAST,toastId:e});return Ke({type:le.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function _o(){const[t,e]=y.useState(ft);return y.useEffect(()=>(dt.push(e),()=>{const n=dt.indexOf(e);n>-1&&dt.splice(n,1)}),[t]),{...t,toast:Eo,dismiss:n=>Ke({type:le.DISMISS_TOAST,toastId:n})}}function J(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Fn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function To(...t){return e=>{let n=!1;const r=t.map(s=>{const o=Fn(s,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Fn(t[s],null)}}}}function _e(...t){return y.useCallback(To(...t),t)}function jr(t,e=[]){let n=[];function r(o,i){const a=y.createContext(i);a.displayName=o+"Context";const u=n.length;n=[...n,i];const c=m=>{var h;const{scope:g,children:E,..._}=m,p=((h=g==null?void 0:g[t])==null?void 0:h[u])||a,f=y.useMemo(()=>_,Object.values(_));return w.jsx(p.Provider,{value:f,children:E})};c.displayName=o+"Provider";function l(m,g){var p;const E=((p=g==null?void 0:g[t])==null?void 0:p[u])||a,_=y.useContext(E);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[c,l]}const s=()=>{const o=n.map(i=>y.createContext(i));return function(a){const u=(a==null?void 0:a[t])||o;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:u}}),[a,u])}};return s.scopeName=t,[r,So(s,...e)]}function So(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:u,scopeName:c}
2)=>{const m=u(o)[`__scope${c}`];return{...a,...m}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}function Et(t){const e=y.forwardRef((n,r)=>{let{children:s,...o}=n,i=null,a=!1;const u=[];Mn(s)&&typeof st=="function"&&(s=st(s._payload)),y.Children.forEach(s,g=>{var E;if(Oo(g)){a=!0;const _=g;let p="child"in _.props?_.props.child:_.props.children;Mn(p)&&typeof st=="function"&&(p=st(p._payload)),i=Ao(_,p),u.push((E=i==null?void 0:i.props)==null?void 0:E.children)}else u.push(g)}),i?i=y.cloneElement(i,void 0,u):!a&&y.Children.count(s)===1&&y.isValidElement(s)&&(i=s);const c=i?Co(i):void 0,l=_e(r,c);if(!i){if(s||s===0)throw new Error(a?ko(t):Lo(t));return s}const m=xo(o,i.props??{});return i.type!==y.Fragment&&(m.ref=r?l:c),y.cloneElement(i,m)});return e.displayName=`${t}.Slot`,e}var Xl=Et("Slot"),Ro=Symbol.for("radix.slottable"),Ao=(t,e)=>{if("child"in t.props){const n=t.props.child;return y.isValidElement(n)?y.cloneElement(n,void 0,t.props.children(n.props.children)):null}return y.isValidElement(e)?e:null};function xo(t,e){const n={...e};for(const r in e){const s=t[r],o=e[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const u=o(...a);return s(...a),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...t,...n}}function Co(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Oo(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Ro}var Po=Symbol.for("react.lazy");function Mn(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Po&&"_payload"in t&&No(t._payload)}function No(t){return typeof t=="object"&&t!==null&&"then"in t}var Lo=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ko=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,st=Ur[" use ".trim().toString()];function Do(t){const e=t+"CollectionProvider",[n,r]=jr(e),[s,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:f,children:h}=p,b=y.useRef(null),v=y.useRef(new Map).current;return w.jsx(s,{scope:f,itemMap:v,collectionRef:b,children:h})};i.displayName=e;const a=t+"CollectionSlot",u=Et(a),c=y.forwardRef((p,f)=>{const{scope:h,children:b}=p,v=o(a,h),T=_e(f,v.collectionRef);return w.jsx(u,{ref:T,children:b})});c.displayName=a;const l=t+"CollectionItemSlot",m="data-radix-collection-item",g=Et(l),E=y.forwardRef((p,f)=>{const{scope:h,children:b,...v}=p,T=y.useRef(null),R=_e(f,T),C=o(l,h);return y.useEffect(()=>(C.itemMap.set(T,{ref:T,...v}),()=>void C.itemMap.delete(T))),w.jsx(g,{[m]:"",ref:R,children:b})});E.displayName=l;function _(p){const f=o(t+"CollectionConsumer",p);return y.useCallback(()=>{const b=f.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${m}]`));return Array.from(f.itemMap.values()).sort((C,x)=>v.indexOf(C.ref.current)-v.indexOf(x.ref.current))},[f.collectionRef,f.itemMap])}return[{Provider:i,Slot:c,ItemSlot:E},_,r]}var Io=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=Io.reduce((t,e)=>{const n=Et(`Primitive.${e}`),r=y.forwardRef((s,o)=>{const{asChild:i,...a}=s,u=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(u,{...a,ref:o})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function $r(t,e){t&&vn.flushSync(()=>t.dispatchEvent(e))}function Te(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}function Uo(t,e=globalThis==null?void 0:globalThis.document){const n=Te(t);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var Bo="DismissableLayer",en="dismissableLayer.update",jo="dismissableLayer.pointerDownOutside",$o="dism
2issableLayer.focusOutside",qn,Fr=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mr=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...u}=t,c=y.useContext(Fr),[l,m]=y.useState(null),g=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=y.useState({}),_=_e(e,x=>m(x)),p=Array.from(c.layers),[f]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),h=p.indexOf(f),b=l?p.indexOf(l):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,T=b>=h,R=Mo(x=>{const D=x.target,j=[...c.branches].some(B=>B.contains(D));!T||j||(s==null||s(x),i==null||i(x),x.defaultPrevented||a==null||a())},g),C=qo(x=>{const D=x.target;[...c.branches].some(B=>B.contains(D))||(o==null||o(x),i==null||i(x),x.defaultPrevented||a==null||a())},g);return Uo(x=>{b===c.layers.size-1&&(r==null||r(x),!x.defaultPrevented&&a&&(x.preventDefault(),a()))},g),y.useEffect(()=>{if(l)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(qn=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(l)),c.layers.add(l),Hn(),()=>{n&&(c.layersWithOutsidePointerEventsDisabled.delete(l),c.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=qn))}},[l,g,n,c]),y.useEffect(()=>()=>{l&&(c.layers.delete(l),c.layersWithOutsidePointerEventsDisabled.delete(l),Hn())},[l,c]),y.useEffect(()=>{const x=()=>E({});return document.addEventListener(en,x),()=>document.removeEventListener(en,x)},[]),w.jsx(ie.div,{...u,ref:_,style:{pointerEvents:v?T?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,C.onFocusCapture),onBlurCapture:J(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,R.onPointerDownCapture)})});Mr.displayName=Bo;var Fo="DismissableLayerBranch",qr=y.forwardRef((t,e)=>{const n=y.useContext(Fr),r=y.useRef(null),s=_e(e,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),w.jsx(ie.div,{...t,ref:s})});qr.displayName=Fo;function Mo(t,e=globalThis==null?void 0:globalThis.document){const n=Te(t),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Hr(jo,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=u,e.addEventListener("click",s.current,{once:!0})):u()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function qo(t,e=globalThis==null?void 0:globalThis.document){const n=Te(t),r=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!r.current&&Hr($o,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hn(){const t=new CustomEvent(en);document.dispatchEvent(t)}function Hr(t,e,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?$r(s,o):s.dispatchEvent(o)}var Ho=Mr,Vo=qr,Ye=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},zo="Portal",Vr=y.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,o]=y.useState(!1);Ye(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?vn.createPortal(w.jsx(ie.div,{...r,ref:e}),i):null});Vr.displayName=zo;function Wo(t,e){return y.useReducer((n,r)=>e[n][r]??n,t)}var zr=t=>{const{present:e,children:n}=t,r=Ko(e),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Jo(r.ref,Yo(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:o}):null};zr.displayName="Presence";function Ko(t){const[e,n]=y.useState(),r=y.useRef(null),s=y.useRef(t),o=y.useRef("none"),i=t?"mounted":"unmounted",[a,u]=Wo(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=ot(r.current);o.current=a==="mounted"?c:"none"},[a]),Ye(()=>{const c=r.current,l=s.current;if(l!==t){const g=o.current,E=ot(c);t?u("MOUNT"):E==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(l&&g!==E?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,u]),Ye(()=>{if(e){let c;const l=e.ownerDocument.defaultView??window,m=E=>{const p=ot(r.current).includes(CSS.escape(E.animationName));if(E.target===e&&p&&(u("ANIMATION_END"),!s.current)){const f=e.style.animationFillMode;e.style.animationFillMode="forwards",c=l.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=f)})}},g=E=>{E.target===e&&(o.current=ot(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{l.clearTimeout(c),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Vn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Jo(...t){const e=y.useRef(t);return e.current=t,y.useCallback(n=>{const r=e.current;let s=!1;const o=r.map(i=>{const a=Vn(i,n);return!s&&typeof a=="function"&&(s=!0),a});if(s)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():Vn(r[i],null)}}},[])}function ot(t){return(t==null?void 0:t.animationName)||"none"}function Yo(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
2isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Xo=Ur[" useInsertionEffect ".trim().toString()]||Ye;function Qo({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,o,i]=Go({defaultProp:e,onChange:n}),a=t!==void 0,u=a?t:s;{const l=y.useRef(t!==void 0);y.useEffect(()=>{const m=l.current;if(m!==a){const g=m?"controlled":"uncontrolled",E=a?"controlled":"uncontrolled"}l.current=a},[a,r])}const c=y.useCallback(l=>{var m;if(a){const g=Zo(l)?l(t):l;g!==t&&((m=i.current)==null||m.call(i,g))}else o(l)},[a,t,o,i]);return[u,c]}function Go({defaultProp:t,onChange:e}){const[n,r]=y.useState(t),s=y.useRef(n),o=y.useRef(e);return Xo(()=>{o.current=e},[e]),y.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function Zo(t){return typeof t=="function"}var ei=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ti="VisuallyHidden",En=y.forwardRef((t,e)=>w.jsx(ie.span,{...t,ref:e,style:{...ei,...t.style}}));En.displayName=ti;var Wr="ToastProvider",[_n,ni,ri]=Do("Toast"),[Kr]=jr("Toast",[ri]),[si,St]=Kr(Wr),Jr=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,announcerContainer:i,children:a}=t,[u,c]=y.useState(null),[l,m]=y.useState(0),g=y.useRef(!1),E=y.useRef(!1);return n.trim(),w.jsx(_n.Provider,{scope:e,children:w.jsx(si,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:l,viewport:u,onViewportChange:c,onToastAdd:y.useCallback(()=>m(_=>_+1),[]),onToastRemove:y.useCallback(()=>m(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:E,announcerContainer:i,children:a})})};Jr.displayName=Wr;var Yr="ToastViewport",oi=["F8"],tn="toast.viewportPause",nn="toast.viewportResume",Xr=y.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=oi,label:s="Notifications ({hotkey})",...o}=t,i=St(Yr,n),a=ni(n),u=y.useRef(null),c=y.useRef(null),l=y.useRef(null),m=y.useRef(null),g=_e(e,m,i.onViewportChange),E=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=i.toastCount>0;y.useEffect(()=>{const f=h=>{var v;r.length!==0&&r.every(T=>h[T]||h.code===T)&&((v=m.current)==null||v.focus())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[r]),y.useEffect(()=>{const f=u.current,h=m.current;if(_&&f&&h){const b=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(tn);h.dispatchEvent(C),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(nn);h.dispatchEvent(C),i.isClosePausedRef.current=!1}},T=C=>{!f.contains(C.relatedTarget)&&v()},R=()=>{f.contains(document.activeElement)||v()};return f.addEventListener("focusin",b),f.addEventListener("focusout",T),f.addEventListener("pointermove",b),f.addEventListener("pointerleave",R),window.addEventListener("blur",b),window.addEventListener("focus",v),()=>{f.removeEventListener("focusin",b),f.removeEventListener("focusout",T),f.removeEventListener("pointermove",b),f.removeEventListener("pointerleave",R),window.removeEventListener("blur",b),window.removeEventListener("focus",v)}}},[_,i.isClosePausedRef]);const p=y.useCallback(({tabbingDirection:f})=>{const b=a().map(v=>{const T=v.ref.current,R=[T,...bi(T)];return f==="forwards"?R:R.reverse()});return(f==="forwards"?b.reverse():b).flat()},[a]);return y.useEffect(()=>{const f=m.current;if(f){const h=b=>{var R,C,x;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const D=document.activeElement,j=b.shiftKey;if(b.target===f&&j){(R=c.current)==null||R.focus();return}const $=p({tabbingDirection:j?"backwards":"forwards"}),pe=$.findIndex(A=>A===D);Ut($.slice(pe+1))?b.preventDefault():j?(C=c.current)==null||C.focus():(x=l.current)==null||x.focus()}};return f.addEventListener("keydown",h),()=>f.removeEventListener("keydown",h)}},[a,p]),w.jsxs(Vo,{ref:u,role:"region","aria-label":s.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(rn,{ref:c,onFocusFromOutsideViewport:()=>{const f=p({tabbingDirection:"forwards"});Ut(f)}}),w.jsx(_n.Slot,{scope:n,children:w.jsx(ie.ol,{tabIndex:-1,...o,ref:g})}),_&&w.jsx(rn,{ref:l,onFocusFromOutsideViewport:()=>{const f=p({tabbingDirection:"backwards"});Ut(f)}})]})});Xr.displayName=Yr;var Qr="ToastFocusProxy",rn=y.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,o=St(Qr,n);return w.jsx(En,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&r()}})});rn.displayName=Qr;var Qe="Toast",ii="toast.swipeStart",ai="toast.swipeMove",ci="toast.swipeCancel",ui="toast.swipeEnd",Gr=y.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=t,[a,u]=Qo({prop:r,defaultProp:s??!0,onChange:o,caller:Qe});return w.jsx(zr,{present:n||a,children:w.jsx(fi,{open:a,...i,ref:e,onClose:()=>u(!1),onPause:Te(t.onPause),onResume:Te(t.onResume),onSwipeStart:J(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:J(t.onSwipeMove,c=>{const{x:l,y:m}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${l}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:J(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:J(t.onSwipeEnd,c=>{const{x:l,y:m}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${l}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),u(!1)})})})});
2Gr.displayName=Qe;var[li,di]=Kr(Qe,{onClose(){}}),fi=y.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:u,onResume:c,onSwipeStart:l,onSwipeMove:m,onSwipeCancel:g,onSwipeEnd:E,..._}=t,p=St(Qe,n),[f,h]=y.useState(null),b=_e(e,A=>h(A)),v=y.useRef(null),T=y.useRef(null),R=s||p.duration,C=y.useRef(0),x=y.useRef(R),D=y.useRef(0),{onToastAdd:j,onToastRemove:B}=p,P=Te(()=>{var q;(f==null?void 0:f.contains(document.activeElement))&&((q=p.viewport)==null||q.focus()),i()}),$=y.useCallback(A=>{!A||A===1/0||(window.clearTimeout(D.current),C.current=new Date().getTime(),D.current=window.setTimeout(P,A))},[P]);y.useEffect(()=>{const A=p.viewport;if(A){const q=()=>{$(x.current),c==null||c()},V=()=>{const me=new Date().getTime()-C.current;x.current=x.current-me,window.clearTimeout(D.current),u==null||u()};return A.addEventListener(tn,V),A.addEventListener(nn,q),()=>{A.removeEventListener(tn,V),A.removeEventListener(nn,q)}}},[p.viewport,R,u,c,$]),y.useEffect(()=>{o&&!p.isClosePausedRef.current&&$(R)},[o,R,p.isClosePausedRef,$]),y.useEffect(()=>(j(),()=>B()),[j,B]);const pe=y.useMemo(()=>f?ss(f):null,[f]);return p.viewport?w.jsxs(w.Fragment,{children:[pe&&w.jsx(hi,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:pe}),w.jsx(li,{scope:n,onClose:P,children:vn.createPortal(w.jsx(_n.ItemSlot,{scope:n,children:w.jsx(Ho,{asChild:!0,onEscapeKeyDown:J(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||P(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ie.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:J(t.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,P()))}),onPointerDown:J(t.onPointerDown,A=>{A.button===0&&(v.current={x:A.clientX,y:A.clientY})}),onPointerMove:J(t.onPointerMove,A=>{if(!v.current)return;const q=A.clientX-v.current.x,V=A.clientY-v.current.y,me=!!T.current,ye=["left","right"].includes(p.swipeDirection),ge=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,te=ye?ge(0,q):0,z=ye?0:ge(0,V),Q=A.pointerType==="touch"?10:2,we={x:te,y:z},L={originalEvent:A,delta:we};me?(T.current=we,it(ai,m,L,{discrete:!1})):zn(we,p.swipeDirection,Q)?(T.current=we,it(ii,l,L,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(q)>Q||Math.abs(V)>Q)&&(v.current=null)}),onPointerUp:J(t.onPointerUp,A=>{const q=T.current,V=A.target;if(V.hasPointerCapture(A.pointerId)&&V.releasePointerCapture(A.pointerId),T.current=null,v.current=null,q){const me=A.currentTarget,ye={originalEvent:A,delta:q};zn(q,p.swipeDirection,p.swipeThreshold)?it(ui,E,ye,{discrete:!0}):it(ci,g,ye,{discrete:!0}),me.addEventListener("click",ge=>ge.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),hi=t=>{const{__scopeToast:e,children:n,...r}=t,s=St(Qe,e),[o,i]=y.useState(!1),[a,u]=y.useState(!1);return gi(()=>i(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(Vr,{asChild:!0,container:s.announcerContainer||void 0,children:w.jsx(En,{...r,children:o&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},pi="ToastTitle",Zr=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(ie.div,{...r,ref:e})});Zr.displayName=pi;var mi="ToastDescription",es=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(ie.div,{...r,ref:e})});es.displayName=mi;var yi="ToastAction",ts=y.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(rs,{altText:n,asChild:!0,children:w.jsx(Tn,{...r,ref:e})}):null});ts.displayName=yi;var ns="ToastClose",Tn=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=di(ns,n);return w.jsx(rs,{asChild:!0,children:w.jsx(ie.button,{type:"button",...r,ref:e,onClick:J(t.onClick,s.onClose)})})});Tn.displayName=ns;var rs=y.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return w.jsx(ie.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function ss(t){const e=[];
2return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),wi(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&e.push(i)}else e.push(...ss(r))}}),e}function it(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?$r(s,o):s.dispatchEvent(o)}var zn=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),o=r>s;return e==="left"||e==="right"?o&&r>n:!o&&s>n};function gi(t=()=>{}){const e=Te(t);Ye(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function wi(t){return t.nodeType===t.ELEMENT_NODE}function bi(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Ut(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var vi=Jr,Ei=Xr,_i=Gr,Ti=Zr,Si=es,Ri=ts,Ai=Tn;const Wn=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Kn=Br,xi=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Kn(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=e,i=Object.keys(s).map(c=>{const l=n==null?void 0:n[c],m=o==null?void 0:o[c];if(l===null)return null;const g=Wn(l)||Wn(m);return s[c][g]}),a=n&&Object.entries(n).reduce((c,l)=>{let[m,g]=l;return g===void 0||(c[m]=g),c},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:m,className:g,...E}=l;return Object.entries(E).every(_=>{let[p,f]=_;return Array.isArray(f)?f.includes({...o,...a}[p]):{...o,...a}[p]===f})?[...c,m,g]:c},[]);return Kn(t,i,u,n==null?void 0:n.class,n==null?void 0:n.className)};function De(...t){return ao(Br(t))}const Ci=vi,os=y.forwardRef(({className:t,...e},n)=>w.jsx(Ei,{ref:n,className:De("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));os.displayName="ToastViewport";const Oi=xi("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),is=y.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(_i,{ref:r,className:De(Oi({variant:e}),t),...n}));is.displayName="Toast";const Pi=y.forwardRef(({className:t,...e},n)=>w.jsx(Ri,{ref:n,className:De("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));Pi.displayName="ToastAction";const as=y.forwardRef(({className:t,...e},n)=>w.jsx(Ai,{ref:n,className:De("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:w.jsx(co,{className:"h-4 w-4"})}));as.displayName="ToastClose";const cs=y.forwardRef(({className:t,...e},n)=>w.jsx(Ti,{ref:n,className:De("text-sm font-semibold",t),...e}));cs.displayName="ToastTitle";const us=y.forwardRef(({className:t,...e},n)=>w.jsx(Si,{ref:n,className:De("text-sm opacity-90",t),...e}));us.displayName="ToastDescription";function Ni(){const{toasts:t}=_o();return w.jsxs(Ci,{children:[t.map(function({id:e,title:n,description:r,action:s,...o}){return w.jsxs(is,{...o,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(cs,{children:n}),r&&w.jsx(us,{children:r})]}),s,w.jsx(as,{})]},e)}),w.jsx(os,{})]})}const Li=new so({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Bt,Jn;function ki(){if(Jn)return Bt;Jn=1;var t=typeof Element<"u",e=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(o,i){if(o===i)return!0;
2if(o&&i&&typeof o=="object"&&typeof i=="object"){if(o.constructor!==i.constructor)return!1;var a,u,c;if(Array.isArray(o)){if(a=o.length,a!=i.length)return!1;for(u=a;u--!==0;)if(!s(o[u],i[u]))return!1;return!0}var l;if(e&&o instanceof Map&&i instanceof Map){if(o.size!==i.size)return!1;for(l=o.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;for(l=o.entries();!(u=l.next()).done;)if(!s(u.value[1],i.get(u.value[0])))return!1;return!0}if(n&&o instanceof Set&&i instanceof Set){if(o.size!==i.size)return!1;for(l=o.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(i)){if(a=o.length,a!=i.length)return!1;for(u=a;u--!==0;)if(o[u]!==i[u])return!1;return!0}if(o.constructor===RegExp)return o.source===i.source&&o.flags===i.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof i.valueOf=="function")return o.valueOf()===i.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof i.toString=="function")return o.toString()===i.toString();if(c=Object.keys(o),a=c.length,a!==Object.keys(i).length)return!1;for(u=a;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;if(t&&o instanceof Element)return!1;for(u=a;u--!==0;)if(!((c[u]==="_owner"||c[u]==="__v"||c[u]==="__o")&&o.$$typeof)&&!s(o[c[u]],i[c[u]]))return!1;return!0}return o!==o&&i!==i}return Bt=function(i,a){try{return s(i,a)}catch(u){if((u.message||"").match(/stack|recursion/i))return!1;throw u}},Bt}var Di=ki();const Ii=Tt(Di);var jt,Yn;function Ui(){if(Yn)return jt;Yn=1;var t=function(e,n,r,s,o,i,a,u){if(!e){var c;if(n===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,s,o,i,a,u],m=0;c=new Error(n.replace(/%s/g,function(){return l[m++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};return jt=t,jt}var Bi=Ui();const Xn=Tt(Bi);var $t,Qn;function ji(){return Qn||(Qn=1,$t=function(e,n,r,s){var o=r?r.call(s,e,n):void 0;if(o!==void 0)return!!o;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var i=Object.keys(e),a=Object.keys(n);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),c=0;c<i.length;c++){var l=i[c];if(!u(l))return!1;var m=e[l],g=n[l];if(o=r?r.call(s,m,g,l):void 0,o===!1||o===void 0&&m!==g)return!1}return!0}),$t}var $i=ji();const Fi=Tt($i);var ls=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(ls||{}),Ft={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Gn=Object.values(ls),Sn={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Mi=Object.entries(Sn).reduce((t,[e,n])=>(t[n]=e,t),{}),Z="data-rh",Pe={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Ne=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},qi=t=>{let e=Ne(t,"title");const n=Ne(t,Pe.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=Ne(t,Pe.DEFAULT_TITLE);return e||r||void 0},Hi=t=>Ne(t,Pe.ON_CHANGE_CLIENT_STATE)||(()=>{}),Mt=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),Vi=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let o=0;o<s.length;o+=1){const a=s[o].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),zi=t=>console&&typeof console.warn=="function"&&void 0,je=(t,e,n)=>{const r={};return n.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&zi(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,o)=>{const i={};o.filter(u=>{let c;const l=Object.keys(u);for(let g=0;g<l.length;g+=1){const E=l[g],_=E.toLowerCase();e.indexOf(_)!==-1&&!(c==="rel"&&u[c].toLowerCase()==="canonical")&&!(_
2==="rel"&&u[_].toLowerCase()==="stylesheet")&&(c=_),e.indexOf(E)!==-1&&(E==="innerHTML"||E==="cssText"||E==="itemprop")&&(c=E)}if(!c||!u[c])return!1;const m=u[c].toLowerCase();return r[c]||(r[c]={}),i[c]||(i[c]={}),r[c][m]?!1:(i[c][m]=!0,!0)}).reverse().forEach(u=>s.push(u));const a=Object.keys(i);for(let u=0;u<a.length;u+=1){const c=a[u],l={...r[c],...i[c]};r[c]=l}return s},[]).reverse()},Wi=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},Ki=t=>({baseTag:Vi(["href"],t),bodyAttributes:Mt("bodyAttributes",t),defer:Ne(t,Pe.DEFER),encode:Ne(t,Pe.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Mt("htmlAttributes",t),linkTags:je("link",["rel","href"],t),metaTags:je("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:je("noscript",["innerHTML"],t),onChangeClientState:Hi(t),scriptTags:je("script",["src","innerHTML"],t),styleTags:je("style",["cssText"],t),title:qi(t),titleAttributes:Mt("titleAttributes",t),prioritizeSeoTags:Wi(t,Pe.PRIORITIZE_SEO_TAGS)}),ds=t=>Array.isArray(t)?t.join(""):t,Ji=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},qt=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>(Ji(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},Zn=(t,e)=>({...t,[e]:void 0}),Yi=["noscript","script","style"],sn=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),fs=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),Xi=(t,e,n,r)=>{const s=fs(n),o=ds(e);return s?`<${t} ${Z}="true" ${s}>${sn(o,r)}</${t}>`:`<${t} ${Z}="true">${sn(o,r)}</${t}>`},Qi=(t,e,n=!0)=>e.reduce((r,s)=>{const o=s,i=Object.keys(o).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,l)=>{const m=typeof o[l]>"u"?l:`${l}="${sn(o[l],n)}"`;return c?`${c} ${m}`:m},""),a=o.innerHTML||o.cssText||"",u=Yi.indexOf(t)===-1;return`${r}<${t} ${Z}="true" ${i}${u?"/>":`>${a}</${t}>`}`},""),hs=(t,e={})=>Object.keys(t).reduce((n,r)=>{const s=Sn[r];return n[s||r]=t[r],n},e),Gi=(t,e,n)=>{const r={key:e,[Z]:!0},s=hs(n,r);return[fe.createElement("title",s,e)]},ht=(t,e)=>e.map((n,r)=>{const s={key:r,[Z]:!0};return Object.keys(n).forEach(o=>{const a=Sn[o]||o;if(a==="innerHTML"||a==="cssText"){const u=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:u}}else s[a]=n[o]}),fe.createElement(t,s)}),Y=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>Gi(t,e.title,e.titleAttributes),toString:()=>Xi(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>hs(e),toString:()=>fs(e)};default:return{toComponent:()=>ht(t,e),toString:()=>Qi(t,e,n)}}},Zi=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const s=qt(t,Ft.meta),o=qt(e,Ft.link),i=qt(n,Ft.script);return{priorityMethods:{toComponent:()=>[...ht("meta",s.priority),...ht("link",o.priority),...ht("script",i.priority)],toString:()=>`${Y("meta",s.priority,r)} ${Y("link",o.priority,r)} ${Y("script",i.priority,r)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},ea=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:a="",titleAttributes:u,prioritizeSeoTags:c}=t;let{linkTags:l,metaTags:m,scriptTags:g}=t,E={toComponent:()=>{},toString:()=>""};return c&&({priorityMethods:E,linkTags:l,metaTags:m,scriptTags:g}=Zi(t)),{priority:E,base:Y("base",e,r),bodyAttributes:Y("bodyAttributes",n,r),htmlAttributes:Y("htmlAttributes",s,r),link:Y("link",l,r),meta:Y("meta",m,r),noscript:Y("noscript",o,r),script:Y("script",g,r),style:Y("style",i,r),title:Y("title",{title:a,titleAttributes:u},r)}},on=ea,at=[],ps=!!(typeof window<"u"&&window.document&&window.document.createElement),an=class{constructor(t,e){ue(this,"instances",[]);ue(this,"canUseDOM",ps);ue(this,"context");ue(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?at:this.instances,add:t=>{(this.canUseDOM?at:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?at:this.instances).indexOf(t);(this.canUseDOM?at:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=on({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},ta={},ms=fe.createContext(ta),ve,ys=(ve=class extends y.Component{constructor(n){super(n);ue(this,"helmetData");this.helmetData=new an(this.props.context||{},ve.canUseDOM)}render(){return fe.createElement(ms.Provider,{value:this.helmetData.value},this.props.children)}},ue(ve,"canUseDOM",ps),ve),xe=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${Z}]`),s=[].slice.call(r),o=[];let i;return e&&e.length&&e.forEach(a=>{const u=document.createElement(t);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")u.innerHTML=a.innerHTML;else if(c==="cssText")u.styleSheet?u.styleSheet.cssText=a.cssText:u.appendChild(document.createTextNode(a.cssText));else{const l=c,m=typeof a[l]>"u"?"":a[l];u.setAttribute(c,m)}u.setAttribute(Z,"true"),s.some((c,l)=>(i=l,u.isEqualNode(c)))?s.splice(i,1):o.push(u)}
2),s.forEach(a=>{var u;return(u=a.parentNode)==null?void 0:u.removeChild(a)}),o.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:o}},cn=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(Z),s=r?r.split(","):[],o=[...s],i=Object.keys(e);for(const a of i){const u=e[a]||"";n.getAttribute(a)!==u&&n.setAttribute(a,u),s.indexOf(a)===-1&&s.push(a);const c=o.indexOf(a);c!==-1&&o.splice(c,1)}for(let a=o.length-1;a>=0;a-=1)n.removeAttribute(o[a]);s.length===o.length?n.removeAttribute(Z):n.getAttribute(Z)!==i.join(",")&&n.setAttribute(Z,i.join(","))},na=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=ds(t)),cn("title",e)},er=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:a,onChangeClientState:u,scriptTags:c,styleTags:l,title:m,titleAttributes:g}=t;cn("body",r),cn("html",s),na(m,g);const E={baseTag:xe("base",n),linkTags:xe("link",o),metaTags:xe("meta",i),noscriptTags:xe("noscript",a),scriptTags:xe("script",c),styleTags:xe("style",l)},_={},p={};
2Object.keys(E).forEach(f=>{const{newTags:h,oldTags:b}=E[f];h.length&&(_[f]=h),b.length&&(p[f]=E[f].oldTags)}),e&&e(),u(t,_,p)},$e=null,ra=t=>{$e&&cancelAnimationFrame($e),t.defer?$e=requestAnimationFrame(()=>{er(t,()=>{$e=null})}):(er(t),$e=null)},sa=ra,tr=class extends y.Component{constructor(){super(...arguments);ue(this,"rendered",!1)}shouldComponentUpdate(e){return!Fi(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const s=Ki(e.get().map(o=>{const i={...o.props};return delete i.context,i}));ys.canUseDOM?sa(s):on&&(r=on(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Zt,Ql=(Zt=class extends y.Component{shouldComponentUpdate(t){return!Ii(Zn(this.props,"helmetData"),Zn(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}warnOnInvalidChildren(t,e){return Xn(Gn.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Gn.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),Xn(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return fe.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:s,...o}=r.props,i=Object.keys(o).reduce((u,c)=>(u[Mi[c]||c]=o[c],u),{});let{type:a}=r;
2switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,i,s);break;default:e=this.mapObjectTypeChildren(r,e,i,s);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof an)){const s=r;r=new an(s.context,!0),delete n.helmetData}return r?fe.createElement(tr,{...n,context:r.value}):fe.createElement(ms.Consumer,null,s=>fe.createElement(tr,{...n,context:s}))}},ue(Zt,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Zt);function gs(t,e){return function(){return t.apply(e,arguments)}}const{toString:oa}=Object.prototype,{getPrototypeOf:Rt}=Object,{iterator:At,toStringTag:ws}=Symbol,xt=(t=>e=>{const n=oa.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ee=t=>(t=t.toLowerCase(),e=>xt(e)===t),Ct=t=>e=>typeof e===t,{isArray:Se}=Array,Le=Ct("undefined");function Ie(t){return t!==null&&!Le(t)&&t.constructor!==null&&!Le(t.constructor)&&K(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const bs=ee("ArrayBuffer");function ia(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&bs(t.buffer),e}const aa=Ct("string"),K=Ct("function"),vs=Ct("number"),Ge=t=>t!==null&&typeof t=="object",ca=t=>t===!0||t===!1,pt=t=>{if(xt(t)!=="object")return!1;const e=Rt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ws in t)&&!(At in t)},ua=t=>{if(!Ge(t)||Ie(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},la=ee("Date"),da=ee("File"),fa=t=>!!(t&&typeof t.uri<"u"),ha=t=>t&&typeof t.getParts<"u",pa=ee("Blob"),ma=ee("FileList"),ya=t=>Ge(t)&&K(t.pipe);function ga(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const nr=ga(),rr=typeof nr.FormData<"u"?nr.FormData:void 0,wa=t=>{if(!t)return!1;if(rr&&t instanceof rr)return!0;const e=Rt(t);if(!e||e===Object.prototype||!K(t.append))return!1;const n=xt(t);return n==="formdata"||n==="object"&&K(t.toString)&&t.toString()==="[object FormData]"},ba=ee("URLSearchParams"),[va,Ea,_a,Ta]=["ReadableStream","Request","Response","Headers"].map(ee),Sa=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ze(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),Se(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(Ie(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function Es(t,e){if(Ie(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const be=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_s=t=>!Le(t)&&t!==be;function un(...t){const{caseless:e,skipUndefined:n}=_s(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&Es(r,i)||i,u=ln(r,a)?r[a]:void 0;pt(u)&&pt(o)?r[a]=un(u,o):pt(o)?r[a]=un({},o):Se(o)?r[a]=o.slice():(!n||!Le(o))&&(r[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||Ie(a)||(Ze(a,s),typeof a!="object"||Se(a)))continue;const u=Object.getOwnPropertySymbols(a);for(let c=0;c<u.length;c++){const l=u[c];Ua.call(a,l)&&s(a[l],l)}}return r}const Ra=(t,e,n,{allOwnKeys:r}={})=>(Ze(e,(s,o)=>{n&&K(s)?Object.defineProperty(t,o,{__proto__:null,value:gs(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),Aa=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),xa=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},Ca=(t,e,n,r)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;
vendor: 4,248 bytes, lines 2-3
2)i=s[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&Rt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Oa=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Pa=t=>{if(!t)return null;if(Se(t))return t;let e=t.length;if(!vs(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Na=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Rt(Uint8Array)),La=(t,e)=>{const r=(t&&t[At]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},ka=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Da=ee("HTMLFormElement"),Ia=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ln=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),{propertyIsEnumerable:Ua}=Object.prototype,Ba=ee("RegExp"),Ts=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ze(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},ja=t=>{Ts(t,(e,n)=>{if(K(t)&&["arguments","caller","callee"].includes(n))return!1;const r=t[n];if(K(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$a=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Se(t)?r(t):r(String(t).split(e)),n},Fa=()=>{},Ma=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function qa(t){return!!(t&&K(t.append)&&t[ws]==="FormData"&&t[At])}const Ha=t=>{const e=new WeakSet,n=r=>{if(Ge(r)){if(e.has(r))return;if(Ie(r))return r;if(!("toJSON"in r)){e.add(r);const s=Se(r)?[]:{};return Ze(r,(o,i)=>{const a=n(o);!Le(a)&&(s[i]=a)}),e.delete(r),s}}return r};return n(t)},Va=ee("AsyncFunction"),za=t=>t&&(Ge(t)||K(t))&&K(t.then)&&K(t.catch),Ss=((t,e)=>t?setImmediate:e?((n,r)=>(be.addEventListener("message",({source:s,data:o})=>{s===be&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),be.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",K(be.postMessage)),Wa=typeof queueMicrotask<"u"?queueMicrotask.bind(be):typeof process<"u"&&process.nextTick||Ss,Ka=t=>t!=null&&K(t[At]),d={isArray:Se,isArrayBuffer:bs,isBuffer:Ie,isFormData:wa,isArrayBufferView:ia,isString:aa,isNumber:vs,isBoolean:ca,isObject:Ge,isPlainObject:pt,isEmptyObject:ua,isReadableStream:va,isRequest:Ea,isResponse:_a,isHeaders:Ta,isUndefined:Le,isDate:la,isFile:da,isReactNativeBlob:fa,isReactNative:ha,isBlob:pa,isRegExp:Ba,isFunction:K,isStream:ya,isURLSearchParams:ba,isTypedArray:Na,isFileList:ma,forEach:Ze,merge:un,extend:Ra,trim:Sa,stripBOM:Aa,inherits:xa,toFlatObject:Ca,kindOf:xt,kindOfTest:ee,endsWith:Oa,toArray:Pa,forEachEntry:La,matchAll:ka,isHTMLForm:Da,hasOwnProperty:ln,hasOwnProp:ln,reduceDescriptors:Ts,freezeMethods:ja,toObjectSet:$a,toCamelCase:Ia,noop:Fa,toFiniteNumber:Ma,findKey:Es,global:be,isContextDefined:_s,isSpecCompliantForm:qa,toJSONObject:Ha,isAsyncFn:Va,isThenable:za,setImmediate:Ss,asap:Wa,isIterable:Ka},Ja=d.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"]),Ya=t=>{const e={};let n,r,s;return t&&t.split(`
3`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Ja[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function Xa(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const Qa=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ga=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Rn(t,e){return d.isArray(t)?t.map(n=>Rn(n,e)):Xa(String(t).replace(e,""))}const Za=t=>Rn(t,Qa),ec=t=>Rn(t,Ga);function Rs(t){const e=Object.create(null);return d.forEach(t.toJSON(),(n,r)=>{e[r]=ec(n)}),e}const sr=Symbol("internals");function Fe(t){return t&&String(t).trim().toLowerCase()}function mt(t){return t===!1||t==null?t:d.isArray(t)?t.map(mt):Za(String(t))}function tc(t){const e=Object.create(null),n=/([^\s,;
3=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const nc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ht(t,e,n,r,s){if(d.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!d.isString(e)){if(d.isString(r))return e.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(e)}}function rc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function sc(t,e){const n=d.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}let H=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(a,u,c){const l=Fe(u);if(!l)return;const m=d.findKey(s,l);(!m||s[m]===void 0||c===!0||c===void 0&&s[m]!==!1)&&(s[m||u]=mt(a))}const i=(a,u)=>d.forEach(a,(c,l)=>o(c,l,u));if(d.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(d.isString(e)&&(e=e.trim())&&!nc(e))i(Ya(e),n);else if(d.isObject(e)&&d.isIterable(e)){let a={},u,c;for(const l of e){if(!d.isArray(l))throw new TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(u=a[c])?d.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}i(a,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=Fe(e),e){const r=d.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return tc(s);if(d.isFunction(n))return n.call(this,s,r);if(d.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Fe(e),e){const r=d.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ht(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=Fe(i),i){const a=d.findKey(r,i);a&&(!n||Ht(r,r[a],a,n))&&(delete r[a],s=!0)}}return d.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||Ht(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return d.forEach(this,(s,o)=>{const i=d.findKey(r,o);if(i){n[i]=mt(s),delete n[o];return}const a=e?rc(o):String(o).trim();a!==o&&delete n[o],n[a]=mt(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return d.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
4`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[sr]=this[sr]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Fe(i);r[a]||(sc(s,i),r[a]=!0)}return d.isArray(e)?e.forEach(o):o(e),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(H.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});d.freezeMethods(H);const oc="[REDACTED ****]";function ic(t){if(d.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(d.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function ac(t,e){const n=new Set(e.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||d.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof H&&(o=o.toJSON()),r.push(o);let i;if(d.isArray(o))i=[],o.forEach((a,u)=>{const c=s(a);d.isUndefined(c)||(i[u]=c)});else{if(!d.isPlainObject(o)&&ic(o))return r.pop(),o;i=Object.create(null);for(const[a,u]of Object.entries(o)){const c=n.has(a.toLowerCase())?oc:s(u);d.isUndefined(c)||(i[a]=c)}}return r.pop(),i};return s(t)}let S=class As extends Error{static from(e,n,r,s,o,i){const a=new As(e.message,n||e.code,r,s,o);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,n,r,s,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,n=e&&d.hasOwnProp(e,"redact")?e.redact:void 0,r=d.isArray(n)&&n.length>0?ac(e,n):d.toJSONObject(e);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:r,code:this.code,status:this.status}}};S.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";S.ERR_BAD_OPTION="ERR_BAD_OPTION";S.ECONNABORTED="ECONNABORTED";S.ETIMEDOUT="ETIMEDOUT";S.ECONNREFUSED="ECONNREFUSED";S.ERR_NETWORK="ERR_NETWORK";S.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";S.ERR_DEPRECATED="ERR_DEPRECATED";S.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";S.ERR_BAD_REQUEST="ERR_BAD_REQUEST";S.ERR_CANCELED="ERR_CANCELED";S.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";S.ERR_INVALID_URL="ERR_INVALID_URL";S.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cc=null;function dn(t){return d.isPlainObject(t)||d.isArray(t)}function xs(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function Vt(t,e,n){return t?t.concat(e).map(function(s,o){return s=xs(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function uc(t){return d.isArray(t)&&!t.some(dn)}const lc=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ot(t,e,n){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,h){return!d.isUndefined(h[f])});const r=n.metaTokens,s=n.visitor||m,o=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?100:n.maxDepth,c=a&&d.isSpecCompliantForm(e);if(!d.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";
vendor: 17,205 bytes, line 4
4if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new S("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function m(p,f,h){let b=p;if(d.isReactNative(e)&&d.isReactNativeBlob(p))return e.append(Vt(h,f,o),l(p)),!1;if(p&&!h&&typeof p=="object"){if(d.endsWith(f,"{}"))f=r?f:f.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&uc(p)||(d.isFileList(p)||d.endsWith(f,"[]"))&&(b=d.toArray(p)))return f=xs(f),b.forEach(function(T,R){!(d.isUndefined(T)||T===null)&&e.append(i===!0?Vt([f],R,o):i===null?f:f+"[]",l(T))}),!1}return dn(p)?!0:(e.append(Vt(h,f,o),l(p)),!1)}const g=[],E=Object.assign(lc,{defaultVisitor:m,convertValue:l,isVisitable:dn});function _(p,f,h=0){if(!d.isUndefined(p)){if(h>u)throw new S("Object is too deeply nested ("+h+" levels). Max depth: "+u,S.ERR_FORM_DATA_DEPTH_EXCEEDED);if(g.indexOf(p)!==-1)throw new Error("Circular reference detected in "+f.join("."));g.push(p),d.forEach(p,function(v,T){(!(d.isUndefined(v)||v===null)&&s.call(e,v,d.isString(T)?T.trim():T,f,E))===!0&&_(v,f?f.concat(T):[T],h+1)}),g.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return _(t),e}function or(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function An(t,e){this._pairs=[],t&&Ot(t,this,e)}const Cs=An.prototype;Cs.append=function(e,n){this._pairs.push([e,n])};Cs.toString=function(e){const n=e?function(r){return e.call(this,r,or)}:or;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function dc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Os(t,e,n){if(!e)return t;const r=n&&n.encode||dc,s=d.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(e,s):i=d.isURLSearchParams(e)?e.toString():new An(e,s).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ir{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(r){r!==null&&e(r)})}}const xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},fc=typeof URLSearchParams<"u"?URLSearchParams:An,hc=typeof FormData<"u"?FormData:null,pc=typeof Blob<"u"?Blob:null,mc={isBrowser:!0,classes:{URLSearchParams:fc,FormData:hc,Blob:pc},protocols:["http","https","file","blob","url","data"]},Cn=typeof window<"u"&&typeof document<"u",fn=typeof navigator=="object"&&navigator||void 0,yc=Cn&&(!fn||["ReactNative","NativeScript","NS"].indexOf(fn.product)<0),gc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wc=Cn&&window.location.href||"http://localhost",bc=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cn,hasStandardBrowserEnv:yc,hasStandardBrowserWebWorkerEnv:gc,navigator:fn,origin:wc},Symbol.toStringTag,{value:"Module"})),M={...bc,...mc};function vc(t,e){return Ot(t,new M.classes.URLSearchParams,{visitor:function(n,r,s,o){return M.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Ec(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _c(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function Ps(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=o>=n.length;return i=!i&&d.isArray(s)?s.length:i,u?(d.hasOwnProp(s,i)?s[i]=d.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!a):((!d.hasOwnProp(s,i)||!d.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&d.isArray(s[i])&&(s[i]=_c(s[i])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const n={};return d.forEachEntry(t,(r,s)=>{e(Ec(r),s,n,0)}),n}return null}const Ce=(t,e)=>t!=null&&d.hasOwnProp(t,e)?t[e]:void 0;function Tc(t,e,n){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const et={transitional:xn,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=d.isObject(e);if(o&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return s?JSON.stringify(Ps(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){const u=Ce(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vc(e,u).toString();if((a=d.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=Ce(this,"env"),l=c&&c.FormData;return Ot(a?{"files[]":e}:e,l&&new l,u)}}return o||s?(n.setContentType("application/json",!1),Tc(e)):e}],transformResponse:[function(e){const n=Ce(this,"transitional")||et.transitional,r=n&&n.forcedJSONParsing,s=Ce(this,"responseType"),o=s==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(r&&!s||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,Ce(this,"parseReviver"))}catch(u){if(a)throw u.name==="SyntaxError"?S.from(u,S.ERR_BAD_RESPONSE,this,null,Ce(this,"response")):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch","query"],t=>{et.headers[t]={}});function zt(t,e){const n=this||et,r=e||n,s=H.from(r.headers);let o=r.data;return d.forEach(t,function(a){o=a.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function Ns(t){return!!(t&&t.__CANCEL__)}let tt=class extends S{constructor(e,n,r){super(e??"canceled",S.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ls(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,n.status>=400&&n.status<500?S.ERR_BAD_REQUEST:S.ERR_BAD_RESPONSE,n.config,n.request,n))}function Sc(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function Rc(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),l=r[o];i||(i=c),n[s]=u,r[s]=c;let m=o,g=0;for(;m!==s;)g+=n[m++],m=m%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),c-i<e)return;const E=l&&c-l;return E?Math.round(g*1e3/E):void 0}}function Ac(t,e){let n=0,r=1e3/e,s,o;const i=(c,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),t(...c)};return[(...c)=>{const l=Date.now(),m=l-n;m>=r?i(c,l):(s=c,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const _t=(t,e,n=3)=>{let r=0;const s=Rc(50,250);return Ac(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,u=a!=null?Math.min(i,a):i,c=Math.max(0,u-r),l=s(c);r=Math.max(r,u);const m={loaded:u,total:a,progress:a?u/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-u)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},n)},ar=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},cr=t=>(...e)=>d.asap(()=>t(...e)),xc=M.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,M.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Cc=M.hasStandardBrowserEnv?{write(t,e,n,r,s,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];d.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),d.isString(r)&&a.push(`path=${r}`),d.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),d.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===t)return decodeURIComponent(r.slice(s+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Oc(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Pc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ks(t,e,n){let r=!Oc(e);return t&&(r||n===!1)?Pc(t,e):e}const ur=t=>t instanceof H?{...t}:t;function Re(t,e){e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,l,m,g){return d.isPlainObject(c)&&d.isPlainObject(l)?d.merge.call({caseless:g},c,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function s(c,l,m,g){if(d.isUndefined(l)){if(!d.isUndefined(c))return r(void 0,c,m,g)}else return r(c,l,m,g)}function o(c,l){if(!d.isUndefined(l))return r(void 0,l)}function i(c,l){if(d.isUndefined(l)){if(!d.isUndefined(c))return r(void 0,c)}else return r(void 0,l)}function a(c,l,m){if(d.hasOwnProp(e,m))return r(c,l);if(d.hasOwnProp(t,m))return r(void 0,c)}const u={url:o,method:o,data:o,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,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(c,l,m)=>s(ur(c),ur(l),m,!0)};return d.forEach(Object.keys({...t,...e}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const m=d.hasOwnProp(u,l)?u[l]:s,g=d.hasOwnProp(t,l)?t[l]:void 0,E=d.hasOwnProp(e,l)?e[l]:void 0,_=m(g,E,l);d.isUndefined(_)&&m!==a||(n[l]=_)}),n}const Nc=["content-type","content-length"];function Lc(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,s])=>{Nc.includes(r.toLowerCase())&&t.set(r,s)})}const kc=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function Ds(t){const e=Re({},t),n=g=>d.hasOwnProp(e,g)?e[g]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const u=n("auth"),c=n("baseURL"),l=n("allowAbsoluteUrls"),m=n("url");if(e.headers=a=H.from(a),e.url=Os(ks(c,m,l),n("params"),n("paramsSerializer")),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?kc(u.password):""))),d.isFormData(r)&&(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv||d.isReactNative(r)?a.setContentType(void 0):d.isFunction(r.getHeaders)&&Lc(a,r.getHeaders(),n("formDataHeaderPolicy"))),M.hasStandardBrowserEnv&&(d.isFunction(s)&&(s=s(e)),s===!0||s==null&&xc(e.url))){const E=o&&i&&Cc.read(i);E&&a.set(o,E)}return e}const Dc=typeof XMLHttpRequest<"u",Ic=Dc&&function(t){return new Promise(function(n,r){const s=Ds(t);let o=s.data;const i=H.from(s.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=s,l,m,g,E,_;function p(){E&&E(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function h(){if(!f)return;const v=H.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:t,request:f};Ls(function(x){n(x),p()},function(x){r(x),p()},R),f=null}"onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.startsWith("file:"))||setTimeout(h)},f.onabort=function(){f&&(r(new S("Request aborted",S.ECONNABORTED,t,f)),p(),f=null)},f.onerror=function(T){const R=T&&T.message?T.message:"Network Error",C=new S(R,S.ERR_NETWORK,t,f);C.event=T||null,r(C),p(),f=null},f.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||xn;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new S(T,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,f)),p(),f=null},o===void 0&&i.setContentType(null),"setRequestHeader"in f&&d.forEach(Rs(i),function(T,R){f.setRequestHeader(R,T)}),d.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),a&&a!=="json"&&(f.responseType=s.responseType),c&&([g,_]=_t(c,!0),f.addEventListener("progress",g)),u&&f.upload&&([m,E]=_t(u),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(l=v=>{f&&(r(!v||v.type?new tt(null,t,f):v),f.abort(),p(),f=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const b=Sc(s.url);if(b&&!M.protocols.includes(b)){r(new S("Unsupported protocol "+b+":",S.ERR_BAD_REQUEST,t));return}f.send(o||null)})},Uc=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let r=!1;const s=function(u){if(!r){r=!0,i();const c=u instanceof Error?u:this.reason;n.abort(c instanceof S?c:new tt(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{o=null,s(new S(`timeout of ${e}ms exceeded`,S.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:a}=n;return a.unsubscribe=()=>d.asap(i),a},Bc=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},jc=async function*(t,e){for await(const n of $c(t))yield*Bc(n,e)},$c=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},lr=(t,e,n,r)=>{const s=jc(t,e);let o=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:l}=await s.next();if(c){a(),u.close();return}let m=l.byteLength;if(n){let g=o+=m;n(g)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),s.return()}},{highWaterMark:2})};function Fc(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let i=r.length;const a=r.length;for(let E=0;E<a;E++)if(r.charCodeAt(E)===37&&E+2<a){const _=r.charCodeAt(E+1),p=r.charCodeAt(E+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(i-=2,E+=2)}let u=0,c=a-1;const l=E=>E>=2&&r.charCodeAt(E-2)===37&&r.charCodeAt(E-1)===51&&(r.charCodeAt(E)===68||r.charCodeAt(E)===100);c>=0&&(r.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(r.charCodeAt(c)===61||l(c))&&u++;const g=Math.floor(i/4)*3-(u||0);return g>0?g:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,a=r.length;i<a;i++){const u=r.charCodeAt(i);if(u<128)o+=1;else if(u<2048)o+=2;else if(u>=55296&&u<=56319&&i+1<a){const c=r.charCodeAt(i+1);c>=56320&&c<=57343?(o+=4,i++):o+=3}else o+=3}return o}const On="1.17.0",dr=64*1024,{isFunction:ct}=d,Mc=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),fr=t=>{if(!d.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},hr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},qc=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},Hc=t=>{const e=d.global!==void 0&&d.global!==null?d.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=d.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:s,Request:o,Response:i}=t,a=s?ct(s):typeof fetch=="function",u=ct(o),c=ct(i);if(!a)return!1;const l=a&&ct(n),m=a&&(typeof r=="function"?(h=>b=>h.encode(b))(new r):async h=>new Uint8Array(await new o(h).arrayBuffer())),g=u&&l&&hr(()=>{let h=!1;const b=new o(M.origin,{body:new n,method:"POST",get duplex(){return h=!0,"half"}}),v=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),h&&!v}),E=c&&l&&hr(()=>d.isReadableStream(new i("").body)),_={stream:E&&(h=>h.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!_[h]&&(_[h]=(b,v)=>{let T=b&&b[h];if(T)return T.call(b);throw new S(`Response type '${h}' is not supported`,S.ERR_NOT_SUPPORT,v)})});const p=async h=>{if(h==null)return 0;if(d.isBlob(h))return h.size;if(d.isSpecCompliantForm(h))return(await new o(M.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(d.isArrayBufferView(h)||d.isArrayBuffer(h))return h.byteLength;
4if(d.isURLSearchParams(h)&&(h=h+""),d.isString(h))return(await m(h)).byteLength},f=async(h,b)=>{const v=d.toFiniteNumber(h.getContentLength());return v??p(b)};return async h=>{let{url:b,method:v,data:T,signal:R,cancelToken:C,timeout:x,onDownloadProgress:D,onUploadProgress:j,responseType:B,headers:P,withCredentials:$="same-origin",fetchOptions:pe,maxContentLength:A,maxBodyLength:q}=Ds(h);const V=d.isNumber(A)&&A>-1,me=d.isNumber(q)&&q>-1,ye=L=>d.hasOwnProp(h,L)?h[L]:void 0;let ge=s||fetch;B=B?(B+"").toLowerCase():"text";let te=Uc([R,C&&C.toAbortSignal()],x),z=null;const Q=te&&te.unsubscribe&&(()=>{te.unsubscribe()});let we;try{let L;const ae=ye("auth");if(ae){const O=ae.username||"",re=ae.password||"";L={username:O,password:re}}if(qc(b)){const O=new URL(b,M.origin);if(!L&&(O.username||O.password)){const re=fr(O.username),Ae=fr(O.password);L={username:re,password:Ae}}(O.username||O.password)&&(O.username="",O.password="",b=O.href)}if(L&&(P.delete("authorization"),P.set("Authorization","Basic "+btoa(Mc((L.username||"")+":"+(L.password||""))))),V&&typeof b=="string"&&b.startsWith("data:")&&Fc(b)>A)throw new S("maxContentLength size of "+A+" exceeded",S.ERR_BAD_RESPONSE,h,z);if(me&&v!=="get"&&v!=="head"){const O=await f(P,T);if(typeof O=="number"&&isFinite(O)&&O>q)throw new S("Request body larger than maxBodyLength limit",S.ERR_BAD_REQUEST,h,z)}if(j&&g&&v!=="get"&&v!=="head"&&(we=await f(P,T))!==0){let O=new o(b,{method:"POST",body:T,duplex:"half"}),re;if(d.isFormData(T)&&(re=O.headers.get("content-type"))&&P.setContentType(re),O.body){const[Ae,nt]=ar(we,_t(cr(j)));T=lr(O.body,dr,Ae,nt)}}d.isString($)||($=$?"include":"omit");const eo=u&&"credentials"in o.prototype;if(d.isFormData(T)){const O=P.getContentType();O&&/^multipart\/form-data/i.test(O)&&!/boundary=/i.test(O)&&P.delete("content-type")}P.set("User-Agent","axios/"+On,!1);const Un={...pe,signal:te,method:v.toUpperCase(),headers:Rs(P.normalize()),body:T,duplex:"half",credentials:eo?$:void 0};z=u&&new o(b,Un);let ne=await(u?ge(z,pe):ge(b,Un));if(V){const O=d.toFiniteNumber(ne.headers.get("content-length"));if(O!=null&&O>A)throw new S("maxContentLength size of "+A+" exceeded",S.ERR_BAD_RESPONSE,h,z)}const kt=E&&(B==="stream"||B==="response");if(E&&ne.body&&(D||V||kt&&Q)){const O={};["status","statusText","headers"].forEach(Be=>{O[Be]=ne[Be]});const re=d.toFiniteNumber(ne.headers.get("content-length")),[Ae,nt]=D&&ar(re,_t(cr(D),!0))||[];let Bn=0;const to=Be=>{if(V&&(Bn=Be,Bn>A))throw new S("maxContentLength size of "+A+" exceeded",S.ERR_BAD_RESPONSE,h,z);Ae&&Ae(Be)};ne=new i(lr(ne.body,dr,to,()=>{nt&&nt(),Q&&Q()}),O)}B=B||"text";let ce=await _[d.findKey(_,B)||"text"](ne,h);if(V&&!E&&!kt){let O;if(ce!=null&&(typeof ce.byteLength=="number"?O=ce.byteLength:typeof ce.size=="number"?O=ce.size:typeof ce=="string"&&(O=typeof r=="function"?new r().encode(ce).byteLength:ce.length)),typeof O=="number"&&O>A)throw new S("maxContentLength size of "+A+" exceeded",S.ERR_BAD_RESPONSE,h,z)}return!kt&&Q&&Q(),await new Promise((O,re)=>{Ls(O,re,{data:ce,headers:H.from(ne.headers),status:ne.status,statusText:ne.statusText,config:h,request:z})})}catch(L){if(Q&&Q(),te&&te.aborted&&te.reason instanceof S){const ae=te.reason;throw ae.config=h,z&&(ae.request=z),L!==ae&&(ae.cause=L),ae}throw L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,h,z,L&&L.response),{cause:L.cause||L}):S.from(L,L&&L.code,h,z,L&&L.response)}}},Vc=new Map,Is=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,o=[r,s,n];let i=o.length,a=i,u,c,l=Vc;for(;a--;)u=o[a],c=l.get(u),c===void 0&&l.set(u,c=a?new Map:Hc(e)),l=c;return c};Is();const Pn={http:cc,xhr:Ic,fetch:{get:Is}};d.forEach(Pn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const pr=t=>`- ${t}`,zc=t=>d.isFunction(t)||t===null||t===!1;function Wc(t,e){t=d.isArray(t)?t:[t];const{length:n}=t;let r,s;const o={};for(let i=0;i<n;i++){r=t[i];let a;if(s=r,!zc(r)&&(s=Pn[(a=String(r)).toLowerCase()],s===void 0))throw new S(`Unknown adapter '${a}'`);if(s&&(d.isFunction(s)||(s=s.get(e))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
5`+i.map(pr).join(`
6`):" "+pr(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}
vendor: 5,057 bytes, lines 6-10
6const Us={getAdapter:Wc,adapters:Pn};function Wt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new tt(null,t)}function mr(t){return Wt(t),t.headers=H.from(t.headers),t.data=zt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Us.getAdapter(t.adapter||et.adapter,t)(t).then(function(r){Wt(t),t.response=r;try{r.data=zt.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=H.from(r.headers),r},function(r){if(!Ns(r)&&(Wt(t),r&&r.response)){t.response=r.response;try{r.response.data=zt.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=H.from(r.response.headers)}return Promise.reject(r)})}const Pt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const yr={};Pt.transitional=function(e,n,r){function s(o,i){return"[Axios v"+On+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(e===!1)throw new S(s(i," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!yr[i]&&(yr[i]=!0),e?e(o,i,a):!0}};Pt.spelling=function(e){return(n,r)=>!0};function Kc(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],u=a===void 0||i(a,o,t);if(u!==!0)throw new S("option "+o+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+o,S.ERR_BAD_OPTION)}}const yt={assertOptions:Kc,validators:Pt},W=yt.validators;let Ee=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ir,response:new ir}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(`
7`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
8`),a=i===-1?-1:o.indexOf(`
9`,i+1),u=a===-1?"":o.slice(a+1);String(r.stack).endsWith(u)||(r.stack+=`
10`+o)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&yt.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean),legacyInterceptorReqResOrdering:W.transitional(W.boolean),advertiseZstdAcceptEncoding:W.transitional(W.boolean)},!1),s!=null&&(d.isFunction(s)?n.paramsSerializer={serialize:s}:yt.assertOptions(s,{encode:W.function,serialize:W.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),yt.assertOptions(n,{baseUrl:W.spelling("baseURL"),withXsrfToken:W.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete o[_]}),n.headers=H.concat(i,o);const a=[];let u=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;u=u&&p.synchronous;const f=n.transitional||xn;f&&f.legacyInterceptorReqResOrdering?a.unshift(p.fulfilled,p.rejected):a.push(p.fulfilled,p.rejected)});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let l,m=0,g;if(!u){const _=[mr.bind(this),void 0];for(_.unshift(...a),_.push(...c),g=_.length,l=Promise.resolve(n);m<g;)l=l.then(_[m++],_[m++]);return l}g=a.length;let E=n;for(;m<g;){const _=a[m++],p=a[m++];try{E=_(E)}catch(f){p.call(this,f);break}}try{l=mr.call(this,E)}catch(_){return Promise.reject(_)}for(m=0,g=c.length;m<g;)l=l.then(c[m++],c[m++]);return l}getUri(e){e=Re(this.defaults,e);const n=ks(e.baseURL,e.url,e.allowAbsoluteUrls);return Os(n,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){Ee.prototype[e]=function(n,r){return this.request(Re(r||{},{method:e,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch","query"],function(e){function n(r){return function(o,i,a){return this.request(Re(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Ee.prototype[e]=n(),e!=="query"&&(Ee.prototype[e+"Form"]=n(!0))});let Jc=class Bs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,a){r.reason||(r.reason=new tt(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
10subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bs(function(s){e=s}),cancel:e}}};function Yc(t){return function(n){return t.apply(null,n)}}function Xc(t){return d.isObject(t)&&t.isAxiosError===!0}const hn={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hn).forEach(([t,e])=>{hn[e]=t});function js(t){const e=new Ee(t),n=gs(Ee.prototype.request,e);return d.extend(n,Ee.prototype,e,{allOwnKeys:!0}),d.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return js(Re(t,s))},n}const I=js(et);I.Axios=Ee;I.CanceledError=tt;I.CancelToken=Jc;I.isCancel=Ns;I.VERSION=On;I.toFormData=Ot;I.AxiosError=S;I.Cancel=I.CanceledError;I.all=function(e){return Promise.all(e)};I.spread=Yc;I.isAxiosError=Xc;I.mergeConfig=Re;I.AxiosHeaders=H;I.formToJSON=t=>Ps(d.isHTMLForm(t)?new FormData(t):t);I.getAdapter=Us.getAdapter;I.HttpStatusCode=hn;I.default=I;const{Axios:td,AxiosError:nd,CanceledError:rd,isCancel:sd,CancelToken:od,VERSION:id,all:ad,Cancel:cd,isAxiosError:ud,spread:ld,toFormData:dd,AxiosHeaders:fd,HttpStatusCode:hd,formToJSON:pd,getAdapter:md,mergeConfig:yd,create:gd}=I,Qc=typeof window>"u",gr=!Qc&&window.self!==window.top,Kt=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),F=[];for(let t=0;t<256;++t)F.push((t+256).toString(16).slice(1));function Gc(t,e=0){return(F[t[e+0]]+F[t[e+1]]+F[t[e+2]]+F[t[e+3]]+"-"+F[t[e+4]]+F[t[e+5]]+"-"+F[t[e+6]]+F[t[e+7]]+"-"+F[t[e+8]]+F[t[e+9]]+"-"+F[t[e+10]]+F[t[e+11]]+F[t[e+12]]+F[t[e+13]]+F[t[e+14]]+F[t[e+15]]).toLowerCase()}let Jt;const Zc=new Uint8Array(16);function eu(){if(!Jt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Jt=crypto.getRandomValues.bind(crypto)}return Jt(Zc)}const tu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wr={randomUUID:tu};function nu(t,e,n){var s;t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??eu();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gc(r)}function ru(t,e,n){return wr.randomUUID&&!t?wr.randomUUID():nu(t)}class su extends Error{constructor(e,n,r,s,o){super(e),this.name="Base44Error",this.status=n,this.code=r,this.data=s,this.originalError=o}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function He({baseURL:t,headers:e={},token:n,interceptResponses:r=!0,onError:s}){const o=I.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return n&&(o.defaults.headers.common.Authorization=`Bearer ${n}`),o.interceptors.request.use(i=>{typeof window<"u"&&i.headers.set("X-Origin-URL",window.location.href);const a=ru();if(i.requestId=a,gr)try{window.parent.postMessage({type:"api-request-start",requestId:a,data:{url:t+i.url,method:i.method,body:i.data instanceof FormData?"[FormData object]":i.data}},"*")}catch{}return i}),r&&o.interceptors.response.use(i=>{var a;
10const u=(a=i.config)===null||a===void 0?void 0:a.requestId;try{gr&&u&&window.parent.postMessage({type:"api-request-end",requestId:u,data:{statusCode:i.status,response:i.data}},"*")}catch{}return i.data},i=>{var a,u,c,l,m,g,E,_;const p=((u=(a=i.response)===null||a===void 0?void 0:a.data)===null||u===void 0?void 0:u.message)||((l=(c=i.response)===null||c===void 0?void 0:c.data)===null||l===void 0?void 0:l.detail)||i.message,f=new su(p,(m=i.response)===null||m===void 0?void 0:m.status,(E=(g=i.response)===null||g===void 0?void 0:g.data)===null||E===void 0?void 0:E.code,(_=i.response)===null||_===void 0?void 0:_.data,i);return s==null||s(f),Promise.reject(f)}),o}function br(t){const{axios:e,appId:n,getSocket:r}=t;return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return iu(e,n,o,r)}})}function ou(t){var e;try{const n=JSON.parse(t);return{type:n.type,data:n.data,id:n.id||((e=n.data)===null||e===void 0?void 0:e.id),timestamp:n.timestamp||new Date().toISOString()}}catch{return null}}function iu(t,e,n,r){const s=`/apps/${e}/entities/${n}`;return{async list(o,i,a,u){const c={};return o&&(c.sort=o),i&&(c.limit=i),a&&(c.skip=a),u&&(c.fields=Array.isArray(u)?u.join(","):u),t.get(s,{params:c})},async filter(o,i,a,u,c){const l={q:JSON.stringify(o)};return i&&(l.sort=i),a&&(l.limit=a),u&&(l.skip=u),c&&(l.fields=Array.isArray(c)?c.join(","):c),t.get(s,{params:l})},async get(o){return t.get(`${s}/${o}`)},async create(o){return t.post(s,o)},async update(o,i){return t.put(`${s}/${o}`,i)},async delete(o){return t.delete(`${s}/${o}`)},async deleteMany(o){return t.delete(s,{data:o})},async bulkCreate(o){return t.post(`${s}/bulk`,o)},async updateMany(o,i){return t.patch(`${s}/update-many`,{query:o,data:i})},async bulkUpdate(o){return t.put(`${s}/bulk`,o)},async importEntities(o){const i=new FormData;return i.append("file",o,o.name),t.post(`${s}/import`,i,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(o){const i=`entities:${e}:${n}`;return r().subscribeToRoom(i,{update_model:c=>{var l;const m=ou(c.data);if(m){m.type!=="delete"&&(!((l=m.data)===null||l===void 0)&&l._oversize);try{o(m)}catch{}}}})}}}function au(t,e){return{async call(n,r,s){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:o,queryParams:i,...a}=s??{},u={...a,...o&&{path_params:o},...i&&{query_params:i}};return await t.post(`/apps/${e}/integrations/custom/${n}/${r}`,u)}}}function vr(t,e){const n=au(t,e);return new Proxy({},{get(r,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return s==="custom"?n:new Proxy({},{get(o,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return async a=>{if(typeof a=="string")throw new Error(`Integration ${i} must receive an object with named parameters, received: ${a}`);let u,c;return a instanceof FormData||a&&Object.values(a).some(l=>l instanceof File)?(u=new FormData,Object.keys(a).forEach(l=>{a[l]instanceof File?u.append(l,a[l],a[l].name):typeof a[l]=="object"&&a[l]!==null?u.append(l,JSON.stringify(a[l])):u.append(l,a[l])}),c="multipart/form-data"):(u=a,c="application/json"),s==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${i}`,u||a,{headers:{"Content-Type":c}}):t.post(`/apps/${e}/integration-endpoints/installable/${s}/integration-endpoints/${i}`,u||a,{headers:{"Content-Type":c}})}}})}})}function cu(){return typeof window>"u"?!1:window!==window.parent}function uu(t,e,n){const o=Math.round(window.screenX+(window.outerWidth-500)/2),i=Math.round(window.screenY+(window.outerHeight-600)/2),a=window.open(t,"base44_auth",`width=500,height=600,left=${o},top=${i},resizable=yes,scrollbars=yes`);if(!a)return;const u=()=>{window.removeEventListener("message",c),clearInterval(l),a.closed||a.close()},c=m=>{var g;if(m.origin!==n||m.source!==a||!(!((g=m.data)===null||g===void 0)&&g.access_token))return;u();const E=new URL(e),{access_token:_,is_new_user:p}=m.data;E.searchParams.set("access_token",_),p!=null&&E.searchParams.set("is_new_user",String(p)),window.location.href=E.toString()},l=setInterval(()=>{a.closed&&u()},500);window.addEventListener("message",c)}function lu(t,e,n,r){return{async me(){return t.get(`/apps/${n}/entities/User/me`)},async updateMe(s){return t.put(`/apps/${n}/entities/User/me`,s)},redirectToLogin(s){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const o=s?new URL(s,window.location.origin).toString():window.location.href,i=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(o)}`;window.location.href=i},loginWithProvider(s,o="/"){const i=new URL(o,window.location.origin).toString(),a=`app_id=${n}&from_url=${encodeURIComponent(i)}`;let u;s==="sso"?u=`/apps/${n}/auth/sso/login`:u=`/apps/auth${s==="google"?"":`/${s}`}/login`;const c=`${r.appBaseUrl}/api${u}?${a}`;if(cu()){const l=`${c}&popup_origin=${encodeURIComponent(window.location.origin)}`;return uu(l,i,window.location.origin)}window.location.href=c}
10,logout(s){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch{}const o=s||window.location.href,i=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(o)}`;window.location.href=i}},setToken(s,o=!0){if(s&&(t.defaults.headers.common.Authorization=`Bearer ${s}`,e.defaults.headers.common.Authorization=`Bearer ${s}`,o&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",s),window.localStorage.setItem("token",s)}catch{}},async loginViaEmailPassword(s,o,i){var a;try{const u=await t.post(`/apps/${n}/auth/login`,{email:s,password:o,...i&&{turnstile_token:i}}),{access_token:c,user:l}=u;return c&&this.setToken(c),{access_token:c,user:l}}catch(u){throw((a=u.response)===null||a===void 0?void 0:a.status)===401&&await this.logout(),u}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(s,o){return t.post(`/apps/${n}/users/invite-user`,{user_email:s,role:o})},register(s){return t.post(`/apps/${n}/auth/register`,s)},verifyOtp({email:s,otpCode:o}){return t.post(`/apps/${n}/auth/verify-otp`,{email:s,otp_code:o})},resendOtp(s){return t.post(`/apps/${n}/auth/resend-otp`,{email:s})},resetPasswordRequest(s){return t.post(`/apps/${n}/auth/reset-password-request`,{email:s})},resetPassword({resetToken:s,newPassword:o}){return t.post(`/apps/${n}/auth/reset-password`,{reset_token:s,new_password:o})},changePassword({userId:s,currentPassword:o,newPassword:i}){return t.post(`/apps/${n}/auth/change-password`,{user_id:s,current_password:o,new_password:i})}}}function du(t,e){return{async getAccessToken(n){const r=`/apps/${e}/auth/sso/accesstoken/${n}`;return t.get(r)}}}function fu(t,e){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const o=await t.get(`/apps/${e}/external-auth/tokens/${n}`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const o=await t.get(`/apps/${e}/external-auth/tokens/connectors/${n}`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const o=await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}}}}function hu(t,e){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${n}`)}}}function Xe(t={}){const{storageKey:e="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:s=!0}=t;let o=null;if(typeof window<"u"&&window.location)try{const i=new URLSearchParams(window.location.search);if(o=i.get(n),o){if(r&&pu(o,{storageKey:e}),s){i.delete(n);const a=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,a)}return o}}catch{}if(typeof window<"u"&&window.localStorage)try{return o=window.localStorage.getItem(e),o}catch{}return null}function pu(t,e){const{storageKey:n="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(n,t),window.localStorage.setItem("token",t),!0}catch{return!1}}function Er(t,e,n){const r=(o,i)=>o?`${String(o).replace(/\/$/,"")}${i}`:i,s=o=>{const i=new Headers;if(n!=null&&n.getAuthHeaders){const a=n.getAuthHeaders();
10Object.entries(a).forEach(([u,c])=>{c!=null&&i.set(u,String(c))})}return o&&new Headers(o).forEach((a,u)=>{i.set(u,a)}),i};return{async invoke(o,i){if(typeof i=="string")throw new Error(`Function ${o} must receive an object with named parameters, received: ${i}`);let a,u;return i instanceof FormData||i&&Object.values(i).some(c=>c instanceof File)?(a=new FormData,Object.keys(i).forEach(c=>{i[c]instanceof File?a.append(c,i[c],i[c].name):typeof i[c]=="object"&&i[c]!==null?a.append(c,JSON.stringify(i[c])):a.append(c,i[c])}),u="multipart/form-data"):(a=i,u="application/json"),t.post(`/apps/${e}/functions/${o}`,a||i,{headers:{"Content-Type":u}})},async fetch(o,i={}){const u=`/functions${o.startsWith("/")?o:`/${o}`}`,c=s(i.headers),l={...i,headers:c};return await fetch(r(n==null?void 0:n.baseURL,u),l)}}}function _r({axios:t,getSocket:e,appId:n,serverUrl:r,token:s}){const o=`/apps/${n}/agents`,i={},a=()=>t.get(`${o}/conversations`),u=p=>t.get(`${o}/conversations/${p}`);return{getConversations:a,getConversation:u,listConversations:p=>t.get(`${o}/conversations`,{params:p}),createConversation:p=>t.post(`${o}/conversations`,p),addMessage:async(p,f)=>t.post(`${o}/conversations/v2/${p.id}/messages`,f),subscribeToConversation:(p,f)=>{const h=`/agent-conversations/${p}`,b=e(),v=u(p).then(T=>(i[p]=T,T));return b.subscribeToRoom(h,{connect:()=>{},update_model:async({data:T})=>{const R=JSON.parse(T);if(R._message){await v;const C=R._message,x=i[p];if(x){const D=x.messages||[],j=D.findIndex(P=>P.id===C.id),B=j!==-1?D.map((P,$)=>$===j?C:P):[...D,C];i[p]={...x,messages:B},f==null||f(i[p])}}}})},getWhatsAppConnectURL:p=>{const f=`${r}/api/apps/${n}/agents/${encodeURIComponent(p)}/whatsapp`,h=s??Xe();return h?`${f}?token=${h}`:f},getTelegramConnectURL:p=>{const f=`${r}/api/apps/${n}/agents/${encodeURIComponent(p)}/telegram`,h=s??Xe();return h?`${f}?token=${h}`:f}}}function Tr(t,e){const n=`/app-logs/${e}`;return{async logUserInApp(r){await t.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await t.get(n,{params:r})},async getStats(r={}){return await t.get(`${n}/stats`,{params:r})}}}function mu(t,e){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:n,role:r})}}}const oe=Object.create(null);oe.open="0";oe.close="1";oe.ping="2";oe.pong="3";oe.message="4";oe.upgrade="5";oe.noop="6";const gt=Object.create(null);Object.keys(oe).forEach(t=>{gt[oe[t]]=t});const pn={type:"error",data:"parser error"},$s=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fs=typeof ArrayBuffer=="function",Ms=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Nn=({type:t,data:e},n,r)=>$s&&e instanceof Blob?n?r(e):Sr(e,r):Fs&&(e instanceof ArrayBuffer||Ms(e))?n?r(e):Sr(new Blob([e]),r):r(oe[t]+(e||"")),Sr=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Rr(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Yt;function yu(t,e){if($s&&t.data instanceof Blob)return t.data.arrayBuffer().then(Rr).then(e);if(Fs&&(t.data instanceof ArrayBuffer||Ms(t.data)))return e(Rr(t.data));Nn(t,!1,n=>{Yt||(Yt=new TextEncoder),e(Yt.encode(n))})}const Ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Ar.length;t++)Ve[Ar.charCodeAt(t)]=t;const gu=t=>{let e=t.length*.75,n=t.length,r,s=0,o,i,a,u;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),l=new Uint8Array(c);for(r=0;r<n;r+=4)o=Ve[t.charCodeAt(r)],i=Ve[t.charCodeAt(r+1)],a=Ve[t.charCodeAt(r+2)],u=Ve[t.charCodeAt(r+3)],l[s++]=o<<2|i>>4,l[s++]=(i&15)<<4|a>>2,l[s++]=(a&3)<<6|u&63;return c},wu=typeof ArrayBuffer=="function",Ln=(t,e)=>{if(typeof t!="string")return{type:"message",data:qs(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:bu(t.substring(1),e)}:gt[n]?t.length>1?{type:gt[n],data:t.substring(1)}:{type:gt[n]}:pn},bu=(t,e)=>{if(wu){const n=gu(t);return qs(n,e)}else return{base64:!0,data:t}},qs=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Hs="�",vu=(t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((o,i)=>{Nn(o,!1,a=>{r[i]=a,++s===n&&e(r.join(Hs))})})},Eu=(t,e)=>{const n=t.split(Hs),r=[];for(let s=0;s<n.length;s++){const o=Ln(n[s],e);if(r.push(o),o.type==="error")break}return r};function _u(){return new TransformStream({transform(t,e){yu(t,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const o=new DataView(s.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{s=new Uint8Array(9);const o=new DataView(s.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(n)})}})}let Xt;function ut(t){return t.reduce((e,n)=>e+n.length,0)}function lt(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function Tu(t,e){Xt||(Xt=new TextDecoder);const n=[];let r=0,s=-1,o=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(ut(n)<1)break;const u=lt(n,1);o=(u[0]&128)===128,s=u[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(ut(n)<2)break;const u=lt(n,2);s=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(ut(n)<8)break;const u=lt(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),l=c.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(pn);break}s=l*Math.pow(2,32)+c.getUint32(4),r=3}else{if(ut(n)<s)break;const u=lt(n,s);a.enqueue(Ln(o?u:Xt.decode(u),e)),r=0}if(s===0||s>t){a.enqueue(pn);break}}}})}const Vs=4;function U(t){if(t)return Su(t)}function Su(t){for(var e in U.prototype)t[e]=U.prototype[e];return t}U.prototype.on=U.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};U.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};U.prototype.off=U.prototype.removeListener=U.prototype.removeAllListeners=U.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];
vendor: 20,740 bytes, line 10
10if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===e||r.fn===e){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+t],this};U.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,e)}return this};U.prototype.emitReserved=U.prototype.emit;U.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};U.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Nt=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),X=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ru="arraybuffer";function zs(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Au=X.setTimeout,xu=X.clearTimeout;function Lt(t,e){e.useNativeTimers?(t.setTimeoutFn=Au.bind(X),t.clearTimeoutFn=xu.bind(X)):(t.setTimeoutFn=X.setTimeout.bind(X),t.clearTimeoutFn=X.clearTimeout.bind(X))}const Cu=1.33;function Ou(t){return typeof t=="string"?Pu(t):Math.ceil((t.byteLength||t.size)*Cu)}function Pu(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function Ws(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Nu(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Lu(t){let e={},n=t.split("&");for(let r=0,s=n.length;r<s;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class ku extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class kn extends U{constructor(e){super(),this.writable=!1,Lt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new ku(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=Ln(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=Nu(e);return n.length?"?"+n:""}}class Du extends kn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Eu(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,vu(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ws()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Ks=!1;try{Ks=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Iu=Ks;function Uu(){}class Bu extends Du{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class se extends U{constructor(e,n,r){super(),this.createRequest=e,Lt(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const n=zs(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=se.requestsCount++,se.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Uu,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete se.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}se.requestsCount=0;se.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",xr);else if(typeof addEventListener=="function"){const t="onpagehide"in X?"pagehide":"unload";addEventListener(t,xr,!1)}}function xr(){for(let t in se.requests)se.requests.hasOwnProperty(t)&&se.requests[t].abort()}const ju=(function(){const t=Js({xdomain:!1});return t&&t.responseType!==null})();class $u extends Bu{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=ju&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new se(Js,this.uri(),e)}}function Js(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Iu))return new XMLHttpRequest}catch{}if(!e)try{return new X[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ys=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Fu extends kn{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,r=Ys?{}:zs(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],s=n===e.length-1;Nn(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}s&&Nt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ws()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Qt=X.WebSocket||X.MozWebSocket;class Mu extends Fu{createSocket(e,n,r){return Ys?new Qt(e,n,r):n?new Qt(e,n):new Qt(e)}doWrite(e,n){this.ws.send(n)}}class qu extends kn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=Tu(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),s=_u();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const o=()=>{r.read().then(({done:a,value:u})=>{a||(this.onPacket(u),o())}).catch(a=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],s=n===e.length-1;this._writer.write(r).then(()=>{s&&Nt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Hu={websocket:Mu,webtransport:qu,polling:$u},Vu=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,zu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mn(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=Vu.exec(t||""),o={},i=14;for(;i--;)o[zu[i]]=s[i]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Wu(o,o.path),o.queryKey=Ku(o,o.query),o}function Wu(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Ku(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,o){s&&(n[s]=o)}),n}const yn=typeof addEventListener=="function"&&typeof removeEventListener=="function",wt=[];yn&&addEventListener("offline",()=>{wt.forEach(t=>t())},!1);class he extends U{constructor(e,n){if(super(),this.binaryType=Ru,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const r=mn(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mn(n.host).host);Lt(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Lu(this.opts.query)),yn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},wt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Vs,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&he.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",he.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=Ou(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Nt(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(he.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=wt.indexOf(this._offlineEventListener);r!==-1&&wt.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}he.protocol=Vs;class Ju extends he{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;he.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;he.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(l(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function o(){r||(r=!0,l(),n.close(),n=null)}const i=m=>{const g=new Error("probe error: "+m);g.transport=n.name,o(),this.emitReserved("upgradeError",g)};function a(){i("transport closed")}function u(){i("socket closed")}function c(m){n&&m.name!==n.name&&o()}const l=()=>{n.removeListener("open",s),n.removeListener("error",i),n.removeListener("close",a),this.off("close",u),this.off("upgrading",c)};n.once("open",s),n.once("error",i),n.once("close",a),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}}let Yu=class extends Ju{constructor(e,n={}){const r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>Hu[s]).filter(s=>!!s)),super(e,r)}};function Xu(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=mn(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Qu=typeof ArrayBuffer=="function",Gu=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Xs=Object.prototype.toString,Zu=typeof Blob=="function"||typeof Blob<"u"&&Xs.call(Blob)==="[object BlobConstructor]",el=typeof File=="function"||typeof File<"u"&&Xs.call(File)==="[object FileConstructor]";function Dn(t){return Qu&&(t instanceof ArrayBuffer||Gu(t))||Zu&&t instanceof Blob||el&&t instanceof File}function bt(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(bt(t[n]))return!0;return!1}if(Dn(t))return!0;
vendor: 8,056 bytes, line 10
10if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return bt(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&bt(t[n]))return!0;return!1}function tl(t){const e=[],n=t.data,r=t;return r.data=gn(n,e),r.attachments=e.length,{packet:r,buffers:e}}function gn(t,e){if(!t)return t;if(Dn(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=gn(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=gn(t[r],e));return n}return t}function nl(t,e){return t.data=wn(t.data,e),delete t.attachments,t}function wn(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=wn(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=wn(t[n],e));return t}const rl=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var N;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(N||(N={}));class sl{constructor(e){this.replacer=e}encode(e){return(e.type===N.EVENT||e.type===N.ACK)&&bt(e)?this.encodeAsBinary({type:e.type===N.EVENT?N.BINARY_EVENT:N.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===N.BINARY_EVENT||e.type===N.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=tl(e),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class In extends U{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===N.BINARY_EVENT;r||n.type===N.BINARY_ACK?(n.type=r?N.EVENT:N.ACK,this.reconstructor=new ol(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Dn(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(N[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===N.BINARY_EVENT||r.type===N.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const i=e.substring(o,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");const a=Number(i);if(!il(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const s=e.charAt(n+1);if(s!==""&&Number(s)==s){const o=n+1;for(;++n;){const i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(In.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case N.CONNECT:return Cr(n);case N.DISCONNECT:return n===void 0;case N.CONNECT_ERROR:return typeof n=="string"||Cr(n);case N.EVENT:case N.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&rl.indexOf(n[0])===-1);case N.ACK:case N.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ol{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=nl(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const il=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function Cr(t){return Object.prototype.toString.call(t)==="[object Object]"}const al=Object.freeze(Object.defineProperty({__proto__:null,Decoder:In,Encoder:sl,get PacketType(){return N}},Symbol.toStringTag,{value:"Module"}));function G(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const cl=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Qs extends U{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[G(e,"open",this.onopen.bind(this)),G(e,"packet",this.onpacket.bind(this)),G(e,"error",this.onerror.bind(this)),G(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,s,o;if(cl.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:N.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const l=this.ids++,m=n.pop();this._registerAckCallback(l,m),i.id=l}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!a||(u?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),i=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,s)=>{const o=(i,a)=>i?s(i):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...o)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:N.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}
vendor: 7,070 bytes, line 10
10_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case N.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case N.EVENT:case N.BINARY_EVENT:this.onevent(e);break;case N.ACK:case N.BINARY_ACK:this.onack(e);break;case N.DISCONNECT:this.ondisconnect();break;case N.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:N.ACK,id:e,data:s}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:N.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Ue(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ue.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Ue.prototype.reset=function(){this.attempts=0};Ue.prototype.setMin=function(t){this.ms=t};Ue.prototype.setMax=function(t){this.max=t};Ue.prototype.setJitter=function(t){this.jitter=t};class bn extends U{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Lt(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ue({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const s=n.parser||al;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Yu(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=G(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=G(n,"error",o);if(this._timeout!==!1){const a=this._timeout,u=this.setTimeoutFn(()=>{s(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(s),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(G(e,"ping",this.onping.bind(this)),G(e,"data",this.ondata.bind(this)),G(e,"error",this.onerror.bind(this)),G(e,"close",this.onclose.bind(this)),G(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Nt(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Qs(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}
10cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Me={};function vt(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Xu(t,e.path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Me[s]&&o in Me[s].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let u;return a?u=new bn(r,e):(Me[s]||(Me[s]=new bn(r,e)),u=Me[s]),n.query&&!e.query&&(e.query=n.queryKey),u.socket(n.path,e)}Object.assign(vt,{Manager:bn,Socket:Qs,io:vt,connect:vt});const ul=250;function Or(t,e){var n;const r=vt(t.serverUrl,{path:t.mountPath,transports:t.transports,query:{app_id:t.appId,token:(n=t.token)!==null&&n!==void 0?n:Xe()}});return r.on("connect",async()=>{var s;return(s=e.connect)===null||s===void 0?void 0:s.call(e)}),r.on("update_model",async s=>{var o;return(o=e.update_model)===null||o===void 0?void 0:o.call(e,s)}),r.on("error",async s=>{var o;return(o=e.error)===null||o===void 0?void 0:o.call(e,s)}),r.on("connect_error",async s=>{var o;return(o=e.error)===null||o===void 0?void 0:o.call(e,s)}),r}function ll({config:t}){let e={...t};const n={},r={},s={connect:async()=>{const h=[];Object.keys(n).forEach(b=>{const v=g(b);v.length!==0&&(c(b),v.forEach(({connect:T})=>{const R=async()=>T==null?void 0:T();h.push(R())}))}),await Promise.all(h)},update_model:async h=>{const v=g(h.room).map(T=>{var R;return(R=T.update_model)===null||R===void 0?void 0:R.call(T,h)});await Promise.all(v)},error:async h=>{const b=Object.values(n).flat().map(v=>{var T;return(T=v.error)===null||T===void 0?void 0:T.call(v,h)});await Promise.all(b)}};let o=Or(t,s);function i(){a()}function a(){_(),o&&o.disconnect()}function u(h){i(),e={...e,...h},o=Or(e,s)}function c(h){o.emit("join",h)}function l(h){o.emit("leave",h)}async function m(h,b){var v;const T=JSON.stringify(b);return(v=s.update_model)===null||v===void 0?void 0:v.call(s,{room:h,data:T})}function g(h){var b;return(b=n[h])!==null&&b!==void 0?b:[]}function E(h){const b=r[h];b&&(clearTimeout(b),delete r[h])}function _(){Object.keys(r).forEach(h=>{var b,v;clearTimeout(r[h]),delete r[h],((v=(b=n[h])===null||b===void 0?void 0:b.length)!==null&&v!==void 0?v:0)===0&&delete n[h]})}function p(h){E(h),r[h]=setTimeout(()=>{var b,v;delete r[h],!(((v=(b=n[h])===null||b===void 0?void 0:b.length)!==null&&v!==void 0?v:0)>0)&&(l(h),delete n[h])},ul)}return{socket:o,subscribeToRoom:(h,b)=>{n[h]?E(h):(c(h),n[h]=[]),n[h].push(b);let v=!1;return()=>{var T,R;v||(v=!0,n[h]=(R=(T=n[h])===null||T===void 0?void 0:T.filter(C=>C!==b))!==null&&R!==void 0?R:[],n[h].length===0&&p(h))}},updateConfig:u,updateModel:m,disconnect:a}}const qe=typeof window<"u"?window:{base44SharedInstances:{}};function dl(t,e){return qe.base44SharedInstances||(qe.base44SharedInstances={}),qe.base44SharedInstances[t]||(qe.base44SharedInstances[t]={instance:e()}),qe.base44SharedInstances[t].instance}const fl="__user_heartbeat_event__",hl="__initialization_event__",pl="__session_duration_event__",Pr="analytics-enable",Nr="base44_analytics_session_id",ml={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},yl="analytics",k=dl(yl,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...ml,...Sl()}})),gl=({axiosClient:t,serverUrl:e,appId:n,userAuthModule:r})=>{var s;const{maxQueueSize:o,throttleTime:i,batchSize:a}=k.config;if(!(!((s=k.config)===null||s===void 0)&&s.enabled))return{track:()=>{},cleanup:()=>{}};let u;const c=`${e}/api/apps/${n}/analytics/track/batch`,l=async v=>{await t.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:v}})},m=v=>{try{const T=JSON.stringify({events:v}),R=new Blob([T],{type:"application/json"});return typeof navigator>"u"||T.length>6e4||!navigator.sendBeacon(c,R)}catch{return!1}},g=async(v,T={})=>
10{if(v.length===0)return;const R=await Tl(r),C=v.map(_l(R));try{(!T.isBeacon||!m(C))&&await l(C)}catch{}},E=()=>{kr(g,{throttleTime:i,batchSize:a})},_=v=>{if(k.requestsQueue.length>=o)return;const T=El();k.requestsQueue.push({...v,...T}),E()},p=()=>{kr(g,{throttleTime:i,batchSize:a}),u=Dr(_),bl()},f=()=>{Lr(),u==null||u(),vl(_);const v=k.requestsQueue.splice(0);g(v,{isBeacon:!0})},h=()=>{typeof window>"u"||(document.visibilityState==="hidden"?f():document.visibilityState==="visible"&&p())},b=()=>{Lr(),u==null||u(),typeof window<"u"&&window.removeEventListener("visibilitychange",h)};return E(),u=Dr(_),wl(_),typeof window<"u"&&window.addEventListener("visibilitychange",h),{track:_,cleanup:b}};function Lr(){k.isProcessing=!1}async function kr(t,e){if(k.isProcessing)return;k.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=e??{};for(;k.isProcessing&&k.requestsQueue.length>0;){const s=k.requestsQueue.splice(0,r);s.length&&await t(s),await new Promise(o=>setTimeout(o,n))}k.isProcessing=!1}function Dr(t){var e;if(k.isHeartBeatProcessing||((e=k.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};k.isHeartBeatProcessing=!0;const n=setInterval(()=>{t({eventName:fl})},k.config.heartBeatInterval);return()=>{clearInterval(n),k.isHeartBeatProcessing=!1}}function wl(t){typeof window>"u"||k.wasInitializationTracked||(k.wasInitializationTracked=!0,t({eventName:hl,properties:{referrer:document==null?void 0:document.referrer}}))}function bl(){typeof window>"u"||k.sessionStartTime!==null||(k.sessionStartTime=new Date().toISOString())}function vl(t){if(typeof window>"u"||k.sessionStartTime===null)return;const e=new Date().getTime()-new Date(k.sessionStartTime).getTime();k.sessionStartTime=null,t({eventName:pl,properties:{sessionDuration:e}})}function El(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function _l(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let Gt=null;async function Tl(t){if(!k.sessionContext){if(!Gt){const e=Rl();Gt=t.me().then(n=>({user_id:n.id,session_id:e})).catch(()=>({user_id:null,session_id:e}))}k.sessionContext=await Gt}return k.sessionContext}function Sl(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get(Pr);if(e==null||!e.length)return;const n=new URLSearchParams(window.location.search);n.delete(Pr);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:e==="true"}}function Rl(){if(typeof window>"u")return Kt();try{const t=localStorage.getItem(Nr);if(!t){const e=Kt();return localStorage.setItem(Nr,e),e}return t}catch{return Kt()}}function Al(t){var e,n;const{serverUrl:r="https://base44.app",appId:s,token:o,serviceToken:i,requiresAuth:a=!1,appBaseUrl:u,options:c,functionsVersion:l,headers:m}=t,g=typeof u=="string"?u:"",E={serverUrl:r,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:s,token:o};let _=null;const p=()=>(_||(_=ll({config:E})),_),f={...m,"X-App-Id":String(s)},h=l?{...f,"Base44-Functions-Version":l}:f,b=He({baseURL:`${r}/api`,headers:f,token:o,onError:c==null?void 0:c.onError}),v=He({baseURL:`${r}/api`,headers:h,token:o,interceptResponses:!1,onError:c==null?void 0:c.onError}),T={...f,...o?{"on-behalf-of":`Bearer ${o}`}:{}},R=He({baseURL:`${r}/api`,headers:T,token:i,onError:c==null?void 0:c.onError}),C=He({baseURL:`${r}/api`,headers:h,token:i,interceptResponses:!1}),x=lu(b,v,s,{appBaseUrl:g});if(typeof window<"u"){const P=o||Xe();P&&x.setToken(P)}const D={entities:br({axios:b,appId:s,getSocket:p}),integrations:vr(b,s),connectors:hu(b,s),auth:x,functions:Er(v,s,{getAuthHeaders:()=>{const P={},$=o||Xe();return $&&(P.Authorization=`Bearer ${$}`),P},baseURL:(e=v.defaults)===null||e===void 0?void 0:e.baseURL}),agents:_r({axios:b,getSocket:p,appId:s,serverUrl:r,token:o}),appLogs:Tr(b,s),users:mu(b,s),analytics:gl({axiosClient:b,serverUrl:r,appId:s,userAuthModule:x}),cleanup:()=>{D.analytics.cleanup(),_&&_.disconnect()}},j={entities:br({axios:R,appId:s,getSocket:p}),integrations:vr(R,s),sso:du(R,s),connectors:fu(R,s),functions:Er(C,s,{getAuthHeaders:()=>{const P={};return i&&(P.Authorization=`Bearer ${i}`),P},baseURL:(n=C.defaults)===null||n===void 0?void 0:n.baseURL}
10),agents:_r({axios:R,getSocket:p,appId:s,serverUrl:r,token:o}),appLogs:Tr(R,s),cleanup:()=>{_&&_.disconnect()}};return a&&typeof window<"u"&&setTimeout(async()=>{try{await D.auth.isAuthenticated()||D.auth.redirectToLogin(window.location.href)}catch{D.auth.redirectToLogin(window.location.href)}},0),{...D,setToken(P){D.auth.setToken(P),_&&_.updateConfig({token:P}),E.token=P},getConfig(){return{serverUrl:r,appId:s,requiresAuth:a}},get asServiceRole(){if(!i)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return j}}}const Gs=typeof window>"u",xl=Gs?{localStorage:new Map}:window,Je=xl.localStorage,Cl=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),Oe=(t,{defaultValue:e=void 0,removeFromUrl:n=!1}={})=>{if(Gs)return e;const r=`base44_${Cl(t)}`,s=new URLSearchParams(window.location.search),o=s.get(t);if(n){s.delete(t);const a=`${window.location.pathname}${s.toString()?`?${s.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,a)}if(o)return Je.setItem(r,o),o;if(e)return Je.setItem(r,e),e;const i=Je.getItem(r);return i||null},Ol=()=>(Oe("clear_access_token")==="true"&&(Je.removeItem("base44_access_token"),Je.removeItem("token")),{appId:Oe("app_id",{defaultValue:void 0}),token:Oe("access_token",{removeFromUrl:!0}),fromUrl:Oe("from_url",{defaultValue:window.location.href}),functionsVersion:Oe("functions_version",{defaultValue:void 0}),appBaseUrl:Oe("app_base_url",{defaultValue:void 0})}),ze={...Ol()},{appId:Pl,token:Nl,functionsVersion:Ll,appBaseUrl:kl}=ze,We=Al({appId:Pl,token:Nl,functionsVersion:Ll,serverUrl:"",requiresAuth:!1,appBaseUrl:kl});function Dl({}){var s;const e=lo().pathname.substring(1),{data:n,isFetched:r}=oo({queryKey:["user"],queryFn:async()=>{try{return{user:await We.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return w.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:w.jsx("div",{className:"max-w-md w-full",children:w.jsxs("div",{className:"text-center space-y-6",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),w.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),w.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",w.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((s=n.user)==null?void 0:s.role)==="admin"&&w.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:w.jsxs("div",{className:"flex items-start space-x-3",children:[w.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:w.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),w.jsxs("div",{className:"text-left space-y-1",children:[w.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),w.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),w.jsx("div",{className:"pt-6",children:w.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[w.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Zs=y.createContext(),Il=({children:t})=>{const[e,n]=y.useState(null),[r,s]=y.useState(!1),[o,i]=y.useState(!0),[a,u]=y.useState(!0),[c,l]=y.useState(null),[m,g]=y.useState(null);y.useEffect(()=>{E()},[]);const E=async()=>{var h,b;try{u(!0),l(null);const v=He({baseURL:"/api/apps/public",headers:{"X-App-Id":ze.appId},token:ze.token,interceptResponses:!0});try{const T=await v.get(`/prod/public-settings/by-id/${ze.appId}`);g(T),ze.token?await _():(i(!1),s(!1)),u(!1)}catch(T){if(T.status===403&&((b=(h=T.data)==null?void 0:h.extra_data)!=null&&b.reason)){const R=T.data.extra_data.reason;l(R==="auth_required"?{type:"auth_required",message:"Authentication required"}:R==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:R,message:T.message})}else l({type:"unknown",message:T.message||"Failed to load app"});u(!1),i(!1)}}catch(v){l({type:"unknown",message:v.message||"An unexpected error occurred"}),u(!1),i(!1)}},_=async()=>{try{i(!0);const h=await We.auth.me();n(h),s(!0),i(!1)}catch(h){i(!1),s(!1),(h.status===401||h.status===403)&&l({type:"auth_required",message:"Authentication required"})}},p=(h=!0)=>{n(null),s(!1),h?We.auth.logout(window.location.href):We.auth.logout()},f=()=>{We.auth.redirectToLogin(window.location.href)};return w.jsx(Zs.Provider,{value:{user:e,isAuthenticated:r,isLoadingAuth:o,isLoadingPublicSettings:a,authError:c,appPublicSettings:m,logout:p,navigateToLogin:f,checkAppState:E},children:t})},Ul=()=>{const t=y.useContext(Zs);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},Bl=()=>w.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:w.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:w.jsxs("div",{className:"text-center",children:[w.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:w.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),w.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),w.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[w.jsx("p",{children:"If you believe this is an error, you can:"}),w.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[w.jsx("li",{children:"Verify you are logged in with the correct account"}),w.jsx("li",{children:"Contact the app administrator for access"}),w.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),jl=y.lazy(()=>ke(()=>import("./Home-Cwrlvm2P.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),Ir=y.lazy(()=>ke(()=>import("./Editor-DfsY2D3L.js"),__vite__mapDeps([9,1,2,5,8,3,10]))),$l=y.lazy(()=>ke(()=>import("./Loja-BxBnSDV6.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]))),Fl=y.lazy(()=>ke(()=>import("./Produto-DXQLcd4K.js"),__vite__mapDeps([12,1,2,3,6,7,5,8]))),Ml=y.lazy(()=>ke(()=>import("./Sobre-BD2x07bV.js"),__vite__mapDeps([13,1,2,3,6,5,8]))),ql=y.lazy(()=>ke(()=>import("./Admin-g4OaSt_6.js"),__vite__mapDeps([14,1,2,3,6,5,8]))),Hl=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:n,navigateToLogin:r}=Ul();if(e||t)return w.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:w.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return w.jsx(Bl,{});if(n.type==="auth_required")return r(),null}return w.jsx(y.Suspense,{fallback:w.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-slate-950",children:w.jsx("div",{className:"w-8 h-8 border-4 border-emerald-200 border-t-emerald-500 rounded-full animate-spin"})}),children:w.jsxs(ho,{children:[w.jsx(de,{path:"/",element:w.jsx(jl,{})}),w.jsx(de,{path:"/admin",element:w.jsx(ql,{})}),w.jsx(de,{path:"/loja",element:w.jsx($l,{})}),w.jsx(de,{path:"/sobre",element:w.jsx(Ml,{})}),w.jsx(de,{path:"/produto/:slug",element:w.jsx(Fl,{})}),w.jsx(de,{path:"/editor",element:w.jsx(Ir,{})}),w.jsx(de,{path:"/editor/:id",element:w.jsx(Ir,{})}),w.jsx(de,{path:"*",element:w.jsx(Dl,{})})]})})};function Vl(){return w.jsx(ys,{children:w.jsx(Il,{children:w.jsxs(io,{client:Li,children:[w.jsx(fo,{children:w.jsx(Hl,{})}),w.jsx(Ni,{})]})})})}yo.createRoot(document.getElementById("root")).render(w.jsx(Vl,{}));export{Ql as H,ie as P,Xl as S,Qo as a,zr as b,J as c,jr as d,_e as e,Do as f,De as g,We as h,xi as i,_o as j,Ye as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.