PageSourceSearch

https://stowmybags.base44.app/assets/index-CfW6ewQH.js

js stowmybags.base44.app collected 2026-10-03 03:09:02 UTC 1,368,418 bytes, 581 lines download raw bytes

vendor: 4,648 bytes, lines 1-9
1var zj=e=>{throw TypeError(e)};var tL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Py=(e,t,n)=>t.has(e)||zj("Cannot "+n);var Y=(e,t,n)=>(Py(e,t,"read from private field"),n?n.call(e):t.get(e)),st=(e,t,n)=>t.has(e)?zj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),De=(e,t,n,r)=>(Py(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),bt=(e,t,n)=>(Py(e,t,"access private method"),n);var Im=(e,t,n,r)=>({set _(i){De(e,t,i,n)},get _(){return Y(e,t,r)}});var GJ=tL((xee,Np)=>{function sL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(r,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();function $0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty={exports:{}},Gu={},Ey={exports:{}},pt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var $j;function nL(){if($j)return pt;$j=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function w(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,_={};function C(U,ie,je){this.props=U,this.context=ie,this.refs=_,this.updater=je||N}C.prototype.isReactComponent={},C.prototype.setState=function(U,ie){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,ie,"setState")},C.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function A(){}A.prototype=C.prototype;function M(U,ie,je){this.props=U,this.context=ie,this.refs=_,this.updater=je||N}var E=M.prototype=new A;E.constructor=M,j(E,C.prototype),E.isPureReactComponent=!0;var D=Array.isArray,I=Object.prototype.hasOwnProperty,z={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function V(U,ie,je){var be,Se={},Ne=null,he=null;if(ie!=null)for(be in ie.ref!==void 0&&(he=ie.ref),ie.key!==void 0&&(Ne=""+ie.key),ie)I.call(ie,be)&&!H.hasOwnProperty(be)&&(Se[be]=ie[be]);var Re=arguments.length-2;if(Re===1)Se.children=je;else if(1<Re){for(var qe=Array(Re),Je=0;Je<Re;Je++)qe[Je]=arguments[Je+2];Se.children=qe}if(U&&U.defaultProps)for(be in Re=U.defaultProps,Re)Se[be]===void 0&&(Se[be]=Re[be]);return{$$typeof:e,type:U,key:Ne,ref:he,props:Se,_owner:z.current}}function Q(U,ie){return{$$typeof:e,type:U.type,key:ie,ref:U.ref,props:U.props,_owner:U._owner}}function J(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function le(U){var ie={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(je){return ie[je]})}var xe=/\/+/g;function Me(U,ie){return typeof U=="object"&&U!==null&&U.key!=null?le(""+U.key):ie.toString(36)}function ke(U,ie,je,be,Se){var Ne=typeof U;(Ne==="undefined"||Ne==="boolean")&&(U=null);var he=!1;if(U===null)he=!0;else switch(Ne){case"string":case"number":he=!0;break;case"object":switch(U.$$typeof){case e:case t:he=!0}}if(he)return he=U,Se=Se(he),U=be===""?"."+Me(he,0):be,D(Se)?(je="",U!=null&&(je=U.replace(xe,"$&/")+"/"),ke(Se,ie,je,"",function(Je){return Je}
vendor: 11,167 bytes, lines 9-33
9)):Se!=null&&(J(Se)&&(Se=Q(Se,je+(!Se.key||he&&he.key===Se.key?"":(""+Se.key).replace(xe,"$&/")+"/")+U)),ie.push(Se)),1;if(he=0,be=be===""?".":be+":",D(U))for(var Re=0;Re<U.length;Re++){Ne=U[Re];var qe=be+Me(Ne,Re);he+=ke(Ne,ie,je,qe,Se)}else if(qe=w(U),typeof qe=="function")for(U=qe.call(U),Re=0;!(Ne=U.next()).done;)Ne=Ne.value,qe=be+Me(Ne,Re++),he+=ke(Ne,ie,je,qe,Se);else if(Ne==="object")throw ie=String(U),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.");return he}function He(U,ie,je){if(U==null)return U;var be=[],Se=0;return ke(U,be,"","",function(Ne){return ie.call(je,Ne,Se++)}),be}function ye(U){if(U._status===-1){var ie=U._result;ie=ie(),ie.then(function(je){(U._status===0||U._status===-1)&&(U._status=1,U._result=je)},function(je){(U._status===0||U._status===-1)&&(U._status=2,U._result=je)}),U._status===-1&&(U._status=0,U._result=ie)}if(U._status===1)return U._result.default;throw U._result}var _e={current:null},B={transition:null},ce={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:B,ReactCurrentOwner:z};function ne(){throw Error("act(...) is not supported in production builds of React.")}return pt.Children={map:He,forEach:function(U,ie,je){He(U,function(){ie.apply(this,arguments)},je)},count:function(U){var ie=0;return He(U,function(){ie++}),ie},toArray:function(U){return He(U,function(ie){return ie})||[]},only:function(U){if(!J(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},pt.Component=C,pt.Fragment=n,pt.Profiler=i,pt.PureComponent=M,pt.StrictMode=r,pt.Suspense=m,pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,pt.act=ne,pt.cloneElement=function(U,ie,je){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var be=j({},U.props),Se=U.key,Ne=U.ref,he=U._owner;if(ie!=null){if(ie.ref!==void 0&&(Ne=ie.ref,he=z.current),ie.key!==void 0&&(Se=""+ie.key),U.type&&U.type.defaultProps)var Re=U.type.defaultProps;for(qe in ie)I.call(ie,qe)&&!H.hasOwnProperty(qe)&&(be[qe]=ie[qe]===void 0&&Re!==void 0?Re[qe]:ie[qe])}var qe=arguments.length-2;if(qe===1)be.children=je;else if(1<qe){Re=Array(qe);for(var Je=0;Je<qe;Je++)Re[Je]=arguments[Je+2];be.children=Re}return{$$typeof:e,type:U.type,key:Se,ref:Ne,props:be,_owner:he}},pt.createContext=function(U){return U={$$typeof:d,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:c,_context:U},U.Consumer=U},pt.createElement=V,pt.createFactory=function(U){var ie=V.bind(null,U);return ie.type=U,ie},pt.createRef=function(){return{current:null}},pt.forwardRef=function(U){return{$$typeof:h,render:U}},pt.isValidElement=J,pt.lazy=function(U){return{$$typeof:p,_payload:{_status:-1,_result:U},_init:ye}},pt.memo=function(U,ie){return{$$typeof:x,type:U,compare:ie===void 0?null:ie}},pt.startTransition=function(U){var ie=B.transition;B.transition={};try{U()}finally{B.transition=ie}},pt.unstable_act=ne,pt.useCallback=function(U,ie){return _e.current.useCallback(U,ie)},pt.useContext=function(U){return _e.current.useContext(U)},pt.useDebugValue=function(){},pt.useDeferredValue=function(U){return _e.current.useDeferredValue(U)},pt.useEffect=function(U,ie){return _e.current.useEffect(U,ie)},pt.useId=function(){return _e.current.useId()},pt.useImperativeHandle=function(U,ie,je){return _e.current.useImperativeHandle(U,ie,je)},pt.useInsertionEffect=function(U,ie){return _e.current.useInsertionEffect(U,ie)},pt.useLayoutEffect=function(U,ie){return _e.current.useLayoutEffect(U,ie)},pt.useMemo=function(U,ie){return _e.current.useMemo(U,ie)},pt.useReducer=function(U,ie,je){return _e.current.useReducer(U,ie,je)},pt.useRef=function(U){return _e.current.useRef(U)},pt.useState=function(U){return _e.current.useState(U)},pt.useSyncExternalStore=function(U,ie,je){return _e.current.useSyncExternalStore(U,ie,je)},pt.useTransition=function(){return _e.current.useTransition()},pt.version="18.3.1",pt}var Uj;function U0(){return Uj||(Uj=1,Ey.exports=nL()),Ey.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Vj;function rL(){if(Vj)return Gu;Vj=1;var e=U0(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function d(h,m,x){var p,g={},w=null,N=null;x!==void 0&&(w=""+x),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(N=m.ref);for(p in m)r.call(m,p)&&!c.hasOwnProperty(p)&&(g[p]=m[p]);if(h&&h.defaultProps)for(p in m=h.defaultProps,m)g[p]===void 0&&(g[p]=m[p]);return{$$typeof:t,type:h,key:w,ref:N,props:g,_owner:i.current}}return Gu.Fragment=n,Gu.jsx=d,Gu.jsxs=d,Gu}var Wj;function iL(){return Wj||(Wj=1,Ty.exports=rL()),Ty.exports}var s=iL(),b=U0();const Et=$0(b),V0=sL({__proto__:null,default:Et},[b]);var Fm={},Ay={exports:{}},_n={},My={exports:{}},Ry={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Hj;function aL(){return Hj||(Hj=1,(function(e){function t(B,ce){var ne=B.length;B.push(ce);e:for(;0<ne;){var U=ne-1>>>1,ie=B[U];if(0<i(ie,ce))B[U]=ce,B[ne]=ie,ne=U;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var ce=B[0],ne=B.pop();if(ne!==ce){B[0]=ne;e:for(var U=0,ie=B.length,je=ie>>>1;U<je;){var be=2*(U+1)-1,Se=B[be],Ne=be+1,he=B[Ne];if(0>i(Se,ne))Ne<ie&&0>i(he,Se)?(B[U]=he,B[Ne]=ne,U=Ne):(B[U]=Se,B[be]=ne,U=be);else if(Ne<ie&&0>i(he,ne))B[U]=he,B[Ne]=ne,U=Ne;else break e}}return ce}function i(B,ce){var ne=B.sortIndex-ce.sortIndex;return ne!==0?ne:B.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();e.unstable_now=function(){return d.now()-h}}var m=[],x=[],p=1,g=null,w=3,N=!1,j=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(B){for(var ce=n(x);ce!==null;){if(ce.callback===null)r(x);else if(ce.startTime<=B)r(x),ce.sortIndex=ce.expirationTime,t(m,ce);else break;ce=n(x)}}function D(B){if(_=!1,E(B),!j)if(n(m)!==null)j=!0,ye(I);else{var ce=n(x);ce!==null&&_e(D,ce.startTime-B)}}function I(B,ce){j=!1,_&&(_=!1,A(V),V=-1),N=!0;var ne=w;try{for(E(ce),g=n(m);g!==null&&(!(g.expirationTime>ce)||B&&!le());){var U=g.callback;if(typeof U=="function"){g.callback=null,w=g.priorityLevel;var ie=U(g.expirationTime<=ce);ce=e.unstable_now(),typeof ie=="function"?g.callback=ie:g===n(m)&&r(m),E(ce)}else r(m);g=n(m)}if(g!==null)var je=!0;else{var be=n(x);be!==null&&_e(D,be.startTime-ce),je=!1}return je}finally{g=null,w=ne,N=!1}}var z=!1,H=null,V=-1,Q=5,J=-1;function le(){return!(e.unstable_now()-J<Q)}function xe(){if(H!==null){var B=e.unstable_now();J=B;var ce=!0;try{ce=H(!0,B)}finally{ce?Me():(z=!1,H=null)}}else z=!1}var Me;if(typeof M=="function")Me=function(){M(xe)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,He=ke.port2;ke.port1.onmessage=xe,Me=function(){He.postMessage(null)}}else Me=function(){C(xe,0)};function ye(B){H=B,z||(z=!0,Me())}function _e(B,ce){V=C(function(){B(e.unstable_now())},ce)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){j||N||(j=!0,ye(I))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(m)},e.unstable_next=function(B){switch(w){case 1:case 2:case 3:var ce=3;break;default:ce=w}var ne=w;w=ce;try{return B()}finally{w=ne}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,ce){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=w;w=B;try{return ce()}finally{w=ne}},e.unstable_scheduleCallback=function(B,ce,ne){var U=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?U+ne:U):ne=U,B){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=ne+ie,B={id:p++,callback:ce,priorityLevel:B,startTime:ne,expirationTime:ie,sortIndex:-1},ne>U?(B.sortIndex=ne,t(x,B),n(m)===null&&B===n(x)&&(_?(A(V),V=-1):_=!0,_e(D,ne-U))):(B.sortIndex=ie,t(m,B),j||N||(j=!0,ye(I))),B},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(B){var ce=w;return function(){var ne=w;w=ce;try{return B.apply(this,arguments)}finally{w=ne}}}})(Ry)),Ry}var Yj;function oL(){return Yj||(Yj=1,My.exports=aL()),My.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var qj;function lL(){if(qj)return _n;qj=1;var e=U0(),t=oL();function n(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function c(a,l){d(a,l),d(a+"Capture",l)}function d(a,l){for(i[a]=l,a=0;a<l.length;a++)r.add(l[a])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function w(a){return m.call(g,a)?!0:m.call(p,a)?!1:x.test(a)?g[a]=!0:(p[a]=!0,!1)}function N(a,l,f,v){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function j(a,l,f,v){if(l===null||typeof l>"u"||N(a,l,f,v))return!0;
vendor: 47,200 bytes, lines 33-38
33if(v)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function _(a,l,f,v,k,P,R){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=k,this.mustUseProperty=f,this.propertyName=a,this.type=l,this.sanitizeURL=P,this.removeEmptyString=R}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new _(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];C[l]=new _(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new _(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new _(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new _(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){C[a]=new _(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){C[a]=new _(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){C[a]=new _(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){C[a]=new _(a,5,!1,a.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(A,M);C[l]=new _(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(A,M);C[l]=new _(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(A,M);C[l]=new _(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){C[a]=new _(a,1,!1,a.toLowerCase(),null,!1,!1)}),C.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){C[a]=new _(a,1,!1,a.toLowerCase(),null,!0,!0)});function E(a,l,f,v){var k=C.hasOwnProperty(l)?C[l]:null;(k!==null?k.type!==0:v||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(j(l,f,k,v)&&(f=null),v||k===null?w(l)&&(f===null?a.removeAttribute(l):a.setAttribute(l,""+f)):k.mustUseProperty?a[k.propertyName]=f===null?k.type===3?!1:"":f:(l=k.attributeName,v=k.attributeNamespace,f===null?a.removeAttribute(l):(k=k.type,f=k===3||k===4&&f===!0?"":""+f,v?a.setAttributeNS(v,l,f):a.setAttribute(l,f))))}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),z=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),le=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),Me=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),He=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),B=Symbol.iterator;function ce(a){return a===null||typeof a!="object"?null:(a=B&&a[B]||a["@@iterator"],typeof a=="function"?a:null)}var ne=Object.assign,U;function ie(a){if(U===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);U=l&&l[1]||""}return`
34`+U+a}var je=!1;function be(a,l){if(!a||je)return"";je=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(re){var v=re}Reflect.construct(a,[],l)}else{try{l.call()}catch(re){v=re}a.call(l.prototype)}else{try{throw Error()}catch(re){v=re}a()}}catch(re){if(re&&v&&typeof re.stack=="string"){for(var k=re.stack.split(`
35`),P=v.stack.split(`
36`),R=k.length-1,F=P.length-1;1<=R&&0<=F&&k[R]!==P[F];)F--;for(;1<=R&&0<=F;R--,F--)if(k[R]!==P[F]){if(R!==1||F!==1)do if(R--,F--,0>F||k[R]!==P[F]){var W=`
37`+k[R].replace(" at new "," at ");return a.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",a.displayName)),W}while(1<=R&&0<=F);break}}}finally{je=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?ie(a):""}function Se(a){switch(a.tag){case 5:return ie(a.type);case 16:return ie("Lazy");case 13:return ie("Suspense");case 19:return ie("SuspenseList");case 0:case 2:case 15:return a=be(a.type,!1),a;case 11:return a=be(a.type.render,!1),a;case 1:return a=be(a.type,!0),a;default:return""}}function Ne(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case H:return"Fragment";case z:return"Portal";case Q:return"Profiler";case V:return"StrictMode";case Me:return"Suspense";case ke:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case le:return(a.displayName||"Context")+".Consumer";case J:return(a._context.displayName||"Context")+".Provider";case xe:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case He:return l=a.displayName||null,l!==null?l:Ne(a.type)||"Memo";case ye:l=a._payload,a=a._init;try{return Ne(a(l))}catch{}}return null}function he(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(l);case 8:return l===V?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Re(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function qe(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Je(a){var l=qe(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),v=""+a[l];if(!a.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var k=f.get,P=f.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return k.call(this)},set:function(R){v=""+R,P.call(this,R)}}),Object.defineProperty(a,l,{enumerable:f.enumerable}),{getValue:function(){return v},setValue:function(R){v=""+R},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function ht(a){a._valueTracker||(a._valueTracker=Je(a))}function ct(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var f=l.getValue(),v="";return a&&(v=qe(a)?a.checked?"true":"false":a.value),a=v,a!==f?(l.setValue(a),!0):!1}function cs(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Vs(a,l){var f=l.checked;return ne({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function Nr(a,l){var f=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;f=Re(l.value!=null?l.value:f),a._wrapperState={initialChecked:v,initialValue:f,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Sr(a,l){l=l.checked,l!=null&&E(a,"checked",l,!1)}function An(a,l){Sr(a,l);var f=Re(l.value),v=l.type;if(f!=null)v==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(v==="submit"||v==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?Qr(a,l.type,f):l.hasOwnProperty("defaultValue")&&Qr(a,l.type,Re(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function Li(a,l,f){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,f||l===a.value||(a.value=l),a.defaultValue=l}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function Qr(a,l,f){(l!=="number"||cs(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var ka=Array.isArray;function Xr(a,l,f,v){if(a=a.options,l){l={};for(var k=0;k<f.length;k++)l["$"+f[k]]=!0;for(f=0;f<a.length;f++)k=l.hasOwnProperty("$"+a[f].value),a[f].selected!==k&&(a[f].selected=k),k&&v&&(a[f].defaultSelected=!0)}else{for(f=""+Re(f),l=null,k=0;k<a.length;k++){if(a[k].value===f){a[k].selected=!0,v&&(a[k].defaultSelected=!0);return}l!==null||a[k].disabled||(l=a[k])}l!==null&&(l.selected=!0)}}function sc(a,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return ne({},l,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Xd(a,l){var f=l.value;if(f==null){if(f=l.children,l=l.defaultValue,f!=null){if(l!=null)throw Error(n(92));if(ka(f)){if(1<f.length)throw Error(n(93));f=f[0]}l=f}l==null&&(l=""),f=l}a._wrapperState={initialValue:Re(f)}}function pf(a,l){var f=Re(l.value),v=Re(l.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),l.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),v!=null&&(a.defaultValue=""+v)}function gf(a){var l=a.textContent;l===a._wrapperState.initialValue&&l!==""&&l!==null&&(a.value=l)}function nc(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rc(a,l){return a==null||a==="http://www.w3.org/1999/xhtml"?nc(l):a==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Uo,xf=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,f,v,k){MSApp.execUnsafeLocalFunction(function(){return a(l,f,v,k)})}:a})(function(a,l){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=l;else{for(Uo=Uo||document.createElement("div"),Uo.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Uo.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Ca(a,l){if(l){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=l;return}}a.textContent=l}var Pa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rx=["Webkit","ms","Moz","O"];Object.keys(Pa).forEach(function(a){rx.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),Pa[l]=Pa[a]})});function Jd(a,l,f){return l==null||typeof l=="boolean"||l===""?"":f||typeof l!="number"||l===0||Pa.hasOwnProperty(a)&&Pa[a]?(""+l).trim():l+"px"}function ic(a,l){a=a.style;for(var f in l)if(l.hasOwnProperty(f)){var v=f.indexOf("--")===0,k=Jd(f,l[f],v);f==="float"&&(f="cssFloat"),v?a.setProperty(f,k):a[f]=k}}var yf=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function eu(a,l){if(l){if(yf[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Di(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tu=null;function su(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ac=null,Oi=null,Ii=null;function vf(a){if(a=Zi(a)){if(typeof ac!="function")throw Error(n(280));var l=a.stateNode;l&&(l=Rc(l),ac(a.stateNode,a.type,l))}}function bf(a){Oi?Ii?Ii.push(a):Ii=[a]:Oi=a}function wf(){if(Oi){var a=Oi,l=Ii;if(Ii=Oi=null,vf(a),l)for(a=0;a<l.length;a++)vf(l[a])}}function _f(a,l){return a(l)}function jf(){}var nu=!1;function oc(a,l,f){if(nu)return a(l,f);nu=!0;try{return _f(a,l,f)}finally{nu=!1,(Oi!==null||Ii!==null)&&(jf(),wf())}}function Vo(a,l){var f=a.stateNode;if(f===null)return null;var v=Rc(f);if(v===null)return null;f=v[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(n(231,l,typeof f));return f}var ru=!1;if(h)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){ru=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{ru=!1}function ix(a,l,f,v,k,P,R,F,W){var re=Array.prototype.slice.call(arguments,3);try{l.apply(f,re)}catch(pe){this.onError(pe)}}var Ws=!1,Ve=null,Ho=!1,lc=null,Nf={onError:function(a){Ws=!0,Ve=a}};function Sf(a,l,f,v,k,P,R,F,W){Ws=!1,Ve=null,ix.apply(Nf,arguments)}function iu(a,l,f,v,k,P,R,F,W){if(Sf.apply(this,arguments),Ws){if(Ws){var re=Ve;Ws=!1,Ve=null}else throw Error(n(198));Ho||(Ho=!0,lc=re)}}function Jr(a){var l=a,f=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(f=l.return),a=l.return;while(a)}return l.tag===3?f:null}function Fi(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function au(a){if(Jr(a)!==a)throw Error(n(188))}function ax(a){var l=a.alternate;if(!l){if(l=Jr(a),l===null)throw Error(n(188));return l!==a?null:a}for(var f=a,v=l;;){var k=f.return;if(k===null)break;var P=k.alternate;if(P===null){if(v=k.return,v!==null){f=v;continue}break}if(k.child===P.child){for(P=k.child;P;){if(P===f)return au(k),a;if(P===v)return au(k),l;P=P.sibling}throw Error(n(188))}if(f.return!==v.return)f=k,v=P;else{for(var R=!1,F=k.child;F;){if(F===f){R=!0,f=k,v=P;break}if(F===v){R=!0,v=k,f=P;break}F=F.sibling}if(!R){for(F=P.child;F;){if(F===f){R=!0,f=P,v=k;break}if(F===v){R=!0,v=P,f=k;break}F=F.sibling}if(!R)throw Error(n(189))}}if(f.alternate!==v)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?a:l}function kf(a){return a=ax(a),a!==null?Cf(a):null}function Cf(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var l=Cf(a);if(l!==null)return l;a=a.sibling}return null}var Pf=t.unstable_scheduleCallback,ou=t.unstable_cancelCallback,ox=t.unstable_shouldYield,cc=t.unstable_requestPaint,ns=t.unstable_now,lx=t.unstable_getCurrentPriorityLevel,lu=t.unstable_ImmediatePriority,Tf=t.unstable_UserBlockingPriority,dc=t.unstable_NormalPriority,cu=t.unstable_LowPriority,Ta=t.unstable_IdlePriority,Yo=null,Mn=null;function qo(a){if(Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(Yo,a,void 0,(a.current.flags&128)===128)}catch{}}var lt=Math.clz32?Math.clz32:Ea,Ht=Math.log,uc=Math.LN2;function Ea(a){return a>>>=0,a===0?32:31-(Ht(a)/uc|0)|0}var kr=64,Aa=4194304;function at(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Vt(a,l){var f=a.pendingLanes;if(f===0)return 0;var v=0,k=a.suspendedLanes,P=a.pingedLanes,R=f&268435455;if(R!==0){var F=R&~k;F!==0?v=at(F):(P&=R,P!==0&&(v=at(P)))}else R=f&~k,R!==0?v=at(R):P!==0&&(v=at(P));if(v===0)return 0;if(l!==0&&l!==v&&(l&k)===0&&(k=v&-v,P=l&-l,k>=P||k===16&&(P&4194240)!==0))return l;if((v&4)!==0&&(v|=f&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=v;0<l;)f=31-lt(l),k=1<<f,v|=a[f],l&=~k;return v}function du(a,l){switch(a){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hc(a,l){for(var f=a.suspendedLanes,v=a.pingedLanes,k=a.expirationTimes,P=a.pendingLanes;0<P;){var R=31-lt(P),F=1<<R,W=k[R];W===-1?((F&f)===0||(F&v)!==0)&&(k[R]=du(F,l)):W<=l&&(a.expiredLanes|=F),P&=~F}}function Hs(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Ef(){var a=kr;return kr<<=1,(kr&4194240)===0&&(kr=64),a}function Ma(a){for(var l=[],f=0;31>f;f++)l.push(a);return l}function Rn(a,l,f){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-lt(l),a[l]=f}function ds(a,l){var f=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var v=a.eventTimes;for(a=a.expirationTimes;0<f;){var k=31-lt(f),P=1<<k;l[k]=0,v[k]=-1,a[k]=-1,f&=~P}}function Cr(a,l){var f=a.entangledLanes|=l;for(a=a.entanglements;f;){var v=31-lt(f),k=1<<v;k&l|a[v]&l&&(a[v]|=l),f&=~k}}var vt=0;function Ra(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var fc,Bi,mc,pc,Go,Zo=!1,La=[],Ln=null,Pr=null,Zn=null,Ko=new Map,rt=new Map,js=[],Dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function uu(a,l){switch(a){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":Pr=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Ko.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":rt.delete(l.pointerId)}}function zi(a,l,f,v,k,P){return a===null||a.nativeEvent!==P?(a={blockedOn:l,domEventName:f,eventSystemFlags:v,nativeEvent:P,targetContainers:[k]},l!==null&&(l=Zi(l),l!==null&&Bi(l)),a):(a.eventSystemFlags|=v,l=a.targetContainers,k!==null&&l.indexOf(k)===-1&&l.push(k),a)}function hu(a,l,f,v,k){switch(l){case"focusin":return Ln=zi(Ln,a,l,f,v,k),!0;case"dragenter":return Pr=zi(Pr,a,l,f,v,k),!0;case"mouseover":return Zn=zi(Zn,a,l,f,v,k),!0;case"pointerover":var P=k.pointerId;return Ko.set(P,zi(Ko.get(P)||null,a,l,f,v,k)),!0;case"gotpointercapture":return P=k.pointerId,rt.set(P,zi(rt.get(P)||null,a,l,f,v,k)),!0}return!1}function gc(a){var l=Gi(a.target);if(l!==null){var f=Jr(l);if(f!==null){if(l=f.tag,l===13){if(l=Fi(f),l!==null){a.blockedOn=l,Go(a.priority,function(){mc(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Kn(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var f=vc(a.domEventName,a.eventSystemFlags,l[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var v=new f.constructor(f.type,f);tu=v,f.target.dispatchEvent(v),tu=null}else return l=Zi(f),l!==null&&Bi(l),a.blockedOn=f,!1;l.shift()}return!0}function xc(a,l,f){Kn(a)&&f.delete(l)}function Qo(){Zo=!1,Ln!==null&&Kn(Ln)&&(Ln=null),Pr!==null&&Kn(Pr)&&(Pr=null),Zn!==null&&Kn(Zn)&&(Zn=null),Ko.forEach(xc),rt.forEach(xc)}function rs(a,l){a.blockedOn===l&&(a.blockedOn=null,Zo||(Zo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Qo)))}function Dn(a){function l(k){return rs(k,a)}if(0<La.length){rs(La[0],a);for(var f=1;f<La.length;f++){var v=La[f];v.blockedOn===a&&(v.blockedOn=null)}}for(Ln!==null&&rs(Ln,a),Pr!==null&&rs(Pr,a),Zn!==null&&rs(Zn,a),Ko.forEach(l),rt.forEach(l),f=0;f<js.length;f++)v=js[f],v.blockedOn===a&&(v.blockedOn=null);for(;0<js.length&&(f=js[0],f.blockedOn===null);)gc(f),f.blockedOn===null&&js.shift()}var $i=D.ReactCurrentBatchConfig,Xo=!0;function cx(a,l,f,v){var k=vt,P=$i.transition;$i.transition=null;try{vt=1,Jo(a,l,f,v)}finally{vt=k,$i.transition=P}}function Af(a,l,f,v){var k=vt,P=$i.transition;$i.transition=null;try{vt=4,Jo(a,l,f,v)}finally{vt=k,$i.transition=P}}function Jo(a,l,f,v){if(Xo){var k=vc(a,l,f,v);if(k===null)o(a,l,v,yc,f),uu(a,v);else if(hu(k,a,l,f,v))v.stopPropagation();else if(uu(a,v),l&4&&-1<Dt.indexOf(a)){for(;k!==null;){var P=Zi(k);if(P!==null&&fc(P),P=vc(a,l,f,v),P===null&&o(a,l,v,yc,f),P===k)break;k=P}k!==null&&v.stopPropagation()}else o(a,l,v,null,f)}}var yc=null;function vc(a,l,f,v){if(yc=null,a=su(v),a=Gi(a),a!==null)if(l=Jr(a),l===null)a=null;else if(f=l.tag,f===13){if(a=Fi(l),a!==null)return a;a=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null);return yc=a,null}function xt(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lx()){case lu:return 1;case Tf:return 4;case dc:case cu:return 16;case Ta:return 536870912;default:return 16}default:return 16}}var ei=null,an=null,ti=null;function fu(){if(ti)return ti;var a,l=an,f=l.length,v,k="value"in ei?ei.value:ei.textContent,P=k.length;for(a=0;a<f&&l[a]===k[a];a++);var R=f-a;for(v=1;v<=R&&l[f-v]===k[P-v];v++);return ti=k.slice(a,1<v?1-v:void 0)}function bc(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Da(){return!0}function Mf(){return!1}function Ys(a){function l(f,v,k,P,R){this._reactName=f,this._targetInst=k,this.type=v,this.nativeEvent=P,this.target=R,this.currentTarget=null;for(var F in a)a.hasOwnProperty(F)&&(f=a[F],this[F]=f?f(P):P[F]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?Da:Mf,this.isPropagationStopped=Mf,this}return ne(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Da)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Da)},persist:function(){},isPersistent:Da}),l}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=Ys(Oa),Ui=ne({},Oa,{view:0,detail:0}),dx=Ys(Ui),pn,pu,Ia,On=ne({},Ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wi,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ia&&(Ia&&a.type==="mousemove"?(pn=a.screenX-Ia.screenX,pu=a.screenY-Ia.screenY):pu=pn=0,Ia=a),pn)},movementY:function(a){return"movementY"in a?a.movementY:pu}}),gu=Ys(On),Rf=ne({},On,{dataTransfer:0}),xu=Ys(Rf),ux=ne({},Ui,{relatedTarget:0}),wc=Ys(ux),Lf=ne({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),hx=Ys(Lf),fx=ne({},Oa,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),yu=Ys(fx),mx=ne({},Oa,{data:0}),vu=Ys(mx),Df={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_c={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function px(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=Vi[a])?!!l[a]:!1}function Wi(){return px}var gn=ne({},Ui,{key:function(a){if(a.key){var l=Df[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=bc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?_c[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wi,charCode:function(a){return a.type==="keypress"?bc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?bc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Of=Ys(gn),If=ne({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ff=Ys(If),bu=ne({},Ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wi}),wu=Ys(bu),gx=ne({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),xx=Ys(gx),Bf=ne({},On,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),yx=Ys(Bf),In=[9,13,27,32],si=h&&"CompositionEvent"in window,el=null;h&&"documentMode"in document&&(el=document.documentMode);var Tr=h&&"TextEvent"in window&&!el,zf=h&&(!si||el&&8<el&&11>=el),Hi=" ",$f=!1;function Fa(a,l){switch(a){case"keyup":return In.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Er=!1;function vx(a,l){switch(a){case"compositionend":return _u(l);case"keypress":return l.which!==32?null:($f=!0,Hi);case"textInput":return a=l.data,a===Hi&&$f?null:a;default:return null}}function ni(a,l){if(Er)return a==="compositionend"||!si&&Fa(a,l)?(a=fu(),ti=an=ei=null,Er=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return zf&&l.locale!=="ko"?null:l.data;default:return null}}var jc={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Uf(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!jc[a.type]:l==="textarea"}function Nc(a,l,f,v){bf(v),l=y(l,"onChange"),0<l.length&&(f=new mu("onChange","change",null,f,v),a.push({event:f,listeners:l}))}var tl=null,on=null;function bx(a){Au(a,0)}function Ar(a){var l=Ki(a);if(ct(l))return a}function wx(a,l){if(a==="change")return l}var Qn=!1;if(h){var Ba;if(h){var Sc="oninput"in document;if(!Sc){var kc=document.createElement("div");kc.setAttribute("oninput","return;"),Sc=typeof kc.oninput=="function"}Ba=Sc}else Ba=!1;Qn=Ba&&(!document.documentMode||9<document.documentMode)}function sl(){tl&&(tl.detachEvent("onpropertychange",Cc),on=tl=null)}function Cc(a){if(a.propertyName==="value"&&Ar(on)){var l=[];Nc(l,on,a,su(a)),oc(bx,l)}}function Pc(a,l,f){a==="focusin"?(sl(),tl=l,on=f,tl.attachEvent("onpropertychange",Cc)):a==="focusout"&&sl()}function za(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ar(on)}function Tc(a,l){if(a==="click")return Ar(l)}function ju(a,l){if(a==="input"||a==="change")return Ar(l)}function Vf(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var Fn=typeof Object.is=="function"?Object.is:Vf;function ri(a,l){if(Fn(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var f=Object.keys(a),v=Object.keys(l);if(f.length!==v.length)return!1;for(v=0;v<f.length;v++){var k=f[v];if(!m.call(l,k)||!Fn(a[k],l[k]))return!1}return!0}function Wf(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Nu(a,l){var f=Wf(a);a=0;for(var v;f;){if(f.nodeType===3){if(v=a+f.textContent.length,a<=l&&v>=l)return{node:f,offset:l-a};a=v}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Wf(f)}}function Hf(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Hf(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function Su(){for(var a=window,l=cs();l instanceof a.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)a=l.contentWindow;else break;l=cs(a.document)}return l}function ku(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function Xn(a){var l=Su(),f=a.focusedElem,v=a.selectionRange;if(l!==f&&f&&f.ownerDocument&&Hf(f.ownerDocument.documentElement,f)){if(v!==null&&ku(f)){if(l=v.start,a=v.end,a===void 0&&(a=l),"selectionStart"in f)f.selectionStart=l,f.selectionEnd=Math.min(a,f.value.length);else if(a=(l=f.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var k=f.textContent.length,P=Math.min(v.start,k);v=v.end===void 0?P:Math.min(v.end,k),!a.extend&&P>v&&(k=v,v=P,P=k),k=Nu(f,P);var R=Nu(f,v);k&&R&&(a.rangeCount!==1||a.anchorNode!==k.node||a.anchorOffset!==k.offset||a.focusNode!==R.node||a.focusOffset!==R.offset)&&(l=l.createRange(),l.setStart(k.node,k.offset),a.removeAllRanges(),P>v?(a.addRange(l),a.extend(R.node,R.offset)):(l.setEnd(R.node,R.offset),a.addRange(l)))}}for(l=[],a=f;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<l.length;f++)a=l[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var Ec=h&&"documentMode"in document&&11>=document.documentMode,$a=null,Ua=null,nl=null,Ac=!1;function Yf(a,l,f){var v=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Ac||$a==null||$a!==cs(v)||(v=$a,"selectionStart"in v&&ku(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),nl&&ri(nl,v)||(nl=v,v=y(Ua,"onSelect"),0<v.length&&(l=new mu("onSelect","select",null,l,f),a.push({event:l,listeners:v}),l.target=$a)))}function ii(a,l){var f={};return f[a.toLowerCase()]=l.toLowerCase(),f["Webkit"+a]="webkit"+l,f["Moz"+a]="moz"+l,f}var Va={animationend:ii("Animation","AnimationEnd"),animationiteration:ii("Animation","AnimationIteration"),animationstart:ii("Animation","AnimationStart"),transitionend:ii("Transition","TransitionEnd")},ai={},Cu={};h&&(Cu=document.createElement("div").style,"AnimationEvent"in window||(delete Va.animationend.animation,delete Va.animationiteration.animation,delete Va.animationstart.animation),"TransitionEvent"in window||delete Va.transitionend.transition);function rl(a){if(ai[a])return ai[a];if(!Va[a])return a;var l=Va[a],f;for(f in l)if(l.hasOwnProperty(f)&&f in Cu)return ai[a]=l[f];return a}var qf=rl("animationend"),Jn=rl("animationiteration"),Pu=rl("animationstart"),Tu=rl("transitionend"),Wa=new Map,Gf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bn(a,l){Wa.set(a,l),c(l,[a])}for(var Yi=0;Yi<Gf.length;Yi++){var Mc=Gf[Yi],Zf=Mc.toLowerCase(),_x=Mc[0].toUpperCase()+Mc.slice(1);Bn(Zf,"on"+_x)}Bn(qf,"onAnimationEnd"),Bn(Jn,"onAnimationIteration"),Bn(Pu,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Tu,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ha="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Kf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ha));function Eu(a,l,f){var v=a.type||"unknown-event";a.currentTarget=f,iu(v,l,void 0,a),a.currentTarget=null}function Au(a,l){l=(l&4)!==0;for(var f=0;f<a.length;f++){var v=a[f],k=v.event;v=v.listeners;e:{var P=void 0;if(l)for(var R=v.length-1;0<=R;R--){var F=v[R],W=F.instance,re=F.currentTarget;if(F=F.listener,W!==P&&k.isPropagationStopped())break e;Eu(k,F,re),P=W}else for(R=0;R<v.length;R++){if(F=v[R],W=F.instance,re=F.currentTarget,F=F.listener,W!==P&&k.isPropagationStopped())break e;Eu(k,F,re),P=W}}}if(Ho)throw a=lc,Ho=!1,lc=null,a}function Ot(a,l){var f=l[Za];f===void 0&&(f=l[Za]=new Set);var v=a+"__bubble";f.has(v)||(Qf(l,a,2,!1),f.add(v))}function Mu(a,l,f){var v=0;l&&(v|=4),Qf(f,a,v,l)}var il="_reactListening"+Math.random().toString(36).slice(2);function Ya(a){if(!a[il]){a[il]=!0,r.forEach(function(f){f!=="selectionchange"&&(Kf.has(f)||Mu(f,!1,a),Mu(f,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[il]||(l[il]=!0,Mu("selectionchange",!1,l))}}function Qf(a,l,f,v){switch(xt(l)){case 1:var k=cx;break;case 4:k=Af;break;default:k=Jo}f=k.bind(null,l,f,a),k=void 0,!ru||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(k=!0),v?k!==void 0?a.addEventListener(l,f,{capture:!0,passive:k}):a.addEventListener(l,f,!0):k!==void 0?a.addEventListener(l,f,{passive:k}):a.addEventListener(l,f,!1)}function o(a,l,f,v,k){var P=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var R=v.tag;if(R===3||R===4){var F=v.stateNode.containerInfo;if(F===k||F.nodeType===8&&F.parentNode===k)break;if(R===4)for(R=v.return;R!==null;){var W=R.tag;if((W===3||W===4)&&(W=R.stateNode.containerInfo,W===k||W.nodeType===8&&W.parentNode===k))return;R=R.return}for(;F!==null;){if(R=Gi(F),R===null)return;if(W=R.tag,W===5||W===6){v=P=R;continue e}F=F.parentNode}}v=v.return}oc(function(){var re=P,pe=su(f),ge=[];e:{var fe=Wa.get(a);if(fe!==void 0){var Le=mu,Be=a;switch(a){case"keypress":if(bc(f)===0)break e;case"keydown":case"keyup":Le=Of;break;case"focusin":Be="focus",Le=wc;break;case"focusout":Be="blur",Le=wc;break;case"beforeblur":case"afterblur":Le=wc;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Le=gu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Le=xu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Le=wu;break;case qf:case Jn:case Pu:Le=hx;break;case Tu:Le=xx;break;case"scroll":Le=dx;break;case"wheel":Le=yx;break;case"copy":case"cut":case"paste":Le=yu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Le=Ff}var Ue=(l&4)!==0,ps=!Ue&&a==="scroll",K=Ue?fe!==null?fe+"Capture":null:fe;Ue=[];for(var q=re,ee;q!==null;){ee=q;var we=ee.stateNode;if(ee.tag===5&&we!==null&&(ee=we,K!==null&&(we=Vo(q,K),we!=null&&Ue.push(u(q,we,ee)))),ps)break;q=q.return}0<Ue.length&&(fe=new Le(fe,Be,null,f,pe),ge.push({event:fe,listeners:Ue}))}}if((l&7)===0){e:{if(fe=a==="mouseover"||a==="pointerover",Le=a==="mouseout"||a==="pointerout",fe&&f!==tu&&(Be=f.relatedTarget||f.fromElement)&&(Gi(Be)||Be[Mt]))break e;if((Le||fe)&&(fe=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,Le?(Be=f.relatedTarget||f.toElement,Le=re,Be=Be?Gi(Be):null,Be!==null&&(ps=Jr(Be),Be!==ps||Be.tag!==5&&Be.tag!==6)&&(Be=null)):(Le=null,Be=re),Le!==Be)){if(Ue=gu,we="onMouseLeave",K="onMouseEnter",q="mouse",(a==="pointerout"||a==="pointerover")&&(Ue=Ff,we="onPointerLeave",K="onPointerEnter",q="pointer"),ps=Le==null?fe:Ki(Le),ee=Be==null?fe:Ki(Be),fe=new Ue(we,q+"leave",Le,f,pe),fe.target=ps,fe.relatedTarget=ee,we=null,Gi(pe)===re&&(Ue=new Ue(K,q+"enter",Be,f,pe),Ue.target=ee,Ue.relatedTarget=ps,we=Ue),ps=we,Le&&Be)t:{for(Ue=Le,K=Be,q=0,ee=Ue;ee;ee=S(ee))q++;for(ee=0,we=K;we;we=S(we))ee++;for(;0<q-ee;)Ue=S(Ue),q--;for(;0<ee-q;)K=S(K),ee--;for(;q--;){if(Ue===K||K!==null&&Ue===K.alternate)break t;Ue=S(Ue),K=S(K)}Ue=null}else Ue=null;Le!==null&&T(ge,fe,Le,Ue,!1),Be!==null&&ps!==null&&T(ge,ps,Be,Ue,!0)}}e:{if(fe=re?Ki(re):window,Le=fe.nodeName&&fe.nodeName.toLowerCase(),Le==="select"||Le==="input"&&fe.type==="file")var Ye=wx;else if(Uf(fe))if(Qn)Ye=ju;else{Ye=za;var et=Pc}else(Le=fe.nodeName)&&Le.toLowerCase()==="input"&&(fe.type==="checkbox"||fe.type==="radio")&&(Ye=Tc);if(Ye&&(Ye=Ye(a,re))){Nc(ge,Ye,f,pe);break e}et&&et(a,fe,re),a==="focusout"&&(et=fe._wrapperState)&&et.controlled&&fe.type==="number"&&Qr(fe,"number",fe.value)}switch(et=re?Ki(re):window,a){case"focusin":(Uf(et)||et.contentEditable==="true")&&($a=et,Ua=re,nl=null);break;case"focusout":nl=Ua=$a=null;break;case"mousedown":Ac=!0;break;case"contextmenu":case"mouseup":case"dragend":Ac=!1,Yf(ge,f,pe);break;case"selectionchange":if(Ec)break;case"keydown":case"keyup":Yf(ge,f,pe)}var tt;if(si)e:{switch(a){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else Er?Fa(a,f)&&(it="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(it="onCompositionStart");it&&(zf&&f.locale!=="ko"&&(Er||it!=="onCompositionStart"?it==="onCompositionEnd"&&Er&&(tt=fu()):(ei=pe,an="value"in ei?ei.value:ei.textContent,Er=!0)),et=y(re,it),0<et.length&&(it=new vu(it,a,null,f,pe),ge.push({event:it,listeners:et}),tt?it.data=tt:(tt=_u(f),tt!==null&&(it.data=tt)))),(tt=Tr?vx(a,f):ni(a,f))&&(re=y(re,"onBeforeInput"),0<re.length&&(pe=new vu("onBeforeInput","beforeinput",null,f,pe),ge.push({event:pe,listeners:re}),pe.data=tt))}Au(ge,l)})}function u(a,l,f){return{instance:a,listener:l,currentTarget:f}}function y(a,l){for(var f=l+"Capture",v=[];a!==null;){var k=a,P=k.stateNode;k.tag===5&&P!==null&&(k=P,P=Vo(a,f),P!=null&&v.unshift(u(a,P,k)),P=Vo(a,l),P!=null&&v.push(u(a,P,k))),a=a.return}return v}function S(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function T(a,l,f,v,k){for(var P=l._reactName,R=[];f!==null&&f!==v;){var F=f,W=F.alternate,re=F.stateNode;if(W!==null&&W===v)break;F.tag===5&&re!==null&&(F=re,k?(W=Vo(f,P),W!=null&&R.unshift(u(f,W,F))):k||(W=Vo(f,P),W!=null&&R.push(u(f,W,F)))),f=f.return}R.length!==0&&a.push({event:l,listeners:R})}var O=/\r\n?/g,$=/\u0000|\uFFFD/g;function Z(a){return(typeof a=="string"?a:""+a).replace(O,`
38`).replace($,"")}function se(a,l,f){if(l=Z(l),Z(a)!==l&&f)throw Error(n(425))}function ue(){}var Te=null,Qe=null;function dt(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ns=typeof setTimeout=="function"?setTimeout:void 0,vs=typeof clearTimeout=="function"?clearTimeout:void 0,ln=typeof Promise=="function"?Promise:void 0,qs=typeof queueMicrotask=="function"?queueMicrotask:typeof ln<"u"?function(a){return ln.resolve(null).then(a).catch(qa)}:Ns;function qa(a){setTimeout(function(){throw a})}function Ru(a,l){var f=l,v=0;do{var k=f.nextSibling;if(a.removeChild(f),k&&k.nodeType===8)if(f=k.data,f==="/$"){if(v===0){a.removeChild(k),Dn(l);return}v--}else f!=="$"&&f!=="$?"&&f!=="$!"||v++;f=k}while(f);Dn(l)}function oi(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return a}function Xf(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return a;l--}else f==="/$"&&l++}a=a.previousSibling}return null}var qi=Math.random().toString(36).slice(2),er="__reactFiber$"+qi,Ga="__reactProps$"+qi,Mt="__reactContainer$"+qi,Za="__reactEvents$"+qi,jx="__reactListeners$"+qi,Nx="__reactHandles$"+qi;function Gi(a){var l=a[er];if(l)return l;for(var f=a.parentNode;f;){if(l=f[Mt]||f[er]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(a=Xf(a);a!==null;){if(f=a[er])return f;a=Xf(a)}return l}a=f,f=a.parentNode}return null}function Zi(a){return a=a[er]||a[Mt],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Ki(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(n(33))}function Rc(a){return a[Ga]||null}var Sx=[],Lc=-1;function Ka(a){return{current:a}}function Yt(a){0>Lc||(a.current=Sx[Lc],Sx[Lc]=null,Lc--)}function Wt(a,l){Lc++,Sx[Lc]=a.current,a.current=l}var Qa={},Gs=Ka(Qa),xn=Ka(!1),al=Qa;function Dc(a,l){var f=a.type.contextTypes;if(!f)return Qa;var v=a.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var k={},P;for(P in f)k[P]=l[P];return v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=k),k}function yn(a){return a=a.childContextTypes,a!=null}function Jf(){Yt(xn),Yt(Gs)}function l_(a,l,f){if(Gs.current!==Qa)throw Error(n(168));Wt(Gs,l),Wt(xn,f)}function c_(a,l,f){var v=a.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return f;v=v.getChildContext();for(var k in v)if(!(k in l))throw Error(n(108,he(a)||"Unknown",k));return ne({},f,v)}function em(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Qa,al=Gs.current,Wt(Gs,a),Wt(xn,xn.current),!0}function d_(a,l,f){var v=a.stateNode;if(!v)throw Error(n(169));f?(a=c_(a,l,al),v.__reactInternalMemoizedMergedChildContext=a,Yt(xn),Yt(Gs),Wt(Gs,a)):Yt(xn),Wt(xn,f)}var Qi=null,tm=!1,kx=!1;function u_(a){Qi===null?Qi=[a]:Qi.push(a)}function bR(a){tm=!0,u_(a)}function Xa(){if(!kx&&Qi!==null){kx=!0;var a=0,l=vt;try{var f=Qi;for(vt=1;a<f.length;a++){var v=f[a];do v=v(!0);while(v!==null)}Qi=null,tm=!1}catch(k){throw Qi!==null&&(Qi=Qi.slice(a+1)),Pf(lu,Xa),k}finally{vt=l,kx=!1}}return null}var Oc=[],Ic=0,sm=null,nm=0,tr=[],sr=0,ol=null,Xi=1,Ji="";function ll(a,l){Oc[Ic++]=nm,Oc[Ic++]=sm,sm=a,nm=l}function h_(a,l,f){tr[sr++]=Xi,tr[sr++]=Ji,tr[sr++]=ol,ol=a;var v=Xi;a=Ji;var k=32-lt(v)-1;v&=~(1<<k),f+=1;var P=32-lt(l)+k;if(30<P){var R=k-k%5;P=(v&(1<<R)-1).toString(32),v>>=R,k-=R,Xi=1<<32-lt(l)+k|f<<k|v,Ji=P+a}else Xi=1<<P|f<<k|v,Ji=a}function Cx(a){a.return!==null&&(ll(a,1),h_(a,1,0))}function Px(a){for(;a===sm;)sm=Oc[--Ic],Oc[Ic]=null,nm=Oc[--Ic],Oc[Ic]=null;for(;a===ol;)ol=tr[--sr],tr[sr]=null,Ji=tr[--sr],tr[sr]=null,Xi=tr[--sr],tr[sr]=null}var zn=null,$n=null,Xt=!1,Mr=null;function f_(a,l){var f=ar(5,null,null,0);
vendor: 4,298 bytes, line 38
38f.elementType="DELETED",f.stateNode=l,f.return=a,l=a.deletions,l===null?(a.deletions=[f],a.flags|=16):l.push(f)}function m_(a,l){switch(a.tag){case 5:var f=a.type;return l=l.nodeType!==1||f.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(a.stateNode=l,zn=a,$n=oi(l.firstChild),!0):!1;case 6:return l=a.pendingProps===""||l.nodeType!==3?null:l,l!==null?(a.stateNode=l,zn=a,$n=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(f=ol!==null?{id:Xi,overflow:Ji}:null,a.memoizedState={dehydrated:l,treeContext:f,retryLane:1073741824},f=ar(18,null,null,0),f.stateNode=l,f.return=a,a.child=f,zn=a,$n=null,!0):!1;default:return!1}}function Tx(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Ex(a){if(Xt){var l=$n;if(l){var f=l;if(!m_(a,l)){if(Tx(a))throw Error(n(418));l=oi(f.nextSibling);var v=zn;l&&m_(a,l)?f_(v,f):(a.flags=a.flags&-4097|2,Xt=!1,zn=a)}}else{if(Tx(a))throw Error(n(418));a.flags=a.flags&-4097|2,Xt=!1,zn=a}}}function p_(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;zn=a}function rm(a){if(a!==zn)return!1;if(!Xt)return p_(a),Xt=!0,!1;var l;if((l=a.tag!==3)&&!(l=a.tag!==5)&&(l=a.type,l=l!=="head"&&l!=="body"&&!dt(a.type,a.memoizedProps)),l&&(l=$n)){if(Tx(a))throw g_(),Error(n(418));for(;l;)f_(a,l),l=oi(l.nextSibling)}if(p_(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));e:{for(a=a.nextSibling,l=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"){if(l===0){$n=oi(a.nextSibling);break e}l--}else f!=="$"&&f!=="$!"&&f!=="$?"||l++}a=a.nextSibling}$n=null}}else $n=zn?oi(a.stateNode.nextSibling):null;return!0}function g_(){for(var a=$n;a;)a=oi(a.nextSibling)}function Fc(){$n=zn=null,Xt=!1}function Ax(a){Mr===null?Mr=[a]:Mr.push(a)}var wR=D.ReactCurrentBatchConfig;function Lu(a,l,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(n(309));var v=f.stateNode}if(!v)throw Error(n(147,a));var k=v,P=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===P?l.ref:(l=function(R){var F=k.refs;R===null?delete F[P]:F[P]=R},l._stringRef=P,l)}if(typeof a!="string")throw Error(n(284));if(!f._owner)throw Error(n(290,a))}return a}function im(a,l){throw a=Object.prototype.toString.call(l),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a))}function x_(a){var l=a._init;return l(a._payload)}function y_(a){function l(K,q){if(a){var ee=K.deletions;ee===null?(K.deletions=[q],K.flags|=16):ee.push(q)}}function f(K,q){if(!a)return null;for(;q!==null;)l(K,q),q=q.sibling;return null}function v(K,q){for(K=new Map;q!==null;)q.key!==null?K.set(q.key,q):K.set(q.index,q),q=q.sibling;return K}function k(K,q){return K=ao(K,q),K.index=0,K.sibling=null,K}function P(K,q,ee){return K.index=ee,a?(ee=K.alternate,ee!==null?(ee=ee.index,ee<q?(K.flags|=2,q):ee):(K.flags|=2,q)):(K.flags|=1048576,q)}function R(K){return a&&K.alternate===null&&(K.flags|=2),K}function F(K,q,ee,we){return q===null||q.tag!==6?(q=_y(ee,K.mode,we),q.return=K,q):(q=k(q,ee),q.return=K,q)}function W(K,q,ee,we){var Ye=ee.type;return Ye===H?pe(K,q,ee.props.children,we,ee.key):q!==null&&(q.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===ye&&x_(Ye)===q.type)?(we=k(q,ee.props),we.ref=Lu(K,q,ee),we.return=K,we):(we=Tm(ee.type,ee.key,ee.props,null,K.mode,we),we.ref=Lu(K,q,ee),we.return=K,we)}function re(K,q,ee,we){return q===null||q.tag!==4||q.stateNode.containerInfo!==ee.containerInfo||q.stateNode.implementation!==ee.implementation?(q=jy(ee,K.mode,we),q.return=K,q):(q=k(q,ee.children||[]),q.return=K,q)}function pe(K,q,ee,we,Ye){return q===null||q.tag!==7?(q=gl(ee,K.mode,we,Ye),q.return=K,q):(q=k(q,ee),q.return=K,q)}function ge(K,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number")return q=_y(""+q,K.mode,ee),q.return=K,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case I:return ee=Tm(q.type,q.key,q.props,null,K.mode,ee),ee.ref=Lu(K,null,q),ee.return=K,ee;case z:return q=jy(q,K.mode,ee),q.return=K,q;case ye:var we=q._init;return ge(K,we(q._payload),ee)}if(ka(q)||ce(q))return q=gl(q,K.mode,ee,null),q.return=K,q;im(K,q)}return null}function fe(K,q,ee,we){var Ye=q!==null?q.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return Ye!==null?null:F(K,q,""+ee,we);
vendor: 7,818 bytes, line 38
38if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case I:return ee.key===Ye?W(K,q,ee,we):null;case z:return ee.key===Ye?re(K,q,ee,we):null;case ye:return Ye=ee._init,fe(K,q,Ye(ee._payload),we)}if(ka(ee)||ce(ee))return Ye!==null?null:pe(K,q,ee,we,null);im(K,ee)}return null}function Le(K,q,ee,we,Ye){if(typeof we=="string"&&we!==""||typeof we=="number")return K=K.get(ee)||null,F(q,K,""+we,Ye);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case I:return K=K.get(we.key===null?ee:we.key)||null,W(q,K,we,Ye);case z:return K=K.get(we.key===null?ee:we.key)||null,re(q,K,we,Ye);case ye:var et=we._init;return Le(K,q,ee,et(we._payload),Ye)}if(ka(we)||ce(we))return K=K.get(ee)||null,pe(q,K,we,Ye,null);im(q,we)}return null}function Be(K,q,ee,we){for(var Ye=null,et=null,tt=q,it=q=0,Ms=null;tt!==null&&it<ee.length;it++){tt.index>it?(Ms=tt,tt=null):Ms=tt.sibling;var kt=fe(K,tt,ee[it],we);if(kt===null){tt===null&&(tt=Ms);break}a&&tt&&kt.alternate===null&&l(K,tt),q=P(kt,q,it),et===null?Ye=kt:et.sibling=kt,et=kt,tt=Ms}if(it===ee.length)return f(K,tt),Xt&&ll(K,it),Ye;if(tt===null){for(;it<ee.length;it++)tt=ge(K,ee[it],we),tt!==null&&(q=P(tt,q,it),et===null?Ye=tt:et.sibling=tt,et=tt);return Xt&&ll(K,it),Ye}for(tt=v(K,tt);it<ee.length;it++)Ms=Le(tt,K,it,ee[it],we),Ms!==null&&(a&&Ms.alternate!==null&&tt.delete(Ms.key===null?it:Ms.key),q=P(Ms,q,it),et===null?Ye=Ms:et.sibling=Ms,et=Ms);return a&&tt.forEach(function(oo){return l(K,oo)}),Xt&&ll(K,it),Ye}function Ue(K,q,ee,we){var Ye=ce(ee);if(typeof Ye!="function")throw Error(n(150));if(ee=Ye.call(ee),ee==null)throw Error(n(151));for(var et=Ye=null,tt=q,it=q=0,Ms=null,kt=ee.next();tt!==null&&!kt.done;it++,kt=ee.next()){tt.index>it?(Ms=tt,tt=null):Ms=tt.sibling;var oo=fe(K,tt,kt.value,we);if(oo===null){tt===null&&(tt=Ms);break}a&&tt&&oo.alternate===null&&l(K,tt),q=P(oo,q,it),et===null?Ye=oo:et.sibling=oo,et=oo,tt=Ms}if(kt.done)return f(K,tt),Xt&&ll(K,it),Ye;if(tt===null){for(;!kt.done;it++,kt=ee.next())kt=ge(K,kt.value,we),kt!==null&&(q=P(kt,q,it),et===null?Ye=kt:et.sibling=kt,et=kt);return Xt&&ll(K,it),Ye}for(tt=v(K,tt);!kt.done;it++,kt=ee.next())kt=Le(tt,K,it,kt.value,we),kt!==null&&(a&&kt.alternate!==null&&tt.delete(kt.key===null?it:kt.key),q=P(kt,q,it),et===null?Ye=kt:et.sibling=kt,et=kt);return a&&tt.forEach(function(eL){return l(K,eL)}),Xt&&ll(K,it),Ye}function ps(K,q,ee,we){if(typeof ee=="object"&&ee!==null&&ee.type===H&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case I:e:{for(var Ye=ee.key,et=q;et!==null;){if(et.key===Ye){if(Ye=ee.type,Ye===H){if(et.tag===7){f(K,et.sibling),q=k(et,ee.props.children),q.return=K,K=q;break e}}else if(et.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===ye&&x_(Ye)===et.type){f(K,et.sibling),q=k(et,ee.props),q.ref=Lu(K,et,ee),q.return=K,K=q;break e}f(K,et);break}else l(K,et);et=et.sibling}ee.type===H?(q=gl(ee.props.children,K.mode,we,ee.key),q.return=K,K=q):(we=Tm(ee.type,ee.key,ee.props,null,K.mode,we),we.ref=Lu(K,q,ee),we.return=K,K=we)}return R(K);case z:e:{for(et=ee.key;q!==null;){if(q.key===et)if(q.tag===4&&q.stateNode.containerInfo===ee.containerInfo&&q.stateNode.implementation===ee.implementation){f(K,q.sibling),q=k(q,ee.children||[]),q.return=K,K=q;break e}else{f(K,q);break}else l(K,q);q=q.sibling}q=jy(ee,K.mode,we),q.return=K,K=q}return R(K);case ye:return et=ee._init,ps(K,q,et(ee._payload),we)}if(ka(ee))return Be(K,q,ee,we);if(ce(ee))return Ue(K,q,ee,we);im(K,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,q!==null&&q.tag===6?(f(K,q.sibling),q=k(q,ee),q.return=K,K=q):(f(K,q),q=_y(ee,K.mode,we),q.return=K,K=q),R(K)):f(K,q)}return ps}var Bc=y_(!0),v_=y_(!1),am=Ka(null),om=null,zc=null,Mx=null;function Rx(){Mx=zc=om=null}function Lx(a){var l=am.current;Yt(am),a._currentValue=l}function Dx(a,l,f){for(;a!==null;){var v=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),a===f)break;a=a.return}}function $c(a,l){om=a,Mx=zc=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(vn=!0),a.firstContext=null)}function nr(a){var l=a._currentValue;if(Mx!==a)if(a={context:a,memoizedValue:l,next:null},zc===null){if(om===null)throw Error(n(308));zc=a,om.dependencies={lanes:0,firstContext:a}}else zc=zc.next=a;return l}var cl=null;function Ox(a){cl===null?cl=[a]:cl.push(a)}function b_(a,l,f,v){var k=l.interleaved;return k===null?(f.next=f,Ox(l)):(f.next=k.next,k.next=f),l.interleaved=f,ea(a,v)}function ea(a,l){a.lanes|=l;var f=a.alternate;for(f!==null&&(f.lanes|=l),f=a,a=a.return;a!==null;)a.childLanes|=l,f=a.alternate,f!==null&&(f.childLanes|=l),f=a,a=a.return;return f.tag===3?f.stateNode:null}var Ja=!1;function Ix(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w_(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function ta(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function eo(a,l,f){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(St&2)!==0){var k=v.pending;return k===null?l.next=l:(l.next=k.next,k.next=l),v.pending=l,ea(a,f)}return k=v.interleaved,k===null?(l.next=l,Ox(v)):(l.next=k.next,k.next=l),v.interleaved=l,ea(a,f)}function lm(a,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194240)!==0)){var v=l.lanes;v&=a.pendingLanes,f|=v,l.lanes=f,Cr(a,f)}}function __(a,l){var f=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,f===v)){var k=null,P=null;if(f=f.firstBaseUpdate,f!==null){do{var R={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};P===null?k=P=R:P=P.next=R,f=f.next}while(f!==null);P===null?k=P=l:P=P.next=l}else k=P=l;f={baseState:v.baseState,firstBaseUpdate:k,lastBaseUpdate:P,shared:v.shared,effects:v.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=l:a.next=l,f.lastBaseUpdate=l}function cm(a,l,f,v){var k=a.updateQueue;Ja=!1;var P=k.firstBaseUpdate,R=k.lastBaseUpdate,F=k.shared.pending;if(F!==null){k.shared.pending=null;var W=F,re=W.next;W.next=null,R===null?P=re:R.next=re,R=W;var pe=a.alternate;pe!==null&&(pe=pe.updateQueue,F=pe.lastBaseUpdate,F!==R&&(F===null?pe.firstBaseUpdate=re:F.next=re,pe.lastBaseUpdate=W))}if(P!==null){var ge=k.baseState;R=0,pe=re=W=null,F=P;do{var fe=F.lane,Le=F.eventTime;if((v&fe)===fe){pe!==null&&(pe=pe.next={eventTime:Le,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Be=a,Ue=F;switch(fe=l,Le=f,Ue.tag){case 1:if(Be=Ue.payload,typeof Be=="function"){ge=Be.call(Le,ge,fe);break e}ge=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=Ue.payload,fe=typeof Be=="function"?Be.call(Le,ge,fe):Be,fe==null)break e;ge=ne({},ge,fe);break e;case 2:Ja=!0}}F.callback!==null&&F.lane!==0&&(a.flags|=64,fe=k.effects,fe===null?k.effects=[F]:fe.push(F))}else Le={eventTime:Le,lane:fe,tag:F.tag,payload:F.payload,callback:F.callback,next:null},pe===null?(re=pe=Le,W=ge):pe=pe.next=Le,R|=fe;if(F=F.next,F===null){if(F=k.shared.pending,F===null)break;fe=F,F=fe.next,fe.next=null,k.lastBaseUpdate=fe,k.shared.pending=null}}while(!0);if(pe===null&&(W=ge),k.baseState=W,k.firstBaseUpdate=re,k.lastBaseUpdate=pe,l=k.shared.interleaved,l!==null){k=l;do R|=k.lane,k=k.next;while(k!==l)}else P===null&&(k.shared.lanes=0);hl|=R,a.lanes=R,a.memoizedState=ge}}function j_(a,l,f){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var v=a[l],k=v.callback;if(k!==null){if(v.callback=null,v=f,typeof k!="function")throw Error(n(191,k));k.call(v)}}}var Du={},li=Ka(Du),Ou=Ka(Du),Iu=Ka(Du);function dl(a){if(a===Du)throw Error(n(174));return a}
vendor: 8,018 bytes, line 38
38function Fx(a,l){switch(Wt(Iu,l),Wt(Ou,a),Wt(li,Du),a=l.nodeType,a){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:rc(null,"");break;default:a=a===8?l.parentNode:l,l=a.namespaceURI||null,a=a.tagName,l=rc(l,a)}Yt(li),Wt(li,l)}function Uc(){Yt(li),Yt(Ou),Yt(Iu)}function N_(a){dl(Iu.current);var l=dl(li.current),f=rc(l,a.type);l!==f&&(Wt(Ou,a),Wt(li,f))}function Bx(a){Ou.current===a&&(Yt(li),Yt(Ou))}var is=Ka(0);function dm(a){for(var l=a;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var zx=[];function $x(){for(var a=0;a<zx.length;a++)zx[a]._workInProgressVersionPrimary=null;zx.length=0}var um=D.ReactCurrentDispatcher,Ux=D.ReactCurrentBatchConfig,ul=0,as=null,Ss=null,Es=null,hm=!1,Fu=!1,Bu=0,_R=0;function Zs(){throw Error(n(321))}function Vx(a,l){if(l===null)return!1;for(var f=0;f<l.length&&f<a.length;f++)if(!Fn(a[f],l[f]))return!1;return!0}function Wx(a,l,f,v,k,P){if(ul=P,as=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,um.current=a===null||a.memoizedState===null?kR:CR,a=f(v,k),Fu){P=0;do{if(Fu=!1,Bu=0,25<=P)throw Error(n(301));P+=1,Es=Ss=null,l.updateQueue=null,um.current=PR,a=f(v,k)}while(Fu)}if(um.current=pm,l=Ss!==null&&Ss.next!==null,ul=0,Es=Ss=as=null,hm=!1,l)throw Error(n(300));return a}function Hx(){var a=Bu!==0;return Bu=0,a}function ci(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Es===null?as.memoizedState=Es=a:Es=Es.next=a,Es}function rr(){if(Ss===null){var a=as.alternate;a=a!==null?a.memoizedState:null}else a=Ss.next;var l=Es===null?as.memoizedState:Es.next;if(l!==null)Es=l,Ss=a;else{if(a===null)throw Error(n(310));Ss=a,a={memoizedState:Ss.memoizedState,baseState:Ss.baseState,baseQueue:Ss.baseQueue,queue:Ss.queue,next:null},Es===null?as.memoizedState=Es=a:Es=Es.next=a}return Es}function zu(a,l){return typeof l=="function"?l(a):l}function Yx(a){var l=rr(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var v=Ss,k=v.baseQueue,P=f.pending;if(P!==null){if(k!==null){var R=k.next;k.next=P.next,P.next=R}v.baseQueue=k=P,f.pending=null}if(k!==null){P=k.next,v=v.baseState;var F=R=null,W=null,re=P;do{var pe=re.lane;if((ul&pe)===pe)W!==null&&(W=W.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),v=re.hasEagerState?re.eagerState:a(v,re.action);else{var ge={lane:pe,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};W===null?(F=W=ge,R=v):W=W.next=ge,as.lanes|=pe,hl|=pe}re=re.next}while(re!==null&&re!==P);W===null?R=v:W.next=F,Fn(v,l.memoizedState)||(vn=!0),l.memoizedState=v,l.baseState=R,l.baseQueue=W,f.lastRenderedState=v}if(a=f.interleaved,a!==null){k=a;do P=k.lane,as.lanes|=P,hl|=P,k=k.next;while(k!==a)}else k===null&&(f.lanes=0);return[l.memoizedState,f.dispatch]}function qx(a){var l=rr(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var v=f.dispatch,k=f.pending,P=l.memoizedState;if(k!==null){f.pending=null;var R=k=k.next;do P=a(P,R.action),R=R.next;while(R!==k);Fn(P,l.memoizedState)||(vn=!0),l.memoizedState=P,l.baseQueue===null&&(l.baseState=P),f.lastRenderedState=P}return[P,v]}function S_(){}function k_(a,l){var f=as,v=rr(),k=l(),P=!Fn(v.memoizedState,k);if(P&&(v.memoizedState=k,vn=!0),v=v.queue,Gx(T_.bind(null,f,v,a),[a]),v.getSnapshot!==l||P||Es!==null&&Es.memoizedState.tag&1){if(f.flags|=2048,$u(9,P_.bind(null,f,v,k,l),void 0,null),As===null)throw Error(n(349));(ul&30)!==0||C_(f,l,k)}return k}function C_(a,l,f){a.flags|=16384,a={getSnapshot:l,value:f},l=as.updateQueue,l===null?(l={lastEffect:null,stores:null},as.updateQueue=l,l.stores=[a]):(f=l.stores,f===null?l.stores=[a]:f.push(a))}function P_(a,l,f,v){l.value=f,l.getSnapshot=v,E_(l)&&A_(a)}function T_(a,l,f){return f(function(){E_(l)&&A_(a)})}function E_(a){var l=a.getSnapshot;a=a.value;try{var f=l();return!Fn(a,f)}catch{return!0}}function A_(a){var l=ea(a,1);l!==null&&Or(l,a,1,-1)}function M_(a){var l=ci();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zu,lastRenderedState:a},l.queue=a,a=a.dispatch=SR.bind(null,as,a),[l.memoizedState,a]}function $u(a,l,f,v){return a={tag:a,create:l,destroy:f,deps:v,next:null},l=as.updateQueue,l===null?(l={lastEffect:null,stores:null},as.updateQueue=l,l.lastEffect=a.next=a):(f=l.lastEffect,f===null?l.lastEffect=a.next=a:(v=f.next,f.next=a,a.next=v,l.lastEffect=a)),a}function R_(){return rr().memoizedState}function fm(a,l,f,v){var k=ci();as.flags|=a,k.memoizedState=$u(1|l,f,void 0,v===void 0?null:v)}function mm(a,l,f,v){var k=rr();v=v===void 0?null:v;var P=void 0;if(Ss!==null){var R=Ss.memoizedState;if(P=R.destroy,v!==null&&Vx(v,R.deps)){k.memoizedState=$u(l,f,P,v);return}}as.flags|=a,k.memoizedState=$u(1|l,f,P,v)}function L_(a,l){return fm(8390656,8,a,l)}function Gx(a,l){return mm(2048,8,a,l)}function D_(a,l){return mm(4,2,a,l)}function O_(a,l){return mm(4,4,a,l)}function I_(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function F_(a,l,f){return f=f!=null?f.concat([a]):null,mm(4,4,I_.bind(null,l,a),f)}function Zx(){}function B_(a,l){var f=rr();l=l===void 0?null:l;var v=f.memoizedState;return v!==null&&l!==null&&Vx(l,v[1])?v[0]:(f.memoizedState=[a,l],a)}function z_(a,l){var f=rr();l=l===void 0?null:l;var v=f.memoizedState;return v!==null&&l!==null&&Vx(l,v[1])?v[0]:(a=a(),f.memoizedState=[a,l],a)}function $_(a,l,f){return(ul&21)===0?(a.baseState&&(a.baseState=!1,vn=!0),a.memoizedState=f):(Fn(f,l)||(f=Ef(),as.lanes|=f,hl|=f,a.baseState=!0),l)}function jR(a,l){var f=vt;vt=f!==0&&4>f?f:4,a(!0);var v=Ux.transition;Ux.transition={};try{a(!1),l()}finally{vt=f,Ux.transition=v}}function U_(){return rr().memoizedState}function NR(a,l,f){var v=ro(a);if(f={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null},V_(a))W_(l,f);else if(f=b_(a,l,f,v),f!==null){var k=dn();Or(f,a,v,k),H_(f,l,v)}}function SR(a,l,f){var v=ro(a),k={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null};if(V_(a))W_(l,k);else{var P=a.alternate;if(a.lanes===0&&(P===null||P.lanes===0)&&(P=l.lastRenderedReducer,P!==null))try{var R=l.lastRenderedState,F=P(R,f);if(k.hasEagerState=!0,k.eagerState=F,Fn(F,R)){var W=l.interleaved;W===null?(k.next=k,Ox(l)):(k.next=W.next,W.next=k),l.interleaved=k;return}}catch{}finally{}f=b_(a,l,k,v),f!==null&&(k=dn(),Or(f,a,v,k),H_(f,l,v))}}function V_(a){var l=a.alternate;return a===as||l!==null&&l===as}function W_(a,l){Fu=hm=!0;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}function H_(a,l,f){if((f&4194240)!==0){var v=l.lanes;v&=a.pendingLanes,f|=v,l.lanes=f,Cr(a,f)}}var pm={readContext:nr,useCallback:Zs,useContext:Zs,useEffect:Zs,useImperativeHandle:Zs,useInsertionEffect:Zs,useLayoutEffect:Zs,useMemo:Zs,useReducer:Zs,useRef:Zs,useState:Zs,useDebugValue:Zs,useDeferredValue:Zs,useTransition:Zs,useMutableSource:Zs,useSyncExternalStore:Zs,useId:Zs,unstable_isNewReconciler:!1},kR={readContext:nr,useCallback:function(a,l){return ci().memoizedState=[a,l===void 0?null:l],a},useContext:nr,useEffect:L_,useImperativeHandle:function(a,l,f){return f=f!=null?f.concat([a]):null,fm(4194308,4,I_.bind(null,l,a),f)},useLayoutEffect:function(a,l){return fm(4194308,4,a,l)},useInsertionEffect:function(a,l){return fm(4,2,a,l)},useMemo:function(a,l){var f=ci();return l=l===void 0?null:l,a=a(),f.memoizedState=[a,l],a},useReducer:function(a,l,f){var v=ci();return l=f!==void 0?f(l):l,v.memoizedState=v.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},v.queue=a,a=a.dispatch=NR.bind(null,as,a),[v.memoizedState,a]}
vendor: 5,886 bytes, lines 38-40
38,useRef:function(a){var l=ci();return a={current:a},l.memoizedState=a},useState:M_,useDebugValue:Zx,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=M_(!1),l=a[0];return a=jR.bind(null,a[1]),ci().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,f){var v=as,k=ci();if(Xt){if(f===void 0)throw Error(n(407));f=f()}else{if(f=l(),As===null)throw Error(n(349));(ul&30)!==0||C_(v,l,f)}k.memoizedState=f;var P={value:f,getSnapshot:l};return k.queue=P,L_(T_.bind(null,v,P,a),[a]),v.flags|=2048,$u(9,P_.bind(null,v,P,f,l),void 0,null),f},useId:function(){var a=ci(),l=As.identifierPrefix;if(Xt){var f=Ji,v=Xi;f=(v&~(1<<32-lt(v)-1)).toString(32)+f,l=":"+l+"R"+f,f=Bu++,0<f&&(l+="H"+f.toString(32)),l+=":"}else f=_R++,l=":"+l+"r"+f.toString(32)+":";return a.memoizedState=l},unstable_isNewReconciler:!1},CR={readContext:nr,useCallback:B_,useContext:nr,useEffect:Gx,useImperativeHandle:F_,useInsertionEffect:D_,useLayoutEffect:O_,useMemo:z_,useReducer:Yx,useRef:R_,useState:function(){return Yx(zu)},useDebugValue:Zx,useDeferredValue:function(a){var l=rr();return $_(l,Ss.memoizedState,a)},useTransition:function(){var a=Yx(zu)[0],l=rr().memoizedState;return[a,l]},useMutableSource:S_,useSyncExternalStore:k_,useId:U_,unstable_isNewReconciler:!1},PR={readContext:nr,useCallback:B_,useContext:nr,useEffect:Gx,useImperativeHandle:F_,useInsertionEffect:D_,useLayoutEffect:O_,useMemo:z_,useReducer:qx,useRef:R_,useState:function(){return qx(zu)},useDebugValue:Zx,useDeferredValue:function(a){var l=rr();return Ss===null?l.memoizedState=a:$_(l,Ss.memoizedState,a)},useTransition:function(){var a=qx(zu)[0],l=rr().memoizedState;return[a,l]},useMutableSource:S_,useSyncExternalStore:k_,useId:U_,unstable_isNewReconciler:!1};function Rr(a,l){if(a&&a.defaultProps){l=ne({},l),a=a.defaultProps;for(var f in a)l[f]===void 0&&(l[f]=a[f]);return l}return l}function Kx(a,l,f,v){l=a.memoizedState,f=f(v,l),f=f==null?l:ne({},l,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var gm={isMounted:function(a){return(a=a._reactInternals)?Jr(a)===a:!1},enqueueSetState:function(a,l,f){a=a._reactInternals;var v=dn(),k=ro(a),P=ta(v,k);P.payload=l,f!=null&&(P.callback=f),l=eo(a,P,k),l!==null&&(Or(l,a,k,v),lm(l,a,k))},enqueueReplaceState:function(a,l,f){a=a._reactInternals;var v=dn(),k=ro(a),P=ta(v,k);P.tag=1,P.payload=l,f!=null&&(P.callback=f),l=eo(a,P,k),l!==null&&(Or(l,a,k,v),lm(l,a,k))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var f=dn(),v=ro(a),k=ta(f,v);k.tag=2,l!=null&&(k.callback=l),l=eo(a,k,v),l!==null&&(Or(l,a,v,f),lm(l,a,v))}};function Y_(a,l,f,v,k,P,R){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,P,R):l.prototype&&l.prototype.isPureReactComponent?!ri(f,v)||!ri(k,P):!0}function q_(a,l,f){var v=!1,k=Qa,P=l.contextType;return typeof P=="object"&&P!==null?P=nr(P):(k=yn(l)?al:Gs.current,v=l.contextTypes,P=(v=v!=null)?Dc(a,k):Qa),l=new l(f,P),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=gm,a.stateNode=l,l._reactInternals=a,v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=k,a.__reactInternalMemoizedMaskedChildContext=P),l}function G_(a,l,f,v){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,v),l.state!==a&&gm.enqueueReplaceState(l,l.state,null)}function Qx(a,l,f,v){var k=a.stateNode;k.props=f,k.state=a.memoizedState,k.refs={},Ix(a);var P=l.contextType;typeof P=="object"&&P!==null?k.context=nr(P):(P=yn(l)?al:Gs.current,k.context=Dc(a,P)),k.state=a.memoizedState,P=l.getDerivedStateFromProps,typeof P=="function"&&(Kx(a,l,P,f),k.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(l=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),l!==k.state&&gm.enqueueReplaceState(k,k.state,null),cm(a,f,k,v),k.state=a.memoizedState),typeof k.componentDidMount=="function"&&(a.flags|=4194308)}function Vc(a,l){try{var f="",v=l;do f+=Se(v),v=v.return;while(v);var k=f}catch(P){k=`
39Error generating stack: `+P.message+`
40`+P.stack}return{value:a,source:l,stack:k,digest:null}}function Xx(a,l,f){return{value:a,source:null,stack:f??null,digest:l??null}}function Jx(a,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var TR=typeof WeakMap=="function"?WeakMap:Map;function Z_(a,l,f){f=ta(-1,f),f.tag=3,f.payload={element:null};var v=l.value;return f.callback=function(){jm||(jm=!0,my=v),Jx(a,l)},f}function K_(a,l,f){f=ta(-1,f),f.tag=3;var v=a.type.getDerivedStateFromError;if(typeof v=="function"){var k=l.value;f.payload=function(){return v(k)},f.callback=function(){Jx(a,l)}}var P=a.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(f.callback=function(){Jx(a,l),typeof v!="function"&&(so===null?so=new Set([this]):so.add(this));var R=l.stack;this.componentDidCatch(l.value,{componentStack:R!==null?R:""})}),f}function Q_(a,l,f){var v=a.pingCache;if(v===null){v=a.pingCache=new TR;var k=new Set;v.set(l,k)}else k=v.get(l),k===void 0&&(k=new Set,v.set(l,k));k.has(f)||(k.add(f),a=VR.bind(null,a,l,f),l.then(a,a))}function X_(a){do{var l;if((l=a.tag===13)&&(l=a.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return a;a=a.return}while(a!==null);return null}function J_(a,l,f,v,k){return(a.mode&1)===0?(a===l?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=ta(-1,1),l.tag=2,eo(f,l,1))),f.lanes|=1),a):(a.flags|=65536,a.lanes=k,a)}var ER=D.ReactCurrentOwner,vn=!1;function cn(a,l,f,v){l.child=a===null?v_(l,null,f,v):Bc(l,a.child,f,v)}
vendor: 15,347 bytes, line 40
40function ej(a,l,f,v,k){f=f.render;var P=l.ref;return $c(l,k),v=Wx(a,l,f,v,P,k),f=Hx(),a!==null&&!vn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~k,sa(a,l,k)):(Xt&&f&&Cx(l),l.flags|=1,cn(a,l,v,k),l.child)}function tj(a,l,f,v,k){if(a===null){var P=f.type;return typeof P=="function"&&!wy(P)&&P.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=P,sj(a,l,P,v,k)):(a=Tm(f.type,null,v,l,l.mode,k),a.ref=l.ref,a.return=l,l.child=a)}if(P=a.child,(a.lanes&k)===0){var R=P.memoizedProps;if(f=f.compare,f=f!==null?f:ri,f(R,v)&&a.ref===l.ref)return sa(a,l,k)}return l.flags|=1,a=ao(P,v),a.ref=l.ref,a.return=l,l.child=a}function sj(a,l,f,v,k){if(a!==null){var P=a.memoizedProps;if(ri(P,v)&&a.ref===l.ref)if(vn=!1,l.pendingProps=v=P,(a.lanes&k)!==0)(a.flags&131072)!==0&&(vn=!0);else return l.lanes=a.lanes,sa(a,l,k)}return ey(a,l,f,v,k)}function nj(a,l,f){var v=l.pendingProps,k=v.children,P=a!==null?a.memoizedState:null;if(v.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wt(Hc,Un),Un|=f;else{if((f&1073741824)===0)return a=P!==null?P.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a,cachePool:null,transitions:null},l.updateQueue=null,Wt(Hc,Un),Un|=a,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=P!==null?P.baseLanes:f,Wt(Hc,Un),Un|=v}else P!==null?(v=P.baseLanes|f,l.memoizedState=null):v=f,Wt(Hc,Un),Un|=v;return cn(a,l,k,f),l.child}function rj(a,l){var f=l.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function ey(a,l,f,v,k){var P=yn(f)?al:Gs.current;return P=Dc(l,P),$c(l,k),f=Wx(a,l,f,v,P,k),v=Hx(),a!==null&&!vn?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~k,sa(a,l,k)):(Xt&&v&&Cx(l),l.flags|=1,cn(a,l,f,k),l.child)}function ij(a,l,f,v,k){if(yn(f)){var P=!0;em(l)}else P=!1;if($c(l,k),l.stateNode===null)ym(a,l),q_(l,f,v),Qx(l,f,v,k),v=!0;else if(a===null){var R=l.stateNode,F=l.memoizedProps;R.props=F;var W=R.context,re=f.contextType;typeof re=="object"&&re!==null?re=nr(re):(re=yn(f)?al:Gs.current,re=Dc(l,re));var pe=f.getDerivedStateFromProps,ge=typeof pe=="function"||typeof R.getSnapshotBeforeUpdate=="function";ge||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==v||W!==re)&&G_(l,R,v,re),Ja=!1;var fe=l.memoizedState;R.state=fe,cm(l,v,R,k),W=l.memoizedState,F!==v||fe!==W||xn.current||Ja?(typeof pe=="function"&&(Kx(l,f,pe,v),W=l.memoizedState),(F=Ja||Y_(l,f,F,v,fe,W,re))?(ge||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=W),R.props=v,R.state=W,R.context=re,v=F):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{R=l.stateNode,w_(a,l),F=l.memoizedProps,re=l.type===l.elementType?F:Rr(l.type,F),R.props=re,ge=l.pendingProps,fe=R.context,W=f.contextType,typeof W=="object"&&W!==null?W=nr(W):(W=yn(f)?al:Gs.current,W=Dc(l,W));var Le=f.getDerivedStateFromProps;(pe=typeof Le=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==ge||fe!==W)&&G_(l,R,v,W),Ja=!1,fe=l.memoizedState,R.state=fe,cm(l,v,R,k);var Be=l.memoizedState;F!==ge||fe!==Be||xn.current||Ja?(typeof Le=="function"&&(Kx(l,f,Le,v),Be=l.memoizedState),(re=Ja||Y_(l,f,re,v,fe,Be,W)||!1)?(pe||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(v,Be,W),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(v,Be,W)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||F===a.memoizedProps&&fe===a.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&fe===a.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=Be),R.props=v,R.state=Be,R.context=W,v=re):(typeof R.componentDidUpdate!="function"||F===a.memoizedProps&&fe===a.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&fe===a.memoizedState||(l.flags|=1024),v=!1)}return ty(a,l,f,v,P,k)}function ty(a,l,f,v,k,P){rj(a,l);var R=(l.flags&128)!==0;if(!v&&!R)return k&&d_(l,f,!1),sa(a,l,P);v=l.stateNode,ER.current=l;var F=R&&typeof f.getDerivedStateFromError!="function"?null:v.render();return l.flags|=1,a!==null&&R?(l.child=Bc(l,a.child,null,P),l.child=Bc(l,null,F,P)):cn(a,l,F,P),l.memoizedState=v.state,k&&d_(l,f,!0),l.child}function aj(a){var l=a.stateNode;l.pendingContext?l_(a,l.pendingContext,l.pendingContext!==l.context):l.context&&l_(a,l.context,!1),Fx(a,l.containerInfo)}function oj(a,l,f,v,k){return Fc(),Ax(k),l.flags|=256,cn(a,l,f,v),l.child}var sy={dehydrated:null,treeContext:null,retryLane:0};function ny(a){return{baseLanes:a,cachePool:null,transitions:null}}function lj(a,l,f){var v=l.pendingProps,k=is.current,P=!1,R=(l.flags&128)!==0,F;if((F=R)||(F=a!==null&&a.memoizedState===null?!1:(k&2)!==0),F?(P=!0,l.flags&=-129):(a===null||a.memoizedState!==null)&&(k|=1),Wt(is,k&1),a===null)return Ex(l),a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((l.mode&1)===0?l.lanes=1:a.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(R=v.children,a=v.fallback,P?(v=l.mode,P=l.child,R={mode:"hidden",children:R},(v&1)===0&&P!==null?(P.childLanes=0,P.pendingProps=R):P=Em(R,v,0,null),a=gl(a,v,f,null),P.return=l,a.return=l,P.sibling=a,l.child=P,l.child.memoizedState=ny(f),l.memoizedState=sy,a):ry(l,R));if(k=a.memoizedState,k!==null&&(F=k.dehydrated,F!==null))return AR(a,l,R,v,F,k,f);if(P){P=v.fallback,R=l.mode,k=a.child,F=k.sibling;var W={mode:"hidden",children:v.children};return(R&1)===0&&l.child!==k?(v=l.child,v.childLanes=0,v.pendingProps=W,l.deletions=null):(v=ao(k,W),v.subtreeFlags=k.subtreeFlags&14680064),F!==null?P=ao(F,P):(P=gl(P,R,f,null),P.flags|=2),P.return=l,v.return=l,v.sibling=P,l.child=v,v=P,P=l.child,R=a.child.memoizedState,R=R===null?ny(f):{baseLanes:R.baseLanes|f,cachePool:null,transitions:R.transitions},P.memoizedState=R,P.childLanes=a.childLanes&~f,l.memoizedState=sy,v}return P=a.child,a=P.sibling,v=ao(P,{mode:"visible",children:v.children}),(l.mode&1)===0&&(v.lanes=f),v.return=l,v.sibling=null,a!==null&&(f=l.deletions,f===null?(l.deletions=[a],l.flags|=16):f.push(a)),l.child=v,l.memoizedState=null,v}function ry(a,l){return l=Em({mode:"visible",children:l},a.mode,0,null),l.return=a,a.child=l}function xm(a,l,f,v){return v!==null&&Ax(v),Bc(l,a.child,null,f),a=ry(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function AR(a,l,f,v,k,P,R){if(f)return l.flags&256?(l.flags&=-257,v=Xx(Error(n(422))),xm(a,l,R,v)):l.memoizedState!==null?(l.child=a.child,l.flags|=128,null):(P=v.fallback,k=l.mode,v=Em({mode:"visible",children:v.children},k,0,null),P=gl(P,k,R,null),P.flags|=2,v.return=l,P.return=l,v.sibling=P,l.child=v,(l.mode&1)!==0&&Bc(l,a.child,null,R),l.child.memoizedState=ny(R),l.memoizedState=sy,P);if((l.mode&1)===0)return xm(a,l,R,null);if(k.data==="$!"){if(v=k.nextSibling&&k.nextSibling.dataset,v)var F=v.dgst;return v=F,P=Error(n(419)),v=Xx(P,v,void 0),xm(a,l,R,v)}if(F=(R&a.childLanes)!==0,vn||F){if(v=As,v!==null){switch(R&-R){case 4:k=2;break;case 16:k=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:k=32;break;case 536870912:k=268435456;break;default:k=0}k=(k&(v.suspendedLanes|R))!==0?0:k,k!==0&&k!==P.retryLane&&(P.retryLane=k,ea(a,k),Or(v,a,k,-1))}return by(),v=Xx(Error(n(421))),xm(a,l,R,v)}return k.data==="$?"?(l.flags|=128,l.child=a.child,l=WR.bind(null,a),k._reactRetry=l,null):(a=P.treeContext,$n=oi(k.nextSibling),zn=l,Xt=!0,Mr=null,a!==null&&(tr[sr++]=Xi,tr[sr++]=Ji,tr[sr++]=ol,Xi=a.id,Ji=a.overflow,ol=l),l=ry(l,v.children),l.flags|=4096,l)}function cj(a,l,f){a.lanes|=l;var v=a.alternate;v!==null&&(v.lanes|=l),Dx(a.return,l,f)}function iy(a,l,f,v,k){var P=a.memoizedState;P===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:f,tailMode:k}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=v,P.tail=f,P.tailMode=k)}function dj(a,l,f){var v=l.pendingProps,k=v.revealOrder,P=v.tail;if(cn(a,l,v.children,f),v=is.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&cj(a,f,l);else if(a.tag===19)cj(a,f,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}v&=1}if(Wt(is,v),(l.mode&1)===0)l.memoizedState=null;else switch(k){case"forwards":for(f=l.child,k=null;f!==null;)a=f.alternate,a!==null&&dm(a)===null&&(k=f),f=f.sibling;f=k,f===null?(k=l.child,l.child=null):(k=f.sibling,f.sibling=null),iy(l,!1,k,f,P);break;case"backwards":for(f=null,k=l.child,l.child=null;k!==null;){if(a=k.alternate,a!==null&&dm(a)===null){l.child=k;break}a=k.sibling,k.sibling=f,f=k,k=a}iy(l,!0,f,null,P);break;case"together":iy(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function ym(a,l){(l.mode&1)===0&&a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2)}function sa(a,l,f){if(a!==null&&(l.dependencies=a.dependencies),hl|=l.lanes,(f&l.childLanes)===0)return null;if(a!==null&&l.child!==a.child)throw Error(n(153));if(l.child!==null){for(a=l.child,f=ao(a,a.pendingProps),l.child=f,f.return=l;a.sibling!==null;)a=a.sibling,f=f.sibling=ao(a,a.pendingProps),f.return=l;f.sibling=null}return l.child}function MR(a,l,f){switch(l.tag){case 3:aj(l),Fc();break;case 5:N_(l);break;case 1:yn(l.type)&&em(l);break;case 4:Fx(l,l.stateNode.containerInfo);break;case 10:var v=l.type._context,k=l.memoizedProps.value;Wt(am,v._currentValue),v._currentValue=k;break;case 13:if(v=l.memoizedState,v!==null)return v.dehydrated!==null?(Wt(is,is.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?lj(a,l,f):(Wt(is,is.current&1),a=sa(a,l,f),a!==null?a.sibling:null);Wt(is,is.current&1);break;case 19:if(v=(f&l.childLanes)!==0,(a.flags&128)!==0){if(v)return dj(a,l,f);l.flags|=128}if(k=l.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),Wt(is,is.current),v)break;return null;case 22:case 23:return l.lanes=0,nj(a,l,f)}return sa(a,l,f)}var uj,ay,hj,fj;uj=function(a,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},ay=function(){},hj=function(a,l,f,v){var k=a.memoizedProps;if(k!==v){a=l.stateNode,dl(li.current);var P=null;switch(f){case"input":k=Vs(a,k),v=Vs(a,v),P=[];break;case"select":k=ne({},k,{value:void 0}),v=ne({},v,{value:void 0}),P=[];break;case"textarea":k=sc(a,k),v=sc(a,v),P=[];break;default:typeof k.onClick!="function"&&typeof v.onClick=="function"&&(a.onclick=ue)}eu(f,v);var R;f=null;for(re in k)if(!v.hasOwnProperty(re)&&k.hasOwnProperty(re)&&k[re]!=null)if(re==="style"){var F=k[re];for(R in F)F.hasOwnProperty(R)&&(f||(f={}),f[R]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(i.hasOwnProperty(re)?P||(P=[]):(P=P||[]).push(re,null));for(re in v){var W=v[re];if(F=k!=null?k[re]:void 0,v.hasOwnProperty(re)&&W!==F&&(W!=null||F!=null))if(re==="style")if(F){for(R in F)!F.hasOwnProperty(R)||W&&W.hasOwnProperty(R)||(f||(f={}),f[R]="");for(R in W)W.hasOwnProperty(R)&&F[R]!==W[R]&&(f||(f={}),f[R]=W[R])}else f||(P||(P=[]),P.push(re,f)),f=W;else re==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,F=F?F.__html:void 0,W!=null&&F!==W&&(P=P||[]).push(re,W)):re==="children"?typeof W!="string"&&typeof W!="number"||(P=P||[]).push(re,""+W):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(i.hasOwnProperty(re)?(W!=null&&re==="onScroll"&&Ot("scroll",a),P||F===W||(P=[])):(P=P||[]).push(re,W))}f&&(P=P||[]).push("style",f);var re=P;(l.updateQueue=re)&&(l.flags|=4)}},fj=function(a,l,f,v){f!==v&&(l.flags|=4)};function Uu(a,l){if(!Xt)switch(a.tailMode){case"hidden":l=a.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var v=null;f!==null;)f.alternate!==null&&(v=f),f=f.sibling;v===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function Ks(a){var l=a.alternate!==null&&a.alternate.child===a.child,f=0,v=0;if(l)for(var k=a.child;k!==null;)f|=k.lanes|k.childLanes,v|=k.subtreeFlags&14680064,v|=k.flags&14680064,k.return=a,k=k.sibling;else for(k=a.child;k!==null;)f|=k.lanes|k.childLanes,v|=k.subtreeFlags,v|=k.flags,k.return=a,k=k.sibling;return a.subtreeFlags|=v,a.childLanes=f,l}function RR(a,l,f){var v=l.pendingProps;switch(Px(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ks(l),null;case 1:return yn(l.type)&&Jf(),Ks(l),null;case 3:return v=l.stateNode,Uc(),Yt(xn),Yt(Gs),$x(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(a===null||a.child===null)&&(rm(l)?l.flags|=4:a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Mr!==null&&(xy(Mr),Mr=null))),ay(a,l),Ks(l),null;case 5:Bx(l);var k=dl(Iu.current);if(f=l.type,a!==null&&l.stateNode!=null)hj(a,l,f,v,k),a.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!v){if(l.stateNode===null)throw Error(n(166));return Ks(l),null}if(a=dl(li.current),rm(l)){v=l.stateNode,f=l.type;var P=l.memoizedProps;switch(v[er]=l,v[Ga]=P,a=(l.mode&1)!==0,f){case"dialog":Ot("cancel",v),Ot("close",v);break;case"iframe":case"object":case"embed":Ot("load",v);break;case"video":case"audio":for(k=0;k<Ha.length;k++)Ot(Ha[k],v);break;case"source":Ot("error",v);break;case"img":case"image":case"link":Ot("error",v),Ot("load",v);break;case"details":Ot("toggle",v);break;case"input":Nr(v,P),Ot("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!P.multiple},Ot("invalid",v);break;case"textarea":Xd(v,P),Ot("invalid",v)}eu(f,P),k=null;for(var R in P)if(P.hasOwnProperty(R)){var F=P[R];R==="children"?typeof F=="string"?v.textContent!==F&&(P.suppressHydrationWarning!==!0&&se(v.textContent,F,a),k=["children",F]):typeof F=="number"&&v.textContent!==""+F&&(P.suppressHydrationWarning!==!0&&se(v.textContent,F,a),k=["children",""+F]):i.hasOwnProperty(R)&&F!=null&&R==="onScroll"&&Ot("scroll",v)}switch(f){case"input":ht(v),Li(v,P,!0);break;case"textarea":ht(v),gf(v);break;case"select":case"option":break;default:typeof P.onClick=="function"&&(v.onclick=ue)}v=k,l.updateQueue=v,v!==null&&(l.flags|=4)}else{R=k.nodeType===9?k:k.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=nc(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=R.createElement("div"),a.innerHTML="<script><\/script>
40",a=a.removeChild(a.firstChild)):typeof v.is=="string"?a=R.createElement(f,{is:v.is}):(a=R.createElement(f),f==="select"&&(R=a,v.multiple?R.multiple=!0:v.size&&(R.size=v.size))):a=R.createElementNS(a,f),a[er]=l,a[Ga]=v,uj(a,l,!1,!1),l.stateNode=a;e:{switch(R=Di(f,v),f){case"dialog":Ot("cancel",a),Ot("close",a),k=v;break;case"iframe":case"object":case"embed":Ot("load",a),k=v;break;case"video":case"audio":for(k=0;k<Ha.length;k++)Ot(Ha[k],a);k=v;break;case"source":Ot("error",a),k=v;break;case"img":case"image":case"link":Ot("error",a),Ot("load",a),k=v;break;case"details":Ot("toggle",a),k=v;break;case"input":Nr(a,v),k=Vs(a,v),Ot("invalid",a);break;case"option":k=v;break;case"select":a._wrapperState={wasMultiple:!!v.multiple},k=ne({},v,{value:void 0}),Ot("invalid",a);break;case"textarea":Xd(a,v),k=sc(a,v),Ot("invalid",a);break;default:k=v}eu(f,k),F=k;for(P in F)if(F.hasOwnProperty(P)){var W=F[P];P==="style"?ic(a,W):P==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,W!=null&&xf(a,W)):P==="children"?typeof W=="string"?(f!=="textarea"||W!=="")&&Ca(a,W):typeof W=="number"&&Ca(a,""+W):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(i.hasOwnProperty(P)?W!=null&&P==="onScroll"&&Ot("scroll",a):W!=null&&E(a,P,W,R))}switch(f){case"input":ht(a),Li(a,v,!1);break;case"textarea":ht(a),gf(a);break;case"option":v.value!=null&&a.setAttribute("value",""+Re(v.value));break;case"select":a.multiple=!!v.multiple,P=v.value,P!=null?Xr(a,!!v.multiple,P,!1):v.defaultValue!=null&&Xr(a,!!v.multiple,v.defaultValue,!0);break;default:typeof k.onClick=="function"&&(a.onclick=ue)}switch(f){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Ks(l),null;case 6:if(a&&l.stateNode!=null)fj(a,l,a.memoizedProps,v);else{if(typeof v!="string"&&l.stateNode===null)throw Error(n(166));if(f=dl(Iu.current),dl(li.current),rm(l)){if(v=l.stateNode,f=l.memoizedProps,v[er]=l,(P=v.nodeValue!==f)&&(a=zn,a!==null))switch(a.tag){case 3:se(v.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&se(v.nodeValue,f,(a.mode&1)!==0)}P&&(l.flags|=4)}else v=(f.nodeType===9?f:f.ownerDocument).createTextNode(v),v[er]=l,l.stateNode=v}return Ks(l),null;case 13:if(Yt(is),v=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(Xt&&$n!==null&&(l.mode&1)!==0&&(l.flags&128)===0)g_(),Fc(),l.flags|=98560,P=!1;else if(P=rm(l),v!==null&&v.dehydrated!==null){if(a===null){if(!P)throw Error(n(318));if(P=l.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(317));P[er]=l}else Fc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ks(l),P=!1}else Mr!==null&&(xy(Mr),Mr=null),P=!0;if(!P)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(v=v!==null,v!==(a!==null&&a.memoizedState!==null)&&v&&(l.child.flags|=8192,(l.mode&1)!==0&&(a===null||(is.current&1)!==0?ks===0&&(ks=3):by())),l.updateQueue!==null&&(l.flags|=4),Ks(l),null);case 4:return Uc(),ay(a,l),a===null&&Ya(l.stateNode.containerInfo),Ks(l),null;case 10:return Lx(l.type._context),Ks(l),null;case 17:return yn(l.type)&&Jf(),Ks(l),null;case 19:if(Yt(is),P=l.memoizedState,P===null)return Ks(l),null;if(v=(l.flags&128)!==0,R=P.rendering,R===null)if(v)Uu(P,!1);else{if(ks!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(R=dm(a),R!==null){for(l.flags|=128,Uu(P,!1),v=R.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),l.subtreeFlags=0,v=f,f=l.child;f!==null;)P=f,a=v,P.flags&=14680066,R=P.alternate,R===null?(P.childLanes=0,P.lanes=a,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=R.childLanes,P.lanes=R.lanes,P.child=R.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=R.memoizedProps,P.memoizedState=R.memoizedState,P.updateQueue=R.updateQueue,P.type=R.type,a=R.dependencies,P.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Wt(is,is.current&1|2),l.child}a=a.sibling}P.tail!==null&&ns()>Yc&&(l.flags|=128,v=!0,Uu(P,!1),l.lanes=4194304)}else{if(!v)if(a=dm(R),a!==null){if(l.flags|=128,v=!0,f=a.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),Uu(P,!0),P.tail===null&&P.tailMode==="hidden"&&!R.alternate&&!Xt)return Ks(l),null}else 2*ns()-P.renderingStartTime>Yc&&f!==1073741824&&(l.flags|=128,v=!0,Uu(P,!1),l.lanes=4194304);P.isBackwards?(R.sibling=l.child,l.child=R):(f=P.last,f!==null?f.sibling=R:l.child=R,P.last=R)}return P.tail!==null?(l=P.tail,P.rendering=l,P.tail=l.sibling,P.renderingStartTime=ns(),l.sibling=null,f=is.current,Wt(is,v?f&1|2:f&1),l):(Ks(l),null);case 22:case 23:return vy(),v=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(Un&1073741824)!==0&&(Ks(l),l.subtreeFlags&6&&(l.flags|=8192)):Ks(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function LR(a,l){switch(Px(l),l.tag){case 1:return yn(l.type)&&Jf(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Uc(),Yt(xn),Yt(Gs),$x(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return Bx(l),null;case 13:if(Yt(is),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Fc()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return Yt(is),null;case 4:return Uc(),null;
vendor: 17,769 bytes, line 40
40case 10:return Lx(l.type._context),null;case 22:case 23:return vy(),null;case 24:return null;default:return null}}var vm=!1,Qs=!1,DR=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Wc(a,l){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(v){us(a,l,v)}else f.current=null}function oy(a,l,f){try{f()}catch(v){us(a,l,v)}}var mj=!1;function OR(a,l){if(Te=Xo,a=Su(),ku(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var v=f.getSelection&&f.getSelection();if(v&&v.rangeCount!==0){f=v.anchorNode;var k=v.anchorOffset,P=v.focusNode;v=v.focusOffset;try{f.nodeType,P.nodeType}catch{f=null;break e}var R=0,F=-1,W=-1,re=0,pe=0,ge=a,fe=null;t:for(;;){for(var Le;ge!==f||k!==0&&ge.nodeType!==3||(F=R+k),ge!==P||v!==0&&ge.nodeType!==3||(W=R+v),ge.nodeType===3&&(R+=ge.nodeValue.length),(Le=ge.firstChild)!==null;)fe=ge,ge=Le;for(;;){if(ge===a)break t;if(fe===f&&++re===k&&(F=R),fe===P&&++pe===v&&(W=R),(Le=ge.nextSibling)!==null)break;ge=fe,fe=ge.parentNode}ge=Le}f=F===-1||W===-1?null:{start:F,end:W}}else f=null}f=f||{start:0,end:0}}else f=null;for(Qe={focusedElem:a,selectionRange:f},Xo=!1,Fe=l;Fe!==null;)if(l=Fe,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,Fe=a;else for(;Fe!==null;){l=Fe;try{var Be=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Be!==null){var Ue=Be.memoizedProps,ps=Be.memoizedState,K=l.stateNode,q=K.getSnapshotBeforeUpdate(l.elementType===l.type?Ue:Rr(l.type,Ue),ps);K.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var ee=l.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){us(l,l.return,we)}if(a=l.sibling,a!==null){a.return=l.return,Fe=a;break}Fe=l.return}return Be=mj,mj=!1,Be}function Vu(a,l,f){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var k=v=v.next;do{if((k.tag&a)===a){var P=k.destroy;k.destroy=void 0,P!==void 0&&oy(l,f,P)}k=k.next}while(k!==v)}}function bm(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&a)===a){var v=f.create;f.destroy=v()}f=f.next}while(f!==l)}}function ly(a){var l=a.ref;if(l!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof l=="function"?l(a):l.current=a}}function pj(a){var l=a.alternate;l!==null&&(a.alternate=null,pj(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[er],delete l[Ga],delete l[Za],delete l[jx],delete l[Nx])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function gj(a){return a.tag===5||a.tag===3||a.tag===4}function xj(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||gj(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function cy(a,l,f){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(a,l):f.insertBefore(a,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(a,f)):(l=f,l.appendChild(a)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=ue));else if(v!==4&&(a=a.child,a!==null))for(cy(a,l,f),a=a.sibling;a!==null;)cy(a,l,f),a=a.sibling}function dy(a,l,f){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?f.insertBefore(a,l):f.appendChild(a);else if(v!==4&&(a=a.child,a!==null))for(dy(a,l,f),a=a.sibling;a!==null;)dy(a,l,f),a=a.sibling}var Is=null,Lr=!1;function to(a,l,f){for(f=f.child;f!==null;)yj(a,l,f),f=f.sibling}function yj(a,l,f){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(Yo,f)}catch{}switch(f.tag){case 5:Qs||Wc(f,l);case 6:var v=Is,k=Lr;Is=null,to(a,l,f),Is=v,Lr=k,Is!==null&&(Lr?(a=Is,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):Is.removeChild(f.stateNode));break;case 18:Is!==null&&(Lr?(a=Is,f=f.stateNode,a.nodeType===8?Ru(a.parentNode,f):a.nodeType===1&&Ru(a,f),Dn(a)):Ru(Is,f.stateNode));break;case 4:v=Is,k=Lr,Is=f.stateNode.containerInfo,Lr=!0,to(a,l,f),Is=v,Lr=k;break;case 0:case 11:case 14:case 15:if(!Qs&&(v=f.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){k=v=v.next;do{var P=k,R=P.destroy;P=P.tag,R!==void 0&&((P&2)!==0||(P&4)!==0)&&oy(f,l,R),k=k.next}while(k!==v)}to(a,l,f);break;case 1:if(!Qs&&(Wc(f,l),v=f.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=f.memoizedProps,v.state=f.memoizedState,v.componentWillUnmount()}catch(F){us(f,l,F)}to(a,l,f);break;case 21:to(a,l,f);break;case 22:f.mode&1?(Qs=(v=Qs)||f.memoizedState!==null,to(a,l,f),Qs=v):to(a,l,f);break;default:to(a,l,f)}}function vj(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new DR),l.forEach(function(v){var k=HR.bind(null,a,v);f.has(v)||(f.add(v),v.then(k,k))})}}function Dr(a,l){var f=l.deletions;if(f!==null)for(var v=0;v<f.length;v++){var k=f[v];try{var P=a,R=l,F=R;e:for(;F!==null;){switch(F.tag){case 5:Is=F.stateNode,Lr=!1;break e;case 3:Is=F.stateNode.containerInfo,Lr=!0;break e;case 4:Is=F.stateNode.containerInfo,Lr=!0;break e}F=F.return}if(Is===null)throw Error(n(160));yj(P,R,k),Is=null,Lr=!1;var W=k.alternate;W!==null&&(W.return=null),k.return=null}catch(re){us(k,l,re)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)bj(l,a),l=l.sibling}function bj(a,l){var f=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Dr(l,a),di(a),v&4){try{Vu(3,a,a.return),bm(3,a)}catch(Ue){us(a,a.return,Ue)}try{Vu(5,a,a.return)}catch(Ue){us(a,a.return,Ue)}}break;case 1:Dr(l,a),di(a),v&512&&f!==null&&Wc(f,f.return);break;case 5:if(Dr(l,a),di(a),v&512&&f!==null&&Wc(f,f.return),a.flags&32){var k=a.stateNode;try{Ca(k,"")}catch(Ue){us(a,a.return,Ue)}}if(v&4&&(k=a.stateNode,k!=null)){var P=a.memoizedProps,R=f!==null?f.memoizedProps:P,F=a.type,W=a.updateQueue;if(a.updateQueue=null,W!==null)try{F==="input"&&P.type==="radio"&&P.name!=null&&Sr(k,P),Di(F,R);var re=Di(F,P);for(R=0;R<W.length;R+=2){var pe=W[R],ge=W[R+1];pe==="style"?ic(k,ge):pe==="dangerouslySetInnerHTML"?xf(k,ge):pe==="children"?Ca(k,ge):E(k,pe,ge,re)}switch(F){case"input":An(k,P);break;case"textarea":pf(k,P);break;case"select":var fe=k._wrapperState.wasMultiple;k._wrapperState.wasMultiple=!!P.multiple;var Le=P.value;Le!=null?Xr(k,!!P.multiple,Le,!1):fe!==!!P.multiple&&(P.defaultValue!=null?Xr(k,!!P.multiple,P.defaultValue,!0):Xr(k,!!P.multiple,P.multiple?[]:"",!1))}k[Ga]=P}catch(Ue){us(a,a.return,Ue)}}break;case 6:if(Dr(l,a),di(a),v&4){if(a.stateNode===null)throw Error(n(162));k=a.stateNode,P=a.memoizedProps;try{k.nodeValue=P}catch(Ue){us(a,a.return,Ue)}}break;case 3:if(Dr(l,a),di(a),v&4&&f!==null&&f.memoizedState.isDehydrated)try{Dn(l.containerInfo)}catch(Ue){us(a,a.return,Ue)}break;case 4:Dr(l,a),di(a);break;case 13:Dr(l,a),di(a),k=a.child,k.flags&8192&&(P=k.memoizedState!==null,k.stateNode.isHidden=P,!P||k.alternate!==null&&k.alternate.memoizedState!==null||(fy=ns())),v&4&&vj(a);break;case 22:if(pe=f!==null&&f.memoizedState!==null,a.mode&1?(Qs=(re=Qs)||pe,Dr(l,a),Qs=re):Dr(l,a),di(a),v&8192){if(re=a.memoizedState!==null,(a.stateNode.isHidden=re)&&!pe&&(a.mode&1)!==0)for(Fe=a,pe=a.child;pe!==null;){for(ge=Fe=pe;Fe!==null;){switch(fe=Fe,Le=fe.child,fe.tag){case 0:case 11:case 14:case 15:Vu(4,fe,fe.return);break;case 1:Wc(fe,fe.return);var Be=fe.stateNode;if(typeof Be.componentWillUnmount=="function"){v=fe,f=fe.return;try{l=v,Be.props=l.memoizedProps,Be.state=l.memoizedState,Be.componentWillUnmount()}catch(Ue){us(v,f,Ue)}}break;case 5:Wc(fe,fe.return);break;case 22:if(fe.memoizedState!==null){jj(ge);continue}}Le!==null?(Le.return=fe,Fe=Le):jj(ge)}pe=pe.sibling}e:for(pe=null,ge=a;;){if(ge.tag===5){if(pe===null){pe=ge;try{k=ge.stateNode,re?(P=k.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none"):(F=ge.stateNode,W=ge.memoizedProps.style,R=W!=null&&W.hasOwnProperty("display")?W.display:null,F.style.display=Jd("display",R))}catch(Ue){us(a,a.return,Ue)}}}else if(ge.tag===6){if(pe===null)try{ge.stateNode.nodeValue=re?"":ge.memoizedProps}catch(Ue){us(a,a.return,Ue)}}else if((ge.tag!==22&&ge.tag!==23||ge.memoizedState===null||ge===a)&&ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===a)break e;for(;ge.sibling===null;){if(ge.return===null||ge.return===a)break e;pe===ge&&(pe=null),ge=ge.return}pe===ge&&(pe=null),ge.sibling.return=ge.return,ge=ge.sibling}}break;case 19:Dr(l,a),di(a),v&4&&vj(a);break;case 21:break;default:Dr(l,a),di(a)}}function di(a){var l=a.flags;if(l&2){try{e:{for(var f=a.return;f!==null;){if(gj(f)){var v=f;break e}f=f.return}throw Error(n(160))}switch(v.tag){case 5:var k=v.stateNode;v.flags&32&&(Ca(k,""),v.flags&=-33);var P=xj(a);dy(a,P,k);break;case 3:case 4:var R=v.stateNode.containerInfo,F=xj(a);cy(a,F,R);break;default:throw Error(n(161))}}catch(W){us(a,a.return,W)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function IR(a,l,f){Fe=a,wj(a)}function wj(a,l,f){for(var v=(a.mode&1)!==0;Fe!==null;){var k=Fe,P=k.child;if(k.tag===22&&v){var R=k.memoizedState!==null||vm;if(!R){var F=k.alternate,W=F!==null&&F.memoizedState!==null||Qs;F=vm;var re=Qs;if(vm=R,(Qs=W)&&!re)for(Fe=k;Fe!==null;)R=Fe,W=R.child,R.tag===22&&R.memoizedState!==null?Nj(k):W!==null?(W.return=R,Fe=W):Nj(k);for(;P!==null;)Fe=P,wj(P),P=P.sibling;Fe=k,vm=F,Qs=re}_j(a)}else(k.subtreeFlags&8772)!==0&&P!==null?(P.return=k,Fe=P):_j(a)}}function _j(a){for(;Fe!==null;){var l=Fe;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Qs||bm(5,l);break;case 1:var v=l.stateNode;if(l.flags&4&&!Qs)if(f===null)v.componentDidMount();else{var k=l.elementType===l.type?f.memoizedProps:Rr(l.type,f.memoizedProps);v.componentDidUpdate(k,f.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var P=l.updateQueue;P!==null&&j_(l,P,v);break;case 3:var R=l.updateQueue;if(R!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}j_(l,R,f)}break;case 5:var F=l.stateNode;if(f===null&&l.flags&4){f=F;var W=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":W.autoFocus&&f.focus();break;case"img":W.src&&(f.src=W.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var re=l.alternate;if(re!==null){var pe=re.memoizedState;if(pe!==null){var ge=pe.dehydrated;ge!==null&&Dn(ge)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Qs||l.flags&512&&ly(l)}catch(fe){us(l,l.return,fe)}}if(l===a){Fe=null;break}if(f=l.sibling,f!==null){f.return=l.return,Fe=f;break}Fe=l.return}}function jj(a){for(;Fe!==null;){var l=Fe;if(l===a){Fe=null;break}var f=l.sibling;if(f!==null){f.return=l.return,Fe=f;break}Fe=l.return}}function Nj(a){for(;Fe!==null;){var l=Fe;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{bm(4,l)}catch(W){us(l,f,W)}break;case 1:var v=l.stateNode;if(typeof v.componentDidMount=="function"){var k=l.return;try{v.componentDidMount()}catch(W){us(l,k,W)}}var P=l.return;try{ly(l)}catch(W){us(l,P,W)}break;case 5:var R=l.return;try{ly(l)}catch(W){us(l,R,W)}}}catch(W){us(l,l.return,W)}if(l===a){Fe=null;break}var F=l.sibling;if(F!==null){F.return=l.return,Fe=F;break}Fe=l.return}}var FR=Math.ceil,wm=D.ReactCurrentDispatcher,uy=D.ReactCurrentOwner,ir=D.ReactCurrentBatchConfig,St=0,As=null,bs=null,Fs=0,Un=0,Hc=Ka(0),ks=0,Wu=null,hl=0,_m=0,hy=0,Hu=null,bn=null,fy=0,Yc=1/0,na=null,jm=!1,my=null,so=null,Nm=!1,no=null,Sm=0,Yu=0,py=null,km=-1,Cm=0;function dn(){return(St&6)!==0?ns():km!==-1?km:km=ns()}function ro(a){return(a.mode&1)===0?1:(St&2)!==0&&Fs!==0?Fs&-Fs:wR.transition!==null?(Cm===0&&(Cm=Ef()),Cm):(a=vt,a!==0||(a=window.event,a=a===void 0?16:xt(a.type)),a)}function Or(a,l,f,v){if(50<Yu)throw Yu=0,py=null,Error(n(185));Rn(a,f,v),((St&2)===0||a!==As)&&(a===As&&((St&2)===0&&(_m|=f),ks===4&&io(a,Fs)),wn(a,v),f===1&&St===0&&(l.mode&1)===0&&(Yc=ns()+500,tm&&Xa()))}function wn(a,l){var f=a.callbackNode;hc(a,l);var v=Vt(a,a===As?Fs:0);if(v===0)f!==null&&ou(f),a.callbackNode=null,a.callbackPriority=0;else if(l=v&-v,a.callbackPriority!==l){if(f!=null&&ou(f),l===1)a.tag===0?bR(kj.bind(null,a)):u_(kj.bind(null,a)),qs(function(){(St&6)===0&&Xa()}),f=null;else{switch(Ra(v)){case 1:f=lu;break;case 4:f=Tf;break;case 16:f=dc;break;case 536870912:f=Ta;break;default:f=dc}f=Lj(f,Sj.bind(null,a))}a.callbackPriority=l,a.callbackNode=f}}function Sj(a,l){if(km=-1,Cm=0,(St&6)!==0)throw Error(n(327));var f=a.callbackNode;if(qc()&&a.callbackNode!==f)return null;var v=Vt(a,a===As?Fs:0);if(v===0)return null;if((v&30)!==0||(v&a.expiredLanes)!==0||l)l=Pm(a,v);else{l=v;var k=St;St|=2;var P=Pj();(As!==a||Fs!==l)&&(na=null,Yc=ns()+500,ml(a,l));do try{$R();break}catch(F){Cj(a,F)}while(!0);Rx(),wm.current=P,St=k,bs!==null?l=0:(As=null,Fs=0,l=ks)}if(l!==0){if(l===2&&(k=Hs(a),k!==0&&(v=k,l=gy(a,k))),l===1)throw f=Wu,ml(a,0),io(a,v),wn(a,ns()),f;if(l===6)io(a,v);else{if(k=a.current.alternate,(v&30)===0&&!BR(k)&&(l=Pm(a,v),l===2&&(P=Hs(a),P!==0&&(v=P,l=gy(a,P))),l===1))throw f=Wu,ml(a,0),io(a,v),wn(a,ns()),f;switch(a.finishedWork=k,a.finishedLanes=v,l){case 0:case 1:throw Error(n(345));case 2:pl(a,bn,na);break;case 3:if(io(a,v),(v&130023424)===v&&(l=fy+500-ns(),10<l)){if(Vt(a,0)!==0)break;if(k=a.suspendedLanes,(k&v)!==v){dn(),a.pingedLanes|=a.suspendedLanes&k;break}a.timeoutHandle=Ns(pl.bind(null,a,bn,na),l);break}pl(a,bn,na);break;case 4:if(io(a,v),(v&4194240)===v)break;for(l=a.eventTimes,k=-1;0<v;){var R=31-lt(v);P=1<<R,R=l[R],R>k&&(k=R),v&=~P}if(v=k,v=ns()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*FR(v/1960))-v,10<v){a.timeoutHandle=Ns(pl.bind(null,a,bn,na),v);break}pl(a,bn,na);break;case 5:pl(a,bn,na);break;default:throw Error(n(329))}}}return wn(a,ns()),a.callbackNode===f?Sj.bind(null,a):null}function gy(a,l){var f=Hu;return a.current.memoizedState.isDehydrated&&(ml(a,l).flags|=256),a=Pm(a,l),a!==2&&(l=bn,bn=f,l!==null&&xy(l)),a}function xy(a){bn===null?bn=a:bn.push.apply(bn,a)}function BR(a){for(var l=a;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var v=0;v<f.length;v++){var k=f[v],P=k.getSnapshot;k=k.value;try{if(!Fn(P(),k))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function io(a,l){for(l&=~hy,l&=~_m,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var f=31-lt(l),v=1<<f;a[f]=-1,l&=~v}}function kj(a){if((St&6)!==0)throw Error(n(327));qc();var l=Vt(a,0);if((l&1)===0)return wn(a,ns()),null;var f=Pm(a,l);if(a.tag!==0&&f===2){var v=Hs(a);v!==0&&(l=v,f=gy(a,v))}if(f===1)throw f=Wu,ml(a,0),io(a,l),wn(a,ns()),f;if(f===6)throw Error(n(345));return a.finishedWork=a.current.alternate,a.finishedLanes=l,pl(a,bn,na),wn(a,ns()),null}function yy(a,l){var f=St;St|=1;try{return a(l)}finally{St=f,St===0&&(Yc=ns()+500,tm&&Xa())}}function fl(a){no!==null&&no.tag===0&&(St&6)===0&&qc();var l=St;St|=1;var f=ir.transition,v=vt;try{if(ir.transition=null,vt=1,a)return a()}finally{vt=v,ir.transition=f,St=l,(St&6)===0&&Xa()}}function vy(){Un=Hc.current,Yt(Hc)}function ml(a,l){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,vs(f)),bs!==null)for(f=bs.return;f!==null;){var v=f;switch(Px(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&Jf();break;case 3:Uc(),Yt(xn),Yt(Gs),$x();break;case 5:Bx(v);break;case 4:Uc();break;case 13:Yt(is);break;case 19:Yt(is);break;case 10:Lx(v.type._context);break;case 22:case 23:vy()}f=f.return}if(As=a,bs=a=ao(a.current,null),Fs=Un=l,ks=0,Wu=null,hy=_m=hl=0,bn=Hu=null,cl!==null){for(l=0;l<cl.length;l++)if(f=cl[l],v=f.interleaved,v!==null){f.interleaved=null;var k=v.next,P=f.pending;if(P!==null){var R=P.next;P.next=k,v.next=R}f.pending=v}cl=null}return a}function Cj(a,l){do{var f=bs;try{if(Rx(),um.current=pm,hm){for(var v=as.memoizedState;v!==null;){var k=v.queue;k!==null&&(k.pending=null),v=v.next}hm=!1}if(ul=0,Es=Ss=as=null,Fu=!1,Bu=0,uy.current=null,f===null||f.return===null){ks=1,Wu=l,bs=null;break}e:{var P=a,R=f.return,F=f,W=l;if(l=Fs,F.flags|=32768,W!==null&&typeof W=="object"&&typeof W.then=="function"){var re=W,pe=F,ge=pe.tag;if((pe.mode&1)===0&&(ge===0||ge===11||ge===15)){var fe=pe.alternate;fe?(pe.updateQueue=fe.updateQueue,pe.memoizedState=fe.memoizedState,pe.lanes=fe.lanes):(pe.updateQueue=null,pe.memoizedState=null)}var Le=X_(R);if(Le!==null){Le.flags&=-257,J_(Le,R,F,P,l),Le.mode&1&&Q_(P,re,l),l=Le,W=re;var Be=l.updateQueue;if(Be===null){var Ue=new Set;Ue.add(W),l.updateQueue=Ue}else Be.add(W);break e}else{if((l&1)===0){Q_(P,re,l),by();break e}W=Error(n(426))}}else if(Xt&&F.mode&1){var ps=X_(R);if(ps!==null){(ps.flags&65536)===0&&(ps.flags|=256),J_(ps,R,F,P,l),Ax(Vc(W,F));break e}}P=W=Vc(W,F),ks!==4&&(ks=2),Hu===null?Hu=[P]:Hu.push(P),P=R;do{switch(P.tag){case 3:P.flags|=65536,l&=-l,P.lanes|=l;var K=Z_(P,W,l);__(P,K);break e;case 1:F=W;var q=P.type,ee=P.stateNode;if((P.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(so===null||!so.has(ee)))){P.flags|=65536,l&=-l,P.lanes|=l;var we=K_(P,F,l);__(P,we);break e}}P=P.return}while(P!==null)}Ej(f)}catch(Ye){l=Ye,bs===f&&f!==null&&(bs=f=f.return);continue}break}while(!0)}function Pj(){var a=wm.current;return wm.current=pm,a===null?pm:a}function by(){(ks===0||ks===3||ks===2)&&(ks=4),As===null||(hl&268435455)===0&&(_m&268435455)===0||io(As,Fs)}function Pm(a,l){var f=St;St|=2;var v=Pj();
vendor: 6,812 bytes, line 40
40(As!==a||Fs!==l)&&(na=null,ml(a,l));do try{zR();break}catch(k){Cj(a,k)}while(!0);if(Rx(),St=f,wm.current=v,bs!==null)throw Error(n(261));return As=null,Fs=0,ks}function zR(){for(;bs!==null;)Tj(bs)}function $R(){for(;bs!==null&&!ox();)Tj(bs)}function Tj(a){var l=Rj(a.alternate,a,Un);a.memoizedProps=a.pendingProps,l===null?Ej(a):bs=l,uy.current=null}function Ej(a){var l=a;do{var f=l.alternate;if(a=l.return,(l.flags&32768)===0){if(f=RR(f,l,Un),f!==null){bs=f;return}}else{if(f=LR(f,l),f!==null){f.flags&=32767,bs=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{ks=6,bs=null;return}}if(l=l.sibling,l!==null){bs=l;return}bs=l=a}while(l!==null);ks===0&&(ks=5)}function pl(a,l,f){var v=vt,k=ir.transition;try{ir.transition=null,vt=1,UR(a,l,f,v)}finally{ir.transition=k,vt=v}return null}function UR(a,l,f,v){do qc();while(no!==null);if((St&6)!==0)throw Error(n(327));f=a.finishedWork;var k=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(n(177));a.callbackNode=null,a.callbackPriority=0;var P=f.lanes|f.childLanes;if(ds(a,P),a===As&&(bs=As=null,Fs=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||Nm||(Nm=!0,Lj(dc,function(){return qc(),null})),P=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||P){P=ir.transition,ir.transition=null;var R=vt;vt=1;var F=St;St|=4,uy.current=null,OR(a,f),bj(f,a),Xn(Qe),Xo=!!Te,Qe=Te=null,a.current=f,IR(f),cc(),St=F,vt=R,ir.transition=P}else a.current=f;if(Nm&&(Nm=!1,no=a,Sm=k),P=a.pendingLanes,P===0&&(so=null),qo(f.stateNode),wn(a,ns()),l!==null)for(v=a.onRecoverableError,f=0;f<l.length;f++)k=l[f],v(k.value,{componentStack:k.stack,digest:k.digest});if(jm)throw jm=!1,a=my,my=null,a;return(Sm&1)!==0&&a.tag!==0&&qc(),P=a.pendingLanes,(P&1)!==0?a===py?Yu++:(Yu=0,py=a):Yu=0,Xa(),null}function qc(){if(no!==null){var a=Ra(Sm),l=ir.transition,f=vt;try{if(ir.transition=null,vt=16>a?16:a,no===null)var v=!1;else{if(a=no,no=null,Sm=0,(St&6)!==0)throw Error(n(331));var k=St;for(St|=4,Fe=a.current;Fe!==null;){var P=Fe,R=P.child;if((Fe.flags&16)!==0){var F=P.deletions;if(F!==null){for(var W=0;W<F.length;W++){var re=F[W];for(Fe=re;Fe!==null;){var pe=Fe;switch(pe.tag){case 0:case 11:case 15:Vu(8,pe,P)}var ge=pe.child;if(ge!==null)ge.return=pe,Fe=ge;else for(;Fe!==null;){pe=Fe;var fe=pe.sibling,Le=pe.return;if(pj(pe),pe===re){Fe=null;break}if(fe!==null){fe.return=Le,Fe=fe;break}Fe=Le}}}var Be=P.alternate;if(Be!==null){var Ue=Be.child;if(Ue!==null){Be.child=null;do{var ps=Ue.sibling;Ue.sibling=null,Ue=ps}while(Ue!==null)}}Fe=P}}if((P.subtreeFlags&2064)!==0&&R!==null)R.return=P,Fe=R;else e:for(;Fe!==null;){if(P=Fe,(P.flags&2048)!==0)switch(P.tag){case 0:case 11:case 15:Vu(9,P,P.return)}var K=P.sibling;if(K!==null){K.return=P.return,Fe=K;break e}Fe=P.return}}var q=a.current;for(Fe=q;Fe!==null;){R=Fe;var ee=R.child;if((R.subtreeFlags&2064)!==0&&ee!==null)ee.return=R,Fe=ee;else e:for(R=q;Fe!==null;){if(F=Fe,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:bm(9,F)}}catch(Ye){us(F,F.return,Ye)}if(F===R){Fe=null;break e}var we=F.sibling;if(we!==null){we.return=F.return,Fe=we;break e}Fe=F.return}}if(St=k,Xa(),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(Yo,a)}catch{}v=!0}return v}finally{vt=f,ir.transition=l}}return!1}function Aj(a,l,f){l=Vc(f,l),l=Z_(a,l,1),a=eo(a,l,1),l=dn(),a!==null&&(Rn(a,1,l),wn(a,l))}function us(a,l,f){if(a.tag===3)Aj(a,a,f);else for(;l!==null;){if(l.tag===3){Aj(l,a,f);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(so===null||!so.has(v))){a=Vc(f,a),a=K_(l,a,1),l=eo(l,a,1),a=dn(),l!==null&&(Rn(l,1,a),wn(l,a));break}}l=l.return}}function VR(a,l,f){var v=a.pingCache;v!==null&&v.delete(l),l=dn(),a.pingedLanes|=a.suspendedLanes&f,As===a&&(Fs&f)===f&&(ks===4||ks===3&&(Fs&130023424)===Fs&&500>ns()-fy?ml(a,0):hy|=f),wn(a,l)}function Mj(a,l){l===0&&((a.mode&1)===0?l=1:(l=Aa,Aa<<=1,(Aa&130023424)===0&&(Aa=4194304)));var f=dn();a=ea(a,l),a!==null&&(Rn(a,l,f),wn(a,f))}function WR(a){var l=a.memoizedState,f=0;l!==null&&(f=l.retryLane),Mj(a,f)}function HR(a,l){var f=0;switch(a.tag){case 13:var v=a.stateNode,k=a.memoizedState;k!==null&&(f=k.retryLane);break;case 19:v=a.stateNode;break;default:throw Error(n(314))}v!==null&&v.delete(l),Mj(a,f)}var Rj;Rj=function(a,l,f){if(a!==null)if(a.memoizedProps!==l.pendingProps||xn.current)vn=!0;else{if((a.lanes&f)===0&&(l.flags&128)===0)return vn=!1,MR(a,l,f);vn=(a.flags&131072)!==0}else vn=!1,Xt&&(l.flags&1048576)!==0&&h_(l,nm,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;ym(a,l),a=l.pendingProps;var k=Dc(l,Gs.current);$c(l,f),k=Wx(null,l,v,a,k,f);var P=Hx();return l.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,yn(v)?(P=!0,em(l)):P=!1,l.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,Ix(l),k.updater=gm,l.stateNode=k,k._reactInternals=l,Qx(l,v,a,f),l=ty(null,l,v,!0,P,f)):(l.tag=0,Xt&&P&&Cx(l),cn(null,l,k,f),l=l.child),l;case 16:v=l.elementType;e:{switch(ym(a,l),a=l.pendingProps,k=v._init,v=k(v._payload),l.type=v,k=l.tag=qR(v),a=Rr(v,a),k){case 0:l=ey(null,l,v,a,f);break e;case 1:l=ij(null,l,v,a,f);break e;case 11:l=ej(null,l,v,a,f);break e;case 14:l=tj(null,l,v,Rr(v.type,a),f);break e}throw Error(n(306,v,""))}return l;case 0:return v=l.type,k=l.pendingProps,k=l.elementType===v?k:Rr(v,k),ey(a,l,v,k,f);case 1:return v=l.type,k=l.pendingProps,k=l.elementType===v?k:Rr(v,k),ij(a,l,v,k,f);case 3:e:{if(aj(l),a===null)throw Error(n(387));v=l.pendingProps,P=l.memoizedState,k=P.element,w_(a,l),cm(l,v,null,f);var R=l.memoizedState;if(v=R.element,P.isDehydrated)if(P={element:v,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},l.updateQueue.baseState=P,l.memoizedState=P,l.flags&256){k=Vc(Error(n(423)),l),l=oj(a,l,v,f,k);break e}else if(v!==k){k=Vc(Error(n(424)),l),l=oj(a,l,v,f,k);break e}else for($n=oi(l.stateNode.containerInfo.firstChild),zn=l,Xt=!0,Mr=null,f=v_(l,null,v,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Fc(),v===k){l=sa(a,l,f);break e}cn(a,l,v,f)}l=l.child}return l;case 5:return N_(l),a===null&&Ex(l),v=l.type,k=l.pendingProps,P=a!==null?a.memoizedProps:null,R=k.children,dt(v,k)?R=null:P!==null&&dt(v,P)&&(l.flags|=32),rj(a,l),cn(a,l,R,f),l.child;case 6:return a===null&&Ex(l),null;case 13:return lj(a,l,f);case 4:return Fx(l,l.stateNode.containerInfo),v=l.pendingProps,a===null?l.child=Bc(l,null,v,f):cn(a,l,v,f),l.child;case 11:return v=l.type,k=l.pendingProps,k=l.elementType===v?k:Rr(v,k),ej(a,l,v,k,f);case 7:return cn(a,l,l.pendingProps,f),l.child;case 8:return cn(a,l,l.pendingProps.children,f),l.child;case 12:return cn(a,l,l.pendingProps.children,f),l.child;
vendor: 1,167 bytes, line 40
40case 10:e:{if(v=l.type._context,k=l.pendingProps,P=l.memoizedProps,R=k.value,Wt(am,v._currentValue),v._currentValue=R,P!==null)if(Fn(P.value,R)){if(P.children===k.children&&!xn.current){l=sa(a,l,f);break e}}else for(P=l.child,P!==null&&(P.return=l);P!==null;){var F=P.dependencies;if(F!==null){R=P.child;for(var W=F.firstContext;W!==null;){if(W.context===v){if(P.tag===1){W=ta(-1,f&-f),W.tag=2;var re=P.updateQueue;if(re!==null){re=re.shared;var pe=re.pending;pe===null?W.next=W:(W.next=pe.next,pe.next=W),re.pending=W}}P.lanes|=f,W=P.alternate,W!==null&&(W.lanes|=f),Dx(P.return,f,l),F.lanes|=f;break}W=W.next}}else if(P.tag===10)R=P.type===l.type?null:P.child;else if(P.tag===18){if(R=P.return,R===null)throw Error(n(341));R.lanes|=f,F=R.alternate,F!==null&&(F.lanes|=f),Dx(R,f,l),R=P.sibling}else R=P.child;if(R!==null)R.return=P;else for(R=P;R!==null;){if(R===l){R=null;break}if(P=R.sibling,P!==null){P.return=R.return,R=P;break}R=R.return}P=R}cn(a,l,k.children,f),l=l.child}return l;case 9:return k=l.type,v=l.pendingProps.children,$c(l,f),k=nr(k),v=v(k),l.flags|=1,cn(a,l,v,f),l.child;case 14:return v=l.type,k=Rr(v,l.pendingProps),k=Rr(v.type,k),tj(a,l,v,k,f);
vendor: 9,672 bytes, line 40
40case 15:return sj(a,l,l.type,l.pendingProps,f);case 17:return v=l.type,k=l.pendingProps,k=l.elementType===v?k:Rr(v,k),ym(a,l),l.tag=1,yn(v)?(a=!0,em(l)):a=!1,$c(l,f),q_(l,v,k),Qx(l,v,k,f),ty(null,l,v,!0,a,f);case 19:return dj(a,l,f);case 22:return nj(a,l,f)}throw Error(n(156,l.tag))};function Lj(a,l){return Pf(a,l)}function YR(a,l,f,v){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(a,l,f,v){return new YR(a,l,f,v)}function wy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function qR(a){if(typeof a=="function")return wy(a)?1:0;if(a!=null){if(a=a.$$typeof,a===xe)return 11;if(a===He)return 14}return 2}function ao(a,l){var f=a.alternate;return f===null?(f=ar(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function Tm(a,l,f,v,k,P){var R=2;if(v=a,typeof a=="function")wy(a)&&(R=1);else if(typeof a=="string")R=5;else e:switch(a){case H:return gl(f.children,k,P,l);case V:R=8,k|=8;break;case Q:return a=ar(12,f,l,k|2),a.elementType=Q,a.lanes=P,a;case Me:return a=ar(13,f,l,k),a.elementType=Me,a.lanes=P,a;case ke:return a=ar(19,f,l,k),a.elementType=ke,a.lanes=P,a;case _e:return Em(f,k,P,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case J:R=10;break e;case le:R=9;break e;case xe:R=11;break e;case He:R=14;break e;case ye:R=16,v=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return l=ar(R,f,l,k),l.elementType=a,l.type=v,l.lanes=P,l}function gl(a,l,f,v){return a=ar(7,a,v,l),a.lanes=f,a}function Em(a,l,f,v){return a=ar(22,a,v,l),a.elementType=_e,a.lanes=f,a.stateNode={isHidden:!1},a}function _y(a,l,f){return a=ar(6,a,null,l),a.lanes=f,a}function jy(a,l,f){return l=ar(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function GR(a,l,f,v,k){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=v,this.onRecoverableError=k,this.mutableSourceEagerHydrationData=null}function Ny(a,l,f,v,k,P,R,F,W){return a=new GR(a,l,f,F,W),l===1?(l=1,P===!0&&(l|=8)):l=0,P=ar(3,null,null,l),a.current=P,P.stateNode=a,P.memoizedState={element:v,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ix(P),a}function ZR(a,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:v==null?null:""+v,children:a,containerInfo:l,implementation:f}}function Dj(a){if(!a)return Qa;a=a._reactInternals;e:{if(Jr(a)!==a||a.tag!==1)throw Error(n(170));var l=a;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(yn(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(a.tag===1){var f=a.type;if(yn(f))return c_(a,f,l)}return l}function Oj(a,l,f,v,k,P,R,F,W){return a=Ny(f,v,!0,a,k,P,R,F,W),a.context=Dj(null),f=a.current,v=dn(),k=ro(f),P=ta(v,k),P.callback=l??null,eo(f,P,k),a.current.lanes=k,Rn(a,k,v),wn(a,v),a}function Am(a,l,f,v){var k=l.current,P=dn(),R=ro(k);return f=Dj(f),l.context===null?l.context=f:l.pendingContext=f,l=ta(P,R),l.payload={element:a},v=v===void 0?null:v,v!==null&&(l.callback=v),a=eo(k,l,R),a!==null&&(Or(a,k,R,P),lm(a,k,R)),R}function Mm(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Ij(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<l?f:l}}function Sy(a,l){Ij(a,l),(a=a.alternate)&&Ij(a,l)}function KR(){return null}var Fj=typeof reportError=="function"?reportError:function(a){console.error(a)};function ky(a){this._internalRoot=a}Rm.prototype.render=ky.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(n(409));Am(a,l,null,null)},Rm.prototype.unmount=ky.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;fl(function(){Am(null,a,null,null)}),l[Mt]=null}};function Rm(a){this._internalRoot=a}Rm.prototype.unstable_scheduleHydration=function(a){if(a){var l=pc();a={blockedOn:null,target:a,priority:l};for(var f=0;f<js.length&&l!==0&&l<js[f].priority;f++);js.splice(f,0,a),f===0&&gc(a)}};function Cy(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Lm(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Bj(){}function QR(a,l,f,v,k){if(k){if(typeof v=="function"){var P=v;v=function(){var re=Mm(R);P.call(re)}}var R=Oj(l,v,a,0,null,!1,!1,"",Bj);return a._reactRootContainer=R,a[Mt]=R.current,Ya(a.nodeType===8?a.parentNode:a),fl(),R}for(;k=a.lastChild;)a.removeChild(k);if(typeof v=="function"){var F=v;v=function(){var re=Mm(W);F.call(re)}}var W=Ny(a,0,!1,null,null,!1,!1,"",Bj);return a._reactRootContainer=W,a[Mt]=W.current,Ya(a.nodeType===8?a.parentNode:a),fl(function(){Am(l,W,f,v)}),W}function Dm(a,l,f,v,k){var P=f._reactRootContainer;if(P){var R=P;if(typeof k=="function"){var F=k;k=function(){var W=Mm(R);F.call(W)}}Am(l,R,a,k)}else R=QR(f,l,a,k,v);return Mm(R)}fc=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.current.memoizedState.isDehydrated){var f=at(l.pendingLanes);f!==0&&(Cr(l,f|1),wn(l,ns()),(St&6)===0&&(Yc=ns()+500,Xa()))}break;case 13:fl(function(){var v=ea(a,1);if(v!==null){var k=dn();Or(v,a,1,k)}}),Sy(a,1)}},Bi=function(a){if(a.tag===13){var l=ea(a,134217728);if(l!==null){var f=dn();Or(l,a,134217728,f)}Sy(a,134217728)}},mc=function(a){if(a.tag===13){var l=ro(a),f=ea(a,l);if(f!==null){var v=dn();Or(f,a,l,v)}Sy(a,l)}},pc=function(){return vt},Go=function(a,l){var f=vt;try{return vt=a,l()}finally{vt=f}},ac=function(a,l,f){switch(l){case"input":if(An(a,f),l=f.name,f.type==="radio"&&l!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var v=f[l];if(v!==a&&v.form===a.form){var k=Rc(v);if(!k)throw Error(n(90));ct(v),An(v,k)}}}break;case"textarea":pf(a,f);break;case"select":l=f.value,l!=null&&Xr(a,!!f.multiple,l,!1)}},_f=yy,jf=fl;var XR={usingClientEntryPoint:!1,Events:[Zi,Ki,Rc,bf,wf,yy]},qu={findFiberByHostInstance:Gi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},JR={bundleType:qu.bundleType,version:qu.version,rendererPackageName:qu.rendererPackageName,rendererConfig:qu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=kf(a),a===null?null:a.stateNode},findFiberByHostInstance:qu.findFiberByHostInstance||KR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Om=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Om.isDisabled&&Om.supportsFiber)try{Yo=Om.inject(JR),Mn=Om}catch{}}return _n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XR,_n.createPortal=function(a,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cy(l))throw Error(n(200));return ZR(a,l,null,f)},_n.createRoot=function(a,l){if(!Cy(a))throw Error(n(299));var f=!1,v="",k=Fj;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onRecoverableError!==void 0&&(k=l.onRecoverableError)),l=Ny(a,1,!1,null,null,f,!1,v,k),a[Mt]=l.current,Ya(a.nodeType===8?a.parentNode:a),new ky(l)},_n.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=kf(l),a=a===null?null:a.stateNode,a},_n.flushSync=function(a){return fl(a)},_n.hydrate=function(a,l,f){if(!Lm(l))throw Error(n(200));return Dm(null,a,l,!0,f)},_n.hydrateRoot=function(a,l,f){if(!Cy(a))throw Error(n(405));var v=f!=null&&f.hydratedSources||null,k=!1,P="",R=Fj;if(f!=null&&(f.unstable_strictMode===!0&&(k=!0),f.identifierPrefix!==void 0&&(P=f.identifierPrefix),f.onRecoverableError!==void 0&&(R=f.onRecoverableError)),l=Oj(l,null,a,1,f??null,k,!1,P,R),a[Mt]=l.current,Ya(a),v)for(a=0;a<v.length;a++)f=v[a],k=f._getVersion,k=k(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,k]:l.mutableSourceEagerHydrationData.push(f,k);return new Rm(l)},_n.render=function(a,l,f){if(!Lm(l))throw Error(n(200));return Dm(null,a,l,!1,f)}
40,_n.unmountComponentAtNode=function(a){if(!Lm(a))throw Error(n(40));return a._reactRootContainer?(fl(function(){Dm(null,null,a,!1,function(){a._reactRootContainer=null,a[Mt]=null})}),!0):!1},_n.unstable_batchedUpdates=yy,_n.unstable_renderSubtreeIntoContainer=function(a,l,f,v){if(!Lm(f))throw Error(n(200));if(a==null||a._reactInternals===void 0)throw Error(n(38));return Dm(a,l,f,!1,v)},_n.version="18.3.1-next-f1338f8080-20240426",_n}var Gj;function yk(){if(Gj)return Ay.exports;Gj=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ay.exports=lL(),Ay.exports}var Zj;function cL(){if(Zj)return Fm;Zj=1;var e=yk();return Fm.createRoot=e.createRoot,Fm.hydrateRoot=e.hydrateRoot,Fm}var dL=cL();const uL=$0(dL),hL=20,fL=1e6,da={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Ly=0;function mL(){return Ly=(Ly+1)%Number.MAX_VALUE,Ly.toString()}const Dy=new Map,Kj=e=>{if(Dy.has(e))return;const t=setTimeout(()=>{Dy.delete(e),ph({type:da.REMOVE_TOAST,toastId:e})},fL);Dy.set(e,t)},pL=(e,t)=>{switch(t.type){case da.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,hL)};case da.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case da.DISMISS_TOAST:{const{toastId:n}=t;return n?Kj(n):e.toasts.forEach(r=>{Kj(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case da.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},np=[];let rp={toasts:[]};function ph(e){rp=pL(rp,e),np.forEach(t=>{t(rp)})}function gL({...e}){const t=mL(),n=i=>ph({type:da.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>ph({type:da.DISMISS_TOAST,toastId:t});return ph({type:da.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function xL(){const[e,t]=b.useState(rp);return b.useEffect(()=>(np.push(t),()=>{const n=np.indexOf(t);n>-1&&np.splice(n,1)}),[e]),{...e,toast:gL,dismiss:n=>ph({type:da.DISMISS_TOAST,toastId:n})}}function vk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bk(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vk(e))&&(r&&(r+=" "),r+=t);return r}const Qj=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xj=bk,Gh=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xj(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:c}=t,d=Object.keys(i).map(x=>{const p=n==null?void 0:n[x],g=c==null?void 0:c[x];if(p===null)return null;const w=Qj(p)||Qj(g);return i[x][w]}),h=n&&Object.entries(n).reduce((x,p)=>{let[g,w]=p;return w===void 0||(x[g]=w),x},{}),m=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((x,p)=>{let{class:g,className:w,...N}=p;return Object.entries(N).every(j=>{let[_,C]=j;return Array.isArray(C)?C.includes({...c,...h}[_]):{...c,...h}[_]===C})?[...x,g,w]:x},[]);return Xj(e,d,m,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.475.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const yL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.475.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var vL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.475.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const bL=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:d,...h},m)=>b.createElement("svg",{ref:m,...vL,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wk("lucide",i),...h},[...d.map(([x,p])=>
55b.createElement(x,p)),...Array.isArray(c)?c:[c]]));/**
56 * @license lucide-react v0.475.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Ae=(e,t)=>{const n=b.forwardRef(({className:r,...i},c)=>b.createElement(bL,{ref:c,iconNode:t,className:wk(`lucide-${yL(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.475.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const wL=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_k=Ae("ArrowLeft",wL);/**
66 * @license lucide-react v0.475.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const _L=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],jL=Ae("ArrowRight",_L);/**
71 * @license lucide-react v0.475.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const NL=[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]],SL=Ae("Battery",NL);/**
76 * @license lucide-react v0.475.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const kL=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],CL=Ae("Briefcase",kL);/**
81 * @license lucide-react v0.475.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const PL=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],jk=Ae("Building2",PL);/**
86 * @license lucide-react v0.475.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const TL=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],Jj=Ae("Building",TL);/**
91 * @license lucide-react v0.475.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const EL=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ds=Ae("Calendar",EL);/**
96 * @license lucide-react v0.475.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const AL=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Ol=Ae("Camera",AL);/**
101 * @license lucide-react v0.475.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const ML=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],RL=Ae("Car",ML);/**
106 * @license lucide-react v0.475.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const LL=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],eg=Ae("ChartColumn",LL);/**
111 * @license lucide-react v0.475.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const DL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ld=Ae("Check",DL);/**
116 * @license lucide-react v0.475.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const OL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pr=Ae("ChevronDown",OL);/**
121 * @license lucide-react v0.475.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const IL=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Nk=Ae("ChevronLeft",IL);/**
126 * @license lucide-react v0.475.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const FL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],gr=Ae("ChevronRight",FL);/**
131 * @license lucide-react v0.475.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const BL=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],pi=Ae("ChevronUp",BL);/**
136 * @license lucide-react v0.475.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const zL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fn=Ae("CircleAlert",zL);/**
141 * @license lucide-react v0.475.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const $L=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ms=Ae("CircleCheckBig",$L);/**
146 * @license lucide-react v0.475.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const UL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],os=Ae("CircleCheck",UL);/**
151 * @license lucide-react v0.475.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const VL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sk=Ae("CircleHelp",VL);/**
156 * @license lucide-react v0.475.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const WL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],tg=Ae("CircleX",WL);/**
161 * @license lucide-react v0.475.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const HL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],W0=Ae("Circle",HL);/**
166 * @license lucide-react v0.475.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const YL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Ts=Ae("Clock",YL);/**
171 * @license lucide-react v0.475.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const qL=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
175y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ip=Ae("Compass",qL);/**
176 * @license lucide-react v0.475.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const GL=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ap=Ae("Copy",GL);/**
181 * @license lucide-react v0.475.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const ZL=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],H0=Ae("CreditCard",ZL);/**
186 * @license lucide-react v0.475.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const KL=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],es=Ae("DollarSign",KL);/**
191 * @license lucide-react v0.475.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const QL=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],rh=Ae("Download",QL);/**
196 * @license lucide-react v0.475.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const XL=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fa=Ae("ExternalLink",XL);/**
201 * @license lucide-react v0.475.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const JL=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Y0=Ae("FileText",JL);/**
206 * @license lucide-react v0.475.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const eD=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],tD=Ae("Filter",eD);/**
211 * @license lucide-react v0.475.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const sD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Cd=Ae("Info",sD);/**
216 * @license lucide-react v0.475.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const nD=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],$l=Ae("Key",nD);/**
221 * @license lucide-react v0.475.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const rD=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],iD=Ae("List",rD);/**
226 * @license lucide-react v0.475.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const aD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],It=Ae("LoaderCircle",aD);/**
231 * @license lucide-react v0.475.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const oD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],q0=Ae("LockOpen",oD);/**
236 * @license lucide-react v0.475.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const lD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Ct=Ae("Lock",lD);/**
241 * @license lucide-react v0.475.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const cD=[["path",{d:"M6 20a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2",key:"1m57jg"}],["path",{d:"M8 18V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14",key:"1l99gc"}],["path",{d:"M10 20h4",key:"ni2waw"}],["circle",{cx:"16",cy:"20",r:"2",key:"1vifvg"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]],gh=Ae("Luggage",cD);/**
246 * @license lucide-react v0.475.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const dD=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Sp=Ae("Mail",dD);/**
251 * @license lucide-react v0.475.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const uD=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],jt=Ae("MapPin",uD);/**
256 * @license lucide-react v0.475.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const hD=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],fD=Ae("MessageSquare",hD);/**
261 * @license lucide-react v0.475.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const mD=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],pD=Ae("Monitor",mD);/**
266 * @license lucide-react v0.475.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const gD=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],kk=Ae("Navigation",gD);/**
271 * @license lucide-react v0.475.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const xD=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Ut=Ae("Package",xD);/**
276 * @license lucide-react v0.475.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const yD=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],Ck=Ae("Percent",yD);/**
281 * @license lucide-react v0.475.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const vD=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],ld=Ae("Phone",vD);/**
286 * @license lucide-react v0.475.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const bD=[["path",{d:"M2 22h20",key:"272qi7"}],["path",{d:"M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z",key:"1ma21e"}]],wD=Ae("PlaneLanding",bD);/**
291 * @license lucide-react v0.475.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const _D=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.
2951-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],jD=Ae("Plane",_D);/**
296 * @license lucide-react v0.475.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const ND=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ao=Ae("Plus",ND);/**
301 * @license lucide-react v0.475.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const SD=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],kD=Ae("Printer",SD);/**
306 * @license lucide-react v0.475.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const CD=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],jv=Ae("RefreshCw",CD);/**
311 * @license lucide-react v0.475.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const PD=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],TD=Ae("RotateCcw",PD);/**
316 * @license lucide-react v0.475.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const ED=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],G0=Ae("Search",ED);/**
321 * @license lucide-react v0.475.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const AD=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],MD=Ae("Settings",AD);/**
326 * @license lucide-react v0.475.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const RD=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Tn=Ae("Shield",RD);/**
331 * @license lucide-react v0.475.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const LD=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Pk=Ae("Smartphone",LD);/**
336 * @license lucide-react v0.475.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const DD=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Il=Ae("Sparkles",DD);/**
341 * @license lucide-react v0.475.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const OD=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ID=Ae("SquareCheckBig",OD);/**
346 * @license lucide-react v0.475.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const FD=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Tk=Ae("SquarePen",FD);/**
351 * @license lucide-react v0.475.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const BD=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Yn=Ae("Star",BD);/**
356 * @license lucide-react v0.475.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const zD=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],sg=Ae("Tag",zD);/**
361 * @license lucide-react v0.475.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const $D=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ek=Ae("Target",$D);/**
366 * @license lucide-react v0.475.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const UD=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Z0=Ae("Trash2",UD);/**
371 * @license lucide-react v0.475.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const VD=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Ci=Ae("TrendingUp",VD);/**
376 * @license lucide-react v0.475.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const WD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],K0=Ae("TriangleAlert",WD);/**
381 * @license lucide-react v0.475.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const HD=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],So=Ae("Truck",HD);/**
386 * @license lucide-react v0.475.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const YD=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Ak=Ae("Upload",YD);/**
391 * @license lucide-react v0.475.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const qD=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Q0=Ae("User",qD);/**
396 * @license lucide-react v0.475.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const GD=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],ng=Ae("Users",GD);/**
401 * @license lucide-react v0.475.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const ZD=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],eN=Ae("Video",ZD);/**
406 * @license lucide-react v0.475.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const KD=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Mk=Ae("Wifi",KD);/**
411 * @license lucide-react v0.475.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const QD=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],XD=Ae("Wrench",QD);/**
416 * @license lucide-react v0.475.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const JD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 7,920 bytes, lines 420-425
420],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Io=Ae("X",JD);/**
421 * @license lucide-react v0.475.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const eO=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],kp=Ae("Zap",eO),X0="-",tO=e=>{const t=nO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{const h=d.split(X0);return h[0]===""&&h.length!==1&&h.shift(),Rk(h,t)||sO(d)},getConflictingClassGroupIds:(d,h)=>{const m=n[d]||[];return h&&r[d]?[...m,...r[d]]:m}}},Rk=(e,t)=>{var d;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Rk(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const c=e.join(X0);return(d=t.validators.find(({validator:h})=>h(c)))==null?void 0:d.classGroupId},tN=/^\[(.+)\]$/,sO=e=>{if(tN.test(e)){const t=tN.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},nO=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)Nv(n[i],r,i,t);return r},Nv=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const c=i===""?t:sN(t,i);c.classGroupId=n;return}if(typeof i=="function"){if(rO(i)){Nv(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([c,d])=>{Nv(d,sN(t,c),n,r)})})},sN=(e,t)=>{let n=e;return t.split(X0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},rO=e=>e.isThemeGetter,iO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(c,d)=>{n.set(c,d),t++,t>e&&(t=0,r=n,n=new Map)};return{get(c){let d=n.get(c);if(d!==void 0)return d;if((d=r.get(c))!==void 0)return i(c,d),d},set(c,d){n.has(c)?n.set(c,d):i(c,d)}}},Sv="!",kv=":",aO=kv.length,oO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let d=0,h=0,m=0,x;for(let j=0;j<i.length;j++){let _=i[j];if(d===0&&h===0){if(_===kv){c.push(i.slice(m,j)),m=j+aO;continue}if(_==="/"){x=j;continue}}_==="["?d++:_==="]"?d--:_==="("?h++:_===")"&&h--}const p=c.length===0?i:i.substring(m),g=lO(p),w=g!==p,N=x&&x>m?x-m:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:g,maybePostfixModifierPosition:N}};if(t){const i=t+kv,c=r;r=d=>d.startsWith(i)?c(d.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:d,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},lO=e=>e.endsWith(Sv)?e.substring(0,e.length-1):e.startsWith(Sv)?e.substring(1):e,cO=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let c=[];return r.forEach(d=>{d[0]==="["||t[d]?(i.push(...c.sort(),d),c=[]):c.push(d)}),i.push(...c.sort()),i}},dO=e=>({cache:iO(e.cacheSize),parseClassName:oO(e),sortModifiers:cO(e),...tO(e)}),uO=/\s+/,hO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,d=[],h=e.trim().split(uO);let m="";for(let x=h.length-1;x>=0;x-=1){const p=h[x],{isExternal:g,modifiers:w,hasImportantModifier:N,baseClassName:j,maybePostfixModifierPosition:_}=n(p);if(g){m=p+(m.length>0?" "+m:m);continue}let C=!!_,A=r(C?j.substring(0,_):j);if(!A){if(!C){m=p+(m.length>0?" "+m:m);continue}if(A=r(j),!A){m=p+(m.length>0?" "+m:m);continue}C=!1}const M=c(w).join(":"),E=N?M+Sv:M,D=E+A;if(d.includes(D))continue;d.push(D);const I=i(A,C);for(let z=0;z<I.length;++z){const H=I[z];d.push(E+H)}m=p+(m.length>0?" "+m:m)}return m};function fO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Lk(t))&&(r&&(r+=" "),r+=n);return r}const Lk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Lk(e[r]))&&(n&&(n+=" "),n+=t);return n};function mO(e,...t){let n,r,i,c=d;function d(m){const x=t.reduce((p,g)=>g(p),e());return n=dO(x),r=n.cache.get,i=n.cache.set,c=h,h(m)}function h(m){const x=r(m);if(x)return x;const p=hO(m,n);return i(m,p),p}return function(){return c(fO.apply(null,arguments))}}const Cs=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Dk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ok=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pO=/^\d+\/\d+$/,gO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gc=e=>pO.test(e),mt=e=>!!e&&!Number.isNaN(Number(e)),lo=e=>!!e&&Number.isInteger(Number(e)),Oy=e=>e.endsWith("%")&&mt(e.slice(0,-1)),ra=e=>gO.test(e),wO=()=>!0,_O=e=>xO.test(e)&&!yO.test(e),Ik=()=>!1,jO=e=>vO.test(e),NO=e=>bO.test(e),SO=e=>!ze(e)&&!$e(e),kO=e=>Dd(e,zk,Ik),ze=e=>Dk.test(e),xl=e=>Dd(e,$k,_O),Iy=e=>Dd(e,AO,mt),nN=e=>Dd(e,Fk,Ik),CO=e=>Dd(e,Bk,NO),Bm=e=>Dd(e,Uk,jO),$e=e=>Ok.test(e),Zu=e=>Od(e,$k),PO=e=>Od(e,MO),rN=e=>Od(e,Fk),TO=e=>Od(e,zk),EO=e=>Od(e,Bk),zm=e=>Od(e,Uk,!0),Dd=(e,t,n)=>{const r=Dk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Od=(e,t,n=!1)=>{const r=Ok.exec(e);return r?r[1]?t(r[1]):n:!1},Fk=e=>e==="position"||e==="percentage",Bk=e=>e==="image"||e==="url",zk=e=>e==="length"||e==="size"||e==="bg-size",$k=e=>e==="length",AO=e=>e==="number",MO=e=>e==="family-name",Uk=e=>e==="shadow",RO=()=>{const e=Cs("color"),t=Cs("font"),n=Cs("text"),r=Cs("font-weight"),i=Cs("tracking"),c=Cs("leading"),d=Cs("breakpoint"),h=Cs("container"),m=Cs("spacing"),x=Cs("radius"),p=Cs("shadow"),g=Cs("inset-shadow"),w=Cs("text-shadow"),N=Cs("drop-shadow"),j=Cs("blur"),_=Cs("perspective"),C=Cs("aspect"),A=Cs("ease"),M=Cs("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...D(),$e,ze],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],V=()=>[$e,ze,m],Q=()=>[Gc,"full","auto",...V()],J=()=>[lo,"none","subgrid",$e,ze],le=()=>["auto",{span:["full",lo,$e,ze]},lo,$e,ze],xe=()=>[lo,"auto",$e,ze],Me=()=>["auto","min","max","fr",$e,ze],ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],He=()=>["start","end","center","stretch","center-safe","end-safe"],ye=()=>["auto",...V()],_e=()=>[Gc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],B=()=>[e,$e,ze],ce=()=>[...D(),rN,nN,{position:[$e,ze]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",TO,kO,{size:[$e,ze]}],ie=()=>[Oy,Zu,xl],je=()=>["","none","full",x,$e,ze],be=()=>["",mt,Zu,xl],Se=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[mt,Oy,rN,nN],Re=()=>["","none",j,$e,ze],qe=()=>["none",mt,$e,ze],Je=()=>["none",mt,$e,ze],ht=()=>[mt,$e,ze],ct=()=>[Gc,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ra],breakpoint:[ra],color:[wO],container:[ra],"drop-shadow":[ra],ease:["in","out","in-out"],font:[SO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ra],shadow:[ra],spacing:["px",mt],text:[ra],"text-shadow":[ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gc,ze,$e,C]}
vendor: 5,654 bytes, line 425
425],container:["container"],columns:[{columns:[mt,ze,$e,h]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{start:Q()}],end:[{end:Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[lo,"auto",$e,ze]}],basis:[{basis:[Gc,"full","auto",h,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mt,Gc,"auto","initial","none",ze]}],grow:[{grow:["",mt,$e,ze]}],shrink:[{shrink:["",mt,$e,ze]}],order:[{order:[lo,"first","last","none",$e,ze]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...ke(),"normal"]}],"justify-items":[{"justify-items":[...He(),"normal"]}],"justify-self":[{"justify-self":["auto",...He()]}],"align-content":[{content:["normal",...ke()]}],"align-items":[{items:[...He(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...He(),{baseline:["","last"]}]}],"place-content":[{"place-content":ke()}],"place-items":[{"place-items":[...He(),"baseline"]}],"place-self":[{"place-self":["auto",...He()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:ye()}],mx:[{mx:ye()}],my:[{my:ye()}],ms:[{ms:ye()}],me:[{me:ye()}],mt:[{mt:ye()}],mr:[{mr:ye()}],mb:[{mb:ye()}],ml:[{ml:ye()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],w:[{w:[h,"screen",..._e()]}],"min-w":[{"min-w":[h,"screen","none",..._e()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",n,Zu,xl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$e,Iy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oy,ze]}],"font-family":[{font:[PO,ze,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,$e,ze]}],"line-clamp":[{"line-clamp":[mt,"none",$e,Iy]}],leading:[{leading:[c,...V()]}],"list-image":[{"list-image":["none",$e,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$e,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[mt,"from-font","auto",$e,xl]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[mt,"auto",$e,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lo,$e,ze],radial:["",$e,ze],conic:[lo,$e,ze]},EO,CO]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:ie()}
425],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:je()}],"rounded-s":[{"rounded-s":je()}],"rounded-e":[{"rounded-e":je()}],"rounded-t":[{"rounded-t":je()}],"rounded-r":[{"rounded-r":je()}],"rounded-b":[{"rounded-b":je()}],"rounded-l":[{"rounded-l":je()}],"rounded-ss":[{"rounded-ss":je()}],"rounded-se":[{"rounded-se":je()}],"rounded-ee":[{"rounded-ee":je()}],"rounded-es":[{"rounded-es":je()}],"rounded-tl":[{"rounded-tl":je()}],"rounded-tr":[{"rounded-tr":je()}],"rounded-br":[{"rounded-br":je()}],"rounded-bl":[{"rounded-bl":je()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}
vendor: 5,757 bytes, line 425
425],"divide-color":[{divide:B()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mt,$e,ze]}],"outline-w":[{outline:["",mt,Zu,xl]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",p,zm,Bm]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",g,zm,Bm]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[mt,xl]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",w,zm,Bm]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[mt,$e,ze]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[mt]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[$e,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[mt]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$e,ze]}],filter:[{filter:["","none",$e,ze]}],blur:[{blur:Re()}],brightness:[{brightness:[mt,$e,ze]}],contrast:[{contrast:[mt,$e,ze]}],"drop-shadow":[{"drop-shadow":["","none",N,zm,Bm]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",mt,$e,ze]}],"hue-rotate":[{"hue-rotate":[mt,$e,ze]}],invert:[{invert:["",mt,$e,ze]}],saturate:[{saturate:[mt,$e,ze]}],sepia:[{sepia:["",mt,$e,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",$e,ze]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[mt,$e,ze]}],"backdrop-contrast":[{"backdrop-contrast":[mt,$e,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mt,$e,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mt,$e,ze]}],"backdrop-invert":[{"backdrop-invert":["",mt,$e,ze]}],"backdrop-opacity":[{"backdrop-opacity":[mt,$e,ze]}],"backdrop-saturate":[{"backdrop-saturate":[mt,$e,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",mt,$e,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$e,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mt,"initial",$e,ze]}],ease:[{ease:["linear","initial",A,$e,ze]}],delay:[{delay:[mt,$e,ze]}],animate:[{animate:["none",M,$e,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,$e,ze]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:qe()}],"rotate-x":[{"rotate-x":qe()}],"rotate-y":[{"rotate-y":qe()}],"rotate-z":[{"rotate-z":qe()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:ht()}],"skew-x":[{"skew-x":ht()}],"skew-y":[{"skew-y":ht()}],transform:[{transform:[$e,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ct()}],"translate-x":[{"translate-x":ct()}],"translate-y":[{"translate-y":ct()}],"translate-z":[{"translate-z":ct()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}
vendor: 6,657 bytes, line 425
425],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e,ze]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[mt,Zu,xl,Iy]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},LO=mO(RO);function We(...e){return LO(bk(e))}const Vk=b.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"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]",...e}));Vk.displayName="ToastProvider";const Wk=b.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"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]",...e}));Wk.displayName="ToastViewport";const DO=Gh("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"}}),Hk=b.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,className:We(DO({variant:t}),e),...n}));Hk.displayName="Toast";const OO=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("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",e),...t}));OO.displayName="ToastAction";const Yk=b.forwardRef(({className:e,...t},n)=>s.jsx("button",{ref:n,className:We("absolute right-2 top-2 rounded-md p-1 text-foreground
425/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",e),"toast-close":"",...t,children:s.jsx(Io,{className:"h-4 w-4"})}));Yk.displayName="ToastClose";const qk=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("text-sm font-semibold",e),...t}));qk.displayName="ToastTitle";const Gk=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("text-sm opacity-90",e),...t}));Gk.displayName="ToastDescription";function IO(){const{toasts:e}=xL();return s.jsxs(Vk,{children:[e.map(function({id:t,title:n,description:r,action:i,...c}){return s.jsxs(Hk,{...c,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(qk,{children:n}),r&&s.jsx(Gk,{children:r})]}),i,s.jsx(Yk,{})]},t)}),s.jsx(Wk,{})]})}var Zh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},FO={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},mo,z0,lk,BO=(lk=class{constructor(){st(this,mo,FO);st(this,z0,!1)}setTimeoutProvider(e){De(this,mo,e)}setTimeout(e,t){return Y(this,mo).setTimeout(e,t)}clearTimeout(e){Y(this,mo).clearTimeout(e)}setInterval(e,t){return Y(this,mo).setInterval(e,t)}clearInterval(e){Y(this,mo).clearInterval(e)}},mo=new WeakMap,z0=new WeakMap,lk),jl=new BO;function zO(e){setTimeout(e,0)}var Ul=typeof window>"u"||"Deno"in globalThis;function Sn(){}function $O(e,t){return typeof e=="function"?e(t):e}function Cv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ko(e,t){return typeof e=="function"?e(t):e}function hr(e,t){return typeof e=="function"?e(t):e}function iN(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:d,stale:h}=e;if(d){if(r){if(t.queryHash!==J0(d,t.options))return!1}else if(!Nh(t.queryKey,d))return!1}if(n!=="all"){const m=t.isActive();if(n==="active"&&!m||n==="inactive"&&m)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||i&&i!==t.state.fetchStatus||c&&!c(t))}function aN(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(jh(t.options.mutationKey)!==jh(c))return!1}else if(!Nh(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function J0(e,t){return((t==null?void 0:t.queryKeyHashFn)||jh)(e)}function jh(e){return JSON.stringify(e,(t,n)=>Tv(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Nh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Nh(e[n],t[n])):!1}var UO=Object.prototype.hasOwnProperty;function Kk(e,t){if(e===t)return e;const n=oN(e)&&oN(t);if(!n&&!(Tv(e)&&Tv(t)))return t;const i=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),d=c.length,h=n?new Array(d):{};let m=0;for(let x=0;x<d;x++){const p=n?x:c[x],g=e[p],w=t[p];if(g===w){h[p]=g,(n?x<i:UO.call(e,p))&&m++;continue}if(g===null||w===null||typeof g!="object"||typeof w!="object"){h[p]=w;continue}const N=Kk(g,w);h[p]=N,N===g&&m++}return i===d&&m===i?e:h}function Pv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function oN(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tv(e){if(!lN(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!lN(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function lN(e){return Object.prototype.toString.call(e)==="[object Object]"}function VO(e){return new Promise(t=>{jl.setTimeout(t,e)})}function Ev(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Kk(e,t):t}function WO(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function HO(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var eb=Symbol();function Qk(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===eb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function YO(e,t){return typeof e=="function"?e(...t):!!e}var Cl,po,pd,ck,qO=(ck=class extends Zh{constructor(){super();st(this,Cl);st(this,po);st(this,pd);De(this,pd,t=>{if(!Ul&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Y(this,po)||this.setEventListener(Y(this,pd))}onUnsubscribe(){var t;this.hasListeners()||((t=Y(this,po))==null||t.call(this),De(this,po,void 0))}setEventListener(t){var n;De(this,pd,t),(n=Y(this,po))==null||n.call(this),De(this,po,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Y(this,Cl)!==t&&(De(this,Cl,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 5,022 bytes, line 425
425this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Y(this,Cl)=="boolean"?Y(this,Cl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cl=new WeakMap,po=new WeakMap,pd=new WeakMap,ck),tb=new qO;function Av(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var GO=zO;function ZO(){let e=[],t=0,n=h=>{h()},r=h=>{h()},i=GO;const c=h=>{t?e.push(h):i(()=>{n(h)})},d=()=>{const h=e;e=[],h.length&&i(()=>{r(()=>{h.forEach(m=>{n(m)})})})};return{batch:h=>{let m;t++;try{m=h()}finally{t--,t||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{i=h}}}var $s=ZO(),gd,go,xd,dk,KO=(dk=class extends Zh{constructor(){super();st(this,gd,!0);st(this,go);st(this,xd);De(this,xd,t=>{if(!Ul&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Y(this,go)||this.setEventListener(Y(this,xd))}onUnsubscribe(){var t;this.hasListeners()||((t=Y(this,go))==null||t.call(this),De(this,go,void 0))}setEventListener(t){var n;De(this,xd,t),(n=Y(this,go))==null||n.call(this),De(this,go,t(this.setOnline.bind(this)))}setOnline(t){Y(this,gd)!==t&&(De(this,gd,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Y(this,gd)}},gd=new WeakMap,go=new WeakMap,xd=new WeakMap,dk),Cp=new KO;function QO(e){return Math.min(1e3*2**e,3e4)}function Xk(e){return(e??"online")==="online"?Cp.isOnline():!0}var Mv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jk(e){let t=!1,n=0,r;const i=Av(),c=()=>i.status!=="pending",d=_=>{var C;if(!c()){const A=new Mv(_);w(A),(C=e.onCancel)==null||C.call(e,A)}},h=()=>{t=!0},m=()=>{t=!1},x=()=>tb.isFocused()&&(e.networkMode==="always"||Cp.isOnline())&&e.canRun(),p=()=>Xk(e.networkMode)&&e.canRun(),g=_=>{c()||(r==null||r(),i.resolve(_))},w=_=>{c()||(r==null||r(),i.reject(_))},N=()=>new Promise(_=>{var C;r=A=>{(c()||x())&&_(A)},(C=e.onPause)==null||C.call(e)}).then(()=>{var _;r=void 0,c()||(_=e.onContinue)==null||_.call(e)}),j=()=>{if(c())return;let _;const C=n===0?e.initialPromise:void 0;try{_=C??e.fn()}catch(A){_=Promise.reject(A)}Promise.resolve(_).then(g).catch(A=>{var z;if(c())return;const M=e.retry??(Ul?0:3),E=e.retryDelay??QO,D=typeof E=="function"?E(n,A):E,I=M===!0||typeof M=="number"&&n<M||typeof M=="function"&&M(n,A);if(t||!I){w(A);return}n++,(z=e.onFail)==null||z.call(e,n,A),VO(D).then(()=>x()?void 0:N()).then(()=>{t?w(A):j()})})};return{promise:i,status:()=>i.status,cancel:d,continue:()=>(r==null||r(),i),cancelRetry:h,continueRetry:m,canStart:p,start:()=>(p()?j():N().then(j),i)}}var Pl,uk,e2=(uk=class{constructor(){st(this,Pl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cv(this.gcTime)&&De(this,Pl,jl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ul?1/0:300*1e3))}clearGcTimeout(){Y(this,Pl)&&(jl.clearTimeout(Y(this,Pl)),De(this,Pl,void 0))}},Pl=new WeakMap,uk),Tl,yd,ur,El,Rs,Vh,Al,Br,aa,hk,XO=(hk=class extends e2{constructor(t){super();st(this,Br);st(this,Tl);st(this,yd);st(this,ur);st(this,El);st(this,Rs);st(this,Vh);st(this,Al);De(this,Al,!1),De(this,Vh,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,El,t.client),De(this,ur,Y(this,El).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Tl,cN(this.options)),this.state=t.state??Y(this,Tl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Y(this,Rs))==null?void 0:t.promise}setOptions(t){if(this.options={...Y(this,Vh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=cN(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),De(this,Tl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Y(this,ur).remove(this)}setData(t,n){const r=Ev(this.state.data,t,this.options);return bt(this,Br,aa).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){bt(this,Br,aa).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=Y(this,Rs))==null?void 0:r.promise;return(i=Y(this,Rs))==null||i.cancel(t),n?n.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Y(this,Tl))}isActive(){return this.observers.some(t=>hr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eb||this.state.dataUpdateCount+this.state.errorUpdate
425Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ko(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Zk(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Y(this,Rs))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Y(this,Rs))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Y(this,ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Y(this,Rs)&&(Y(this,Al)?Y(this,Rs).cancel({revert:!0}):Y(this,Rs).cancelRetry()),this.scheduleGc()),Y(this,ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||bt(this,Br,aa).call(this,{type:"invalidate"})}async fetch(t,n){var m,x,p,g,w,N,j,_,C,A,M,E;if(this.state.fetchStatus!=="idle"&&((m=Y(this,Rs))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Y(this,Rs))return Y(this,Rs).continueRetry(),Y(this,Rs).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(I=>I.options.queryFn);D&&this.setOptions(D.options)}const r=new AbortController,i=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(De(this,Al,!0),r.signal)})},c=()=>{const D=Qk(this.options,n),z=(()=>{const H={client:Y(this,El),queryKey:this.queryKey,meta:this.meta};return i(H),H})();return De(this,Al,!1),this.options.persister?this.options.persister(D,z,this):D(z)},h=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Y(this,El),state:this.state,fetchFn:c};return i(D),D})();(x=this.options.behavior)==null||x.onFetch(h,this),De(this,yd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=h.fetchOptions)==null?void 0:p.meta))&&bt(this,Br,aa).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),De(this,Rs,Jk({initialPromise:n==null?void 0:n.initialPromise,fn:h.fetchFn,onCancel:D=>{D instanceof Mv&&D.revert&&this.setState({...Y(this,yd),fetchStatus:"idle"}),r.abort()},onFail:(D,I)=>{bt(this,Br,aa).call(this,{type:"failed",failureCount:D,error:I})},onPause:()=>{bt(this,Br,aa).call(this,{type:"pause"})},onContinue:()=>{bt(this,Br,aa).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const D=await Y(this,Rs).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(N=(w=Y(this,ur).config).onSuccess)==null||N.call(w,D,this),(_=(j=Y(this,ur).config).onSettled)==null||_.call(j,D,this.state.error,this),D}catch(D){if(D instanceof Mv){if(D.silent)return Y(this,Rs).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw bt(this,Br,aa).call(this,{type:"error",error:D}),(A=(C=Y(this,ur).config).onError)==null||A.call(C,D,this),(E=(M=Y(this,ur).config).onSettled)==null||E.call(M,this.state.data,D,this),D}finally{this.scheduleGc()}}},Tl=new WeakMap,yd=new WeakMap,ur=new WeakMap,El=new WeakMap,Rs=new WeakMap,Vh=new WeakMap,Al=new WeakMap,Br=new WeakSet,aa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...t2(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,yd,t.manual?i:void 0),i;case"error":const c=t.error;
vendor: 13,778 bytes, line 425
425return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),$s.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Y(this,ur).notify({query:this,type:"updated",action:t})})},hk);function t2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cN(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Nn,wt,Wh,un,Ml,vd,la,xo,Hh,bd,wd,Rl,Ll,yo,_d,Rt,ih,Rv,Lv,Dv,Ov,Iv,Fv,Bv,s2,fk,JO=(fk=class extends Zh{constructor(t,n){super();st(this,Rt);st(this,Nn);st(this,wt);st(this,Wh);st(this,un);st(this,Ml);st(this,vd);st(this,la);st(this,xo);st(this,Hh);st(this,bd);st(this,wd);st(this,Rl);st(this,Ll);st(this,yo);st(this,_d,new Set);this.options=n,De(this,Nn,t),De(this,xo,null),De(this,la,Av()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Y(this,wt).addObserver(this),dN(Y(this,wt),this.options)?bt(this,Rt,ih).call(this):this.updateResult(),bt(this,Rt,Ov).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zv(Y(this,wt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zv(Y(this,wt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,bt(this,Rt,Iv).call(this),bt(this,Rt,Fv).call(this),Y(this,wt).removeObserver(this)}setOptions(t){const n=this.options,r=Y(this,wt);if(this.options=Y(this,Nn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hr(this.options.enabled,Y(this,wt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");bt(this,Rt,Bv).call(this),Y(this,wt).setOptions(this.options),n._defaulted&&!Pv(this.options,n)&&Y(this,Nn).getQueryCache().notify({type:"observerOptionsUpdated",query:Y(this,wt),observer:this});const i=this.hasListeners();i&&uN(Y(this,wt),r,this.options,n)&&bt(this,Rt,ih).call(this),this.updateResult(),i&&(Y(this,wt)!==r||hr(this.options.enabled,Y(this,wt))!==hr(n.enabled,Y(this,wt))||ko(this.options.staleTime,Y(this,wt))!==ko(n.staleTime,Y(this,wt)))&&bt(this,Rt,Rv).call(this);const c=bt(this,Rt,Lv).call(this);i&&(Y(this,wt)!==r||hr(this.options.enabled,Y(this,wt))!==hr(n.enabled,Y(this,wt))||c!==Y(this,yo))&&bt(this,Rt,Dv).call(this,c)}getOptimisticResult(t){const n=Y(this,Nn).getQueryCache().build(Y(this,Nn),t),r=this.createResult(n,t);return t6(this,r)&&(De(this,un,r),De(this,vd,this.options),De(this,Ml,Y(this,wt).state)),r}getCurrentResult(){return Y(this,un)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&Y(this,la).status==="pending"&&Y(this,la).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){Y(this,_d).add(t)}getCurrentQuery(){return Y(this,wt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Y(this,Nn).defaultQueryOptions(t),r=Y(this,Nn).getQueryCache().build(Y(this,Nn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return bt(this,Rt,ih).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Y(this,un)))}createResult(t,n){var Q;const r=Y(this,wt),i=this.options,c=Y(this,un),d=Y(this,Ml),h=Y(this,vd),x=t!==r?t.state:Y(this,Wh),{state:p}=t;let g={...p},w=!1,N;if(n._optimisticResults){const J=this.hasListeners(),le=!J&&dN(t,n),xe=J&&uN(t,r,n,i);(le||xe)&&(g={...g,...t2(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:_,status:C}=g;N=g.data;let A=!1;if(n.placeholderData!==void 0&&N===void 0&&C==="pending"){let J;c!=null&&c.isPlaceholderData&&n.placeholderData===(h==null?void 0:h.placeholderData)?(J=c.data,A=!0):J=typeof n.placeholderData=="function"?n.placeholderData((Q=Y(this,wd))==null?void 0:Q.state.data,Y(this,wd)):n.placeholderData,J!==void 0&&(C="success",N=Ev(c==null?void 0:c.data,J,n),w=!0)}if(n.select&&N!==void 0&&!A)if(c&&N===(d==null?void 0:d.data)&&n.select===Y(this,Hh))N=Y(this,bd);else try{De(this,Hh,n.select),N=n.select(N),N=Ev(c==null?void 0:c.data,N,n),De(this,bd,N),De(this,xo,null)}catch(J){De(this,xo,J)}Y(this,xo)&&(j=Y(this,xo),N=Y(this,bd),_=Date.now(),C="error");const M=g.fetchStatus==="fetching",E=C==="pending",D=C==="error",I=E&&M,z=N!==void 0,V={status:C,fetchStatus:g.fetchStatus,isPending:E,isSuccess:C==="success",isError:D,isInitialLoading:I,isLoading:I,data:N,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>x.dataUpdateCount||g.errorUpdateCount>x.errorUpdateCount,isFetching:M,isRefetching:M&&!E,isLoadingError:D&&!z,isPaused:g.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:D&&z,isStale:sb(t,n),refetch:this.refetch,promise:Y(this,la),isEnabled:hr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const J=Me=>{V.status==="error"?Me.reject(V.error):V.data!==void 0&&Me.resolve(V.data)},le=()=>{const Me=De(this,la,V.promise=Av());J(Me)},xe=Y(this,la);switch(xe.status){case"pending":t.queryHash===r.queryHash&&J(xe);break;case"fulfilled":(V.status==="error"||V.data!==xe.value)&&le();break;case"rejected":(V.status!=="error"||V.error!==xe.reason)&&le();break}}return V}updateResult(){const t=Y(this,un),n=this.createResult(Y(this,wt),this.options);if(De(this,Ml,Y(this,wt).state),De(this,vd,this.options),Y(this,Ml).data!==void 0&&De(this,wd,Y(this,wt)),Pv(n,t))return;De(this,un,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,c=typeof i=="function"?i():i;if(c==="all"||!c&&!Y(this,_d).size)return!0;const d=new Set(c??Y(this,_d));return this.options.throwOnError&&d.add("error"),Object.keys(Y(this,un)).some(h=>{const m=h;return Y(this,un)[m]!==t[m]&&d.has(m)})};bt(this,Rt,s2).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&bt(this,Rt,Ov).call(this)}},Nn=new WeakMap,wt=new WeakMap,Wh=new WeakMap,un=new WeakMap,Ml=new WeakMap,vd=new WeakMap,la=new WeakMap,xo=new WeakMap,Hh=new WeakMap,bd=new WeakMap,wd=new WeakMap,Rl=new WeakMap,Ll=new WeakMap,yo=new WeakMap,_d=new WeakMap,Rt=new WeakSet,ih=function(t){bt(this,Rt,Bv).call(this);let n=Y(this,wt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Sn)),n},Rv=function(){bt(this,Rt,Iv).call(this);const t=ko(this.options.staleTime,Y(this,wt));if(Ul||Y(this,un).isStale||!Cv(t))return;const r=Zk(Y(this,un).dataUpdatedAt,t)+1;De(this,Rl,jl.setTimeout(()=>{Y(this,un).isStale||this.updateResult()},r))},Lv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Y(this,wt)):this.options.refetchInterval)??!1},Dv=function(t){bt(this,Rt,Fv).call(this),De(this,yo,t),!(Ul||hr(this.options.enabled,Y(this,wt))===!1||!Cv(Y(this,yo))||Y(this,yo)===0)&&De(this,Ll,jl.setInterval(()=>{(this.options.refetchIntervalInBackground||tb.isFocused())&&bt(this,Rt,ih).call(this)},Y(this,yo)))},Ov=function(){bt(this,Rt,Rv).call(this),bt(this,Rt,Dv).call(this,bt(this,Rt,Lv).call(this))},Iv=function(){Y(this,Rl)&&(jl.clearTimeout(Y(this,Rl)),De(this,Rl,void 0))},Fv=function(){Y(this,Ll)&&(jl.clearInterval(Y(this,Ll)),De(this,Ll,void 0))},Bv=function(){const t=Y(this,Nn).getQueryCache().build(Y(this,Nn),this.options);if(t===Y(this,wt))return;const n=Y(this,wt);De(this,wt,t),De(this,Wh,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},s2=function(t){$s.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Y(this,un))}),Y(this,Nn).getQueryCache().notify({query:Y(this,wt),type:"observerResultsUpdated"})})},fk);function e6(e,t){return hr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function dN(e,t){return e6(e,t)||e.state.data!==void 0&&zv(e,t,t.refetchOnMount)}function zv(e,t,n){if(hr(t.enabled,e)!==!1&&ko(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sb(e,t)}return!1}function uN(e,t,n,r){return(e!==t||hr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&sb(e,n)}function sb(e,t){return hr(t.enabled,e)!==!1&&e.isStaleByTime(ko(t.staleTime,e))}function t6(e,t){return!Pv(e.getCurrentResult(),t)}function hN(e){return{onFetch:(t,n)=>{var p,g,w,N,j;const r=t.options,i=(w=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:w.direction,c=((N=t.state.data)==null?void 0:N.pages)||[],d=((j=t.state.data)==null?void 0:j.pageParams)||[];let h={pages:[],pageParams:[]},m=0;const x=async()=>{let _=!1;const C=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?_=!0:t.signal.addEventListener("abort",()=>{_=!0}),t.signal)})},A=Qk(t.options,t.fetchOptions),M=async(E,D,I)=>{if(_)return Promise.reject();if(D==null&&E.pages.length)return Promise.resolve(E);const H=(()=>{const le={client:t.client,queryKey:t.queryKey,pageParam:D,direction:I?"backward":"forward",meta:t.options.meta};return C(le),le})(),V=await A(H),{maxPages:Q}=t.options,J=I?HO:WO;return{pages:J(E.pages,V,Q),pageParams:J(E.pageParams,D,Q)}};if(i&&c.length){const E=i==="backward",D=E?s6:fN,I={pages:c,pageParams:d},z=D(r,I);h=await M(I,z,E)}else{const E=e??c.length;do{const D=m===0?d[0]??r.initialPageParam:fN(r,h);if(m>0&&D==null)break;h=await M(h,D),m++}while(m<E)}return h};t.options.persister?t.fetchFn=()=>{var _,C;return(C=(_=t.options).persister)==null?void 0:C.call(_,x,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=x}}}function fN(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function s6(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Yh,hi,hn,Dl,fi,uo,mk,n6=(mk=class extends e2{constructor(t){super();st(this,fi);st(this,Yh);st(this,hi);st(this,hn);st(this,Dl);De(this,Yh,t.client),this.mutationId=t.mutationId,De(this,hn,t.mutationCache),De(this,hi,[]),this.state=t.state||r6(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Y(this,hi).includes(t)||(Y(this,hi).push(t),this.clearGcTimeout(),Y(this,hn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,hi,Y(this,hi).filter(n=>n!==t)),this.scheduleGc(),Y(this,hn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Y(this,hi).length||(this.state.status==="pending"?this.scheduleGc():Y(this,hn).remove(this))}continue(){var t;return((t=Y(this,Dl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,m,x,p,g,w,N,j,_,C,A,M,E,D,I,z,H,V,Q;const n=()=>{bt(this,fi,uo).call(this,{type:"continue"})},r={client:Y(this,Yh),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Dl,Jk({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(J,le)=>{bt(this,fi,uo).call(this,{type:"failed",failureCount:J,error:le})},onPause:()=>{bt(this,fi,uo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Y(this,hn).canRun(this)}));const i=this.state.status==="pending",c=!Y(this,Dl).canStart();try{if(i)n();else{bt(this,fi,uo).call(this,{type:"pending",variables:t,isPaused:c}),await((h=(d=Y(this,hn).config).onMutate)==null?void 0:h.call(d,t,this,r));const le=await((x=(m=this.options).onMutate)==null?void 0:x.call(m,t,r));le!==this.state.context&&bt(this,fi,uo).call(this,{type:"pending",context:le,variables:t,isPaused:c})}const J=await Y(this,Dl).start();return await((g=(p=Y(this,hn).config).onSuccess)==null?void 0:g.call(p,J,t,this.state.context,this,r)),await((N=(w=this.options).onSuccess)==null?void 0:N.call(w,J,t,this.state.context,r)),await((_=(j=Y(this,hn).config).onSettled)==null?void 0:_.call(j,J,null,this.state.variables,this.state.context,this,r)),await((A=(C=this.options).onSettled)==null?void 0:A.call(C,J,null,t,this.state.context,r)),bt(this,fi,uo).call(this,{type:"success",data:J}),J}catch(J){try{throw await((E=(M=Y(this,hn).config).onError)==null?void 0:E.call(M,J,t,this.state.context,this,r)),await((I=(D=this.options).onError)==null?void 0:I.call(D,J,t,this.state.context,r)),await((H=(z=Y(this,hn).config).onSettled)==null?void 0:H.call(z,void 0,J,this.state.variables,this.state.context,this,r)),await((Q=(V=this.options).onSettled)==null?void 0:Q.call(V,void 0,J,t,this.state.context,r)),J}finally{bt(this,fi,uo).call(this,{type:"error",error:J})}}finally{Y(this,hn).runNext(this)}}},Yh=new WeakMap,hi=new WeakMap,hn=new WeakMap,Dl=new WeakMap,fi=new WeakSet,uo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};
425case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),$s.batch(()=>{Y(this,hi).forEach(r=>{r.onMutationUpdate(t)}),Y(this,hn).notify({mutation:this,type:"updated",action:t})})},mk);function r6(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ca,zr,qh,pk,i6=(pk=class extends Zh{constructor(t={}){super();st(this,ca);st(this,zr);st(this,qh);this.config=t,De(this,ca,new Set),De(this,zr,new Map),De(this,qh,0)}build(t,n,r){const i=new n6({client:t,mutationCache:this,mutationId:++Im(this,qh)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){Y(this,ca).add(t);const n=$m(t);if(typeof n=="string"){const r=Y(this,zr).get(n);r?r.push(t):Y(this,zr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Y(this,ca).delete(t)){const n=$m(t);if(typeof n=="string"){const r=Y(this,zr).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&Y(this,zr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=$m(t);if(typeof n=="string"){const r=Y(this,zr).get(n),i=r==null?void 0:r.find(c=>c.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=$m(t);if(typeof n=="string"){const i=(r=Y(this,zr).get(n))==null?void 0:r.find(c=>c!==t&&c.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$s.batch(()=>{Y(this,ca).forEach(t=>{this.notify({type:"removed",mutation:t})}),Y(this,ca).clear(),Y(this,zr).clear()})}getAll(){return Array.from(Y(this,ca))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>aN(n,r))}findAll(t={}){return this.getAll().filter(n=>aN(t,n))}notify(t){$s.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return $s.batch(()=>Promise.all(t.map(n=>n.continue().catch(Sn))))}},ca=new WeakMap,zr=new WeakMap,qh=new WeakMap,pk);function $m(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mi,gk,a6=(gk=class extends Zh{constructor(t={}){super();st(this,mi);this.config=t,De(this,mi,new Map)}build(t,n,r){const i=n.queryKey,c=n.queryHash??J0(i,n);let d=this.get(c);return d||(d=new XO({client:t,queryKey:i,queryHash:c,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(d)),d}add(t){Y(this,mi).has(t.queryHash)||(Y(this,mi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Y(this,mi).get(t.queryHash);n&&(t.destroy(),n===t&&Y(this,mi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$s.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Y(this,mi).get(t)}getAll(){return[...Y(this,mi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>iN(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>iN(t,r)):n}notify(t){$s.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){$s.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$s.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mi=new WeakMap,gk),hs,vo,bo,jd,Nd,wo,Sd,kd,xk,o6=(xk=class{constructor(e={}){st(this,hs);st(this,vo);st(this,bo);st(this,jd);st(this,Nd);st(this,wo);st(this,Sd);st(this,kd);De(this,hs,e.queryCache||new a6),De(this,vo,e.mutationCache||new i6),De(this,bo,e.defaultOptions||{}),De(this,jd,new Map),De(this,Nd,new Map),De(this,wo,0)}mount(){Im(this,wo)._++,Y(this,wo)===1&&(De(this,Sd,tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),Y(this,hs).onFocus())})),De(this,kd,Cp.subscribe(async e=>{e&&(await this.resumePausedMutations(),Y(this,hs).onOnline())})))}unmount(){var e,t;Im(this,wo)._--,Y(this,wo)===0&&((e=Y(this,Sd))==null||e.call(this),De(this,Sd,void 0),(t=Y(this,kd))==null||t.call(this),De(this,kd,void 0))}isFetching(e){return Y(this,hs).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Y(this,vo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Y(this,hs).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Y(this,hs).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ko(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Y(this,hs).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=Y(this,hs).get(r.queryHash),c=i==null?void 0:i.state.data,d=$O(t,c);if(d!==void 0)return Y(this,hs).build(this,r).setData(d,{...n,manual:!0})}
425setQueriesData(e,t,n){return $s.batch(()=>Y(this,hs).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Y(this,hs).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Y(this,hs);$s.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Y(this,hs);return $s.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=$s.batch(()=>Y(this,hs).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Sn).catch(Sn)}invalidateQueries(e,t={}){return $s.batch(()=>(Y(this,hs).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=$s.batch(()=>Y(this,hs).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(Sn)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(Sn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Y(this,hs).build(this,t);return n.isStaleByTime(ko(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sn).catch(Sn)}fetchInfiniteQuery(e){return e.behavior=hN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sn).catch(Sn)}ensureInfiniteQueryData(e){return e.behavior=hN(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cp.isOnline()?Y(this,vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return Y(this,hs)}getMutationCache(){return Y(this,vo)}getDefaultOptions(){return Y(this,bo)}setDefaultOptions(e){De(this,bo,e)}setQueryDefaults(e,t){Y(this,jd).set(jh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Y(this,jd).values()],n={};return t.forEach(r=>{Nh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Y(this,Nd).set(jh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Y(this,Nd).values()],n={};return t.forEach(r=>{Nh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Y(this,bo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=J0(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===eb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Y(this,bo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Y(this,hs).clear(),Y(this,vo).clear()}},hs=new WeakMap,vo=new WeakMap,bo=new WeakMap,jd=new WeakMap,Nd=new WeakMap,wo=new WeakMap,Sd=new WeakMap,kd=new WeakMap,xk),n2=b.createContext(void 0),l6=e=>{const t=b.useContext(n2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},c6=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(n2.Provider,{value:e,children:t})),r2=b.createContext(!1),d6=()=>b.useContext(r2);r2.Provider;function u6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var h6=b.createContext(u6()),f6=()=>b.useContext(h6),m6=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},p6=e=>{b.useEffect(()=>{e.clearReset()},[e])},g6=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||YO(n,[e.error,r])),x6=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},y6=(e,t)=>e.isLoading&&e.isFetching&&!t,v6=(e,t)=>
425(e==null?void 0:e.suspense)&&t.isPending,mN=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function b6(e,t,n){var g,w,N,j,_;const r=d6(),i=f6(),c=l6(),d=c.defaultQueryOptions(e);(w=(g=c.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||w.call(g,d),d._optimisticResults=r?"isRestoring":"optimistic",x6(d),m6(d,i),p6(i);const h=!c.getQueryCache().get(d.queryHash),[m]=b.useState(()=>new t(c,d)),x=m.getOptimisticResult(d),p=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const A=p?m.subscribe($s.batchCalls(C)):Sn;return m.updateResult(),A},[m,p]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),b.useEffect(()=>{m.setOptions(d)},[d,m]),v6(d,x))throw mN(d,m,i);if(g6({result:x,errorResetBoundary:i,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw x.error;if((j=(N=c.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||j.call(N,d,x),d.experimental_prefetchInRender&&!Ul&&y6(x,r)){const C=h?mN(d,m,i):(_=c.getQueryCache().get(d.queryHash))==null?void 0:_.promise;C==null||C.catch(Sn).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?x:m.trackResult(x)}function w6(e,t){return b6(e,JO)}const _6=new o6({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Id=yk();const j6=$0(Id);/**
426 * @remix-run/router v1.23.0
427 *
428 * Copyright (c) Remix Software Inc.
429 *
430 * This source code is licensed under the MIT license found in the
431 * LICENSE.md file in the root directory of this source tree.
432 *
433 * @license MIT
434 */function Sh(){return Sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sh.apply(this,arguments)}var _o;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_o||(_o={}));const pN="popstate";function N6(e){e===void 0&&(e={});function t(r,i){let{pathname:c,search:d,hash:h}=r.location;return $v("",{pathname:c,search:d,hash:h},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Pp(i)}return k6(t,n,null,e)}function _s(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function i2(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function S6(){return Math.random().toString(36).substr(2,8)}function gN(e,t){return{usr:e.state,key:e.key,idx:t}}function $v(e,t,n,r){return n===void 0&&(n=null),Sh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fd(t):t,{state:n,key:t&&t.key||r||S6()})}function Pp(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function k6(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:c=!1}=r,d=i.history,h=_o.Pop,m=null,x=p();x==null&&(x=0,d.replaceState(Sh({},d.state,{idx:x}),""));function p(){return(d.state||{idx:null}).idx}function g(){h=_o.Pop;let C=p(),A=C==null?null:C-x;x=C,m&&m({action:h,location:_.location,delta:A})}function w(C,A){h=_o.Push;let M=$v(_.location,C,A);x=p()+1;let E=gN(M,x),D=_.createHref(M);try{d.pushState(E,"",D)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(D)}c&&m&&m({action:h,location:_.location,delta:1})}function N(C,A){h=_o.Replace;let M=$v(_.location,C,A);x=p();let E=gN(M,x),D=_.createHref(M);d.replaceState(E,"",D),c&&m&&m({action:h,location:_.location,delta:0})}function j(C){let A=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof C=="string"?C:Pp(C);return M=M.replace(/ $/,"%20"),_s(A,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,A)}let _={get action(){return h},get location(){return e(i,d)},listen(C){if(m)throw new Error("A history only accepts one active listener");return i.addEventListener(pN,g),m=C,()=>{i.removeEventListener(pN,g),m=null}},createHref(C){return t(i,C)},createURL:j,encodeLocation(C){let A=j(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:w,replace:N,go(C){return d.go(C)}};return _}var xN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xN||(xN={}));
vendor: 13,681 bytes, lines 434-443
434function C6(e,t,n){return n===void 0&&(n="/"),P6(e,t,n)}function P6(e,t,n,r){let i=typeof t=="string"?Fd(t):t,c=nb(i.pathname||"/",n);if(c==null)return null;let d=a2(e);T6(d);let h=null;for(let m=0;h==null&&m<d.length;++m){let x=$6(c);h=F6(d[m],x)}return h}function a2(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(c,d,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};m.relativePath.startsWith("/")&&(_s(m.relativePath.startsWith(r),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(r.length));let x=Co([r,m.relativePath]),p=n.concat(m);c.children&&c.children.length>0&&(_s(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+x+'".')),a2(c.children,t,p,x)),!(c.path==null&&!c.index)&&t.push({path:x,score:O6(x,c.index),routesMeta:p})};return e.forEach((c,d)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))i(c,d);else for(let m of o2(c.path))i(c,d,m)}),t}function o2(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),c=n.replace(/\?$/,"");if(r.length===0)return i?[c,""]:[c];let d=o2(r.join("/")),h=[];return h.push(...d.map(m=>m===""?c:[c,m].join("/"))),i&&h.push(...d),h.map(m=>e.startsWith("/")&&m===""?"/":m)}function T6(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:I6(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const E6=/^:[\w-]+$/,A6=3,M6=2,R6=1,L6=10,D6=-2,yN=e=>e==="*";function O6(e,t){let n=e.split("/"),r=n.length;return n.some(yN)&&(r+=D6),t&&(r+=M6),n.filter(i=>!yN(i)).reduce((i,c)=>i+(E6.test(c)?A6:c===""?R6:L6),r)}function I6(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function F6(e,t,n){let{routesMeta:r}=e,i={},c="/",d=[];for(let h=0;h<r.length;++h){let m=r[h],x=h===r.length-1,p=c==="/"?t:t.slice(c.length)||"/",g=B6({path:m.relativePath,caseSensitive:m.caseSensitive,end:x},p),w=m.route;if(!g)return null;Object.assign(i,g.params),d.push({params:i,pathname:Co([c,g.pathname]),pathnameBase:H6(Co([c,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(c=Co([c,g.pathnameBase]))}return d}function B6(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=z6(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let c=i[0],d=c.replace(/(.)\/+$/,"$1"),h=i.slice(1);return{params:r.reduce((x,p,g)=>{let{paramName:w,isOptional:N}=p;if(w==="*"){let _=h[g]||"";d=c.slice(0,c.length-_.length).replace(/(.)\/+$/,"$1")}const j=h[g];return N&&!j?x[w]=void 0:x[w]=(j||"").replace(/%2F/g,"/"),x},{}),pathname:c,pathnameBase:d,pattern:e}}function z6(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),i2(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,m)=>(r.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function $6(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return i2(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function nb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function U6(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fd(e):e;return{pathname:n?n.startsWith("/")?n:V6(n,t):t,search:Y6(r),hash:q6(i)}}function V6(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function W6(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function l2(e,t){let n=W6(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function c2(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fd(e):(i=Sh({},e),_s(!i.pathname||!i.pathname.includes("?"),Fy("?","pathname","search",i)),_s(!i.pathname||!i.pathname.includes("#"),Fy("#","pathname","hash",i)),_s(!i.search||!i.search.includes("#"),Fy("#","search","hash",i)));let c=e===""||i.pathname==="",d=c?"/":i.pathname,h;if(d==null)h=n;else{let g=t.length-1;if(!r&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),g-=1;i.pathname=w.join("/")}h=g>=0?t[g]:"/"}let m=U6(i,h),x=d&&d!=="/"&&d.endsWith("/"),p=(c||d===".")&&n.endsWith("/");return!m.pathname.endsWith("/")&&(x||p)&&(m.pathname+="/"),m}const Co=e=>e.join("/").replace(/\/\/+/g,"/"),H6=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y6=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q6=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function G6(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const d2=["post","put","patch","delete"];new Set(d2);const Z6=["get",...d2];new Set(Z6);/**
435 * React Router v6.30.1
436 *
437 * Copyright (c) Remix Software Inc.
438 *
439 * This source code is licensed under the MIT license found in the
440 * LICENSE.md file in the root directory of this source tree.
441 *
442 * @license MIT
443 */function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kh.apply(this,arguments)}const rb=b.createContext(null),K6=b.createContext(null),Zl=b.createContext(null),rg=b.createContext(null),Kl=b.createContext({outlet:null,matches:[],isDataRoute:!1}),u2=b.createContext(null);function Q6(e,t){let{relative:n}=t===void 0?{}:t;Kh()||_s(!1);let{basename:r,navigator:i}=b.useContext(Zl),{hash:c,pathname:d,search:h}=f2(e,{relative:n}),m=d;return r!=="/"&&(m=d==="/"?r:Co([r,d])),i.createHref({pathname:m,search:h,hash:c})}function Kh(){return b.useContext(rg)!=null}function Bd(){return Kh()||_s(!1),b.useContext(rg).location}function h2(e){b.useContext(Zl).static||b.useLayoutEffect(e)}function br(){let{isDataRoute:e}=b.useContext(Kl);return e?d5():X6()}function X6(){Kh()||_s(!1);let e=b.useContext(rb),{basename:t,future:n,navigator:r}=b.useContext(Zl),{matches:i}=b.useContext(Kl),{pathname:c}=Bd(),d=JSON.stringify(l2(i,n.v7_relativeSplatPath)),h=b.useRef(!1);return h2(()=>{h.current=!0}),b.useCallback(function(x,p){if(p===void 0&&(p={}),!h.current)return;if(typeof x=="number"){r.go(x);return}let g=c2(x,JSON.parse(d),c,p.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Co([t,g.pathname])),(p.replace?r.replace:r.push)(g,p.state,p)},[t,r,d,c,e])}function f2(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Zl),{matches:i}=b.useContext(Kl),{pathname:c}=Bd(),d=JSON.stringify(l2(i,r.v7_relativeSplatPath));return b.useMemo(()=>c2(e,JSON.parse(d),c,n==="path"),[e,d,c,n])}function J6(e,t){return e5(e,t)}function e5(e,t,n,r){Kh()||_s(!1);let{navigator:i}=b.useContext(Zl),{matches:c}=b.useContext(Kl),d=c[c.length-1],h=d?d.params:{};d&&d.pathname;let m=d?d.pathnameBase:"/";d&&d.route;let x=Bd(),p;if(t){var g;let C=typeof t=="string"?Fd(t):t;m==="/"||(g=C.pathname)!=null&&g.startsWith(m)||_s(!1),p=C}else p=x;let w=p.pathname||"/",N=w;if(m!=="/"){let C=m.replace(/^\//,"").split("/");N="/"+w.replace(/^\//,"").split("/").slice(C.length).join("/")}let j=C6(e,{pathname:N}),_=i5(j&&j.map(C=>Object.assign({},C,{params:Object.assign({},h,C.params),pathname:Co([m,i.encodeLocation?i.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:Co([m,i.encodeLocation?i.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),c,n,r);return t&&_?b.createElement(rg.Provider,{value:{location:kh({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:_o.Pop}},_):_}function t5(){let e=c5(),t=G6(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const s5=b.createElement(t5,null);class n5 extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Kl.Provider,{value:this.props.routeContext},b.createElement(u2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function r5(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(rb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Kl.Provider,{value:t},r)}function i5(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var c;if(!n)return null;if(n.errors)e=n.matches;else if((c=r)!=null&&c.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let d=e,h=(i=n)==null?void 0:i.errors;if(h!=null){let p=d.findIndex(g=>g.route.id&&(h==null?void 0:h[g.route.id])!==void 0);p>=0||_s(!1),d=d.slice(0,Math.min(d.length,p+1))}let m=!1,x=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<d.length;p++){let g=d[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(x=p),g.route.id){let{loaderData:w,errors:N}=n,j=g.route.loader&&w[g.route.id]===void 0&&(!N||N[g.route.id]===void 0);if(g.route.lazy||j){m=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}return d.reduceRight((p,g,w)=>{let N,j=!1,_=null,C=null;n&&(N=h&&g.route.id?h[g.route.id]:void 0,_=g.route.errorElement||s5,m&&(x<0&&w===0?(u5("route-fallback"),j=!0,C=null):x===w&&(j=!0,C=g.route.hydrateFallbackElement||null)));let A=t.concat(d.slice(0,w+1)),M=()=>{let E;return N?E=_:j?E=C:g.route.Component?E=b.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=p,b.createElement(r5,{match:g,routeContext:{outlet:p,matches:A,isDataRoute:n!=null},children:E})};return n&&(g.route.ErrorBoundary||g.route.errorElement||w===0)?b.createElement(n5,{location:n.location,revalidation:n.revalidation,component:_,error:N,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):M()},null)}var m2=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(m2||{}),p2=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(p2||{});function a5(e){let t=b.useContext(rb);return t||_s(!1),t}function o5(e){let t=b.useContext(K6);return t||_s(!1),t}function l5(e){let t=b.useContext(Kl);return t||_s(!1),t}function g2(e){let t=l5(),n=t.matches[t.matches.length-1];return n.route.id||_s(!1),n.route.id}function c5(){var e;let t=b.useContext(u2),n=o5(),r=g2();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function d5(){let{router:e}=a5(m2.UseNavigateStable),t=g2(p2.UseNavigateStable),n=b.useRef(!1);return h2(()=>{n.current=!0}),b.useCallback(function(i,c){c===void 0&&(c={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,kh({fromRouteId:t},c)))},[e,t])}const vN={};function u5(e,t,n){vN[e]||(vN[e]=!0)}function h5(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function op(e){_s(!1)}function f5(e){let{basename:t="/",children:n=null,location:r,navigationType:i=_o.Pop,navigator:c,static:d=!1,future:h}=e;Kh()&&_s(!1);let m=t.replace(/^\/*/,"/"),x=b.useMemo(()=>({basename:m,navigator:c,static:d,future:kh({v7_relativeSplatPath:!1},h)}),[m,h,c,d]);typeof r=="string"&&(r=Fd(r));let{pathname:p="/",search:g="",hash:w="",state:N=null,key:j="default"}=r,_=b.useMemo(()=>{let C=nb(p,m);return C==null?null:{location:{pathname:C,search:g,hash:w,state:N,key:j},navigationType:i}},[m,p,g,w,N,j,i]);return _==null?null:b.createElement(Zl.Provider,{value:x},b.createElement(rg.Provider,{children:n,value:_}))}function m5(e){let{children:t,location:n}=e;return J6(Uv(t),n)}new Promise(()=>{});function Uv(e,t){t===void 0&&(t=[]);let n=[];
443return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let c=[...t,i];if(r.type===b.Fragment){n.push.apply(n,Uv(r.props.children,c));return}r.type!==op&&_s(!1),!r.props.index||!r.props.children||_s(!1);let d={id:r.props.id||c.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(d.children=Uv(r.props.children,c)),n.push(d)}),n}/**
444 * React Router DOM v6.30.1
445 *
446 * Copyright (c) Remix Software Inc.
447 *
448 * This source code is licensed under the MIT license found in the
449 * LICENSE.md file in the root directory of this source tree.
450 *
451 * @license MIT
452 */function Vv(){return Vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vv.apply(this,arguments)}function p5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,c;for(c=0;c<r.length;c++)i=r[c],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function g5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function x5(e,t){return e.button===0&&(!t||t==="_self")&&!g5(e)}const y5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],v5="6";try{window.__reactRouterVersion=v5}catch{}const b5="startTransition",bN=V0[b5];function w5(e){let{basename:t,children:n,future:r,window:i}=e,c=b.useRef();c.current==null&&(c.current=N6({window:i,v5Compat:!0}));let d=c.current,[h,m]=b.useState({action:d.action,location:d.location}),{v7_startTransition:x}=r||{},p=b.useCallback(g=>{x&&bN?bN(()=>m(g)):m(g)},[m,x]);return b.useLayoutEffect(()=>d.listen(p),[d,p]),b.useEffect(()=>h5(r),[r]),b.createElement(f5,{basename:t,children:n,location:h.location,navigationType:h.action,navigator:d,future:r})}const _5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",j5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ls=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:c,replace:d,state:h,target:m,to:x,preventScrollReset:p,viewTransition:g}=t,w=p5(t,y5),{basename:N}=b.useContext(Zl),j,_=!1;if(typeof x=="string"&&j5.test(x)&&(j=x,_5))try{let E=new URL(window.location.href),D=x.startsWith("//")?new URL(E.protocol+x):new URL(x),I=nb(D.pathname,N);D.origin===E.origin&&I!=null?x=I+D.search+D.hash:_=!0}catch{}let C=Q6(x,{relative:i}),A=N5(x,{replace:d,state:h,target:m,preventScrollReset:p,relative:i,viewTransition:g});function M(E){r&&r(E),E.defaultPrevented||A(E)}return b.createElement("a",Vv({},w,{href:j||C,onClick:_||c?r:M,ref:n,target:m}))});var wN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wN||(wN={}));var _N;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(_N||(_N={}));function N5(e,t){let{target:n,replace:r,state:i,preventScrollReset:c,relative:d,viewTransition:h}=t===void 0?{}:t,m=br(),x=Bd(),p=f2(e,{relative:d});return b.useCallback(g=>{if(x5(g,n)){g.preventDefault();let w=r!==void 0?r:Pp(x)===Pp(p);m(e,{replace:w,state:i,preventScrollReset:c,relative:d,viewTransition:h})}},[x,m,p,r,i,n,e,c,d,h])}function x2(e,t){return function(){return e.apply(t,arguments)}}const{toString:S5}=Object.prototype,{getPrototypeOf:ib}=Object,{iterator:ig,toStringTag:y2}=Symbol,ag=(e=>t=>{const n=S5.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qr=e=>(e=e.toLowerCase(),t=>ag(t)===e),og=e=>t=>typeof t===e,{isArray:zd}=Array,Pd=og("undefined");function Qh(e){return e!==null&&!Pd(e)&&e.constructor!==null&&!Pd(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v2=qr("ArrayBuffer");function k5(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&v2(e.buffer),t}const C5=og("string"),Cn=og("function"),b2=og("number"),Xh=e=>e!==null&&typeof e=="object",P5=e=>e===!0||e===!1,lp=e=>{if(ag(e)!=="object")return!1;const t=ib(e);
vendor: 2,460 bytes, line 452
452return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(y2 in e)&&!(ig in e)},T5=e=>{if(!Xh(e)||Qh(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},E5=qr("Date"),A5=qr("File"),M5=qr("Blob"),R5=qr("FileList"),L5=e=>Xh(e)&&Cn(e.pipe),D5=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Cn(e.append)&&((t=ag(e))==="formdata"||t==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"))},O5=qr("URLSearchParams"),[I5,F5,B5,z5]=["ReadableStream","Request","Response","Headers"].map(qr),$5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jh(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),zd(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Qh(e))return;const c=n?Object.getOwnPropertyNames(e):Object.keys(e),d=c.length;let h;for(r=0;r<d;r++)h=c[r],t.call(null,e[h],h,e)}}function w2(e,t){if(Qh(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Nl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_2=e=>!Pd(e)&&e!==Nl;function Wv(){const{caseless:e,skipUndefined:t}=_2(this)&&this||{},n={},r=(i,c)=>{const d=e&&w2(n,c)||c;lp(n[d])&&lp(i)?n[d]=Wv(n[d],i):lp(i)?n[d]=Wv({},i):zd(i)?n[d]=i.slice():(!t||!Pd(i))&&(n[d]=i)};for(let i=0,c=arguments.length;i<c;i++)arguments[i]&&Jh(arguments[i],r);return n}const U5=(e,t,n,{allOwnKeys:r}={})=>(Jh(t,(i,c)=>{n&&Cn(i)?e[c]=x2(i,n):e[c]=i},{allOwnKeys:r}),e),V5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),W5=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},H5=(e,t,n,r)=>{let i,c,d;const h={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),c=i.length;c-- >0;)d=i[c],(!r||r(d,e,t))&&!h[d]&&(t[d]=e[d],h[d]=!0);e=n!==!1&&ib(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Y5=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},q5=e=>{if(!e)return null;if(zd(e))return e;let t=e.length;if(!b2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},G5=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ib(Uint8Array)),Z5=(e,t)=>{const r=(e&&e[ig]).call(e);let i;for(;
vendor: 5,614 bytes, line 452
452(i=r.next())&&!i.done;){const c=i.value;t.call(e,c[0],c[1])}},K5=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Q5=qr("HTMLFormElement"),X5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jN=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),J5=qr("RegExp"),j2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jh(n,(i,c)=>{let d;(d=t(i,c,e))!==!1&&(r[c]=d||i)}),Object.defineProperties(e,r)},e3=e=>{j2(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},t3=(e,t)=>{const n={},r=i=>{i.forEach(c=>{n[c]=!0})};return zd(e)?r(e):r(String(e).split(t)),n},s3=()=>{},n3=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r3(e){return!!(e&&Cn(e.append)&&e[y2]==="FormData"&&e[ig])}const i3=e=>{const t=new Array(10),n=(r,i)=>{if(Xh(r)){if(t.indexOf(r)>=0)return;if(Qh(r))return r;if(!("toJSON"in r)){t[i]=r;const c=zd(r)?[]:{};return Jh(r,(d,h)=>{const m=n(d,i+1);!Pd(m)&&(c[h]=m)}),t[i]=void 0,c}}return r};return n(e,0)},a3=qr("AsyncFunction"),o3=e=>e&&(Xh(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),N2=((e,t)=>e?setImmediate:t?((n,r)=>(Nl.addEventListener("message",({source:i,data:c})=>{i===Nl&&c===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Nl.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Nl.postMessage)),l3=typeof queueMicrotask<"u"?queueMicrotask.bind(Nl):typeof process<"u"&&process.nextTick||N2,c3=e=>e!=null&&Cn(e[ig]),ae={isArray:zd,isArrayBuffer:v2,isBuffer:Qh,isFormData:D5,isArrayBufferView:k5,isString:C5,isNumber:b2,isBoolean:P5,isObject:Xh,isPlainObject:lp,isEmptyObject:T5,isReadableStream:I5,isRequest:F5,isResponse:B5,isHeaders:z5,isUndefined:Pd,isDate:E5,isFile:A5,isBlob:M5,isRegExp:J5,isFunction:Cn,isStream:L5,isURLSearchParams:O5,isTypedArray:G5,isFileList:R5,forEach:Jh,merge:Wv,extend:U5,trim:$5,stripBOM:V5,inherits:W5,toFlatObject:H5,kindOf:ag,kindOfTest:qr,endsWith:Y5,toArray:q5,forEachEntry:Z5,matchAll:K5,isHTMLForm:Q5,hasOwnProperty:jN,hasOwnProp:jN,reduceDescriptors:j2,freezeMethods:e3,toObjectSet:t3,toCamelCase:X5,noop:s3,toFiniteNumber:n3,findKey:w2,global:Nl,isContextDefined:_2,isSpecCompliantForm:r3,toJSONObject:i3,isAsyncFn:a3,isThenable:o3,setImmediate:N2,asap:l3,isIterable:c3};function ut(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ae.inherits(ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const S2=ut.prototype,k2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{k2[e]={value:e}});Object.defineProperties(ut,k2);Object.defineProperty(S2,"isAxiosError",{value:!0});ut.from=(e,t,n,r,i,c)=>{const d=Object.create(S2);ae.toFlatObject(e,d,function(p){return p!==Error.prototype},x=>x!=="isAxiosError");const h=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return ut.call(d,h,m,n,r,i),e&&d.cause==null&&Object.defineProperty(d,"cause",{value:e,configurable:!0}),d.name=e&&e.name||"Error",c&&Object.assign(d,c),d};const d3=null;function Hv(e){return ae.isPlainObject(e)||ae.isArray(e)}function C2(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function NN(e,t,n){return e?e.concat(t).map(function(i,c){return i=C2(i),!n&&c?"["+i+"]":i}).join(n?".":""):t}function u3(e){return ae.isArray(e)&&!e.some(Hv)}const h3=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function lg(e,t,n){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,C){return!ae.isUndefined(C[_])});const r=n.metaTokens,i=n.visitor||p,c=n.dots,d=n.indexes,m=(n.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function x(j){if(j===null)return"";if(ae.isDate(j))return j.toISOString();if(ae.isBoolean(j))return j.toString();if(!m&&ae.isBlob(j))throw new ut("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(j)||ae.isTypedArray(j)?m&&typeof Blob=="function"?new Blob([j]):Buffer.from(j):j}function p(j,_,C){let A=j;if(j&&!C&&typeof j=="object"){if(ae.endsWith(_,"{}"))_=r?_:_.slice(0,-2),j=JSON.stringify(j);else if(ae.isArray(j)&&u3(j)||(ae.isFileList(j)||ae.endsWith(_,"[]"))&&(A=ae.toArray(j)))return _=C2(_),A.forEach(function(E,D){!(ae.isUndefined(E)||E===null)&&t.append(d===!0?NN([_],D,c):d===null?_:_+"[]",x(E))}),!1}return Hv(j)?!0:(t.append(NN(C,_,c),x(j)),!1)}const g=[],w=Object.assign(h3,{defaultVisitor:p,convertValue:x,isVisitable:Hv});function N(j,_){if(!ae.isUndefined(j)){if(g.indexOf(j)!==-1)throw Error("Circular reference detected in "+_.join("."));g.push(j),ae.forEach(j,function(A,M){(!(ae.isUndefined(A)||A===null)&&i.call(t,A,ae.isString(M)?M.trim():M,_,w))===!0&&N(A,_?_.concat(M):[M])}),g.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return N(e),t}
vendor: 16,624 bytes, lines 452-454
452function SN(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ab(e,t){this._pairs=[],e&&lg(e,this,t)}const P2=ab.prototype;P2.append=function(t,n){this._pairs.push([t,n])};P2.toString=function(t){const n=t?function(r){return t.call(this,r,SN)}:SN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function f3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function T2(e,t,n){if(!t)return e;const r=n&&n.encode||f3;ae.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let c;if(i?c=i(t,n):c=ae.isURLSearchParams(t)?t.toString():new ab(t,n).toString(r),c){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class kN{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ae.forEach(this.handlers,function(r){r!==null&&t(r)})}}const E2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},m3=typeof URLSearchParams<"u"?URLSearchParams:ab,p3=typeof FormData<"u"?FormData:null,g3=typeof Blob<"u"?Blob:null,x3={isBrowser:!0,classes:{URLSearchParams:m3,FormData:p3,Blob:g3},protocols:["http","https","file","blob","url","data"]},ob=typeof window<"u"&&typeof document<"u",Yv=typeof navigator=="object"&&navigator||void 0,y3=ob&&(!Yv||["ReactNative","NativeScript","NS"].indexOf(Yv.product)<0),v3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b3=ob&&window.location.href||"http://localhost",w3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ob,hasStandardBrowserEnv:y3,hasStandardBrowserWebWorkerEnv:v3,navigator:Yv,origin:b3},Symbol.toStringTag,{value:"Module"})),Js={...w3,...x3};function _3(e,t){return lg(e,new Js.classes.URLSearchParams,{visitor:function(n,r,i,c){return Js.isNode&&ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...t})}function j3(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function N3(e){const t={},n=Object.keys(e);let r;const i=n.length;let c;for(r=0;r<i;r++)c=n[r],t[c]=e[c];return t}function A2(e){function t(n,r,i,c){let d=n[c++];if(d==="__proto__")return!0;const h=Number.isFinite(+d),m=c>=n.length;return d=!d&&ae.isArray(i)?i.length:d,m?(ae.hasOwnProp(i,d)?i[d]=[i[d],r]:i[d]=r,!h):((!i[d]||!ae.isObject(i[d]))&&(i[d]=[]),t(n,r,i[d],c)&&ae.isArray(i[d])&&(i[d]=N3(i[d])),!h)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const n={};return ae.forEachEntry(e,(r,i)=>{t(j3(r),i,n,0)}),n}return null}function S3(e,t,n){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ef={transitional:E2,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,c=ae.isObject(t);if(c&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return i?JSON.stringify(A2(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)||ae.isReadableStream(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _3(t,this.formSerializer).toString();if((h=ae.isFileList(t))||r.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return lg(h?{"files[]":t}:t,m&&new m,this.formSerializer)}}return c||i?(n.setContentType("application/json",!1),S3(t)):t}],transformResponse:[function(t){const n=this.transitional||ef.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ae.isResponse(t)||ae.isReadableStream(t))return t;if(t&&ae.isString(t)&&(r&&!this.responseType||i)){const d=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(h){if(d)throw h.name==="SyntaxError"?ut.from(h,ut.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Js.classes.FormData,Blob:Js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],e=>{ef.headers[e]={}});const k3=ae.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"]),C3=e=>{const t={};let n,r,i;return e&&e.split(`
453`).forEach(function(d){i=d.indexOf(":"),n=d.substring(0,i).trim().toLowerCase(),r=d.substring(i+1).trim(),!(!n||t[n]&&k3[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},CN=Symbol("internals");function Ku(e){return e&&String(e).trim().toLowerCase()}function cp(e){return e===!1||e==null?e:ae.isArray(e)?e.map(cp):String(e)}function P3(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const T3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function By(e,t,n,r,i){if(ae.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ae.isString(t)){if(ae.isString(r))return t.indexOf(r)!==-1;if(ae.isRegExp(r))return r.test(t)}}function E3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function A3(e,t){const n=ae.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,c,d){return this[r].call(this,t,i,c,d)},configurable:!0})})}let Pn=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function c(h,m,x){const p=Ku(m);if(!p)throw new Error("header name must be a non-empty string");const g=ae.findKey(i,p);(!g||i[g]===void 0||x===!0||x===void 0&&i[g]!==!1)&&(i[g||m]=cp(h))}const d=(h,m)=>ae.forEach(h,(x,p)=>c(x,p,m));if(ae.isPlainObject(t)||t instanceof this.constructor)d(t,n);else if(ae.isString(t)&&(t=t.trim())&&!T3(t))d(C3(t),n);else if(ae.isObject(t)&&ae.isIterable(t)){let h={},m,x;for(const p of t){if(!ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");h[x=p[0]]=(m=h[x])?ae.isArray(m)?[...m,p[1]]:[m,p[1]]:p[1]}d(h,n)}else t!=null&&c(n,t,r);return this}get(t,n){if(t=Ku(t),t){const r=ae.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return P3(i);if(ae.isFunction(n))return n.call(this,i,r);if(ae.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ku(t),t){const r=ae.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||By(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function c(d){if(d=Ku(d),d){const h=ae.findKey(r,d);h&&(!n||By(r,r[h],h,n))&&(delete r[h],i=!0)}}return ae.isArray(t)?t.forEach(c):c(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const c=n[r];(!t||By(this,this[c],c,t,!0))&&(delete this[c],i=!0)}return i}normalize(t){const n=this,r={};return ae.forEach(this,(i,c)=>{const d=ae.findKey(r,c);if(d){n[d]=cp(i),delete n[c];return}const h=t?E3(c):String(c).trim();h!==c&&delete n[c],n[h]=cp(i),r[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ae.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
454`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[CN]=this[CN]={accessors:{}}).accessors,i=this.prototype;function c(d){const h=Ku(d);r[h]||(A3(i,d),r[h]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}};Pn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Pn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ae.freezeMethods(Pn);function zy(e,t){const n=this||ef,r=t||n,i=Pn.from(r.headers);let c=r.data;return ae.forEach(e,function(h){c=h.call(n,c,i.normalize(),t?t.status:void 0)}),i.normalize(),c}function M2(e){return!!(e&&e.__CANCEL__)}function $d(e,t,n){ut.call(this,e??"canceled",ut.ERR_CANCELED,t,n),this.name="CanceledError"}ae.inherits($d,ut,{__CANCEL__:!0});function R2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function M3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function R3(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,c=0,d;return t=t!==void 0?t:1e3,function(m){const x=Date.now(),p=r[c];d||(d=x),n[i]=m,r[i]=x;let g=c,w=0;for(;g!==i;)w+=n[g++],g=g%e;if(i=(i+1)%e,i===c&&(c=(c+1)%e),x-d<t)return;const N=p&&x-p;return N?Math.round(w*1e3/N):void 0}}function L3(e,t){let n=0,r=1e3/t,i,c;const d=(x,p=Date.now())=>{n=p,i=null,c&&(clearTimeout(c),c=null),e(...x)};return[(...x)=>{const p=Date.now(),g=p-n;g>=r?d(x,p):(i=x,c||(c=setTimeout(()=>{c=null,d(i)},r-g)))},()=>i&&d(i)]}const Tp=(e,t,n=3)=>{let r=0;const i=R3(50,250);return L3(c=>{const d=c.loaded,h=c.lengthComputable?c.total:void 0,m=d-r,x=i(m),p=d<=h;r=d;const g={loaded:d,total:h,progress:h?d/h:void 0,bytes:m,rate:x||void 0,estimated:x&&h&&p?(h-d)/x:void 0,event:c,lengthComputable:h!=null,[t?"download":"upload"]:!0};e(g)},n)},PN=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},TN=e=>(...t)=>ae.asap(()=>e(...t)),D3=Js.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Js.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Js.origin),Js.navigator&&/(msie|trident)/i.test(Js.navigator.userAgent)):()=>!0,O3=Js.hasStandardBrowserEnv?{write(e,t,n,r,i,c){const d=[e+"="+encodeURIComponent(t)];ae.isNumber(n)&&d.push("expires="+new Date(n).toGMTString()),ae.isString(r)&&d.push("path="+r),ae.isString(i)&&d.push("domain="+i),c===!0&&d.push("secure"),document.cookie=d.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function I3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function F3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function L2(e,t,n){let r=!I3(t);return e&&(r||n==!1)?F3(e,t):t}const EN=e=>e instanceof Pn?{...e}:e;function Vl(e,t){t=t||{};const n={};function r(x,p,g,w){return ae.isPlainObject(x)&&ae.isPlainObject(p)?ae.merge.call({caseless:w},x,p):ae.isPlainObject(p)?ae.merge({},p):ae.isArray(p)?p.slice():p}function i(x,p,g,w){if(ae.isUndefined(p)){if(!ae.isUndefined(x))return r(void 0,x,g,w)}else return r(x,p,g,w)}function c(x,p){if(!ae.isUndefined(p))return r(void 0,p)}function d(x,p){if(ae.isUndefined(p)){if(!ae.isUndefined(x))return r(void 0,x)}else return r(void 0,p)}function h(x,p,g){if(g in t)return r(x,p);if(g in e)return r(void 0,x)}const m={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:h,headers:(x,p,g)=>i(EN(x),EN(p),g,!0)};return ae.forEach(Object.keys({...e,...t}),function(p){const g=m[p]||i,w=g(e[p],t[p],p);ae.isUndefined(w)&&g!==h||(n[p]=w)}),n}const D2=e=>{const t=Vl({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:c,headers:d,auth:h}=t;if(t.headers=d=Pn.from(d),t.url=T2(L2(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),h&&d.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):""))),ae.isFormData(n)){if(Js.hasStandardBrowserEnv||Js.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(ae.isFunction(n.getHeaders)){const m=n.getHeaders(),x=["content-type","content-length"];Object.entries(m).forEach(([p,g])=>{x.includes(p.toLowerCase())&&d.set(p,g)})}}if(Js.hasStandardBrowserEnv&&(r&&ae.isFunction(r)&&(r=r(t)),r||r!==!1&&D3(t.url))){const m=i&&c&&O3.read(c);m&&d.set(i,m)}return t},B3=typeof XMLHttpRequest<"u",z3=B3&&function(e){return new Promise(function(n,r){const i=D2(e);let c=i.data;const d=Pn.from(i.headers).normalize();let{responseType:h,onUploadProgress:m,onDownloadProgress:x}=i,p,g,w,N,j;function _(){N&&N(),j&&j(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function A(){if(!C)return;const E=Pn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),I={data:!h||h==="text"||h==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:E,config:e,request:C};R2(function(H){n(H),_()},function(H){r(H),_()},I),C=null}"onloadend"in C?C.onloadend=A:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(A)},C.onabort=function(){C&&(r(new ut("Request aborted",ut.ECONNABORTED,e,C)),C=null)},C.onerror=function(D){const I=D&&D.message?D.message:"Network Error",z=new ut(I,ut.ERR_NETWORK,e,C);z.event=D||null,r(z),C=null},C.ontimeout=function(){let D=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const I=i.transitional||E2;i.timeoutErrorMessage&&(D=i.timeoutErrorMessage),r(new ut(D,I.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,e,C)),C=null},c===void 0&&d.setContentType(null),"setRequestHeader"in C&&ae.forEach(d.toJSON(),function(D,I){C.setRequestHeader(I,D)}),ae.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),h&&h!=="json"&&(C.responseType=i.responseType),x&&([w,j]=Tp(x,!0),C.addEventListener("progress",w)),m&&C.upload&&([g,N]=Tp(m),C.upload.addEventListener("progress",g),C.upload.addEventListener("loadend",N)),(i.cancelToken||i.signal)&&(p=E=>{C&&(r(!E||E.type?new $d(null,e,C):E),C.abort(),C=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const M=M3(i.url);if(M&&Js.protocols.indexOf(M)===-1){r(new ut("Unsupported protocol "+M+":",ut.ERR_BAD_REQUEST,e));return}C.send(c||null)})},$3=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const c=function(x){if(!i){i=!0,h();const p=x instanceof Error?x:this.reason;r.abort(p instanceof ut?p:new $d(p instanceof Error?p.message:p))}};let d=t&&setTimeout(()=>{d=null,c(new ut(`timeout ${t} of ms exceeded`,ut.ETIMEDOUT))},t);const h=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(x=>{x.unsubscribe?x.unsubscribe(c):x.removeEventListener("abort",c)}),e=null)};e.forEach(x=>x.addEventListener("abort",c));const{signal:m}=r;return m.unsubscribe=()=>ae.asap(h),m}},U3=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},V3=async function*(e,t){for await(const n of W3(e))yield*U3(n,t)},W3=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},AN=(e,t,n,r)=>{const i=V3(e,t);let c=0,d,h=m=>{d||(d=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:x,value:p}=await i.next();if(x){h(),m.close();return}let g=p.byteLength;if(n){let w=c+=g;n(w)}m.enqueue(new Uint8Array(p))}catch(x){throw h(x),x}},cancel(m){return h(m),i.return()}},{highWaterMark:2})},MN=64*1024,{isFunction:Um}=ae,H3=(({Request:e,Response:t})=>({Request:e,Response:t}))(ae.global),{ReadableStream:RN,TextEncoder:LN}=ae.global,DN=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Y3=e=>{e=ae.merge.call({skipUndefined:!0},H3,e);const{fetch:t,Request:n,Response:r}=e,i=t?Um(t):typeof fetch=="function",c=Um(n),d=Um(r);
vendor: 9,002 bytes, lines 454-457
454if(!i)return!1;const h=i&&Um(RN),m=i&&(typeof LN=="function"?(j=>_=>j.encode(_))(new LN):async j=>new Uint8Array(await new n(j).arrayBuffer())),x=c&&h&&DN(()=>{let j=!1;const _=new n(Js.origin,{body:new RN,method:"POST",get duplex(){return j=!0,"half"}}).headers.has("Content-Type");return j&&!_}),p=d&&h&&DN(()=>ae.isReadableStream(new r("").body)),g={stream:p&&(j=>j.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!g[j]&&(g[j]=(_,C)=>{let A=_&&_[j];if(A)return A.call(_);throw new ut(`Response type '${j}' is not supported`,ut.ERR_NOT_SUPPORT,C)})});const w=async j=>{if(j==null)return 0;if(ae.isBlob(j))return j.size;if(ae.isSpecCompliantForm(j))return(await new n(Js.origin,{method:"POST",body:j}).arrayBuffer()).byteLength;if(ae.isArrayBufferView(j)||ae.isArrayBuffer(j))return j.byteLength;if(ae.isURLSearchParams(j)&&(j=j+""),ae.isString(j))return(await m(j)).byteLength},N=async(j,_)=>{const C=ae.toFiniteNumber(j.getContentLength());return C??w(_)};return async j=>{let{url:_,method:C,data:A,signal:M,cancelToken:E,timeout:D,onDownloadProgress:I,onUploadProgress:z,responseType:H,headers:V,withCredentials:Q="same-origin",fetchOptions:J}=D2(j),le=t||fetch;H=H?(H+"").toLowerCase():"text";let xe=$3([M,E&&E.toAbortSignal()],D),Me=null;const ke=xe&&xe.unsubscribe&&(()=>{xe.unsubscribe()});let He;try{if(z&&x&&C!=="get"&&C!=="head"&&(He=await N(V,A))!==0){let U=new n(_,{method:"POST",body:A,duplex:"half"}),ie;if(ae.isFormData(A)&&(ie=U.headers.get("content-type"))&&V.setContentType(ie),U.body){const[je,be]=PN(He,Tp(TN(z)));A=AN(U.body,MN,je,be)}}ae.isString(Q)||(Q=Q?"include":"omit");const ye=c&&"credentials"in n.prototype,_e={...J,signal:xe,method:C.toUpperCase(),headers:V.normalize().toJSON(),body:A,duplex:"half",credentials:ye?Q:void 0};Me=c&&new n(_,_e);let B=await(c?le(Me,J):le(_,_e));const ce=p&&(H==="stream"||H==="response");if(p&&(I||ce&&ke)){const U={};["status","statusText","headers"].forEach(Se=>{U[Se]=B[Se]});const ie=ae.toFiniteNumber(B.headers.get("content-length")),[je,be]=I&&PN(ie,Tp(TN(I),!0))||[];B=new r(AN(B.body,MN,je,()=>{be&&be(),ke&&ke()}),U)}H=H||"text";let ne=await g[ae.findKey(g,H)||"text"](B,j);return!ce&&ke&&ke(),await new Promise((U,ie)=>{R2(U,ie,{data:ne,headers:Pn.from(B.headers),status:B.status,statusText:B.statusText,config:j,request:Me})})}catch(ye){throw ke&&ke(),ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)?Object.assign(new ut("Network Error",ut.ERR_NETWORK,j,Me),{cause:ye.cause||ye}):ut.from(ye,ye&&ye.code,j,Me)}}},q3=new Map,O2=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,c=[r,i,n];let d=c.length,h=d,m,x,p=q3;for(;h--;)m=c[h],x=p.get(m),x===void 0&&p.set(m,x=h?new Map:Y3(t)),p=x;return x};O2();const qv={http:d3,xhr:z3,fetch:{get:O2}};ae.forEach(qv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ON=e=>`- ${e}`,G3=e=>ae.isFunction(e)||e===null||e===!1,I2={getAdapter:(e,t)=>{e=ae.isArray(e)?e:[e];const{length:n}=e;let r,i;const c={};for(let d=0;d<n;d++){r=e[d];let h;if(i=r,!G3(r)&&(i=qv[(h=String(r)).toLowerCase()],i===void 0))throw new ut(`Unknown adapter '${h}'`);if(i&&(ae.isFunction(i)||(i=i.get(t))))break;c[h||"#"+d]=i}if(!i){const d=Object.entries(c).map(([m,x])=>`adapter ${m} `+(x===!1?"is not supported by the environment":"is not available in the build"));let h=n?d.length>1?`since :
455`+d.map(ON).join(`
456`):" "+ON(d[0]):"as no adapter specified";throw new ut("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return i},adapters:qv};function $y(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $d(null,e)}function IN(e){return $y(e),e.headers=Pn.from(e.headers),e.data=zy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),I2.getAdapter(e.adapter||ef.adapter,e)(e).then(function(r){return $y(e),r.data=zy.call(e,e.transformResponse,r),r.headers=Pn.from(r.headers),r},function(r){return M2(r)||($y(e),r&&r.response&&(r.response.data=zy.call(e,e.transformResponse,r.response),r.response.headers=Pn.from(r.response.headers))),Promise.reject(r)})}const F2="1.12.2",cg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const FN={};cg.transitional=function(t,n,r){function i(c,d){return"[Axios v"+F2+"] Transitional option '"+c+"'"+d+(r?". "+r:"")}return(c,d,h)=>{if(t===!1)throw new ut(i(d," has been removed"+(n?" in "+n:"")),ut.ERR_DEPRECATED);return n&&!FN[d]&&(FN[d]=!0,console.warn(i(d," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(c,d,h):!0}};cg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Z3(e,t,n){if(typeof e!="object")throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const c=r[i],d=t[c];if(d){const h=e[c],m=h===void 0||d(h,c,e);if(m!==!0)throw new ut("option "+c+" must be "+m,ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ut("Unknown option "+c,ut.ERR_BAD_OPTION)}}const dp={assertOptions:Z3,validators:cg},ui=dp.validators;let Fl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new kN,response:new kN}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const c=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
457`+c):r.stack=c}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Vl(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:c}=n;r!==void 0&&dp.assertOptions(r,{silentJSONParsing:ui.transitional(ui.boolean),forcedJSONParsing:ui.transitional(ui.boolean),clarifyTimeoutError:ui.transitional(ui.boolean)},!1),i!=null&&(ae.isFunction(i)?n.paramsSerializer={serialize:i}:dp.assertOptions(i,{encode:ui.function,serialize:ui.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),dp.assertOptions(n,{baseUrl:ui.spelling("baseURL"),withXsrfToken:ui.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let d=c&&ae.merge(c.common,c[n.method]);c&&ae.forEach(["delete","get","head","post","put","patch","common"],j=>{delete c[j]}),n.headers=Pn.concat(d,c);const h=[];let m=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(m=m&&_.synchronous,h.unshift(_.fulfilled,_.rejected))});const x=[];this.interceptors.response.forEach(function(_){x.push(_.fulfilled,_.rejected)});let p,g=0,w;if(!m){const j=[IN.bind(this),void 0];for(j.unshift(...h),j.push(...x),w=j.length,p=Promise.resolve(n);g<w;)p=p.then(j[g++],j[g++]);return p}w=h.length;let N=n;for(;g<w;){const j=h[g++],_=h[g++];try{N=j(N)}catch(C){_.call(this,C);break}}try{p=IN.call(this,N)}catch(j){return Promise.reject(j)}for(g=0,w=x.length;g<w;)p=p.then(x[g++],x[g++]);return p}getUri(t){t=Vl(this.defaults,t);const n=L2(t.baseURL,t.url,t.allowAbsoluteUrls);return T2(n,t.params,t.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(t){Fl.prototype[t]=function(n,r){return this.request(Vl(r||{},{method:t,url:n,data:(r||{}).data}))}});ae.forEach(["post","put","patch"],function(t){function n(r){return function(c,d,h){return this.request(Vl(h||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}Fl.prototype[t]=n(),Fl.prototype[t+"Form"]=n(!0)});let K3=class B2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(c){n=c});const r=this;this.promise.then(i=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](i);r._listeners=null}),this.promise.then=i=>{let c;const d=new Promise(h=>{r.subscribe(h),c=h}).then(i);return d.cancel=function(){r.unsubscribe(c)},d},t(function(c,d,h){r.reason||(r.reason=new $d(c,d,h),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new B2(function(i){t=i}),cancel:t}}};function Q3(e){return function(n){return e.apply(null,n)}}function X3(e){return ae.isObject(e)&&e.isAxiosError===!0}const Gv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
457alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gv).forEach(([e,t])=>{Gv[t]=e});function z2(e){const t=new Fl(e),n=x2(Fl.prototype.request,t);return ae.extend(n,Fl.prototype,t,{allOwnKeys:!0}),ae.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return z2(Vl(e,i))},n}const ys=z2(ef);ys.Axios=Fl;ys.CanceledError=$d;ys.CancelToken=K3;ys.isCancel=M2;ys.VERSION=F2;ys.toFormData=lg;ys.AxiosError=ut;ys.Cancel=ys.CanceledError;ys.all=function(t){return Promise.all(t)};ys.spread=Q3;ys.isAxiosError=X3;ys.mergeConfig=Vl;ys.AxiosHeaders=Pn;ys.formToJSON=e=>A2(ae.isHTMLForm(e)?new FormData(e):e);ys.getAdapter=I2.getAdapter;ys.HttpStatusCode=Gv;ys.default=ys;const{Axios:XJ,AxiosError:JJ,CanceledError:eee,isCancel:tee,CancelToken:see,VERSION:nee,all:ree,Cancel:iee,isAxiosError:aee,spread:oee,toFormData:lee,AxiosHeaders:cee,HttpStatusCode:dee,formToJSON:uee,getAdapter:hee,mergeConfig:fee}=ys,J3=typeof window>"u",BN=!J3&&window.self!==window.top,Uy=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Bs=[];for(let e=0;e<256;++e)Bs.push((e+256).toString(16).slice(1));function eI(e,t=0){return(Bs[e[t+0]]+Bs[e[t+1]]+Bs[e[t+2]]+Bs[e[t+3]]+"-"+Bs[e[t+4]]+Bs[e[t+5]]+"-"+Bs[e[t+6]]+Bs[e[t+7]]+"-"+Bs[e[t+8]]+Bs[e[t+9]]+"-"+Bs[e[t+10]]+Bs[e[t+11]]+Bs[e[t+12]]+Bs[e[t+13]]+Bs[e[t+14]]+Bs[e[t+15]]).toLowerCase()}let Vy;const tI=new Uint8Array(16);function sI(){if(!Vy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Vy=crypto.getRandomValues.bind(crypto)}return Vy(tI)}const nI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zN={randomUUID:nI};function rI(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??sI();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,eI(r)}function iI(e,t,n){return zN.randomUUID&&!e?zN.randomUUID():rI(e)}class aI extends Error{constructor(t,n,r,i,c){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=c}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function ah({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const c=ys.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(c.defaults.headers.common.Authorization=`Bearer ${n}`),c.interceptors.request.use(d=>{typeof window<"u"&&d.headers.set("X-Origin-URL",window.location.href);const h=iI();if(d.requestId=h,BN)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:e+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),r&&c.interceptors.response.use(d=>{var h;const m=(h=d.config)===null||h===void 0?void 0:h.requestId;try{BN&&m&&window.parent.postMessage({type:"api-request-end",requestId:m,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,m,x,p,g,w,N,j;const _=((m=(h=d.response)===null||h===void 0?void 0:h.data)===null||m===void 0?void 0:m.message)||((p=(x=d.response)===null||x===void 0?void 0:x.data)===null||p===void 0?void 0:p.detail)||d.message,C=new aI(_,(g=d.response)===null||g===void 0?void 0:g.status,(N=(w=d.response)===null||w===void 0?void 0:w.data)===null||N===void 0?void 0:N.co
457de,(j=d.response)===null||j===void 0?void 0:j.data,d);return i==null||i(C),Promise.reject(C)}),c}function $N(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,c){if(!(typeof c!="string"||c==="then"||c.startsWith("_")))return lI(t,n,c,r)}})}function oI(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function lI(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(c,d,h,m){const x={};return c&&(x.sort=c),d&&(x.limit=d),h&&(x.skip=h),m&&(x.fields=Array.isArray(m)?m.join(","):m),e.get(i,{params:x})},async filter(c,d,h,m,x){const p={q:JSON.stringify(c)};return d&&(p.sort=d),h&&(p.limit=h),m&&(p.skip=m),x&&(p.fields=Array.isArray(x)?x.join(","):x),e.get(i,{params:p})},async get(c){return e.get(`${i}/${c}`)},async create(c){return e.post(i,c)},async update(c,d){return e.put(`${i}/${c}`,d)},async delete(c){return e.delete(`${i}/${c}`)},async deleteMany(c){return e.delete(i,{data:c})},async bulkCreate(c){return e.post(`${i}/bulk`,c)},async updateMany(c,d){return e.patch(`${i}/update-many`,{query:c,data:d})},async bulkUpdate(c){return e.put(`${i}/bulk`,c)},async importEntities(c){const d=new FormData;return d.append("file",c,c.name),e.post(`${i}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(c){const d=`entities:${t}:${n}`;return r().subscribeToRoom(d,{update_model:x=>{const p=oI(x.data);if(p)try{c(p)}catch(g){console.error("[Base44 SDK] Subscription callback error:",g)}}})}}}function cI(e,t){return{async call(n,r,i){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:c,queryParams:d,...h}=i??{},m={...h,...c&&{path_params:c},...d&&{query_params:d}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,m)}}}function UN(e,t){const n=cI(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(c,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let m,x;return h instanceof FormData||h&&Object.values(h).some(p=>p instanceof File)?(m=new FormData,Object.keys(h).forEach(p=>{h[p]instanceof File?m.append(p,h[p],h[p].name):typeof h[p]=="object"&&h[p]!==null?m.append(p,JSON.stringify(h[p])):m.append(p,h[p])}),x="multipart/form-data"):(m=h,x="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${d}`,m||h,{headers:{"Content-Type":x}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${d}`,m||h,{headers:{"Content-Type":x}})}}})}})}function dI(e,t,n,r){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=i?new URL(i,window.location.origin).toString():window.location.href,d=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=d},loginWithProvider(i,c="/"){const d=new URL(c,window.location.origin).toString(),h=`app_id=${n}&from_url=${encodeURIComponent(d)}`;let m;i==="sso"?m=`/apps/${n}/auth/sso/login`:m=`/apps/auth${i==="google"?"":`/${i}`}/login`;const x=`${r.appBaseUrl}/api${m}?${h}`;window.location.href=x},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const c=i||window.location.href,d=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=d}},setToken(i,c=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",
457i)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(i,c,d){var h;try{const m=await e.post(`/apps/${n}/auth/login`,{email:i,password:c,...d&&{turnstile_token:d}}),{access_token:x,user:p}=m;return x&&this.setToken(x),{access_token:x,user:p}}catch(m){throw((h=m.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),m}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,c){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:c})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:c}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:c})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:c}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:c})},changePassword({userId:i,currentPassword:c,newPassword:d}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:c,new_password:d})}}}function uI(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)}}}function hI(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/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 c=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:c.access_token,connectionConfig:(r=c.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 e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token}}}function fI(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/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 e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Ch(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let c=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(c=d.get(n),c){if(r&&mI(c,{storageKey:t}),i){d.delete(n);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return c}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return c=window.localStorage.getItem(t),c}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function mI(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function VN(e,t,n){const r=(c,d)=>c?`${String(c).replace(/\/$/,"")}${d}`:d,i=c=>{const d=new Headers;if(n!=null&&n.getAuthHeaders){const h=n.getAuthHeaders();Object.entries(h).forEach(([m,x])=>{x!=null&&d.set(m,String(x))})}return c&&new Headers(c).forEach((h,m)=>{d.set(m,h)}),d};return{async invoke(c,d){if(typeof d=="string")throw new Error(`Function ${c} must receive an object with named parameters, received: ${d}`);let h,m;return d instanceof FormData||d&&Object.values(d).some(x=>x instanceof File)?(h=new FormData,Object.keys(d).forEach(x=>{d[x]instanceof File?h.append(x,d[x],d[x].name):typeof d[x]=="object"&&d[x]!==null?h.append(x,JSON.stringify(d[x])):h.append(x,d[x])}),m="multipart/form-data"):(h=d,m="application/json"),e.post(`/apps/${t}/functions/${c}`,h||d,{headers:{"Content-Type":m}})},async fetch(c,d={}){const m=`/functions${c.startsWith("/")?c:`/${c}`}`,x=i(d.headers),p={...d,headers:x};return await fetch(r(n==null?void 0:n.baseURL,m),p)}}}function WN({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const c=`/apps/${n}/agents`,d={},h=()=>e.get(`${c}/conversations`),m=_=>e.get(`${c}/conversations/${_}`);return{getConversations:h,getConversation:m,listConversations:_=>e.get(`${c}/conversations`,{params:_}),createConversation:_=>e.post(`${c}/conversations`,_),addMessage:async(_,C)=>e.post(`${c}/conversations/v2/${_.id}/messages`,C),subscribeToConversation:(_,C)=>{const A=`/agent-conversations/${_}`,M=t(),E=m(_).then(D=>(d[_]=D,D));return M.subscribeToRoom(A,{connect:()=>{},update_model:async({data:D})=>{const I=JSON.parse(D);if(I._message){await E;const z=I._message,H=d[_];if(H){const V=H.messages||[],Q=V.findIndex(le=>le.id===z.id),J=Q!==-1?V.map((le,xe)=>xe===Q?z:le):[...V,z];d[_]={...H,messages:J},C==null||C(d[_])}}}})},getWhatsAppConnectURL:_=>{const C=`${r}/api/apps/${n}/agents/${encodeURIComponent(_)}/whatsapp`,A=i??Ch();return A?`${C}?token=${A}`:C},getTelegramConnectURL:_=>{const C=`${r}/api/apps/${n}/agents/${encodeURIComponent(_)}/telegram`,A=i??Ch();return A?`${C}?token=${A}`:C}}}function HN(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function pI(e,t){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 e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const ji=Object.create(null);ji.open="0";ji.close="1";ji.ping="2";ji.pong="3";ji.message="4";ji.upgrade="5";ji.noop="6";
vendor: 39,879 bytes, line 457
457const up=Object.create(null);Object.keys(ji).forEach(e=>{up[ji[e]]=e});const Zv={type:"error",data:"parser error"},$2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",U2=typeof ArrayBuffer=="function",V2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lb=({type:e,data:t},n,r)=>$2&&t instanceof Blob?n?r(t):YN(t,r):U2&&(t instanceof ArrayBuffer||V2(t))?n?r(t):YN(new Blob([t]),r):r(ji[e]+(t||"")),YN=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function qN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Wy;function gI(e,t){if($2&&e.data instanceof Blob)return e.data.arrayBuffer().then(qN).then(t);if(U2&&(e.data instanceof ArrayBuffer||V2(e.data)))return t(qN(e.data));lb(e,!1,n=>{Wy||(Wy=new TextEncoder),t(Wy.encode(n))})}const GN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<GN.length;e++)oh[GN.charCodeAt(e)]=e;const xI=e=>{let t=e.length*.75,n=e.length,r,i=0,c,d,h,m;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const x=new ArrayBuffer(t),p=new Uint8Array(x);for(r=0;r<n;r+=4)c=oh[e.charCodeAt(r)],d=oh[e.charCodeAt(r+1)],h=oh[e.charCodeAt(r+2)],m=oh[e.charCodeAt(r+3)],p[i++]=c<<2|d>>4,p[i++]=(d&15)<<4|h>>2,p[i++]=(h&3)<<6|m&63;return x},yI=typeof ArrayBuffer=="function",cb=(e,t)=>{if(typeof e!="string")return{type:"message",data:W2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:vI(e.substring(1),t)}:up[n]?e.length>1?{type:up[n],data:e.substring(1)}:{type:up[n]}:Zv},vI=(e,t)=>{if(yI){const n=xI(e);return W2(n,t)}else return{base64:!0,data:e}},W2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},H2="�",bI=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((c,d)=>{lb(c,!1,h=>{r[d]=h,++i===n&&t(r.join(H2))})})},wI=(e,t)=>{const n=e.split(H2),r=[];for(let i=0;i<n.length;i++){const c=cb(n[i],t);if(r.push(c),c.type==="error")break}return r};function _I(){return new TransformStream({transform(e,t){gI(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const c=new DataView(i.buffer);c.setUint8(0,126),c.setUint16(1,r)}else{i=new Uint8Array(9);const c=new DataView(i.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Hy;function Vm(e){return e.reduce((t,n)=>t+n.length,0)}function Wm(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function jI(e,t){Hy||(Hy=new TextDecoder);const n=[];let r=0,i=-1,c=!1;return new TransformStream({transform(d,h){for(n.push(d);;){if(r===0){if(Vm(n)<1)break;const m=Wm(n,1);c=(m[0]&128)===128,i=m[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Vm(n)<2)break;const m=Wm(n,2);i=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),r=3}else if(r===2){if(Vm(n)<8)break;const m=Wm(n,8),x=new DataView(m.buffer,m.byteOffset,m.length),p=x.getUint32(0);if(p>Math.pow(2,21)-1){h.enqueue(Zv);break}i=p*Math.pow(2,32)+x.getUint32(4),r=3}else{if(Vm(n)<i)break;const m=Wm(n,i);h.enqueue(cb(c?m:Hy.decode(m),t)),r=0}if(i===0||i>e){h.enqueue(Zv);break}}}})}const Y2=4;function ws(e){if(e)return NI(e)}function NI(e){for(var t in ws.prototype)e[t]=ws.prototype[t];return e}ws.prototype.on=ws.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ws.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ws.prototype.off=ws.prototype.removeListener=ws.prototype.removeAllListeners=ws.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ws.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};ws.prototype.emitReserved=ws.prototype.emit;ws.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ws.prototype.hasListeners=function(e){return!!this.listeners(e).length};const dg=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),fr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),SI="arraybuffer";function q2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const kI=fr.setTimeout,CI=fr.clearTimeout;function ug(e,t){t.useNativeTimers?(e.setTimeoutFn=kI.bind(fr),e.clearTimeoutFn=CI.bind(fr)):(e.setTimeoutFn=fr.setTimeout.bind(fr),e.clearTimeoutFn=fr.clearTimeout.bind(fr))}const PI=1.33;function TI(e){return typeof e=="string"?EI(e):Math.ceil((e.byteLength||e.size)*PI)}function EI(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function G2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function AI(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function MI(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let c=n[r].split("=");t[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return t}class RI extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class db extends ws{constructor(t){super(),this.writable=!1,ug(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new RI(t,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(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=cb(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=AI(t);return n.length?"?"+n:""}}class LI extends db{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};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(t){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)};wI(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,bI(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=G2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Z2=!1;try{Z2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const DI=Z2;function OI(){}class II extends LI{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,c)=>{this.onError("xhr post error",i,c)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class vi extends ws{constructor(t,n,r){super(),this.createRequest=t,ug(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 t;const n=q2(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 i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.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(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=vi.requestsCount++,vi.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=OI,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vi.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}vi.requestsCount=0;vi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ZN);else if(typeof addEventListener=="function"){const e="onpagehide"in fr?"pagehide":"unload";addEventListener(e,ZN,!1)}}function ZN(){for(let e in vi.requests)vi.requests.hasOwnProperty(e)&&vi.requests[e].abort()}const FI=(function(){const e=K2({xdomain:!1});return e&&e.responseType!==null})();class BI extends II{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=FI&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new vi(K2,this.uri(),t)}}function K2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||DI))return new XMLHttpRequest}catch{}if(!t)try{return new fr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Q2=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class zI extends db{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Q2?{}:q2(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(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;lb(r,this.supportsBinary,c=>{try{this.doWrite(r,c)}catch{}i&&dg(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=G2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yy=fr.WebSocket||fr.MozWebSocket;class $I extends zI{createSocket(t,n,r){return Q2?new Yy(t,n,r):n?new Yy(t,n):new Yy(t)}doWrite(t,n){this.ws.send(n)}}class UI extends db{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=jI(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=_I();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const c=()=>{r.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&dg(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const VI={websocket:$I,webtransport:UI,polling:BI},WI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,HI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kv(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=WI.exec(e||""),c={},d=14;for(;d--;)c[HI[d]]=i[d]||"";return n!=-1&&r!=-1&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=YI(c,c.path),c.queryKey=qI(c,c.query),c}function YI(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function qI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,c){i&&(n[i]=c)}),n}const Qv=typeof addEventListener=="function"&&typeof removeEventListener=="function",hp=[];Qv&&addEventListener("offline",()=>{hp.forEach(e=>e())},!1);class Po extends ws{constructor(t,n){if(super(),this.binaryType=SI,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Kv(t);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=Kv(n.host).host);ug(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 i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=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=MI(this.opts.query)),Qv&&(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"})},hp.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Y2,n.transport=t,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[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Po.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.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",Po.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.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=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),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 t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.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 i=this.writeBuffer[r].data;if(i&&(n+=TI(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,dg(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const c={type:t,data:n,options:r};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},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():t()}):this.upgrading?r():t()),this}_onError(t){if(Po.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,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(),Qv&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=hp.indexOf(this._offlineEventListener);r!==-1&&hp.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Po.protocol=Y2;class GI extends Po{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Po.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Po.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function c(){r||(r=!0,p(),n.close(),n=null)}const d=g=>{const w=new Error("probe error: "+g);w.transport=n.name,c(),this.emitReserved("upgradeError",w)};function h(){d("transport closed")}function m(){d("socket closed")}function x(g){n&&g.name!==n.name&&c()}const p=()=>{n.removeListener("open",i),n.removeListener("error",d),n.removeListener("close",h),this.off("close",m),this.off("upgrading",x)};n.once("open",i),n.once("error",d),n.once("close",h),this.once("close",m),this.once("upgrading",x),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let ZI=class extends GI{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>VI[i]).filter(i=>!!i)),super(t,r)}};function KI(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Kv(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const c=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+c+":"+r.port+t,r.href=r.protocol+"://"+c+(n&&n.port===r.port?"":":"+r.port),r}const QI=typeof ArrayBuffer=="function",XI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,X2=Object.prototype.toString,JI=typeof Blob=="function"||typeof Blob<"u"&&X2.call(Blob)==="[object BlobConstructor]",eF=typeof File=="function"||typeof File<"u"&&X2.call(File)==="[object FileConstructor]";function ub(e){return QI&&(e instanceof ArrayBuffer||XI(e))||JI&&e instanceof Blob||eF&&e instanceof File}function fp(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(fp(e[n]))return!0;return!1}if(ub(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return fp(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&fp(e[n]))return!0;return!1}function tF(e){const t=[],n=e.data,r=e;return r.data=Xv(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Xv(e,t){if(!e)return e;if(ub(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Xv(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Xv(e[r],t));return n}return e}function sF(e,t){return e.data=Jv(e.data,t),delete e.attachments,e}function Jv(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Jv(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Jv(e[n],t));return e}const nF=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],rF=5;var _t;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(_t||(_t={}));class iF{constructor(t){this.replacer=t}encode(t){return(t.type===_t.EVENT||t.type===_t.ACK)&&fp(t)?this.encodeAsBinary({type:t.type===_t.EVENT?_t.BINARY_EVENT:_t.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===_t.BINARY_EVENT||t.type===_t.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=tF(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function KN(e){return Object.prototype.toString.call(e)==="[object Object]"}class hb extends ws{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===_t.BINARY_EVENT;r||n.type===_t.BINARY_ACK?(n.type=r?_t.EVENT:_t.ACK,this.reconstructor=new aF(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ub(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),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: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(_t[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===_t.BINARY_EVENT||r.type===_t.BINARY_ACK){const c=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const d=t.substring(c,n);if(d!=Number(d)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(d)}if(t.charAt(n+1)==="/"){const c=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(c,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const c=n+1;for(;++n;){const d=t.charAt(n);if(d==null||Number(d)!=d){--n;break}if(n===t.length)break}r.id=Number(t.substring(c,n+1))}if(t.charAt(++n)){const c=this.tryParse(t.substr(n));if(hb.isPayloadValid(r.type,c))r.data=c;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case _t.CONNECT:return KN(n);case _t.DISCONNECT:return n===void 0;case _t.CONNECT_ERROR:return typeof n=="string"||KN(n);case _t.EVENT:case _t.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&nF.indexOf(n[0])===-1);case _t.ACK:case _t.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class aF{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sF(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const oF=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hb,Encoder:iF,get PacketType(){return _t},protocol:rF},Symbol.toStringTag,{value:"Module"}));function $r(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const lF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class J2 extends ws{constructor(t,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=t,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 t=this.io;this.subs=[$r(t,"open",this.onopen.bind(this)),$r(t,"packet",this.onpacket.bind(this)),$r(t,"error",this.onerror.bind(this)),$r(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,c;if(lF.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const d={type:_t.EVENT,data:n};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),d.id=p}const h=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===t&&this.sendBuffer.splice(h,1);n.call(this,new Error("operation has timed out"))},i),d=(...h)=>{this.io.clearTimeoutFn(c),n.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...n){return new Promise((r,i)=>{const c=(d,h)=>d?i(d):r(h);c.withError=!0,n.push(c),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...c)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...c)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:_t.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case _t.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 _t.EVENT:case _t.BINARY_EVENT:this.onevent(t);break;case _t.ACK:case _t.BINARY_ACK:this.onack(t);break;case _t.DISCONNECT:this.ondisconnect();break;case _t.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:_t.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:_t.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ud(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ud.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Ud.prototype.reset=function(){this.attempts=0};Ud.prototype.setMin=function(e){this.ms=e};Ud.prototype.setMax=function(e){this.max=e};Ud.prototype.setJitter=function(e){this.jitter=e};class e0 extends ws{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ug(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 Ud({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||oF;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ZI(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=$r(n,"open",function(){r.onopen(),t&&t()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=$r(n,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{i(),c(new Error("timeout")),n.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(i),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push($r(t,"ping",this.onping.bind(this)),$r(t,"data",this.ondata.bind(this)),$r(t,"error",this.onerror.bind(this)),$r(t,"close",this.onclose.bind(this)),$r(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){dg(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new J2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
457cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=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(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Qu={};function mp(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=KI(e,t.path||"/socket.io"),r=n.source,i=n.id,c=n.path,d=Qu[i]&&c in Qu[i].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let m;return h?m=new e0(r,t):(Qu[i]||(Qu[i]=new e0(r,t)),m=Qu[i]),n.query&&!t.query&&(t.query=n.queryKey),m.socket(n.path,t)}Object.assign(mp,{Manager:e0,Socket:J2,io:mp,connect:mp});function QN(e,t){var n;const r=mp(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(n=e.token)!==null&&n!==void 0?n:Ch()}});return r.on("connect",async()=>{var i;return console.log("connect",r.id),(i=t.connect)===null||i===void 0?void 0:i.call(t)}),r.on("update_model",async i=>{var c;return(c=t.update_model)===null||c===void 0?void 0:c.call(t,i)}),r.on("error",async i=>{var c;return(c=t.error)===null||c===void 0?void 0:c.call(t,i)}),r.on("connect_error",async i=>{var c;return console.error("connect_error",i),(c=t.error)===null||c===void 0?void 0:c.call(t,i)}),r}function cF({config:e}){let t={...e};const n={},r={connect:async()=>{const N=[];Object.keys(n).forEach(j=>{m(j);const _=g(j);_==null||_.forEach(({connect:C})=>{const A=async()=>C==null?void 0:C();N.push(A())})}),await Promise.all(N)},update_model:async N=>{const _=g(N.room).map(C=>{var A;return(A=C.update_model)===null||A===void 0?void 0:A.call(C,N)});await Promise.all(_)},error:async N=>{console.error("error",N);const j=Object.values(n).flat().map(_=>{var C;return(C=_.error)===null||C===void 0?void 0:C.call(_,N)});await Promise.all(j)}};let i=QN(e,r);function c(){d()}function d(){i&&i.disconnect()}function h(N){c(),t={...t,...N},i=QN(t,r)}function m(N){i.emit("join",N)}function x(N){i.emit("leave",N)}async function p(N,j){var _;const C=JSON.stringify(j);return(_=r.update_model)===null||_===void 0?void 0:_.call(r,{room:N,data:C})}function g(N){return n[N]}return{socket:i,subscribeToRoom:(N,j)=>(n[N]||(m(N),n[N]=[]),n[N].push(j),()=>{var _,C;n[N]=(C=(_=n[N])===null||_===void 0?void 0:_.filter(A=>A!==j))!==null&&C!==void 0?C:[],n[N].length===0&&x(N)}),updateConfig:h,updateModel:p,disconnect:d}}const Xu=typeof window<"u"?window:{base44SharedInstances:{}};function dF(e,t){return Xu.base44SharedInstances||(Xu.base44SharedInstances={}),Xu.base44SharedInstances[e]||(Xu.base44SharedInstances[e]={instance:t()}),Xu.base44SharedInstances[e].instance}const uF="__user_heartbeat_event__",hF="__initialization_event__",fF="__session_duration_event__",XN="analytics-enable",JN="base44_analytics_session_id",mF={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},pF="analytics",$t=dF(pF,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...mF,...jF()}})),gF=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r})=>{var i;const{maxQueueSize:c,throttleTime:d,batchSize:h}=$t.config;if(!(!((i=$t.config)===null||i===void 0)&&i.enabled))return{track:()=>{},cleanup:()=>{}};let m;const x=`${t}/api/apps/${n}/analytics/track/batch`,p=async E=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:E}})},g=E=>{try{const D=JSON.stringify({events:E}),I=new Blob([D],{type:"application/json"});return typeof navigator>"u"||D.length>6e4||!navigator.sendBeacon(x,I)}catch{return!1}},w=async(E,D={})=>
457{if(E.length===0)return;const I=await _F(r),z=E.map(wF(I));try{(!D.isBeacon||!g(z))&&await p(z)}catch{}},N=()=>{t1(w,{throttleTime:d,batchSize:h})},j=E=>{if($t.requestsQueue.length>=c)return;const D=bF();$t.requestsQueue.push({...E,...D}),N()},_=()=>{t1(w,{throttleTime:d,batchSize:h}),m=s1(j),yF()},C=()=>{e1(),m==null||m(),vF(j);const E=$t.requestsQueue.splice(0);w(E,{isBeacon:!0})},A=()=>{typeof window>"u"||(document.visibilityState==="hidden"?C():document.visibilityState==="visible"&&_())},M=()=>{e1(),m==null||m(),typeof window<"u"&&window.removeEventListener("visibilitychange",A)};return N(),m=s1(j),xF(j),typeof window<"u"&&window.addEventListener("visibilitychange",A),{track:j,cleanup:M}};function e1(){$t.isProcessing=!1}async function t1(e,t){if($t.isProcessing)return;$t.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;$t.isProcessing&&$t.requestsQueue.length>0;){const i=$t.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(c=>setTimeout(c,n))}$t.isProcessing=!1}function s1(e){var t;if($t.isHeartBeatProcessing||((t=$t.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};$t.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:uF})},$t.config.heartBeatInterval);return()=>{clearInterval(n),$t.isHeartBeatProcessing=!1}}function xF(e){typeof window>"u"||$t.wasInitializationTracked||($t.wasInitializationTracked=!0,e({eventName:hF,properties:{referrer:document==null?void 0:document.referrer}}))}function yF(){typeof window>"u"||$t.sessionStartTime!==null||($t.sessionStartTime=new Date().toISOString())}function vF(e){if(typeof window>"u"||$t.sessionStartTime===null)return;const t=new Date().getTime()-new Date($t.sessionStartTime).getTime();$t.sessionStartTime=null,e({eventName:fF,properties:{sessionDuration:t}})}function bF(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function wF(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let qy=null;async function _F(e){if(!$t.sessionContext){if(!qy){const t=NF();qy=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}$t.sessionContext=await qy}return $t.sessionContext}function jF(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(XN);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(XN);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function NF(){if(typeof window>"u")return Uy();try{const e=localStorage.getItem(JN);if(!e){const t=Uy();return localStorage.setItem(JN,t),t}return e}catch{return Uy()}}function SF(e){var t,n;const{serverUrl:r="https://base44.app",appId:i,token:c,serviceToken:d,requiresAuth:h=!1,appBaseUrl:m,options:x,functionsVersion:p,headers:g}=e,w=typeof m=="string"?m:"",N={serverUrl:r,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:i,token:c};let j=null;const _=()=>(j||(j=cF({config:N})),j),C={...g,"X-App-Id":String(i)},A=p?{...C,"Base44-Functions-Version":p}:C,M=ah({baseURL:`${r}/api`,headers:C,token:c,onError:x==null?void 0:x.onError}),E=ah({baseURL:`${r}/api`,headers:A,token:c,interceptResponses:!1,onError:x==null?void 0:x.onError}),D={...C,...c?{"on-behalf-of":`Bearer ${c}`}:{}},I=ah({baseURL:`${r}/api`,headers:D,token:d,onError:x==null?void 0:x.onError}),z=ah({baseURL:`${r}/api`,headers:A,token:d,interceptResponses:!1}),H=dI(M,E,i,{appBaseUrl:w}),V={entities:$N({axios:M,appId:i,getSocket:_}),integrations:UN(M,i),connectors:fI(M,i),auth:H,functions:VN(E,i,{getAuthHeaders:()=>{const le={},xe=c||Ch();return xe&&(le.Authorization=`Bearer ${xe}`),le},baseURL:(t=E.defaults)===null||t===void 0?void 0:t.baseURL}),agents:WN({axios:M,getSocket:_,appId:i,serverUrl:r,token:c}),appLogs:HN(M,i),users:pI(M,i),analytics:gF({axiosClient:M,serverUrl:r,appId:i,userAuthModule:H}),cleanup:()=>{V.analytics.cleanup(),j&&j.disconnect()}},Q={entities:$N({axios:I,appId:i,getSocket:_}),integrations:UN(I,i),sso:uI(I,i),connectors:hI(I,i),functions:VN(z,i,{getAuthHeaders:()=>{const le={};return d&&(le.Authorization=`Bearer ${d}`),le},baseURL:(n=z.defaults)===null||n===void 0?void 0:n.baseURL}
457),agents:WN({axios:I,getSocket:_,appId:i,serverUrl:r,token:c}),appLogs:HN(I,i),cleanup:()=>{j&&j.disconnect()}};if(typeof window<"u"){const le=c||Ch();le&&V.auth.setToken(le)}return h&&typeof window<"u"&&setTimeout(async()=>{try{await V.auth.isAuthenticated()||V.auth.redirectToLogin(window.location.href)}catch(le){console.error("Authentication check failed:",le),V.auth.redirectToLogin(window.location.href)}},0),{...V,setToken(le){V.auth.setToken(le),j&&j.updateConfig({token:le}),N.token=le},getConfig(){return{serverUrl:r,appId:i,requiresAuth:h}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Q}}}const eC=typeof window>"u",kF=eC?{localStorage:new Map}:window,xh=kF.localStorage,CF=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Zc=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(eC)return t;const r=`base44_${CF(e)}`,i=new URLSearchParams(window.location.search),c=i.get(e);if(n){i.delete(e);const h=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(c)return xh.setItem(r,c),c;if(t)return xh.setItem(r,t),t;const d=xh.getItem(r);return d||null},PF=()=>(Zc("clear_access_token")==="true"&&(xh.removeItem("base44_access_token"),xh.removeItem("token")),{appId:Zc("app_id",{defaultValue:"6967861d66a3f9ca4997b8fe"}),token:Zc("access_token",{removeFromUrl:!0}),fromUrl:Zc("from_url",{defaultValue:window.location.href}),functionsVersion:Zc("functions_version",{defaultValue:"prod"}),appBaseUrl:Zc("app_base_url",{defaultValue:void 0})}),lh={...PF()},{appId:TF,token:EF,functionsVersion:AF,appBaseUrl:MF}=lh,X=SF({appId:TF,token:EF,functionsVersion:AF,serverUrl:"",requiresAuth:!1,appBaseUrl:MF}),tC=b.createContext(),RF=({children:e})=>{const[t,n]=b.useState(null),[r,i]=b.useState(!1),[c,d]=b.useState(!0),[h,m]=b.useState(!0),[x,p]=b.useState(null),[g,w]=b.useState(null);b.useEffect(()=>{N()},[]);const N=async()=>{var A,M;try{m(!0),p(null);const E=ah({baseURL:"/api/apps/public",headers:{"X-App-Id":lh.appId},token:lh.token,interceptResponses:!0});try{const D=await E.get(`/prod/public-settings/by-id/${lh.appId}`);w(D),lh.token?await j():(d(!1),i(!1)),m(!1)}catch(D){if(console.error("App state check failed:",D),D.status===403&&((M=(A=D.data)==null?void 0:A.extra_data)!=null&&M.reason)){const I=D.data.extra_data.reason;p(I==="auth_required"?{type:"auth_required",message:"Authentication required"}:I==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:I,message:D.message})}else p({type:"unknown",message:D.message||"Failed to load app"});m(!1),d(!1)}}catch(E){console.error("Unexpected error:",E),p({type:"unknown",message:E.message||"An unexpected error occurred"}),m(!1),d(!1)}},j=async()=>{try{d(!0);const A=await X.auth.me();n(A),i(!0),d(!1)}catch(A){console.error("User auth check failed:",A),d(!1),i(!1),(A.status===401||A.status===403)&&p({type:"auth_required",message:"Authentication required"})}},_=(A=!0)=>{n(null),i(!1),A?X.auth.logout(window.location.href):X.auth.logout()},C=()=>{X.auth.redirectToLogin(window.location.href)};return s.jsx(tC.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:c,isLoadingPublicSettings:h,authError:x,appPublicSettings:g,logout:_,navigateToLogin:C,checkAppState:N},children:e})},sC=()=>{const e=b.useContext(tC);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};function n1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hg(...e){return t=>{let n=!1;const r=e.map(i=>{const c=n1(i,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let i=0;i<r.length;i++){const c=r[i];typeof c=="function"?c():n1(e[i],null)}}}}function gt(...e){return b.useCallback(hg(...e),e)}function Wl(e){const t=DF(e),n=b.forwardRef((r,i)=>{const{children:c,...d}=r,h=b.Children.toArray(c),m=h.find(IF);if(m){const x=m.props.children,p=h.map(g=>g===m?b.Children.count(x)>1?b.Children.only(null):b.isValidElement(x)?x.props.children:null:g);return s.jsx(t,{...d,ref:i,children:b.isValidElement(x)?b.cloneElement(x,void 0,p):null})}return s.jsx(t,{...d,ref:i,children:c})});return n.displayName=`${e}.Slot`,n}var LF=Wl("Slot");function DF(e){const t=b.forwardRef((n,r)=>{const{children:i,...c}=n;if(b.isValidElement(i)){const d=BF(i),h=FF(c,i.props);return i.type!==b.Fragment&&(h.ref=r?hg(r,d):d),b.cloneElement(i,h)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nC=Symbol("radix.slottable");function OF(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=nC,t}function IF(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nC}function FF(e,t){const n={...t};
vendor: 13,613 bytes, line 457
457for(const r in t){const i=e[r],c=t[r];/^on[A-Z]/.test(r)?i&&c?n[r]=(...h)=>{const m=c(...h);return i(...h),m}:i&&(n[r]=i):r==="style"?n[r]={...i,...c}:r==="className"&&(n[r]=[i,c].filter(Boolean).join(" "))}return{...e,...n}}function BF(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const fb=Gh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),G=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},c)=>{const d=r?LF:"button";return s.jsx(d,{className:We(fb({variant:t,size:n,className:e})),ref:c,...i})});G.displayName="Button";const oe=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("rounded-xl border bg-card text-card-foreground shadow",e),...t}));oe.displayName="Card";const Ce=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("flex flex-col space-y-1.5 p-6",e),...t}));Ce.displayName="CardHeader";const Pe=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("font-semibold leading-none tracking-tight",e),...t}));Pe.displayName="CardTitle";const kn=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("text-sm text-muted-foreground",e),...t}));kn.displayName="CardDescription";const me=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("p-6 pt-0",e),...t}));me.displayName="CardContent";const zF=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("flex items-center p-6 pt-0",e),...t}));zF.displayName="CardFooter";const $F=Gh("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ot({className:e,variant:t,...n}){return s.jsx("div",{className:We($F({variant:t}),e),...n})}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function UF(e,t){const n=b.createContext(t),r=c=>{const{children:d,...h}=c,m=b.useMemo(()=>h,Object.values(h));return s.jsx(n.Provider,{value:m,children:d})};r.displayName=e+"Provider";function i(c){const d=b.useContext(n);if(d)return d;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[r,i]}function rn(e,t=[]){let n=[];function r(c,d){const h=b.createContext(d),m=n.length;n=[...n,d];const x=g=>{var A;const{scope:w,children:N,...j}=g,_=((A=w==null?void 0:w[e])==null?void 0:A[m])||h,C=b.useMemo(()=>j,Object.values(j));return s.jsx(_.Provider,{value:C,children:N})};x.displayName=c+"Provider";function p(g,w){var _;const N=((_=w==null?void 0:w[e])==null?void 0:_[m])||h,j=b.useContext(N);if(j)return j;if(d!==void 0)return d;throw new Error(`\`${g}\` must be used within \`${c}\``)}return[x,p]}const i=()=>{const c=n.map(d=>b.createContext(d));return function(h){const m=(h==null?void 0:h[e])||c;return b.useMemo(()=>({[`__scope${e}`]:{...h,[e]:m}}),[h,m])}};return i.scopeName=e,[r,VF(i,...t)]}function VF(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const d=r.reduce((h,{useScope:m,scopeName:x})=>{const g=m(c)[`__scope${x}`];return{...h,...g}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return n.scopeName=t.scopeName,n}function fg(e){const t=e+"CollectionProvider",[n,r]=rn(t),[i,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=_=>{const{scope:C,children:A}=_,M=Et.useRef(null),E=Et.useRef(new Map).current;return s.jsx(i,{scope:C,itemMap:E,collectionRef:M,children:A})};d.displayName=t;const h=e+"CollectionSlot",m=Wl(h),x=Et.forwardRef((_,C)=>{const{scope:A,children:M}=_,E=c(h,A),D=gt(C,E.collectionRef);return s.jsx(m,{ref:D,children:M})});x.displayName=h;const p=e+"CollectionItemSlot",g="data-radix-collection-item",w=Wl(p),N=Et.forwardRef((_,C)=>{const{scope:A,children:M,...E}=_,D=Et.useRef(null),I=gt(C,D),z=c(p,A);return Et.useEffect(()=>(z.itemMap.set(D,{ref:D,...E}),()=>void z.itemMap.delete(D))),s.jsx(w,{[g]:"",ref:I,children:M})});N.displayName=p;function j(_){const C=c(e+"CollectionConsumer",_);return Et.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const E=Array.from(M.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((z,H)=>E.indexOf(z.ref.current)-E.indexOf(H.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:x,ItemSlot:N},j,r]}var Us=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},WF=V0[" useId ".trim().toString()]||(()=>{}),HF=0;function xr(e){const[t,n]=b.useState(WF());return Us(()=>{n(r=>r??String(HF++))},[e]),t?`radix-${t}`:""}var YF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=YF.reduce((e,t)=>{const n=Wl(`Primitive.${t}`),r=b.forwardRef((i,c)=>{const{asChild:d,...h}=i,m=d?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(m,{...h,ref:c})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rC(e,t){e&&Id.flushSync(()=>e.dispatchEvent(t))}function Ni(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var qF=V0[" useInsertionEffect ".trim().toString()]||Us;function vr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,c,d]=GF({defaultProp:t,onChange:n}),h=e!==void 0,m=h?e:i;{const p=b.useRef(e!==void 0);b.useEffect(()=>{const g=p.current;g!==h&&console.warn(`${r} is changing from ${g?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=h},[h,r])}const x=b.useCallback(p=>{var g;if(h){const w=ZF(p)?p(e):p;w!==e&&((g=d.current)==null||g.call(d,w))}else c(p)},[h,e,c,d]);return[m,x]}function GF({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),c=b.useRef(t);return qF(()=>{c.current=t},[t]),b.useEffect(()=>{var d;i.current!==n&&((d=c.current)==null||d.call(c,n),i.current=n)},[n,i]),[n,r,c]}function ZF(e){return typeof e=="function"}var KF=b.createContext(void 0);function Vd(e){const t=b.useContext(KF);return e||t||"ltr"}var Gy="rovingFocusGroup.onEntryFocus",QF={bubbles:!1,cancelable:!0},tf="RovingFocusGroup",[t0,iC,XF]=fg(tf),[JF,Wd]=rn(tf,[XF]),[eB,tB]=JF(tf),aC=b.forwardRef((e,t)=>s.jsx(t0.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(t0.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(sB,{...e,ref:t})})}));aC.displayName=tf;var sB=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:x,preventScrollOnEntryFocus:p=!1,...g}=e,w=b.useRef(null),N=gt(t,w),j=Vd(c),[_,C]=vr({prop:d,defaultProp:h??null,onChange:m,caller:tf}),[A,M]=b.useState(!1),E=Ni(x),D=iC(n),I=b.useRef(!1),[z,H]=b.useState(0);return b.useEffect(()=>{const V=w.current;if(V)return V.addEventListener(Gy,E),()=>V.removeEventListener(Gy,E)},[E]),s.jsx(eB,{scope:n,orientation:r,dir:j,loop:i,currentTabStopId:_,onItemFocus:b.useCallback(V=>C(V),[C]),onItemShiftTab:b.useCallback(()=>M(!0),[]),onFocusableItemAdd:b.useCallback(()=>H(V=>V+1),[]),onFocusableItemRemove:b.useCallback(()=>H(V=>V-1),[]),children:s.jsx(Ze.div,{tabIndex:A||z===0?-1:0,"data-orientation":r,...g,ref:N,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{I.current=!0}),onFocus:Oe(e.onFocus,V=>{const Q=!I.current;if(V.target===V.currentTarget&&Q&&!A){const J=new CustomEvent(Gy,QF);if(V.currentTarget.dispatchEvent(J),!J.defaultPrevented){const le=D().filter(ye=>ye.focusable),xe=le.find(ye=>ye.active),Me=le.find(ye=>ye.id===_),He=[xe,Me,...le].filter(Boolean).map(ye=>ye.ref.current);cC(He,p)}}I.current=!1}),onBlur:Oe(e.onBlur,()=>M(!1))})})}),oC="RovingFocusGroupItem",lC=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:c,children:d,...h}=e,m=xr(),x=c||m,p=tB(oC,n),g=p.currentTabStopId===x,w=iC(n),{onFocusableItemAdd:N,onFocusableItemRemove:j,currentTabStopId:_}=p;return b.useEffect(()=>{if(r)return N(),()=>j()},[r,N,j]),s.jsx(t0.ItemSlot,{scope:n,id:x,focusable:r,active:i,children:s.jsx(Ze.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...h,ref:t,onMouseDown:Oe(e.onMouseDown,C=>{r?p.onItemFocus(x):C.preventDefault()}),onFocus:Oe(e.onFocus,()=>p.onItemFocus(x)),onKeyDown:Oe(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const A=iB(C,p.orientation,p.dir);if(A!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let E=w().filter(D=>D.focusable).map(D=>D.ref.current);if(A==="last")E.reverse();else if(A==="prev"||A==="next"){A==="prev"&&E.reverse();const D=E.indexOf(C.currentTarget);E=p.loop?aB(E,D+1):E.slice(D+1)}setTimeout(()=>cC(E))}}),children:typeof d=="function"?d({isCurrentTabStop:g,hasTabStop:_!=null}):d})})});lC.displayName=oC;var nB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function iB(e,t,n){const r=rB(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nB[r]}function cC(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function aB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mb=aC,pb=lC;function oB(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var wr=e=>{const{present:t,children:n}=e,r=lB(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),c=gt(r.ref,cB(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:c}):null};wr.displayName="Presence";function lB(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),c=b.useRef("none"),d=e?"mounted":"unmounted",[h,m]=oB(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const x=Hm(r.current);c.current=h==="mounted"?x:"none"},[h]),Us(()=>{const x=r.current,p=i.current;if(p!==e){const w=c.current,N=Hm(x);e?m("MOUNT"):N==="none"||(x==null?void 0:x.display)==="none"?m("UNMOUNT"):m(p&&w!==N?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,m]),Us(()=>{if(t){let x;const p=t.ownerDocument.defaultView??window,g=N=>{const _=Hm(r.current).includes(CSS.escape(N.animationName));if(N.target===t&&_&&(m("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",x=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},w=N=>{N.target===t&&(c.current=Hm(r.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(x),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:b.useCallback(x=>{r.current=x?getComputedStyle(x):null,n(x)},[])}}function Hm(e){return(e==null?void 0:e.animationName)||"none"}function cB(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mg="Tabs",[dB]=rn(mg,[Wd]),dC=Wd(),[uB,gb]=dB(mg),uC=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:c,orientation:d="horizontal",dir:h,activationMode:m="automatic",...x}=e,p=Vd(h),[g,w]=vr({prop:r,onChange:i,defaultProp:c??"",caller:mg});return s.jsx(uB,{scope:n,baseId:xr(),value:g,onValueChange:w,orientation:d,dir:p,activationMode:m,children:s.jsx(Ze.div,{dir:p,"data-orientation":d,...x,ref:t})})});uC.displayName=mg;var hC="TabsList",fC=b.forwardRef((e,t)=>
457{const{__scopeTabs:n,loop:r=!0,...i}=e,c=gb(hC,n),d=dC(n);return s.jsx(mb,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:r,children:s.jsx(Ze.div,{role:"tablist","aria-orientation":c.orientation,...i,ref:t})})});fC.displayName=hC;var mC="TabsTrigger",pC=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...c}=e,d=gb(mC,n),h=dC(n),m=yC(d.baseId,r),x=vC(d.baseId,r),p=r===d.value;return s.jsx(pb,{asChild:!0,...h,focusable:!i,active:p,children:s.jsx(Ze.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":x,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:m,...c,ref:t,onMouseDown:Oe(e.onMouseDown,g=>{!i&&g.button===0&&g.ctrlKey===!1?d.onValueChange(r):g.preventDefault()}),onKeyDown:Oe(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&d.onValueChange(r)}),onFocus:Oe(e.onFocus,()=>{const g=d.activationMode!=="manual";!p&&!i&&g&&d.onValueChange(r)})})})});pC.displayName=mC;var gC="TabsContent",xC=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:c,...d}=e,h=gb(gC,n),m=yC(h.baseId,r),x=vC(h.baseId,r),p=r===h.value,g=b.useRef(p);return b.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),s.jsx(wr,{present:i||p,children:({present:w})=>s.jsx(Ze.div,{"data-state":p?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":m,hidden:!w,id:x,tabIndex:0,...d,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:w&&c})})});xC.displayName=gC;function yC(e,t){return`${e}-trigger-${t}`}function vC(e,t){return`${e}-content-${t}`}var hB=uC,bC=fC,wC=pC,_C=xC;const Ql=hB,Fo=b.forwardRef(({className:e,...t},n)=>s.jsx(bC,{ref:n,className:We("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Fo.displayName=bC.displayName;const Bt=b.forwardRef(({className:e,...t},n)=>s.jsx(wC,{ref:n,className:We("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Bt.displayName=wC.displayName;const zt=b.forwardRef(({className:e,...t},n)=>s.jsx(_C,{ref:n,className:We("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));zt.displayName=_C.displayName;function fB(){const[e,t]=b.useState(null),[n,r]=b.useState([]),[i,c]=b.useState([]),[d,h]=b.useState(!0);b.useEffect(()=>{m()},[]);const m=async()=>{try{const j=await X.auth.me();if(j.role!=="admin"){window.location.href="/";return}t(j);const[_,C]=await Promise.all([X.entities.Facility.list("-created_date",100),X.entities.Booking.list("-created_date",100)]);r(_),c(C)}catch{X.auth.redirectToLogin()}finally{h(!1)}},x=async j=>{await X.entities.Facility.update(j,{status:"active"}),r(_=>_.map(C=>C.id===j?{...C,status:"active"}:C))},p=async j=>{await X.entities.Facility.update(j,{status:"inactive"}),r(_=>_.map(C=>C.id===j?{...C,status:"inactive"}:C))};if(d)return s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})});const g=n.filter(j=>j.status==="pending"),w=n.filter(j=>j.status==="active"),N=i.filter(j=>j.payment_status==="paid").reduce((j,_)=>j+(_.total_price||0),0);return s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Admin Dashboard"}),s.jsx("p",{className:"text-gray-500 text-sm mb-8",children:"Stow-N-Go 24/7 Operations"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-8",children:[{icon:jk,label:"Active Facilities",value:w.length,color:"text-brand-blue"},{icon:Ct,label:"Pending Review",value:g.length,color:"text-yellow-500"},{icon:ng,label:"Total Bookings",value:i.length,color:"text-coral"},{icon:es,label:"Total Revenue",value:`$${N.toFixed(0)}`,color:"text-green-600"}].map(({icon:j,label:_,value:C,color:A})=>s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-4 text-center",children:[s.jsx(j,{className:`w-5 h-5 mx-auto mb-1 ${A}`}),s.jsx("p",{className:"text-xl font-bold text-gray-900",children:C}),s.jsx("p",{className:"text-xs text-gray-500",children:_})]})},_))}),s.jsxs(Ql,{defaultValue:"pending",children:[s.jsxs(Fo,{className:"mb-6",children:[s.jsxs(Bt,{value:"pending",children:["Pending (",g.length,")"]}),s.jsx(Bt,{value:"facilities",children:"All Facilities"}),s.jsx(Bt,{value:"bookings",children:"Bookings"})]}),s.jsx(zt,{value:"pending",children:g.length===0?s.jsx("p",{className:"text-center text-gray-400 py-8",children:"No pending applications."}):g.map(j=>s.jsx(oe,{className:"border-gray-100 mb-3",children:s.jsxs(me,{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:j.name}),s.jsxs("p",{className:"text-sm text-gray-500",children:[j.address,", ",j.city,", ",j.state]}),s.jsxs("p",{className:"text-sm text-gray-500",children:[j.email," · ",j.total_lockers," lockers"]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(G,{size:"sm",onClick:()=>x(j.id),className:"bg-green-600 hover:bg-green-700 text-white",children:[s.jsx(os,{className:"w-4 h-4 mr-1"})," Approve"]}),s.jsxs(G,{size:"sm",variant:"outline",onClick:()=>p(j.id),className:"text-red-600 border-red-200 hover:bg-red-50",children:[s.jsx(tg,{className:"w-4 h-4 mr-1"})," Reject"]})]})]})},j.id))}),s.jsx(zt,{value:"facilities",children:n.map(j=>s.jsx(oe,{className:"border-gray-100 mb-3",children:s.jsxs(me,{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:j.name}),s.jsxs("p",{className:"text-sm text-gray-500",children:[j.city,", ",j.state," · ",j.total_lockers," lockers"]})]}),s.jsx(ot,{className:`border-0 text-xs ${j.status==="active"?"bg-green-100 text-green-700":j.status==="pending"?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-500"}`,children:j.status})]})},j.id))}),s.jsx(zt,{value:"bookings",children:i.slice(0,30).map(j=>{var _;return s.jsx(oe,{className:"border-gray-100 mb-3",children:s.jsxs(me,{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:j.guest_name}),s.jsxs("p",{className:"text-sm text-gray-500",children:[j.guest_email," · Locker #",j.locker_number]}),s.jsxs("p",{className:"text-xs text-gray-400",children:[j.start_date," → ",j.end_date]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-bold",children:["$",(_=j.total_price)==null?void 0:_.toFixed(2)]}),s.jsx(ot,{className:`border-0 text-xs mt-1 ${j.payment_status==="paid"?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"}`,children:j.payment_status})]})]})},j.id)})})]})]})})}const de=b.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:We("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));de.displayName="Input";function mB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let s0=1;class pB{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>
vendor: 3,664 bytes, line 457
457{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,c=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:s0++,d=this.toasts.find(m=>m.id===c),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),d?this.toasts=this.toasts.map(m=>m.id===c?(this.publish({...m,...t,id:c,title:r}),{...m,...t,id:c,dismissible:h,title:r}):m):this.addToast({title:r,...i,dismissible:h,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let c=r!==void 0,d;const h=i.then(async x=>{if(d=["resolve",x],Et.isValidElement(x))c=!1,this.create({id:r,type:"default",message:x});else if(xB(x)&&!x.ok){c=!1;const g=typeof n.error=="function"?await n.error(`HTTP error! status: ${x.status}`):n.error,w=typeof n.description=="function"?await n.description(`HTTP error! status: ${x.status}`):n.description,j=typeof g=="object"&&!Et.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:w,...j})}else if(x instanceof Error){c=!1;const g=typeof n.error=="function"?await n.error(x):n.error,w=typeof n.description=="function"?await n.description(x):n.description,j=typeof g=="object"&&!Et.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:w,...j})}else if(n.success!==void 0){c=!1;const g=typeof n.success=="function"?await n.success(x):n.success,w=typeof n.description=="function"?await n.description(x):n.description,j=typeof g=="object"&&!Et.isValidElement(g)?g:{message:g};this.create({id:r,type:"success",description:w,...j})}}).catch(async x=>{if(d=["reject",x],n.error!==void 0){c=!1;const p=typeof n.error=="function"?await n.error(x):n.error,g=typeof n.description=="function"?await n.description(x):n.description,N=typeof p=="object"&&!Et.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...N})}}).finally(()=>{c&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),m=()=>new Promise((x,p)=>h.then(()=>d[0]==="reject"?p(d[1]):x(d[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:m}:Object.assign(r,{unwrap:m})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||s0++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const dr=new pB,gB=(e,t)=>{const n=(t==null?void 0:t.id)||s0++;return dr.addToast({title:e,...t,id:n}),n},xB=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yB=gB,vB=()=>dr.toasts,bB=()=>dr.getActiveToasts(),Xe=Object.assign(yB,{success:dr.success,info:dr.info,warning:dr.warning,error:dr.error,custom:dr.custom,message:dr.message,promise:dr.promise,dismiss:dr.dismiss,loading:dr.loading},{getHistory:vB,getToasts:bB});mB
vendor: 4,787 bytes, line 457
457("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 457
457left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
457wB(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),i=async()=>{r(!0);try{const{data:d}=await X.functions.invoke("analyzePartnerData",{action:"suggest_partners"});t(d.suggestions)}catch(d){console.error("Error loading suggestions:",d),Xe.error("Failed to load AI suggestions")}finally{r(!1)}},c={high:"bg-red-100 text-red-800",medium:"bg-yellow-100 text-yellow-800",low:"bg-green-100 text-green-800"};return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Il,{className:"w-5 h-5 text-purple-600"}),"AI Partner Suggestions"]})}),s.jsx(me,{children:e?s.jsxs("div",{className:"space-y-4",children:[e.map((d,h)=>s.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(jt,{className:"w-5 h-5 text-blue-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg",children:d.neighborhood}),s.jsx("p",{className:"text-sm text-gray-600",children:d.city})]})]}),s.jsxs(ot,{className:c[d.priority],children:[d.priority," priority"]})]}),s.jsx("p",{className:"text-gray-700 mt-2",children:d.reason})]},h)),s.jsxs(G,{onClick:i,variant:"outline",className:"w-full",disabled:n,children:[s.jsx(Ci,{className:"w-4 h-4 mr-2"}),"Refresh Suggestions"]})]}):s.jsxs("div",{className:"text-center py-6",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Get AI-powered suggestions for new partner locations based on booking demand patterns"}),s.jsx(G,{onClick:i,disabled:n,className:"bg-purple-600 hover:bg-purple-700",children:n?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Il,{className:"w-4 h-4 mr-2"}),"Generate Suggestions"]})})]})})]})}var _B="Label",jC=b.forwardRef((e,t)=>
vendor: 34,729 bytes, line 457
457s.jsx(Ze.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));jC.displayName=_B;var NC=jC;const jB=Gh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),te=b.forwardRef(({className:e,...t},n)=>s.jsx(NC,{ref:n,className:We(jB(),e),...t}));te.displayName=NC.displayName;const Os=b.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:We("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Os.displayName="Textarea";function r1(e,[t,n]){return Math.min(n,Math.max(t,e))}function NB(e,t=globalThis==null?void 0:globalThis.document){const n=Ni(e);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var SB="DismissableLayer",n0="dismissableLayer.update",kB="dismissableLayer.pointerDownOutside",CB="dismissableLayer.focusOutside",i1,SC=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pg=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:d,onDismiss:h,...m}=e,x=b.useContext(SC),[p,g]=b.useState(null),w=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=b.useState({}),j=gt(t,H=>g(H)),_=Array.from(x.layers),[C]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),A=_.indexOf(C),M=p?_.indexOf(p):-1,E=x.layersWithOutsidePointerEventsDisabled.size>0,D=M>=A,I=EB(H=>{const V=H.target,Q=[...x.branches].some(J=>J.contains(V));!D||Q||(i==null||i(H),d==null||d(H),H.defaultPrevented||h==null||h())},w),z=AB(H=>{const V=H.target;[...x.branches].some(J=>J.contains(V))||(c==null||c(H),d==null||d(H),H.defaultPrevented||h==null||h())},w);return NB(H=>{M===x.layers.size-1&&(r==null||r(H),!H.defaultPrevented&&h&&(H.preventDefault(),h()))},w),b.useEffect(()=>{if(p)return n&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(i1=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(p)),x.layers.add(p),a1(),()=>{n&&x.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=i1)}},[p,w,n,x]),b.useEffect(()=>()=>{p&&(x.layers.delete(p),x.layersWithOutsidePointerEventsDisabled.delete(p),a1())},[p,x]),b.useEffect(()=>{const H=()=>N({});return document.addEventListener(n0,H),()=>document.removeEventListener(n0,H)},[]),s.jsx(Ze.div,{...m,ref:j,style:{pointerEvents:E?D?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,z.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,I.onPointerDownCapture)})});pg.displayName=SB;var PB="DismissableLayerBranch",TB=b.forwardRef((e,t)=>{const n=b.useContext(SC),r=b.useRef(null),i=gt(t,r);return b.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),s.jsx(Ze.div,{...e,ref:i})});TB.displayName=PB;function EB(e,t=globalThis==null?void 0:globalThis.document){const n=Ni(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const c=h=>{if(h.target&&!r.current){let m=function(){kC(kB,n,x,{discrete:!0})};const x={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=m,t.addEventListener("click",i.current,{once:!0})):m()}else t.removeEventListener("click",i.current);r.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",c),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function AB(e,t=globalThis==null?void 0:globalThis.document){const n=Ni(e),r=b.useRef(!1);return b.useEffect(()=>{const i=c=>{c.target&&!r.current&&kC(CB,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function a1(){const e=new CustomEvent(n0);document.dispatchEvent(e)}function kC(e,t,n,{discrete:r}){const i=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?rC(i,c):i.dispatchEvent(c)}var Zy=0;function xb(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o1()),document.body.insertAdjacentElement("beforeend",e[1]??o1()),Zy++,()=>{Zy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zy--}},[])}function o1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ky="focusScope.autoFocusOnMount",Qy="focusScope.autoFocusOnUnmount",l1={bubbles:!1,cancelable:!0},MB="FocusScope",gg=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...d}=e,[h,m]=b.useState(null),x=Ni(i),p=Ni(c),g=b.useRef(null),w=gt(t,_=>m(_)),N=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let _=function(E){if(N.paused||!h)return;const D=E.target;h.contains(D)?g.current=D:ho(g.current,{select:!0})},C=function(E){if(N.paused||!h)return;const D=E.relatedTarget;D!==null&&(h.contains(D)||ho(g.current,{select:!0}))},A=function(E){if(document.activeElement===document.body)for(const I of E)I.removedNodes.length>0&&ho(h)};document.addEventListener("focusin",_),document.addEventListener("focusout",C);const M=new MutationObserver(A);return h&&M.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",C),M.disconnect()}}},[r,h,N.paused]),b.useEffect(()=>{if(h){d1.add(N);const _=document.activeElement;if(!h.contains(_)){const A=new CustomEvent(Ky,l1);h.addEventListener(Ky,x),h.dispatchEvent(A),A.defaultPrevented||(RB(FB(CC(h)),{select:!0}),document.activeElement===_&&ho(h))}return()=>{h.removeEventListener(Ky,x),setTimeout(()=>{const A=new CustomEvent(Qy,l1);h.addEventListener(Qy,p),h.dispatchEvent(A),A.defaultPrevented||ho(_??document.body,{select:!0}),h.removeEventListener(Qy,p),d1.remove(N)},0)}}},[h,x,p,N]);const j=b.useCallback(_=>{if(!n&&!r||N.paused)return;const C=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,A=document.activeElement;if(C&&A){const M=_.currentTarget,[E,D]=LB(M);E&&D?!_.shiftKey&&A===D?(_.preventDefault(),n&&ho(E,{select:!0})):_.shiftKey&&A===E&&(_.preventDefault(),n&&ho(D,{select:!0})):A===M&&_.preventDefault()}},[n,r,N.paused]);return s.jsx(Ze.div,{tabIndex:-1,...d,ref:w,onKeyDown:j})});gg.displayName=MB;function RB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ho(r,{select:t}),document.activeElement!==n)return}function LB(e){const t=CC(e),n=c1(t,e),r=c1(t.reverse(),e);return[n,r]}function CC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function c1(e,t){for(const n of e)if(!DB(n,{upTo:t}))return n}function DB(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function OB(e){return e instanceof HTMLInputElement&&"select"in e}function ho(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&OB(e)&&t&&e.select()}}var d1=IB();function IB(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=u1(e,t),e.unshift(t)},remove(t){var n;e=u1(e,t),(n=e[0])==null||n.resume()}}}function u1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function FB(e){return e.filter(t=>t.tagName!=="A")}const BB=["top","right","bottom","left"],Mo=Math.min,Vn=Math.max,Ep=Math.round,Ym=Math.floor,bi=e=>({x:e,y:e}),zB={left:"right",right:"left",bottom:"top",top:"bottom"},$B={start:"end",end:"start"};function r0(e,t,n){return Vn(e,Mo(t,n))}function ya(e,t){return typeof e=="function"?e(t):e}function va(e){return e.split("-")[0]}function Hd(e){return e.split("-")[1]}function yb(e){return e==="x"?"y":"x"}function vb(e){return e==="y"?"height":"width"}const UB=new Set(["top","bottom"]);function yi(e){return UB.has(va(e))?"y":"x"}function bb(e){return yb(yi(e))}function VB(e,t,n){n===void 0&&(n=!1);const r=Hd(e),i=bb(e),c=vb(i);let d=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(d=Ap(d)),[d,Ap(d)]}function WB(e){const t=Ap(e);return[i0(e),t,i0(t)]}function i0(e){return e.replace(/start|end/g,t=>$B[t])}const h1=["left","right"],f1=["right","left"],HB=["top","bottom"],YB=["bottom","top"];function qB(e,t,n){switch(e){case"top":case"bottom":return n?t?f1:h1:t?h1:f1;case"left":case"right":return t?HB:YB;default:return[]}}function GB(e,t,n,r){const i=Hd(e);let c=qB(va(e),n==="start",r);return i&&(c=c.map(d=>d+"-"+i),t&&(c=c.concat(c.map(i0)))),c}function Ap(e){return e.replace(/left|right|bottom|top/g,t=>zB[t])}function ZB(e){return{top:0,right:0,bottom:0,left:0,...e}}function PC(e){return typeof e!="number"?ZB(e):{top:e,right:e,bottom:e,left:e}}function Mp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function m1(e,t,n){let{reference:r,floating:i}=e;const c=yi(t),d=bb(t),h=vb(d),m=va(t),x=c==="y",p=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,w=r[h]/2-i[h]/2;let N;switch(m){case"top":N={x:p,y:r.y-i.height};break;case"bottom":N={x:p,y:r.y+r.height};break;case"right":N={x:r.x+r.width,y:g};break;case"left":N={x:r.x-i.width,y:g};break;default:N={x:r.x,y:r.y}}switch(Hd(t)){case"start":N[d]-=w*(n&&x?-1:1);break;case"end":N[d]+=w*(n&&x?-1:1);break}return N}const KB=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:d}=n,h=c.filter(Boolean),m=await(d.isRTL==null?void 0:d.isRTL(t));let x=await d.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:g}=m1(x,r,m),w=r,N={},j=0;for(let _=0;_<h.length;_++){const{name:C,fn:A}=h[_],{x:M,y:E,data:D,reset:I}=await A({x:p,y:g,initialPlacement:r,placement:w,strategy:i,middlewareData:N,rects:x,platform:d,elements:{reference:e,floating:t}});p=M??p,g=E??g,N={...N,[C]:{...N[C],...D}},I&&j<=50&&(j++,typeof I=="object"&&(I.placement&&(w=I.placement),I.rects&&(x=I.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:p,y:g}=m1(x,w,m)),_=-1)}return{x:p,y:g,placement:w,strategy:i,middlewareData:N}};async function Ph(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:c,rects:d,elements:h,strategy:m}=e,{boundary:x="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:w=!1,padding:N=0}=ya(t,e),j=PC(N),C=h[w?g==="floating"?"reference":"floating":g],A=Mp(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(C)))==null||n?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:x,rootBoundary:p,strategy:m})),M=g==="floating"?{x:r,y:i,width:d.floating.width,height:d.floating.height}:d.reference,E=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),D=await(c.isElement==null?void 0:c.isElement(E))?await(c.getScale==null?void 0:c.getScale(E))||{x:1,y:1}:{x:1,y:1},I=Mp(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:M,offsetParent:E,strategy:m}):M);return{top:(A.top-I.top+j.top)/D.y,bottom:(I.bottom-A.bottom+j.bottom)/D.y,left:(A.left-I.left+j.left)/D.x,right:(I.right-A.right+j.right)/D.x}}const QB=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:d,elements:h,middlewareData:m}=t,{element:x,padding:p=0}=ya(e,t)||{};if(x==null)return{};const g=PC(p),w={x:n,y:r},N=bb(i),j=vb(N),_=await d.getDimensions(x),C=N==="y",A=C?"top":"left",M=C?"bottom":"right",E=C?"clientHeight":"clientWidth",D=c.reference[j]+c.reference[N]-w[N]-c.floating[j],I=w[N]-c.reference[N],z=await(d.getOffsetParent==null?void 0:d.getOffsetParent(x));let H=z?z[E]:0;(!H||!await(d.isElement==null?void 0:d.isElement(z)))&&(H=h.floating[E]||c.floating[j]);const V=D/2-I/2,Q=H/2-_[j]/2-1,J=Mo(g[A],Q),le=Mo(g[M],Q),xe=J,Me=H-_[j]-le,ke=H/2-_[j]/2+V,He=r0(xe,ke,Me),ye=!m.arrow&&Hd(i)!=null&&ke!==He&&c.reference[j]/2-(ke<xe?J:le)-_[j]/2<0,_e=ye?ke<xe?ke-xe:ke-Me:0;return{[N]:w[N]+_e,data:{[N]:He,centerOffset:ke-He-_e,...ye&&{alignmentOffset:_e}},reset:ye}}}),XB=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:c,rects:d,initialPlacement:h,platform:m,elements:x}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:_=!0,...C}=ya(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const A=va(i),M=yi(h),E=va(h)===h,D=await(m.isRTL==null?void 0:m.isRTL(x.floating)),I=w||(E||!_?[Ap(h)]:WB(h)),z=j!=="none";!w&&z&&I.push(...GB(h,_,j,D));const H=[h,...I],V=await Ph(t,C),Q=[];let J=((r=c.flip)==null?void 0:r.overflows)||[];if(p&&Q.push(V[A]),g){const ke=VB(i,d,D);Q.push(V[ke[0]],V[ke[1]])}if(J=[...J,{placement:i,overflows:Q}],!Q.every(ke=>ke<=0)){var le,xe;const ke=(((le=c.flip)==null?void 0:le.index)||0)+1,He=H[ke];if(He&&(!(g==="alignment"?M!==yi(He):!1)||J.every(B=>yi(B.placement)===M?B.overflows[0]>0:!0)))return{data:{index:ke,overflows:J},reset:{placement:He}};let ye=(xe=J.filter(_e=>_e.overflows[0]<=0).sort((_e,B)=>_e.overflows[1]-B.overflows[1])[0])==null?void 0:xe.placement;if(!ye)switch(N){case"bestFit":{var Me;const _e=(Me=J.filter(B=>{if(z){const ce=yi(B.placement);return ce===M||ce==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ce=>ce>0).reduce((ce,ne)=>ce+ne,0)]).sort((B,ce)=>B[1]-ce[1])[0])==null?void 0:Me[0];_e&&(ye=_e);break}case"initialPlacement":ye=h;break}if(i!==ye)return{reset:{placement:ye}}}return{}}}};function p1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function g1(e){return BB.some(t=>e[t]>=0)}const JB=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ya(e,t);switch(r){case"referenceHidden":{const c=await Ph(t,{...i,elementContext:"reference"}),d=p1(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:g1(d)}}}case"escaped":{const c=await Ph(t,{...i,altBoundary:!0}),d=p1(c,n.floating);return{data:{escapedOffsets:d,escaped:g1(d)}}}default:return{}}}}},TC=new Set(["left","top"]);async function ez(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),d=va(n),h=Hd(n),m=yi(n)==="y",x=TC.has(d)?-1:1,p=c&&m?-1:1,g=ya(t,e);let{mainAxis:w,crossAxis:N,alignmentAxis:j}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return h&&typeof j=="number"&&(N=h==="end"?j*-1:j),m?{x:N*p,y:w*x}:{x:w*x,y:N*p}}const tz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:d,middlewareData:h}=t,m=await ez(t,e);return d===((n=h.offset)==null?void 0:n.placement)&&(r=h.arrow)!=null&&r.alignmentOffset?{}:{x:i+m.x,y:c+m.y,data:{...m,placement:d}}}}},sz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:h={fn:C=>{let{x:A,y:M}=C;return{x:A,y:M}}},...m}=ya(e,t),x={x:n,y:r},p=await Ph(t,m),g=yi(va(i)),w=yb(g);let N=x[w],j=x[g];if(c){const C=w==="y"?"top":"left",A=w==="y"?"bottom":"right",M=N+p[C],E=N-p[A];N=r0(M,N,E)}if(d){const C=g==="y"?"top":"left",A=g==="y"?"bottom":"right",M=j+p[C],E=j-p[A];j=r0(M,j,E)}const _=h.fn({...t,[w]:N,[g]:j});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[w]:c,[g]:d}}}}}},nz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:d}=t,{offset:h=0,mainAxis:m=!0,crossAxis:x=!0}=ya(e,t),p={x:n,y:r},g=yi(i),w=yb(g);let N=p[w],j=p[g];const _=ya(h,t),C=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(m){const E=w==="y"?"height":"width",D=c.reference[w]-c.floating[E]+C.mainAxis,I=c.reference[w]+c.reference[E]-C.mainAxis;N<D?N=D:N>I&&(N=I)}if(x){var A,M;const E=w==="y"?"width":"height",D=TC.has(va(i)),I=c.reference[g]-c.floating[E]+(D&&((A=d.offset)==null?void 0:A[g])||0)+(D?0:C.crossAxis),z=c.reference[g]+c.reference[E]+(D?0:((M=d.offset)==null?void 0:M[g])||0)-(D?C.crossAxis:0);j<I?j=I:j>z&&(j=z)}return{[w]:N,[g]:j}}}},rz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:d,elements:h}=t,{apply:m=()=>{},...x}=ya(e,t),p=await Ph(t,x),g=va(i),w=Hd(i),N=yi(i)==="y",{width:j,height:_}=c.floating;let C,A;g==="top"||g==="bottom"?(C=g,A=w===(await(d.isRTL==null?void 0:d.isRTL(h.floating))?"start":"end")?"left":"right"):(A=g,C=w==="end"?"top":"bottom");const M=_-p.top-p.bottom,E=j-p.left-p.right,D=Mo(_-p[C],M),I=Mo(j-p[A],E),z=!t.middlewareData.shift;let H=D,V=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(H=M),z&&!w){const J=Vn(p.left,0),le=Vn(p.right,0),xe=Vn(p.top,0),Me=Vn(p.bottom,0);N?V=j-2*(J!==0||le!==0?J+le:Vn(p.left,p.right)):H=_-2*(xe!==0||Me!==0?xe+Me:Vn(p.top,p.bottom))}await m({...t,availableWidth:V,availableHeight:H});const Q=await d.getDimensions(h.floating);return j!==Q.width||_!==Q.height?{reset:{rects:!0}}:{}}}};function xg(){return typeof window<"u"}function Yd(e){return EC(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pi(e){var t;return(t=(EC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EC(e){return xg()?e instanceof Node||e instanceof Wn(e).Node:!1}function Vr(e){return xg()?e instanceof Element||e instanceof Wn(e).Element:!1}function Si(e){return xg()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function x1(e){return!xg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}const iz=new Set(["inline","contents"]);function sf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!iz.has(i)}const az=new Set(["table","td","th"]);function oz(e){return az.has(Yd(e))}const lz=[":popover-open",":modal"];function yg(e){return lz.some(t=>{try{return e.matches(t)}catch{return!1}})}const cz=["transform","translate","scale","rotate","perspective"],dz=["transform","translate","scale","rotate","perspective","filter"],uz=["paint","layout","strict","content"];function wb(e){const t=_b(),n=Vr(e)?Wr(e):e;return cz.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||dz.some(r=>(n.willChange||"").includes(r))||uz.some(r=>(n.contain||"").includes(r))}function hz(e){let t=Ro(e);for(;Si(t)&&!Td(t);){if(wb(t))return t;if(yg(t))return null;t=Ro(t)}return null}function _b(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fz=new Set(["html","body","#document"]);function Td(e){return fz.has(Yd(e))}function Wr(e){return Wn(e).getComputedStyle(e)}function vg(e){return Vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ro(e){if(Yd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||x1(e)&&e.host||Pi(e);return x1(t)?t.host:t}function AC(e){const t=Ro(e);return Td(t)?e.ownerDocument?e.ownerDocument.body:e.body:Si(t)&&sf(t)?t:AC(t)}function Th(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=AC(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),d=Wn(i);if(c){const h=a0(d);return t.concat(d,d.visualViewport||[],sf(i)?i:[],h&&n?Th(h):[])}return t.concat(i,Th(i,[],n))}function a0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function MC(e){const t=Wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Si(e),c=i?e.offsetWidth:n,d=i?e.offsetHeight:r,h=Ep(n)!==c||Ep(r)!==d;return h&&(n=c,r=d),{width:n,height:r,$:h}}function jb(e){return Vr(e)?e:e.contextElement}function cd(e){const t=jb(e);if(!Si(t))return bi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=MC(t);let d=(c?Ep(n.width):n.width)/r,h=(c?Ep(n.height):n.height)/i;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const mz=bi(0);function RC(e){const t=Wn(e);return!_b()||!t.visualViewport?mz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function Hl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=jb(e);let d=bi(1);t&&(r?Vr(r)&&(d=cd(r)):d=cd(e));const h=pz(c,n,r)?RC(c):bi(0);let m=(i.left+h.x)/d.x,x=(i.top+h.y)/d.y,p=i.width/d.x,g=i.height/d.y;if(c){const w=Wn(c),N=r&&Vr(r)?Wn(r):r;let j=w,_=a0(j);for(;_&&r&&N!==j;){const C=cd(_),A=_.getBoundingClientRect(),M=Wr(_),E=A.left+(_.clientLeft+parseFloat(M.paddingLeft))*C.x,D=A.top+(_.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,x*=C.y,p*=C.x,g*=C.y,m+=E,x+=D,j=Wn(_),_=a0(j)}}return Mp({width:p,height:g,x:m,y:x})}function bg(e,t){const n=vg(e).scrollLeft;return t?t.left+n:Hl(Pi(e)).left+n}function LC(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-bg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function gz(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",d=Pi(r),h=t?yg(t.floating):!1;if(r===d||h&&c)return n;let m={scrollLeft:0,scrollTop:0},x=bi(1);const p=bi(0),g=Si(r);if((g||!g&&!c)&&((Yd(r)!=="body"||sf(d))&&(m=vg(r)),Si(r))){const N=Hl(r);x=cd(r),p.x=N.x+r.clientLeft,p.y=N.y+r.clientTop}const w=d&&!g&&!c?LC(d,m):bi(0);return{width:n.width*x.x,height:n.height*x.y,x:n.x*x.x-m.scrollLeft*x.x+p.x+w.x,y:n.y*x.y-m.scrollTop*x.y+p.y+w.y}}function xz(e){return Array.from(e.getClientRects())}function yz(e){const t=Pi(e),n=vg(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+bg(e);const h=-n.scrollTop;return Wr(r).direction==="rtl"&&(d+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:d,y:h}}const y1=25;function vz(e,t){const n=Wn(e),r=Pi(e),i=n.visualViewport;let c=r.clientWidth,d=r.clientHeight,h=0,m=0;if(i){c=i.width,d=i.height;const p=_b();(!p||p&&t==="fixed")&&(h=i.offsetLeft,m=i.offsetTop)}const x=bg(r);if(x<=0){const p=r.ownerDocument,g=p.body,w=getComputedStyle(g),N=p.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,j=Math.abs(r.clientWidth-g.clientWidth-N);j<=y1&&(c-=j)}else x<=y1&&(c+=x);return{width:c,height:d,x:h,y:m}}const bz=new Set(["absolute","fixed"]);function wz(e,t){const n=Hl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=Si(e)?cd(e):bi(1),d=e.clientWidth*c.x,h=e.clientHeight*c.y,m=i*c.x,x=r*c.y;return{width:d,height:h,x:m,y:x}}function v1(e,t,n){let r;if(t==="viewport")r=vz(e,n);else if(t==="document")r=yz(Pi(e));else if(Vr(t))r=wz(t,n);else{const i=RC(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Mp(r)}function DC(e,t){const n=Ro(e);return n===t||!Vr(n)||Td(n)?!1:Wr(n).position==="fixed"||DC(n,t)}function _z(e,t){const n=t.get(e);if(n)return n;let r=Th(e,[],!1).filter(h=>Vr(h)&&Yd(h)!=="body"),i=null;const c=Wr(e).position==="fixed";let d=c?Ro(e):e;for(;Vr(d)&&!Td(d);){const h=Wr(d),m=wb(d);!m&&h.position==="fixed"&&(i=null),(c?!m&&!i:!m&&h.position==="static"&&!!i&&bz.has(i.position)||sf(d)&&!m&&DC(e,d))?r=r.filter(p=>p!==d):i=h,d=Ro(d)}return t.set(e,r),r}function jz(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const d=[...n==="clippingAncestors"?yg(t)?[]:_z(t,this._c):[].concat(n),r],h=d[0],m=d.reduce((x,p)=>{const g=v1(t,p,i);return x.top=Vn(g.top,x.top),x.right=Mo(g.right,x.right),x.bottom=Mo(g.bottom,x.bottom),x.left=Vn(g.left,x.left),x},v1(t,h,i));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function Nz(e){const{width:t,height:n}=MC(e);return{width:t,height:n}}function Sz(e,t,n){const r=Si(t),i=Pi(t),c=n==="fixed",d=Hl(e,!0,c,t);let h={scrollLeft:0,scrollTop:0};const m=bi(0);function x(){m.x=bg(i)}if(r||!r&&!c)if((Yd(t)!=="body"||sf(i))&&(h=vg(t)),r){const N=Hl(t,!0,c,t);m.x=N.x+t.clientLeft,m.y=N.y+t.clientTop}else i&&x();c&&!r&&i&&x();const p=i&&!r&&!c?LC(i,h):bi(0),g=d.left+h.scrollLeft-m.x-p.x,w=d.top+h.scrollTop-m.y-p.y;return{x:g,y:w,width:d.width,height:d.height}}function Xy(e){return Wr(e).position==="static"}function b1(e,t){if(!Si(e)||Wr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pi(e)===n&&(n=n.ownerDocument.body),n}function OC(e,t){const n=Wn(e);if(yg(e))return n;if(!Si(e)){let i=Ro(e);for(;i&&!Td(i);){if(Vr(i)&&!Xy(i))return i;i=Ro(i)}return n}let r=b1(e,t);for(;r&&oz(r)&&Xy(r);)r=b1(r,t);return r&&Td(r)&&Xy(r)&&!wb(r)?n:r||hz(e)||n}const kz=async function(e){const t=this.getOffsetParent||OC,n=this.getDimensions,r=await n(e.floating);return{reference:Sz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cz(e){return Wr(e).direction==="rtl"}const Pz={convertOffsetParentRelativeRectToViewportRelativeRect:gz,getDocumentElement:Pi,getClippingRect:jz,getOffsetParent:OC,getElementRects:kz,getClientRects:xz,getDimensions:Nz,getScale:cd,isElement:Vr,isRTL:Cz};function IC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tz(e,t){let n=null,r;const i=Pi(e);function c(){var h;clearTimeout(r),(h=n)==null||h.disconnect(),n=null}function d(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),c();const x=e.getBoundingClientRect(),{left:p,top:g,width:w,height:N}=x;if(h||t(),!w||!N)return;const j=Ym(g),_=Ym(i.clientWidth-(p+w)),C=Ym(i.clientHeight-(g+N)),A=Ym(p),E={rootMargin:-j+"px "+-_+"px "+-C+"px "+-A+"px",threshold:Vn(0,Mo(1,m))||1};let D=!0;function I(z){const H=z[0].intersectionRatio;if(H!==m){if(!D)return d();H?d(!1,H):r=setTimeout(()=>{d(!1,1e-7)},1e3)}H===1&&!IC(x,e.getBoundingClientRect())&&d(),D=!1}try{n=new IntersectionObserver(I,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(I,E)}n.observe(e)}return d(!0),c}function Ez(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,x=jb(e),p=i||c?[...x?Th(x):[],...Th(t)]:[];p.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),c&&A.addEventListener("resize",n)});const g=x&&h?Tz(x,n):null;let w=-1,N=null;d&&(N=new ResizeObserver(A=>{let[M]=A;M&&M.target===x&&N&&(N.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var E;(E=N)==null||E.observe(t)})),n()}),x&&!m&&N.observe(x),N.observe(t));let j,_=m?Hl(e):null;m&&C();function C(){const A=Hl(e);_&&!IC(_,A)&&n(),_=A,j=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(M=>{i&&M.removeEventListener("scroll",n),c&&M.removeEventListener("resize",n)}),g==null||g(),(A=N)==null||A.disconnect(),N=null,m&&cancelAnimationFrame(j)}}const Az=tz,Mz=sz,Rz=XB,Lz=rz,Dz=JB,w1=QB,Oz=nz,Iz=(e,t,n)=>{const r=new Map,i={platform:Pz,...n},c={...i.platform,_c:r};return KB(e,t,{...i,platform:c})};var Fz=typeof document<"u",Bz=function(){},pp=Fz?b.useLayoutEffect:Bz;function Rp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!Rp(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function FC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _1(e,t){const n=FC(e);return Math.round(t*n)/n}function Jy(e){const t=b.useRef(e);return pp(()=>{t.current=e}),t}function zz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:d}={},transform:h=!0,whileElementsMounted:m,open:x}=e,[p,g]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,N]=b.useState(r);Rp(w,r)||N(r);const[j,_]=b.useState(null),[C,A]=b.useState(null),M=b.useCallback(B=>{B!==z.current&&(z.current=B,_(B))},[]),E=b.useCallback(B=>{B!==H.current&&(H.current=B,A(B))},[]),D=c||j,I=d||C,z=b.useRef(null),H=b.useRef(null),V=b.useRef(p),Q=m!=null,J=Jy(m),le=Jy(i),xe=Jy(x),Me=b.useCallback(()=>{if(!z.current||!H.current)return;const B={placement:t,strategy:n,middleware:w};le.current&&(B.platform=le.current),Iz(z.current,H.current,B).then(ce=>{const ne={...ce,isPositioned:xe.current!==!1};ke.current&&!Rp(V.current,ne)&&(V.current=ne,Id.flushSync(()=>{g(ne)}))})},[w,t,n,le,xe]);pp(()=>{x===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,g(B=>({...B,isPositioned:!1})))},[x]);const ke=b.useRef(!1);pp(()=>(ke.current=!0,()=>{ke.current=!1}),[]),pp(()=>{if(D&&(z.current=D),I&&(H.current=I),D&&I){if(J.current)return J.current(D,I,Me);Me()}},[D,I,Me,J,Q]);const He=b.useMemo(()=>({reference:z,floating:H,setReference:M,setFloating:E}),[M,E]),ye=b.useMemo(()=>({reference:D,floating:I}),[D,I]),_e=b.useMemo(()=>{const B={position:n,left:0,top:0};if(!ye.floating)return B;const ce=_1(ye.floating,p.x),ne=_1(ye.floating,p.y);return h?{...B,transform:"translate("+ce+"px, "+ne+"px)",...FC(ye.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ce,top:ne}},[n,h,ye.floating,p.x,p.y]);return b.useMemo(()=>({...p,update:Me,refs:He,elements:ye,floatingStyles:_e}),[p,Me,He,ye,_e])}const $z=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?w1({element:r.current,padding:i}).fn(n):{}:r?w1({element:r,padding:i}).fn(n):{}}}},Uz=(e,t)=>({...Az(e),options:[e,t]}),Vz=(e,t)=>({...Mz(e),options:[e,t]}),Wz=(e,t)=>({...Oz(e),options:[e,t]}),Hz=(e,t)=>({...Rz(e),options:[e,t]}),Yz=(e,t)=>({...Lz(e),options:[e,t]}),qz=(e,t)=>({...Dz(e),options:[e,t]}),Gz=(e,t)=>({...$z(e),options:[e,t]});var Zz="Arrow",BC=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...c}=e;return s.jsx(Ze.svg,{...c,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});BC.displayName=Zz;var Kz=BC;function wg(e){const[t,n]=b.useState(void 0);return Us(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let d,h;if("borderBoxSize"in c){const m=c.borderBoxSize,x=Array.isArray(m)?m[0]:m;d=x.inlineSize,h=x.blockSize}else d=e.offsetWidth,h=e.offsetHeight;n({width:d,height:h})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Nb="Popper",[zC,_g]=rn(Nb),[Qz,$C]=zC(Nb),UC=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return s.jsx(Qz,{scope:t,anchor:r,onAnchorChange:i,children:n})};UC.displayName=Nb;var VC="PopperAnchor",WC=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,c=$C(VC,n),d=b.useRef(null),h=gt(t,d),m=b.useRef(null);return b.useEffect(()=>{const x=m.current;m.current=(r==null?void 0:r.current)||d.current,x!==m.current&&c.onAnchorChange(m.current)}),r?null:s.jsx(Ze.div,{...i,ref:h})});WC.displayName=VC;var Sb="PopperContent",[Xz,Jz]=zC(Sb),HC=b.forwardRef((e,t)=>{var he,Re,qe,Je,ht,ct;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:x=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,updatePositionStrategy:N="optimized",onPlaced:j,..._}=e,C=$C(Sb,n),[A,M]=b.useState(null),E=gt(t,cs=>M(cs)),[D,I]=b.useState(null),z=wg(D),H=(z==null?void 0:z.width)??0,V=(z==null?void 0:z.height)??0,Q=r+(c!=="center"?"-"+c:""),J=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},le=Array.isArray(x)?x:[x],xe=le.length>0,Me={padding:J,boundary:le.filter(t8),altBoundary:xe},{refs:ke,floatingStyles:He,placement:ye,isPositioned:_e,middlewareData:B}=zz({strategy:"fixed",placement:Q,whileElementsMounted:(...cs)=>Ez(...cs,{animationFrame:N==="always"}),elements:{reference:C.anchor},middleware:[Uz({mainAxis:i+V,alignmentAxis:d}),m&&Vz({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Wz():void 0,...Me}),m&&Hz({...Me}),Yz({...Me,apply:({elements:cs,rects:Vs,availableWidth:Nr,availableHeight:Sr})=>{const{width:An,height:Li}=Vs.reference,Qr=cs.floating.style;Qr.setProperty("--radix-popper-available-width",`${Nr}px`),Qr.setProperty("--radix-popper-available-height",`${Sr}px`),Qr.setProperty("--radix-popper-anchor-width",`${An}px`),Qr.setProperty("--radix-popper-anchor-height",`${Li}px`)}}),D&&Gz({element:D,padding:h}),s8({arrowWidth:H,arrowHeight:V}),w&&qz({strategy:"referenceHidden",...Me})]}),[ce,ne]=GC(ye),U=Ni(j);Us(()=>{_e&&(U==null||U())},[_e,U]);const ie=(he=B.arrow)==null?void 0:he.x,je=(Re=B.arrow)==null?void 0:Re.y,be=((qe=B.arrow)==null?void 0:qe.centerOffset)!==0,[Se,Ne]=b.useState();return Us(()=>{A&&Ne(window.getComputedStyle(A).zIndex)},[A]),s.jsx("div",{ref:ke.setFloating,"data-radix-popper-content-wrapper":"",style:{...He,transform:_e?He.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(Je=B.transformOrigin)==null?void 0:Je.x,(ht=B.transformOrigin)==null?void 0:ht.y].join(" "),...((ct=B.hide)==null?void 0:ct.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Xz,{scope:n,placedSide:ce,onArrowChange:I,arrowX:ie,arrowY:je,shouldHideArrow:be,children:s.jsx(Ze.div,{"data-side":ce,"data-align":ne,..._,ref:E,style:{..._.style,animation:_e?void 0:"none"}})})})});HC.displayName=Sb;var YC="PopperArrow",e8={top:"bottom",right:"left",bottom:"top",left:"r
457ight"},qC=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,c=Jz(YC,r),d=e8[c.placedSide];return s.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:s.jsx(Kz,{...i,ref:n,style:{...i.style,display:"block"}})})});qC.displayName=YC;function t8(e){return e!==null}var s8=e=>({name:"transformOrigin",options:e,fn(t){var C,A,M;const{placement:n,rects:r,middlewareData:i}=t,d=((C=i.arrow)==null?void 0:C.centerOffset)!==0,h=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[x,p]=GC(n),g={start:"0%",center:"50%",end:"100%"}[p],w=(((A=i.arrow)==null?void 0:A.x)??0)+h/2,N=(((M=i.arrow)==null?void 0:M.y)??0)+m/2;let j="",_="";return x==="bottom"?(j=d?g:`${w}px`,_=`${-m}px`):x==="top"?(j=d?g:`${w}px`,_=`${r.floating.height+m}px`):x==="right"?(j=`${-m}px`,_=d?g:`${N}px`):x==="left"&&(j=`${r.floating.width+m}px`,_=d?g:`${N}px`),{data:{x:j,y:_}}}});function GC(e){const[t,n="center"]=e.split("-");return[t,n]}var ZC=UC,KC=WC,QC=HC,XC=qC,n8="Portal",jg=b.forwardRef((e,t)=>{var h;const{container:n,...r}=e,[i,c]=b.useState(!1);Us(()=>c(!0),[]);const d=n||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?j6.createPortal(s.jsx(Ze.div,{...r,ref:t}),d):null});jg.displayName=n8;function Ng(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var JC=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"}),r8="VisuallyHidden",i8=b.forwardRef((e,t)=>s.jsx(Ze.span,{...e,ref:t,style:{...JC,...e.style}}));i8.displayName=r8;var a8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kc=new WeakMap,qm=new WeakMap,Gm={},ev=0,eP=function(e){return e&&(e.host||eP(e.parentNode))},o8=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=eP(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},l8=function(e,t,n,r){var i=o8(t,Array.isArray(e)?e:[e]);Gm[n]||(Gm[n]=new WeakMap);var c=Gm[n],d=[],h=new Set,m=new Set(i),x=function(g){!g||h.has(g)||(h.add(g),x(g.parentNode))};i.forEach(x);var p=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(w){if(h.has(w))p(w);else try{var N=w.getAttribute(r),j=N!==null&&N!=="false",_=(Kc.get(w)||0)+1,C=(c.get(w)||0)+1;Kc.set(w,_),c.set(w,C),d.push(w),_===1&&j&&qm.set(w,!0),C===1&&w.setAttribute(n,"true"),j||w.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return p(t),h.clear(),ev++,function(){d.forEach(function(g){var w=Kc.get(g)-1,N=c.get(g)-1;Kc.set(g,w),c.set(g,N),w||(qm.has(g)||g.removeAttribute(r),qm.delete(g)),N||g.removeAttribute(n)}),ev--,ev||(Kc=new WeakMap,Kc=new WeakMap,qm=new WeakMap,Gm={})}},kb=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=a8(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),l8(r,i,n,"aria-hidden")):function(){return null}},gi=function(){return gi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(t[c]=n[c])}return t},gi.apply(this,arguments)};function tP(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function c8(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,c;r<i;r++)(c||!(r in t))&&(c||(c=Array.prototype.slice.call(t,0,r)),c[r]=t[r]);return e.concat(c||Array.prototype.slice.call(t))}var gp="right-scroll-bar-position",xp="width-before-scroll-bar",d8="with-scroll-bars-hidden",u8="--removed-body-scroll-bar-size";function tv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function h8(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var f8=typeof window<"u"?b.useLayoutEffect:b.useEffect,j1=new WeakMap;function m8(e,t){var n=h8(null,function(r){return e.forEach(function(i){return tv(i,r)})});return f8(function(){var r=j1.get(n);if(r){var i=new Set(r),c=new Set(e),d=n.current;
vendor: 4,196 bytes, lines 457-472
457i.forEach(function(h){c.has(h)||tv(h,null)}),c.forEach(function(h){i.has(h)||tv(h,d)})}j1.set(n,e)},[e]),n}function p8(e){return e}function g8(e,t){t===void 0&&(t=p8);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(c){var d=t(c,r);return n.push(d),function(){n=n.filter(function(h){return h!==d})}},assignSyncMedium:function(c){for(r=!0;n.length;){var d=n;n=[],d.forEach(c)}n={push:function(h){return c(h)},filter:function(){return n}}},assignMedium:function(c){r=!0;var d=[];if(n.length){var h=n;n=[],h.forEach(c),d=n}var m=function(){var p=d;d=[],p.forEach(c)},x=function(){return Promise.resolve().then(m)};x(),n={push:function(p){d.push(p),x()},filter:function(p){return d=d.filter(p),n}}}};return i}function x8(e){e===void 0&&(e={});var t=g8(null);return t.options=gi({async:!0,ssr:!1},e),t}var sP=function(e){var t=e.sideCar,n=tP(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,gi({},n))};sP.isSideCarExport=!0;function y8(e,t){return e.useMedium(t),sP}var nP=x8(),sv=function(){},Sg=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:sv,onWheelCapture:sv,onTouchMoveCapture:sv}),i=r[0],c=r[1],d=e.forwardProps,h=e.children,m=e.className,x=e.removeScrollBar,p=e.enabled,g=e.shards,w=e.sideCar,N=e.noRelative,j=e.noIsolation,_=e.inert,C=e.allowPinchZoom,A=e.as,M=A===void 0?"div":A,E=e.gapMode,D=tP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=w,z=m8([n,t]),H=gi(gi({},D),i);return b.createElement(b.Fragment,null,p&&b.createElement(I,{sideCar:nP,removeScrollBar:x,shards:g,noRelative:N,noIsolation:j,inert:_,setCallbacks:c,allowPinchZoom:!!C,lockRef:n,gapMode:E}),d?b.cloneElement(b.Children.only(h),gi(gi({},H),{ref:z})):b.createElement(M,gi({},H,{className:m,ref:z}),h))});Sg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sg.classNames={fullWidth:xp,zeroRight:gp};var v8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=v8();return t&&e.setAttribute("nonce",t),e}function w8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var j8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=b8())&&(w8(t,n),_8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},N8=function(){var e=j8();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rP=function(){var e=N8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},S8={left:0,top:0,right:0,gap:0},nv=function(e){return parseInt(e||"",10)||0},k8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[nv(n),nv(r),nv(i)]},C8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return S8;var t=k8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},P8=rP(),dd="data-scroll-locked",T8=function(e,t,n,r){var i=e.left,c=e.top,d=e.right,h=e.gap;return n===void 0&&(n="margin"),`
458  .`.concat(d8,` {
459   overflow: hidden `).concat(r,`;
460   padding-right: `).concat(h,"px ").concat(r,`;
461  }
462  body[`).concat(dd,`] {
463    overflow: hidden `).concat(r,`;
464    overscroll-behavior: contain;
465    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
466    padding-left: `.concat(i,`px;
467    padding-top: `).concat(c,`px;
468    padding-right: `).concat(d,`px;
469    margin-left:0;
470    margin-top:0;
471    margin-right: `).concat(h,"px ").concat(r,`;
472    `),n==="padding"&&"padding-right: ".concat(h,"px ").concat(r,";
472")].filter(Boolean).join(""),`
473  }
474  
475  .`).concat(gp,` {
476    right: `).concat(h,"px ").concat(r,`;
477  }
478  
479  .`).concat(xp,` {
480    margin-right: `).concat(h,"px ").concat(r,`;
481  }
482  
483  .`).concat(gp," .").concat(gp,` {
484    right: 0 `).concat(r,`;
485  }
486  
487  .`).concat(xp," .").concat(xp,` {
488    margin-right: 0 `).concat(r,`;
489  }
490  
491  body[`).concat(dd,`] {
492    `).concat(u8,": ").concat(h,`px;
493  }
494`)},N1=function(){var e=parseInt(document.body.getAttribute(dd)||"0",10);return isFinite(e)?e:0},E8=function(){b.useEffect(function(){return document.body.setAttribute(dd,(N1()+1).toString()),function(){var e=N1()-1;e<=0?document.body.removeAttribute(dd):document.body.setAttribute(dd,e.toString())}},[])},A8=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;E8();var c=b.useMemo(function(){return C8(i)},[i]);return b.createElement(P8,{styles:T8(c,!t,i,n?"":"!important")})},o0=!1;if(typeof window<"u")try{var Zm=Object.defineProperty({},"passive",{get:function(){return o0=!0,!0}});window.addEventListener("test",Zm,Zm),window.removeEventListener("test",Zm,Zm)}catch{o0=!1}var Qc=o0?{passive:!1}:!1,M8=function(e){return e.tagName==="TEXTAREA"},iP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!M8(e)&&n[t]==="visible")},R8=function(e){return iP(e,"overflowY")},L8=function(e){return iP(e,"overflowX")},S1=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=aP(e,r);if(i){var c=oP(e,r),d=c[1],h=c[2];if(d>h)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D8=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},O8=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},aP=function(e,t){return e==="v"?R8(t):L8(t)},oP=function(e,t){return e==="v"?D8(t):O8(t)},I8=function(e,t){return e==="h"&&t==="rtl"?-1:1},F8=function(e,t,n,r,i){var c=I8(e,window.getComputedStyle(t).direction),d=c*r,h=n.target,m=t.contains(h),x=!1,p=d>0,g=0,w=0;do{if(!h)break;var N=oP(e,h),j=N[0],_=N[1],C=N[2],A=_-C-c*j;(j||A)&&aP(e,h)&&(g+=A,w+=j);var M=h.parentNode;h=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&h!==document.body||m&&(t.contains(h)||t===h));return(p&&Math.abs(g)<1||!p&&Math.abs(w)<1)&&(x=!0),x},Km=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},k1=function(e){return[e.deltaX,e.deltaY]},C1=function(e){return e&&"current"in e?e.current:e},B8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z8=function(e){return`
495  .block-interactivity-`.concat(e,` {pointer-events: none;}
496  .allow-interactivity-`).concat(e,` {pointer-events: all;}
497`)},$8=0,Xc=[];function U8(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState($8++)[0],c=b.useState(rP)[0],d=b.useRef(e);b.useEffect(function(){d.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=c8([e.lockRef.current],(e.shards||[]).map(C1),!0).filter(Boolean);return _.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var h=b.useCallback(function(_,C){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!d.current.allowPinchZoom;var A=Km(_),M=n.current,E="deltaX"in _?_.deltaX:M[0]-A[0],D="deltaY"in _?_.deltaY:M[1]-A[1],I,z=_.target,H=Math.abs(E)>Math.abs(D)?"h":"v";if("touches"in _&&H==="h"&&z.type==="range")return!1;var V=S1(H,z);if(!V)return!0;if(V?I=H:(I=H==="v"?"h":"v",V=S1(H,z)),!V)return!1;if(!r.current&&"changedTouches"in _&&(E||D)&&(r.current=I),!I)return!0;var Q=r.current||I;return F8(Q,C,_,Q==="h"?E:D)},[]),m=b.useCallback(function(_){var C=_;if(!(!Xc.length||Xc[Xc.length-1]!==c)){var A="deltaY"in C?k1(C):Km(C),M=t.current.filter(function(I){return I.name===C.type&&(I.target===C.target||C.target===I.shadowParent)&&B8(I.delta,A)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}
vendor: 4,142 bytes, line 497
497if(!M){var E=(d.current.shards||[]).map(C1).filter(Boolean).filter(function(I){return I.contains(C.target)}),D=E.length>0?h(C,E[0]):!d.current.noIsolation;D&&C.cancelable&&C.preventDefault()}}},[]),x=b.useCallback(function(_,C,A,M){var E={name:_,delta:C,target:A,should:M,shadowParent:V8(A)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(D){return D!==E})},1)},[]),p=b.useCallback(function(_){n.current=Km(_),r.current=void 0},[]),g=b.useCallback(function(_){x(_.type,k1(_),_.target,h(_,e.lockRef.current))},[]),w=b.useCallback(function(_){x(_.type,Km(_),_.target,h(_,e.lockRef.current))},[]);b.useEffect(function(){return Xc.push(c),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:w}),document.addEventListener("wheel",m,Qc),document.addEventListener("touchmove",m,Qc),document.addEventListener("touchstart",p,Qc),function(){Xc=Xc.filter(function(_){return _!==c}),document.removeEventListener("wheel",m,Qc),document.removeEventListener("touchmove",m,Qc),document.removeEventListener("touchstart",p,Qc)}},[]);var N=e.removeScrollBar,j=e.inert;return b.createElement(b.Fragment,null,j?b.createElement(c,{styles:z8(i)}):null,N?b.createElement(A8,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function V8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const W8=y8(nP,U8);var kg=b.forwardRef(function(e,t){return b.createElement(Sg,gi({},e,{ref:t,sideCar:W8}))});kg.classNames=Sg.classNames;var H8=[" ","Enter","ArrowUp","ArrowDown"],Y8=[" ","Enter"],Yl="Select",[Cg,Pg,q8]=fg(Yl),[qd]=rn(Yl,[q8,_g]),Tg=_g(),[G8,Bo]=qd(Yl),[Z8,K8]=qd(Yl),lP=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:c,value:d,defaultValue:h,onValueChange:m,dir:x,name:p,autoComplete:g,disabled:w,required:N,form:j}=e,_=Tg(t),[C,A]=b.useState(null),[M,E]=b.useState(null),[D,I]=b.useState(!1),z=Vd(x),[H,V]=vr({prop:r,defaultProp:i??!1,onChange:c,caller:Yl}),[Q,J]=vr({prop:d,defaultProp:h,onChange:m,caller:Yl}),le=b.useRef(null),xe=C?j||!!C.closest("form"):!0,[Me,ke]=b.useState(new Set),He=Array.from(Me).map(ye=>ye.props.value).join(";");return s.jsx(ZC,{..._,children:s.jsxs(G8,{required:N,scope:t,trigger:C,onTriggerChange:A,valueNode:M,onValueNodeChange:E,valueNodeHasChildren:D,onValueNodeHasChildrenChange:I,contentId:xr(),value:Q,onValueChange:J,open:H,onOpenChange:V,dir:z,triggerPointerDownPosRef:le,disabled:w,children:[s.jsx(Cg.Provider,{scope:t,children:s.jsx(Z8,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(ye=>{ke(_e=>new Set(_e).add(ye))},[]),onNativeOptionRemove:b.useCallback(ye=>{ke(_e=>{const B=new Set(_e);return B.delete(ye),B})},[]),children:n})}),xe?s.jsxs(MP,{"aria-hidden":!0,required:N,tabIndex:-1,name:p,autoComplete:g,value:Q,onChange:ye=>J(ye.target.value),disabled:w,form:j,children:[Q===void 0?s.jsx("option",{value:""}):null,Array.from(Me)]},He):null]})})};lP.displayName=Yl;var cP="SelectTrigger",dP=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,c=Tg(n),d=Bo(cP,n),h=d.disabled||r,m=gt(t,d.onTriggerChange),x=Pg(n),p=b.useRef("touch"),[g,w,N]=LP(_=>{const C=x().filter(E=>!E.disabled),A=C.find(E=>E.value===d.value),M=DP(C,_,A);M!==void 0&&d.onValueChange(M.value)}),j=_=>{h||(d.onOpenChange(!0),N()),_&&(d.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return s.jsx(KC,{asChild:!0,...c,children:s.jsx(Ze.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":RP(d.value)?"":void 0,...i,ref:m,onClick:Oe(i.onClick,_=>{_.currentTarget.focus(),p.current!=="mouse"&&j(_)}),onPointerDown:Oe(i.onPointerDown,_=>{p.current=_.pointerType;const C=_.target;C.hasPointerCapture(_.pointerId)&&C.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(j(_),_.preventDefault())}),onKeyDown:Oe(i.onKeyDown,_=>{const C=g.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&w(_.key),!(C&&_.key===" ")&&H8.includes(_.ke
vendor: 16,068 bytes, line 497
497y)&&(j(),_.preventDefault())})})})});dP.displayName=cP;var uP="SelectValue",hP=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:c,placeholder:d="",...h}=e,m=Bo(uP,n),{onValueNodeHasChildrenChange:x}=m,p=c!==void 0,g=gt(t,m.onValueNodeChange);return Us(()=>{x(p)},[x,p]),s.jsx(Ze.span,{...h,ref:g,style:{pointerEvents:"none"},children:RP(m.value)?s.jsx(s.Fragment,{children:d}):c})});hP.displayName=uP;var Q8="SelectIcon",fP=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return s.jsx(Ze.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});fP.displayName=Q8;var X8="SelectPortal",mP=e=>s.jsx(jg,{asChild:!0,...e});mP.displayName=X8;var ql="SelectContent",pP=b.forwardRef((e,t)=>{const n=Bo(ql,e.__scopeSelect),[r,i]=b.useState();if(Us(()=>{i(new DocumentFragment)},[]),!n.open){const c=r;return c?Id.createPortal(s.jsx(gP,{scope:e.__scopeSelect,children:s.jsx(Cg.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),c):null}return s.jsx(xP,{...e,ref:t})});pP.displayName=ql;var Ir=10,[gP,zo]=qd(ql),J8="SelectContentImpl",e$=Wl("SelectContent.RemoveScroll"),xP=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:d,side:h,sideOffset:m,align:x,alignOffset:p,arrowPadding:g,collisionBoundary:w,collisionPadding:N,sticky:j,hideWhenDetached:_,avoidCollisions:C,...A}=e,M=Bo(ql,n),[E,D]=b.useState(null),[I,z]=b.useState(null),H=gt(t,he=>D(he)),[V,Q]=b.useState(null),[J,le]=b.useState(null),xe=Pg(n),[Me,ke]=b.useState(!1),He=b.useRef(!1);b.useEffect(()=>{if(E)return kb(E)},[E]),xb();const ye=b.useCallback(he=>{const[Re,...qe]=xe().map(ct=>ct.ref.current),[Je]=qe.slice(-1),ht=document.activeElement;for(const ct of he)if(ct===ht||(ct==null||ct.scrollIntoView({block:"nearest"}),ct===Re&&I&&(I.scrollTop=0),ct===Je&&I&&(I.scrollTop=I.scrollHeight),ct==null||ct.focus(),document.activeElement!==ht))return},[xe,I]),_e=b.useCallback(()=>ye([V,E]),[ye,V,E]);b.useEffect(()=>{Me&&_e()},[Me,_e]);const{onOpenChange:B,triggerPointerDownPosRef:ce}=M;b.useEffect(()=>{if(E){let he={x:0,y:0};const Re=Je=>{var ht,ct;he={x:Math.abs(Math.round(Je.pageX)-(((ht=ce.current)==null?void 0:ht.x)??0)),y:Math.abs(Math.round(Je.pageY)-(((ct=ce.current)==null?void 0:ct.y)??0))}},qe=Je=>{he.x<=10&&he.y<=10?Je.preventDefault():E.contains(Je.target)||B(!1),document.removeEventListener("pointermove",Re),ce.current=null};return ce.current!==null&&(document.addEventListener("pointermove",Re),document.addEventListener("pointerup",qe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Re),document.removeEventListener("pointerup",qe,{capture:!0})}}},[E,B,ce]),b.useEffect(()=>{const he=()=>B(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[B]);const[ne,U]=LP(he=>{const Re=xe().filter(ht=>!ht.disabled),qe=Re.find(ht=>ht.ref.current===document.activeElement),Je=DP(Re,he,qe);Je&&setTimeout(()=>Je.ref.current.focus())}),ie=b.useCallback((he,Re,qe)=>{const Je=!He.current&&!qe;(M.value!==void 0&&M.value===Re||Je)&&(Q(he),Je&&(He.current=!0))},[M.value]),je=b.useCallback(()=>E==null?void 0:E.focus(),[E]),be=b.useCallback((he,Re,qe)=>{const Je=!He.current&&!qe;(M.value!==void 0&&M.value===Re||Je)&&le(he)},[M.value]),Se=r==="popper"?l0:yP,Ne=Se===l0?{side:h,sideOffset:m,align:x,alignOffset:p,arrowPadding:g,collisionBoundary:w,collisionPadding:N,sticky:j,hideWhenDetached:_,avoidCollisions:C}:{};return s.jsx(gP,{scope:n,content:E,viewport:I,onViewportChange:z,itemRefCallback:ie,selectedItem:V,onItemLeave:je,itemTextRefCallback:be,focusSelectedItem:_e,selectedItemText:J,position:r,isPositioned:Me,searchRef:ne,children:s.jsx(kg,{as:e$,allowPinchZoom:!0,children:s.jsx(gg,{asChild:!0,trapped:M.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:Oe(i,he=>{var Re;(Re=M.trigger)==null||Re.focus({preventScroll:!0}),he.preventDefault()}),children:s.jsx(pg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>M.onOpenChange(!1),children:s.jsx(Se,{role:"listbox",id:M.contentId,"data-state":M.open?"open":"closed",dir:M.dir,onContextMenu:he=>he.preventDefault(),...A,...Ne,onPlaced:()=>ke(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:Oe(A.onKeyDown,he=>{const Re=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!Re&&he.key.length===1&&U(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Je=xe().filter(ht=>!ht.disabled).map(ht=>ht.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Je=Je.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const ht=he.target,ct=Je.indexOf(ht);Je=Je.slice(ct+1)}setTimeout(()=>ye(Je)),he.preventDefault()}})})})})})})});xP.displayName=J8;var t$="SelectItemAlignedPosition",yP=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,c=Bo(ql,n),d=zo(ql,n),[h,m]=b.useState(null),[x,p]=b.useState(null),g=gt(t,H=>p(H)),w=Pg(n),N=b.useRef(!1),j=b.useRef(!0),{viewport:_,selectedItem:C,selectedItemText:A,focusSelectedItem:M}=d,E=b.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&x&&_&&C&&A){const H=c.trigger.getBoundingClientRect(),V=x.getBoundingClientRect(),Q=c.valueNode.getBoundingClientRect(),J=A.getBoundingClientRect();if(c.dir!=="rtl"){const ht=J.left-V.left,ct=Q.left-ht,cs=H.left-ct,Vs=H.width+cs,Nr=Math.max(Vs,V.width),Sr=window.innerWidth-Ir,An=r1(ct,[Ir,Math.max(Ir,Sr-Nr)]);h.style.minWidth=Vs+"px",h.style.left=An+"px"}else{const ht=V.right-J.right,ct=window.innerWidth-Q.right-ht,cs=window.innerWidth-H.right-ct,Vs=H.width+cs,Nr=Math.max(Vs,V.width),Sr=window.innerWidth-Ir,An=r1(ct,[Ir,Math.max(Ir,Sr-Nr)]);h.style.minWidth=Vs+"px",h.style.right=An+"px"}const le=w(),xe=window.innerHeight-Ir*2,Me=_.scrollHeight,ke=window.getComputedStyle(x),He=parseInt(ke.borderTopWidth,10),ye=parseInt(ke.paddingTop,10),_e=parseInt(ke.borderBottomWidth,10),B=parseInt(ke.paddingBottom,10),ce=He+ye+Me+B+_e,ne=Math.min(C.offsetHeight*5,ce),U=window.getComputedStyle(_),ie=parseInt(U.paddingTop,10),je=parseInt(U.paddingBottom,10),be=H.top+H.height/2-Ir,Se=xe-be,Ne=C.offsetHeight/2,he=C.offsetTop+Ne,Re=He+ye+he,qe=ce-Re;if(Re<=be){const ht=le.length>0&&C===le[le.length-1].ref.current;h.style.bottom="0px";const ct=x.clientHeight-_.offsetTop-_.offsetHeight,cs=Math.max(Se,Ne+(ht?je:0)+ct+_e),Vs=Re+cs;h.style.height=Vs+"px"}else{const ht=le.length>0&&C===le[0].ref.current;h.style.top="0px";const cs=Math.max(be,He+_.offsetTop+(ht?ie:0)+Ne)+qe;h.style.height=cs+"px",_.scrollTop=Re-be+_.offsetTop}h.style.margin=`${Ir}px 0`,h.style.minHeight=ne+"px",h.style.maxHeight=xe+"px",r==null||r(),requestAnimationFrame(()=>N.current=!0)}},[w,c.trigger,c.valueNode,h,x,_,C,A,c.dir,r]);Us(()=>E(),[E]);const[D,I]=b.useState();Us(()=>{x&&I(window.getComputedStyle(x).zIndex)},[x]);const z=b.useCallback(H=>{H&&j.current===!0&&(E(),M==null||M(),j.current=!1)},[E,M]);return s.jsx(n$,{scope:n,contentWrapper:h,shouldExpandOnScrollRef:N,onScrollButtonChange:z,children:s.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:s.jsx(Ze.div,{...i,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});yP.displayName=t$;var s$="SelectPopperPosition",l0=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ir,...c}=e,d=Tg(n);return s.jsx(QC,{...d,...c,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});l0.displayName=s$;var[n$,Cb]=qd(ql,{}),c0="SelectViewport",vP=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,c=zo(c0,n),d=Cb(c0,n),h=gt(t,c.onViewportChange),m=b.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(Cg.Slot,{scope:n,children:s.jsx(Ze.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Oe(i.onScroll,x=>{const p=x.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=d;if(w!=null&&w.current&&g){const N=Math.abs(m.current-p.scrollTop);if(N>0){const j=window.innerHeight-Ir*2,_=parseFloat(g.style.minHeight),C=parseFloat(g.style.height),A=Math.max(_,C);if(A<j){const M=A+N,E=Math.min(j,M),D=M-E;g.style.height=E+"px",g.style.bottom==="0px"&&(p.scrollTop=D>0?D:0,g.style.justifyContent="flex-end")}}}m.current=p.scrollTop})})})]})});vP.displayName=c0;var bP="SelectGroup",[r$,i$]=qd(bP),a$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=xr();return s.jsx(r$,{scope:n,id:i,children:s.jsx(Ze.div,{role:"group","aria-labelledby":i,...r,ref:t})})});a$.displayName=bP;var wP="SelectLabel",_P=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=i$(wP,n);return s.jsx(Ze.div,{id:i.id,...r,ref:t})});_P.displayName=wP;var Lp="SelectItem",[o$,jP]=qd(Lp),NP=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:c,...d}=e,h=Bo(Lp,n),m=zo(Lp,n),x=h.value===r,[p,g]=b.useState(c??""),[w,N]=b.useState(!1),j=gt(t,M=>{var E;return(E=m.itemRefCallback)==null?void 0:E.call(m,M,r,i)}),_=xr(),C=b.useRef("touch"),A=()=>{i||(h.onValueChange(r),h.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(o$,{scope:n,value:r,disabled:i,textId:_,isSelected:x,onItemTextChange:b.useCallback(M=>{g(E=>E||((M==null?void 0:M.textContent)??"").trim())},[]),children:s.jsx(Cg.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:s.jsx(Ze.div,{role:"option","aria-labelledby":_,"data-highlighted":w?"":void 0,"aria-selected":x&&w,"data-state":x?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...d,ref:j,onFocus:Oe(d.onFocus,()=>N(!0)),onBlur:Oe(d.onBlur,()=>N(!1)),onClick:Oe(d.onClick,()=>{C.current!=="mouse"&&A()}),onPointerUp:Oe(d.onPointerUp,()=>{C.current==="mouse"&&A()}),onPointerDown:Oe(d.onPointerDown,M=>{C.current=M.pointerType}),onPointerMove:Oe(d.onPointerMove,M=>{var E;C.current=M.pointerType,i?(E=m.onItemLeave)==null||E.call(m):C.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(d.onPointerLeave,M=>{var E;M.currentTarget===document.activeElement&&((E=m.onItemLeave)==null||E.call(m))}),onKeyDown:Oe(d.onKeyDown,M=>{var D;((D=m.searchRef)==null?void 0:D.current)!==""&&M.key===" "||(Y8.includes(M.key)&&A(),M.key===" "&&M.preventDefault())})})})})});NP.displayName=Lp;var ch="SelectItemText",SP=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...c}=e,d=Bo(ch,n),h=zo(ch,n),m=jP(ch,n),x=K8(ch,n),[p,g]=b.useState(null),w=gt(t,A=>g(A),m.onItemTextChange,A=>{var M;return(M=h.itemTextRefCallback)==null?void 0:M.call(h,A,m.value,m.disabled)}),N=p==null?void 0:p.textContent,j=b.useMemo(()=>s.jsx("option",{value:m.value,disabled:m.disabled,children:N},m.value),[m.disabled,m.value,N]),{onNativeOptionAdd:_,onNativeOptionRemove:C}=x;return Us(()=>(_(j),()=>C(j)),[_,C,j]),s.jsxs(s.Fragment,{children:[s.jsx(Ze.span,{id:m.textId,...c,ref:w}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Id.createPortal(c.children,d.valueNode):null]})});SP.displayName=ch;var kP="SelectItemIndicator",CP=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jP(kP,n).isSelected?s.jsx(Ze.span,{"aria-hidden":!0,...r,ref:t}):null});CP.displayName=kP;var d0="SelectScrollUpButton",PP=b.forwardRef((e,t)=>{const n=zo(d0,e.__scopeSelect),r=Cb(d0,e.__scopeSelect),[i,c]=b.useState(!1),d=gt(t,r.onScrollButtonChange);return Us(()=>{if(n.viewport&&n.isPositioned){let h=function(){const x=m.scrollTop>0;c(x)};const m=n.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?s.jsx(EP,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=n;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null});PP.displayName=d0;var u0="SelectScrollDownButton",TP=b.forwardRef((e,t)=>{const n=zo(u0,e.__scopeSelect),r=Cb(u0,e.__scopeSelect),[i,c]=b.useState(!1),d=gt(t,r.onScrollButtonChange);return Us(()=>{if(n.viewport&&n.isPositioned){let h=function(){const x=m.scrollHeight-m.clientHeight,p=Math.ceil(m.scrollTop)<x;c(p)};const m=n.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?s.jsx(EP,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=n;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null});TP.displayName=u0;var EP=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,c=zo("SelectScrollButton",n),d=b.useRef(null),h=Pg(n),m=b.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return b.useEffect(()=>()=>m(),[m]),Us(()=>{var p;const x=h().find(g=>g.ref.current===document.activeElement);(p=x==null?void 0:x.ref.current)==null||p.scrollIntoView({block:"nearest"})},[h]),s.jsx(Ze.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Oe(i.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(r,50))}),onPointerMove:Oe(i.onPointerMove,()=>{var x;(x=c.onItemLeave)==null||x.call(c),d.current===null&&(d.current=window.setInterval(r,50))}),onPointerLeave:Oe(i.onPointerLeave,()=>{m()})})}),l$="SelectSeparator",AP=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(Ze.div,{"aria-hidden":!0,...r,ref:t})});AP.displayName=l$;var h0="SelectArrow",c$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Tg(n),c=Bo(h0,n),d=zo(h0,n);return c.open&&d.position==="popper"?s.jsx(XC,{...i,...r,ref:t}):null});c$.displayName=h0;var d$="SelectBubbleInput",MP=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=b.useRef(null),c=gt(r,i),d=Ng(t);return b.useEffect(()=>{const h=i.current;if(!h)return;const m=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(d!==t&&p){const g=new Event("change",{bubbles:!0});p.call(h,t),h.dispatchEvent(g)}},[d,t]),s.jsx(Ze.select,{...n,style:{...JC,...n.style},ref:c,defaultValue:t})});MP.displayName=d$;function RP(e){return e===""||e===void 0}function LP(e){const t=Ni(e),n=b.useRef(""),r=b.useRef(0),i=b.useCallback(d=>{const h=n.current+d;t(h),(function m(x){n.current=x,window.clearTimeout(r.current),x!==""&&(r.current=window.setTimeout(()=>m(""),1e3))})(h)},[t]),c=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,c]}function DP(e,t,n){const i=t.length>1&&Array.from(t).every(x=>x===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let d=u$(e,Math.max(c,0));i.length===1&&(d=d.filter(x=>x!==n));const m=d.find(x=>x.textValue.toLowerCase().startsWith(i.toLowerCase()));return m!==n?m:void 0}function u$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h$=lP,OP=dP,f$=hP,m$=fP,p$=mP,IP=pP,g$=vP,FP=_P,BP=NP,x$=SP,y$=CP,zP=PP,$P=TP,UP=AP;const ts=h$,ss=f$,qt=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(OP,{ref:r,className:We("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(m$,{asChild:!0,children:s.jsx(pr,{className:"h-4 w-4 opacity-50"})})]}));
497qt.displayName=OP.displayName;const VP=b.forwardRef(({className:e,...t},n)=>s.jsx(zP,{ref:n,className:We("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(pi,{className:"h-4 w-4"})}));VP.displayName=zP.displayName;const WP=b.forwardRef(({className:e,...t},n)=>s.jsx($P,{ref:n,className:We("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(pr,{className:"h-4 w-4"})}));WP.displayName=$P.displayName;const Gt=b.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>s.jsx(p$,{children:s.jsxs(IP,{ref:i,className:We("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(VP,{}),s.jsx(g$,{className:We("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(WP,{})]})}));Gt.displayName=IP.displayName;const v$=b.forwardRef(({className:e,...t},n)=>s.jsx(FP,{ref:n,className:We("px-2 py-1.5 text-sm font-semibold",e),...t}));v$.displayName=FP.displayName;const Ge=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(BP,{ref:r,className:We("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(y$,{children:s.jsx(Ld,{className:"h-4 w-4"})})}),s.jsx(x$,{children:t})]}));Ge.displayName=BP.displayName;const b$=b.forwardRef(({className:e,...t},n)=>s.jsx(UP,{ref:n,className:We("-mx-1 my-1 h-px bg-muted",e),...t}));b$.displayName=UP.displayName;function w$(){const[e,t]=b.useState({partnerName:"",city:"",businessType:"hotel"}),[n,r]=b.useState(null),[i,c]=b.useState(!1),d=async()=>{if(!e.partnerName||!e.city){Xe.error("Please fill in partner name and city");return}c(!0);try{const{data:m}=await X.functions.invoke("analyzePartnerData",{action:"generate_outreach",...e});r(m)}catch(m){console.error("Error generating message:",m),Xe.error("Failed to generate message")}finally{c(!1)}},h=m=>{navigator.clipboard.writeText(m),Xe.success("Copied to clipboard")};return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Sp,{className:"w-5 h-5 text-blue-600"}),"AI Outreach Generator"]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"partnerName",children:"Partner/Business Name"}),s.jsx(de,{id:"partnerName",placeholder:"e.g., Sunset Hotel Miami",value:e.partnerName,onChange:m=>t({...e,partnerName:m.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"city",children:"City/Location"}),s.jsx(de,{id:"city",placeholder:"e.g., Miami, FL",value:e.city,onChange:m=>t({...e,city:m.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"businessType",children:"Business Type"}),s.jsxs(ts,{value:e.businessType,onValueChange:m=>t({...e,businessType:m}),children:[s.jsx(qt,{id:"businessType",children:s.jsx(ss,{})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"hotel",children:"Hotel"}),s.jsx(Ge,{value:"restaurant",children:"Restaurant"}),s.jsx(Ge,{value:"retail_store",children:"Retail Store"}),s.jsx(Ge,{value:"office",children:"Office/Coworking"}),s.jsx(Ge,{value:"storage_facility",children:"Storage Facility"}),s.jsx(Ge,{value:"other",children:"Other"})]})]})]}),s.jsx(G,{onClick:d,disabled:i,className:"w-full bg-blue-600 hover:bg-blue-700",children:i?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Il,{className:"w-4 h-4 mr-2"}),"Generate Outreach Message"]})}),n&&s.jsxs("div",{className:"space-y-3 mt-6 pt-6 border-t",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(te,{className:"text-base font-semibold",children:"Subject"}),s.jsx(G,{size:"sm",variant:"ghost",onClick:()=>h(n.subject),children:s.jsx(ap,{className:"w-4 h-4"})})]}),s.jsx("div",{className:"bg-gray-50 p-3 rounded-lg",children:s.jsx("p",{className:"font-medium",children:n.subject})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(te,{className:"text-base font-semibold",children:"Message"}),s.jsx(G,{size:"sm",variant:"ghost",onClick:()=>h(n.body),children:s.jsx(ap,{className:"w-4 h-4"})})]}),s.jsx(Os,{value:n.body,onChange:m=>r({...n,body:m.target.value}),className:"min-h-[200px] bg-gray-50"})]}),s.jsxs(G,{variant:"outline",className:"w-full",onClick:()=>h(`Subject: ${n.subject}
498
499${n.body}`),children:[s.jsx(ap,{className:"w-4 h-4 mr-2"}),"Copy Complete Email"]})]})]})]})}function _$(){const[e,t]=b.useState([]),[n,r]=b.useState(""),[i,c]=b.useState(null),[d,h]=b.useState(!1);b.useEffect(()=>{m()},[]);const m=async()=>{try{const g=(await X.asServiceRole.entities.User.list("-created_date",1e3)).filter(w=>w.partner_status==="approved");t(g)}catch(p){console.error("Error loading partners:",p)}},x=async()=>
499{if(n){h(!0);try{const{data:p}=await X.functions.invoke("analyzePartnerData",{action:"analyze_performance",partnerId:n});c(p)}catch(p){console.error("Error analyzing partner:",p),Xe.error("Failed to analyze partner")}finally{h(!1)}}};return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(eg,{className:"w-5 h-5 text-green-600"}),"Partner Performance Analysis"]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsx("div",{children:s.jsxs(ts,{value:n,onValueChange:r,children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"Select a partner to analyze"})}),s.jsx(Gt,{children:e.map(p=>s.jsxs(Ge,{value:p.id,children:[p.full_name," (",p.email,")"]},p.id))})]})}),s.jsx(G,{onClick:x,disabled:!n||d,className:"w-full bg-green-600 hover:bg-green-700",children:d?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Il,{className:"w-4 h-4 mr-2"}),"Analyze Performance"]})}),i&&s.jsxs("div",{className:"space-y-4 mt-6 pt-6 border-t",children:[s.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Overall Assessment"}),s.jsx("p",{className:"text-gray-700",children:i.assessment})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(ms,{className:"w-5 h-5 text-green-600"}),"Strengths"]}),s.jsx("ul",{className:"space-y-2",children:i.strengths.map((p,g)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ot,{className:"bg-green-100 text-green-800 mt-0.5",children:"✓"}),s.jsx("span",{className:"text-gray-700",children:p})]},g))})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(fn,{className:"w-5 h-5 text-orange-600"}),"Areas for Improvement"]}),s.jsx("ul",{className:"space-y-2",children:i.improvements.map((p,g)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ot,{className:"bg-orange-100 text-orange-800 mt-0.5",children:"!"}),s.jsx("span",{className:"text-gray-700",children:p})]},g))})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(Ci,{className:"w-5 h-5 text-blue-600"}),"Recommendations"]}),s.jsx("ul",{className:"space-y-2",children:i.recommendations.map((p,g)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsxs("span",{className:"text-blue-600 font-bold mt-0.5",children:[g+1,"."]}),s.jsx("span",{className:"text-gray-700",children:p})]},g))})]}),s.jsxs("div",{className:"bg-purple-50 p-4 rounded-lg",children:[s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Growth Potential"}),s.jsx("p",{className:"text-gray-700",children:i.growthPotential})]})]})]})]})}//! moment.js
500//! version : 2.30.1
501//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
502//! license : MIT
503//! momentjs.com
504var HP;function Ee(){return HP.apply(null,arguments)}function j$(e){HP=e}function Hr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Bl(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Pt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pb(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Pt(e,t))return!1;return!0}function jn(e){return e===void 0}function ba(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function nf(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function YP(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function jo(e,t){for(var n in t)Pt(t,n)&&(e[n]=t[n]);return Pt(t,"toString")&&(e.toString=t.toString),Pt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Ti(e,t,n,r){return pT(e,t,n,r,!0).utc()}function N$(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meri
vendor: 32,082 bytes, lines 504-507
504diem:null,rfc2822:!1,weekdayMismatch:!1}}function ft(e){return e._pf==null&&(e._pf=N$()),e._pf}var f0;Array.prototype.some?f0=Array.prototype.some:f0=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Tb(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=ft(e),n=f0.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function Eg(e){var t=Ti(NaN);return e!=null?jo(ft(t),e):ft(t).userInvalidated=!0,t}var P1=Ee.momentProperties=[],rv=!1;function Eb(e,t){var n,r,i,c=P1.length;if(jn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),jn(t._i)||(e._i=t._i),jn(t._f)||(e._f=t._f),jn(t._l)||(e._l=t._l),jn(t._strict)||(e._strict=t._strict),jn(t._tzm)||(e._tzm=t._tzm),jn(t._isUTC)||(e._isUTC=t._isUTC),jn(t._offset)||(e._offset=t._offset),jn(t._pf)||(e._pf=ft(t)),jn(t._locale)||(e._locale=t._locale),c>0)for(n=0;n<c;n++)r=P1[n],i=t[r],jn(i)||(e[r]=i);return e}function rf(e){Eb(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),rv===!1&&(rv=!0,Ee.updateOffset(this),rv=!1)}function Yr(e){return e instanceof rf||e!=null&&e._isAMomentObject!=null}function qP(e){Ee.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function _r(e,t){var n=!0;return jo(function(){if(Ee.deprecationHandler!=null&&Ee.deprecationHandler(null,e),n){var r=[],i,c,d,h=arguments.length;for(c=0;c<h;c++){if(i="",typeof arguments[c]=="object"){i+=`
505[`+c+"] ";for(d in arguments[0])Pt(arguments[0],d)&&(i+=d+": "+arguments[0][d]+", ");i=i.slice(0,-2)}else i=arguments[c];r.push(i)}qP(e+`
506Arguments: `+Array.prototype.slice.call(r).join("")+`
507`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var T1={};function GP(e,t){Ee.deprecationHandler!=null&&Ee.deprecationHandler(e,t),T1[e]||(qP(t),T1[e]=!0)}Ee.suppressDeprecationWarnings=!1;Ee.deprecationHandler=null;function Ei(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function S$(e){var t,n;for(n in e)Pt(e,n)&&(t=e[n],Ei(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function m0(e,t){var n=jo({},e),r;for(r in t)Pt(t,r)&&(Bl(e[r])&&Bl(t[r])?(n[r]={},jo(n[r],e[r]),jo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)Pt(e,r)&&!Pt(t,r)&&Bl(e[r])&&(n[r]=jo({},n[r]));return n}function Ab(e){e!=null&&this.set(e)}var p0;Object.keys?p0=Object.keys:p0=function(e){var t,n=[];for(t in e)Pt(e,t)&&n.push(t);return n};var k$={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function C$(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Ei(r)?r.call(t,n):r}function ki(e,t,n){var r=""+Math.abs(e),i=t-r.length,c=e>=0;return(c?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Mb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qm=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,iv={},ud={};function Ke(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(ud[e]=i),t&&(ud[t[0]]=function(){return ki(i.apply(this,arguments),t[1],t[2])}),n&&(ud[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function P$(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function T$(e){var t=e.match(Mb),n,r;for(n=0,r=t.length;n<r;n++)ud[t[n]]?t[n]=ud[t[n]]:t[n]=P$(t[n]);return function(i){var c="",d;for(d=0;d<r;d++)c+=Ei(t[d])?t[d].call(i,e):t[d];return c}}function yp(e,t){return e.isValid()?(t=ZP(t,e.localeData()),iv[t]=iv[t]||T$(t),iv[t](e)):e.localeData().invalidDate()}function ZP(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(Qm.lastIndex=0;n>=0&&Qm.test(e);)e=e.replace(Qm,r),Qm.lastIndex=0,n-=1;return e}var E$={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function A$(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Mb).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var M$="Invalid date";function R$(){return this._invalidDate}var L$="%d",D$=/\d{1,2}/;function O$(e){return this._ordinal.replace("%d",e)}var I$={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function F$(e,t,n,r){var i=this._relativeTime[n];return Ei(i)?i(e,t,n,r):i.replace(/%d/i,e)}function B$(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ei(n)?n(t):n.replace(/%s/i,t)}var E1={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function jr(e){return typeof e=="string"?E1[e]||E1[e.toLowerCase()]:void 0}function Rb(e){var t={},n,r;for(r in e)Pt(e,r)&&(n=jr(r),n&&(t[n]=e[r]));return t}var z$={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function $$(e){var t=[],n;for(n in e)Pt(e,n)&&t.push({unit:n,priority:z$[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var KP=/\d/,Gn=/\d\d/,QP=/\d{3}/,Lb=/\d{4}/,Ag=/[+-]?\d{6}/,Qt=/\d\d?/,XP=/\d\d\d\d?/,JP=/\d\d\d\d\d\d?/,Mg=/\d{1,3}/,Db=/\d{1,4}/,Rg=/[+-]?\d{1,6}/,Gd=/\d+/,Lg=/[+-]?\d+/,U$=/Z|[+-]\d\d:?\d\d/gi,Dg=/Z|[+-]\d\d(?::?\d\d)?/gi,V$=/[+-]?\d+(\.\d{1,3})?/,af=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Zd=/^[1-9]\d?/,Ob=/^([1-9]\d|\d)/,Dp;Dp={};function Ie(e,t,n){Dp[e]=Ei(t)?t:function(r,i){return r&&n?n:t}}function W$(e,t){return Pt(Dp,e)?Dp[e](t._strict,t._locale):new RegExp(H$(e))}function H$(e){return ma(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,c){return n||r||i||c}))}function ma(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function mr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function yt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=mr(t)),n}var g0={};function Ft(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),ba(t)&&(r=function(c,d){d[t]=yt(c)}),i=e.length,n=0;n<i;n++)g0[e[n]]=r}function of(e,t){Ft(e,function(n,r,i,c){i._w=i._w||{},t(n,i._w,i,c)})}function Y$(e,t,n){t!=null&&Pt(g0,e)&&g0[e](t,n._a,n,e)}function Og(e){return e%4===0&&e%100!==0||e%400===0}var nn=0,ua=1,xi=2,Ps=3,Ur=4,ha=5,Sl=6,q$=7,G$=8;Ke("Y",0,0,function(){var e=this.year();return e<=9999?ki(e,4):"+"+e});Ke(0,["YY",2],0,function(){return this.year()%100});Ke(0,["YYYY",4],0,"year");Ke(0,["YYYYY",5],0,"year");Ke(0,["YYYYYY",6,!0],0,"year");Ie("Y",Lg);Ie("YY",Qt,Gn);Ie("YYYY",Db,Lb);Ie("YYYYY",Rg,Ag);Ie("YYYYYY",Rg,Ag);Ft(["YYYYY","YYYYYY"],nn);Ft("YYYY",function(e,t){t[nn]=e.length===2?Ee.parseTwoDigitYear(e):yt(e)});Ft("YY",function(e,t){t[nn]=Ee.parseTwoDigitYear(e)});Ft("Y",function(e,t){t[nn]=parseInt(e,10)});function yh(e){return Og(e)?366:365}Ee.parseTwoDigitYear=function(e){return yt(e)+(yt(e)>68?1900:2e3)};var eT=Kd("FullYear",!0);function Z$(){return Og(this.year())}function Kd(e,t){return function(n){return n!=null?(tT(this,e,n),Ee.updateOffset(this,t),this):Eh(this,e)}}function Eh(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function tT(e,t,n){var r,i,c,d,h;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}c=n,d=e.month(),h=e.date(),h=h===29&&d===1&&!Og(c)?28:h,i?r.setUTCFullYear(c,d,h):r.setFullYear(c,d,h)}}function K$(e){return e=jr(e),Ei(this[e])?this[e]():this}function Q$(e,t){if(typeof e=="object"){e=Rb(e);var n=$$(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=jr(e),Ei(this[e]))return this[e](t);return this}function X$(e,t){return(e%t+t)%t}var xs;Array.prototype.indexOf?xs=Array.prototype.indexOf:xs=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ib(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=X$(t,12);return e+=(t-n)/12,n===1?Og(e)?29:28:31-n%7%2}Ke("M",["MM",2],"Mo",function(){return this.month()+1});Ke("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Ke("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ie("M",Qt,Zd);Ie("MM",Qt,Gn);Ie("MMM",function(e,t){return t.monthsShortRegex(e)});Ie("MMMM",function(e,t){return t.monthsRegex(e)});Ft(["M","MM"],function(e,t){t[ua]=yt(e)-1});Ft(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[ua]=i:ft(n).invalidMonth=e});var J$="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),sT="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,e7=af,t7=af;function s7(e,t){return e?Hr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nT).test(t)?"format":"standalone"][e.month()]:Hr(this._months)?this._months:this._months.standalone}function n7(e,t){return e?Hr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nT.test(t)?"format":"standalone"][e.month()]:Hr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function r7(e,t,n){var r,i,c,d=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)c=Ti([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(c,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(c,"").toLocaleLowerCase();return n?t==="MMM"?(i=xs.call(this._shortMonthsParse,d),i!==-1?i:null):(i=xs.call(this._longMonthsParse,d),i!==-1?i:null):t==="MMM"?(i=xs.call(this._shortMonthsParse,d),i!==-1?i:(i=xs.call(this._longMonthsParse,d),i!==-1?i:null)):(i=xs.call(this._longMonthsParse,d),i!==-1?i:(i=xs.call(this._shortMonthsParse,d),i!==-1?i:null))}function i7(e,t,n){var r,i,c;if(this._monthsParseExact)return r7.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ti([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(c="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(c.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function rT(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=yt(t);else if(t=e.localeData().monthsParse(t),!ba(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Ib(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function iT(e){return e!=null?(rT(this,e),Ee.updateOffset(this,!0),this):Eh(this,"Month")}function a7(){return Ib(this.year(),this.month())}function o7(e){return this._monthsParseExact?(Pt(this,"_monthsRegex")||aT.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Pt(this,"_monthsShortRegex")||(this._monthsShortRegex=e7),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function l7(e){return this._monthsParseExact?(Pt(this,"_monthsRegex")||aT.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Pt(this,"_monthsRegex")||(this._monthsRegex=t7),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function aT(){function e(m,x){return x.length-m.length}var t=[],n=[],r=[],i,c,d,h;for(i=0;i<12;i++)c=Ti([2e3,i]),d=ma(this.monthsShort(c,"")),h=ma(this.months(c,"")),t.push(d),n.push(h),r.push(h),r.push(d);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function c7(e,t,n,r,i,c,d){var h;return e<100&&e>=0?(h=new Date(e+400,t,n,r,i,c,d),isFinite(h.getFullYear())&&h.setFullYear(e)):h=new Date(e,t,n,r,i,c,d),h}function Ah(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Op(e,t,n){var r=7+t-n,i=(7+Ah(e,0,r).getUTCDay()-t)%7;return-i+r-1}function oT(e,t,n,r,i){var c=(7+n-r)%7,d=Op(e,r,i),h=1+7*(t-1)+c+d,m,x;return h<=0?(m=e-1,x=yh(m)+h):h>yh(e)?(m=e+1,x=h-yh(e)):(m=e,x=h),{year:m,dayOfYear:x}}function Mh(e,t,n){var r=Op(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,c,d;return i<1?(d=e.year()-1,c=i+pa(d,t,n)):i>pa(e.year(),t,n)?(c=i-pa(e.year(),t,n),d=e.year()+1):(d=e.year(),c=i),{week:c,year:d}}function pa(e,t,n){var r=Op(e,t,n),i=Op(e+1,t,n);return(yh(e)-r+i)/7}Ke("w",["ww",2],"wo","week");Ke("W",["WW",2],"Wo","isoWeek");Ie("w",Qt,Zd);Ie("ww",Qt,Gn);Ie("W",Qt,Zd);Ie("WW",Qt,Gn);of(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=yt(e)});function d7(e){return Mh(e,this._week.dow,this._week.doy).week}var u7={dow:0,doy:6};function h7(){return this._week.dow}function f7(){return this._week.doy}function m7(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function p7(e){var t=Mh(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ke("d",0,"do","day");Ke("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ke("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ke("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ke("e",0,0,"weekday");Ke("E",0,0,"isoWeekday");Ie("d",Qt);Ie("e",Qt);Ie("E",Qt);Ie("dd",function(e,t){return t.weekdaysMinRegex(e)});Ie("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ie("dddd",function(e,t){return t.weekdaysRegex(e)});of(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ft(n).invalidWeekday=e});of(["d","e","E"],function(e,t,n,r){t[r]=yt(e)});function g7(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function x7(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Fb(e,t){return e.slice(t,7).concat(e.slice(0,t))}var y7="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lT="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),v7="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),b7=af,w7=af,_7=af;function j7(e,t){var n=Hr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Fb(n,this._week.dow):e?n[e.day()]:n}function N7(e){return e===!0?Fb(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function S7(e){return e===!0?Fb(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function k7(e,t,n){var r,i,c,d=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)c=Ti([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(c,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(c,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(c,"").toLocaleLowerCase();return n?t==="dddd"?(i=xs.call(this._weekdaysParse,d),i!==-1?i:null):t==="ddd"?(i=xs.call(this._shortWeekdaysParse,d),i!==-1?i:null):(i=xs.call(this._minWeekdaysParse,d),i!==-1?i:null):t==="dddd"?(i=xs.call(this._weekdaysParse,d),i!==-1||(i=xs.call(this._shortWeekdaysParse,d),i!==-1)?i:(i=xs.call(this._minWeekdaysParse,d),i!==-1?i:null)):t==="ddd"?(i=xs.call(this._shortWeekdaysParse,d),i!==-1||(i=xs.call(this._weekdaysParse,d),i!==-1)?i:(i=xs.call(this._minWeekdaysParse,d),i!==-1?i:null)):(i=xs.call(this._minWeekdaysParse,d),i!==-1||(i=xs.call(this._weekdaysParse,d),i!==-1)?i:(i=xs.call(this._shortWeekdaysParse,d),i!==-1?i:null))}function C7(e,t,n){var r,i,c;if(this._weekdaysParseExact)return k7.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ti([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(c="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(c.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function P7(e){if(!this.isValid())return e!=null?this:NaN;var t=Eh(this,"Day");return e!=null?(e=g7(e,this.localeData()),this.add(e-t,"d")):t}function T7(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function E7(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=x7(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function A7(e){return this._weekdaysParseExact?(Pt(this,"_weekdaysRegex")||Bb.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Pt(this,"_weekdaysRegex")||(this._weekdaysRegex=b7),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function M7(e){return this._weekdaysParseExact?(Pt(this,"_weekdaysRegex")||Bb.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Pt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=w7),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function R7(e){return this._weekdaysParseExact?(Pt(this,"_weekdaysRegex")||Bb.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Pt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_7),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Bb(){function e(p,g){return g.length-p.length}var t=[],n=[],r=[],i=[],c,d,h,m,x;for(c=0;c<7;c++)d=Ti([2e3,1]).day(c),h=ma(this.weekdaysMin(d,"")),m=ma(this.weekdaysShort(d,"")),x=ma(this.weekdays(d,"")),t.push(h),n.push(m),r.push(x),i.push(h),i.push(m),i.push(x);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function zb(){return this.hours()%12||12}function L7(){return this.hours()||24}Ke("H",["HH",2],0,"hour");Ke("h",["hh",2],0,zb);Ke("k",["kk",2],0,L7);Ke("hmm",0,0,function(){return""+zb.apply(this)+ki(this.minutes(),2)});Ke("hmmss",0,0,function(){return""+zb.apply(this)+ki(this.minutes(),2)+ki(this.seconds(),2)});Ke("Hmm",0,0,function(){return""+this.hours()+ki(this.minutes(),2)});Ke("Hmmss",0,0,function(){return""+this.hours()+ki(this.minutes(),2)+ki(this.seconds(),2)});function cT(e,t){Ke(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}cT("a",!0);cT("A",!1);function dT(e,t){return t._meridiemParse}Ie("a",dT);Ie("A",dT);Ie("H",Qt,Ob);Ie("h",Qt,Zd);Ie("k",Qt,Zd);Ie("HH",Qt,Gn);Ie("hh",Qt,Gn);Ie("kk",Qt,Gn);Ie("hmm",XP);Ie("hmmss",JP);Ie("Hmm",XP);Ie("Hmmss",JP);Ft(["H","HH"],Ps);Ft(["k","kk"],function(e,t,n){var r=yt(e);t[Ps]=r===24?0:r});Ft(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Ft(["h","hh"],function(e,t,n){t[Ps]=yt(e),ft(n).bigHour=!0});Ft("hmm",function(e,t,n){var r=e.length-2;t[Ps]=yt(e.substr(0,r)),t[Ur]=yt(e.substr(r)),ft(n).bigHour=!0});Ft("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ps]=yt(e.substr(0,r)),t[Ur]=yt(e.substr(r,2)),t[ha]=yt(e.substr(i)),ft(n).bigHour=!0});Ft("Hmm",function(e,t,n){var r=e.length-2;t[Ps]=yt(e.substr(0,r)),t[Ur]=yt(e.substr(r))});Ft("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ps]=yt(e.substr(0,r)),t[Ur]=yt(e.substr(r,2)),t[ha]=yt(e.substr(i))});function D7(e){return(e+"").toLowerCase().charAt(0)==="p"}var O7=/[ap]\.?m?\.?/i,I7=Kd("Hours",!0);function F7(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var uT={calendar:k$,longDateFormat:E$,invalidDate:M$,ordinal:L$,dayOfMonthOrdinalParse:D$,relativeTime:I$,months:J$,monthsShort:sT,week:u7,weekdays:y7,weekdaysMin:v7,weekdaysShort:lT,meridiemParse:O7},Jt={},Ju={},Rh;function B7(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function A1(e){return e&&e.toLowerCase().replace("_","-")}function z7(e){for(var t=0,n,r,i,c;t<e.length;){for(c=A1(e[t]).split("-"),n=c.length,r=A1(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=Ig(c.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&B7(c,r)>=n-1)break;n--}t++}return Rh}function $7(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ig(e){var t=null,n;if(Jt[e]===void 0&&typeof Np<"u"&&Np&&Np.exports&&$7(e))try{t=Rh._abbr,n=require,n("./locale/"+e),To(t)}catch{Jt[e]=null}return Jt[e]}function To(e,t){var n;return e&&(jn(t)?n=_a(e):n=$b(e,t),n?Rh=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Rh._abbr}function $b(e,t){if(t!==null){var n,r=uT;if(t.abbr=e,Jt[e]!=null)GP("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jt[e]._config;else if(t.parentLocale!=null)if(Jt[t.parentLocale]!=null)r=Jt[t.parentLocale]._config;else if(n=Ig(t.parentLocale),n!=null)r=n._config;else return Ju[t.parentLocale]||(Ju[t.parentLocale]=[]),Ju[t.parentLocale].push({name:e,config:t}),null;return Jt[e]=new Ab(m0(r,t)),Ju[e]&&Ju[e].forEach(function(i){$b(i.name,i.config)}),To(e),Jt[e]}else return delete Jt[e],null}function U7(e,t){if(t!=null){var n,r,i=uT;Jt[e]!=null&&Jt[e].parentLocale!=null?Jt[e].set(m0(Jt[e]._config,t)):(r=Ig(e),r!=null&&(i=r._config),t=m0(i,t),r==null&&(t.abbr=e),n=new Ab(t),n.parentLocale=Jt[e],Jt[e]=n),To(e)}else Jt[e]!=null&&(Jt[e].parentLocale!=null?(Jt[e]=Jt[e].parentLocale,e===To()&&To(e)):Jt[e]!=null&&delete Jt[e]);return Jt[e]}function _a(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Rh;if(!Hr(e)){if(t=Ig(e),t)return t;e=[e]}return z7(e)}function V7(){return p0(Jt)}function Ub(e){var t,n=e._a;return n&&ft(e).overflow===-2&&(t=n[ua]<0||n[ua]>11?ua:n[xi]<1||n[xi]>Ib(n[nn],n[ua])?xi:n[Ps]<0||n[Ps]>24||n[Ps]===24&&(n[Ur]!==0||n[ha]!==0||n[Sl]!==0)?Ps:n[Ur]<0||n[Ur]>59?Ur:n[ha]<0||n[ha]>59?ha:n[Sl]<0||n[Sl]>999?Sl:-1,ft(e)._overflowDayOfYear&&(t<nn||t>xi)&&(t=xi),ft(e)._overflowWeeks&&t===-1&&(t=q$),ft(e)._overflowWeekday&&t===-1&&(t=G$),ft(e).overflow=t),e}var W7=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,H7=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Y7=/Z|[+-]\d\d(?::?\d\d)?/,Xm=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],av=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],q7=/^\/?Date\((-?\d+)/i,G7=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Z7={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hT(e){var t,n,r=e._i,i=W7.exec(r)||H7.exec(r),c,d,h,m,x=Xm.length,p=av.length;if(i){for(ft(e).iso=!0,t=0,n=x;t<n;t++)if(Xm[t][1].exec(i[1])){d=Xm[t][0],c=Xm[t][2]!==!1;break}if(d==null){e._isValid=!1;return}if(i[3]){for(t=0,n=p;t<n;t++)if(av[t][1].exec(i[3])){h=(i[2]||" ")+av[t][0];break}if(h==null){e._isValid=!1;return}}if(!c&&h!=null){e._isValid=!1;return}if(i[4])if(Y7.exec(i[4]))m="Z";else{e._isValid=!1;return}e._f=d+(h||"")+(m||""),Wb(e)}else e._isValid=!1}function K7(e,t,n,r,i,c){var d=[Q7(e),sT.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return c&&d.push(parseInt(c,10)),d}function Q7(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function X7(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function J7(e,t,n){if(e){var r=lT.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return ft(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function eU(e,t,n){if(e)return Z7[e];if(t)return 0;var r=parseInt(n,10),i=r%100,c=(r-i)/100;return c*60+i}function fT(e){var t=G7.exec(X7(e._i)),n;if(t){if(n=K7(t[4],t[3],t[2],t[5],t[6],t[7]),!J7(t[1],n,e))return;e._a=n,e._tzm=eU(t[8],t[9],t[10]),e._d=Ah.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ft(e).rfc2822=!0}else e._isValid=!1}function tU(e){var t=q7.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(hT(e),e._isValid===!1)delete e._isValid;else return;if(fT(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Ee.createFromInputFallback(e)}Ee.createFromInputFallback=_r("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function td(e,t,n){return e??t??n}function sU(e){var t=new Date(Ee.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Vb(e){var t,n,r=[],i,c,d;if(!e._d){for(i=sU(e),e._w&&e._a[xi]==null&&e._a[ua]==null&&nU(e),e._dayOfYear!=null&&(d=td(e._a[nn],i[nn]),(e._dayOfYear>yh(d)||e._dayOfYear===0)&&(ft(e)._overflowDayOfYear=!0),n=Ah(d,0,e._dayOfYear),e._a[ua]=n.getUTCMonth(),e._a[xi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ps]===24&&e._a[Ur]===0&&e._a[ha]===0&&e._a[Sl]===0&&(e._nextDay=!0,e._a[Ps]=0),e._d=(e._useUTC?Ah:c7).apply(null,r),c=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ps]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==c&&(ft(e).weekdayMismatch=!0)}}function nU(e){var t,n,r,i,c,d,h,m,x;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(c=1,d=4,n=td(t.GG,e._a[nn],Mh(Kt(),1,4).year),r=td(t.W,1),i=td(t.E,1),(i<1||i>7)&&(m=!0)):(c=e._locale._week.dow,d=e._locale._week.doy,x=Mh(Kt(),c,d),n=td(t.gg,e._a[nn],x.year),r=td(t.w,x.week),t.d!=null?(i=t.d,(i<0||i>6)&&(m=!0)):t.e!=null?(i=t.e+c,(t.e<0||t.e>6)&&(m=!0)):i=c),r<1||r>pa(n,c,d)?ft(e)._overflowWeeks=!0:m!=null?ft(e)._overflowWeekday=!0:(h=oT(n,r,i,c,d),e._a[nn]=h.year,e._dayOfYear=h.dayOfYear)}Ee.ISO_8601=function(){};Ee.RFC_2822=function(){};function Wb(e){if(e._f===Ee.ISO_8601){hT(e);return}if(e._f===Ee.RFC_2822){fT(e);return}e._a=[],ft(e).empty=!0;var t=""+e._i,n,r,i,c,d,h=t.length,m=0,x,p;for(i=ZP(e._f,e._locale).match(Mb)||[],p=i.length,n=0;n<p;n++)c=i[n],r=(t.match(W$(c,e))||[])[0],r&&(d=t.substr(0,t.indexOf(r)),d.length>0&&ft(e).unusedInput.push(d),t=t.slice(t.indexOf(r)+r.length),m+=r.length),ud[c]?(r?ft(e).empty=!1:ft(e).unusedTokens.push(c),Y$(c,r,e)):e._strict&&!r&&ft(e).unusedTokens.push(c);ft(e).charsLeftOver=h-m,t.length>0&&ft(e).unusedInput.push(t),e._a[Ps]<=12&&ft(e).bigHour===!0&&e._a[Ps]>0&&(ft(e).bigHour=void 0),ft(e).parsedDateParts=e._a.slice(0),ft(e).meridiem=e._meridiem,e._a[Ps]=rU(e._locale,e._a[Ps],e._meridiem),x=ft(e).era,x!==null&&(e._a[nn]=e._locale.erasConvertYear(x,e._a[nn])),Vb(e),Ub(e)}function rU(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function iU(e){var t,n,r,i,c,d,h=!1,m=e._f.length;if(m===0){ft(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<m;i++)c=0,d=!1,t=Eb({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Wb(t),Tb(t)&&(d=!0),c+=ft(t).charsLeftOver,c+=ft(t).unusedTokens.length*10,ft(t).score=c,h?c<r&&(r=c,n=t):(r==null||c<r||d)&&(r=c,n=t,d&&(h=!0));jo(e,n||t)}function aU(e){if(!e._d){var t=Rb(e._i),n=t.day===void 0?t.date:t.day;e._a=YP([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Vb(e)}}function oU(e){var t=new rf(Ub(mT(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function mT(e){var t=e._i,n=e._f;return e._locale=e._locale||_a(e._l),t===null||n===void 0&&t===""?Eg({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Yr(t)?new rf(Ub(t)):(nf(t)?e._d=t:Hr(n)?iU(e):n?Wb(e):lU(e),Tb(e)||(e._d=null),e))}function lU(e){var t=e._i;jn(t)?e._d=new Date(Ee.now()):nf(t)?e._d=new Date(t.valueOf()):typeof t=="string"?tU(e):Hr(t)?(e._a=YP(t.slice(0),function(n){return parseInt(n,10)}),Vb(e)):Bl(t)?aU(e):ba(t)?e._d=new Date(t):Ee.createFromInputFallback(e)}function pT(e,t,n,r,i){var c={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Bl(e)&&Pb(e)||Hr(e)&&e.length===0)&&(e=void 0),c._isAMomentObject=!0,
vendor: 8,126 bytes, line 507
507c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=r,oU(c)}function Kt(e,t,n,r){return pT(e,t,n,r,!1)}var cU=_r("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Eg()}),dU=_r("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Eg()});function gT(e,t){var n,r;if(t.length===1&&Hr(t[0])&&(t=t[0]),!t.length)return Kt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function uU(){var e=[].slice.call(arguments,0);return gT("isBefore",e)}function hU(){var e=[].slice.call(arguments,0);return gT("isAfter",e)}var fU=function(){return Date.now?Date.now():+new Date},eh=["year","quarter","month","week","day","hour","minute","second","millisecond"];function mU(e){var t,n=!1,r,i=eh.length;for(t in e)if(Pt(e,t)&&!(xs.call(eh,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[eh[r]]){if(n)return!1;parseFloat(e[eh[r]])!==yt(e[eh[r]])&&(n=!0)}return!0}function pU(){return this._isValid}function gU(){return Gr(NaN)}function Fg(e){var t=Rb(e),n=t.year||0,r=t.quarter||0,i=t.month||0,c=t.week||t.isoWeek||0,d=t.day||0,h=t.hour||0,m=t.minute||0,x=t.second||0,p=t.millisecond||0;this._isValid=mU(t),this._milliseconds=+p+x*1e3+m*6e4+h*1e3*60*60,this._days=+d+c*7,this._months=+i+r*3+n*12,this._data={},this._locale=_a(),this._bubble()}function vp(e){return e instanceof Fg}function x0(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function xU(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),c=0,d;for(d=0;d<r;d++)yt(e[d])!==yt(t[d])&&c++;return c+i}function xT(e,t){Ke(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+ki(~~(n/60),2)+t+ki(~~n%60,2)})}xT("Z",":");xT("ZZ","");Ie("Z",Dg);Ie("ZZ",Dg);Ft(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Hb(Dg,e)});var yU=/([\+\-]|\d\d)/gi;function Hb(e,t){var n=(t||"").match(e),r,i,c;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(yU)||["-",0,0],c=+(i[1]*60)+yt(i[2]),c===0?0:i[0]==="+"?c:-c)}function Yb(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Yr(e)||nf(e)?e.valueOf():Kt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Ee.updateOffset(n,!1),n):Kt(e).local()}function y0(e){return-Math.round(e._d.getTimezoneOffset())}Ee.updateOffset=function(){};function vU(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Hb(Dg,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=y0(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?bT(this,Gr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Ee.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:y0(this)}function bU(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function wU(e){return this.utcOffset(0,e)}function _U(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(y0(this),"m")),this}function jU(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Hb(U$,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function NU(e){return this.isValid()?(e=e?Kt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function SU(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kU(){if(!jn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Eb(e,this),e=mT(e),e._a?(t=e._isUTC?Ti(e._a):Kt(e._a),this._isDSTShifted=this.isValid()&&xU(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function CU(){return this.isValid()?!this._isUTC:!1}function PU(){return this.isValid()?this._isUTC:!1}function yT(){return this.isValid()?this._isUTC&&this._offset===0:!1}var TU=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,EU=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gr(e,t){var n=e,r=null,i,c,d;return vp(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:ba(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=TU.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:yt(r[xi])*i,h:yt(r[Ps])*i,m:yt(r[Ur])*i,s:yt(r[ha])*i,ms:yt(x0(r[Sl]*1e3))*i}):(r=EU.exec(e))?(i=r[1]==="-"?-1:1,n={y:yl(r[2],i),M:yl(r[3],i),w:yl(r[4],i),d:yl(r[5],i),h:yl(r[6],i),m:yl(r[7],i),s:yl(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(d=AU(Kt(n.from),Kt(n.to)),n={},n.ms=d.milliseconds,n.M=d.months),c=new Fg(n),vp(e)&&Pt(e,"_locale")&&(c._locale=e._locale),vp(e)&&Pt(e,"_isValid")&&(c._isValid=e._isValid),c}Gr.fn=Fg.prototype;Gr.invalid=gU;function yl(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function M1(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function AU(e,t){var n;return e.isValid()&&t.isValid()?(t=Yb(t,e),e.isBefore(t)?n=M1(e,t):(n=M1(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function vT(e,t){return function(n,r){var i,c;return r!==null&&!isNaN(+r)&&(GP(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),c=n,n=r,r=c),i=Gr(n,r),bT(this,i,e),this}}function bT(e,t,n,r){var i=t._milliseconds,c=x0(t._days),d=x0(t._months);e.isValid()&&(r=r??!0,d&&rT(e,Eh(e,"Month")+d*n),c&&tT(e,"Date",Eh(e,"Date")+c*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&Ee.updateOffset(e,c||d))}var MU=vT(1,"add"),RU=vT(-1,"subtract");function wT(e){return typeof e=="string"||e instanceof String}function LU(e){return Yr(e)||nf(e)||wT(e)||ba(e)||OU(e)||DU(e)||e===null||e===void 0}function DU(e){var t=Bl(e)&&!Pb(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,c,d=r.length;for(i=0;i<d;i+=1)c=r[i],n=n||Pt(e,c);return t&&n}function OU(e){var t=Hr(e),n=!1;return t&&(n=e.filter(function(r){return!ba(r)&&wT(e)}).length===0),t&&n}function IU(e){var t=Bl(e)&&!Pb(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,c;for(i=0;i<r.length;i+=1)c=r[i],n=n||Pt(e,c);return t&&n}function FU(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function BU(e,t){arguments.length===1&&(arguments[0]?LU(arguments[0])?(e=arguments[0],t=void 0):IU(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Kt(),r=Yb(n,this).startOf("day"),i=Ee.calendarFormat(this,r)||"sameElse",c=t&&(Ei(t[i])?t[i].call(this,n):t[i]);return this.format(c||this.localeData().calendar(i,this,Kt(n)))}function zU(){return new rf(this)}function $U(e,t){var n=Yr(e)?e:Kt(e);return this.isValid()&&n.isValid()?(t=jr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function UU(e,t){var n=Yr(e)?e:Kt(e);return this.isValid()&&n.isValid()?(t=jr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function VU(e,t,n,r){var i=Yr(e)?e:Kt(e),c=Yr(t)?t:Kt(t);return this.isValid()&&i.isValid()&&c.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(c,n):!this.isAfter(c,n))):!1}function WU(e,t){var n=Yr(e)?e:Kt(e),r;return this.isValid()&&n.isValid()?(t=jr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function HU(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function YU(e,t){return this.isSame(e,t)||this.isBefore(e,t)}
vendor: 18,153 bytes, line 507
507function qU(e,t,n){var r,i,c;if(!this.isValid())return NaN;if(r=Yb(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=jr(t),t){case"year":c=bp(this,r)/12;break;case"month":c=bp(this,r);break;case"quarter":c=bp(this,r)/3;break;case"second":c=(this-r)/1e3;break;case"minute":c=(this-r)/6e4;break;case"hour":c=(this-r)/36e5;break;case"day":c=(this-r-i)/864e5;break;case"week":c=(this-r-i)/6048e5;break;default:c=this-r}return n?c:mr(c)}function bp(e,t){if(e.date()<t.date())return-bp(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,c;return t-r<0?(i=e.clone().add(n-1,"months"),c=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),c=(t-r)/(i-r)),-(n+c)||0}Ee.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Ee.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function GU(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ZU(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?yp(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ei(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",yp(n,"Z")):yp(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function KU(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,c;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",c=t+'[")]',this.format(n+r+i+c)}function QU(e){e||(e=this.isUtc()?Ee.defaultFormatUtc:Ee.defaultFormat);var t=yp(this,e);return this.localeData().postformat(t)}function XU(e,t){return this.isValid()&&(Yr(e)&&e.isValid()||Kt(e).isValid())?Gr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function JU(e){return this.from(Kt(),e)}function eV(e,t){return this.isValid()&&(Yr(e)&&e.isValid()||Kt(e).isValid())?Gr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function tV(e){return this.to(Kt(),e)}function _T(e){var t;return e===void 0?this._locale._abbr:(t=_a(e),t!=null&&(this._locale=t),this)}var jT=_r("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function NT(){return this._locale}var Ip=1e3,hd=60*Ip,Fp=60*hd,ST=(365*400+97)*24*Fp;function fd(e,t){return(e%t+t)%t}function kT(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ST:new Date(e,t,n).valueOf()}function CT(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ST:Date.UTC(e,t,n)}function sV(e){var t,n;if(e=jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?CT:kT,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fd(t+(this._isUTC?0:this.utcOffset()*hd),Fp);break;case"minute":t=this._d.valueOf(),t-=fd(t,hd);break;case"second":t=this._d.valueOf(),t-=fd(t,Ip);break}return this._d.setTime(t),Ee.updateOffset(this,!0),this}function nV(e){var t,n;if(e=jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?CT:kT,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Fp-fd(t+(this._isUTC?0:this.utcOffset()*hd),Fp)-1;break;case"minute":t=this._d.valueOf(),t+=hd-fd(t,hd)-1;break;case"second":t=this._d.valueOf(),t+=Ip-fd(t,Ip)-1;break}return this._d.setTime(t),Ee.updateOffset(this,!0),this}function rV(){return this._d.valueOf()-(this._offset||0)*6e4}function iV(){return Math.floor(this.valueOf()/1e3)}function aV(){return new Date(this.valueOf())}function oV(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function lV(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function cV(){return this.isValid()?this.toISOString():null}function dV(){return Tb(this)}function uV(){return jo({},ft(this))}function hV(){return ft(this).overflow}function fV(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ke("N",0,0,"eraAbbr");Ke("NN",0,0,"eraAbbr");Ke("NNN",0,0,"eraAbbr");Ke("NNNN",0,0,"eraName");Ke("NNNNN",0,0,"eraNarrow");Ke("y",["y",1],"yo","eraYear");Ke("y",["yy",2],0,"eraYear");Ke("y",["yyy",3],0,"eraYear");Ke("y",["yyyy",4],0,"eraYear");Ie("N",qb);Ie("NN",qb);Ie("NNN",qb);Ie("NNNN",NV);Ie("NNNNN",SV);Ft(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ft(n).era=i:ft(n).invalidEra=e});Ie("y",Gd);Ie("yy",Gd);Ie("yyy",Gd);Ie("yyyy",Gd);Ie("yo",kV);Ft(["y","yy","yyy","yyyy"],nn);Ft(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[nn]=n._locale.eraYearOrdinalParse(e,i):t[nn]=parseInt(e,10)});function mV(e,t){var n,r,i,c=this._eras||_a("en")._eras;for(n=0,r=c.length;n<r;++n){switch(typeof c[n].since){case"string":i=Ee(c[n].since).startOf("day"),c[n].since=i.valueOf();break}switch(typeof c[n].until){case"undefined":c[n].until=1/0;break;case"string":i=Ee(c[n].until).startOf("day").valueOf(),c[n].until=i.valueOf();break}}return c}function pV(e,t,n){var r,i,c=this.eras(),d,h,m;for(e=e.toUpperCase(),r=0,i=c.length;r<i;++r)if(d=c[r].name.toUpperCase(),h=c[r].abbr.toUpperCase(),m=c[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(h===e)return c[r];break;case"NNNN":if(d===e)return c[r];break;case"NNNNN":if(m===e)return c[r];break}else if([d,h,m].indexOf(e)>=0)return c[r]}function gV(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Ee(e.since).year():Ee(e.since).year()+(t-e.offset)*n}function xV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function yV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function vV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function bV(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-Ee(i[e].since).year())*n+i[e].offset;return this.year()}function wV(e){return Pt(this,"_erasNameRegex")||Gb.call(this),e?this._erasNameRegex:this._erasRegex}function _V(e){return Pt(this,"_erasAbbrRegex")||Gb.call(this),e?this._erasAbbrRegex:this._erasRegex}function jV(e){return Pt(this,"_erasNarrowRegex")||Gb.call(this),e?this._erasNarrowRegex:this._erasRegex}function qb(e,t){return t.erasAbbrRegex(e)}function NV(e,t){return t.erasNameRegex(e)}function SV(e,t){return t.erasNarrowRegex(e)}function kV(e,t){return t._eraYearOrdinalRegex||Gd}function Gb(){var e=[],t=[],n=[],r=[],i,c,d,h,m,x=this.eras();for(i=0,c=x.length;i<c;++i)d=ma(x[i].name),h=ma(x[i].abbr),m=ma(x[i].narrow),t.push(d),e.push(h),n.push(m),r.push(d),r.push(h),r.push(m);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Ke(0,["gg",2],0,function(){return this.weekYear()%100});Ke(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Bg(e,t){Ke(0,[e,e.length],0,t)}Bg("gggg","weekYear");Bg("ggggg","weekYear");Bg("GGGG","isoWeekYear");Bg("GGGGG","isoWeekYear");Ie("G",Lg);Ie("g",Lg);Ie("GG",Qt,Gn);Ie("gg",Qt,Gn);Ie("GGGG",Db,Lb);Ie("gggg",Db,Lb);Ie("GGGGG",Rg,Ag);Ie("ggggg",Rg,Ag);of(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=yt(e)});of(["gg","GG"],function(e,t,n,r){t[r]=Ee.parseTwoDigitYear(e)});function CV(e){return PT.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function PV(e){return PT.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function TV(){return pa(this.year(),1,4)}function EV(){return pa(this.isoWeekYear(),1,4)}function AV(){var e=this.localeData()._week;return pa(this.year(),e.dow,e.doy)}function MV(){var e=this.localeData()._week;return pa(this.weekYear(),e.dow,e.doy)}function PT(e,t,n,r,i){var c;return e==null?Mh(this,r,i).year:(c=pa(e,r,i),t>c&&(t=c),RV.call(this,e,t,n,r,i))}function RV(e,t,n,r,i){var c=oT(e,t,n,r,i),d=Ah(c.year,0,c.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}Ke("Q",0,"Qo","quarter");Ie("Q",KP);Ft("Q",function(e,t){t[ua]=(yt(e)-1)*3});function LV(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ke("D",["DD",2],"Do","date");Ie("D",Qt,Zd);Ie("DD",Qt,Gn);Ie("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Ft(["D","DD"],xi);Ft("Do",function(e,t){t[xi]=yt(e.match(Qt)[0])});var TT=Kd("Date",!0);Ke("DDD",["DDDD",3],"DDDo","dayOfYear");Ie("DDD",Mg);Ie("DDDD",QP);Ft(["DDD","DDDD"],function(e,t,n){n._dayOfYear=yt(e)});function DV(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ke("m",["mm",2],0,"minute");Ie("m",Qt,Ob);Ie("mm",Qt,Gn);Ft(["m","mm"],Ur);var OV=Kd("Minutes",!1);Ke("s",["ss",2],0,"second");Ie("s",Qt,Ob);Ie("ss",Qt,Gn);Ft(["s","ss"],ha);var IV=Kd("Seconds",!1);Ke("S",0,0,function(){return~~(this.millisecond()/100)});Ke(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ke(0,["SSS",3],0,"millisecond");Ke(0,["SSSS",4],0,function(){return this.millisecond()*10});Ke(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ke(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ke(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ke(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ke(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ie("S",Mg,KP);Ie("SS",Mg,Gn);Ie("SSS",Mg,QP);var No,ET;for(No="SSSS";No.length<=9;No+="S")Ie(No,Gd);function FV(e,t){t[Sl]=yt(("0."+e)*1e3)}for(No="S";No.length<=9;No+="S")Ft(No,FV);ET=Kd("Milliseconds",!1);Ke("z",0,0,"zoneAbbr");Ke("zz",0,0,"zoneName");function BV(){return this._isUTC?"UTC":""}function zV(){return this._isUTC?"Coordinated Universal Time":""}var ve=rf.prototype;ve.add=MU;ve.calendar=BU;ve.clone=zU;ve.diff=qU;ve.endOf=nV;ve.format=QU;ve.from=XU;ve.fromNow=JU;ve.to=eV;ve.toNow=tV;ve.get=K$;ve.invalidAt=hV;ve.isAfter=$U;ve.isBefore=UU;ve.isBetween=VU;ve.isSame=WU;ve.isSameOrAfter=HU;ve.isSameOrBefore=YU;ve.isValid=dV;ve.lang=jT;ve.locale=_T;ve.localeData=NT;ve.max=dU;ve.min=cU;ve.parsingFlags=uV;ve.set=Q$;ve.startOf=sV;ve.subtract=RU;ve.toArray=oV;ve.toObject=lV;ve.toDate=aV;ve.toISOString=ZU;ve.inspect=KU;typeof Symbol<"u"&&Symbol.for!=null&&(ve[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ve.toJSON=cV;ve.toString=GU;ve.unix=iV;ve.valueOf=rV;ve.creationData=fV;ve.eraName=xV;ve.eraNarrow=yV;ve.eraAbbr=vV;ve.eraYear=bV;ve.year=eT;ve.isLeapYear=Z$;ve.weekYear=CV;ve.isoWeekYear=PV;ve.quarter=ve.quarters=LV;ve.month=iT;ve.daysInMonth=a7;ve.week=ve.weeks=m7;ve.isoWeek=ve.isoWeeks=p7;ve.weeksInYear=AV;ve.weeksInWeekYear=MV;ve.isoWeeksInYear=TV;ve.isoWeeksInISOWeekYear=EV;ve.date=TT;ve.day=ve.days=P7;ve.weekday=T7;ve.isoWeekday=E7;ve.dayOfYear=DV;ve.hour=ve.hours=I7;ve.minute=ve.minutes=OV;ve.second=ve.seconds=IV;ve.millisecond=ve.milliseconds=ET;ve.utcOffset=vU;ve.utc=wU;ve.local=_U;ve.parseZone=jU;ve.hasAlignedHourOffset=NU;ve.isDST=SU;ve.isLocal=CU;ve.isUtcOffset=PU;ve.isUtc=yT;ve.isUTC=yT;ve.zoneAbbr=BV;ve.zoneName=zV;ve.dates=_r("dates accessor is deprecated. Use date instead.",TT);ve.months=_r("months accessor is deprecated. Use month instead",iT);ve.years=_r("years accessor is deprecated. Use year instead",eT);ve.zone=_r("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",bU);ve.isDSTShifted=_r("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kU);function $V(e){return Kt(e*1e3)}function UV(){return Kt.apply(null,arguments).parseZone()}function AT(e){return e}var Tt=Ab.prototype;Tt.calendar=C$;Tt.longDateFormat=A$;Tt.invalidDate=R$;Tt.ordinal=O$;Tt.preparse=AT;Tt.postformat=AT;Tt.relativeTime=F$;Tt.pastFuture=B$;Tt.set=S$;Tt.eras=mV;Tt.erasParse=pV;Tt.erasConvertYear=gV;Tt.erasAbbrRegex=_V;Tt.erasNameRegex=wV;Tt.erasNarrowRegex=jV;Tt.months=s7;Tt.monthsShort=n7;Tt.monthsParse=i7;Tt.monthsRegex=l7;Tt.monthsShortRegex=o7;Tt.week=d7;Tt.firstDayOfYear=f7;Tt.firstDayOfWeek=h7;Tt.weekdays=j7;Tt.weekdaysMin=S7;Tt.weekdaysShort=N7;Tt.weekdaysParse=C7;Tt.weekdaysRegex=A7;Tt.weekdaysShortRegex=M7;Tt.weekdaysMinRegex=R7;Tt.isPM=D7;Tt.meridiem=F7;function Bp(e,t,n,r){var i=_a(),c=Ti().set(r,t);return i[n](c,e)}function MT(e,t,n){if(ba(e)&&(t=e,e=void 0),e=e||"",t!=null)return Bp(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Bp(e,r,n,"month");return i}function Zb(e,t,n,r){typeof e=="boolean"?(ba(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,ba(t)&&(n=t,t=void 0),t=t||"");var i=_a(),c=e?i._week.dow:0,d,h=[];if(n!=null)return Bp(t,(n+c)%7,r,"day");for(d=0;d<7;d++)h[d]=Bp(t,(d+c)%7,r,"day");return h}function VV(e,t){return MT(e,t,"months")}function WV(e,t){return MT(e,t,"monthsShort")}function HV(e,t,n){return Zb(e,t,n,"weekdays")}function YV(e,t,n){return Zb(e,t,n,"weekdaysShort")}function qV(e,t,n){return Zb(e,t,n,"weekdaysMin")}To("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=yt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Ee.lang=_r("moment.lang is deprecated. Use moment.locale instead.",To);Ee.langData=_r("moment.langData is deprecated. Use moment.localeData instead.",_a);var ia=Math.abs;function GV(){var e=this._data;return this._milliseconds=ia(this._milliseconds),this._days=ia(this._days),this._months=ia(this._months),e.milliseconds=ia(e.milliseconds),e.seconds=ia(e.seconds),e.minutes=ia(e.minutes),e.hours=ia(e.hours),e.months=ia(e.months),e.years=ia(e.years),this}function RT(e,t,n,r){var i=Gr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function ZV(e,t){return RT(this,e,t,1)}function KV(e,t){return RT(this,e,t,-1)}function R1(e){return e<0?Math.floor(e):Math.ceil(e)}function QV(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,c,d,h,m;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=R1(v0(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=mr(e/1e3),r.seconds=i%60,c=mr(i/60),r.minutes=c%60,d=mr(c/60),r.hours=d%24,t+=mr(d/24),m=mr(LT(t)),n+=m,t-=R1(v0(m)),h=mr(n/12),n%=12,r.days=t,r.months=n,r.years=h,this}function LT(e){return e*4800/146097}function v0(e){return e*146097/4800}function XV(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=jr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+LT(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(v0(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ja(e){return function(){return this.as(e)}}var DT=ja("ms"),JV=ja("s"),e9=ja("m"),t9=ja("h"),s9=ja("d"),n9=ja("w"),r9=ja("M"),i9=ja("Q"),a9=ja("y"),o9=DT;function l9(){return Gr(this)}function c9(e){return e=jr(e),this.isValid()?this[e+"s"]():NaN}function Xl(e){return function(){return this.isValid()?this._data[e]:NaN}}var d9=Xl("milliseconds"),u9=Xl("seconds"),h9=Xl("minutes"),f9=Xl("hours"),m9=Xl("days"),p9=Xl("months"),g9=Xl("years");function x9(){return mr(this.days()/7)}var oa=Math.round,sd={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function y9(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function v9(e,t,n,r){var i=Gr(e).abs(),c=oa(i.as("s")),d=oa(i.as("m")),h=oa(i.as("h")),m=oa(i.as("d")),x=oa(i.as("M")),p=oa(i.as("w")),g=oa(i.as("y")),w=c<=n.ss&&["s",c]||c<n.s&&["ss",c]||d<=1&&["m"]||d<n.m&&["mm",d]||h<=1&&["h"]||h<n.h&&["hh",h]||m<=1&&["d"]||m<n.d&&["dd",m];return n.w!=null&&(w=w||p<=1&&["w"]||p<n.w&&["ww",p]),w=w||x<=1&&["M"]||x<n.M&&["MM",x]||g<=1&&["y"]||["yy",g],w[2]=t,w[3]=+e>0,w[4]=r,y9.apply(null,w)}function b9(e){return e===void 0?oa:typeof e=="function"?(oa=e,!0):!1}function w9(e,t){return sd[e]===void 0?!1:t===void 0?sd[e]:(sd[e]=t,e==="s"&&(sd.ss=t-1),!0)}function _9(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=sd,i,c;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},sd,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),c=v9(this,!n,r,i),n&&(c=i.pastFuture(+this,c)),i.postformat(c)}var ov=Math.abs;
507function Jc(e){return(e>0)-(e<0)||+e}function zg(){if(!this.isValid())return this.localeData().invalidDate();var e=ov(this._milliseconds)/1e3,t=ov(this._days),n=ov(this._months),r,i,c,d,h=this.asSeconds(),m,x,p,g;return h?(r=mr(e/60),i=mr(r/60),e%=60,r%=60,c=mr(n/12),n%=12,d=e?e.toFixed(3).replace(/\.?0+$/,""):"",m=h<0?"-":"",x=Jc(this._months)!==Jc(h)?"-":"",p=Jc(this._days)!==Jc(h)?"-":"",g=Jc(this._milliseconds)!==Jc(h)?"-":"",m+"P"+(c?x+c+"Y":"")+(n?x+n+"M":"")+(t?p+t+"D":"")+(i||r||e?"T":"")+(i?g+i+"H":"")+(r?g+r+"M":"")+(e?g+d+"S":"")):"P0D"}var Nt=Fg.prototype;Nt.isValid=pU;Nt.abs=GV;Nt.add=ZV;Nt.subtract=KV;Nt.as=XV;Nt.asMilliseconds=DT;Nt.asSeconds=JV;Nt.asMinutes=e9;Nt.asHours=t9;Nt.asDays=s9;Nt.asWeeks=n9;Nt.asMonths=r9;Nt.asQuarters=i9;Nt.asYears=a9;Nt.valueOf=o9;Nt._bubble=QV;Nt.clone=l9;Nt.get=c9;Nt.milliseconds=d9;Nt.seconds=u9;Nt.minutes=h9;Nt.hours=f9;Nt.days=m9;Nt.weeks=x9;Nt.months=p9;Nt.years=g9;Nt.humanize=_9;Nt.toISOString=zg;Nt.toString=zg;Nt.toJSON=zg;Nt.locale=_T;Nt.localeData=NT;Nt.toIsoString=_r("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",zg);Nt.lang=jT;Ke("X",0,0,"unix");Ke("x",0,0,"valueOf");Ie("x",Lg);Ie("X",V$);Ft("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Ft("x",function(e,t,n){n._d=new Date(yt(e))});//! moment.js
508Ee.version="2.30.1";j$(Kt);Ee.fn=ve;Ee.min=uU;Ee.max=hU;Ee.now=fU;Ee.utc=Ti;Ee.unix=$V;Ee.months=VV;Ee.isDate=nf;Ee.locale=To;Ee.invalid=Eg;Ee.duration=Gr;Ee.isMoment=Yr;Ee.weekdays=HV;Ee.parseZone=UV;Ee.localeData=_a;Ee.isDuration=vp;Ee.monthsShort=WV;Ee.weekdaysMin=qV;Ee.defineLocale=$b;Ee.updateLocale=U7;Ee.locales=V7;Ee.weekdaysShort=YV;Ee.normalizeUnits=jr;Ee.relativeTimeRounding=b9;Ee.relativeTimeThreshold=w9;Ee.calendarFormat=FU;Ee.prototype=ve;Ee.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function j9(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[i,c]=b.useState(null),[d,h]=b.useState({});b.useEffect(()=>{m()},[]);const m=async()=>{try{const g=await X.entities.Review.filter({status:"pending"},"-created_date",100);t(g)}catch(g){console.error("Error loading reviews:",g),Xe.error("Failed to load reviews")}finally{r(!1)}},x=async(g,w)=>{c(g);try{if(await X.entities.Review.update(g,{status:w,admin_notes:d[g]||""}),w==="approved"){const N=e.find(j=>j.id===g);await p(N.location_id)}Xe.success(`Review ${w}`),t(e.filter(N=>N.id!==g))}catch(N){console.error("Error moderating review:",N),Xe.error("Failed to update review")}finally{c(null)}},p=async g=>{try{const w=await X.entities.Review.filter({location_id:g,status:"approved"},"-created_date",1e3);if(w.length>0){const N=w.reduce((j,_)=>j+_.rating,0)/w.length;await X.entities.StorageLocation.update(g,{average_rating:Math.round(N*10)/10,total_reviews:w.length})}}catch(w){console.error("Error updating location rating:",w)}};return n?s.jsx("div",{className:"text-center py-8",children:"Loading pending reviews..."}):e.length===0?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600",children:"No pending reviews to moderate"})}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:["Pending Reviews (",e.length,")"]}),e.map(g=>s.jsx(oe,{className:"p-6",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:g.guest_name}),s.jsx("p",{className:"text-sm text-gray-500",children:Ee(g.created_date).format("MMM D, YYYY h:mm A")})]}),s.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(w=>s.jsx(Yn,{className:`w-5 h-5 ${w<=g.rating?"fill-yellow-400 text-yellow-400":"text-gray-300"}`},w))})]}),g.comment&&s.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:s.jsx("p",{className:"text-gray-700",children:g.comment})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Admin Notes (optional)"}),s.jsx(Os,{value:d[g.id]||"",onChange:w=>h({...d,[g.id]:w.target.value}),placeholder:"Add internal notes about this review...",rows:2})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(G,{onClick:()=>x(g.id,"approved"),disabled:i===g.id,className:"flex-1 bg-green-600 hover:bg-green-700",children:[s.jsx(Ld,{className:"w-4 h-4 mr-2"}),"Approve"]}),s.jsxs(G,{onClick:()=>x(g.id,"rejected"),disabled:i===g.id,variant:"destructive",className:"flex-1",children:[s.jsx(Io,{className:"w-4 h-4 mr-2"}),"Reject"]})]})]})},g.id))]})}function N9(){const[e,t]=b.useState(null),[n,r]=b.useState([]),[i,c]=b.useState(!0),[d,h]=b.useState(""),[m,x]=b.useState(!1);b.useEffect(()=>{p()},[]);const p=async()=>{try{const j=await X.auth.me();if(j.role!=="admin"){window.location.href="/";return}t(j);const C=(await X.entities.User.list("-created_date",1e3)).filter(A=>A.partner_status==="pending");r(C)}catch(j){console.error("Error loading data:",j),Xe.error("Failed to load applications")}finally{c(!1)}},g=async j=>{try{await X.asServiceRole.entities.User.update(j,{partner_status:"approved",partner_approved_date:new Date().toISOString()}),Xe.success("Partner approved!"),p()}catch(_){console.error("Error approving partner:",_),Xe.error("Failed to approve partner")}},w=async j=>{try{await X.asServiceRole.entities.User.update(j,{partner_status:"rejected"}),Xe.success("Partner application rejected"),p()}catch(_){console.error("Error rejecting partner:",_),Xe.error("Failed to reject partner")}},N=async()=>
508{if(!d){Xe.error("Please enter an email address");return}x(!0);try{await X.functions.invoke("sendPartnerWelcomeEmail",{partnerEmail:d,partnerName:"Test Partner"}),Xe.success(`Test welcome email sent to ${d}`),h("")}catch(j){console.error("Error sending test email:",j),Xe.error("Failed to send test email")}finally{x(!1)}};return i?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-blue-700 text-white py-8 px-4",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Partner Management"}),s.jsx("p",{className:"text-blue-100 mt-2",children:"Manage applications and grow your partner network with AI"})]})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-8",children:s.jsxs(Ql,{defaultValue:"applications",className:"space-y-6",children:[s.jsxs(Fo,{className:"grid w-full grid-cols-5 lg:w-auto lg:inline-grid",children:[s.jsxs(Bt,{value:"applications",className:"gap-2",children:[s.jsx(Ts,{className:"w-4 h-4"}),"Applications"]}),s.jsxs(Bt,{value:"reviews",className:"gap-2",children:[s.jsx(ms,{className:"w-4 h-4"}),"Reviews"]}),s.jsxs(Bt,{value:"suggestions",className:"gap-2",children:[s.jsx(Il,{className:"w-4 h-4"}),"AI Suggestions"]}),s.jsxs(Bt,{value:"outreach",className:"gap-2",children:[s.jsx(Il,{className:"w-4 h-4"}),"Outreach"]}),s.jsxs(Bt,{value:"analytics",className:"gap-2",children:[s.jsx(Il,{className:"w-4 h-4"}),"Analytics"]})]}),s.jsxs(zt,{value:"applications",className:"space-y-4",children:[s.jsxs("div",{className:"mb-6 flex flex-wrap items-center gap-4",children:[s.jsxs(ot,{variant:"outline",className:"text-lg px-4 py-2",children:[s.jsx(Ts,{className:"w-4 h-4 mr-2"}),n.length," Pending Applications"]}),s.jsx(oe,{className:"flex-1 max-w-md",children:s.jsxs(me,{className:"p-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{type:"email",placeholder:"[email protected]",value:d,onChange:j=>h(j.target.value),className:"flex-1"}),s.jsxs(G,{onClick:N,disabled:m,variant:"outline",children:[s.jsx(Sp,{className:"w-4 h-4 mr-2"}),m?"Sending...":"Test Email"]})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-2",children:"Preview the partner welcome email"})]})})]}),n.length===0?s.jsx(oe,{children:s.jsx(me,{className:"p-12 text-center",children:s.jsx("p",{className:"text-gray-600",children:"No pending partner applications"})})}):s.jsx("div",{className:"space-y-4",children:n.map(j=>s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center justify-between",children:[s.jsx("span",{children:j.full_name}),s.jsx(ot,{variant:"secondary",children:j.partner_status})]})}),s.jsxs(me,{children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Email"}),s.jsx("p",{className:"font-medium",children:j.email})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Phone"}),s.jsx("p",{className:"font-medium",children:j.phone||"Not provided"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Applied"}),s.jsx("p",{className:"font-medium",children:new Date(j.created_date).toLocaleDateString()})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"User Type"}),s.jsx("p",{className:"font-medium",children:j.user_type||"Not set"})]})]}),s.jsxs("div",{className:"flex gap-3 mt-4",children:[s.jsxs(G,{onClick:()=>g(j.id),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(ms,{className:"w-4 h-4 mr-2"}),"Approve Partner"]}),s.jsxs(G,{onClick:()=>w(j.id),variant:"destructive",children:[s.jsx(tg,{className:"w-4 h-4 mr-2"}),"Reject"]})]})]})]},j.id))})]}),s.jsx(zt,{value:"reviews",children:s.jsx(j9,{})}),s.jsx(zt,{value:"suggestions",children:s.jsx(wB,{})}),s.jsx(zt,{value:"outreach",children:s.jsx(w$,{})}),s.jsx(zt,{value:"analytics",children:s.jsx(_$,{})})]})})]})}var $g="Dialog",[OT,IT]=rn($g),[S9,Zr]=OT($g),FT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:c,modal:d=!0}=e,h=b.useRef(null),m=b.useRef(null),[x,p]=vr({prop:r,defaultProp:i??!1,onChange:c,caller:$g});return s.jsx(S9,{scope:t,triggerRef:h,contentRef:m,contentId:xr(),titleId:xr(),descriptionId:xr(),open:x,onOpenChange:p,onOpenToggle:b.useCallback(()=>p(g=>!g),[p]),modal:d,children:n})};FT.displayName=$g;var BT="DialogTrigger",zT=b.forwardRef((e,t)=>
vendor: 5,519 bytes, lines 508-512
508{const{__scopeDialog:n,...r}=e,i=Zr(BT,n),c=gt(t,i.triggerRef);return s.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xb(i.open),...r,ref:c,onClick:Oe(e.onClick,i.onOpenToggle)})});zT.displayName=BT;var Kb="DialogPortal",[k9,$T]=OT(Kb,{forceMount:void 0}),UT=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,c=Zr(Kb,t);return s.jsx(k9,{scope:t,forceMount:n,children:b.Children.map(r,d=>s.jsx(wr,{present:n||c.open,children:s.jsx(jg,{asChild:!0,container:i,children:d})}))})};UT.displayName=Kb;var zp="DialogOverlay",VT=b.forwardRef((e,t)=>{const n=$T(zp,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,c=Zr(zp,e.__scopeDialog);return c.modal?s.jsx(wr,{present:r||c.open,children:s.jsx(P9,{...i,ref:t})}):null});VT.displayName=zp;var C9=Wl("DialogOverlay.RemoveScroll"),P9=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Zr(zp,n);return s.jsx(kg,{as:C9,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(Ze.div,{"data-state":Xb(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gl="DialogContent",WT=b.forwardRef((e,t)=>{const n=$T(Gl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,c=Zr(Gl,e.__scopeDialog);return s.jsx(wr,{present:r||c.open,children:c.modal?s.jsx(T9,{...i,ref:t}):s.jsx(E9,{...i,ref:t})})});WT.displayName=Gl;var T9=b.forwardRef((e,t)=>{const n=Zr(Gl,e.__scopeDialog),r=b.useRef(null),i=gt(t,n.contentRef,r);return b.useEffect(()=>{const c=r.current;if(c)return kb(c)},[]),s.jsx(HT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,c=>{var d;c.preventDefault(),(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&c.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,c=>c.preventDefault())})}),E9=b.forwardRef((e,t)=>{const n=Zr(Gl,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return s.jsx(HT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var d,h;(d=e.onCloseAutoFocus)==null||d.call(e,c),c.defaultPrevented||(r.current||(h=n.triggerRef.current)==null||h.focus(),c.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:c=>{var m,x;(m=e.onInteractOutside)==null||m.call(e,c),c.defaultPrevented||(r.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const d=c.target;((x=n.triggerRef.current)==null?void 0:x.contains(d))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),HT=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:c,...d}=e,h=Zr(Gl,n),m=b.useRef(null),x=gt(t,m);return xb(),s.jsxs(s.Fragment,{children:[s.jsx(gg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:c,children:s.jsx(pg,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Xb(h.open),...d,ref:x,onDismiss:()=>h.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(M9,{titleId:h.titleId}),s.jsx(L9,{contentRef:m,descriptionId:h.descriptionId})]})]})}),Qb="DialogTitle",YT=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Zr(Qb,n);return s.jsx(Ze.h2,{id:i.titleId,...r,ref:t})});YT.displayName=Qb;var qT="DialogDescription",GT=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Zr(qT,n);return s.jsx(Ze.p,{id:i.descriptionId,...r,ref:t})});GT.displayName=qT;var ZT="DialogClose",KT=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Zr(ZT,n);return s.jsx(Ze.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});KT.displayName=ZT;function Xb(e){return e?"open":"closed"}var QT="DialogTitleWarning",[A9,XT]=UF(QT,{contentName:Gl,titleName:Qb,docsSlug:"dialog"}),M9=({titleId:e})=>{const t=XT(QT),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
509
510If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
511
512For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},R9="DialogDescriptionWarning",L9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XT(R9).contentName}}.`;return b.useEffect(()=>{var c;const i=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},JT=FT,D9=zT,eE=UT,Jb=VT,ew=WT,tw=YT,sw=GT,nw=KT;const Na=JT,O9=eE,tE=b.forwardRef(({className:e,...t},n)=>s.jsx(Jb,{ref:n,className:We("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tE.displayName=Jb.displayName;const Ai=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(O9,{children:[s.jsx(tE,{}),s.jsxs(ew,{ref:r,className:We("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
512nded-lg",e),...n,children:[t,s.jsxs(nw,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(Io,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ai.displayName=ew.displayName;const Mi=({className:e,...t})=>s.jsx("div",{className:We("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Mi.displayName="DialogHeader";const Ri=b.forwardRef(({className:e,...t},n)=>s.jsx(tw,{ref:n,className:We("text-lg font-semibold leading-none tracking-tight",e),...t}));Ri.displayName=tw.displayName;const sE=b.forwardRef(({className:e,...t},n)=>s.jsx(sw,{ref:n,className:We("text-sm text-muted-foreground",e),...t}));sE.displayName=sw.displayName;function En(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Lo(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function I9(e,t){const n=En(e);return isNaN(t)?Lo(e,NaN):(n.setDate(n.getDate()+t),n)}const nE=6048e5,F9=864e5;let B9={};function Ug(){return B9}function Lh(e,t){var h,m,x,p;const n=Ug(),r=(t==null?void 0:t.weekStartsOn)??((m=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((p=(x=n.locale)==null?void 0:x.options)==null?void 0:p.weekStartsOn)??0,i=En(e),c=i.getDay(),d=(c<r?7:0)+c-r;return i.setDate(i.getDate()-d),i.setHours(0,0,0,0),i}function $p(e){return Lh(e,{weekStartsOn:1})}function rE(e){const t=En(e),n=t.getFullYear(),r=Lo(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=$p(r),c=Lo(e,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=$p(c);return t.getTime()>=i.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function L1(e){const t=En(e);return t.setHours(0,0,0,0),t}function D1(e){const t=En(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function iE(e,t){const n=L1(e),r=L1(t),i=+n-D1(n),c=+r-D1(r);return Math.round((i-c)/F9)}function z9(e){const t=rE(e),n=Lo(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),$p(n)}function $9(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function U9(e){if(!$9(e)&&typeof e!="number")return!1;const t=En(e);return!isNaN(Number(t))}function V9(e,t){const n=En(e),r=En(t),i=O1(n,r),c=Math.abs(iE(n,r));n.setDate(n.getDate()-i*c);const d=+(O1(n,r)===-i),h=i*(c-d);return h===0?0:h}function O1(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function W9(e){const t=En(e),n=Lo(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const H9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}}
vendor: 17,193 bytes, line 512
512,Y9=(e,t,n)=>{let r;const i=H9[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function lv(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const q9={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},G9={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Z9={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},K9={date:lv({formats:q9,defaultWidth:"full"}),time:lv({formats:G9,defaultWidth:"full"}),dateTime:lv({formats:Z9,defaultWidth:"full"})},Q9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},X9=(e,t,n,r)=>Q9[e];function th(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const d=e.defaultFormattingWidth||e.defaultWidth,h=n!=null&&n.width?String(n.width):d;i=e.formattingValues[h]||e.formattingValues[d]}else{const d=e.defaultWidth,h=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[h]||e.values[d]}const c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}const J9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tW={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sW={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},rW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iW=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},aW={ordinalNumber:iW,era:th({values:J9,defaultWidth:"wide"}),quarter:th({values:eW,defaultWidth:"wide",argumentCallback:e=>e-1}),month:th({values:tW,defaultWidth:"wide"}),day:th({values:sW,defaultWidth:"wide"}),dayPeriod:th({values:nW,defaultWidth:"wide",formattingValues:rW,defaultFormattingWidth:"wide"})};function sh(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],c=t.match(i);if(!c)return null;const d=c[0],h=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],m=Array.isArray(h)?lW(h,g=>g.test(d)):oW(h,g=>g.test(d));let x;x=e.valueCallback?e.valueCallback(m):m,x=n.valueCallback?n.valueCallback(x):x;const p=t.slice(d.length);return{value:x,rest:p}}}function oW(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lW(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function cW(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],c=t.match(e.parsePattern);if(!c)return null;let d=e.valueCallback?e.valueCallback(c[0]):c[0];d=n.valueCallback?n.valueCallback(d):d;const h=t.slice(i.length);return{value:d,rest:h}}}const dW=/^(\d+)(th|st|nd|rd)?/i,uW=/\d+/i,hW={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fW={any:[/^b/i,/^(a|c)/i]},mW={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pW={any:[/1/i,/2/i,/3/i,/4/i]},gW={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},xW={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},yW={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vW={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bW={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wW={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_W={ordinalNumber:cW({matchPattern:dW,parsePattern:uW,valueCallback:e=>parseInt(e,10)}),era:sh({matchPatterns:hW,defaultMatchWidth:"wide",parsePatterns:fW,defaultParseWidth:"any"}),quarter:sh({matchPatterns:mW,defaultMatchWidth:"wide",parsePatterns:pW,defaultParseWidth:"any",valueCallback:e=>e+1}),month:sh({matchPatterns:gW,defaultMatchWidth:"wide",parsePatterns:xW,defaultParseWidth:"any"}),day:sh({matchPatterns:yW,defaultMatchWidth:"wide",parsePatterns:vW,defaultParseWidth:"any"}),dayPeriod:sh({matchPatterns:bW,defaultMatchWidth:"any",parsePatterns:wW,defaultParseWidth:"any"})},jW={code:"en-US",formatDistance:Y9,formatLong:K9,formatRelative:X9,localize:aW,match:_W,options:{weekStartsOn:0,firstWeekContainsDate:1}};function NW(e){const t=En(e);return iE(t,W9(t))+1}function SW(e){const t=En(e),n=+$p(t)-+z9(t);return Math.round(n/nE)+1}function aE(e,t){var p,g,w,N;const n=En(e),r=n.getFullYear(),i=Ug(),c=(t==null?void 0:t.firstWeekContainsDate)??((g=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??i.firstWeekContainsDate??((N=(w=i.locale)==null?void 0:w.options)==null?void 0:N.firstWeekContainsDate)??1,d=Lo(e,0);d.setFullYear(r+1,0,c),d.setHours(0,0,0,0);const h=Lh(d,t),m=Lo(e,0);m.setFullYear(r,0,c),m.setHours(0,0,0,0);const x=Lh(m,t);return n.getTime()>=h.getTime()?r+1:n.getTime()>=x.getTime()?r:r-1}function kW(e,t){var h,m,x,p;const n=Ug(),r=(t==null?void 0:t.firstWeekContainsDate)??((m=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(x=n.locale)==null?void 0:x.options)==null?void 0:p.firstWeekContainsDate)??1,i=aE(e,t),c=Lo(e,0);return c.setFullYear(i,0,r),c.setHours(0,0,0,0),Lh(c,t)}function CW(e,t){const n=En(e),r=+Lh(n,t)-+kW(n,t);return Math.round(r/nE)+1}function Lt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const co={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Lt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Lt(n+1,2)},d(e,t){return Lt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Lt(e.getHours()%12||12,t.length)},H(e,t){return Lt(e.getHours(),t.length)},m(e,t){return Lt(e.getMinutes(),t.length)},s(e,t){return Lt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Lt(i,t.length)}},ed={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I1={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return co.y(e,t)},Y:function(e,t,n,r){const i=aE(e,r),c=i>0?i:1-i;if(t==="YY"){const d=c%100;return Lt(d,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):Lt(c,t.length)},R:function(e,t){const n=rE(e);return Lt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Lt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Lt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Lt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return co.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Lt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=CW(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Lt(i,t.length)},I:function(e,t,n){const r=SW(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Lt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):co.d(e,t)},D:function(e,t,n){const r=NW(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Lt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),c=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return Lt(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),c=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return Lt(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Lt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=ed.noon:r===0?i=ed.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=ed.evening:r>=12?i=ed.afternoon:r>=4?i=ed.morning:i=ed.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return co.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):co.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Lt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Lt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):co.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):co.s(e,t)},S:function(e,t){return co.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return B1(r);case"XXXX":case"XX":return bl(r);case"XXXXX":case"XXX":default:return bl(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return B1(r);case"xxxx":case"xx":return bl(r);case"xxxxx":case"xxx":default:return bl(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+F1(r,":");case"OOOO":default:return"GMT"+bl(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+F1(r,":");case"zzzz":default:return"GMT"+bl(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Lt(r,t.length)},T:function(e,t,n){const r=e.getTime();return Lt(r,t.length)}};function F1(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),c=r%60;return c===0?n+String(i):n+String(i)+t+Lt(c,2)}function B1(e,t){return e%60===0?(e>0?"-":"+")+Lt(Math.abs(e)/60,2):bl(e,t)}function bl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Lt(Math.trunc(r/60),2),c=Lt(r%60,2);return n+i+t+c}const z1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},oE=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},PW=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return z1(e,t);let c;switch(r){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",z1(r,t)).replace("{{time}}",oE(i,t))},TW={p:oE,P:PW},EW=/^D+$/,AW=/^Y+$/,MW=["D","DD","YY","YYYY"];function RW(e){return EW.test(e)}function LW(e){return AW.test(e)}function DW(e,t,n){const r=OW(e,t,n);if(console.warn(r),MW.includes(e))throw new RangeError(r)}function OW(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const IW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,BW=/^'([^]*?)'?$/,zW=/''/g,$W=/[a-zA-Z]/;function Up(e,t,n){var p,g,w,N;const r=Ug(),i=r.locale??jW,c=r.firstWeekContainsDate??((g=(p=r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,d=r.weekStartsOn??((N=(w=r.locale)==null?void 0:w.options)==null?void 0:N.weekStartsOn)??0,h=En(e);if(!U9(h))throw new RangeError("Invalid time value");let m=t.match(FW).map(j=>{const _=j[0];if(_==="p"||_==="P"){const C=TW[_];return C(j,i.formatLong)}return j}).join("").match(IW).map(j=>{if(j==="''")return{isToken:!1,value:"'"};const _=j[0];if(_==="'")return{isToken:!1,value:UW(j)};if(I1[_])return{isToken:!0,value:j};
512if(_.match($W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:j}});i.localize.preprocessor&&(m=i.localize.preprocessor(h,m));const x={firstWeekContainsDate:c,weekStartsOn:d,locale:i};return m.map(j=>{if(!j.isToken)return j.value;const _=j.value;(LW(_)||RW(_))&&DW(_,t,String(e));const C=I1[_[0]];return C(h,_,i.localize,x)}).join("")}function UW(e){const t=e.match(BW);return t?t[1].replace(zW,"'"):e}function VW({latitude:e,longitude:t,address:n,label:r="Get Directions"}){const[i,c]=b.useState(!1),d=[{name:"Google Maps",icon:"🗺️",url:`https://www.google.com/maps/dir/?api=1&destination=${e},${t}`},{name:"Apple Maps",icon:"🍎",url:`https://maps.apple.com/?daddr=${e},${t}`},{name:"Waze",icon:"🚗",url:`https://waze.com/ul?ll=${e},${t}&navigate=yes`},{name:"Open in Browser",icon:"🌐",url:`https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=16/${e}/${t}`}],h=m=>{window.open(m,"_blank"),c(!1)};return s.jsxs(s.Fragment,{children:[s.jsxs(G,{onClick:()=>c(!0),variant:"outline",className:"w-full",children:[s.jsx(kk,{className:"w-4 h-4 mr-2"}),r]}),s.jsx(Na,{open:i,onOpenChange:c,children:s.jsxs(Ai,{children:[s.jsx(Mi,{children:s.jsxs(Ri,{className:"flex items-center gap-2",children:[s.jsx(jt,{className:"w-5 h-5"}),"Choose Your Map App"]})}),s.jsxs("div",{className:"space-y-2 mt-4",children:[n&&s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:n}),d.map(m=>s.jsxs(G,{onClick:()=>h(m.url),variant:"outline",className:"w-full justify-start text-left h-auto py-3",children:[s.jsx("span",{className:"text-2xl mr-3",children:m.icon}),s.jsx("span",{className:"font-medium",children:m.name})]},m.name))]})]})})]})}function WW({locationId:e}){const[t,n]=b.useState([]),[r,i]=b.useState(!0);b.useEffect(()=>{c()},[e]);const c=async()=>{try{const d=await X.entities.Review.filter({location_id:e,status:"approved"},"-created_date",50);n(d)}catch(d){console.error("Error loading reviews:",d)}finally{i(!1)}};return r?s.jsx("div",{className:"text-center py-4",children:"Loading reviews..."}):t.length===0?s.jsx("div",{className:"text-center py-8 text-gray-500",children:"No reviews yet. Be the first to review this location!"}):s.jsx("div",{className:"space-y-4",children:t.map(d=>s.jsx(oe,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0",children:s.jsx(Q0,{className:"w-5 h-5 text-blue-600"})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:d.guest_name}),s.jsx("p",{className:"text-xs text-gray-500",children:Ee(d.created_date).format("MMM D, YYYY")})]}),s.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(h=>s.jsx(Yn,{className:`w-4 h-4 ${h<=d.rating?"fill-yellow-400 text-yellow-400":"text-gray-300"}`},h))})]}),d.comment&&s.jsx("p",{className:"text-gray-700 text-sm leading-relaxed",children:d.comment})]})]})},d.id))})}const HW={secure_lock:Ct,cctv:Ol,"24_7_access":Ts,indoor:Tn,climate_controlled:Ut,insurance:Tn},YW={secure_lock:"Secure Lock",cctv:"CCTV","24_7_access":"24/7 Access",indoor:"Indoor",climate_controlled:"Climate Control",insurance:"Insurance"},qW={packing_assistance:"Packing Assistance",luggage_wrapping:"Luggage Wrapping",key_storage:"Key Storage",same_day_access:"Same Day Access",concierge_service:"Concierge Service",delivery_available:"Delivery Available"};function GW({location:e,onClose:t,onBook:n}){const[r,i]=b.useState(0),c=d=>[...Array(5)].map((h,m)=>s.jsx(Yn,{className:`w-4 h-4 ${m<d?"fill-yellow-400 text-yellow-400":"text-gray-300"}`},m));return s.jsx(Na,{open:!0,onOpenChange:t,children:s.jsxs(Ai,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsx(Mi,{children:s.jsx(Ri,{className:"text-2xl",children:e.title})}),s.jsxs("div",{className:"space-y-6",children:[e.images&&e.images.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"mb-3",children:s.jsx("img",{src:e.images[r],alt:e.title,className:"w-full h-96 object-cover rounded-lg"})}),s.jsx("div",{className:"flex gap-2 overflow-x-auto",children:e.images.map((d,h)=>s.jsx("img",{src:d,alt:`${e.title} ${h+1}`,className:`w-20 h-20 object-cover rounded cursor-pointer ${r===h?"ring-2 ring-blue-600":""}`,onClick:()=>i(h)},h))})]}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center text-gray-600 mb-2",children:[s.jsx(jt,{className:"w-5 h-5 mr-2"}),e.address,", ",e.city]}),e.average_rating>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex",children:c(Math.round(e.average_rating))}),s.jsx("span",{className:"font-semibold",children:e.average_rating.toFixed(1)}),s.jsxs("span",{className:"text-gray-600",children:["(",e.total_reviews," reviews)"]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("div",{className:"text-3xl font-bold text-blue-600",children:["$",e.price_per_day]}),s.jsx("div",{className:"text-sm text-gray-500",children:"per bag/day"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"About this space"}),s.jsx("p",{className:"text-gray-700",children:e.description})]}),e.amenities&&e.amenities.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Amenities"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.amenities.map(d=>{const h=HW[d];return s.jsxs("div",{className:"flex items-center gap-2",children:[h&&s.jsx(h,{className:"w-5 h-5 text-blue-600"}),s.jsx("span",{children:YW[d]})]},d)})})]}),e.services&&e.services.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Services Offered"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.services.map(d=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(XD,{className:"w-5 h-5 text-green-600"}),s.jsx("span",{children:qW[d]})]},d))})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(fD,{className:"w-5 h-5"}),"Customer Reviews",e.average_rating>0&&s.jsxs("span",{className:"text-sm font-normal text-gray-600",children:["(",e.average_rating.toFixed(1)," ★ from ",e.total_reviews," reviews)"]})]}),s.jsx(WW,{locationId:e.id})]}),s.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{children:[s.jsx(Ut,{className:"w-5 h-5 inline mr-2 text-blue-600"}),s.jsxs("span",{className:"font-semibold",children:[e.available_spots," spots available"]}),s.jsxs("span",{className:"text-gray-600 ml-1",children:["out of ",e.capacity]})]}),s.jsx(G,{onClick:n,className:"bg-blue-600 hover:bg-blue-700",disabled:e.available_spots===0,children:e.available_spots===0?"Fully Booked":"Book Now"})]}),s.jsx(VW,{latitude:e.latitude,longitude:e.longitude,address:e.address})]})]})]})})}const ZW={percentage_off:Ck,fixed_amount_off:sg,first_hours_free:Ts,multi_day_discount:Ds};function rw({promotion:e,size:t="default"}){if(!e||!e.active)return null;const n=ZW[e.type]||sg,r=t==="sm",i=()=>{switch(e.type){case"percentage_off":return`${e.value}% OFF`;case"fixed_amount_off":return`$${e.value} OFF`;case"first_hours_free":return`First ${e.value}h FREE`;case"multi_day_discount":return`${e.value}% OFF ${e.min_days}+ days`;default:return"DEAL"}};return s.jsxs(ot,{className:`${r?"text-xs px-2 py-0":"px-3 py-1"} bg-gradient-to-r from-orange-500 to-red-500 text-white font-bold flex items-center gap-1`,children:[s.jsx(n,{className:`${r?"w-3 h-3":"w-4 h-4"}`}),i()]})}const lE=(e,t,n,r)=>{var d,h,m;let i=t,c=[];if((d=e.demand_pricing)!=null&&d.enabled){const x=(e.capacity-e.available_spots)/e.capacity*100;x>=90&&e.demand_pricing.threshold_90_percent?(i*=e.demand_pricing.threshold_90_percent,c.push({type:"High Demand",multiplier:e.demand_pricing.threshold_90_percent,description:"90%+ capacity"})):x>=80&&e.demand_pricing.threshold_80_percent&&(i*=e.demand_pricing.threshold_80_percent,c.push({type:"Popular",multiplier:e.demand_pricing.threshold_80_percent,description:"80%+ capacity"}))}if((h=e.seasonal_pricing)!=null&&h.enabled&&n){const x=new Date(n);
512((m=e.seasonal_pricing.high_season_dates)==null?void 0:m.some(g=>{const w=new Date(g.start),N=new Date(g.end);return x>=w&&x<=N}))&&e.seasonal_pricing.high_season_multiplier&&(i*=e.seasonal_pricing.high_season_multiplier,c.push({type:"High Season",multiplier:e.seasonal_pricing.high_season_multiplier,description:"Peak travel period"}))}return{price:i,multipliers:c,basePrice:t}},cE=(e,t)=>{if(!e||!t)return 0;const n=new Date(e),r=new Date(t),i=Math.abs(r-n);return Math.ceil(i/(1e3*60*60*24))||1},dE=(e,t)=>{if(!e||!t)return 0;const n=new Date(e),r=new Date(t),i=Math.abs(r-n);return Math.ceil(i/(1e3*60*60))},KW=(e,t,n,r)=>{var m;if(!((m=e.promotions)!=null&&m.length))return null;const i=new Date,c=cE(t,n),d=dE(t,n);return e.promotions.filter(x=>!(!x.active||x.start_date&&new Date(x.start_date)>i||x.end_date&&new Date(x.end_date)<i||x.min_days&&c<x.min_days||x.min_hours&&d<x.min_hours)).sort((x,p)=>x.type==="percentage_off"&&p.type==="percentage_off"||x.type==="fixed_amount_off"&&p.type==="fixed_amount_off"?p.value-x.value:0)[0]||null},QW=(e,t,n,r)=>{if(!t)return{discount:0,description:""};let i=0,c="";switch(t.type){case"percentage_off":i=e*(t.value/100),c=`${t.value}% off`;break;case"fixed_amount_off":i=Math.min(t.value,e),c=`$${t.value} off`;break;case"first_hours_free":const d=Math.min(t.value,r);i=e/r*d,c=`First ${t.value} hour${t.value>1?"s":""} free`;break;case"multi_day_discount":n>=t.min_days&&(i=e*(t.value/100),c=`${t.value}% off ${t.min_days}+ day bookings`);break}return{discount:Math.max(0,i),description:c,name:t.name}},XW=(e,t,n,r,i=0)=>{var j;const c=cE(t,n),d=dE(t,n),h=e.price_per_day||((j=e.pricing)==null?void 0:j.carry_on)||5,m=lE(e,h,t),x=m.price*c*r,p=KW(e,t,n),g=QW(x,p,c,d),w=2,N=x-g.discount+i+w;return{basePrice:m.basePrice,adjustedPrice:m.price,multipliers:m.multipliers,subtotal:x,days:c,hours:d,promotion:p?{...g,original:p}:null,deliveryFee:i,platformFee:w,total:Math.max(0,N)}};function JW({startLat:e,startLng:t,endLat:n,endLng:r,locationName:i,bookingId:c}){const[d,h]=b.useState(!1),[m,x]=b.useState(null),[p,g]=b.useState(!1),w=async()=>{h(!0);try{const j=await X.functions.invoke("uberRideEstimate",{start_latitude:e,start_longitude:t,end_latitude:n,end_longitude:r});j.data.success?(x(j.data.estimates),g(!0)):Xe.error("Unable to get ride estimates")}catch(j){console.error("Error getting estimates:",j),Xe.error("Failed to get ride estimates")}finally{h(!1)}},N=async j=>{h(!0);try{(await X.functions.invoke("uberRequestRide",{start_latitude:e,start_longitude:t,end_latitude:n,end_longitude:r,product_id:j,booking_id:c})).data.success?(Xe.success("Ride requested successfully!"),g(!1)):Xe.error("Unable to request ride")}catch(_){console.error("Error requesting ride:",_),Xe.error("Failed to request ride")}finally{h(!1)}};return p&&m?s.jsxs("div",{className:"bg-white rounded-lg border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h3",{className:"font-semibold",children:["Available Rides to ",i]}),s.jsx("button",{onClick:()=>g(!1),className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),m.map(j=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg hover:bg-gray-50",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:j.localized_display_name}),s.jsx("p",{className:"text-sm text-gray-600",children:j.duration?`${Math.round(j.duration/60)} min`:"N/A"})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"font-semibold",children:j.estimate}),s.jsx(G,{onClick:()=>N(j.product_id),disabled:d,className:"mt-1 min-h-[48px] px-6",children:d?s.jsx(It,{className:"w-4 h-4 animate-spin"}):"Request"})]})]},j.product_id))]}):s.jsxs(G,{onClick:w,disabled:d,className:"w-full bg-black hover:bg-gray-800 text-white min-h-[56px] text-base sm:text-lg",size:"lg",children:[d?s.jsx(It,{className:"w-5 h-5 animate-spin"}):s.jsx(RL,{className:"w-5 h-5"}),"Get Uber to ",i]})}function eH({startDate:e,endDate:t,locations:n,onClose:r}){const[i,c]=b.useState(new Date(e)),d=M=>new Date(M.getFullYear(),M.getMonth()+1,0).getDate(),h=M=>new Date(M.getFullYear(),M.getMonth(),1).getDay(),m=()=>{c(new Date(i.getFullYear(),i.getMonth()-1))},x=()=>{c(new Date(i.getFullYear(),i.getMonth()+1))},p=M=>{const E=new Date(i.getFullYear(),i.getMonth(),M),D=new Date(e),I=new Date(t);return E>=D&&E<=I},g=M=>new Date(i.getFullYear(),i.getMonth(),M).toDateString()===new Date(e).toDateString(),w=M=>new Date(i.getFullYear(),i.getMonth(),M).toDateString()===new Date(t).toDateString(),N=i.toLocaleDateString("en-US",{month:"long",year:"numeric"}),j=d(i),_=h(i),C=[];for(let M=0;M<_;M++)C.push(null);for(let M=1;M<=j;M++)C.push(M);const A=n.filter(M=>M.available_spots>0);return s.jsxs(oe,{className:"p-6 bg-white border-blue-300",children:[s.jsxs("div",{className:"mb-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("button",{onClick:m,className:"p-1 hover:bg-gray-100 rounded",children:s.jsx(Nk,{className:"w-5 h-5"})}),s.jsx("h3",{className:"font-bold text-lg text-gray-900",children:N}),s.jsx("button",{onClick:x,className:"p-1 hover:bg-gray-100 rounded",children:s.jsx(gr,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(M=>s.jsx("div",{className:"text-center font-semibold text-xs text-gray-600 py-2",children:M},M)),C.map((M,E)=>{const D=M&&p(M),I=M&&g(M),z=M&&w(M);return s.jsx("div",{className:`aspect-square flex items-center justify-center rounded text-sm font-medium transition ${M?I||z?"bg-blue-600 text-white":D?"bg-blue-100 text-blue-900":"bg-gray-50 text-gray-600":"bg-transparent"}`,children:M},E)})]})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("p",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Locations with availability during this period:"}),s.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:A.slice(0,5).map(M=>s.jsxs("div",{className:"flex items-center justify-between p-2 bg-green-50 rounded border border-green-200",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:M.title}),s.jsxs("p",{className:"text-xs text-gray-600",children:[M.available_spots," spots available"]})]}),s.jsx("span",{className:"text-sm font-bold text-green-600",children:"✓"})]},M.id))})]}),s.jsx("button",{onClick:r,className:"w-full mt-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-900 border border-gray-300 rounded hover:bg-gray-50",children:"Close Calendar"})]})}function tH({locations:e,formData:t,setFormData:n,isDeparture:r}){var p;const[i,c]=b.useState(!1),[d,h]=b.useState(""),m=e.filter(g=>{var w,N,j;return((w=g.city)==null?void 0:w.toLowerCase().includes(d.toLowerCase()))||((N=g.address)==null?void 0:N.toLowerCase().includes(d.toLowerCase()))||((j=g.title)==null?void 0:j.toLowerCase().includes(d.toLowerCase()))}),x=e.find(g=>g.id===t.location_id);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"search",children:"Search Locations"}),s.jsxs("div",{className:"relative mt-2",children:[s.jsx(jt,{className:"absolute left-3 top-3 h-5 w-5 text-gray-400"}),s.jsx(de,{id:"search",placeholder:"Search by city or location name...",value:d,onChange:g=>h(g.target.value),className:"pl-10"})]})]}),x&&s.jsxs(oe,{className:"p-4 border-2 border-blue-500 bg-blue-50",children:[s.jsxs("div",{className:"flex justify-between items-start mb-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-gray-900",children:x.title}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:x.address})]}),x.average_rating>0&&s.jsxs("div",{className:"flex items-center gap-1 bg-white px-3 py-1 rounded",children:[s.jsx(Yn,{className:"w-4 h-4 fill-yellow-400 text-yellow-400"}),s.jsx("span",{className:"font-semibold text-sm",children:x.average_rating.toFixed(1)})]})]}),s.jsxs("p",{className:"text-lg font-bold text-blue-600",children:["From $",x.price_per_day||((p=x.pricing)==null?void 0:p.carry_on)||5,"/bag/day"]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"start_date",children:"Check-in Date"}),s.jsx(de,{id:"start_date",type:"date",value:t.start_date,min:new Date().toISOString().split("T")[0],onChange:g=>n({...t,start_date:g.target.value}),className:"mt-2",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"end_date",children:"Check-out Date"}),s.jsx(de,{id:"end_date",type:"date",value:t.end_date,min:t.start_date||new Date().toISOString().split("T")[0],onChange:g=>n({...t,end_date:g.target.value}),className:"mt-2",required:!0})]})]}),t.start_date&&t.end_date&&s.jsxs("button",{onClick:()=>c(!i),className:"w-full p-3 border border-gray-300 rounded-lg text-left flex items-center justify-between hover:bg-gray-50 transition",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View Availability Calendar"}),s.jsx(Ds,{className:"w-4 h-4 text-gray-400"})]}),i&&t.start_date&&t.end_date&&s.jsx(eH,{startDate:t.start_date,endD
vendor: 4,224 bytes, line 512
512ate:t.end_date,locations:e,onClose:()=>c(!1)}),d&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"text-sm font-medium text-gray-600 mb-3",children:[m.length," location",m.length!==1?"s":""," available"]}),m.slice(0,5).map(g=>{var w;return s.jsx("button",{onClick:()=>{n({...t,location_id:g.id}),h("")},className:`w-full p-4 border rounded-lg text-left transition ${t.location_id===g.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:g.title}),s.jsx("p",{className:"text-sm text-gray-600",children:g.address})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-bold text-blue-600",children:["$",g.price_per_day||((w=g.pricing)==null?void 0:w.carry_on)||5,"/day"]}),g.average_rating>0&&s.jsxs("p",{className:"text-xs text-gray-500 mt-1 flex items-center gap-1",children:[s.jsx(Yn,{className:"w-3 h-3 fill-yellow-400"})," ",g.average_rating.toFixed(1)]})]})]})},g.id)})]})]})}var iw="Radio",[sH,uE]=rn(iw),[nH,rH]=sH(iw),hE=b.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:c,disabled:d,value:h="on",onCheck:m,form:x,...p}=e,[g,w]=b.useState(null),N=gt(t,C=>w(C)),j=b.useRef(!1),_=g?x||!!g.closest("form"):!0;return s.jsxs(nH,{scope:n,checked:i,disabled:d,children:[s.jsx(Ze.button,{type:"button",role:"radio","aria-checked":i,"data-state":gE(i),"data-disabled":d?"":void 0,disabled:d,value:h,...p,ref:N,onClick:Oe(e.onClick,C=>{i||m==null||m(),_&&(j.current=C.isPropagationStopped(),j.current||C.stopPropagation())})}),_&&s.jsx(pE,{control:g,bubbles:!j.current,name:r,value:h,checked:i,required:c,disabled:d,form:x,style:{transform:"translateX(-100%)"}})]})});hE.displayName=iw;var fE="RadioIndicator",mE=b.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,c=rH(fE,n);return s.jsx(wr,{present:r||c.checked,children:s.jsx(Ze.span,{"data-state":gE(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:t})})});mE.displayName=fE;var iH="RadioBubbleInput",pE=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},c)=>{const d=b.useRef(null),h=gt(d,c),m=Ng(n),x=wg(t);return b.useEffect(()=>{const p=d.current;if(!p)return;const g=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(g,"checked").set;if(m!==n&&N){const j=new Event("click",{bubbles:r});N.call(p,n),p.dispatchEvent(j)}},[m,n,r]),s.jsx(Ze.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:h,style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});pE.displayName=iH;function gE(e){return e?"checked":"unchecked"}var aH=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vg="RadioGroup",[oH]=rn(Vg,[Wd,uE]),xE=Wd(),yE=uE(),[lH,cH]=oH(Vg),vE=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:c,required:d=!1,disabled:h=!1,orientation:m,dir:x,loop:p=!0,onValueChange:g,...w}=e,N=xE(n),j=Vd(x),[_,C]=vr({prop:c,defaultProp:i??null,onChange:g,caller:Vg});return s.jsx(lH,{scope:n,name:r,required:d,disabled:h,value:_,onValueChange:C,children:s.jsx(mb,{asChild:!0,...N,orientation:m,dir:j,loop:p,children:s.jsx(Ze.div,{role:"radiogroup","aria-required":d,"aria-orientation":m,"data-disabled":h?"":void 0,dir:j,...w,ref:t})})})});vE.displayName=Vg;var bE="RadioGroupItem",wE=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,c=cH(bE,n),d=c.disabled||r,h=xE(n),m=yE(n),x=b.useRef(null),p=gt(t,x),g=c.value===i.value,w=b.useRef(!1);return b.useEffect(()=>{const N=_=>{aH.includes(_.key)&&(w.current=!0)},j=()=>w.current=!1;return document.addEventListener("keydown",N),document.addEventListener("keyup",j),()=>{document.removeEventListener("keydown",N),document.removeEventListener("keyup",j)}},[]),s.jsx(pb,{asChild:!0,...h,focusable:!d,active:g,children:s.jsx(hE,{disabled:d,required:c.required,checked:g,...m,...i,name:c.name,ref:p,onCheck:()=>c.onValueChange(i.value),onKeyDown:Oe(N=>{N.key==="Enter"&&N.preventDefault()}),onFocus:Oe(i.onFocus,()=>{var N;w.current&&((N=x.current)==null||N.click())})})})});wE.displayName=bE;var dH="RadioGroupIndicator",_E=b.forwardRef((e,t)=>
512{const{__scopeRadioGroup:n,...r}=e,i=yE(n);return s.jsx(mE,{...i,...r,ref:t})});_E.displayName=dH;var jE=vE,NE=wE,uH=_E;const aw=b.forwardRef(({className:e,...t},n)=>s.jsx(jE,{className:We("grid gap-2",e),...t,ref:n}));aw.displayName=jE.displayName;const Dh=b.forwardRef(({className:e,...t},n)=>s.jsx(NE,{ref:n,className:We("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(uH,{className:"flex items-center justify-center",children:s.jsx(W0,{className:"h-3.5 w-3.5 fill-primary"})})}));Dh.displayName=NE.displayName;function hH({onDeliveryChange:e,isPickup:t=!1,location:n}){const[r,i]=b.useState("self"),[c,d]=b.useState({address:t&&n?n.address:"",time:""}),h=25,m=p=>{i(p),e(p==="delivery"?{delivery_requested:!0,delivery_address:c.address,delivery_time:c.time,delivery_fee:h}:{delivery_requested:!1,delivery_address:"",delivery_time:"",delivery_fee:0})},x=(p,g)=>{const w={...c,[p]:g};d(w),r==="delivery"&&e({delivery_requested:!0,delivery_address:w.address,delivery_time:w.time,delivery_fee:h})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Bag Drop-off Options"}),s.jsxs(aw,{value:r,onValueChange:m,children:[s.jsx(oe,{className:`cursor-pointer transition-all ${r==="self"?"border-2 border-blue-600 bg-blue-50":"border-2 border-gray-200"}`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Dh,{value:"self",id:"self",className:"mt-1"}),s.jsxs(te,{htmlFor:"self",className:"flex-1 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Q0,{className:"w-5 h-5 text-gray-700"}),s.jsx("span",{className:"font-semibold text-lg",children:"I'll drop my own bags at the selected Partner location"})]}),s.jsx("p",{className:"text-sm text-gray-600",children:t?"Drop off your bags directly at the partner location":"Pick up your bags from the partner location"})]})]})})}),s.jsx(oe,{className:`cursor-pointer transition-all ${r==="delivery"?"border-2 border-blue-600 bg-blue-50":"border-2 border-gray-200"}`,children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Dh,{value:"delivery",id:"delivery",className:"mt-1"}),s.jsxs(te,{htmlFor:"delivery",className:"flex-1 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Ut,{className:"w-5 h-5 text-blue-600"}),s.jsx("span",{className:"font-semibold text-lg",children:t?"SCHEDULE LUGGAGE PICK UP":"DELIVER BAGS TO MY RENTAL"}),s.jsxs("span",{className:"text-blue-600 font-bold",children:["+$",h.toFixed(2)]})]}),s.jsx("p",{className:"text-sm text-gray-600",children:"UberDirect will deliver your bags to your desired time & address"})]})]}),r==="delivery"&&s.jsxs(me,{className:"space-y-4 pt-4 px-0",children:[s.jsxs("div",{children:[s.jsxs(te,{htmlFor:"delivery-address",className:"flex items-center gap-2 mb-2",children:[s.jsx(jt,{className:"w-4 h-4"}),t?"Pickup Address":"Delivery Address"]}),s.jsx(de,{id:"delivery-address",placeholder:t?"Where should Uber pick up your bags?":"Enter delivery address",value:c.address,onChange:p=>x("address",p.target.value),required:!0,disabled:t})]}),s.jsxs("div",{children:[s.jsxs(te,{htmlFor:"delivery-time",className:"flex items-center gap-2 mb-2",children:[s.jsx(Ts,{className:"w-4 h-4"}),t?"Preferred Pickup Time":"Preferred Delivery Time"]}),s.jsx(de,{id:"delivery-time",type:"datetime-local",value:c.time,onChange:p=>x("time",p.target.value),required:!0})]}),s.jsxs("div",{className:"bg-blue-100 p-3 rounded-lg text-sm text-blue-900",children:[s.jsx("p",{className:"font-semibold",children:t?"✓ Your bags will be delivered to your selected partner location":"✓ Your bags will be delivered to your rental property"}),s.jsx("p",{className:"text-blue-700 mt-1",children:t?"You will receive a receipt when checked in":"Once you have access to your short-term rental, we'll deliver your luggage via Uber Direct"})]})]})]})})]})]})}function fH({formData:e,setFormData:t,selectedLocation:n,isDeparture:r,pricing:i}){var d,h,m,x;const c=p=>{t({...e,...p})};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"start_date_step2",children:"Check-in Date"}),s.jsx(de,{id:"start_date_step2",type:"date",value:e.start_date,min:new Date().toISOString().split("T")[0],onChange:p=>t({...e,start_date:p.target.value}),className:"mt-2",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"end_date_step2",children:"Check-out Date"}),s.jsx(de,{id:"end_date_step2",type:"date",value:e.end_date,min:e.start_date||new Date().toISOString().split("T")[0],onChange:p=>t({...e,end_date:p.target.value}),className:"mt-2",required:!0})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Select Bag Quantities"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"carry_on",children:"Carry-On ($5/day)"}),s.jsxs(ts,{value:(((d=e.bags)==null?void 0:d.carry_on)||0).toString(),onValueChange:p=>t({...e,bags:{...e.bags,carry_on:parseInt(p)}}),children:[s.jsx(qt,{id:"carry_on",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(p=>s.jsx(Ge,{value:p.toString(),children:p},p))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"checked_bag",children:"Checked Bag ($7/day)"}),s.jsxs(ts,{value:(((h=e.bags)==null?void 0:h.checked_bag)||0).toString(),onValueChange:p=>t({...e,bags:{...e.bags,checked_bag:parseInt(p)}}),children:[s.jsx(qt,{id:"checked_bag",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(p=>s.jsx(Ge,{value:p.toString(),children:p},p))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"oversized",children:"Oversized ($10/day)"}),s.jsxs(ts,{value:(((m=e.bags)==null?void 0:m.oversized)||0).toString(),onValueChange:p=>t({...e,bags:{...e.bags,oversized:parseInt(p)}}),children:[s.jsx(qt,{id:"oversized",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(p=>s.jsx(Ge,{value:p.toString(),children:p},p))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"combo",children:"Combo - Carry-On + Checked ($15/day)"}),s.jsxs(ts,{value:(((x=e.bags)==null?void 0:x.combo)||0).toString(),onValueChange:p=>t({...e,bags:{...e.bags,combo:parseInt(p)}}),children:[s.jsx(qt,{id:"combo",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(p=>s.jsx(Ge,{value:p.toString(),children:p},p))})]})]})]}),(()=>{const p=Object.values(e.bags||{}).reduce((g,w)=>g+w,0);return p>0?s.jsxs("div",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded",children:["Total bags: ",s.jsx("span",{className:"font-semibold",children:p})]}):null})()]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_name",children:"Your Name"}),s.jsx(de,{id:"guest_name",type:"text",value:e.guest_name,onChange:p=>t({...e,guest_name:p.target.value}),className:"mt-2",required:!0})]})}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_phone",children:"Phone Number"}),s.jsx(de,{id:"guest_phone",type:"tel",value:e.guest_phone,onChange:p=>t({...e,guest_phone:p.target.value}),className:"mt-2",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"special_requests",children:"Special Requests (Optional)"}),s.jsx(Os,{id:"special_requests",value:e.special_requests,onChange:p=>t({...e,special_requests:p.target.value}),placeholder:"Any special requirements or notes for the host?",className:"mt-2"})]}),s.jsx(hH,{onDeliveryChange:c,isPickup:r,location:n,deliveryFee:e.delivery_fee}),i&&s.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[s.jsxs("p",{className:"text-sm text-gray-600 mb-2",children:[s.jsxs("span",{className:"font-semibold",children:[i.days," day(s)"]})," × ",s.jsxs("span",{className:"font-semibold",children:[e.number_of_bags," bag(s)"]})]}),s.jsxs("p",{className:"text-lg font-bold text-yellow-700",children:["Subtotal: $",i.subtotal.toFixed(2)]})]})]})}function mH({formData:e,selectedLocation:t,pricing:n,isDeparture:r}){const i=new Date(e.start_date).toLocaleDateString(),c=new Date(e.end_date).toLocaleDateString();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"p-6 bg-gradient-to-br from-blue-50 to-blue-100 rounded-lg border border-blue-200",children:[s.jsx("h3",{className:"font-bold text-gray-900 mb-4 text-lg",children:"Booking Summary"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(jt,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:t==null?void 0:t.t
512itle}),s.jsx("p",{className:"text-sm text-gray-600",children:t==null?void 0:t.address})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ds,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsxs("p",{className:"font-semibold text-gray-900",children:[i," to ",c]}),s.jsxs("p",{className:"text-sm text-gray-600",children:[n==null?void 0:n.days," day",(n==null?void 0:n.days)!==1?"s":""]})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ut,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),s.jsx("div",{className:"w-full",children:e.bags?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-semibold text-gray-900 mb-2",children:"Bag Details"}),s.jsxs("div",{className:"space-y-1",children:[e.bags.carry_on>0&&s.jsxs("p",{className:"text-sm text-gray-700",children:["• Carry-On: ",e.bags.carry_on]}),e.bags.checked_bag>0&&s.jsxs("p",{className:"text-sm text-gray-700",children:["• Checked Bag: ",e.bags.checked_bag]}),e.bags.oversized>0&&s.jsxs("p",{className:"text-sm text-gray-700",children:["• Oversized: ",e.bags.oversized]}),e.bags.combo>0&&s.jsxs("p",{className:"text-sm text-gray-700",children:["• Combo: ",e.bags.combo]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"font-semibold text-gray-900",children:[e.number_of_bags," Bag",e.number_of_bags!==1?"s":""]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Storage items"})]})})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ld,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:e.guest_name}),s.jsx("p",{className:"text-sm text-gray-600",children:e.guest_phone})]})]}),e.special_requests&&s.jsxs("div",{className:"pt-4 border-t border-blue-200",children:[s.jsx("p",{className:"text-sm text-gray-600 font-medium mb-1",children:"Special Requests:"}),s.jsx("p",{className:"text-sm text-gray-700 italic",children:e.special_requests})]}),e.delivery_requested&&s.jsxs("div",{className:"pt-4 border-t border-blue-200",children:[s.jsx("p",{className:"text-sm text-gray-600 font-medium mb-1",children:"Delivery Address:"}),s.jsx("p",{className:"text-sm text-gray-700",children:e.delivery_address}),e.delivery_time&&s.jsxs("p",{className:"text-sm text-gray-700 mt-1",children:["Time: ",e.delivery_time]})]})]})]}),n&&s.jsxs(oe,{className:"p-6 bg-gray-50",children:[s.jsxs("h4",{className:"font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx(es,{className:"w-5 h-5 text-green-600"}),"Final Price"]}),s.jsxs("div",{className:"space-y-3",children:[n.breakdown&&n.breakdown.length>0?n.breakdown.map((d,h)=>s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-600",children:[d.type.replace("_"," ").replace(/\b\w/g,m=>m.toUpperCase()),"(",d.qty," × $",d.price,"/day × ",n.days,"d)"]}),s.jsxs("span",{className:"font-medium text-gray-900",children:["$",d.cost.toFixed(2)]})]},h)):s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-600",children:["Storage (",n.days,"d × ",e.number_of_bags," bags)"]}),s.jsxs("span",{className:"font-medium text-gray-900",children:["$",n.subtotal.toFixed(2)]})]}),n.promotion&&s.jsxs("div",{className:"flex justify-between text-sm text-green-600",children:[s.jsxs("span",{children:["Promotion: ",n.promotion.name]}),s.jsxs("span",{children:["-$",n.promotion.discount.toFixed(2)]})]}),e.delivery_requested&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Delivery Service"}),s.jsxs("span",{className:"font-medium text-gray-900",children:["$",e.delivery_fee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm border-t pt-3",children:[s.jsx("span",{className:"text-gray-600",children:"Platform Fee"}),s.jsxs("span",{className:"font-medium text-gray-900",children:["$",n.platformFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-lg font-bold border-t pt-3 text-blue-600",children:[s.jsx("span",{children:"Total Amount"}),s.jsxs("span",{children:["$",n.total.toFixed(2)]})]})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-4",children:"You'll be redirected to a secure payment page to complete your booking."})]})]})}const Jm=[{id:1,label:"Location",icon:Ds},{id:2,label:"Details",icon:Ut},{id:3,label:"Review",icon:es}];function pH({locations:e,onSubmit:t,onClose:n,isDeparture:r=!1,startStep:i=1}){const[c,d]=b.useState(i),[h,m]=b.useState({location_id:e.length===1?e[0].id:"",start_date:"",end_date:"",number_of_bags:1,bags:{carry_on:0,checked_bag:0,oversized:0,combo:0},guest_name:"",guest_phone:"",special_requests:"",delivery_requested:!1,delivery_address:"",delivery_time:"",delivery_fee:0}),[x,p]=b.useState(!1),g=b.useMemo(()=>e.find(D=>D.id===h.location_id),[h.location_id,e]),w=b.useMemo(()=>!g||!h.start_date||!h.end_date?null:XW(g,h.start_date,h.end_date,h.number_of_bags,h.delivery_fee),[g,h.start_date,h.end_date,h.number_of_bags,h.delivery_fee]),N=()=>{c<Jm.length&&d(c+1)},j=()=>{c>1&&d(c-1)},_=async()=>{p(!0),await t(h)},C=h.location_id&&h.start_date&&h.end_date,A=Object.values(h.bags||{}).reduce((D,I)=>D+I,0),M=h.guest_name&&h.guest_phone&&A>0&&h.start_date&&h.end_date,E={1:C,2:M,3:!0};return s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsx(oe,{className:"max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-8",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:r?"Store Bags":"Book Storage"}),s.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),s.jsx("div",{className:"flex gap-4",children:Jm.map((D,I)=>{D.icon;const z=c===D.id,H=c>D.id;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`flex items-center justify-center w-10 h-10 rounded-full font-bold ${H?"bg-green-500 text-white":z?"bg-blue-600 text-white":"bg-gray-200 text-gray-600"}`,children:H?s.jsx(Ld,{className:"w-5 h-5"}):D.id}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:D.label}),s.jsxs("p",{className:"text-xs text-gray-500",children:["Step ",D.id]})]}),I<Jm.length-1&&s.jsx(gr,{className:"w-4 h-4 text-gray-300 ml-2"})]},D.id)})})]}),s.jsxs("div",{className:"mb-8 min-h-[300px]",children:[c===1&&s.jsx(tH,{locations:e,formData:h,setFormData:m,isDeparture:r}),c===2&&s.jsx(fH,{formData:h,setFormData:m,selectedLocation:g,isDeparture:r,pricing:w}),c===3&&s.jsx(mH,{formData:h,selectedLocation:g,pricing:w,isDeparture:r})]}),w&&g&&s.jsxs("div",{className:"mb-8 p-4 bg-blue-50 rounded-lg border border-blue-200",children:[s.jsx("div",{className:"flex items-center justify-between mb-3",children:s.jsxs("p",{className:"font-semibold text-gray-900 flex items-center gap-2",children:[s.jsx(es,{className:"w-4 h-4"}),"Price Breakdown"]})}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between text-gray-600",children:[s.jsxs("span",{children:["Storage (",w.days," days × ",h.number_of_bags," bags)"]}),s.jsxs("span",{children:["$",w.subtotal.toFixed(2)]})]}),w.promotion&&s.jsxs("div",{className:"flex justify-between text-green-600",children:[s.jsxs("span",{children:["Promotion: ",w.promotion.name]}),s.jsxs("span",{children:["-$",w.promotion.discount.toFixed(2)]})]}),h.delivery_requested&&s.jsxs("div",{className:"flex justify-between text-gray-600",children:[s.jsx("span",{children:"Delivery Service"}),s.jsxs("span",{children:["$",h.delivery_fee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-gray-600",children:[s.jsx("span",{children:"Platform Fee"}),s.jsxs("span",{children:["$",w.platformFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between font-bold text-lg border-t pt-2 text-blue-600",children:[s.jsx("span",{children:"Total"}),s.jsxs("span",{children:["$",w.total.toFixed(2)]})]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(G,{type:"button",variant:"outline",onClick:c===i?
512n:j,className:"flex-1 min-h-[44px]",children:[s.jsx(Nk,{className:"w-4 h-4 mr-2"}),c===i?"Cancel":"Back"]}),c<Jm.length?s.jsxs(G,{onClick:N,disabled:!E[c],className:"flex-1 bg-blue-600 hover:bg-blue-700 min-h-[44px]",children:["Next",s.jsx(gr,{className:"w-4 h-4 ml-2"})]}):s.jsx(G,{onClick:_,disabled:x,className:"flex-1 bg-green-600 hover:bg-green-700 min-h-[44px]",children:x?"Processing...":"Confirm Booking"})]})]})})})}const gH={secure_lock:Ct,cctv:Ol,"24_7_access":Ts,indoor:Tn,climate_controlled:Ut,insurance:Tn},xH={secure_lock:"Secure Lock",cctv:"CCTV","24_7_access":"24/7 Access",indoor:"Indoor",climate_controlled:"Climate Control",insurance:"Insurance"};function b0({location:e,onBookClick:t,flowType:n}){var w,N,j,_;const[r,i]=b.useState(!1),[c,d]=b.useState(!1),h=()=>{t&&t()},m=e.price_per_day||((w=e.pricing)==null?void 0:w.carry_on)||5,x=lE(e,m,new Date().toISOString().split("T")[0]),p=x.multipliers.length>0,g=((N=e.promotions)==null?void 0:N.filter(C=>C.active))||[];return s.jsxs(s.Fragment,{children:[s.jsx(oe,{className:"hover:shadow-lg transition-shadow overflow-hidden",children:s.jsx(me,{className:"p-0",children:s.jsxs("div",{className:"flex flex-col md:flex-row",children:[(j=e.images)!=null&&j[0]?s.jsx("div",{className:"md:w-1/3 h-48 md:h-auto",children:s.jsx("img",{src:e.images[0],alt:e.title,className:"w-full h-full object-cover"})}):s.jsx("div",{className:"md:w-1/3 h-48 md:h-auto bg-gradient-to-br from-blue-100 to-blue-50 flex items-center justify-center",children:s.jsx(Ut,{className:"w-16 h-16 text-blue-300"})}),s.jsxs("div",{className:"flex-1 p-6",children:[s.jsxs("div",{className:"flex justify-between items-start mb-3",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-1 cursor-pointer hover:text-blue-600",onClick:()=>i(!0),children:e.title}),s.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[s.jsxs("span",{className:"flex items-center text-gray-600",children:[s.jsx(jt,{className:"w-4 h-4 mr-1"}),e.address,", ",e.city]}),e.average_rating>0&&s.jsxs("span",{className:"flex items-center text-yellow-600 font-semibold",children:[s.jsx(Yn,{className:"w-4 h-4 mr-1 fill-yellow-400"}),e.average_rating.toFixed(1)," (",e.total_reviews,")"]})]})]}),s.jsx("div",{className:"text-right",children:s.jsxs("div",{className:"flex flex-col items-end gap-1",children:[g.length>0&&s.jsx(rw,{promotion:g[0],size:"sm"}),s.jsxs("div",{className:"flex items-center gap-2",children:[p&&s.jsxs("span",{className:"text-sm text-gray-400 line-through",children:["$",m]}
vendor: 13,512 bytes, line 512
512),s.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:["$",x.price.toFixed(2)]})]}),s.jsx("div",{className:"text-xs text-gray-500",children:"per bag/day"}),p&&s.jsx(ot,{variant:"outline",className:"text-xs border-orange-500 text-orange-700",children:x.multipliers[0].type})]})})]}),s.jsx("p",{className:"text-gray-600 mb-4 line-clamp-2",children:e.description}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:(_=e.amenities)==null?void 0:_.map(C=>{const A=gH[C];return s.jsxs(ot,{variant:"secondary",className:"flex items-center gap-1",children:[A&&s.jsx(A,{className:"w-3 h-3"}),xH[C]]},C)})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"text-sm text-gray-600",children:[s.jsx(Ut,{className:"w-4 h-4 inline mr-1"}),e.available_spots," / ",e.capacity," spots available"]}),s.jsx(G,{onClick:()=>d(!0),className:"bg-blue-600 hover:bg-blue-700 min-h-[48px] px-6 text-base",disabled:e.available_spots===0,children:e.available_spots===0?"Fully Booked":"Book Now"})]}),e.airport_latitude&&e.airport_longitude&&s.jsx(JW,{startLat:e.airport_latitude,startLng:e.airport_longitude,endLat:e.latitude,endLng:e.longitude,locationName:e.title})]})]})]})})}),r&&s.jsx(GW,{location:e,onClose:()=>i(!1),onBook:()=>{i(!1),h()}}),c&&s.jsx(pH,{locations:[e],startStep:2,onSubmit:C=>{d(!1)},onClose:()=>d(!1)})]})}var w0=["Enter"," "],yH=["ArrowDown","PageUp","Home"],SE=["ArrowUp","PageDown","End"],vH=[...yH,...SE],bH={ltr:[...w0,"ArrowRight"],rtl:[...w0,"ArrowLeft"]},wH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},lf="Menu",[Oh,_H,jH]=fg(lf),[Jl,kE]=rn(lf,[jH,_g,Wd]),Wg=_g(),CE=Wd(),[NH,ec]=Jl(lf),[SH,cf]=Jl(lf),PE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:c,modal:d=!0}=e,h=Wg(t),[m,x]=b.useState(null),p=b.useRef(!1),g=Ni(c),w=Vd(i);return b.useEffect(()=>{const N=()=>{p.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>p.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),s.jsx(ZC,{...h,children:s.jsx(NH,{scope:t,open:n,onOpenChange:g,content:m,onContentChange:x,children:s.jsx(SH,{scope:t,onClose:b.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:p,dir:w,modal:d,children:r})})})};PE.displayName=lf;var kH="MenuAnchor",ow=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Wg(n);return s.jsx(KC,{...i,...r,ref:t})});ow.displayName=kH;var lw="MenuPortal",[CH,TE]=Jl(lw,{forceMount:void 0}),EE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,c=ec(lw,t);return s.jsx(CH,{scope:t,forceMount:n,children:s.jsx(wr,{present:n||c.open,children:s.jsx(jg,{asChild:!0,container:i,children:r})})})};EE.displayName=lw;var yr="MenuContent",[PH,cw]=Jl(yr),AE=b.forwardRef((e,t)=>{const n=TE(yr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,c=ec(yr,e.__scopeMenu),d=cf(yr,e.__scopeMenu);return s.jsx(Oh.Provider,{scope:e.__scopeMenu,children:s.jsx(wr,{present:r||c.open,children:s.jsx(Oh.Slot,{scope:e.__scopeMenu,children:d.modal?s.jsx(TH,{...i,ref:t}):s.jsx(EH,{...i,ref:t})})})})}),TH=b.forwardRef((e,t)=>{const n=ec(yr,e.__scopeMenu),r=b.useRef(null),i=gt(t,r);return b.useEffect(()=>{const c=r.current;if(c)return kb(c)},[]),s.jsx(dw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),EH=b.forwardRef((e,t)=>{const n=ec(yr,e.__scopeMenu);return s.jsx(dw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),AH=Wl("MenuContent.ScrollLock"),dw=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:x,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:w,onDismiss:N,disableOutsideScroll:j,..._}=e,C=ec(yr,n),A=cf(yr,n),M=Wg(n),E=CE(n),D=_H(n),[I,z]=b.useState(null),H=b.useRef(null),V=gt(t,H,C.onContentChange),Q=b.useRef(0),J=b.useRef(""),le=b.useRef(0),xe=b.useRef(null),Me=b.useRef("right"),ke=b.useRef(0),He=j?kg:b.Fragment,ye=j?{as:AH,allowPinchZoom:!0}:void 0,_e=ce=>{var he,Re;const ne=J.current+ce,U=D().filter(qe=>!qe.disabled),ie=document.activeElement,je=(he=U.find(qe=>qe.ref.current===ie))==null?void 0:he.textValue,be=U.map(qe=>qe.textValue),Se=VH(be,ne,je),Ne=(Re=U.find(qe=>qe.textValue===Se))==null?void 0:Re.ref.current;(function qe(Je){J.current=Je,window.clearTimeout(Q.current),Je!==""&&(Q.current=window.setTimeout(()=>qe(""),1e3))})(ne),Ne&&setTimeout(()=>Ne.focus())};b.useEffect(()=>()=>window.clearTimeout(Q.current),[]),xb();const B=b.useCallback(ce=>{var U,ie;return Me.current===((U=xe.current)==null?void 0:U.side)&&HH(ce,(ie=xe.current)==null?void 0:ie.area)},[]);return s.jsx(PH,{scope:n,searchRef:J,onItemEnter:b.useCallback(ce=>{B(ce)&&ce.preventDefault()},[B]),onItemLeave:b.useCallback(ce=>{var ne;B(ce)||((ne=H.current)==null||ne.focus(),z(null))},[B]),onTriggerLeave:b.useCallback(ce=>{B(ce)&&ce.preventDefault()},[B]),pointerGraceTimerRef:le,onPointerGraceIntentChange:b.useCallback(ce=>{xe.current=ce},[]),children:s.jsx(He,{...ye,children:s.jsx(gg,{asChild:!0,trapped:i,onMountAutoFocus:Oe(c,ce=>{var ne;ce.preventDefault(),(ne=H.current)==null||ne.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:s.jsx(pg,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:x,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:w,onDismiss:N,children:s.jsx(mb,{asChild:!0,...E,dir:A.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:z,onEntryFocus:Oe(m,ce=>{A.isUsingKeyboardRef.current||ce.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(QC,{role:"menu","aria-orientation":"vertical","data-state":qE(C.open),"data-radix-menu-content":"",dir:A.dir,...M,..._,ref:V,style:{outline:"none",..._.style},onKeyDown:Oe(_.onKeyDown,ce=>{const U=ce.target.closest("[data-radix-menu-content]")===ce.currentTarget,ie=ce.ctrlKey||ce.altKey||ce.metaKey,je=ce.key.length===1;U&&(ce.key==="Tab"&&ce.preventDefault(),!ie&&je&&_e(ce.key));const be=H.current;if(ce.target!==be||!vH.includes(ce.key))return;ce.preventDefault();const Ne=D().filter(he=>!he.disabled).map(he=>he.ref.current);SE.includes(ce.key)&&Ne.reverse(),$H(Ne)}),onBlur:Oe(e.onBlur,ce=>{ce.currentTarget.contains(ce.target)||(window.clearTimeout(Q.current),J.current="")}),onPointerMove:Oe(e.onPointerMove,Ih(ce=>{const ne=ce.target,U=ke.current!==ce.clientX;if(ce.currentTarget.contains(ne)&&U){const ie=ce.clientX>ke.current?"right":"left";Me.current=ie,ke.current=ce.clientX}}))})})})})})})});AE.displayName=yr;var MH="MenuGroup",uw=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{role:"group",...r,ref:t})});uw.displayName=MH;var RH="MenuLabel",ME=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{...r,ref:t})});ME.displayName=RH;var Vp="MenuItem",$1="menu.itemSelect",Hg=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,c=b.useRef(null),d=cf(Vp,e.__scopeMenu),h=cw(Vp,e.__scopeMenu),m=gt(t,c),x=b.useRef(!1),p=()=>{const g=c.current;if(!n&&g){const w=new CustomEvent($1,{bubbles:!0,cancelable:!0});g.addEventListener($1,N=>r==null?void 0:r(N),{once:!0}),rC(g,w),w.defaultPrevented?x.current=!1:d.onClose()}};return s.jsx(RE,{...i,ref:m,disabled:n,onClick:Oe(e.onClick,p),onPointerDown:g=>{var w;(w=e.onPointerDown)==null||w.call(e,g),x.current=!0},onPointerUp:Oe(e.onPointerUp,g=>{var w;x.current||(w=g.currentTarget)==null||w.click()}),onKeyDown:Oe(e.onKeyDown,g=>{const w=h.searchRef.current!=="";n||w&&g.key===" "||w0.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Hg.displayName=Vp;var RE=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...c}=e,d=cw(Vp,n),h=CE(n),m=b.useRef(null),x=gt(t,m),[p,g]=b.useState(!1),[w,N]=b.useState("");return b.useEffect(()=>{const j=m.current;j&&N((j.textContent??"").trim())},[c.children]),s.jsx(Oh.ItemSlot,{scope:n,disabled:r,textValue:i??w,children:s.jsx(pb,{asChild:!0,...h,focusable:!r,children:s.jsx(Ze.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:x,onPointerMove:Oe(e.onPointerMove,Ih(j=>{r?d.onItemLeave(j):(d.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,Ih(j=>d.onItemLeave(j))),onFocus:Oe(e.onFocus,()=>g(!0)),onBlur:Oe(e.onBlur,()=>g(!1))})})})}),LH="MenuCheckboxItem",LE=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return s.jsx(BE,{scope:e.__scopeMenu,checked:n,children:s.jsx(Hg,{role:"menuitemcheckbox","aria-checked":Wp(n)?"mixed":n,...i,ref:t,"data-state":fw(n),onSelect:Oe(i.onSelect,()=>r==null?void 0:r(Wp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});LE.displayName=LH;var DE="MenuRadioGroup",[DH,OH]=Jl(DE,{value:void 0,onValueChange:()=>{}}),OE=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,c=Ni(r);return s.jsx(DH,{scope:e.__scopeMenu,value:n,onValueChange:c,children:s.jsx(uw,{...i,ref:t})})});OE.displayName=DE;var IE="MenuRadioItem",FE=b.forwardRef((e,t)=>{const{value:n,...r}=e,i=OH(IE,e.__scopeMenu),c=n===i.value;return s.jsx(BE,{scope:e.__scopeMenu,checked:c,children:s.jsx(Hg,{role:"menuitemradio","aria-checked":c,...r,ref:t,"data-state":fw(c),onSelect:Oe(r.onSelect,()=>{var d;return(d=i.onValueChange)==null?void 0:d.call(i,n)},{checkForDefaultPrevented:!1})})})});FE.displayName=IE;var hw="MenuItemIndicator",[BE,IH]=Jl(hw,{checked:!1}),zE=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,c=IH(hw,n);return s.jsx(wr,{present:r||Wp(c.checked)||c.checked===!0,children:s.jsx(Ze.span,{...i,ref:t,"data-state":fw(c.checked)})})});zE.displayName=hw;var FH="MenuSeparator",$E=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});$E.displayName=FH;var BH="MenuArrow",UE=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Wg(n);return s.jsx(XC,{...i,...r,ref:t})});UE.displayName=BH;var zH="MenuSub",[pee,VE]=Jl(zH),dh="MenuSubTrigger",WE=b.forwardRef((e,t)=>{const n=ec(dh,e.__scopeMenu),r=cf(dh,e.__scopeMenu),i=VE(dh,e.__scopeMenu),c=cw(dh,e.__scopeMenu),d=b.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=c,x={__scopeMenu:e.__scopeMenu},p=b.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return b.useEffect(()=>p,[p]),b.useEffect(()=>{const g=h.current;return()=>{window.clearTimeout(g),m(null)}},[h,m]),s.jsx(ow,{asChild:!0,...x,children:s.jsx(RE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":qE(n.open),...e,ref:hg(t,i.onTriggerChange),onClick:g=>{var w;(w=e.onClick)==null||w.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,Ih(g=>{c.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Oe(e.onPointerLeave,Ih(g=>{var N,j;p();const w=(N=n.content)==null?void 0:N.getBoundingClientRect();if(w){const _=(j=n.content)==null?void 0:j.dataset.side,C=_==="right",A=C?-5:5,M=w[C?"left":"right"],E=w[C?"right":"left"];c.onPointerGraceIntentChange({area:[{x:g.clientX+A,y:g.clientY},{x:M,y:w.top},{x:E,y:w.top},{x:E,y:w.bottom},{x:M,y:w.bottom}],side:_}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(g),g.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,g=>{var N;const w=c.searchRef.current!=="";e.disabled||w&&g.key===" "||bH[r.dir].includes(g.key)&&(n.onOpenChange(!0),(N=n.content)==null||N.focus(),g.preventDefault())})})})});WE.displayName=dh;var HE="MenuSubContent",YE=b.forwardRef((e,t)=>{const n=TE(yr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,c=ec(yr,e.__scopeMenu),d=cf(yr,e.__scopeMenu),h=VE(HE,e.__scopeMenu),m=b.useRef(null),x=gt(t,m);return s.jsx(Oh.Provider,{scope:e.__scopeMenu,children:s.jsx(wr,{present:r||c.open,children:s.jsx(Oh.Slot,{scope:e.__scopeMenu,children:s.jsx(dw,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:x,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var g;d.isUsingKeyboardRef.current&&((g=m.current)==null||g.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,p=>{p.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,p=>{d.onClose(),p.preventDefault()}),onKeyDown:Oe(e.onKeyDown,p=>{var N;const g=p.currentTarget.contains(p.target),w=wH[d.dir].includes(p.key);g&&w&&(c.onOpenChange(!1),(N=h.trigger)==null||N.focus(),p.preventDefault())})})})})})});YE.displayName=HE;function qE(e){return e?"open":"closed"}function Wp(e){return e==="indeterminate"}function fw(e){return Wp(e)?"indeterminate":e?"checked":"unchecked"}function $H(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function UH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}
vendor: 4,221 bytes, line 512
512function VH(e,t,n){const i=t.length>1&&Array.from(t).every(x=>x===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let d=UH(e,Math.max(c,0));i.length===1&&(d=d.filter(x=>x!==n));const m=d.find(x=>x.toLowerCase().startsWith(i.toLowerCase()));return m!==n?m:void 0}function WH(e,t){const{x:n,y:r}=e;let i=!1;for(let c=0,d=t.length-1;c<t.length;d=c++){const h=t[c],m=t[d],x=h.x,p=h.y,g=m.x,w=m.y;p>r!=w>r&&n<(g-x)*(r-p)/(w-p)+x&&(i=!i)}return i}function HH(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return WH(n,t)}function Ih(e){return t=>t.pointerType==="mouse"?e(t):void 0}var YH=PE,qH=ow,GH=EE,ZH=AE,KH=uw,QH=ME,XH=Hg,JH=LE,eY=OE,tY=FE,sY=zE,nY=$E,rY=UE,iY=WE,aY=YE,Yg="DropdownMenu",[oY]=rn(Yg,[kE]),mn=kE(),[lY,GE]=oY(Yg),ZE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:c,onOpenChange:d,modal:h=!0}=e,m=mn(t),x=b.useRef(null),[p,g]=vr({prop:i,defaultProp:c??!1,onChange:d,caller:Yg});return s.jsx(lY,{scope:t,triggerId:xr(),triggerRef:x,contentId:xr(),open:p,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(w=>!w),[g]),modal:h,children:s.jsx(YH,{...m,open:p,onOpenChange:g,dir:r,modal:h,children:n})})};ZE.displayName=Yg;var KE="DropdownMenuTrigger",QE=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,c=GE(KE,n),d=mn(n);return s.jsx(qH,{asChild:!0,...d,children:s.jsx(Ze.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:hg(t,c.triggerRef),onPointerDown:Oe(e.onPointerDown,h=>{!r&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:Oe(e.onKeyDown,h=>{r||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});QE.displayName=KE;var cY="DropdownMenuPortal",XE=e=>{const{__scopeDropdownMenu:t,...n}=e,r=mn(t);return s.jsx(GH,{...r,...n})};XE.displayName=cY;var JE="DropdownMenuContent",eA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=GE(JE,n),c=mn(n),d=b.useRef(!1);return s.jsx(ZH,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,h=>{var m;d.current||(m=i.triggerRef.current)==null||m.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,h=>{const m=h.detail.originalEvent,x=m.button===0&&m.ctrlKey===!0,p=m.button===2||x;(!i.modal||p)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eA.displayName=JE;var dY="DropdownMenuGroup",uY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(KH,{...i,...r,ref:t})});uY.displayName=dY;var hY="DropdownMenuLabel",tA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(QH,{...i,...r,ref:t})});tA.displayName=hY;var fY="DropdownMenuItem",sA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(XH,{...i,...r,ref:t})});sA.displayName=fY;var mY="DropdownMenuCheckboxItem",nA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(JH,{...i,...r,ref:t})});nA.displayName=mY;var pY="DropdownMenuRadioGroup",gY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(eY,{...i,...r,ref:t})});gY.displayName=pY;var xY="DropdownMenuRadioItem",rA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(tY,{...i,...r,ref:t})});rA.displayName=xY;var yY="DropdownMenuItemIndicator",iA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(sY,{...i,...r,ref:t})});iA.displayName=yY;var vY="DropdownMenuSeparator",aA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(nY,{...i,...r,ref:t})});aA.displayName=vY;var bY="DropdownMenuArrow",wY=b.forwardRef((e,t)=>
512{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(rY,{...i,...r,ref:t})});wY.displayName=bY;var _Y="DropdownMenuSubTrigger",oA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(iY,{...i,...r,ref:t})});oA.displayName=_Y;var jY="DropdownMenuSubContent",lA=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mn(n);return s.jsx(aY,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lA.displayName=jY;var NY=ZE,SY=QE,kY=XE,cA=eA,dA=tA,uA=sA,hA=nA,fA=rA,mA=iA,pA=aA,gA=oA,xA=lA;const CY=NY,PY=SY,TY=b.forwardRef(({className:e,inset:t,children:n,...r},i)=>s.jsxs(gA,{ref:i,className:We("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,s.jsx(gr,{className:"ml-auto"})]}));TY.displayName=gA.displayName;const EY=b.forwardRef(({className:e,...t},n)=>s.jsx(xA,{ref:n,className:We("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));EY.displayName=xA.displayName;const yA=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(kY,{children:s.jsx(cA,{ref:r,sideOffset:t,className:We("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yA.displayName=cA.displayName;const vA=b.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(uA,{ref:r,className:We("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));vA.displayName=uA.displayName;const AY=b.forwardRef(({className:e,children:t,checked:n,...r},i)=>s.jsxs(hA,{ref:i,className:We("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(mA,{children:s.jsx(Ld,{className:"h-4 w-4"})})}),t]}));AY.displayName=hA.displayName;const MY=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(fA,{ref:r,className:We("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(mA,{children:s.jsx(W0,{className:"h-2 w-2 fill-current"})})}),t]}));MY.displayName=fA.displayName;const RY=b.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(dA,{ref:r,className:We("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));RY.displayName=dA.displayName;const LY=b.forwardRef(({className:e,...t},n)=>s.jsx(pA,{ref:n,className:We("-mx-1 my-1 h-px bg-muted",e),...t}));LY.displayName=pA.displayName;const U1=[{id:"google",name:"Google Maps",icon:"🗺️"},{id:"apple",name:"Apple Maps",icon:"🍎"},{id:"waze",name:"Waze",icon:"🚗"},{id:"uber",name:"Uber",icon:"🚖"}];function V1({location:e,fromLocation:t=null,className:n=""}){const[r,i]=b.useState("google"),[c,d]=b.useState(null);b.useEffect(()=>{const p=localStorage.getItem("preferredMapApp");p&&i(p),"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(g=>{d({lat:g.coords.latitude,lng:g.coords.longitude})},g=>{console.log("Geolocation not available:",g)})},[]);const h=p=>{i(p),localStorage.setItem("preferredMapApp",p)},m=(p=r)=>{const g=e.latitude,w=e.longitude,N=encodeURIComponent(e.title);encodeURIComponent(e.address);let j,_,C;t?(j=t.latitude,_=t.longitude,C=encodeURIComponent(t.name||"Airport")):c&&(j=c.lat,_=c.lng,C="Current Location");let A;switch(p){case"google":j?A=`https://www.google.com/maps/dir/?api=1&origin=${j},${_}&destination=${g},${w}&travelmode=driving`:A=`https://www.google.com/maps/search/?api=1&query=${g},${w}`;break;case"apple":j?A=`http://maps.apple.com/?saddr=${j},${_}&daddr=${g},${w}&dirflg=d`:A=`http://maps.apple.com/?q=${N}&ll=${g},${w}`;break;case"waze":A=`https://waze.com/ul?ll=${g},${w}&navigate=yes`;break;case"uber":const M=j?`pickup[latitude]=${j}&pickup[longitude]=${_}&pickup[nickname]=${C}`:"",E=`uber://?action=setPickup&${M}&dropoff[latitude]=${g}&dropoff[longitude]=${w}&dropoff[nickname]=${N}`,D=`https://m.uber.com/ul/?${M}&dropoff[latitude]=${g}&dropoff[longitude]=${w}`;window.location.href=E,setTimeout(()=>{window.open(D,"_blank")},1e3);return}window.open(A,"_blank")},x=U1.find(p=>p.id===r);return s.jsxs("div",{className:n,children:[s.jsxs(CY,{children:[s.jsx(PY,{asChild:!0,children:s.jsxs(G,{variant:"outline",className:"w-full",children:[s.jsx(kk,{className:"w-4 h-4 mr-2"}),"Get Directions (",x==null?void 0:x.icon," ",x==null?void 0:x.name,")"]})}),s.jsxs(yA,{align:"end",className:"w-48",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-gray-500",children:"Choose Map App"}),U1.map(p=>s.jsxs(vA,{onClick:()=>{h(p.id),m(p.id)},className:"cursor-pointer",children:[s.jsx("span",{className:"mr-2",children:p.icon}),p.name,p.id===r&&s.jsx("span",{className:"ml-auto text-green-600",children:"✓"})]}
512,p.id))]})]}),s.jsxs(G,{onClick:()=>m(),className:"w-full mt-2 bg-blue-600 hover:bg-blue-700",children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"Open in ",x==null?void 0:x.name]})]})}function DY({location:e,onClose:t,onSuccess:n,flowType:r}){var N,j;const[i,c]=b.useState({start_date:"",end_date:"",bags:{carry_on:0,checked_bag:0,oversized:0,combo:0},guest_name:"",guest_phone:"",special_requests:"",delivery_requested:!1,delivery_address:"",delivery_time:"",delivery_fee:0}),[d,h]=b.useState(!1);b.useEffect(()=>{m()},[]);const m=async()=>{try{if(await X.auth.isAuthenticated()){const C=await X.auth.me();c(A=>{var M;return{...A,guest_name:C.full_name||"",guest_phone:C.phone||"",special_requests:((M=C.preferences)==null?void 0:M.special_requests)||"",delivery_address:C.default_delivery_address||e.address||""}})}else c(C=>({...C,delivery_address:e.address||""}))}catch(_){console.error("Error loading user data:",_),c(C=>({...C,delivery_address:e.address||""}))}},x=25;b.useEffect(()=>{c(_=>({..._,delivery_requested:!0,delivery_fee:x}))},[]);const g=(()=>{if(!i.start_date||!i.end_date)return null;const _=Math.ceil((new Date(i.end_date)-new Date(i.start_date))/(1e3*60*60*24)),C={carry_on:5,checked_bag:7,oversized:10,combo:15};let A=0;const M=[];Object.keys(i.bags).forEach(z=>{const H=i.bags[z];if(H>0){const V=C[z]*H*_;A+=V,M.push({type:z,qty:H,price:C[z],cost:V})}});const E=Object.values(i.bags).reduce((z,H)=>z+H,0),D=2,I=A+i.delivery_fee+D;return{days:_,subtotal:A,breakdown:M,totalBags:E,platformFee:D,deliveryFee:i.delivery_fee,total:I}})(),w=async _=>{var C;_.preventDefault(),h(!0);try{if(window.self!==window.top){alert("Checkout is only available in the published app. Please open the app in a new tab to complete your booking."),h(!1);return}if(!await X.auth.isAuthenticated()){const H={location_id:e.id,start_date:i.start_date,end_date:i.end_date,number_of_bags:i.number_of_bags,guest_name:i.guest_name,guest_phone:i.guest_phone,special_requests:i.special_requests,delivery_requested:i.delivery_requested,delivery_address:i.delivery_address,delivery_time:i.delivery_time,delivery_fee:i.delivery_fee};localStorage.setItem("pendingBooking",JSON.stringify(H)),localStorage.setItem("pendingLocationData",JSON.stringify({id:e.id,title:e.title,address:e.address,city:e.city,price_per_day:e.price_per_day})),X.auth.redirectToLogin(window.location.href);return}const M=await X.auth.me();await X.auth.updateMe({phone:i.guest_phone,default_delivery_address:i.delivery_address,preferences:{special_requests:i.special_requests}});const E=Object.values(i.bags).reduce((H,V)=>H+V,0);if(E===0){alert("Please select at least one bag"),h(!1);return}const D={start_date:i.start_date,end_date:i.end_date,number_of_units:E,bags:i.bags,guest_name:i.guest_name,guest_phone:i.guest_phone,guest_email:M.email,special_requests:i.special_requests,pickup_requested:!1,delivery_requested:i.delivery_requested,delivery_address:i.delivery_address,delivery_time:i.delivery_time},I={id:e.id,title:e.title,address:e.address,price_per_day:e.price_per_day||((C=e.pricing)==null?void 0:C.carry_on)||5},z=await X.functions.invoke("createCheckout",{booking:D,location:I});if(z.data.url)localStorage.removeItem("pendingBooking"),localStorage.removeItem("pendingLocationData"),r==="stow_n_go"&&(localStorage.setItem("stowNGoLocation",JSON.stringify({latitude:e.latitude,longitude:e.longitude,name:e.title,airport_latitude:e.airport_latitude,airport_longitude:e.airport_longitude,nearest_airport:e.nearest_airport})),localStorage.setItem("redirectToUberAfterCheckout","true")),window.location.href=z.data.url;else throw new Error("Failed to create checkout session")}catch(A){console.error("Error creating checkout:",A),alert("Error creating checkout. Please try again."),h(!1)}};return s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsx(oe,{className:"max-w-md w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Book Storage"}),s.jsx(G,{variant:"ghost",size:"icon",onClick:t,children:s.jsx(Io,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"mb-6 p-4 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:e.title}),s.jsx("p",{className:"text-sm text-gray-600",children:e.address})]}),(N=e.promotions)==null?void 0:N.filter(_=>_.active).map(_=>s.jsx(rw,{promotion:_},_.id))]}),s.jsxs("p",{className:"text-lg font-bold text-blue-600 mt-2",children:["Starting at $",e.price_per_day||((j=e.pricing)==null?void 0:j.carry_on)||5," per bag/day"]}),(g==null?void 0:g.multipliers.length)>0&&s.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:g.multipliers.map((_,C)=>s.jsxs(ot,{variant:"outline",className:"text-xs",children:[s.jsx(Ci,{className:"w-3 h-3 mr-1"}),_.type]},C))})]}),s.jsxs("form",{onSubmit:w,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"start_date",children:"Check-in Date"}),s.jsx(de,{id:"start_date",type:"date",required:!0,value:i.start_date,min:new Date().toISOString().split("T")[0],onChange:_=>c({...i,start_date:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"end_date",children:"Check-out Date"}),s.jsx(de,{id:"end_date",type:"date",required:!0,value:i.end_date,min:i.start_date||new Date().toISOString().split("T")[0],onChange:_=>c({...i,end_date:_.target.value})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Select Bag Quantities"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"carry_on",children:"Carry-On ($5/day)"}),s.jsxs(ts,{value:i.bags.carry_on.toString(),onValueChange:_=>c({...i,bags:{...i.bags,carry_on:parseInt(_)}}),children:[s.jsx(qt,{id:"carry_on",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(_=>s.jsx(Ge,{value:_.toString(),children:_},_))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"checked_bag",children:"Checked Bag ($7/day)"}),s.jsxs(ts,{value:i.bags.checked_bag.toString(),onValueChange:_=>c({...i,bags:{...i.bags,checked_bag:parseInt(_)}}),children:[s.jsx(qt,{id:"checked_bag",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(_=>s.jsx(Ge,{value:_.toString(),children:_},_))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"oversized",children:"Oversized ($10/day)"}),s.jsxs(ts,{value:i.bags.oversized.toString(),onValueChange:_=>c({...i,bags:{...i.bags,oversized:parseInt(_)}}),children:[s.jsx(qt,{id:"oversized",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(_=>s.jsx(Ge,{value:_.toString(),children:_},_))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"combo",children:"Combo - Carry-On + Checked ($15/day)"}),s.jsxs(ts,{value:i.bags.combo.toString(),onValueChange:_=>c({...i,bags:{...i.bags,combo:parseInt(_)}}),children:[s.jsx(qt,{id:"combo",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(_=>s.jsx(Ge,{value:_.toString(),children:_},_))})]})]})]}),g&&g.totalBags>0&&s.jsxs("div",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded",children:["Total bags: ",s.jsx("span",{className:"font-semibold",children:g.totalBags})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_name",children:"Your Name"}),s.jsx(de,{id:"guest_name",type:"text",required:!0,value:i.guest_name,onChange:_=>c({...i,guest_name:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_phone",children:"Phone Number"}),s.jsx(de,{id:"guest_phone",type:"tel",required:!0,value:i.guest_phone,onChange:_=>c({...i,guest_phone:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"special_requests",children:"Special Requests (Optional)"}),s.jsx(Os,{id:"special_requests",value:i.special_requests,onChange:_=>c({...i,special_requests:_.target.value}),placeholder:"Any special requirements?"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Delivery to Your Rental/Hotel"}),s.jsx(oe,{className:"border-2 border-blue-600 bg-blue-50",children:s.jsxs(me,{className:"space-y-4 pt-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Ut,{className:"w-5 h-5 text-blue-600"}),s.jsx("span",{className:"font-semibold text-lg",children:"Deliver my bags to my rental/hotel"}),s.jsxs("span",{className:"text-blue-600 font-bold",children:["+$",x.toFixed(2)]})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"UberDirect will pick up your bags from the partner location and deliver them to your address"}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"delivery-address",className:"mb-2 block",children:"Delivery Address *"}),s.jsx(de,{id:"delivery-address",placeholder:"Enter your rental/hotel address",value:i.delivery_address,onChange:_=>c({...i,delivery_address:_.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"delivery-time",className:"mb-2 block",children:"Preferred Delivery Time *"}),s.jsx(de,{id:"delivery-time",type:"datetime-local",value:i.delivery_time,onChange:_=>c({...i,delivery_time:_.target.value}),required:!0})]}),s.jsx("div",{className:"bg-blue-100 p-3 rounded-lg text-sm text-blue-900",children:s.jsx("p",{className:"font-semibold",children:"✓ UberDirect will pickup from partner location and deliver to your address"})})]})})]}),g&&g.totalBags>0&&s.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg space-y-2",children:[g.breakdown.map((_,C)=>s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{children:[_.type.replace("_"," ").replace(/\b\w/g,A=>A.toUpperCase()),"(",_.qty," × $",_.price,"/day × ",g.days," day(s))"]}),s.jsxs("span",{children:["$",_.cost.toFixed(2)]})]},C)),i.delivery_requested&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Delivery Service"}),s.jsxs("span",{children:["$",g.deliveryFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Platform Fee"}),s.jsxs("span",{children:["$",g.platformFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-lg font-bold border-t pt-2",children:[s.jsx("span",{children:"Total:"}),s.jsxs("span",{className:"text-blue-600",children:["$",g.total.toFixed(2)]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"button",variant:"outline",onClick:t,className:"flex-1 min-h-[52px] text-base",children:"Cancel"}),s.jsx(G,{type:"submit",disabled:d||!g||g.totalBags===0,className:"flex-1 bg-blue-600 hover:bg-blue-700 min-h-[52px] text-base",children:d?"Processing...":"Proceed to Payment"})]})]})]})})})}function mw({booking:e}){const[t,n]=b.useState(!1),[r,i]=b.useState(!1),c=async()=>{n(!0);try{const{data:d}=await X.functions.invoke("createUberDirectOrder",{booking_id:e.id});d.success&&(i(!0),Xe.success("UberDirect delivery rescheduled!"))}catch(d){console.error("Error rebooking delivery:",d),Xe.error("Failed to reschedule delivery")}finally{n(!1)}};return r?s.jsxs("div",{className:"flex items-center gap-2 text-green-600 text-sm font-medium",children:[s.jsx(ms,{className:"w-4 h-4"}),"Delivery Rescheduled"]}):s.jsx(G,{onClick:c,disabled:t,variant:"outline",size:"sm",className:"gap-2",children:t?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 animate-spin"}),"Scheduling..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ut,{className:"w-4 h-4"}),"Rebook UberDirect"]})})}function OY(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[i,c]=b.useState(null),[d,h]=b.useState(null),[m,x]=b.useState("closest"),[p,g]=b.useState(!1),[w,N]=b.useState(!1),[j,_]=b.useState(null);b.useEffect(()=>{M(),C(),A()},[]);const C=()=>{const D=localStorage.getItem("pendingBooking"),I=localStorage.getItem("pendingLocationData");if(D&&I){const z=JSON.parse(I),H=setTimeout(()=>{const V=e.find(Q=>Q.id===z.id);V&&c(V)},500);return()=>clearTimeout(H)}},A=async()=>{const D=new URLSearchParams(window.location.search),I=D.get("payment"),z=D.get("location_id");if(I==="success"&&z){N(!0);const H=e.find(V=>V.id===z);if(H){c(H),g(!0);try{const V=await X.auth.me(),Q=await X.entities.Booking.filter({guest_id:V.id,location_id:z},"-created_date",1);Q[0]&&_(Q[0])}catch(V){console.error("Error loading booking:",V)}}window.history.replaceState({},"",window.location.pathname)}},M=async()=>{try{const D=await X.entities.StorageLocation.filter({status:"active"},"-created_date",20);t(D)}catch(D){console.error("Error loading locations:",D)}finally{r(!1)}},E=D=>D.airport_latitude&&D.airport_longitude?{latitude:D.airport_latitude,longitude:D.airport_longitude,name:D.nearest_airport||"Airport"}:null;return n?s.jsx("div",{className:"flex justify-center items-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"relative bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute top-0 left-0 w-full h-full",style:{backgroundImage:"radial-gradient(circle at 2px 2px, white 1px, transparent 0)",backgroundSize:"40px 40px"}})}),s.jsx("div",{className:"relative max-w-7xl mx-auto px-4 py-16 lg:py-24",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsx("div",{className:"inline-block mb-4",children:s.jsx("span",{className:"bg-coral-500 text-white px-4 py-2 rounded-full text-sm font-bold",children:"JUST ARRIVED"})}),s.jsxs("h1",{className:"text-5xl lg:text-7xl font-bold text-white mb-6 leading-tight",children:["Drop Your Bags.",s.jsx("br",{}),s.jsx("span",{className:"text-coral-400",children:"Start Exploring."})]}),s.jsx("p",{className:"text-xl text-blue-100 mb-8 leading-relaxed",children:"Store your luggage securely at verified locations and explore the city hands-free"})]}),s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/bfd6f3017_generated_image.png",alt:"Booking Process Steps - Select Location, Choose Bags, Pick Dates, Confirm",className:"w-full max-w-2xl drop-shadow-2xl rounded-xl"})})]})})]}),s.jsx("div",{className:"bg-white py-12",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4",children:s.jsxs("div",{className:"max-w-5xl mx-auto bg-gray-50 rounded-xl p-8",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6 text-center",children:"How It Works"}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6 text-left",children:[s.jsxs("div",{children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-10 h-10 flex items-center justify-center font-bold text-lg mb-3",children:"1"}),s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Select Your Stow Partner"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Choose from verified storage locations near you"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-10 h-10 flex items-center justify-center font-bold text-lg mb-3",children:"2"}),s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Select Category & Quantities"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Choose bag types and number of items to store"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-10 h-10 flex items-center justify-center font-bold text-lg mb-3",children:"3"}),s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Book & Drop Off"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Complete payment and drop your bags at the location"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-10 h-10 flex items-center justify-center font-bold text-lg mb-3",children:"4"}),s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Optional Delivery"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Add delivery service to have bags brought to your destination"})]}
512)]})]})})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-8",children:[s.jsx("div",{className:"mb-8",children:s.jsxs("div",{className:"flex justify-center gap-4 mb-8",children:[s.jsxs(G,{onClick:()=>x("closest"),variant:m==="closest"?"default":"outline",className:`px-8 py-6 text-lg ${m==="closest"?"bg-blue-600 hover:bg-blue-700":""}`,children:[s.jsx(iD,{className:"w-5 h-5 mr-2"}),"Closest Partners"]}),s.jsxs(G,{onClick:()=>x("book_now"),variant:m==="book_now"?"default":"outline",className:`px-8 py-6 text-lg ${m==="book_now"?"bg-blue-600 hover:bg-blue-700":""}`,children:[s.jsx(Ds,{className:"w-5 h-5 mr-2"}),"Book Now"]})]})}),m==="closest"?s.jsxs("div",{children:[s.jsx("p",{className:"text-center text-gray-600 mb-6",children:"Partners sorted by proximity"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(D=>s.jsxs("div",{className:"relative",children:[s.jsx(b0,{location:D,onBookClick:()=>{c(D),h("book_storage")},flowType:"book_storage"}),s.jsx("div",{className:"mt-3",children:s.jsx(V1,{location:D,fromLocation:E(D)})})]},D.id))})]}):d?s.jsxs("div",{children:[s.jsxs("div",{className:"text-center mb-8 py-12 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>h(null),children:[s.jsx("h1",{className:"text-6xl md:text-7xl font-bold text-blue-600 mb-4",children:d==="book_storage"?"Book Storage":"Stow N Go"}),s.jsx("p",{className:"text-xl text-gray-600",children:"Select the Stow My Bags Partner of your choice!"}),s.jsx("p",{className:"text-sm text-blue-500 mt-2",children:"← Click to go back"})]}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(D=>s.jsxs("div",{className:"relative",children:[s.jsx(b0,{location:D,onBookClick:()=>c(D),flowType:d}),d==="book_storage"&&s.jsx("div",{className:"mt-3",children:s.jsx(V1,{location:D,fromLocation:E(D)})})]},D.id))})]}):s.jsxs("div",{children:[s.jsx("div",{className:"max-w-2xl mx-auto mb-8",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/2f8887709_image.png",alt:"Arrivals - Book Luggage Storage, Luggage Delivery, Uber Transportation",className:"w-full h-auto cursor-pointer hover:opacity-90 transition-opacity rounded-lg",onClick:()=>h("book_storage")})}),s.jsxs("div",{className:"max-w-3xl mx-auto grid md:grid-cols-2 gap-6",children:[s.jsx(oe,{className:"p-8 cursor-pointer hover:shadow-lg transition-shadow border-2 hover:border-blue-500",onClick:()=>h("book_storage"),children:s.jsxs("div",{className:"text-center",children:[s.jsx(jt,{className:"w-16 h-16 text-blue-600 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"BOOK STORAGE"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Store your bags securely at a partner location"}),s.jsxs("ol",{className:"text-left space-y-2 text-sm text-gray-700",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-blue-600",children:"1."}),s.jsx("span",{children:"Select provider"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-blue-600",children:"2."}),s.jsx("span",{children:"Book storage with delivery option"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-blue-600",children:"3."}),s.jsx("span",{children:"Checkout"})]})]})]})}),s.jsx(oe,{className:"p-8 cursor-pointer hover:shadow-lg transition-shadow border-2 hover:border-green-500",onClick:()=>h("stow_n_go"),children:s.jsxs("div",{className:"text-center",children:[s.jsx(wD,{className:"w-16 h-16 text-green-600 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"STOW N GO"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Drop bags and continue to your destination"}),s.jsxs("ol",{className:"text-left space-y-2 text-sm text-gray-700",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"1."}),s.jsx("span",{children:"Select provider"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"2."}),s.jsx("span",{children:"Book luggage with delivery option"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"3."}),s.jsx("span",{children:"Checkout & book Uber ride"})]})]})]})})]})]}),i&&!p&&s.jsx(DY,{location:i,onClose:()=>c(null),onSuccess:()=>{c(null),M()},flowType:d}),p&&i&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsxs("div",{className:"bg-white rounded-xl shadow-xl max-w-md w-full p-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-green-600 mb-4",children:"✓ Payment Confirmed!"}),s.jsx("p",{className:"text-gray-700 mb-6",children:"Your booking is confirmed and UberDirect has been scheduled to pick up your bags from the partner location and deliver them to your address."}),s.jsxs("div",{className:"bg-blue-50 border-2 border-blue-200 rounded-lg p-4 mb-6",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Need a Ride?"}),s.jsxs("p",{className:"text-sm text-blue-800 mb-4",children:["Book your Uber transportation to ",i.title]}),s.jsx("a",{href:`https://m.uber.com/ul/?action=setPickup&pickup=my_location&dropoff[latitude]=${i.latitude}&dropoff[longitude]=${i.longitude}&dropoff[nickname]=${encodeURIComponent(i.title)}`,target:"_blank",rel:"noopener noreferrer",className:"block w-full bg-black text-white text-center py-3 rounded-lg font-semibold hover:bg-gray-800 transition-colors",children:"Book Uber Ride"})]}),j&&s.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Need to reschedule your delivery?"}),s.jsx(mw,{booking:j})]}),s.jsx(G,{onClick:()=>{g(!1),c(null)},variant:"outline",className:"w-full",children:"Close"})]})}),e.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(jt,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"No storage locations available at the moment"})]})]}),s.jsx("div",{className:"bg-gradient-to-r from-coral-500 to-coral-600 py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"🎉 Ready to Explore? Discover Local Tours & Attractions"}),s.jsx("p",{className:"text-lg text-white/90 mb-6",children:"Your bags are stored. Now it's time for adventure! Browse amazing experiences in the area."}),s.jsxs(G,{onClick:()=>window.location.href=createPageUrl("ToursAttractions"),size:"lg",className:"bg-white hover:bg-gray-100 text-coral-600 font-bold px-10 py-6 text-lg rounded-xl shadow-xl",children:[s.jsx(jt,{className:"w-5 h-5 mr-2"}),"View Tours & Activities"]})]})})]})}function At(e){return"/"+e.replace(/ /g,"-")}function IY(){const[e,t]=b.useState(null),[n,r]=b.useState(!0);return b.useEffect(()=>{const c=new URLSearchParams(window.location.search).get("session_id");c?X.entities.Booking.filter({stripe_session_id:c}).then(d=>{d[0]&&t(d[0])}).finally(()=>r(!1)):r(!1)},[]),n?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})}):s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center px-4 py-12",children:s.jsxs("div",{className:"max-w-md w-full",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx(os,{className:"w-16 h-16 text-green-500 mx-auto mb-3"}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Booking Confirmed!"}),s.jsx("p",{className:"text-gray-600 mt-2",children:"Your access code has been sent to your email."})]}),e&&s.jsx(oe,{className:"mb-6",children:s.jsxs(me,{className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-blue-50 rounded-lg",children:[s.jsx($l,{className:"w-6 h-6 text-brand-blue flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500",children:"Your Acce
512ss Code"}),s.jsx("p",{className:"text-2xl font-mono font-bold text-brand-blue tracking-widest",children:e.access_code||"Pending"})]})]}),s.jsxs("div",{className:"space-y-2 text-sm text-gray-600",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(jt,{className:"w-4 h-4"}),s.jsxs("span",{children:["Locker #",e.locker_number," — ",e.locker_size]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ds,{className:"w-4 h-4"}),s.jsxs("span",{children:[e.start_date," → ",e.end_date]})]})]}),e.access_instructions&&s.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 text-sm text-gray-600",children:[s.jsx("p",{className:"font-medium mb-1",children:"Access Instructions"}),s.jsx("p",{children:e.access_instructions})]})]})}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(Ls,{to:At("Dashboard"),children:s.jsx(G,{className:"w-full bg-brand-blue hover:bg-blue-700 text-white",children:"View My Bookings"})}),s.jsx(Ls,{to:At("Home"),children:s.jsx(G,{variant:"outline",className:"w-full",children:"Back to Home"})})]})]})})}function FY({booking:e,location:t}){const n=()=>
512{if(!t.airport_latitude||!t.airport_longitude){Xe.error("Airport information not available for this location");return}const r=[{lat:t.latitude,lng:t.longitude,name:t.title},{lat:t.airport_latitude,lng:t.airport_longitude,name:t.nearest_airport||"Airport"}],i=`uber://?action=setPickup&dropoff[latitude]=${r[1].lat}&dropoff[longitude]=${r[1].lng}&dropoff[nickname]=${encodeURIComponent(r[1].name)}`,c=`https://m.uber.com/ul/?action=setPickup&dropoff[latitude]=${r[1].lat}&dropoff[longitude]=${r[1].lng}`;Xe.success("Opening Uber - $15.00 service fee will be added to your booking"),window.location.href=i,setTimeout(()=>{window.location.href=c},500)};return s.jsxs(G,{onClick:n,className:"w-full bg-black hover:bg-gray-800 text-white min-h-[56px] text-base sm:text-lg",size:"lg",children:[s.jsx(jD,{className:"w-5 h-5 mr-2"}),"Time to Go - Book Airport Uber"]})}function BY({booking:e,location:t}){const[n,r]=b.useState(!1);return e.uber_direct_status==="requested"||e.uber_direct_status==="in_progress"?s.jsxs("div",{className:"p-3 bg-green-50 rounded-lg flex items-center gap-2",children:[s.jsx(ms,{className:"w-5 h-5 text-green-600"}),s.jsx("span",{className:"text-sm text-green-900 font-medium",children:"Delivery in progress"})]}):s.jsxs(G,{onClick:()=>Xe.info("Uber Direct delivery integration coming soon!"),disabled:!1,className:"w-full bg-gray-300 hover:bg-gray-400 text-gray-600 cursor-not-allowed",children:[s.jsx(Ut,{className:"w-4 h-4 mr-2"}),"Request Delivery Now (Coming Soon)"]})}function zY({booking:e}){const[t,n]=b.useState(!1);if(!e.access_code)return null;const r=()=>{navigator.clipboard.writeText(e.access_code),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsxs(oe,{className:"bg-gradient-to-br from-blue-50 to-blue-100 border-blue-200",children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2 text-blue-900",children:[s.jsx($l,{className:"w-5 h-5"}),"24-Hour Access Code"]})}),s.jsxs(me,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-white rounded-lg",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"Your Access Code"}),s.jsx("p",{className:"text-3xl font-mono font-bold text-blue-600",children:e.access_code})]}),s.jsx(G,{variant:"outline",size:"sm",onClick:r,className:"flex items-center gap-2",children:t?s.jsxs(s.Fragment,{children:[s.jsx(Ld,{className:"w-4 h-4"}),"Copied"]}):s.jsxs(s.Fragment,{children:[s.jsx(ap,{className:"w-4 h-4"}),"Copy"]})})]}),e.access_instructions&&s.jsxs("div",{className:"text-sm text-gray-700 bg-white p-3 rounded",children:[s.jsx("p",{className:"font-semibold mb-1",children:"Instructions:"}),s.jsx("p",{children:e.access_instructions})]})]})]})}var bA="AlertDialog",[$Y]=rn(bA,[IT]),Sa=IT(),wA=e=>{const{__scopeAlertDialog:t,...n}=e,r=Sa(t);return s.jsx(JT,{...r,...n,modal:!0})};wA.displayName=bA;var UY="AlertDialogTrigger",_A=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sa(n);return s.jsx(D9,{...i,...r,ref:t})});_A.displayName=UY;var VY="AlertDialogPortal",jA=e=>{const{__scopeAlertDialog:t,...n}=e,r=Sa(t);return s.jsx(eE,{...r,...n})};jA.displayName=VY;var WY="AlertDialogOverlay",NA=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sa(n);return s.jsx(Jb,{...i,...r,ref:t})});NA.displayName=WY;var md="AlertDialogContent",[HY,YY]=$Y(md),qY=OF("AlertDialogContent"),SA=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,c=Sa(n),d=b.useRef(null),h=gt(t,d),m=b.useRef(null);return s.jsx(A9,{contentName:md,titleName:kA,docsSlug:"alert-dialog",children:s.jsx(HY,{scope:n,cancelRef:m,children:s.jsxs(ew,{role:"alertdialog",...c,...i,ref:h,onOpenAutoFocus:Oe(i.onOpenAutoFocus,x=>{var p;x.preventDefault(),(p=m.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault(),children:[s.jsx(qY,{children:r}),s.jsx(ZY,{contentRef:d})]})})})});SA.displayName=md;var kA="AlertDialogTitle",CA=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sa(n);return s.jsx(tw,{...i,...r,ref:t})});CA.displayName=kA;var PA="AlertDialogDescription",TA=b.forwardRef((e,t)=>
512{const{__scopeAlertDialog:n,...r}=e,i=Sa(n);return s.jsx(sw,{...i,...r,ref:t})});TA.displayName=PA;var GY="AlertDialogAction",EA=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sa(n);return s.jsx(nw,{...i,...r,ref:t})});EA.displayName=GY;var AA="AlertDialogCancel",MA=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=YY(AA,n),c=Sa(n),d=gt(t,i);return s.jsx(nw,{...c,...r,ref:d})});MA.displayName=AA;var ZY=({contentRef:e})=>{const t=`\`${md}\` requires a description for the component to be accessible for screen reader users.
513
514You can add a description to the \`${md}\` by passing a \`${PA}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
515
516Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${md}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
517
518For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return b.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},KY=wA,QY=_A,XY=jA,RA=NA,LA=SA,DA=EA,OA=MA,IA=CA,FA=TA;const JY=KY,eq=QY,tq=XY,BA=b.forwardRef(({className:e,...t},n)=>s.jsx(RA,{className:We("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));BA.displayName=RA.displayName;const zA=b.forwardRef(({className:e,...t},n)=>s.jsxs(tq,{children:[s.jsx(BA,{}),s.jsx(LA,{ref:n,className:We("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));zA.displayName=LA.displayName;const $A=({className:e,...t})=>s.jsx("div",{className:We("flex flex-col space-y-2 text-center sm:text-left",e),...t});$A.displayName="AlertDialogHeader";const UA=({className:e,...t})=>s.jsx("div",{className:We("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});UA.displayName="AlertDialogFooter";const VA=b.forwardRef(({className:e,...t},n)=>s.jsx(IA,{ref:n,className:We("text-lg font-semibold",e),...t}));VA.displayName=IA.displayName;const WA=b.forwardRef(({className:e,...t},n)=>s.jsx(FA,{ref:n,className:We("text-sm text-muted-foreground",e),...t}));WA.displayName=FA.displayName;const HA=b.forwardRef(({className:e,...t},n)=>s.jsx(DA,{ref:n,className:We(fb(),e),...t}));HA.displayName=DA.displayName;const YA=b.forwardRef(({className:e,...t},n)=>s.jsx(OA,{ref:n,className:We(fb({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));YA.displayName=OA.displayName;function sq({booking:e,onCancelled:t}){const[n,r]=b.useState(!1),i=async()=>{r(!0);try{if(e.uber_direct_delivery_id)try{await X.functions.invoke("cancelUberDirectOrder",{delivery_id:e.uber_direct_delivery_id})}catch(c){console.error("Failed to cancel UberDirect:",c)}await X.entities.Booking.update(e.id,{status:"cancelled",uber_direct_status:e.uber_direct_delivery_id?"cancelled":null}),await X.integrations.Core.SendEmail({to:e.guest_email,subject:"Booking Cancelled",body:`Hi ${e.guest_name},
519
520Your booking has been cancelled successfully.
521
522Booking Details:
523- Booking #${e.pickup_number}
524- Location: ${e.location_title||"Storage Location"}
525- Dates: ${e.start_date} to ${e.end_date}
526
527${e.uber_direct_delivery_id?"Your UberDirect delivery has also been cancelled.":""}
528
529If you have any questions, please contact us.
530
531Best regards,
532Stow My Bags Team`}),Xe.success("Booking cancelled successfully"),t&&t()}catch(c){console.error("Error cancelling booking:",c),Xe.error("Failed to cancel booking")}finally{r(!1)}};return e.status==="cancelled"||e.status==="completed"?null:s.jsxs(JY,{children:[s.jsx(eq,{asChild:!0,children:s.jsxs(G,{variant:"destructive",size:"sm",disabled:n,children:[n?s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}):s.jsx(tg,{className:"w-4 h-4 mr-2"}),"Cancel Booking"]})}),s.jsxs(zA,{children:[s.jsxs($A,{children:[s.jsx(VA,{children:"Cancel Booking?"}),s.jsx(WA,{children:"This will cancel your booking and any scheduled UberDirect deliveries. This action cannot be undone."})]}),s.jsxs(UA,{children:[s.jsx(YA,{children:"Keep Booking"}),s.jsx(HA,{onClick:i,className:"bg-red-600 hover:bg-red-700",children:"Cancel Booking"})]})]})]})}function nq({booking:e,onSuccess:t}){const[n,r]=b.useState(0),[i,c]=b.useState(0),[d,h]=b.useState(""),[m,x]=b.useState(!1),p=async g=>{if(g.preventDefault(),n===0){Xe.error("Please select a rating");return}x(!0);try{const w=await X.auth.me();await X.entities.Review.create({location_id:e.location_id,booking_id:e.id,guest_id:w.id,rating:n,comment:d,guest_name:w.full_name||"Anonymous",status:"pending"}),Xe.success("Review submitted! It will be published after moderation."),t&&t()}catch(w){Xe.error("Failed to submit review"),console.error(w)}finally{x(!1)}};return s.jsxs("form",{onSubmit:p,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Your Rating"}),s.jsx("div",{className:"flex gap-2",children:[1,2,3,4,5].map(g=>s.jsx("button",{type:"button",onClick:()=>r(g),onMouseEnter:()=>c(g),onMouseLeave:()=>c(0),className:"transition-transform hover:scale-110",children:s.jsx(Yn,{className:`w-8 h-8 ${g<=(i||n)?"fill-yellow-400 text-yellow-400":"text-gray-300"}`})},g))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Your Review"}),s.jsx(Os,{value:d,onChange:g=>h(g.target.value),placeholder:"Share your experience with this storage location...",rows:4,className:"w-full"})]}),s.jsx(G,{type:"submit",disabled:m||n===0,className:"w-full",children:m?"Submitting...":"Submit Review"})]})}function rq(){const[e,t]=b.useState([]),[n,r]=b.useState({}),[i,c]=b.useState(!0),[d,h]=b.useState(null),[m,x]=b.useState(null);b.useEffect(()=>{p()},[]);const p=async()=>{try{const j=await X.auth.me();h(j);const _=await X.entities.Booking.filter({guest_id:j.id},"-created_date",50);t(_);const C=[...new Set(_.map(M=>M.location_id))],A={};for(const M of C){const E=await X.entities.StorageLocation.filter({id:M},"",1);E[0]&&(A[M]=E[0])}r(A)}catch(j){console.error("Error loading bookings:",j)}finally{c(!1)}},g=j=>{switch(j){case"confirmed":return"bg-green-100 text-green-800";
532case"pending":return"bg-yellow-100 text-yellow-800";case"completed":return"bg-blue-100 text-blue-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},w=j=>j==="all"?e:e.filter(_=>_.status===j);if(i)return s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})});const N=({booking:j})=>{const _=n[j.location_id],[C,A]=b.useState(!1);b.useEffect(()=>{M()},[j.id]);const M=async()=>{if(j.status==="completed"&&d)try{const E=await X.entities.Review.filter({booking_id:j.id,guest_id:d.id},"",1);A(E.length>0)}catch(E){console.error("Error checking review:",E)}};return s.jsx(oe,{className:"mb-4",children:s.jsxs(me,{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-start mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1",children:(_==null?void 0:_.title)||"Loading..."}),s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(jt,{className:"w-4 h-4 mr-1"}),_==null?void 0:_.address,", ",_==null?void 0:_.city]})]}),s.jsx(ot,{className:g(j.status),children:j.status})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ds,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Check-in"}),s.jsx("div",{className:"text-sm font-semibold",children:j.start_date})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ds,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Check-out"}),s.jsx("div",{className:"text-sm font-semibold",children:j.end_date})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Bags"}),s.jsx("div",{className:"text-sm font-semibold",children:j.number_of_bags})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(es,{className:"w-4 h-4 text-gray-400"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Total"}),s.jsxs("div",{className:"text-sm font-semibold",children:["$",j.total_price]})]})]})]}),j.special_requests&&s.jsxs("div",{className:"text-sm text-gray-600 mb-4",children:[s.jsx("span",{className:"font-medium",children:"Special Requests:"})," ",j.special_requests]}),j.access_code&&s.jsx("div",{className:"mt-4",children:s.jsx(zY,{booking:j})}),j.status==="confirmed"&&_&&s.jsx("div",{className:"mt-4 pt-4 border-t",children:s.jsx(FY,{booking:j,location:_})}),(j.delivery_requested||j.pickup_requested)&&s.jsxs("div",{className:"mt-3 space-y-3",children:[s.jsxs("div",{className:"p-3 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-blue-900",children:[s.jsx(Ut,{className:"w-4 h-4"}),j.delivery_requested?"Delivery":"Pickup"," Service Included"]}),s.jsxs("p",{className:"text-xs text-blue-700 mt-1",children:[s.jsxs("span",{className:"font-medium",children:[j.delivery_requested?"To":"From",":"]})," ",j.delivery_address]}),j.delivery_time&&s.jsxs("p",{className:"text-xs text-blue-700",children:[s.jsx("span",{className:"font-medium",children:"Time:"})," ",new Date(j.delivery_time).toLocaleString()]}),j.uber_direct_status&&s.jsxs("p",{className:"text-xs text-blue-700",children:[s.jsx("span",{className:"font-medium",children:"Status:"})," ",j.uber_direct_status]})]}),j.status==="confirmed"&&_&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx(BY,{booking:j,location:_}),s.jsx(mw,{booking:j})]})]}),j.status!=="cancelled"&&j.status!=="completed"&&s.jsx("div",{className:"mt-4 pt-4 border-t",children:s.jsx(sq,{booking:j,onCancelled:p})}),j.status==="completed"&&!C&&s.jsx("div",{className:"mt-4 pt-4 border-t",children:s.jsxs(G,{onClick:()=>x(j),variant:"outline",className:"w-full",children:[s.jsx(Yn,{className:"w-4 h-4 mr-2"}),"Leave a Review"]})})]})})};return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-blue-600 text-white py-8 px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsx("h1",{className:"text-3xl font-bold",children:"My Bookings"})})}),s.jsx("div",{className:"max-w-4xl mx-auto px-4 py-8",children:s.jsxs(Ql,{defaultValue:"all",children:[s.jsxs(Fo,{className:"mb-6",children:[s.jsx(Bt,{value:"all",children:"All"}),s.jsx(Bt,{value:"confirmed",children:"Confirmed"}),s.jsx(Bt,{value:"pending",children:"Pending"}),s.jsx(Bt,{value:"completed",children:"Completed"})]}),s.jsx(zt,{value:"all",children:e.length===0?s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx(Ds,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No bookings yet"}),s.jsx("p",{className:"text-gray-600",children:"Start by searching for storage locations"})]}):e.map(j=>s.jsx(N,{booking:j},j.id))}),s.jsx(zt,{value:"confirmed",children:w("confirmed").map(j=>s.jsx(N,{booking:j},j.id))}),s.jsx(zt,{value:"pending",children:w("pending").map(j=>s.jsx(N,{booking:j},j.id))}),s.jsx(zt,{value:"completed",children:w("completed").map(j=>s.jsx(N,{booking:j},j.id))})]})}),m&&s.jsx(Na,{open:!0,onOpenChange:()=>x(null),children:s.jsxs(Ai,{children:[s.jsx(Mi,{children:s.jsx(Ri,{children:"Leave a Review"})}),s.jsx(nq,{booking:m,onSuccess:()=>{x(null),p()}})]})})]})}const iq=Gh("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),en=b.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:We(iq({variant:t}),e),...n}));en.displayName="Alert";const aq=b.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:We("mb-1 font-medium leading-none tracking-tight",e),...t}));aq.displayName="AlertTitle";const tn=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:We("text-sm [&_p]:leading-relaxed",e),...t}));tn.displayName="AlertDescription";function oq(){const e=br(),[t,n]=b.useState(""),[r,i]=b.useState(null),[c,d]=b.useState(!1),[h,m]=b.useState(!1),[x,p]=b.useState(""),[g,w]=b.useState(!1),[N,j]=b.useState(null),[_,C]=b.useState(""),A=b.useRef(null),M=b.useRef(null),[E,D]=b.useState(null);b.useEffect(()=>{const le=new URLSearchParams(window.location.search).get("booking_id");le&&(n(le),I(le))},[]),b.useEffect(()=>()=>
532{E&&E.getTracks().forEach(J=>J.stop())},[E]);const I=async J=>{d(!0),p("");try{const le=await X.entities.Booking.filter({id:J});if(le.length===0){p("Booking not found");return}const xe=le[0];if(xe.status==="completed"){p("This booking is already checked in");return}if(xe.status!=="confirmed"){p("Booking must be confirmed before check-in");return}i(xe)}catch{p("Failed to load booking")}finally{d(!1)}},z=async()=>{try{const J=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}});D(J),M.current&&(M.current.srcObject=J)}catch{p("Unable to access camera. Please use file upload instead.")}},H=()=>{if(!M.current)return;const J=document.createElement("canvas");J.width=M.current.videoWidth,J.height=M.current.videoHeight,J.getContext("2d").drawImage(M.current,0,0),J.toBlob(le=>{const xe=new File([le],"locker-photo.jpg",{type:"image/jpeg"});j(xe),C(URL.createObjectURL(le)),E&&(E.getTracks().forEach(Me=>Me.stop()),D(null))},"image/jpeg",.8)},V=J=>{const le=J.target.files[0];le&&(j(le),C(URL.createObjectURL(le)))},Q=async()=>{if(!N){p("Please take a photo before submitting");return}m(!0),p("");try{const{file_url:J}=await X.integrations.Core.UploadFile({file:N});await X.entities.Booking.update(r.id,{status:"completed",bag_photos:[...r.bag_photos||[],J]});const le=await X.entities.StowNGoLocker.filter({current_booking_id:r.id});if(le.length>0){const xe=le[0];await X.entities.StowNGoLocker.update(xe.id,{status:"occupied",access_logs:[...xe.access_logs||[],{timestamp:new Date().toISOString(),booking_id:r.id,action:"checked_in",performed_by:r.guest_id||"guest",notes:"Customer checked in with photo verification"}]})}w(!0),setTimeout(()=>e("/Bookings"),3e3)}catch(J){p("Failed to complete check-in: "+J.message)}finally{m(!1)}};return g?s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-blue-50 flex items-center justify-center p-4",children:s.jsx(oe,{className:"max-w-md w-full",children:s.jsxs(me,{className:"pt-6 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(os,{className:"w-8 h-8 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Check-In Complete!"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Your bag is now securely stored. You can access your locker anytime with your code."}),s.jsx("p",{className:"text-sm text-gray-500",children:"Redirecting to bookings..."})]})})}):s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-coral-50 to-blue-50 p-4",children:s.jsx("div",{className:"max-w-2xl mx-auto py-8",children:s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-2xl",children:"Locker Check-In"}),s.jsx(kn,{children:"Take a photo of your bag in the locker with the door closed and locked"})]}),s.jsxs(me,{className:"space-y-6",children:[!r&&s.jsxs("div",{children:[s.jsx(te,{children:"Booking ID or Confirmation Number"}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx(de,{placeholder:"Enter booking ID",value:t,onChange:J=>n(J.target.value)}),s.jsx(G,{onClick:()=>I(t),disabled:c||!t,children:c?s.jsx(It,{className:"w-4 h-4 animate-spin"}):"Find"})]})]}),r&&s.jsxs(s.Fragment,{children:[s.jsxs(en,{children:[s.jsx(os,{className:"h-4 w-4"}),s.jsxs(tn,{children:["Booking found: ",r.guest_name," - Locker for ",r.number_of_units," unit(s)"]})]}),s.jsxs("div",{className:"bg-blue-50 border-2 border-blue-200 rounded-lg p-4",children:[s.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[s.jsx(Ol,{className:"w-5 h-5 text-blue-600"}),"Photo Instructions"]}),s.jsxs("ul",{className:"text-sm space-y-1 text-gray-700",children:[s.jsx("li",{children:"1. Place your bag(s) inside the locker"}),s.jsx("li",{children:"2. Close and lock the locker door"}),s.jsx("li",{children:"3. Take a clear photo showing the closed locker"}),s.jsx("li",{children:"4. Submit to complete check-in"})]})]}),_?s.jsxs("div",{className:"space-y-4",children:[s.jsx("img",{src:_,alt:"Locker photo",className:"w-full rounded-lg border-2 border-green-300"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(G,{variant:"outline",onClick:()=>{j(null),C("")},className:"flex-1",children:"Retake"}),s.jsx(G,{onClick:Q,disabled:h,className:"flex-1 bg-green-600 hover:bg-green-700",children:h?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):s.jsxs(s.Fragment,{children:[s.jsx(os,{className:"w-4 h-4 mr-2"}),"Complete Check-In"]})})]})]}):s.jsx("div",{className:"space-y-4",children:E?s.jsxs("div",{className:"space-y-4",children:[s.jsx("video",{ref:M,autoPlay:!0,playsInl
532ine:!0,className:"w-full rounded-lg border-2 border-gray-300"}),s.jsxs(G,{onClick:H,className:"w-full",size:"lg",children:[s.jsx(Ol,{className:"w-5 h-5 mr-2"}),"Capture Photo"]})]}):s.jsxs("div",{className:"grid gap-4",children:[s.jsxs(G,{onClick:z,className:"w-full",size:"lg",children:[s.jsx(Ol,{className:"w-5 h-5 mr-2"}),"Open Camera"]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-white px-2 text-muted-foreground",children:"Or"})})]}),s.jsxs(G,{onClick:()=>{var J;return(J=A.current)==null?void 0:J.click()},variant:"outline",className:"w-full",size:"lg",children:[s.jsx(Ak,{className:"w-5 h-5 mr-2"}),"Upload Photo"]}),s.jsx("input",{ref:A,type:"file",accept:"image/*",onChange:V,className:"hidden"})]})})]}),x&&s.jsxs(en,{variant:"destructive",children:[s.jsx(fn,{className:"h-4 w-4"}),s.jsx(tn,{children:x})]})]})]})})})}function lq(){const[e,t]=b.useState(null),[n,r]=b.useState([]),[i,c]=b.useState(!0);b.useEffect(()=>{d()},[]);const d=async()=>{try{const m=await X.auth.me();t(m);const x=await X.entities.Booking.filter({guest_email:m.email},"-created_date",20);r(x)}catch{X.auth.redirectToLogin()}finally{c(!1)}},h={pending:"bg-yellow-100 text-yellow-700",confirmed:"bg-blue-100 text-blue-700",active:"bg-green-100 text-green-700",completed:"bg-gray-100 text-gray-600",cancelled:"bg-red-100 text-red-600"};return i?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})}):s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"My Bookings"}),s.jsxs("p",{className:"text-gray-500 text-sm mt-1",children:["Welcome back, ",e==null?void 0:e.full_name]})]}),s.jsx(Ls,{to:At("Search"),children:s.jsxs(G,{className:"bg-coral hover:bg-coral-dark text-white",children:[s.jsx(Ao,{className:"w-4 h-4 mr-1"})," New Booking"]})})]}),n.length===0?s.jsxs("div",{className:"text-center py-20 text-gray-500",children:[s.jsx(Ct,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),s.jsx("p",{className:"text-lg font-medium",children:"No bookings yet"}),s.jsx(Ls,{to:At("Search"),children:s.jsx(G,{className:"mt-4 bg-brand-blue hover:bg-blue-700 text-white",children:"Find a Locker"})})]}):s.jsx("div",{className:"space-y-4",children:n.map(m=>{var x;return s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-5",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsxs("span",{className:"font-semibold text-gray-900",children:["Locker #",m.locker_number," — ",m.locker_size]}),s.jsx(ot,{className:`${h[m.status]} border-0 text-xs`,children:m.status})]}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-500 mb-1",children:[s.jsx(Ds,{className:"w-3.5 h-3.5"}),s.jsxs("span",{children:[m.start_date&&Up(new Date(m.start_date),"MMM d")," — ",m.end_date&&Up(new Date(m.end_date),"MMM d, yyyy")]})]}),m.access_code&&s.jsxs("div",{className:"flex items-center gap-2 mt-2 bg-blue-50 rounded-lg px-3 py-2 w-fit",children:[s.jsx($l,{className:"w-4 h-4 text-brand-blue"}),s.jsx("span",{className:"text-sm font-mono font-bold text-brand-blue tracking-widest",children:m.access_code})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-xl font-bold text-gray-900",children:["$",(x=m.total_price)==null?void 0:x.toFixed(2)]}),s.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:m.payment_status})]})]}),m.access_instructions&&s.jsx("p",{className:"mt-3 text-sm text-gray-500 border-t pt-3",children:m.access_instructions})]})},m.id)})})]})})}function cq({location:e,onClose:t,onSuccess:n}){var g,w;const[r,i]=b.useState({start_date:"",end_date:"",bags:{carry_on:0,checked_bag:0,oversized:0,combo:0},guest_name:"",guest_phone:"",special_requests:"",pickup_requested:!0,pickup_address:"",pickup_time:"",delivery_fee:25}),[c,d]=b.useState(!1),h=25,x=(()=>
532{if(!r.start_date||!r.end_date)return null;const N=Math.ceil((new Date(r.end_date)-new Date(r.start_date))/(1e3*60*60*24)),j={carry_on:5,checked_bag:7,oversized:10,combo:15};let _=0;const C=[];Object.keys(r.bags).forEach(D=>{const I=r.bags[D];if(I>0){const z=j[D]*I*N;_+=z,C.push({type:D,qty:I,price:j[D],cost:z})}});const A=Object.values(r.bags).reduce((D,I)=>D+I,0),M=2,E=_+r.delivery_fee+M;return{days:N,subtotal:_,breakdown:C,totalBags:A,platformFee:M,deliveryFee:r.delivery_fee,total:E}})(),p=async N=>{var j;N.preventDefault(),d(!0);try{if(window.self!==window.top){alert("Checkout is only available in the published app. Please open the app in a new tab to complete your booking."),d(!1);return}if(!await X.auth.isAuthenticated()){const I={location_id:e.id,start_date:r.start_date,end_date:r.end_date,number_of_bags:r.number_of_bags,guest_name:r.guest_name,guest_phone:r.guest_phone,special_requests:r.special_requests,pickup_requested:r.pickup_requested,pickup_address:r.pickup_address,pickup_time:r.pickup_time,delivery_fee:r.delivery_fee};localStorage.setItem("pendingBooking",JSON.stringify(I)),localStorage.setItem("pendingLocationData",JSON.stringify({id:e.id,title:e.title,address:e.address,city:e.city,price_per_day:e.price_per_day})),X.auth.redirectToLogin(window.location.href);return}const C=await X.auth.me(),A=Object.values(r.bags).reduce((I,z)=>I+z,0);if(A===0){alert("Please select at least one bag"),d(!1);return}const M={start_date:r.start_date,end_date:r.end_date,number_of_units:A,bags:r.bags,guest_name:r.guest_name,guest_phone:r.guest_phone,guest_email:C.email,special_requests:r.special_requests,pickup_requested:r.pickup_requested,pickup_address:r.pickup_address,pickup_time:r.pickup_time,delivery_requested:!1},E={id:e.id,title:e.title,address:e.address,price_per_day:e.price_per_day||((j=e.pricing)==null?void 0:j.carry_on)||5},D=await X.functions.invoke("createCheckout",{booking:M,location:E});if(D.data.url)localStorage.removeItem("pendingBooking"),localStorage.removeItem("pendingLocationData"),localStorage.setItem("departureLocation",JSON.stringify({latitude:e.latitude,longitude:e.longitude,name:e.title,airport_latitude:e.airport_latitude,airport_longitude:e.airport_longitude,nearest_airport:e.nearest_airport})),localStorage.setItem("redirectToUberAfterDepartureCheckout","true"),window.location.href=D.data.url;else throw new Error("Failed to create checkout session")}catch(_){console.error("Error creating checkout:",_),alert("Error creating checkout. Please try again."),d(!1)}};return s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsx(oe,{className:"max-w-md w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Store Bags for Departure"}),s.jsx(G,{variant:"ghost",size:"icon",onClick:t,children:s.jsx(Io,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"mb-6 p-4 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:e.title}),s.jsx("p",{className:"text-sm text-gray-600",children:e.address})]}),(g=e.promotions)==null?void 0:g.filter(N=>N.active).map(N=>s.jsx(rw,{promotion:N},N.id))]}),s.jsxs("p",{className:"text-lg font-bold text-blue-600 mt-2",children:["Starting at $",e.price_per_day||((w=e.pricing)==null?void 0:w.carry_on)||5," per bag/day"]}),(x==null?void 0:x.multipliers.length)>0&&s.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:x.multipliers.map((N,j)=>s.jsxs(ot,{variant:"outline",className:"text-xs",children:[s.jsx(Ci,{className:"w-3 h-3 mr-1"}),N.type]},j))})]}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"start_date",children:"Check-in Date"}),s.jsx(de,{id:"start_date",type:"date",required:!0,value:r.start_date,min:new Date().toISOString().split("T")[0],onChange:N=>i({...r,start_date:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"end_date",children:"Check-out Date"}),s.jsx(de,{id:"end_date",type:"date",required:!0,value:r.end_date,min:r.start_date||new Date().toISOString().split("T")[0],onChange:N=>i({...r,end_date:N.target.value})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Select Bag Quantities"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"carry_on",children:"Carry-On ($5/day)"}),s.jsxs(ts,{value:r.bags.carry_on.toString(),onValueChange:N=>i({...r,bags:{...r.bags,carry_on:parseInt(N)}}),children:[s.jsx(qt,{id:"carry_on",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(N=>s.jsx(Ge,{value:N.toString(),children:N},N))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"checked_bag",children:"Checked Bag ($7/day)"}),s.jsxs(ts,{value:r.bags.checked_bag.toString(),onValueChange:N=>i({...r,bags:{...r.bags,checked_bag:parseInt(N)}}),children:[s.jsx(qt,{id:"checked_bag",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(N=>s.jsx(Ge,{value:N.toString(),children:N},N))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"oversized",children:"Oversized ($10/day)"}),s.jsxs(ts,{value:r.bags.oversized.toString(),onValueChange:N=>i({...r,bags:{...r.bags,oversized:parseInt(N)}}),children:[s.jsx(qt,{id:"oversized",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(N=>s.jsx(Ge,{value:N.toString(),children:N},N))})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"combo",children:"Combo - Carry-On + Checked ($15/day)"}),s.jsxs(ts,{value:r.bags.combo.toString(),onValueChange:N=>i({...r,bags:{...r.bags,combo:parseInt(N)}}),children:[s.jsx(qt,{id:"combo",children:s.jsx(ss,{})}),s.jsx(Gt,{children:[0,1,2,3,4,5,6,7,8,9,10].map(N=>s.jsx(Ge,{value:N.toString(),children:N},N))})]})]})]}),x&&x.totalBags>0&&s.jsxs("div",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded",children:["Total bags: ",s.jsx("span",{className:"font-semibold",children:x.totalBags})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_name",children:"Your Name"}),s.jsx(de,{id:"guest_name",type:"text",required:!0,value:r.guest_name,onChange:N=>i({...r,guest_name:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"guest_phone",children:"Phone Number"}),s.jsx(de,{id:"guest_phone",type:"tel",required:!0,value:r.guest_phone,onChange:N=>i({...r,guest_phone:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"special_requests",children:"Special Requests (Optional)"}),s.jsx(Os,{id:"special_requests",value:r.special_requests,onChange:N=>i({...r,special_requests:N.target.value}),placeholder:"Any special requirements?"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"text-base font-semibold",children:"Luggage Pickup Service"}),s.jsx(oe,{className:"border-2 border-blue-600 bg-blue-50",children:s.jsxs(me,{className:"space-y-4 pt-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Ut,{className:"w-5 h-5 text-blue-600"}),s.jsx("span",{className:"font-semibold text-lg",children:"Schedule luggage pickup from my location"}),s.jsxs("span",{className:"text-blue-600 font-bold",children:["+$",h.toFixed(2)]})]}),s.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["UberDirect will pick up your bags from your location and deliver them to ",e.title]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"pickup-address",className:"mb-2 block",children:"Pickup Address *"}),s.jsx(de,{id:"pickup-address",placeholder:"Enter your hotel/rental address",value:r.pickup_address,onChange:N=>i({...r,pickup_address:N.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"pickup-time",className:"mb-2 block",children:"Preferred Pickup Time *"}),s.jsx(de,{id:"pickup-time",type:"datetime-local",value:r.pickup_time,onChange:N=>i({...r,pickup_time:N.target.value}),required:!0})]}),s.jsxs("div",{className:"bg-blue-100 p-3 rounded-lg text-sm text-blue-900",children:[s.jsxs("p",{className:"font-semibold",children:["✓ UberDirect will pickup and deliver to ",e.title]}),s.jsx("p",{className:"text-blue-700 mt-1",children:"Partner will check in your bags and send you a receipt"})]})]})})]}),x&&x.totalBags>0&&s.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg space-y-2",children:[x.breakdown.map((N,j)=>s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{children:[N.type.replace("_"," ").replace(/\b\w/g,_=>_.toUpperCase()),"(",N.qty," × $",N.price,"/day × ",x.days," day(s))"]}),s.jsxs("span",{children:["$",N.cost.toFixed(2)]})]},j)),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Pickup Service"}),s.jsxs("span",{children:["$",x.deliveryFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Platform Fee"}),s.jsxs("span",{children:["$",x.platformFee.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-lg font-bold border-t pt-2",children:[s.jsx("span",{children:"Total:"}),s.jsxs("span",{className:"text-blue-600",children:["$",x.total.toFixed(2)]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"button",variant:"outline",onClick:t,className:"flex-1 min-h-[52px] text-base",children:"Cancel"}),s.jsx(G,{type:"submit",disabled:c||!x||x.totalBags===0,className:"flex-1 bg-blue-600 hover:bg-blue-700 min-h-[52px] text-base",children:c?"Processing...":"Proceed to Payment"})]})]})]})})})}function dq(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[i,c]=b.useState(null),[d,h]=b.useState(!1),[m,x]=b.useState(null);b.useEffect(()=>{p(),g(),N()},[]);const p=async()=>{try{const j=await X.entities.StorageLocation.filter({status:"active"},"-created_date",50);t(j)}catch(j){console.error("Error loading locations:",j)}finally{r(!1)}},g=async()=>{const j=localStorage.getItem("pendingBooking"),_=localStorage.getItem("pendingLocationData");if(j&&_&&await X.auth.isAuthenticated()){const A=JSON.parse(_),M=e.find(E=>E.id===A.id);M&&c(M)}},w=()=>{c(null),localStorage.removeItem("pendingBooking"),localStorage.removeItem("pendingLocationData")},N=async()=>{const j=new URLSearchParams(window.location.search),_=j.get("payment"),C=j.get("location_id");if(_==="success"&&C){const A=e.find(M=>M.id===C);if(A){c(A),h(!0);try{const M=await X.auth.me(),E=await X.entities.Booking.filter({guest_id:M.id,location_id:C},"-created_date",1);E[0]&&x(E[0])}catch(M){console.error("Error loading booking:",M)}}window.history.replaceState({},"",window.location.pathname)}};return n?s.jsx("div",{className:"flex justify-center items-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):s.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"text-center mb-8 py-12",children:[s.jsx("h1",{className:"text-6xl md:text-7xl font-bold text-green-600 mb-4",children:"Departures"}),s.jsx("p",{className:"text-xl text-gray-600",children:"Schedule storage self drop-off or use our luggage pickup service"})]}),s.jsxs(oe,{className:"p-6 bg-green-50 border-green-200",children:[s.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"How it works:"}),s.jsxs("ol",{className:"space-y-2 text-sm text-gray-700",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"1."}),s.jsx("span",{children:"Browse storage locations near the airport"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"2."}),s.jsx("span",{children:"Book storage and choose: Drop off yourself OR have Uber pick up from your location"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-semibold text-green-600",children:"3."}),s.jsx("span",{children:"Partner checks in your bags and sends you a confirmation with pickup number"})]})]})]})]}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(j=>s.jsx(b0,{location:j,onBookClick:()=>c(j)},j.id))}),e.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(jt,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"No storage locations available at the moment"}),s.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Please check back later"})]}),i&&!d&&s.jsx(cq,{location:i,onClose:()=>c(null),onSuccess:w}),d&&i&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:s.jsxs("div",{className:"bg-white rounded-xl shadow-xl max-w-md w-full p-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-green-600 mb-4",children:"✓ Payment Confirmed!"}),s.jsxs("p",{className:"text-gray-700 mb-6",children:["Your booking is confirmed and UberDirect has been scheduled to pick up your bags from your location and deliver them to ",i.title,"."]}),s.jsxs("div",{className:"bg-blue-50 border-2 border-blue-200 rounded-lg p-4 mb-6",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Need a Ride?"}),s.jsxs("p",{className:"text-sm text-blue-800 mb-4",children:["Book your Uber ride with 2 stops: ",i.title," → ",i.nearest_airport||"Airport"]}),s.jsx("a",{href:`https://m.uber.com/ul/?action=setPickup&pickup=my_location&dropoff[0][latitude]=${i.latitude}&dropoff[0][longitude]=${i.longitude}&dropoff[0][nickname]=${encodeURIComponent(i.title)}&dropoff[1][latitude]=${i.airport_latitude}&dropoff[1][longitude]=${i.airport_longitude}&dropoff[1][nickname]=${encodeURIComponent(i.nearest_airport||"Airport")}`,target:"_blank",rel:"noopener noreferrer",className:"block w-full bg-black text-white text-center py-3 rounded-lg font-semibold hover:bg-gray-800 transition-colors",children:"Book Uber Transportation"})]}),m&&s.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg mb-4",children:[s.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Need to reschedule your pickup?"}),s.jsx(mw,{booking:m})]}),s.jsx(G,{onClick:()=>{h(!1),c(null)},variant:"outline",className:"w-full",children:"Close"})]})})]})}function uq({facility:e}){const[t,n]=b.useState([]),[r,i]=b.useState(!0),[c,d]=b.useState(!1),[h,m]=b.useState({locker_number:"",size:"medium",price_per_day:"",access_code:""}),[x,p]=b.useState(!1);b.useEffect(()=>{g()},[e.id]);const g=async()=>{i(!0);const j=await X.entities.Locker.filter({facility_id:e.id});n(j),i(!1)},w=async()=>{p(!0),await X.entities.Locker.create({...h,facility_id:e.id,price_per_day:parseFloat(h.price_per_day)||0,status:"available"}),d(!1),m({locker_number:"",size:"medium",price_per_day:"",access_code:""}),await g(),p(!1)},N={available:"bg-green-100 text-green-700",occupied:"bg-blue-100 text-blue-700",maintenance:"bg-red-100 text-red-600",reserved:"bg-yellow-100 text-yellow-700"};return r?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(It,{className:"w-6 h-6 animate-spin text-blue-600"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("p",{className:"text-sm text-gray-500",children:[t.length," locker",t.length!==1?"s":""]}),s.jsxs(G,{onClick:()=>d(!0),size:"sm",className:"bg-brand-blue hover:bg-blue-700 text-white",children:[s.jsx(Ao,{className:"w-4 h-4 mr-1"})," Add Locker"]})]}),t.length===0?s.jsxs("div",{className:"text-center py-12 text-gray-400",children:[s.jsx(Ct,{className:"w-10 h-10 mx-auto mb-2 text-gray-200"}),s.jsx("p",{children:"No lockers added yet."}),s.jsx(G,{onClick:()=>d(!0),className:"mt-3 bg-coral hover:bg-coral-dark text-white",children:"Add Your First Locker"})]}):s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3",children:t.map(j=>s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"font-bold text-gray-900",children:["#",j.locker_number]}),s.jsx(ot,{className:`${N[j.status]} border-0 text-xs`,children:j.status})]}),s.jsx("p",{className:"text-sm text-gray-500 capitalize",children:j.size}),s.
532jsxs("p",{className:"text-sm font-medium text-brand-blue mt-1",children:["$",j.price_per_day,"/day"]}),j.access_code&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 font-mono",children:["Code: ",j.access_code]})]})},j.id))}),s.jsx(Na,{open:c,onOpenChange:d,children:s.jsxs(Ai,{className:"max-w-sm",children:[s.jsx(Mi,{children:s.jsx(Ri,{children:"Add New Locker"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Locker Number *"}),s.jsx(de,{value:h.locker_number,onChange:j=>m(_=>({..._,locker_number:j.target.value})),placeholder:"A1"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Size"}),s.jsxs(ts,{value:h.size,onValueChange:j=>m(_=>({..._,size:j})),children:[s.jsx(qt,{children:s.jsx(ss,{})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"small",children:"Small"}),s.jsx(Ge,{value:"medium",children:"Medium"}),s.jsx(Ge,{value:"large",children:"Large"}),s.jsx(Ge,{value:"xl",children:"XL"})]})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Price per Day ($) *"}),s.jsx(de,{type:"number",value:h.price_per_day,onChange:j=>m(_=>({..._,price_per_day:j.target.value})),placeholder:"15"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Access Code"}),s.jsx(de,{value:h.access_code,onChange:j=>m(_=>({..._,access_code:j.target.value})),placeholder:"1234"})]}),s.jsxs(G,{onClick:w,disabled:x||!h.locker_number||!h.price_per_day,className:"w-full bg-brand-blue hover:bg-blue-700 text-white",children:[x?s.jsx(It,{className:"w-4 h-4 animate-spin mr-2"}):null,"Add Locker"]})]})]})})]})}function hq(){const[e,t]=b.useState(null),[n,r]=b.useState(null),[i,c]=b.useState([]),[d,h]=b.useState(!0);b.useEffect(()=>{m()},[]);const m=async()=>{try{const g=await X.auth.me();t(g);const w=await X.entities.Facility.filter({partner_id:g.id});if(w[0]){r(w[0]);const N=await X.entities.Booking.filter({facility_id:w[0].id},"-created_date",50);c(N)}}catch{X.auth.redirectToLogin()}finally{h(!1)}};if(d)return s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})});if(!n)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center px-4",children:s.jsxs(oe,{className:"max-w-md w-full text-center p-8",children:[s.jsx(Ct,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"No Facility Found"}),s.jsx("p",{className:"text-gray-500 mb-4",children:"Your account is not linked to a facility yet."}),s.jsx(G,{onClick:()=>window.location.href="/FacilitySignup",className:"bg-coral hover:bg-coral-dark text-white w-full",children:"Apply as a Partner"})]})});const x=i.filter(g=>g.payment_status==="paid").reduce((g,w)=>g+(w.total_price||0),0),p=i.filter(g=>g.status==="active"||g.status==="confirmed").length;return s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:n.name}),s.jsx("p",{className:"text-gray-500 text-sm mt-0.5",children:"Partner Portal"})]}),s.jsx(ot,{className:n.status==="active"?"bg-green-100 text-green-700 border-0":"bg-yellow-100 text-yellow-700 border-0",children:n.status})]}),s.jsx("div",{className:"grid grid-cols-3 gap-4 mb-8",children:[{icon:Ut,label:"Active Bookings",value:p,color:"text-brand-blue"},{icon:es,label:"Total Revenue",value:`$${x.toFixed(0)}`,color:"text-green-600"},{icon:Ct,label:"Total Lockers",value:n.total_lockers||0,color:"text-coral"}].map(({icon:g,label:w,value:N,color:j})=>s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-4 text-center",children:[s.jsx(g,{className:`w-6 h-6 mx-auto mb-2 ${j}`}),s.jsx("p",{className:"text-2xl font-bold text-gray-900",children:N}),s.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:w})]})},w))}),s.jsxs("div",{className:"flex justify-end mb-4",children:[s.jsx(Ls,{to:At("SmartLockSetup"),children:s.jsxs(G,{variant:"outline",size:"sm",className:"border-brand-blue text-brand-blue hover:bg-blue-50",children:[s.jsx(kp,{className:"w-4 h-4 mr-1"})," Connect Smart Locks"]})}),s.jsx(Ls,{to:At("LockMonitor"),className:"ml-2",children:s.jsxs(G,{variant:"outline",size:"sm",children:[s.jsx(Ct,{className:"w-4 h-4 mr-1"})," Lock Monitor"]})})]}),s.jsxs(Ql,{defaultValue:"bookings",children:[s.jsxs(Fo,{className:"mb-6",children:[s.jsx(Bt,{value:"bookings",children:"Bookings"}),s.jsx(Bt,{value:"lockers",children:"Lockers"})]}),s.jsx(zt,{value:"bookings",children:s.jsx("div",{className:"space-y-3",children:i.length===0?s.jsx("p",{className:"text-center text-gray-400 py-8",children:"No bookings yet."}):i.map(g=>{var w;return s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-gray-900",children:g.guest_name}),s.jsxs("p",{className:"text-sm text-gray-500",children:[g.guest_email," · Locker #",g.locker_number]}),s.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:[g.start_date," → ",g.end_date]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-bold text-gray-900",children:["$",(w=g.total_price)==null?void 0:w.toFixed(2)]}),s.jsx(ot,{className:`text-xs border-0 mt-1 ${g.status==="active"?"bg-green-100 text-green-700":g.status==="confirmed"?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-500"}`,children:g.status})]})]})},g.id)})})}),s.jsx(zt,{value:"lockers",children:s.jsx(uq,{facility:n})})]})]})})}function fq(){const e=br(),[t,n]=b.useState(1),[r,i]=b.useState(!1),[c,d]=b.useState(!1),[h,m]=b.useState({name:"",address:"",city:"",state:"",zip:"",phone:"",email:"",description:"",access_hours:"24/7",total_lockers:""}),x=(g,w)=>m(N=>({...N,[g]:w})),p=async()=>{i(!0),await X.entities.Facility.create({...h,total_lockers:parseInt(h.total_lockers)||0,available_lockers:parseInt(h.total_lockers)||0,status:"pending"}),d(!0),i(!1)};return c?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center px-4",children:s.jsxs(oe,{className:"max-w-md w-full text-center p-8",children:[s.jsx(os,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Application Submitted!"}),s.jsx("p",{className:"text-gray-600 mb-6",children:"We'll review your facility and get back to you within 2 business days."}),s.jsx(G,{onClick:()=>e(At("Home")),className:"bg-brand-blue hover:bg-blue-700 text-white w-full",children:"Back to Home"})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsxs("div",{className:"max-w-xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"w-12 h-12 bg-brand-blue rounded-xl flex items-center justify-center mx-auto mb-3",children:s.jsx(Ct,{className:"w-6 h-6 text-white"})}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Become a Partner Facility"}),s.jsx("p",{className:"text-gray-600 mt-2",children:"Turn your empty lockers into passive income"})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Facility Information"})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Facility Name *"}),s.jsx(de,{value:h.name,onChange:g=>x("name",g.target.value),placeholder:"City Storage - Downtown"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Street Address *"}),s.jsx(de,{value:h.address,onChange:g=>x("address",g.target.value),placeholder:"123 Main St"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"City *"}),s.jsx(de,{value:h.city,onChange:g=>x("city",g.target.value),placeholder:"Savannah"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"State *"}),s.jsx(de,{value:h.state,onChange:g=>x("state",g.target.value),placeholder:"GA",maxLength:2})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Phone"}),s.jsx(de,{value:h.phone,onChange:g=>x("phone",g.target.value),placeholder:"(912) 555-0000"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Email *"}),s.jsx(de,{type:"email",value:h.email,onChange:g=>x("email",g.target.value),placeholder:"[email protected]"})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Number of Available Lockers"}),s.jsx(de,{type:"number",value:h.total_lockers,onChange:g=>x("total_lockers",g.target.value),placeholder:"20"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Access Hours"}),s.jsx(de,{value:h.access_hours,onChange:g=>x("access_hours",g.target.value),placeholder:"24/7"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Description (optional)"}),s.jsx(Os,{value:h.description,onChange:g=>x("description",g.target.value),placeholder:"Tell us about your facility...",rows:3})]}),s.jsxs("div",{className:"pt-2",children:[s.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"By 
532submitting you agree to our partner terms. We'll review your application and contact you within 2 business days."}),s.jsxs(G,{onClick:p,disabled:r||!h.name||!h.address||!h.city||!h.state||!h.email,className:"w-full bg-coral hover:bg-coral-dark text-white py-5 text-base",children:[r?s.jsx(It,{className:"w-4 h-4 animate-spin mr-2"}):null,"Submit Application"]})]})]})]})]})})}function mq(){const[e,t]=b.useState(null);return b.useEffect(()=>{X.auth.me().then(t).catch(()=>t(null))},[]),s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx("nav",{className:"bg-white border-b sticky top-0 z-10",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-4 flex items-center justify-between h-16",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-brand-blue rounded-lg flex items-center justify-center",children:s.jsx(Ct,{className:"w-5 h-5 text-white"})}),s.jsxs("span",{className:"font-bold text-xl text-gray-900",children:["Stow-N-Go ",s.jsx("span",{className:"text-coral",children:"24/7"})]})]}),s.jsx("div",{className:"flex items-center gap-3",children:e?s.jsx(Ls,{to:At("Dashboard"),
532children:s.jsx(G,{className:"bg-brand-blue hover:bg-blue-700",children:"My Bookings"})}):s.jsxs(s.Fragment,{children:[s.jsx(Ls,{to:At("Search"),children:s.jsx(G,{variant:"outline",children:"Find Storage"})}),s.jsx(Ls,{to:At("FacilitySignup"),children:s.jsx(G,{className:"bg-coral hover:bg-coral-dark text-white",children:"Become a Partner"})})]})})]})}),s.jsx("section",{className:"bg-gradient-to-br from-blue-900 via-blue-800 to-blue-700 text-white py-20 px-4",children:s.jsxs("div",{className:"max-w-5xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/10 rounded-full px-4 py-2 mb-6 text-sm font-medium",children:[s.jsx(kp,{className:"w-4 h-4 text-coral"}),"24/7 Unattended Locker Access — No Staff Required"]}),s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold mb-6 leading-tight",children:["Store Your Bags",s.jsx("br",{}),s.jsx("span",{className:"text-coral",children:"Anytime. Anywhere."})]}),s.jsx("p",{className:"text-lg md:text-xl text-blue-100 mb-10 max-w-2xl mx-auto",children:"Secure self-storage lockers at partner facilities. Book online, get your code, access 24/7. No waiting, no staff needed."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(Ls,{to:At("Search"),children:s.jsxs(G,{size:"lg",className:"bg-coral hover:bg-coral-dark text-white font-semibold px-8 py-6 text-lg w-full sm:w-auto",children:["Find a Locker ",s.jsx(gr,{className:"ml-1 w-5 h-5"})]})}),s.jsx(Ls,{to:At("FacilitySignup"),children:s.jsx(G,{size:"lg",variant:"outline",className:"border-white text-white hover:bg-white hover:text-blue-900 font-semibold px-8 py-6 text-lg w-full sm:w-auto",children:"List Your Facility"})})]})]})}),s.jsx("section",{className:"py-16 px-4 bg-gray-50",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-center text-gray-900 mb-12",children:"How It Works"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[{icon:jt,step:"1",title:"Find a Location",desc:"Search for available lockers near you or your destination.",color:"bg-brand-blue-light text-brand-blue"},{icon:$l,step:"2",title:"Book & Pay Online",desc:"Select your dates, pay securely, and get your unique access code instantly.",color:"bg-coral-light text-coral"},{icon:Ct,step:"3",title:"Access 24/7",desc:"Use your code to access your locker anytime — day or night, no staff needed.",color:"bg-green-100 text-green-700"}].map(({icon:n,step:r,title:i,desc:c,color:d})=>s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:`w-16 h-16 rounded-2xl ${d} flex items-center justify-center mx-auto mb-4`,children:s.jsx(n,{className:"w-8 h-8"})}),s.jsx("div",{className:"w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mx-auto mb-3 text-sm font-bold text-gray-600",children:r}),s.jsx("h3",{className:"text-xl font-semibold mb-2",children:i}),s.jsx("p",{className:"text-gray-600",children:c})]},r))})]})}),s.jsx("section",{className:"py-16 px-4",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-center text-gray-900 mb-12",children:"Why Stow-N-Go 24/7?"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[{icon:Ts,title:"24/7 Access",desc:"Access your belongings any time of day or night."},{icon:Tn,title:"Secure & Insured",desc:"CCTV monitored facilities with secure access codes."},{icon:kp,title:"Instant Booking",desc:"Book in minutes and get your code immediately."},{icon:$l,title:"Unique Access Codes",desc:"Personal code sent to your email for each booking."},{icon:jt,title:"Multiple Locations",desc:"Growing network of partner self-storage facilities."},{icon:ld,title:"Mobile Friendly",desc:"Book and manage your storage from your phone."}].map(({icon:n,title:r,desc:i})=>s.jsxs("div",{className:"p-6 rounded-xl border border-gray-100 hover:shadow-md transition-shadow",children:[s.jsx("div",{className:"w-10 h-10 bg-brand-blue-light rounded-lg flex items-center justify-center mb-3",children:s.jsx(n,{className:"w-5 h-5 text-brand-blue"})}),s.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:r}),s.jsx("p",{className:"text-gray-500 text-sm",children:i})]},r))})]})}),s.jsx("section",{className:"py-16 px-4 bg-gradient-to-r from-blue-800 to-blue-900 text-white",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Own a Self-Storage Facility?"}),s.jsx("p",{className:"text-blue-100 mb-8 text-lg",children:"Turn your empty lockers into passive income. Join our network of 24/7 partner facilities."}),s.jsx(Ls,{to:At("FacilitySignup"),children:s.jsx(G,{size:"lg",className:"bg-coral hover:bg-coral-dark text-white font-semibold px-8",children:"Apply to Become a Partner"})})]})}),s.jsxs("footer",{className:"bg-gray-900 text-gray-400 py-8 px-4 text-center text-sm",children:[s.jsx("p",{children:"© 2026 Stow-N-Go 24/7. All rights reserved."}),s.jsx("p",{className:"mt-1",children:"Secure 24/7 locker storage at partner facilities."})]})]})}function qA({isOpen:e,onClose:t,onProceed:n,flow:r}){const[i,c]=b.useState(""),[d,h]=b.useState(""),[m,x]=b.useState(1),[p,g]=b.useState(null),w=5,N=()=>
532{if(!i||!d)return;const _=new Date(i),C=new Date(d);if(C<_){alert("Check-out date must be on or after check-in date");return}const A=Math.max(1,Math.ceil((C-_)/(1e3*60*60*24))),M=A*m,E=A*m*w+M;g({days:A,numBags:m,subtotal:A*m*w,platformFee:M,total:E})},j=()=>{n(p)};return s.jsx(Na,{open:e,onOpenChange:t,children:s.jsxs(Ai,{className:"max-w-md",children:[s.jsxs(Mi,{children:[s.jsx(Ri,{children:"Get a Quick Quote"}),s.jsx(sE,{children:"See how much storage will cost before you sign up"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsxs(te,{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ds,{className:"w-4 h-4"}),"Check-in"]}),s.jsx(de,{type:"date",value:i,onChange:_=>{c(_.target.value),g(null)},className:"mt-1"})]}),s.jsxs("div",{children:[s.jsxs(te,{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ds,{className:"w-4 h-4"}),"Check-out"]}),s.jsx(de,{type:"date",value:d,onChange:_=>{h(_.target.value),g(null)},className:"mt-1"})]})]}),s.jsxs("div",{children:[s.jsxs(te,{className:"flex items-center gap-2 text-sm",children:[s.jsx(CL,{className:"w-4 h-4"}),"Number of Bags"]}),s.jsx(de,{type:"number",min:"1",max:"10",value:m,onChange:_=>{x(parseInt(_.target.value)||1),g(null)},className:"mt-1"})]}),!p&&s.jsx(G,{onClick:N,disabled:!i||!d,className:"w-full bg-blue-600 hover:bg-blue-700",children:"Calculate Quote"}),p&&s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-600",children:["$",w,"/day × ",p.days," days × ",p.numBags," bag",p.numBags>1?"s":""]}),s.jsxs("span",{className:"font-medium",children:["$",p.subtotal.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Platform fee"}),s.jsxs("span",{className:"font-medium",children:["$",p.platformFee.toFixed(2)]})]}),s.jsxs("div",{className:"border-t pt-2 flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Total"}),s.jsxs("span",{className:"font-bold text-lg text-blue-600",children:["$",p.total.toFixed(2)]})]})]}),p&&s.jsx(G,{onClick:j,className:"w-full bg-green-600 hover:bg-green-700",children:"Continue to Book"})]})]})})}function pq(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState(!0),[c,d]=b.useState(!1),[h,m]=b.useState(null);b.useEffect(()=>{x()},[]);const x=async()=>{try{const w=await X.auth.me();n(w)}catch{}finally{i(!1)}},p=async w=>{try{if(w==="departures"||w==="arrivals"){e(`/${w}`);return}await X.auth.isAuthenticated()?e(`/${w}`):(m(w),d(!0))}catch(N){console.error("Error:",N)}},g=w=>{localStorage.setItem("pendingFlow",h),localStorage.setItem("quoteData",JSON.stringify(w)),X.auth.redirectToLogin(window.location.origin+`/${h}`)};return r?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-blue-50 to-white",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx("div",{className:"relative bg-gradient-to-b from-blue-900 to-blue-800",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-12 md:py-8",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8",children:[s.jsxs("div",{className:"flex-1 flex flex-col md:flex-row items-center gap-8",children:[s.jsxs("div",{className:"text-center md:text-left",children:[s.jsxs("h1",{className:"text-2xl md:text-3xl font-bold text-white mb-2",children:["Travel Light,",s.jsx("br",{}),"Explore Free"]}),s.jsx("p",{className:"text-base md:text-lg text-white/90 mb-3",children:"Dragging your bag... is a drag!"}),s.jsxs("div",{className:"flex flex-wrap gap-2 justify-center md:justify-start text-white/90 mb-2 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full"}),s.jsx("span",{children:"$5/bag/day"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full"}),s.jsx("span",{children:"24/7 Access*"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full"}),s.jsx("span",{children:"Secure Storage"})]})]}),s.jsx("p",{className:"text-xs text-white/70",children:"*Premium locations only"})]}),s.jsx("div",{className:"flex w-full items-center justify-center",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/9ab52cd6b_poster-11x17.png",alt:"Stow My Bags",className:"w-full max-w-md object-contain"})})]}),s.jsx("div",{className:"w-full md:w-40 md:mt-0",children:s.jsxs(oe,{className:"overflow-hidden border-0 shadow-xl",children:[s.jsx("div",{className:"relative h-20 overflow-hidden bg-white",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/9c979d0b7_IMG_2488.jpg",alt:"Partner",className:"w-full h-full object-contain p-2"})}),s.jsxs("div",{className:"p-3 bg-white space-y-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-sm text-gray-900 mb-1",children:"Become a Partner"}),s.jsx("p",{className:"text-gray-600 text-xs mb-2",children:"Join our network and earn"}),s.jsxs(G,{onClick:()=>e(At("PartnerLanding")),className:"w-full bg-purple-600 hover:bg-purple-700 text-xs h-8",children:["Join ",s.jsx(gr,{className:"w-3 h-3 ml-1"})]})]}),s.jsx(G,{onClick:()=>e(At("PartnerPortal")),variant:"outline",className:"w-full text-xs h-8 border-purple-600 text-purple-600 hover:bg-purple-50",children:"Partner Login"})]})]})})]})})}),s.jsx(qA,{isOpen:c,onClose:()=>{d(!1),m(null)},onProceed:g,flow:h}),s.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-16",children:[s.jsx("div",{className:"text-center mb-8",children:s.jsx("h2",{className:"text-6xl font-black text-gray-900 mb-2",children:"STOW MY BAGS !"})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-6",children:[s.jsxs("div",{className:"relative overflow-hidden hover:shadow-2xl transition-all border-0 cursor-pointer rounded-xl group",onClick:()=>p("arrivals"),children:[s.jsx("div",{className:"h-48 overflow-hidden",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/2f8887709_image.png",alt:"Arrivals - Book Luggage Storage, Luggage Delivery, Uber Transportation",className:"w-full h-full object-contain"})}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("div",{className:"bg-blue-600 text-white px-6 py-3 rounded-full font-bold text-lg animate-pulse shadow-xl",children:"CLICK HERE"})})]}),s.jsxs("div",{className:"relative overflow-hidden hover:shadow-2xl transition-all border-0 cursor-pointer rounded-xl group",onClick:()=>p("departures"),children:[s.jsx("div",{className:"h-48 overflow-hidden",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/7e30bc07d_image.png",alt:"Departures - Book Luggage Storage, Luggage Pickup, Uber Transportation",className:"w-full h-full object-contain"})}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("div",{className:"bg-blue-600 text-white px-6 py-3 rounded-full font-bold text-lg animate-pulse shadow-xl",children:"CLICK HERE"})})]})]}),s.jsxs("div",{className:"mt-16 grid grid-cols-2 md:grid-cols-4 gap-8 text-center",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:"500+"}),s.jsx("div",{className:"text-gray-600 text-sm",children:"Happy Travelers"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:"50+"}),s.jsx("div",{className:"text-gray-600 text-sm",children:"Storage Locations"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:"4.9★"}),s.jsx("div",{className:"text-gray-600 text-sm",children:"Average Rating"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:"24/7"}),s.jsx("div",{className:"text-gray-600 text-sm",children:"Support Available"})]})]})]})]})}const pw=b.createContext(null);function gq(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const GA=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ZA=b.createContext({}),Hn=e=>e;let KA=Hn;function gw(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ed=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ga=e=>e*1e3,xa=e=>e/1e3,xw=typeof window<"u",xq=xw?b.useLayoutEffect:b.useEffect,yq={useManualTiming:!1};function vq(e){let t=new Set,n=new Set,r=!1,i=!1;const c=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function h(x){c.has(x)&&(m.schedule(x),e()),x(d)}const m={schedule:(x,p=!1,g=!1)=>{const N=g&&r?t:n;
vendor: 4,959 bytes, line 532
532return p&&c.add(x),N.has(x)||N.add(x),x},cancel:x=>{n.delete(x),c.delete(x)},process:x=>{if(d=x,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(h),t.clear(),r=!1,i&&(i=!1,m.process(x))}};return m}const ep=["read","resolveKeyframes","update","preRender","render","postRender"],bq=40;function QA(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},c=()=>n=!0,d=ep.reduce((A,M)=>(A[M]=vq(c),A),{}),{read:h,resolveKeyframes:m,update:x,preRender:p,render:g,postRender:w}=d,N=()=>{const A=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(A-i.timestamp,bq),1),i.timestamp=A,i.isProcessing=!0,h.process(i),m.process(i),x.process(i),p.process(i),g.process(i),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(N))},j=()=>{n=!0,r=!0,i.isProcessing||e(N)};return{schedule:ep.reduce((A,M)=>{const E=d[M];return A[M]=(D,I=!1,z=!1)=>(n||j(),E.schedule(D,I,z)),A},{}),cancel:A=>{for(let M=0;M<ep.length;M++)d[ep[M]].cancel(A)},state:i,steps:d}}const{schedule:Zt,cancel:Do,state:zs,steps:cv}=QA(typeof requestAnimationFrame<"u"?requestAnimationFrame:Hn,!0),XA=b.createContext({strict:!1}),W1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ad={};for(const e in W1)Ad[e]={isEnabled:t=>W1[e].some(n=>!!t[n])};function wq(e){for(const t in e)Ad[t]={...Ad[t],...e[t]}}const _q=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_q.has(e)}let JA=e=>!Hp(e);function jq(e){e&&(JA=t=>t.startsWith("on")?!Hp(t):e(t))}try{jq(require("@emotion/is-prop-valid").default)}catch{}function Nq(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(JA(i)||n===!0&&Hp(i)||!t&&!Hp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Sq(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const qg=b.createContext({});function Fh(e){return typeof e=="string"||Array.isArray(e)}function Gg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const yw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vw=["initial",...yw];function Zg(e){return Gg(e.animate)||vw.some(t=>Fh(e[t]))}function e4(e){return!!(Zg(e)||e.variants)}function kq(e,t){if(Zg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fh(n)?n:void 0,animate:Fh(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cq(e){const{initial:t,animate:n}=kq(e,b.useContext(qg));return b.useMemo(()=>({initial:t,animate:n}),[H1(t),H1(n)])}function H1(e){return Array.isArray(e)?e.join(" "):e}const Pq=Symbol.for("motionComponentSymbol");function nd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tq(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):nd(n)&&(n.current=r))},[t])}const bw=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Eq="framerAppearId",t4="data-"+bw(Eq),{schedule:ww}=QA(queueMicrotask,!1),s4=b.createContext({});function Aq(e,t,n,r,i){var c,d;const{visualElement:h}=b.useContext(qg),m=b.useContext(XA),x=b.useContext(pw),p=b.useContext(GA).reducedMotion,g=b.useRef(null);r=r||m.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:h,props:n,presenceContext:x,blockInitialAnimation:x?x.initial===!1:!1,reducedMotionConfig:p}));const w=g.current,N=b.useContext(s4);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&Mq(g.current,n,i,N);const j=b.useRef(!1);b.useInsertionEffect(()=>{w&&j.current&&w.update(n,x)});const _=n[t4],C=b.useRef(!!_&&!(!((c=window.MotionHandoffIsComplete)===null||c===void 0)&&c.call(window,_))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,_)));return xq(()=>{w&&(j.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),ww.render(w.render),C.current&&w.animationState&&w.animationState.animateChanges())}),b.useEffect(()=>{w&&(!C.current&&w.animationState&&w.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)===null||A===void 0||A.call(window,_)}
vendor: 4,062 bytes, line 532
532),C.current=!1))}),w}function Mq(e,t,n,r){const{layoutId:i,layout:c,drag:d,dragConstraints:h,layoutScroll:m,layoutRoot:x}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:n4(e.parent)),e.projection.setOptions({layoutId:i,layout:c,alwaysMeasureLayout:!!d||h&&nd(h),visualElement:e,animationType:typeof c=="string"?c:"both",initialPromotionConfig:r,layoutScroll:m,layoutRoot:x})}function n4(e){if(e)return e.options.allowProjection!==!1?e.projection:n4(e.parent)}function Rq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var c,d;e&&wq(e);function h(x,p){let g;const w={...b.useContext(GA),...x,layoutId:Lq(x)},{isStatic:N}=w,j=Cq(x),_=r(x,N);if(!N&&xw){Dq();const C=Oq(w);g=C.MeasureLayout,j.visualElement=Aq(i,_,w,t,C.ProjectionNode)}return s.jsxs(qg.Provider,{value:j,children:[g&&j.visualElement?s.jsx(g,{visualElement:j.visualElement,...w}):null,n(i,x,Tq(_,j.visualElement,p),_,N,j.visualElement)]})}h.displayName=`motion.${typeof i=="string"?i:`create(${(d=(c=i.displayName)!==null&&c!==void 0?c:i.name)!==null&&d!==void 0?d:""})`}`;const m=b.forwardRef(h);return m[Pq]=i,m}function Lq({layoutId:e}){const t=b.useContext(ZA).id;return t&&e!==void 0?t+"-"+e:e}function Dq(e,t){b.useContext(XA).strict}function Oq(e){const{drag:t,layout:n}=Ad;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Iq=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _w(e){return typeof e!="string"||e.includes("-")?!1:!!(Iq.indexOf(e)>-1||/[A-Z]/u.test(e))}function r4(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const c in n)e.style.setProperty(c,n[c])}const i4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function a4(e,t,n,r){r4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(i4.has(i)?i:bw(i),t.attrs[i])}const sn=e=>!!(e&&e.getVelocity),Yp={};function Fq(e){Object.assign(Yp,e)}const df=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tc=new Set(df);function o4(e,{layout:t,layoutId:n}){return tc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yp[e]||e==="opacity")}function jw(e,t,n){var r;const{style:i}=e,c={};for(const d in i)(sn(i[d])||t.style&&sn(t.style[d])||o4(d,e)||((r=n==null?void 0:n.getValue(d))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(c[d]=i[d]);return c}function l4(e,t,n){const r=jw(e,t,n);for(const i in e)if(sn(e[i])||sn(t[i])){const c=df.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[c]=e[i]}return r}function Y1(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nw(e,t,n,r){if(typeof t=="function"){const[i,c]=Y1(r);t=t(n!==void 0?n:e.custom,i,c)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,c]=Y1(r);t=t(n!==void 0?n:e.custom,i,c)}return t}const _0=e=>Array.isArray(e),Bq=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),zq=e=>_0(e)?e[e.length-1]||0:e;function wp(e){const t=sn(e)?e.get():e;return Bq(t)?t.toValue():t}function $q({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,c){const d={latestValues:Uq(r,i,c,e),renderState:t()};return n&&(d.mount=h=>n(r,h,d)),d}const c4=e=>(t,n)=>{const r=b.useContext(qg),i=b.useContext(pw),c=()=>$q(e,t,r,i);return n?c():gq(c)};function Uq(e,t,n,r){const i={},c=r(e,{});for(const w in c)i[w]=wp(c[w]);let{initial:d,animate:h}=e;const m=Zg(e),x=e4(e);
vendor: 51,019 bytes, line 532
532t&&x&&!m&&e.inherit!==!1&&(d===void 0&&(d=t.initial),h===void 0&&(h=t.animate));let p=n?n.initial===!1:!1;p=p||d===!1;const g=p?h:d;if(g&&typeof g!="boolean"&&!Gg(g)){const w=Array.isArray(g)?g:[g];for(let N=0;N<w.length;N++){const j=Nw(e,w[N]);if(j){const{transitionEnd:_,transition:C,...A}=j;for(const M in A){let E=A[M];if(Array.isArray(E)){const D=p?E.length-1:0;E=E[D]}E!==null&&(i[M]=E)}for(const M in _)i[M]=_[M]}}}return i}const Sw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),d4=()=>({...Sw(),attrs:{}}),u4=(e,t)=>t&&typeof e=="number"?t.transform(e):e,wa=(e,t,n)=>n>t?t:n<e?e:n,Qd={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Bh={...Qd,transform:e=>wa(0,1,e)},tp={...Qd,default:1},uf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),fo=uf("deg"),wi=uf("%"),nt=uf("px"),Vq=uf("vh"),Wq=uf("vw"),q1={...wi,parse:e=>wi.parse(e)/100,transform:e=>wi.transform(e*100)},Hq={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,backgroundPositionX:nt,backgroundPositionY:nt},Yq={rotate:fo,rotateX:fo,rotateY:fo,rotateZ:fo,scale:tp,scaleX:tp,scaleY:tp,scaleZ:tp,skew:fo,skewX:fo,skewY:fo,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Bh,originX:q1,originY:q1,originZ:nt},G1={...Qd,transform:Math.round},kw={...Hq,...Yq,zIndex:G1,size:nt,fillOpacity:Bh,strokeOpacity:Bh,numOctaves:G1},qq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gq=df.length;function Zq(e,t,n){let r="",i=!0;for(let c=0;c<Gq;c++){const d=df[c],h=e[d];if(h===void 0)continue;let m=!0;if(typeof h=="number"?m=h===(d.startsWith("scale")?1:0):m=parseFloat(h)===0,!m||n){const x=u4(h,kw[d]);if(!m){i=!1;const p=qq[d]||d;r+=`${p}(${x}) `}n&&(t[d]=x)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}const h4=e=>t=>typeof t=="string"&&t.startsWith(e),f4=h4("--"),Kq=h4("var(--"),Cw=e=>Kq(e)?Qq.test(e.split("/*")[0].trim()):!1,Qq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pw(e,t,n){const{style:r,vars:i,transformOrigin:c}=e;let d=!1,h=!1;for(const m in t){const x=t[m];if(tc.has(m)){d=!0;continue}else if(f4(m)){i[m]=x;continue}else{const p=u4(x,kw[m]);m.startsWith("origin")?(h=!0,c[m]=p):r[m]=p}}if(t.transform||(d||n?r.transform=Zq(t,e.transform,n):r.transform&&(r.transform="none")),h){const{originX:m="50%",originY:x="50%",originZ:p=0}=c;r.transformOrigin=`${m} ${x} ${p}`}}function Z1(e,t,n){return typeof e=="string"?e:nt.transform(t+n*e)}function Xq(e,t,n){const r=Z1(t,e.x,e.width),i=Z1(n,e.y,e.height);return`${r} ${i}`}const Jq={offset:"stroke-dashoffset",array:"stroke-dasharray"},eG={offset:"strokeDashoffset",array:"strokeDasharray"};function tG(e,t,n=1,r=0,i=!0){e.pathLength=1;const c=i?Jq:eG;e[c.offset]=nt.transform(-r);const d=nt.transform(t),h=nt.transform(n);e[c.array]=`${d} ${h}`}function Tw(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:c,pathLength:d,pathSpacing:h=1,pathOffset:m=0,...x},p,g){if(Pw(e,x,g),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:N,dimensions:j}=e;w.transform&&(j&&(N.transform=w.transform),delete w.transform),j&&(i!==void 0||c!==void 0||N.transform)&&(N.transformOrigin=Xq(j,i!==void 0?i:.5,c!==void 0?c:.5)),t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),d!==void 0&&tG(w,d,h,m,!1)}const Ew=e=>typeof e=="string"&&e.toLowerCase()==="svg",sG={useVisualState:c4({scrapeMotionValuesFromProps:l4,createRenderState:d4,onMount:(e,t,{renderState:n,latestValues:r})=>{Zt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Zt.render(()=>{Tw(n,r,Ew(t.tagName),e.transformTemplate),a4(t,n)})}})},nG={useVisualState:c4({scrapeMotionValuesFromProps:jw,createRenderState:Sw})};function m4(e,t,n){for(const r in t)!sn(t[r])&&!o4(r,n)&&(e[r]=t[r])}function rG({transformTemplate:e},t){return b.useMemo(()=>{const n=Sw();return Pw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iG(e,t){const n=e.style||{},r={};return m4(r,n,e),Object.assign(r,rG(e,t)),r}function aG(e,t){const n={},r=iG(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function oG(e,t,n,r){const i=b.useMemo(()=>{const c=d4();return Tw(c,t,Ew(r),e.transformTemplate),{...c.attrs,style:{...c.style}}},[t]);if(e.style){const c={};m4(c,e.style,e),i.style={...c,...i.style}}return i}function lG(e=!1){return(n,r,i,{latestValues:c},d)=>{const m=(_w(n)?oG:aG)(r,c,d,n),x=Nq(r,typeof n=="string",e),p=n!==b.Fragment?{...x,...m,ref:i}:{},{children:g}=r,w=b.useMemo(()=>sn(g)?g.get():g,[g]);return b.createElement(n,{...p,children:w})}}function cG(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const d={..._w(r)?sG:nG,preloadedFeatures:e,useRender:lG(i),createVisualElement:t,Component:r};return Rq(d)}}function p4(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Kg(e,t,n){const r=e.getProps();return Nw(r,t,n!==void 0?n:r.custom,e)}const dG=gw(()=>window.ScrollTimeline!==void 0);class uG{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(dG()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,c)=>{i&&i(),this.animations[c].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class hG extends uG{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Aw(e,t){return e?e[t]||e.default||e:void 0}const j0=2e4;function g4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<j0;)t+=n,r=e.next(t);return t>=j0?1/0:t}function Mw(e){return typeof e=="function"}function K1(e,t){e.timeline=t,e.onfinish=null}const Rw=e=>Array.isArray(e)&&typeof e[0]=="number",fG={linearEasing:void 0};function mG(e,t){const n=gw(e);return()=>{var r;return(r=fG[t])!==null&&r!==void 0?r:n()}}const qp=mG(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),x4=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let c=0;c<i;c++)r+=e(Ed(0,i-1,c))+", ";return`linear(${r.substring(0,r.length-2)})`};function y4(e){return!!(typeof e=="function"&&qp()||!e||typeof e=="string"&&(e in N0||qp())||Rw(e)||Array.isArray(e)&&e.every(y4))}const uh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,N0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uh([0,.65,.55,1]),circOut:uh([.55,0,1,.45]),backIn:uh([.31,.01,.66,-.59]),backOut:uh([.33,1.53,.69,.99])};function v4(e,t){if(e)return typeof e=="function"&&qp()?x4(e,t):Rw(e)?uh(e):Array.isArray(e)?e.map(n=>v4(n,t)||N0.easeOut):N0[e]}const Fr={x:!1,y:!1};function b4(){return Fr.x||Fr.y}function pG(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const c=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return c?Array.from(c):[]}return Array.from(e)}function w4(e,t){const n=pG(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Q1(e){return t=>{t.pointerType==="touch"||b4()||e(t)}}function gG(e,t,n={}){const[r,i,c]=w4(e,n),d=Q1(h=>{const{target:m}=h,x=t(h);if(typeof x!="function"||!m)return;const p=Q1(g=>{x(g),m.removeEventListener("pointerleave",p)});m.addEventListener("pointerleave",p,i)});return r.forEach(h=>{h.addEventListener("pointerenter",d,i)}),c}const _4=(e,t)=>t?e===t?!0:_4(e,t.parentElement):!1,Lw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yG(e){return xG.has(e.tagName)||e.tabIndex!==-1}const hh=new WeakSet;function X1(e){return t=>{t.key==="Enter"&&e(t)}}function dv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=X1(()=>{if(hh.has(n))return;dv(n,"down");const i=X1(()=>{dv(n,"up")}),c=()=>dv(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",c,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function J1(e){return Lw(e)&&!b4()}function bG(e,t,n={}){const[r,i,c]=w4(e,n),d=h=>{const m=h.currentTarget;if(!J1(h)||hh.has(m))return;hh.add(m);const x=t(h),p=(N,j)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",w),!(!J1(N)||!hh.has(m))&&(hh.delete(m),typeof x=="function"&&x(N,{success:j}))},g=N=>{p(N,n.useGlobalTarget||_4(m,N.target))},w=N=>{p(N,!1)};window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",w,i)};return r.forEach(h=>{!yG(h)&&h.getAttribute("tabindex")===null&&(h.tabIndex=0),(n.useGlobalTarget?window:h).addEventListener("pointerdown",d,i),h.addEventListener("focus",x=>vG(x,i),i)}),c}function wG(e){return e==="x"||e==="y"?Fr[e]?null:(Fr[e]=!0,()=>{Fr[e]=!1}):Fr.x||Fr.y?null:(Fr.x=Fr.y=!0,()=>{Fr.x=Fr.y=!1})}let _p;function _G(){_p=void 0}const _i={now:()=>(_p===void 0&&_i.set(zs.isProcessing||yq.useManualTiming?zs.timestamp:performance.now()),_p),set:e=>{_p=e,queueMicrotask(_G)}};function Dw(e,t){e.indexOf(t)===-1&&e.push(t)}function Ow(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Iw{constructor(){this.subscriptions=[]}add(t){return Dw(this.subscriptions,t),()=>Ow(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let c=0;c<i;c++){const d=this.subscriptions[c];d&&d(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function j4(e,t){return t?e*(1e3/t):0}const eS=30,jG=e=>!isNaN(parseFloat(e));class NG{constructor(t,n={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const c=_i.now();this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_i.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=jG(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Zt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_i.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>eS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,eS);return j4(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zh(e,t){return new NG(e,t)}function SG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zh(n))}function kG(e,t){const n=Kg(e,t);let{transitionEnd:r={},transition:i={},...c}=n||{};c={...c,...r};for(const d in c){const h=zq(c[d]);SG(e,d,h)}}function CG(e){return!!(sn(e)&&e.add)}function S0(e,t){const n=e.getValue("willChange");if(CG(n))return n.add(t)}function N4(e){return e.props[t4]}const S4=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PG=1e-7,TG=12;function EG(e,t,n,r,i){let c,d,h=0;do d=t+(n-t)/2,c=S4(d,r,i)-e,c>0?n=d:t=d;while(Math.abs(c)>PG&&++h<TG);return d}function hf(e,t,n,r){if(e===t&&n===r)return Hn;const i=c=>EG(c,0,1,e,n);return c=>c===0||c===1?c:S4(i(c),t,r)}const k4=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,C4=e=>t=>1-e(1-t),P4=hf(.33,1.53,.69,.99),Fw=C4(P4),T4=k4(Fw),E4=e=>(e*=2)<1?.5*Fw(e):.5*(2-Math.pow(2,-10*(e-1))),Bw=e=>1-Math.sin(Math.acos(e)),A4=C4(Bw),M4=k4(Bw),R4=e=>/^0[^.\s]+$/u.test(e);function AG(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||R4(e):!0}const L4=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),MG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RG(e){const t=MG.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function D4(e,t,n=1){const[r,i]=RG(e);if(!r)return;const c=window.getComputedStyle(t).getPropertyValue(r);if(c){const d=c.trim();return L4(d)?parseFloat(d):d}return Cw(i)?D4(i,t,n+1):i}const LG=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),tS=e=>e===Qd||e===nt,sS=(e,t)=>parseFloat(e.split(", ")[t]),nS=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return sS(i[1],t);{const c=r.match(/^matrix\((.+)\)$/u);return c?sS(c[1],e):0}},DG=new Set(["x","y","z"]),OG=df.filter(e=>!DG.has(e));function IG(e){const t=[];return OG.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Md={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nS(4,13),y:nS(5,14)};Md.translateX=Md.x;Md.translateY=Md.y;const O4=e=>t=>t.test(e),FG={test:e=>e==="auto",parse:e=>e},I4=[Qd,nt,wi,fo,Wq,Vq,FG],rS=e=>I4.find(O4(e)),zl=new Set;let k0=!1,C0=!1;function F4(){if(C0){const e=Array.from(zl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=IG(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([c,d])=>{var h;(h=r.getValue(c))===null||h===void 0||h.set(d)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}C0=!1,k0=!1,zl.forEach(e=>e.complete()),zl.clear()}function B4(){zl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(C0=!0)})}function BG(){B4(),F4()}class zw{constructor(t,n,r,i,c,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=c,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(zl.add(this),k0||(k0=!0,Zt.read(B4),Zt.resolveKeyframes(F4))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let c=0;c<t.length;c++)if(t[c]===null)if(c===0){const d=i==null?void 0:i.get(),h=t[t.length-1];if(d!==void 0)t[0]=d;else if(r&&n){const m=r.readValue(n,h);m!=null&&(t[0]=m)}t[0]===void 0&&(t[0]=h),i&&d===void 0&&i.set(t[0])}else t[c]=t[c-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),zl.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zl.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const vh=e=>Math.round(e*1e5)/1e5,$w=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zG(e){return e==null}const $G=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Uw=(e,t)=>n=>!!(typeof n=="string"&&$G.test(n)&&n.startsWith(e)||t&&!zG(n)&&Object.prototype.hasOwnProperty.call(n,t)),z4=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,c,d,h]=r.match($w);return{[e]:parseFloat(i),[t]:parseFloat(c),[n]:parseFloat(d),alpha:h!==void 0?parseFloat(h):1}},UG=e=>wa(0,255,e),uv={...Qd,transform:e=>Math.round(UG(e))},kl={test:Uw("rgb","red"),parse:z4("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+uv.transform(e)+", "+uv.transform(t)+", "+uv.transform(n)+", "+vh(Bh.transform(r))+")"};function VG(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const P0={test:Uw("#"),parse:VG,transform:kl.transform},rd={test:Uw("hsl","hue"),parse:z4("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wi.transform(vh(t))+", "+wi.transform(vh(n))+", "+vh(Bh.transform(r))+")"},Xs={test:e=>kl.test(e)||P0.test(e)||rd.test(e),parse:e=>kl.test(e)?kl.parse(e):rd.test(e)?rd.parse(e):P0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kl.transform(e):rd.transform(e)},WG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function HG(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($w))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(WG))===null||n===void 0?void 0:n.length)||0)>0}const $4="number",U4="color",YG="var",qG="var(",iS="${}",GG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $h(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let c=0;const h=t.replace(GG,m=>(Xs.test(m)?(r.color.push(c),i.push(U4),n.push(Xs.parse(m))):m.startsWith(qG)?(r.var.push(c),i.push(YG),n.push(m)):(r.number.push(c),i.push($4),n.push(parseFloat(m))),++c,iS)).split(iS);return{values:n,split:h,indexes:r,types:i}}function V4(e){return $h(e).values}function W4(e){const{split:t,types:n}=$h(e),r=t.length;return i=>{let c="";for(let d=0;d<r;d++)if(c+=t[d],i[d]!==void 0){const h=n[d];h===$4?c+=vh(i[d]):h===U4?c+=Xs.transform(i[d]):c+=i[d]}return c}}const ZG=e=>typeof e=="number"?0:e;function KG(e){const t=V4(e);return W4(e)(t.map(ZG))}const Oo={test:HG,parse:V4,createTransformer:W4,getAnimatableNone:KG},QG=new Set(["brightness","contrast","saturate","opacity"]);function XG(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($w)||[];if(!r)return e;const i=n.replace(r,"");let c=QG.has(t)?1:0;return r!==n&&(c*=100),t+"("+c+i+")"}const JG=/\b([a-z-]*)\(.*?\)/gu,T0={...Oo,getAnimatableNone:e=>{const t=e.match(JG);return t?t.map(XG).join(" "):e}},eZ={...kw,color:Xs,backgroundColor:Xs,outlineColor:Xs,fill:Xs,stroke:Xs,borderColor:Xs,borderTopColor:Xs,borderRightColor:Xs,borderBottomColor:Xs,borderLeftColor:Xs,filter:T0,WebkitFilter:T0},Vw=e=>eZ[e];function H4(e,t){let n=Vw(e);return n!==T0&&(n=Oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const tZ=new Set(["auto","none","0"]);function sZ(e,t,n){let r=0,i;for(;r<e.length&&!i;){const c=e[r];typeof c=="string"&&!tZ.has(c)&&$h(c).values.length&&(i=e[r]),r++}if(i&&n)for(const c of t)e[c]=H4(n,i)}class Y4 extends zw{constructor(t,n,r,i,c){super(t,n,r,i,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let x=t[m];if(typeof x=="string"&&(x=x.trim(),Cw(x))){const p=D4(x,n.current);p!==void 0&&(t[m]=p),m===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!LG.has(r)||t.length!==2)return;const[i,c]=t,d=rS(i),h=rS(c);if(d!==h)if(tS(d)&&tS(h))for(let m=0;m<t.length;m++){const x=t[m];typeof x=="string"&&(t[m]=parseFloat(x))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)AG(t[i])&&r.push(i);r.length&&sZ(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Md[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const c=n.getValue(r);c&&c.jump(this.measuredOrigin,!1);const d=i.length-1,h=i[d];i[d]=Md[r](n.measureViewportBox(),window.getComputedStyle(n.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([m,x])=>{n.getValue(m).set(x)}),this.resolveNoneKeyframes()}}const aS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Oo.test(e)||e==="0")&&!e.startsWith("url("));function nZ(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rZ(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const c=e[e.length-1],d=aS(i,t),h=aS(c,t);return!d||!h?!1:nZ(e)||(n==="spring"||Mw(n))&&r}const iZ=e=>e!==null;function Qg(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(iZ),c=t&&n!=="loop"&&t%2===1?0:i.length-1;return!c||r===void 0?i[c]:r}const aZ=40;class q4{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:c=0,repeatType:d="loop",...h}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_i.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:c,repeatType:d,...h},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>aZ?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&BG(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=_i.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:c,delay:d,onComplete:h,onUpdate:m,isGenerator:x}=this.options;if(!x&&!rZ(t,r,i,c))if(d)this.options.duration=0;else{m==null||m(Qg(t,this.options,n)),h==null||h(),this.resolveFinishedPromise();return}const p=this.initPlayback(t,n);p!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...p},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ls=(e,t,n)=>e+(t-e)*n;function hv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function oZ({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,c=0,d=0;if(!t)i=c=d=n;else{const h=n<.5?n*(1+t):n+t-n*t,m=2*n-h;i=hv(m,h,e+1/3),c=hv(m,h,e),d=hv(m,h,e-1/3)}return{red:Math.round(i*255),green:Math.round(c*255),blue:Math.round(d*255),alpha:r}}function Gp(e,t){return n=>n>0?t:e}const fv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},lZ=[P0,kl,rd],cZ=e=>lZ.find(t=>t.test(e));function oS(e){const t=cZ(e);if(!t)return!1;let n=t.parse(e);return t===rd&&(n=oZ(n)),n}const lS=(e,t)=>{const n=oS(e),r=oS(t);if(!n||!r)return Gp(e,t);const i={...n};return c=>(i.red=fv(n.red,r.red,c),i.green=fv(n.green,r.green,c),i.blue=fv(n.blue,r.blue,c),i.alpha=ls(n.alpha,r.alpha,c),kl.transform(i))},dZ=(e,t)=>n=>t(e(n)),ff=(...e)=>e.reduce(dZ),E0=new Set(["none","hidden"]);function uZ(e,t){return E0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function hZ(e,t){return n=>ls(e,t,n)}function Ww(e){return typeof e=="number"?hZ:typeof e=="string"?Cw(e)?Gp:Xs.test(e)?lS:pZ:Array.isArray(e)?G4:typeof e=="object"?Xs.test(e)?lS:fZ:Gp}function G4(e,t){const n=[...e],r=n.length,i=e.map((c,d)=>Ww(c)(c,t[d]));return c=>{for(let d=0;d<r;d++)n[d]=i[d](c);return n}}function fZ(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ww(e[i])(e[i],t[i]));return i=>{for(const c in r)n[c]=r[c](i);return n}}function mZ(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let c=0;c<t.values.length;c++){const d=t.types[c],h=e.indexes[d][i[d]],m=(n=e.values[h])!==null&&n!==void 0?n:0;r[c]=m,i[d]++}return r}const pZ=(e,t)=>{const n=Oo.createTransformer(t),r=$h(e),i=$h(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?E0.has(e)&&!i.values.length||E0.has(t)&&!r.values.length?uZ(e,t):ff(G4(mZ(r,i),i.values),n):Gp(e,t)};function Z4(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ls(e,t,n):Ww(e)(e,t)}const gZ=5;function K4(e,t,n){const r=Math.max(t-gZ,0);return j4(n-e(r),t-r)}const fs={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},mv=.001;function xZ({duration:e=fs.duration,bounce:t=fs.bounce,velocity:n=fs.velocity,mass:r=fs.mass}){let i,c,d=1-t;d=wa(fs.minDamping,fs.maxDamping,d),e=wa(fs.minDuration,fs.maxDuration,xa(e)),d<1?(i=x=>{const p=x*d,g=p*e,w=p-n,N=A0(x,d),j=Math.exp(-g);return mv-w/N*j},c=x=>{const g=x*d*e,w=g*n+n,N=Math.pow(d,2)*Math.pow(x,2)*e,j=Math.exp(-g),_=A0(Math.pow(x,2),d);return(-i(x)+mv>0?-1:1)*((w-N)*j)/_}):(i=x=>{const p=Math.exp(-x*e),g=(x-n)*e+1;return-mv+p*g},c=x=>{const p=Math.exp(-x*e),g=(n-x)*(e*e);return p*g});const h=5/e,m=vZ(i,c,h);if(e=ga(e),isNaN(m))return{stiffness:fs.stiffness,damping:fs.damping,duration:e};{const x=Math.pow(m,2)*r;return{stiffness:x,damping:d*2*Math.sqrt(r*x),duration:e}}}const yZ=12;function vZ(e,t,n){let r=n;for(let i=1;i<yZ;i++)r=r-e(r)/t(r);return r}function A0(e,t){return e*Math.sqrt(1-t*t)}const bZ=["duration","bounce"],wZ=["stiffness","damping","mass"];function cS(e,t){return t.some(n=>e[n]!==void 0)}function _Z(e){let t={velocity:fs.velocity,stiffness:fs.stiffness,damping:fs.damping,mass:fs.mass,isResolvedFromDuration:!1,...e};if(!cS(e,wZ)&&cS(e,bZ))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,c=2*wa(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:fs.mass,stiffness:i,damping:c}}else{const n=xZ(e);t={...t,...n,mass:fs.mass},t.isResolvedFromDuration=!0}return t}function Q4(e=fs.visualDuration,t=fs.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const c=n.keyframes[0],d=n.keyframes[n.keyframes.length-1],h={done:!1,value:c},{stiffness:m,damping:x,mass:p,duration:g,velocity:w,isResolvedFromDuration:N}=_Z({...n,velocity:-xa(n.velocity||0)}),j=w||0,_=x/(2*Math.sqrt(m*p)),C=d-c,A=xa(Math.sqrt(m/p)),M=Math.abs(C)<5;r||(r=M?fs.restSpeed.granular:fs.restSpeed.default),i||(i=M?fs.restDelta.granular:fs.restDelta.default);let E;if(_<1){const I=A0(A,_);E=z=>{const H=Math.exp(-_*A*z);return d-H*((j+_*A*C)/I*Math.sin(I*z)+C*Math.cos(I*z))}}else if(_===1)E=I=>d-Math.exp(-A*I)*(C+(j+A*C)*I);else{const I=A*Math.sqrt(_*_-1);E=z=>{const H=Math.exp(-_*A*z),V=Math.min(I*z,300);return d-H*((j+_*A*C)*Math.sinh(V)+I*C*Math.cosh(V))/I}}const D={calculatedDuration:N&&g||null,next:I=>{const z=E(I);if(N)h.done=I>=g;else{let H=0;_<1&&(H=I===0?ga(j):K4(E,I,z));const V=Math.abs(H)<=r,Q=Math.abs(d-z)<=i;h.done=V&&Q}return h.value=h.done?d:z,h},toString:()=>{const I=Math.min(g4(D),j0),z=x4(H=>D.next(I*H).value,I,30);return I+"ms "+z}};return D}function dS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:c=500,modifyTarget:d,min:h,max:m,restDelta:x=.5,restSpeed:p}){const g=e[0],w={done:!1,value:g},N=V=>h!==void 0&&V<h||m!==void 0&&V>m,j=V=>h===void 0?m:m===void 0||Math.abs(h-V)<Math.abs(m-V)?h:m;let _=n*t;const C=g+_,A=d===void 0?C:d(C);A!==C&&(_=A-g);const M=V=>-_*Math.exp(-V/r),E=V=>A+M(V),D=V=>{const Q=M(V),J=E(V);w.done=Math.abs(Q)<=x,w.value=w.done?A:J};let I,z;const H=V=>{N(w.value)&&(I=V,z=Q4({keyframes:[w.value,j(w.value)],velocity:K4(E,V,w.value),damping:i,stiffness:c,restDelta:x,restSpeed:p}))};return H(0),{calculatedDuration:null,next:V=>{let Q=!1;return!z&&I===void 0&&(Q=!0,D(V),H(V)),I!==void 0&&V>=I?z.next(V-I):(!Q&&D(V),w)}}}const jZ=hf(.42,0,1,1),NZ=hf(0,0,.58,1),X4=hf(.42,0,.58,1),SZ=e=>Array.isArray(e)&&typeof e[0]!="number",kZ={linear:Hn,easeIn:jZ,easeInOut:X4,easeOut:NZ,circIn:Bw,circInOut:M4,circOut:A4,backIn:Fw,backInOut:T4,backOut:P4,anticipate:E4},uS=e=>{if(Rw(e)){KA(e.length===4);const[t,n,r,i]=e;return hf(t,n,r,i)}else if(typeof e=="string")return kZ[e];return e};function CZ(e,t,n){const r=[],i=n||Z4,c=e.length-1;for(let d=0;d<c;d++){let h=i(e[d],e[d+1]);if(t){const m=Array.isArray(t)?t[d]||Hn:t;h=ff(m,h)}r.push(h)}return r}function PZ(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const c=e.length;if(KA(c===t.length),c===1)return()=>t[0];if(c===2&&e[0]===e[1])return()=>t[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=CZ(t,r,i),h=d.length,m=x=>{let p=0;if(h>1)for(;p<e.length-2&&!(x<e[p+1]);p++);const g=Ed(e[p],e[p+1],x);return d[p](g)};return n?x=>m(wa(e[0],e[c-1],x)):m}function TZ(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ed(0,t,r);e.push(ls(n,1,i))}}function EZ(e){const t=[0];return TZ(t,e.length-1),t}function AZ(e,t){return e.map(n=>n*t)}function MZ(e,t){return e.map(()=>t||X4).splice(0,e.length-1)}function Zp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=SZ(r)?r.map(uS):uS(r),c={done:!1,value:t[0]},d=AZ(n&&n.length===t.length?n:EZ(t),e),h=PZ(d,t,{ease:Array.isArray(i)?i:MZ(t,i)});return{calculatedDuration:e,next:m=>(c.value=h(m),c.done=m>=e,c)}}const RZ=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Zt.update(t,!0),stop:()=>Do(t),now:()=>zs.isProcessing?zs.timestamp:_i.now()}},LZ={decay:dS,inertia:dS,tween:Zp,keyframes:Zp,spring:Q4},DZ=e=>e/100;class Hw extends q4{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:n,motionValue:r,element:i,keyframes:c}=this.options,d=(i==null?void 0:i.KeyframeResolver)||zw,h=(m,x)=>this.onKeyframesResolved(m,x);this.resolver=new d(c,h,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:c,velocity:d=0}=this.options,h=Mw(n)?n:LZ[n]||Zp;let m,x;h!==Zp&&typeof t[0]!="number"&&(m=ff(DZ,Z4(t[0],t[1])),t=[0,100]);const p=h({...this.options,keyframes:t});c==="mirror"&&(x=h({...this.options,keyframes:[...t].reverse(),velocity:-d})),p.calculatedDuration===null&&(p.calculatedDuration=g4(p));const{calculatedDuration:g}=p,w=g+i,N=w*(r+1)-i;return{generator:p,mirroredGenerator:x,mapPercentToKeyframes:m,calculatedDuration:g,resolvedDuration:w,totalDuration:N}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:i,generator:c,mirroredGenerator:d,mapPercentToKeyframes:h,keyframes:m,calculatedDuration:x,totalDuration:p,resolvedDuration:g}=r;if(this.startTime===null)return c.next(0);const{delay:w,repeat:N,repeatType:j,repeatDelay:_,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-p/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const A=this.currentTime-w*(this.speed>=0?1:-1),M=this.speed>=0?A<0:A>p;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=p);let E=this.currentTime,D=c;if(N){const V=Math.min(this.currentTime,p)/g;let Q=Math.floor(V),J=V%1;!J&&V>=1&&(J=1),J===1&&Q--,Q=Math.min(Q,N+1),!!(Q%2)&&(j==="reverse"?(J=1-J,_&&(J-=_/g)):j==="mirror"&&(D=d)),E=wa(0,1,J)*g}const I=M?{done:!1,value:m[0]}:D.next(E);h&&(I.value=h(I.value));let{done:z}=I;!M&&x!==null&&(z=this.speed>=0?this.currentTime>=p:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&z);return H&&i!==void 0&&(I.value=Qg(m,this.options,i)),C&&C(I.value),H&&this.finish(),I}get duration(){const{resolved:t}=this;return t?xa(t.calculatedDuration):0}get time(){return xa(this.currentTime)}set time(t){t=ga(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=xa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=RZ,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const OZ=new Set(["opacity","clipPath","filter","transform"]);function IZ(e,t,n,{delay:r=0,duration:i=300,repeat:c=0,repeatType:d="loop",ease:h="easeInOut",times:m}={}){const x={[t]:n};m&&(x.offset=m);const p=v4(h,i);return Array.isArray(p)&&(x.easing=p),e.animate(x,{delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:c+1,direction:d==="reverse"?"alternate":"normal"})}const FZ=gw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Kp=10,BZ=2e4;function zZ(e){return Mw(e.type)||e.type==="spring"||!y4(e.ease)}function $Z(e,t){const n=new Hw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let c=0;for(;!r.done&&c<BZ;)r=n.sample(c),i.push(r.value),c+=Kp;return{times:void 0,keyframes:i,duration:c-Kp,ease:"linear"}}const J4={anticipate:E4,backInOut:T4,circInOut:M4};function UZ(e){return e in J4}class hS extends q4{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:c}=this.options;this.resolver=new Y4(c,(d,h)=>this.onKeyframesResolved(d,h),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:c,ease:d,type:h,motionValue:m,name:x,startTime:p}=this.options;if(!(!((r=m.owner)===null||r===void 0)&&r.current))return!1;if(typeof d=="string"&&qp()&&UZ(d)&&(d=J4[d]),zZ(this.options)){const{onComplete:w,onUpdate:N,motionValue:j,element:_,...C}=this.options,A=$Z(t,C);t=A.keyframes,t.length===1&&(t[1]=t[0]),i=A.duration,c=A.times,d=A.ease,h="keyframes"}const g=IZ(m.owner.current,x,t,{...this.options,duration:i,times:c,ease:d});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(K1(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:w}=this.options;m.set(Qg(t,this.options,n)),w&&w(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:i,times:c,type:h,ease:d,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return xa(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return xa(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ga(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Hn;const{animation:r}=n;K1(r,t)}return Hn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:c,ease:d,times:h}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:x,onUpdate:p,onComplete:g,element:w,...N}=this.options,j=new Hw({...N,keyframes:r,duration:i,type:c,ease:d,times:h,isGenerator:!0}),_=ga(this.time);x.setWithVelocity(j.sample(_-Kp).value,j.sample(_).value,Kp)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:c,damping:d,type:h}=t;return FZ()&&r&&OZ.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&c!=="mirror"&&d!==0&&h!=="inertia"}}const VZ={type:"spring",stiffness:500,damping:25,restSpeed:10},WZ=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HZ={type:"keyframes",duration:.8},YZ={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qZ=(e,{keyframes:t})=>t.length>2?HZ:tc.has(e)?e.startsWith("scale")?WZ(t[1]):VZ:YZ;function GZ({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:c,repeatType:d,repeatDelay:h,from:m,elapsed:x,...p}){return!!Object.keys(p).length}const Yw=(e,t,n,r={},i,c)=>d=>{const h=Aw(r,e)||{},m=h.delay||r.delay||0;let{elapsed:x=0}=r;x=x-ga(m);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...h,delay:-x,onUpdate:w=>{t.set(w),h.onUpdate&&h.onUpdate(w)},onComplete:()=>{d(),h.onComplete&&h.onComplete()},name:e,motionValue:t,element:c?void 0:i};GZ(h)||(p={...p,...qZ(e,p)}),p.duration&&(p.duration=ga(p.duration)),p.repeatDelay&&(p.repeatDelay=ga(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let g=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(p.duration=0,p.delay===0&&(g=!0)),g&&!c&&t.get()!==void 0){const w=Qg(p.keyframes,h);if(w!==void 0)return Zt.update(()=>{p.onUpdate(w),p.onComplete()}),new hG([])}return!c&&hS.supports(p)?new hS(p):new Hw(p)};function ZZ({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function eM(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var c;let{transition:d=e.getDefaultTransition(),transitionEnd:h,...m}=t;r&&(d=r);const x=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const g in m){const w=e.getValue(g,(c=e.latestValues[g])!==null&&c!==void 0?c:null),N=m[g];if(N===void 0||p&&ZZ(p,g))continue;const j={delay:n,...Aw(d||{},g)};let _=!1;if(window.MotionHandoffAnimation){const A=N4(e);if(A){const M=window.MotionHandoffAnimation(A,g,Zt);M!==null&&(j.startTime=M,_=!0)}}S0(e,g),w.start(Yw(g,w,N,e.shouldReduceMotion&&tc.has(g)?{type:!1}:j,e,_));const C=w.animation;C&&x.push(C)}return h&&Promise.all(x).then(()=>{Zt.update(()=>{h&&kG(e,h)})}),x}function M0(e,t,n={}){var r;const i=Kg(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:c=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(c=n.transitionOverride);const d=i?()=>Promise.all(eM(e,i,n)):()=>Promise.resolve(),h=e.variantChildren&&e.variantChildren.size?(x=0)=>{const{delayChildren:p=0,staggerChildren:g,staggerDirection:w}=c;return KZ(e,t,p+x,g,w,n)}:()=>Promise.resolve(),{when:m}=c;if(m){const[x,p]=m==="beforeChildren"?[d,h]:[h,d];return x().then(()=>p())}else return Promise.all([d(),h(n.delay)])}function KZ(e,t,n=0,r=0,i=1,c){const d=[],h=(e.variantChildren.size-1)*r,m=i===1?(x=0)=>x*r:(x=0)=>h-x*r;return Array.from(e.variantChildren).sort(QZ).forEach((x,p)=>{x.notify("AnimationStart",t),d.push(M0(x,t,{...c,delay:n+m(p)}).then(()=>x.notify("AnimationComplete",t)))}),Promise.all(d)}function QZ(e,t){return e.sortNodePosition(t)}function XZ(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(c=>M0(e,c,n));r=Promise.all(i)}else if(typeof t=="string")r=M0(e,t,n);else{const i=typeof t=="function"?Kg(e,t,n.custom):t;r=Promise.all(eM(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const JZ=vw.length;function tM(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?tM(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<JZ;n++){const r=vw[n],i=e.props[r];(Fh(i)||i===!1)&&(t[r]=i)}return t}const eK=[...yw].reverse(),tK=yw.length;function sK(e){return t=>Promise.all(t.map(({animation:n,options:r})=>XZ(e,n,r)))}function nK(e){let t=sK(e),n=fS(),r=!0;const i=m=>(x,p)=>{var g;const w=Kg(e,p,m==="exit"?(g=e.presenceContext)===null||g===void 0?void 0:g.custom:void 0);if(w){const{transition:N,transitionEnd:j,..._}=w;x={...x,..._,...j}}return x};function c(m){t=m(e)}function d(m){const{props:x}=e,p=tM(e.parent)||{},g=[],w=new Set;let N={},j=1/0;for(let C=0;C<tK;C++){const A=eK[C],M=n[A],E=x[A]!==void 0?x[A]:p[A],D=Fh(E),I=A===m?M.isActive:null;I===!1&&(j=C);let z=E===p[A]&&E!==x[A]&&D;if(z&&r&&e.manuallyAnimateOnMount&&(z=!1),M.protectedKeys={...N},!M.isActive&&I===null||!E&&!M.prevProp||Gg(E)||typeof E=="boolean")continue;const H=rK(M.prevProp,E);let V=H||A===m&&M.isActive&&!z&&D||C>j&&D,Q=!1;const J=Array.isArray(E)?E:[E];let le=J.reduce(i(A),{});I===!1&&(le={});const{prevResolvedValues:xe={}}=M,Me={...xe,...le},ke=_e=>{V=!0,w.has(_e)&&(Q=!0,w.delete(_e)),M.needsAnimating[_e]=!0;const B=e.getValue(_e);B&&(B.liveStyle=!1)};for(const _e in Me){const B=le[_e],ce=xe[_e];if(N.hasOwnProperty(_e))continue;let ne=!1;_0(B)&&_0(ce)?ne=!p4(B,ce):ne=B!==ce,ne?B!=null?ke(_e):w.add(_e):B!==void 0&&w.has(_e)?ke(_e):M.protectedKeys[_e]=!0}M.prevProp=E,M.prevResolvedValues=le,M.isActive&&(N={...N,...le}),r&&e.blockInitialAnimation&&(V=!1),V&&(!(z&&H)||Q)&&g.push(...J.map(_e=>({animation:_e,options:{type:A}})))}if(w.size){const C={};w.forEach(A=>{const M=e.getBaseTarget(A),E=e.getValue(A);E&&(E.liveStyle=!0),C[A]=M??null}),g.push({animation:C})}let _=!!g.length;return r&&(x.initial===!1||x.initial===x.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(g):Promise.resolve()}function h(m,x){var p;if(n[m].isActive===x)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(w=>{var N;return(N=w.animationState)===null||N===void 0?void 0:N.setActive(m,x)}),n[m].isActive=x;const g=d(m);for(const w in n)n[w].protectedKeys={};return g}return{animateChanges:d,setActive:h,setAnimateFunction:c,getState:()=>n,reset:()=>{n=fS(),r=!0}}}function rK(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!p4(t,e):!1}function vl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fS(){return{animate:vl(!0),whileInView:vl(),whileHover:vl(),whileTap:vl(),whileDrag:vl(),whileFocus:vl(),exit:vl()}}class $o{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iK extends $o{constructor(t){super(t),t.animationState||(t.animationState=nK(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let aK=0;class oK extends $o{constructor(){super(...arguments),this.id=aK++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lK={animation:{Feature:iK},exit:{Feature:oK}};function Uh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mf(e){return{point:{x:e.pageX,y:e.pageY}}}const cK=e=>t=>Lw(t)&&e(t,mf(t));function bh(e,t,n,r){return Uh(e,t,cK(n),r)}const mS=(e,t)=>Math.abs(e-t);function dK(e,t){const n=mS(e.x,t.x),r=mS(e.y,t.y);return Math.sqrt(n**2+r**2)}class sM{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:c=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=gv(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,N=dK(g.offset,{x:0,y:0})>=3;if(!w&&!N)return;const{point:j}=g,{timestamp:_}=zs;this.history.push({...j,timestamp:_});const{onStart:C,onMove:A}=this.handlers;w||(C&&C(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,g)},this.handlePointerMove=(g,w)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=pv(w,this.transformPagePoint),Zt.update(this.updatePoint,!0)},this.handlePointerUp=(g,w)=>{this.end();const{onEnd:N,onSessionEnd:j,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=gv(g.type==="pointercancel"?this.lastMoveEventInfo:pv(w,this.transformPagePoint),this.history);this.startEvent&&N&&N(g,C),j&&j(g,C)},!Lw(t))return;this.dragSnapToOrigin=c,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const d=mf(t),h=pv(d,this.transformPagePoint),{point:m}=h,{timestamp:x}=zs;this.history=[{...m,timestamp:x}];const{onSessionStart:p}=n;p&&p(t,gv(h,this.history)),this.removeListeners=ff(bh(this.contextWindow,"pointermove",this.handlePointerMove),bh(this.contextWindow,"pointerup",this.handlePointerUp),bh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Do(this.updatePoint)}}function pv(e,t){return t?{point:t(e.point)}:e}function pS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gv({point:e},t){return{point:e,delta:pS(e,nM(t)),offset:pS(e,uK(t)),velocity:hK(t,.1)}}function uK(e){return e[0]}function nM(e){return e[e.length-1]}function hK(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=nM(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ga(t)));)n--;if(!r)return{x:0,y:0};const c=xa(i.timestamp-r.timestamp);if(c===0)return{x:0,y:0};const d={x:(i.x-r.x)/c,y:(i.y-r.y)/c};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const rM=1e-4,fK=1-rM,mK=1+rM,iM=.01,pK=0-iM,gK=0+iM;function qn(e){return e.max-e.min}function xK(e,t,n){return Math.abs(e-t)<=n}function gS(e,t,n,r=.5){e.origin=r,e.originPoint=ls(t.min,t.max,e.origin),e.scale=qn(n)/qn(t),e.translate=ls(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fK&&e.scale<=mK||isNaN(e.scale))&&(e.scale=1),(e.translate>=pK&&e.translate<=gK||isNaN(e.translate))&&(e.translate=0)}function wh(e,t,n,r){gS(e.x,t.x,n.x,r?r.originX:void 0),gS(e.y,t.y,n.y,r?r.originY:void 0)}function xS(e,t,n){e.min=n.min+t.min,e.max=e.min+qn(t)}function yK(e,t,n){xS(e.x,t.x,n.x),xS(e.y,t.y,n.y)}function yS(e,t,n){e.min=t.min-n.min,e.max=e.min+qn(t)}function _h(e,t,n){yS(e.x,t.x,n.x),yS(e.y,t.y,n.y)}function vK(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ls(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ls(n,e,r.max):Math.min(e,n)),e}function vS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bK(e,{top:t,left:n,bottom:r,right:i}){return{x:vS(e.x,n,i),y:vS(e.y,t,r)}}function bS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function wK(e,t){return{x:bS(e.x,t.x),y:bS(e.y,t.y)}}function _K(e,t){let n=.5;const r=qn(e),i=qn(t);return i>r?n=Ed(t.min,t.max-r,e.min):r>i&&(n=Ed(e.min,e.max-i,t.min)),wa(0,1,n)}function jK(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const R0=.35;function NK(e=R0){return e===!1?e=0:e===!0&&(e=R0),{x:wS(e,"left","right"),y:wS(e,"to
532p","bottom")}}function wS(e,t,n){return{min:_S(e,t),max:_S(e,n)}}function _S(e,t){return typeof e=="number"?e:e[t]||0}const jS=()=>({translate:0,scale:1,origin:0,originPoint:0}),id=()=>({x:jS(),y:jS()}),NS=()=>({min:0,max:0}),gs=()=>({x:NS(),y:NS()});function cr(e){return[e("x"),e("y")]}function aM({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SK({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kK(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function xv(e){return e===void 0||e===1}function L0({scale:e,scaleX:t,scaleY:n}){return!xv(e)||!xv(t)||!xv(n)}function wl(e){return L0(e)||oM(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oM(e){return SS(e.x)||SS(e.y)}function SS(e){return e&&e!=="0%"}function Qp(e,t,n){const r=e-n,i=t*r;return n+i}function kS(e,t,n,r,i){return i!==void 0&&(e=Qp(e,i,r)),Qp(e,n,r)+t}function D0(e,t=0,n=1,r,i){e.min=kS(e.min,t,n,r,i),e.max=kS(e.max,t,n,r,i)}function lM(e,{x:t,y:n}){D0(e.x,t.translate,t.scale,t.originPoint),D0(e.y,n.translate,n.scale,n.originPoint)}const CS=.999999999999,PS=1.0000000000001;function CK(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let c,d;for(let h=0;h<i;h++){c=n[h],d=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(r&&c.options.layoutScroll&&c.scroll&&c!==c.root&&od(e,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),d&&(t.x*=d.x.scale,t.y*=d.y.scale,lM(e,d)),r&&wl(c.latestValues)&&od(e,c.latestValues))}t.x<PS&&t.x>CS&&(t.x=1),t.y<PS&&t.y>CS&&(t.y=1)}function ad(e,t){e.min=e.min+t,e.max=e.max+t}function TS(e,t,n,r,i=.5){const c=ls(e.min,e.max,i);D0(e,t,n,c,r)}function od(e,t){TS(e.x,t.x,t.scaleX,t.scale,t.originX),TS(e.y,t.y,t.scaleY,t.scale,t.originY)}function cM(e,t){return aM(kK(e.getBoundingClientRect(),t))}function PK(e,t,n){const r=cM(e,n),{scroll:i}=t;return i&&(ad(r.x,i.offset.x),ad(r.y,i.offset.y)),r}const dM=({current:e})=>e?e.ownerDocument.defaultView:null,TK=new WeakMap;class EK{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gs(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=p=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(mf(p).point)},c=(p,g)=>{const{drag:w,dragPropagation:N,onDragStart:j}=this.getProps();if(w&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wG(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cr(C=>{let A=this.getAxisMotionValue(C).get()||0;if(wi.test(A)){const{projection:M}=this.visualElement;if(M&&M.layout){const E=M.layout.layoutBox[C];E&&(A=qn(E)*(parseFloat(A)/100))}}this.originPoint[C]=A}),j&&Zt.postRender(()=>j(p,g)),S0(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},d=(p,g)=>{const{dragPropagation:w,dragDirectionLock:N,onDirectionLock:j,onDrag:_}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:C}=g;if(N&&this.currentDirection===null){this.currentDirection=AK(C),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",g.point,C),this.updateAxis("y",g.point,C),this.visualElement.render(),_&&_(p,g)},h=(p,g)=>this.stop(p,g),m=()=>cr(p=>{var g;return this.getAnimationState(p)==="paused"&&((g=this.getAxisMotionValue(p).animation)===null||g===void 0?void 0:g.play())}),{dragSnapToOrigin:x}=this.getProps();this.panSession=new sM(t,{onSessionStart:i,onStart:c,onMove:d,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,contextWindow:dM(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:c}=this.getProps();c&&Zt.postRender(()=>c(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!sp(t,i,this.currentDirection))return;const c=this.getAxisMotionValue(t);let d=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(d=vK(d,this.constraints[t],this.elastic[t])),c.set(d)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,c=this.constraints;n&&nd(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=bK(i.layoutBox,n):this.constraints=!1,this.elastic=NK(r),c!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&cr(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=jK(i.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nd(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const c=PK(r,i.root,this.visualElement.getTransformPagePoint());let d=wK(i.layout.layoutBox,c);if(n){const h=n(SK(d));this.hasMutatedConstraints=!!h,h&&(d=aM(h))}return d}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:c,dragSnapToOrigin:d,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},x=cr(p=>
vendor: 45,994 bytes, line 532
532{if(!sp(p,n,this.currentDirection))return;let g=m&&m[p]||{};d&&(g={min:0,max:0});const w=i?200:1e6,N=i?40:1e7,j={type:"inertia",velocity:r?t[p]:0,bounceStiffness:w,bounceDamping:N,timeConstant:750,restDelta:1,restSpeed:10,...c,...g};return this.startAxisValueAnimation(p,j)});return Promise.all(x).then(h)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return S0(this.visualElement,t),r.start(Yw(t,r,0,n,this.visualElement,!1))}stopAnimation(){cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){cr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){cr(n=>{const{drag:r}=this.getProps();if(!sp(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,c=this.getAxisMotionValue(n);if(i&&i.layout){const{min:d,max:h}=i.layout.layoutBox[n];c.set(t[n]-ls(d,h,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!nd(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};cr(d=>{const h=this.getAxisMotionValue(d);if(h&&this.constraints!==!1){const m=h.get();i[d]=_K({min:m,max:m},this.constraints[d])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),cr(d=>{if(!sp(d,t,null))return;const h=this.getAxisMotionValue(d),{min:m,max:x}=this.constraints[d];h.set(ls(m,x,i[d]))})}addListeners(){if(!this.visualElement.current)return;TK.set(this.visualElement,this);const t=this.visualElement.current,n=bh(t,"pointerdown",m=>{const{drag:x,dragListener:p=!0}=this.getProps();x&&p&&this.start(m)}),r=()=>{const{dragConstraints:m}=this.getProps();nd(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,c=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Zt.read(r);const d=Uh(window,"resize",()=>this.scalePositionWithinConstraints()),h=i.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:x})=>{this.isDragging&&x&&(cr(p=>{const g=this.getAxisMotionValue(p);g&&(this.originPoint[p]+=m[p].translate,g.set(g.get()+m[p].translate))}),this.visualElement.render())}));return()=>{d(),n(),c(),h&&h()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:c=!1,dragElastic:d=R0,dragMomentum:h=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:c,dragElastic:d,dragMomentum:h}}}function sp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function AK(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class MK extends $o{constructor(t){super(t),this.removeGroupControls=Hn,this.removeListeners=Hn,this.controls=new EK(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Hn}unmount(){this.removeGroupControls(),this.removeListeners()}}const ES=e=>(t,n)=>{e&&Zt.postRender(()=>e(t,n))};class RK extends $o{constructor(){super(...arguments),this.removePointerDownListener=Hn}onPointerDown(t){this.session=new sM(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dM(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ES(t),onStart:ES(n),onMove:r,onEnd:(c,d)=>{delete this.session,i&&Zt.postRender(()=>i(c,d))}}}mount(){this.removePointerDownListener=bh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function LK(){const e=b.useContext(pw);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=b.useId();b.useEffect(()=>r(i),[]);const c=b.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,c]:[!0]}const jp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function AS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(nt.test(e))e=parseFloat(e);else return e;const n=AS(e,t.target.x),r=AS(e,t.target.y);return`${n}% ${r}%`}},DK={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Oo.parse(e);if(i.length>5)return r;const c=Oo.createTransformer(e),d=typeof i[0]!="number"?1:0,h=n.x.scale*t.x,m=n.y.scale*t.y;i[0+d]/=h,i[1+d]/=m;const x=ls(h,m,.5);return typeof i[2+d]=="number"&&(i[2+d]/=x),typeof i[3+d]=="number"&&(i[3+d]/=x),c(i)}};class OK extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:c}=t;Fq(IK),c&&(n.group&&n.group.add(c),r&&r.register&&i&&r.register(c),c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),jp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:c}=this.props,d=r.projection;return d&&(d.isPresent=c,i||t.layoutDependency!==n||n===void 0?d.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?d.promote():d.relegate()||Zt.postRender(()=>{const h=d.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ww.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uM(e){const[t,n]=LK(),r=b.useContext(ZA);return s.jsx(OK,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(s4),isPresent:t,safeToRemove:n})}const IK={borderRadius:{...nh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nh,borderTopRightRadius:nh,borderBottomLeftRadius:nh,borderBottomRightRadius:nh,boxShadow:DK};function FK(e,t,n){const r=sn(e)?e:zh(e);return r.start(Yw("",r,t,n)),r.animation}function BK(e){return e instanceof SVGElement&&e.tagName!=="svg"}const zK=(e,t)=>e.depth-t.depth;class $K{constructor(){this.children=[],this.isDirty=!1}add(t){Dw(this.children,t),this.isDirty=!0}remove(t){Ow(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zK),this.isDirty=!1,this.children.forEach(t)}}function UK(e,t){const n=_i.now(),r=({timestamp:i})=>{const c=i-n;c>=t&&(Do(r),e(c-t))};return Zt.read(r,!0),()=>Do(r)}const hM=["TopLeft","TopRight","BottomLeft","BottomRight"],VK=hM.length,MS=e=>typeof e=="string"?parseFloat(e):e,RS=e=>typeof e=="number"||nt.test(e);function WK(e,t,n,r,i,c){i?(e.opacity=ls(0,n.opacity!==void 0?n.opacity:1,HK(r)),e.opacityExit=ls(t.opacity!==void 0?t.opacity:1,0,YK(r))):c&&(e.opacity=ls(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let d=0;d<VK;d++){const h=`border${hM[d]}Radius`;let m=LS(t,h),x=LS(n,h);if(m===void 0&&x===void 0)continue;m||(m=0),x||(x=0),m===0||x===0||RS(m)===RS(x)?(e[h]=Math.max(ls(MS(m),MS(x),r),0),(wi.test(x)||wi.test(m))&&(e[h]+="%")):e[h]=x}(t.rotate||n.rotate)&&(e.rotate=ls(t.rotate||0,n.rotate||0,r))}function LS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const HK=fM(0,.5,A4),YK=fM(.5,.95,Hn);function fM(e,t,n){return r=>r<e?0:r>t?1:n(Ed(e,t,r))}function DS(e,t){e.min=t.min,e.max=t.max}function or(e,t){DS(e.x,t.x),DS(e.y,t.y)}function OS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function IS(e,t,n,r,i){return e-=t,e=Qp(e,1/n,r),i!==void 0&&(e=Qp(e,1/i,r)),e}function qK(e,t=0,n=1,r=.5,i,c=e,d=e){if(wi.test(t)&&(t=parseFloat(t),t=ls(d.min,d.max,t/100)-d.min),typeof t!="number")return;let h=ls(c.min,c.max,r);e===c&&(h-=t),e.min=IS(e.min,t,n,h,i),e.max=IS(e.max,t,n,h,i)}function FS(e,t,[n,r,i],c,d){qK(e,t[n],t[r],t[i],t.scale,c,d)}const GK=["x","scaleX","originX"],ZK=["y","scaleY","originY"];function BS(e,t,n,r){FS(e.x,t,GK,n?n.x:void 0,r?r.x:void 0),FS(e.y,t,ZK,n?n.y:void 0,r?r.y:void 0)}function zS(e){return e.translate===0&&e.scale===1}function mM(e){return zS(e.x)&&zS(e.y)}function $S(e,t){return e.min===t.min&&e.max===t.max}function KK(e,t){return $S(e.x,t.x)&&$S(e.y,t.y)}function US(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pM(e,t){return US(e.x,t.x)&&US(e.y,t.y)}function VS(e){return qn(e.x)/qn(e.y)}function WS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class QK{constructor(){this.members=[]}add(t){Dw(this.members,t),t.scheduleRender()}remove(t){if(Ow(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const c=this.members[i];if(c.isPresent!==!1){r=c;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function XK(e,t,n){let r="";const i=e.x.translate/t.x,c=e.y.translate/t.y,d=(n==null?void 0:n.z)||0;if((i||c||d)&&(r=`translate3d(${i}px, ${c}px, ${d}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:x,rotate:p,rotateX:g,rotateY:w,skewX:N,skewY:j}=n;x&&(r=`perspective(${x}px) ${r}`),p&&(r+=`rotate(${p}deg) `),g&&(r+=`rotateX(${g}deg) `),w&&(r+=`rotateY(${w}deg) `),N&&(r+=`skewX(${N}deg) `),j&&(r+=`skewY(${j}deg) `)}const h=e.x.scale*t.x,m=e.y.scale*t.y;return(h!==1||m!==1)&&(r+=`scale(${h}, ${m})`),r||"none"}const _l={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},fh=typeof window<"u"&&window.MotionDebug!==void 0,yv=["","X","Y","Z"],JK={visibility:"hidden"},HS=1e3;let eQ=0;function vv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gM(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=N4(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zt,!(i||c))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gM(r)}function xM({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(d={},h=t==null?void 0:t()){this.id=eQ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,fh&&(_l.totalNodes=_l.resolvedTargetDeltas=_l.recalculatedProjection=0),this.nodes.forEach(nQ),this.nodes.forEach(lQ),this.nodes.forEach(cQ),this.nodes.forEach(rQ),fh&&window.MotionDebug.record(_l)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new $K)}addEventListener(d,h){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Iw),this.eventHandlers.get(d).add(h)}notifyListeners(d,...h){const m=this.eventHandlers.get(d);m&&m.notify(...h)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,h=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=BK(d),this.instance=d;const{layoutId:m,layout:x,visualElement:p}=this.options;if(p&&!p.current&&p.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),h&&(x||m)&&(this.isLayoutDirty=!0),e){let g;const w=()=>this.root.updateBlockedByResize=!1;e(d,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=UK(w,250),jp.hasAnimatedSinceResize&&(jp.hasAnimatedSinceResize=!1,this.nodes.forEach(qS))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&p&&(m||x)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:w,hasRelativeTargetChanged:N,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||p.getDefaultTransition()||mQ,{onLayoutAnimationStart:C,onLayoutAnimationComplete:A}=p.getProps(),M=!this.targetLayout||!pM(this.targetLayout,j)||N,E=!w&&N;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||E||w&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,E);const D={...Aw(_,"layout"),onPlay:C,onComplete:A};(p.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D)}else w||qS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Do(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dQ),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gM(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const g=this.path[p];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:h,layout:m}=this.options;if(h===void 0&&!m)return;const x=this.getTransformTemplate();this.prevTransformTemplateValue=x?x(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(YS);return}this.isUpdating||this.nodes.forEach(aQ),this.isUpdating=!1,this.nodes.forEach(oQ),this.nodes.forEach(tQ),this.nodes.forEach(sQ),this.clearAllSnapshots();const h=_i.now();zs.delta=wa(0,1e3/60,h-zs.timestamp),zs.timestamp=h,zs.isProcessing=!0,cv.update.process(zs),cv.preRender.process(zs),cv.render.process(zs),zs.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ww.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iQ),this.sharedNodes.forEach(uQ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=gs(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(h=!1),h){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!i)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!mM(this.projectionDelta),m=this.getTransformTemplate(),x=m?m(this.latestValues,""):void 0,p=x!==this.prevTransformTemplateValue;d&&(h||wl(this.latestValues)||p)&&(i(this.instance,x),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return d&&(m=this.removeTransform(m)),pQ(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:h}=this.options;if(!h)return gs();const m=h.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(gQ))){const{scroll:p}=this.root;p&&(ad(m.x,p.offset.x),ad(m.y,p.offset.y))}return m}removeElementScroll(d){var h;const m=gs();if(or(m,d),!((h=this.scroll)===null||h===void 0)&&h.wasRoot)return m;for(let x=0;x<this.path.length;x++){const p=this.path[x],{scroll:g,options:w}=p;p!==this.root&&g&&w.layoutScroll&&(g.wasRoot&&or(m,d),ad(m.x,g.offset.x),ad(m.y,g.offset.y))}return m}applyTransform(d,h=!1){const m=gs();or(m,d);for(let x=0;x<this.path.length;x++){const p=this.path[x];!h&&p.options.layoutScroll&&p.scroll&&p!==p.root&&od(m,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),wl(p.latestValues)&&od(m,p.latestValues)}return wl(this.latestValues)&&od(m,this.latestValues),m}removeTransform(d){const h=gs();or(h,d);for(let m=0;m<this.path.length;m++){const x=this.path[m];if(!x.instance||!wl(x.latestValues))continue;L0(x.latestValues)&&x.updateSnapshot();const p=gs(),g=x.measurePageBox();or(p,g),BS(h,x.latestValues,x.snapshot?x.snapshot.layoutBox:void 0,p)}return wl(this.latestValues)&&BS(h,this.latestValues),h}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==zs.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var h;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const x=!!this.resumingFrom||this!==m;if(!(d||x&&this.isSharedProjectionDirty||this.isProjectionDirty||!((h=this.parent)===null||h===void 0)&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:w}=this.options;if(!(!this.layout||!(g||w))){if(this.resolvedRelativeTargetAt=zs.timestamp,!this.targetDelta&&!this.relativeTarget){const N=this.getClosestProjectingParent();N&&N.layout&&this.animationProgress!==1?(this.relativeParent=N,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gs(),this.relativeTargetOrigin=gs(),_h(this.relativeTargetOrigin,this.layout.layoutBox,N.layout.layoutBox),or(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=gs(),this.targetWithTransforms=gs()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yK(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):or(this.target,this.layout.layoutBox),lM(this.target,this.targetDelta)):or(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const N=this.getClosestProjectingParent();N&&!!N.resumingFrom==!!this.resumingFrom&&!N.options.layoutScroll&&N.target&&this.animationProgress!==1?(this.relativeParent=N,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gs(),this.relativeTargetOrigin=gs(),_h(this.relativeTargetOrigin,this.target,N.target),or(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}fh&&_l.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||L0(this.parent.latestValues)||oM(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const h=this.getLead(),m=!!this.resumingFrom||this!==h;let x=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(x=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(x=!1),this.resolvedRelativeTargetAt===zs.timestamp&&(x=!1),x)return;const{layout:p,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||g))return;or(this.layoutCorrected,this.layout.layoutBox);const w=this.treeScale.x,N=this.treeScale.y;CK(this.layoutCorrected,this.treeScale,this.path,m),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=gs());const{target:j}=h;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(OS(this.prevProjectionDelta.x,this.projectionDelta.x),OS(this.prevProjectionDelta.y,this.projectionDelta.y)),wh(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==w||this.treeScale.y!==N||!WS(this.projectionDelta.x,this.prevProjectionDelta.x)||!WS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j)),fh&&_l.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var h;if((h=this.options.visualElement)===null||h===void 0||h.scheduleRender(),d){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=id(),this.projectionDelta=id(),this.projectionDeltaWithTransform=id()}setAnimationOrigin(d,h=!1){const m=this.snapshot,x=m?m.latestValues:{},p={...this.latestValues},g=id();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const w=gs(),N=m?m.source:void 0,j=this.layout?this.layout.source:void 0,_=N!==j,C=this.getStack(),A=!C||C.members.length<=1,M=!!(_&&!A&&this.options.crossfade===!0&&!this.path.some(fQ));this.animationProgress=0;let E;this.mixTargetDelta=D=>{const I=D/1e3;GS(g.x,d.x,I),GS(g.y,d.y,I),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_h(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hQ(this.relativeTarget,this.relativeTargetOrigin,w,I),E&&KK(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=gs()),or(E,this.relativeTarget)),_&&(this.animationValues=p,WK(p,x,this.latestValues,I,M,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Do(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zt.update(()=>{jp.hasAnimatedSinceResize=!0,this.currentAnimation=FK(0,HS,{...d,onUpdate:h=>{this.mixTargetDelta(h),d.onUpdate&&d.onUpdate(h)},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:h,target:m,layout:x,latestValues:p}=d;if(!(!h||!m||!x)){if(this!==d&&this.layout&&x&&yM(this.options.animationType,this.layout.layoutBox,x.layoutBox)){m=this.target||gs();const g=qn(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+g;const w=qn(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+w}or(h,m),od(h,p),wh(this.projectionDeltaWithTransform,this.layoutCorrected,h,p)}}registerSharedNode(d,h){this.sharedNodes.has(d)||this.sharedNodes.set(d,new QK),this.sharedNodes.get(d).add(h);const x=h.options.initialPromotionConfig;h.promote({transition:x?x.transition:void 0,preserveFollowOpacity:x&&x.shouldPreserveFollowOpacity?x.shouldPreserveFollowOpacity(h):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:h}=this.options;return h?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:h}=this.options;return h?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:h,preserveFollowOpacity:m}={}){const x=this.getStack();x&&x.promote(this,m),d&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let h=!1;const{latestValues:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const x={};m.z&&vv("z",d,x,this.animationValues);for(let p=0;p<yv.length;p++)vv(`rotate${yv[p]}`,d,x,this.animationValues),vv(`skew${yv[p]}`,d,x,this.animationValues);d.render();for(const p in x)d.setStaticValue(p,x[p]),this.animationValues&&(this.animationValues[p]=x[p]);d.scheduleRender()}getProjectionStyles(d){var h,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return JK;const x={visibility:""},p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,x.opacity="",x.pointerEvents=wp(d==null?void 0:d.pointerEvents)||"",x.transform=p?p(this.latestValues,""):"none",x;const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){const _={};return this.options.layoutId&&(_.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,_.pointerEvents=wp(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!wl(this.latestValues)&&(_.transform=p?p({},""):"none",this.hasProjected=!1),_}const w=g.animationValues||g.latestValues;this.applyTransformsToTarget(),x.transform=XK(this.projectionDeltaWithTransform,this.treeScale,w),p&&(x.transform=p(w,x.transform));const{x:N,y:j}=this.projectionDelta;x.transformOrigin=`${N.origin*100}% ${j.origin*100}% 0`,g.animationValues?x.opacity=g===this?(m=(h=w.opacity)!==null&&h!==void 0?h:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:w.opacityExit:x.opacity=g===this?w.opacity!==void 0?w.opacity:"":w.opacityExit!==void 0?w.opacityExit:0;for(const _ in Yp){if(w[_]===void 0)continue;const{correct:C,applyTo:A}=Yp[_],M=x.transform==="none"?w[_]:C(w[_],g);if(A){const E=A.length;for(let D=0;D<E;D++)x[A[D]]=M}else x[_]=M}return this.options.layoutId&&(x.pointerEvents=g===this?wp(d==null?void 0:d.pointerEvents)||"":"none"),x}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var h;return(h=d.currentAnimation)===null||h===void 0?void 0:h.stop()}),this.root.nodes.forEach(YS),this.root.sharedNodes.clear()}}}function tQ(e){e.updateLayout()}function sQ(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:c}=e.options,d=n.source!==e.layout.source;c==="size"?cr(g=>{const w=d?n.measuredBox[g]:n.layoutBox[g],N=qn(w);w.min=r[g].min,w.max=w.min+N}):yM(c,n.layoutBox,r)&&cr(g=>{const w=d?n.measuredBox[g]:n.layoutBox[g],N=qn(r[g]);w.max=w.min+N,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+N)});const h=id();wh(h,r,n.layoutBox);const m=id();d?wh(m,e.applyTransform(i,!0),n.measuredBox):wh(m,r,n.layoutBox);const x=!mM(h);let p=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:w,layout:N}=g;if(w&&N){const j=gs();_h(j,n.layoutBox,w.layoutBox);const _=gs();_h(_,r,N.layoutBox),pM(j,_)||(p=!0),g.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=j,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:m,layoutDelta:h,hasLayoutChanged:x,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function nQ(e){fh&&_l.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function rQ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iQ(e){e.clearSnapshot()}function YS(e){e.clearMeasurements()}function aQ(e){e.isLayoutDirty=!1}function oQ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lQ(e){e.resolveTargetDelta()}function cQ(e){e.calcProjection()}function dQ(e){e.resetSkewAndRotation()}function uQ(e){e.removeLeadSnapshot()}function GS(e,t,n){e.translate=ls(t.translate,0,n),e.scale=ls(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZS(e,t,n,r){e.min=ls(t.min,n.min,r),e.max=ls(t.max,n.max,r)}function hQ(e,t,n,r){ZS(e.x,t.x,n.x,r),ZS(e.y,t.y,n.y,r)}function fQ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mQ={duration:.45,ease:[.4,0,.1,1]},KS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),QS=KS("applewebkit/")&&!KS("chrome/")?Math.round:Hn;function XS(e){e.min=QS(e.min),e.max=QS(e.max)}function pQ(e){XS(e.x),XS(e.y)}function yM(e,t,n){return e==="position"||e==="preserve-aspect"&&!xK(VS(t),VS(n),.2)}function gQ(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const xQ=xM({attachResizeListener:(e,t)=>Uh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bv={current:void 0},vM=xM({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bv.current){const e=new xQ({});e.mount(window),e.setOptions({layoutScroll:!0}),bv.current=e}return bv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yQ={pan:{Feature:RK},drag:{Feature:MK,ProjectionNode:vM,MeasureLayout:uM}};function JS(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,c=r[i];c&&Zt.postRender(()=>c(t,mf(t)))}class vQ extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=gG(t,n=>(JS(this.node,n,"Start"),r=>JS(this.node,r,"End"))))}unmount(){}}class bQ extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ff(Uh(this.node.current,"focus",()=>this.onFocus()),Uh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ek(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),c=r[i];c&&Zt.postRender(()=>c(t,mf(t)))}class wQ extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=bG(t,n=>(ek(this.node,n,"Start"),(r,{success:i})=>ek(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const O0=new WeakMap,wv=new WeakMap,_Q=e=>{const t=O0.get(e.target);t&&t(e)},jQ=e=>{e.forEach(_Q)};function NQ({root:e,...t}){const n=e||document;wv.has(n)||wv.set(n,{});const r=wv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(jQ,{root:e,...t})),r[i]}function SQ(e,t,n){const r=NQ(t);return O0.set(e,n),r.observe(e),()=>{O0.delete(e),r.unobserve(e)}}const kQ={some:0,all:1};class CQ extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:c}=t,d={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:kQ[i]},h=m=>{const{isIntersecting:x}=m;if(this.isInView===x||(this.isInView=x,c&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:p,onViewportLeave:g}=this.node.getProps(),w=x?p:g;w&&w(m)};return SQ(this.node.current,d,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PQ(t,n))&&this.startObserver()}unmount(){}}function PQ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const TQ={inView:{Feature:CQ},tap:{Feature:wQ},focus:{Feature:bQ},hover:{Feature:vQ}},EQ={layout:{ProjectionNode:vM,MeasureLayout:uM}},I0={current:null},bM={current:!1};function AQ(){if(bM.current=!0,!!xw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>I0.current=e.matches;e.addListener(t),t()}else I0.current=!1}function MQ(e,t,n){for(const r in t){const i=t[r],c=n[r];if(sn(i))e.addValue(r,i);else if(sn(c))e.addValue(r,zh(i,{owner:e}));else if(c!==i)if(e.hasValue(r)){const d=e.getValue(r);d.liveStyle===!0?d.jump(i):d.hasAnimated||d.set(i)}else{const d=e.getStaticValue(r);e.addValue(r,zh(d!==void 0?d:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const tk=new WeakMap,RQ=[...I4,Xs,Oo],LQ=e=>RQ.find(O4(e)),sk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DQ{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:c,visualState:d},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=_i.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Zt.render(this.render,!1,!0))};const{latestValues:m,renderState:x}=d;this.latestValues=m,this.baseTarget={...m},this.initialValues=n.initial?{...m}:{},this.renderState=x,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=h,this.blockInitialAnimation=!!c,this.isControllingVariants=Zg(n),this.isVariantNode=e4(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in g){const N=g[w];m[w]!==void 0&&sn(N)&&N.set(m[w],!1)}}mount(t){this.current=t,tk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),bM.current||AQ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:I0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){tk.delete(this.current),this.projection&&this.projection.unmount(),Do(this.notifyUpdate),Do(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=tc.has(t),i=n.on("change",h=>{this.latestValues[t]=h,this.props.onUpdate&&Zt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),c=n.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),c(),d&&d(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ad){const n=Ad[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gs()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<sk.length;r++){const i=sk[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const c="on"+i,d=t[c];d&&(this.propEventSubscriptions[i]=this.on(i,d))}this.prevMotionValues=MQ(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zh(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(L4(i)||R4(i))?i=parseFloat(i):!LQ(i)&&Oo.test(n)&&(i=H4(t,n)),this.setBaseTarget(t,sn(i)?i.get():i)),sn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const d=Nw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);d&&(i=d[t])}if(r&&i!==void 0)return i;const c=this.getBaseTargetFromProps(this.props,t);return c!==void 0&&!sn(c)?c:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class wM extends DQ{constructor(){super(...arguments),this.KeyframeResolver=Y4}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;sn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function OQ(e){return window.getComputedStyle(e)}class IQ extends wM{constructor(){super(...arguments),this.type="html",this.renderInstance=r4}readValueFromInstance(t,n){if(tc.has(n)){const r=Vw(n);return r&&r.default||0}else{const r=OQ(t),i=(f4(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cM(t,n)}build(t,n,r){Pw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jw(t,n,r)}}class FQ extends wM{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gs}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tc.has(n)){const r=Vw(n);return r&&r.default||0}return n=i4.has(n)?n:bw(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return l4(t,n,r)}build(t,n,r){Tw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){a4(t,n,r,i)}mount(t){this.isSVGTag=Ew(t.tagName),super.mount(t)}}const BQ=(e,t)=>_w(e)?new FQ(t):new IQ(t,{allowProjection:e!==b.Fragment}),zQ=cG({...lK,...TQ,...yQ,...EQ},BQ),lr=Sq(zQ);function $Q(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState(!0),[c,d]=b.useState(!1),[h,m]=b.useState(null),[x,p]=b.useState(1),[g,w]=b.useState(!1);b.useEffect(()=>{N()},[]);const N=async()=>{try{const _=await X.auth.me();n(_)}catch{}finally{i(!1)}},j=_=>{localStorage.setItem("pendingFlow",h),localStorage.setItem("quoteData",JSON.stringify(_)),X.auth.redirectToLogin(window.location.origin+`/${h}`)};return r?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("div",{className:"relative bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, white 1px, transparent 0)",backgroundSize:"32px 32px"}})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 relative",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-stretch",children:[s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs(lr.div,{initial:{opacity:0,y:20}
532,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-white",children:[s.jsxs("h1",{className:"text-5xl lg:text-6xl font-bold mb-6 leading-tight",children:["Travel Light.",s.jsx("br",{}),s.jsx("span",{className:"text-coral-500",children:"Explore Free."})]}),s.jsx("p",{className:"text-xl text-blue-100 mb-8 leading-relaxed",children:"Secure luggage storage in verified locations. Drop your bags and explore your destination without the weight."}),s.jsxs("div",{className:"flex flex-wrap gap-4 mb-8",children:[s.jsxs("div",{className:"flex items-center gap-2 bg-white/10 backdrop-blur-sm rounded-full px-4 py-2",children:[s.jsx(ms,{className:"w-5 h-5 text-coral-400"}),s.jsx("span",{className:"text-sm font-medium",children:"From $5/bag/day"})]}),s.jsxs("div",{className:"flex items-center gap-2 bg-white/10 backdrop-blur-sm rounded-full px-4 py-2",children:[s.jsx(Tn,{className:"w-5 h-5 text-coral-400"}),s.jsx("span",{className:"text-sm font-medium",children:"Insured & Secure"})]}),s.jsxs("div",{className:"flex items-center gap-2 bg-white/10 backdrop-blur-sm rounded-full px-4 py-2",children:[s.jsx(Ts,{className:"w-5 h-5 text-coral-400"}),s.jsx("span",{className:"text-sm font-medium",children:"Instant Booking"})]}),s.jsxs("div",{className:"flex items-center gap-2 bg-white/10 backdrop-blur-sm rounded-full px-4 py-2",children:[s.jsx(So,{className:"w-5 h-5 text-coral-400"}),s.jsx("span",{className:"text-sm font-medium",children:"Pickup & Delivery Available"})]})]}),s.jsx(lr.div,{whileHover:{scale:1.05},whileTap:{scale:.98},children:s.jsxs(G,{onClick:_=>{_.preventDefault(),e("/arrivals")},size:"lg",className:"bg-gradient-to-r from-coral-500 to-coral-600 hover:from-coral-600 hover:to-coral-700 text-white font-bold px-12 py-7 text-xl rounded-2xl shadow-2xl hover:shadow-coral-500/50 transition-all duration-300 border-2 border-white/20",children:[s.jsx(jt,{className:"w-6 h-6 mr-3"}),"Find Storage Now",s.jsx(gr,{className:"w-6 h-6 ml-3"})]})})]}),s.jsx(lr.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex items-center justify-center",children:s.jsxs("div",{className:"relative w-full",children:[s.jsx(lr.img,{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/ec4e46cb9_stow_n_go_infographic.png",alt:"How Stow N Go Works",className:"w-full drop-shadow-2xl rounded-lg cursor-grab active:cursor-grabbing",drag:!0,dragElastic:.2,dragTransition:{power:0,modifyTarget:_=>Math.round(_/100)*100},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),style:{scale:x}}),g&&s.jsxs(lr.div,{initial:{opacity:0}
vendor: 10,317 bytes, line 532
532,animate:{opacity:1},className:"absolute top-2 right-2 bg-white/90 backdrop-blur-sm rounded-lg shadow-lg p-2 flex gap-2",children:[s.jsx("input",{type:"range",min:"0.5",max:"1.5",step:"0.1",value:x,onChange:_=>p(parseFloat(_.target.value)),className:"w-20 h-2 rounded-lg"}),s.jsx("button",{onClick:()=>p(1),className:"p-1 hover:bg-gray-200 rounded",title:"Reset size",children:s.jsx(TD,{className:"w-4 h-4"})})]})]})})]}),s.jsx(lr.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},className:"relative hidden lg:flex items-center justify-center",children:s.jsx("div",{className:"relative z-10 w-full",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/9ab52cd6b_poster-11x17.png",alt:"Stow My Bags",className:"w-full drop-shadow-2xl"})})})]})})]}),s.jsx("div",{className:"py-20 bg-gray-50 -mt-12 relative z-10",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-12",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:[s.jsx(lr.div,{whileHover:{scale:1.02},onClick:_=>{_.preventDefault(),e("/arrivals")},className:"group cursor-pointer",children:s.jsxs(oe,{className:"overflow-hidden border-0 shadow-lg hover:shadow-2xl transition-all duration-300 bg-white",children:[s.jsxs("div",{className:"relative h-64 overflow-hidden bg-gradient-to-br from-blue-100 to-blue-50",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/2f8887709_image.png",alt:"Just Arrived",className:"w-full h-full object-contain p-4 group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute top-4 right-4 bg-coral-600 text-white px-4 py-2 rounded-full text-sm font-bold shadow-lg",children:"Just Arrived"})]}),s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Arriving Soon?"}),s.jsx("p",{className:"text-gray-600 mb-4 leading-relaxed",children:"Drop your luggage at a nearby location and start exploring immediately. We'll keep it safe until you're ready."}),s.jsxs("div",{className:"flex items-center gap-2 text-blue-600 font-semibold group-hover:gap-3 transition-all",children:["Book Storage Now",s.jsx(gr,{className:"w-5 h-5"})]})]})]})}),s.jsx(lr.div,{whileHover:{scale:1.02},onClick:_=>{_.preventDefault(),e("/departures")},className:"group cursor-pointer",children:s.jsxs(oe,{className:"overflow-hidden border-0 shadow-lg hover:shadow-2xl transition-all duration-300 bg-white",children:[s.jsxs("div",{className:"relative h-64 overflow-hidden bg-gradient-to-br from-coral-100 to-coral-50",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/7e30bc07d_image.png",alt:"Heading Out",className:"w-full h-full object-contain p-4 group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute top-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-full text-sm font-bold shadow-lg",children:"Departing Soon"})]}),s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Checking Out?"}),s.jsx("p",{className:"text-gray-600 mb-4 leading-relaxed",children:"Store your bags after checkout and enjoy your last hours worry-free. Optional pickup service available."}),s.jsxs("div",{className:"flex items-center gap-2 text-blue-600 font-semibold group-hover:gap-3 transition-all",children:["Book Storage Now",s.jsx(gr,{className:"w-5 h-5"})]})]})]})})]})})}),s.jsx("div",{className:"py-16 bg-white",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:[s.jsxs(lr.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center",children:[s.jsx("div",{className:"text-5xl font-bold text-blue-600 mb-2",children:"500+"}),s.jsx("div",{className:"text-gray-600 font-medium",children:"Happy Travelers"})]}),s.jsxs(lr.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"text-center",children:[s.jsx("div",{className:"text-5xl font-bold text-coral-500 mb-2",children:"50+"}),s.jsx("div",{className:"text-gray-600 font-medium",children:"Storage Locations"})]}),s.jsxs(lr.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2},className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx("span",{className:"text-5xl font-bold text-blue-600",children:"4.9"}),s.jsx(Yn,{className:"w-8 h-8 fill-yellow-400 text-yellow-400"})]}),s.jsx("div",{className:"text-gray-600 font-medium",children:"Average Rating"})]}),s.jsxs(lr.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.3},className:"text-center",children:[s.jsx("div",{className:"text-5xl font-bold text-coral-500 mb-2",children:"24/7"}),s.jsx("div",{className:"text-gray-600 font-medium",children:"Support Available"})]})]})})}),s.jsx("div",{className:"py-20 bg-gradient-to-b from-gray-50 to-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("h2",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Why Travelers Love Us"}),s.jsx("p",{className:"text-xl text-gray-600",children:"Secure, convenient, and affordable storage"})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:s.jsx(Tn,{className:"w-8 h-8 text-blue-600"})}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"100% Secure"}),s.jsx("p",{className:"text-gray-600 leading-relaxed",children:"All locations are verified and insured for your peace of mind"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:s.jsx(jt,{className:"w-8 h-8 text-coral-500"})}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Prime Locations"}),s.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Strategic spots near airports, hotels, and attractions"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:s.jsx(Ts,{className:"w-8 h-8 text-blue-600"})}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Flexible Hours"}),s.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Book by the hour or day - only pay for what you need"})]})]})]})}),s.jsx("div",{className:"py-20 bg-gradient-to-r from-blue-600 to-blue-700",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[s.jsx("h2",{className:"text-4xl font-bold text-white mb-6",children:"Ready to Travel Light?"}),s.jsx("p",{className:"text-xl text-blue-100 mb-8",children:"Join thousands of travelers who've discovered the freedom of hands-free exploration"}),s.jsxs(G,{onClick:()=>e("/arrivals"),size:"lg",className:"bg-coral-500 hover:bg-coral-600 text-white font-semibold px-12 py-6 text-lg rounded-xl shadow-xl hover:shadow-2xl transition-all",children:["Find Storage Near You",s.jsx(gr,{className:"w-6 h-6 ml-2"})]})]})}),s.jsx("div",{className:"py-20 bg-gradient-to-r from-coral-500 to-coral-600",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[s.jsx("h2",{className:"text-4xl font-bold text-white mb-4",children:"Earn Passive Income"}),s.jsx("p",{className:"text-xl text-white/90 mb-8",children:"Turn your space into a revenue stream. Join our network of storage partners today."}),s.jsxs(G,{onClick:()=>e(At("PartnerLanding")),size:"lg",className:"bg-white hover:bg-gray-100 text-coral-600 font-bold px-12 py-6 text-lg rounded-xl shadow-xl hover:shadow-2xl transition-all",children:["BECOME A PARTNER",s.jsx(gr,{className:"w-6 h-6 ml-2"})]})]})}),s.jsx("div",{className:"py-16 bg-white border-t border-gray-200",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[s.jsx("p",{className:"text-lg text-gray-600 mb-4",children:"Already a partner?"}),s.jsx(G,{onClick:()=>e(At("PartnerPortal")),variant:"outline",size:"lg",className:"border-2 border-blue-600 text-blue-600 hover:bg-blue-50 font-semibold px-8 py-6 rounded-xl",children:"Partner Portal Login"})]})}),s.jsx(qA,{isOpen:c,onClose:()=>{d(!1),m(null)},onProceed:j,flow:h})]})}var Xg="Checkbox",[UQ]=rn(Xg),[VQ,qw]=UQ(Xg);function WQ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:c,form:d,name:h,onCheckedChange:m,required:x,value:p="on",internal_do_not_use_render:g}=e,[w,N]=vr({prop:n,defaultProp:i??!1,onChange:m,caller:Xg}),[j,_]=b.useState(null),[C,A]=b.useState(null),M=b.useRef(!1),E=j?!!d||!!j.closest("form"):!0,D={checked:w,disabled:c,setChecked:N,control:j,setControl:_,name:h,form:d,value:p,hasConsumerStoppedPropagationRef:M,required:x,defaultChecked:Eo(i)?!1:i,isFormControl:E,bubbleInput:C,setBubbleInput:A};return s.jsx(VQ,{scope:t,...D,children:HQ(g)?g(D):r})}var _M="CheckboxTrigger",jM=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:c,value:d,disabled:h,checked:m,required:x,setControl:p,setChecked:g,hasConsumerStoppedPropagationRef:w,isFormControl:N,bubbleInput:j}=qw(_M,e),_=gt(i,p),C=b.useRef(m);return b.useEffect(()=>{const A=c==null?void 0:c.form;if(A){const M=()=>g(C.current);return A.addEventListener("reset",M),()=>A.removeEventListener("reset",M)}},[c,g]),s.jsx(Ze.button,{type:"button",role:"checkbox","aria-checked":Eo(m)?"mixed":m,"aria-required":x,"data-state":PM(m),"data-disabled":h?"":void 0,disabled:h,value:d,...r,ref:_,onKeyDown:Oe(t,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:Oe(n,A=>{g(M=>Eo(M)?!0:!M),j&&N&&(w.current=A.isPropagationStopped(),w.current||A.stopPropagation())})})});jM.displayName=_M;var Gw=b.forwardRef((e,t)=>
532{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:c,required:d,disabled:h,value:m,onCheckedChange:x,form:p,...g}=e;return s.jsx(WQ,{__scopeCheckbox:n,checked:i,defaultChecked:c,disabled:h,required:d,onCheckedChange:x,name:r,form:p,value:m,internal_do_not_use_render:({isFormControl:w})=>s.jsxs(s.Fragment,{children:[s.jsx(jM,{...g,ref:t,__scopeCheckbox:n}),w&&s.jsx(CM,{__scopeCheckbox:n})]})})});Gw.displayName=Xg;var NM="CheckboxIndicator",SM=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,c=qw(NM,n);return s.jsx(wr,{present:r||Eo(c.checked)||c.checked===!0,children:s.jsx(Ze.span,{"data-state":PM(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});SM.displayName=NM;var kM="CheckboxBubbleInput",CM=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:d,required:h,disabled:m,name:x,value:p,form:g,bubbleInput:w,setBubbleInput:N}=qw(kM,e),j=gt(n,N),_=Ng(c),C=wg(r);b.useEffect(()=>{const M=w;if(!M)return;const E=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(E,"checked").set,z=!i.current;if(_!==c&&I){const H=new Event("click",{bubbles:z});M.indeterminate=Eo(c),I.call(M,Eo(c)?!1:c),M.dispatchEvent(H)}},[w,_,c,i]);const A=b.useRef(Eo(c)?!1:c);return s.jsx(Ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??A.current,required:h,disabled:m,name:x,value:p,form:g,...t,tabIndex:-1,ref:j,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});CM.displayName=kM;function HQ(e){return typeof e=="function"}function Eo(e){return e==="indeterminate"}function PM(e){return Eo(e)?"indeterminate":e?"checked":"unchecked"}const Rd=b.forwardRef(({className:e,...t},n)=>s.jsx(Gw,{ref:n,className:We("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(SM,{className:We("flex items-center justify-center text-current"),children:s.jsx(Ld,{className:"h-4 w-4"})})}));Rd.displayName=Gw.displayName;function YQ({accessCodes:e=[],onChange:t}){const[n,r]=b.useState({code:"",description:""}),i=()=>{n.code.trim()&&(t([...e,{...n,in_use:!1}]),r({code:"",description:""}))},c=d=>{t(e.filter((h,m)=>m!==d))};return s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"block font-semibold",children:"24-Hour Access Codes"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Add pre-configured access codes for building entry. Codes will be automatically assigned to customers when they book."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{placeholder:"Access code (e.g., 1234)",value:n.code,onChange:d=>r({...n,code:d.target.value}),className:"flex-1"}),s.jsx(de,{placeholder:"Description (e.g., Main entrance)",value:n.description,onChange:d=>r({...n,description:d.target.value}),className:"flex-1"}),s.jsxs(G,{onClick:i,type:"button",children:[s.jsx(Ao,{className:"w-4 h-4 mr-1"}),"Add"]})]}),e.length>0&&s.jsx("div",{className:"space-y-2",children:e.map((d,h)=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx($l,{className:"w-4 h-4 text-blue-600"}),s.jsxs("div",{children:[s.jsx("span",{className:"font-mono font-semibold",children:d.code}),d.description&&s.jsxs("span",{className:"text-sm text-gray-600 ml-2",children:["- ",d.description]})]}),d.in_use&&s.jsx(ot,{variant:"secondary",children:"In Use"})]}),s.jsx(G,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(h),disabled:d.in_use,children:s.jsx(Io,{className:"w-4 h-4"})})]},h))})]})}const qQ=[{id:"secure_lock",label:"Secure Lock"},{id:"cctv",label:"CCTV Surveillance"},{id:"24_7_access",label:"24/7 Access"},{id:"indoor",label:"Indoor Storage"},{id:"climate_controlled",label:"Climate Controlled"},{id:"insurance",label:"Insurance Available"}],GQ=[{id:"packing_assistance",label:"Packing Assistance"},{id:"luggage_wrapping",label:"Luggage Wrapping"},{id:"key_storage",label:"Key Storage"},{id:"same_day_access",label:"Same Day Access"},{id:"concierge_service",label:"Concierge Service"},{id:"delivery_available",label:"Delivery Available"}];function TM({onSuccess:e,onCancel:t,userId:n}){const[r,i]=b.useState({title:"",description:"",address:"",city:"",carry_on:"",checked_bag:"",oversized:"",xl_locker:"",capacity:"",amenities:[],services:[],images:[],access_codes:[],nearest_airport:"",airport_address:""}),[c,d]=b.useState(!1),[h,m]=b.useState(!1),x=j=>
532{i(_=>({..._,amenities:_.amenities.includes(j)?_.amenities.filter(C=>C!==j):[..._.amenities,j]}))},p=j=>{i(_=>({..._,services:_.services.includes(j)?_.services.filter(C=>C!==j):[..._.services,j]}))},g=async j=>{const _=Array.from(j.target.files);if(_.length!==0){m(!0);try{const C=_.map(E=>X.integrations.Core.UploadFile({file:E})),M=(await Promise.all(C)).map(E=>E.file_url);i(E=>({...E,images:[...E.images,...M]})),Xe.success("Images uploaded successfully")}catch(C){console.error("Error uploading images:",C),Xe.error("Failed to upload images")}finally{m(!1)}}},w=j=>{i(_=>({..._,images:_.images.filter((C,A)=>A!==j)}))},N=async j=>{j.preventDefault(),d(!0);try{const _={title:r.title,description:r.description,address:r.address,city:r.city,capacity:parseInt(r.capacity),available_spots:parseInt(r.capacity),amenities:r.amenities,services:r.services,images:r.images,access_codes:r.access_codes,nearest_airport:r.nearest_airport,airport_address:r.airport_address,host_id:n,status:"pending",pricing:{carry_on:r.carry_on?parseFloat(r.carry_on):null,checked_bag:r.checked_bag?parseFloat(r.checked_bag):null,oversized:r.oversized?parseFloat(r.oversized):null,xl_locker:r.xl_locker?parseFloat(r.xl_locker):null},pricing_approved:!1};await X.entities.StorageLocation.create(_),e()}catch(_){console.error("Error creating location:",_),alert("Error creating location. Please try again.")}finally{d(!1)}};return s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Add New Storage Location"})}),s.jsx(me,{children:s.jsxs("form",{onSubmit:N,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"title",children:"Location Name"}),s.jsx(de,{id:"title",required:!0,value:r.title,onChange:j=>i({...r,title:j.target.value}),placeholder:"e.g., Downtown Storage Center"})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"description",children:"Description"}),s.jsx(Os,{id:"description",required:!0,value:r.description,onChange:j=>i({...r,description:j.target.value}),placeholder:"Describe your storage space...",rows:3})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"address",children:"Address"}),s.jsx(de,{id:"address",required:!0,value:r.address,onChange:j=>i({...r,address:j.target.value}),placeholder:"123 Main St"})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"city",children:"City"}),s.jsx(de,{id:"city",required:!0,value:r.city,onChange:j=>i({...r,city:j.target.value}),placeholder:"New York"})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"capacity",children:"Maximum Capacity (bags)"}),s.jsx(de,{id:"capacity",type:"number",min:"1",required:!0,value:r.capacity,onChange:j=>i({...r,capacity:j.target.value}),placeholder:"20"})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsx(te,{className:"mb-3 block font-semibold",children:"Custom Pricing (per day)"}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Set your own rates based on your market demand. Pricing requires admin approval."}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"carry_on",children:"Carry-On Bag ($)"}),s.jsx(de,{id:"carry_on",type:"number",step:"0.01",min:"0",value:r.carry_on,onChange:j=>i({...r,carry_on:j.target.value}),placeholder:"5.00"})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"checked_bag",children:"Checked Bag ($)"}),s.jsx(de,{id:"checked_bag",type:"number",step:"0.01",min:"0",value:r.checked_bag,onChange:j=>i({...r,checked_bag:j.target.value}),placeholder:"7.00"})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"oversized",children:"Oversized Item ($)"}),s.jsx(de,{id:"oversized",type:"number",step:"0.01",min:"0",value:r.oversized,onChange:j=>i({...r,oversized:j.target.value}),placeholder:"12.00"})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"xl_locker",children:"XL Locker ($)"}),s.jsx(de,{id:"xl_locker",type:"number",step:"0.01",min:"0",value:r.xl_locker,onChange:j=>i({...r,xl_locker:j.target.value}),placeholder:"25.00"})]})]})]}),s.jsxs("div",{children:[s.jsx(te,{className:"mb-3 block",children:"Photo Gallery"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(de,{type:"file",accept:"image/*",multiple:!0,onChange:g,disabled:h,className:"cursor-pointer"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Upload multiple photos of your storage space"})]}),r.images.length>0&&s.jsx("div",{className:"grid grid-cols-3 gap-2",children:r.images.map((j,_)=>s.jsxs("div",{className:"relative group",children:[s.jsx("img",{src:j,alt:`Preview ${_+1}`,className:"w-full h-24 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>w(_),className:"absolute top-1 right-1 bg-red-500 text-white rounded-full p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(Io,{className:"w-3 h-3"})})]},_))})]})]}),s.jsxs("div",{children:[s.jsx(te,{className:"mb-3 block",children:"Amenities"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:qQ.map(j=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Rd,{id:j.id,checked:r.amenities.includes(j.id
532),onCheckedChange:()=>x(j.id)}),s.jsx("label",{htmlFor:j.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:j.label})]},j.id))})]}),s.jsxs("div",{children:[s.jsx(te,{className:"mb-3 block",children:"Services Offered"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:GQ.map(j=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Rd,{id:j.id,checked:r.services.includes(j.id),onCheckedChange:()=>p(j.id)}),s.jsx("label",{htmlFor:j.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:j.label})]},j.id))})]}),s.jsx("div",{className:"border-t pt-4 mt-4",children:s.jsx(YQ,{accessCodes:r.access_codes,onChange:j=>i({...r,access_codes:j})})}),s.jsxs("div",{className:"border-t pt-4 mt-4",children:[s.jsx(te,{className:"mb-3 block font-semibold",children:"Airport Information (for Time to Go service)"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"nearest_airport",children:"Nearest Airport Name"}),s.jsx(de,{id:"nearest_airport",placeholder:"e.g., LAX, JFK, ORD",value:r.nearest_airport,onChange:j=>i({...r,nearest_airport:j.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"airport_address",children:"Airport Address"}),s.jsx(de,{id:"airport_address",placeholder:"Full airport address",value:r.airport_address,onChange:j=>i({...r,airport_address:j.target.value})})]})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(G,{type:"button",variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),s.jsx(G,{type:"submit",disabled:c,className:"flex-1 bg-green-600 hover:bg-green-700",children:c?"Adding...":"Add Location"})]})]})})]})}function ZQ({location:e,onUpdate:t}){const n=async()=>{if(confirm("Are you sure you want to delete this location?"))try{await X.entities.StorageLocation.delete(e.id),t()}catch(i){console.error("Error deleting location:",i),alert("Error deleting location. Please try again.")}},r=i=>{switch(i){case"active":return"bg-green-100 text-green-800";case"inactive":return"bg-gray-100 text-gray-800";
532case"pending":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return s.jsx(oe,{children:s.jsxs(me,{className:"p-6",children:[s.jsx("div",{className:"flex justify-between items-start mb-4",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900",children:e.title}),s.jsx(ot,{className:r(e.status),children:e.status})]}),s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(jt,{className:"w-4 h-4 mr-1"}),e.address,", ",e.city]}),s.jsx("p",{className:"text-gray-600 text-sm",children:e.description})]})}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[s.jsxs("div",{className:"text-center p-3 bg-blue-50 rounded-lg",children:[s.jsx(es,{className:"w-5 h-5 text-blue-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-blue-600",children:["$",e.price_per_day]}),s.jsx("div",{className:"text-xs text-gray-600",children:"per bag/day"})]}),s.jsxs("div",{className:"text-center p-3 bg-green-50 rounded-lg",children:[s.jsx(Ut,{className:"w-5 h-5 text-green-600 mx-auto mb-1"}),s.jsx("div",{className:"text-lg font-bold text-green-600",children:e.available_spots}),s.jsx("div",{className:"text-xs text-gray-600",children:"available"})]}),s.jsxs("div",{className:"text-center p-3 bg-purple-50 rounded-lg",children:[s.jsx(Ut,{className:"w-5 h-5 text-purple-600 mx-auto mb-1"}),s.jsx("div",{className:"text-lg font-bold text-purple-600",children:e.capacity}),s.jsx("div",{className:"text-xs text-gray-600",children:"total capacity"})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(G,{variant:"outline",className:"flex-1",size:"sm",children:[s.jsx(Tk,{className:"w-4 h-4 mr-2"}),"Edit"]}),s.jsxs(G,{variant:"outline",className:"flex-1 text-red-600 hover:bg-red-50",size:"sm",onClick:n,children:[s.jsx(Z0,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})}function EM(){const[e,t]=b.useState([]),[n,r]=b.useState(null),[i,c]=b.useState([]),[d,h]=b.useState(!1),[m,x]=b.useState(!1),[p,g]=b.useState(!0);b.useEffect(()=>{w()},[]);const w=async()=>{try{const _=await X.auth.me(),A=(await X.entities.StorageLocation.filter({host_id:_.id},"-created_date",100)).map(D=>D.id),M=[];for(const D of A){const I=await X.entities.Booking.filter({location_id:D,status:"confirmed"},"-created_date",50);M.push(...I)}const E=M.filter(D=>!D.bag_photos||D.bag_photos.length===0);t(E)}catch(_){console.error("Error loading bookings:",_),Xe.error("Failed to load pending check-ins")}finally{g(!1)}},N=async _=>{const C=Array.from(_.target.files);if(C.length!==0){h(!0);try{const A=C.map(async E=>(await X.integrations.Core.UploadFile({file:E})).file_url),M=await Promise.all(A);c([...i,...M]),Xe.success("Photos uploaded")}catch(A){console.error("Error uploading photos:",A),Xe.error("Failed to upload photos")}finally{h(!1)}}},j=async()=>{if(i.length===0){Xe.error("Please upload at least one photo of the bags");return}x(!0);try{const _=`${n.id.slice(-4)}${Math.floor(10+Math.random()*90)}`;await X.entities.Booking.update(n.id,{bag_photos:i,pickup_number:_,uber_direct_status:"checked_in"});const C=i.map((A,M)=>`<p><img src="${A}" alt="Bag ${M+1}" style="max-width: 300px; margin: 10px 0;" /></p>`).join("");await X.integrations.Core.SendEmail({to:n.guest_id,subject:`Your Bags Are Checked In - Pickup #${_}`,body:`
533          <h2>Your bags have been successfully checked in!</h2>
534          <p><strong>Pickup Number: ${_}</strong></p>
535          <p>Keep this number safe - you'll need it to retrieve your bags.</p>
536          <h3>Photos of your bags:</h3>
537          ${C}
538          <p>Thank you for using Stow My Bags!</p>
539        `}),await X.entities.Notification.create({user_id:n.guest_id,title:"Bags Checked In",message:`Your bags have been checked in. Pickup number: ${_}`,type:"general",booking_id:n.id}),Xe.success("Bags checked in and customer notified!"),r(null),c([]),w()}catch(_){console.error("Error checking in bags:",_),Xe.error("Failed to complete check-in")}finally{x(!1)}};return p?s.jsx("div",{className:"flex justify-center items-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):n?s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ut,{className:"w-5 h-5"}),"Check In Bags - Booking #",n.id.slice(-6)]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[s.jsxs("p",{className:"text-sm font-semibold text-gray-900",children:["Customer: ",n.guest_name]}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Phone: ",n.guest_phone]}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Number of bags: ",n.number_of_units]})]}),s.jsxs("div",{children:[s.jsxs(te,{className:"flex items-center gap-2 mb-2",children:[s.jsx(Ol,{className:"w-4 h-4"}),"Upload Bag Photos"]}),s.jsx(de,{type:"file",accept:"image/*",multiple:!0,onChange:N,disabled:d}),d&&s.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Uploading..."})]}),i.length>0&&s.jsx("div",{className:"grid grid-cols-2 gap-2",children:i.map((_,C)=>s.jsx("img",{src:_,alt:`Bag ${C+1}`,className:"w-full h-32 object-cover rounded-lg border"},C))}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{variant:"outline",onClick:()=>{r(null),c([])},disabled:m,children:"Cancel"}),s.jsx(G,{onClick:j,disabled:d||m||i.length===0,className:"flex-1 bg-green-600 hover:bg-green-700",children:m?s.jsxs(s.Fragment,{children:[s.jsx(Ak,{className:"w-4 h-4 mr-2 animate-spin"}),"Processing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ms,{className:"w-4 h-4 mr-2"}),"Complete Check-In & Notify Customer"]})})]})]})]}):s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ut,{className:"w-5 h-5"}),"Pending Bag Check-Ins"]})}),s.jsx(me,{children:e.length===0?s.jsxs("div",{className:"text-center py-8 text-gray-500",children:[s.jsx(Ut,{className:"w-12 h-12 mx-auto mb-2 text-gray-400"}),s.jsx("p",{children:"No pending check-ins"})]}):s.jsx("div",{className:"space-y-3",children:e.map(_=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg hover:bg-gray-50",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:_.guest_name}),s.jsxs("p",{className:"text-sm text-gray-600",children:[_.number_of_units," bags"]}),s.jsx(ot,{className:"mt-1 bg-orange-100 text-orange-800",children:"Delivered - Awaiting Check-In"})]}),s.jsxs(G,{onClick:()=>r(_),className:"bg-blue-600 hover:bg-blue-700",children:[s.jsx(Ol,{className:"w-4 h-4 mr-2"}),"Check In"]})]},_.id))})})]})}function KQ(){const[e,t]=b.useState([]),[n,r]=b.useState(!1),[i,c]=b.useState(!0),[d,h]=b.useState(null);b.useEffect(()=>{m()},[]);const m=async()=>{try{const p=await X.auth.me();h(p);const g=await X.entities.StorageLocation.filter({host_id:p.id},"-created_date",50);t(g)}
539catch(p){console.error("Error loading data:",p)}finally{c(!1)}},x=()=>{r(!1),m()};return i?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-green-50 to-white",children:[s.jsx("div",{className:"bg-gradient-to-r from-green-600 to-green-700 text-white py-12 px-4 border-b-4 border-green-800",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/d8246ce0d_image.png",alt:"Stow My Bags",className:"h-20 mx-auto mb-4"}),s.jsx("h1",{className:"text-4xl font-bold mb-2",children:"Your Storage Storefront"}),s.jsx("p",{className:"text-green-100 text-lg",children:"Manage your locations and earn money with Stow My Bags"})]})}),s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[s.jsx("div",{className:"mb-8",children:s.jsx(EM,{})}),s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"My Locations"}),s.jsxs(G,{onClick:()=>r(!n),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(Ao,{className:"w-5 h-5 mr-2"}),"Add Location"]})]}),n&&s.jsx(TM,{onSuccess:x,onCancel:()=>r(!1),userId:d==null?void 0:d.id}),e.length===0?s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx(jt,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No locations yet"}),s.jsx("p",{className:"text-gray-600 mb-6",children:"Start earning by adding your first storage location"}),s.jsxs(G,{onClick:()=>r(!0),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(Ao,{className:"w-5 h-5 mr-2"}),"Add Your First Location"]})]}):s.jsx("div",{className:"space-y-4",children:e.map(p=>s.jsx(ZQ,{location:p,onUpdate:m},p.id))})]})]})}function QQ({locker:e,status:t,onRefresh:n,onClose:r}){const[i,c]=b.useState(null),[d,h]=b.useState(""),[m,x]=b.useState(""),[p,g]=b.useState(null),[w,N]=b.useState(null);b.useEffect(()=>{e.current_booking_id&&X.entities.Booking.filter({id:e.current_booking_id}).then(E=>{E[0]&&N(E[0])})},[e.current_booking_id]);const j=(t==null?void 0:t.locked)!==!1,_=e.lock_system_type==="manual",C=async()=>{var D;c("unlocking"),g(null);const E=await X.functions.invoke("remoteUnlockLocker",{locker_id:e.id,lock_device_id:e.lock_device_id,lock_system_type:e.lock_system_type});g(E.data),c(null),(D=E.data)!=null&&D.success&&n()},A=async()=>{var D;c("locking"),g(null);const E=await X.functions.invoke("remoteLockLocker",{locker_id:e.id,lock_device_id:e.lock_device_id,lock_system_type:e.lock_system_type});g(E.data),c(null),(D=E.data)!=null&&D.success&&n()},M=async()=>{var I,z;c("generating"),g(null);const E=m||Math.floor(1e3+Math.random()*9e3).toString(),D=await X.functions.invoke("generateLockAccessCode",{locker_id:e.id,lock_device_id:e.lock_device_id,lock_system_type:e.lock_system_type,code:E,booking_id:e.current_booking_id});(I=D.data)!=null&&I.success&&(h(E),await X.entities.Locker.update(e.id,{access_code:E}),e.current_booking_id&&await X.entities.Booking.update(e.current_booking_id,{access_code:E})),g(D.data),c(null),(z=D.data)!=null&&z.success&&n()};return s.jsxs(oe,{className:"border-brand-blue border-2",children:[s.jsxs(Ce,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"text-base flex items-center gap-2",children:[s.jsx(Ct,{className:"w-4 h-4 text-brand-blue"}),"Locker #",e.locker_number," Controls"]}),s.jsx(G,{variant:"ghost",size:"icon",onClick:r,className:"h-7 w-7",children:s.jsx(Io,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(ot,{className:`text-xs border-0 ${j?"bg-green-100 text-green-700":"bg-orange-100 text-orange-600"}`,children:j?"🔒 Locked":"🔓 Unlocked"}),s.jsx(ot,{className:"text-xs border-0 bg-gray-100 text-gray-600 capitalize",children:e.lock_system_type}),(t==null?void 0:t.battery)!==void 0&&s.jsxs(ot,{className:`text-xs border-0 ${t.battery<20?"bg-amber-100 text-amber-700":"bg-gray-100 text-gray-500"}`,children:[t.battery<20&&s.jsx(K0,{className:"w-3 h-3 mr-1"}),t.battery,"% battery"]})]})]}),s.jsxs(me,{className:"space-y-4",children:[w&&s.jsxs("div",{className:"p-3 bg-blue-50 rounded-lg",children:[s.jsx("p",{className:"text-xs font-semibold text-brand-blue mb-1",children:"Active Booking"}),s.jsx("p",{className:"text-sm font-medium text-gray-900",children:w.guest_name}),s.jsxs("p",{className:"text-xs text-gray-500",children:[w.start_date," → ",w.end_date]}),w.access_code&&s.jsxs("p",{className:"text-xs font-mono text-brand-blue mt-1",children:["Code: ",s.jsx("strong",{children:w.access_code})]})]}),!_&&s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2",children:"Remote Control"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs(G,{onClick:C,disabled:!!i||!j,variant:"outline",className:"border-orange-200 text-orange-600 hover:bg-orange-50",children:[i==="unlocking"?s.jsx(It,{className:"w-4 h-4 animate-spin mr-1"}):s.jsx(q0,{className:"w-4 h-4 mr-1"}),"Unlock"]}),s.jsxs(G,{onClick:A,disabled:!!i||j,variant:"outline",className:"border-green-200 text-green-700 hover:bg-green-50",children:[i==="locking"?s.jsx(It,{className:"w-4 h-4 animate-spin mr-1"}):s.jsx(Ct,{className:"w-4 h-4 mr-1"}),"Lock"]})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2",children:"Access Code"}),s.jsxs("div",{className:"flex gap-2 mb-2",children:[s.jsx(de,{placeholder:"Leave blank for random",value:m,onChange:E=>x(E.target.value),maxLength:8,className:"text-sm h-8"}),s.jsx(G,{onClick:M,disabled:!!i,size:"sm",className:"bg-coral hover:bg-coral-dark text-white flex-shrink-0",children:i==="generating"?s.jsx(It,{className:"w-3 h-3 animate-spin"}):s.jsx($l,{className:"w-3 h-3"})})]}),d&&s.jsxs("div",{className:"bg-green-50 rounded-lg p-2 flex items-center gap-2",children:[s.jsx(os,{className:"w-4 h-4 text-green-500"}),s.jsx("p",{className:"text-sm font-mono font-bold text-green-700 tracking-widest",children:d}),s.jsx("span",{className:"text-xs text-green-500",children:"Generated & saved"})]}),e.access_code&&!d&&s.jsxs("p",{className:"text-xs text-gray-400",children:["Current code: ",s.jsx("span",{className:"font-mono font-medium text-gray-600",children:e.access_code})]})]}),p&&s.jsxs("div",{className:`p-2 rounded-lg text-xs ${p.success?"bg-green-50 text-green-700":"bg-red-50 text-red-600"}`,children:[p.success?"✓ ":"✗ ",p.message||(p.success?"Success":p.error)]})]})]})}function XQ(){const[e,t]=b.useState(null),[n,r]=b.useState([]),[i,c]=b.useState({}),[d,h]=b.useState(!0),[m,x]=b.useState(!1),[p,g]=b.useState(null),[w,N]=b.useState(null);b.useEffect(()=>{j()},[]),b.useEffect(()=>{const z=setInterval(()=>{d||C()},3e4);return()=>clearInterval(z)},[d,n]);const j=async()=>{try{const z=await X.auth.me(),H=await X.entities.Facility.filter({partner_id:z.id});if(H[0]){t(H[0]);const V=await X.entities.Locker.filter({facility_id:H[0].id});r(V),await _(V,H[0])}}catch{X.auth.redirectToLogin()}finally{h(!1)}},_=async(z,H)=>{var Q,J;const V=await X.functions.invoke("getLockStatuses",{facility_id:(Q=H||e)==null?void 0:Q.id,locker_ids:z.map(le=>le.id)});(J=V.data)!=null&&J.statuses&&c(V.data.statuses),N(new Date)},C=async()=>{x(!0),await _(n,e),x(!1)},A=n.filter(z=>z.lock_device_id&&z.lock_system_type&&z.lock_system_type!=="manual"),M=n.filter(z=>!z.lock_device_id||z.lock_system_type==="manual"),E=A.filter(z=>{var H;return((H=i[z.id])==null?void 0:H.online)!==!1}).length,D=A.filter(z=>{var H;return((H=i[z.id])==null?void 0:H.locked)===!0}).length,I=A.filter(z=>{var H,V;return((H=i[z.id])==null?void 0:H.battery)<20||((V=i[z.id])==null?void 0:V.alert)}).length;return d?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})}):s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ls,{to:At("FacilityPortal"),children:s.jsx(G,{variant:"ghost",size:"icon",children:s.jsx(_k,{className:"w-4 h-4"})})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Lock Monitor"}),s.jsxs("p",{className:"text-sm text-gray-500",children:[e==null?void 0:e.name,w&&s.jsxs("span",{className:"ml-2 text-gray-400",children:["· Updated ",w.toLocaleTimeString()]})]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Ls,{to:At("SmartLockSetup"),children:s.jsx(G,{variant:"outline",size:"sm",children:"+ Connect Lock"})}),s.jsxs(G,{size:"sm",variant:"outline",onClick:C,disabled:m,children:[s.jsx(jv,{className:`w-4 h-4 mr-1 ${m?"animate-spin":""}`}),"Refresh"]})]})]}),A.length>0&&s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-3 mb-6",children:[{icon:os,label:"Online",value:`${E}/${A.length}`,color:"text-green-600",bg:"bg-green-50"},{icon:Ct,label:"Locked",value:D,color:"text-brand-blue",bg:"bg-blue-50"},{icon:q0,label:"Unlocked",value:A.length-D,color:"text-coral",bg:"bg-coral-light"},{icon:K0,label:"Alerts",value:I,color:"text-amber-600",bg:"bg-amber-50"}].map(({icon:z,label:H,value:V,color:Q,bg:J})=>s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:`p-3 text-center ${J} rounded-xl`,children:[s.jsx(z,{className:`w-5 h-5 mx-auto mb-1 ${Q}`}),s.jsx("p",{className:"text-xl font-bold text-gray-900",children:V}),s.jsx("p",{className:"text-xs text-gray-500",children:H})]})},H))}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-3",children:["Smart Locks (",A.length,")"]}),A.length===0?s.jsx(oe,{className:"border-dashed border-gray-200",children:s.jsxs(me,{className:"p-8 text-center",children:[s.jsx(kp,{className:"w-10 h-10 text-gray-200 mx-auto mb-2"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"No smart locks connected yet."}),s.jsx(Ls,{to:At("SmartLockSetup"),children:s.jsx(G,{size:"sm",className:"mt-3 bg-brand-blue hover:bg-blue-700 text-white",children:"Connect a Lock"})})]})}):s.jsx("div",{className:"space-y-2",children:A.map(z=>s.jsx(JQ,{locker:z,status:i[z.id],selected:(p==null?void 0:p.id)===z.id,onClick:()=>g((p==null?void 0:p.id)===z.id?null:z)}
539,z.id))})]}),s.jsx("div",{children:p?s.jsx(QQ,{locker:p,status:i[p.id],onRefresh:C,onClose:()=>g(null)}):s.jsxs(s.Fragment,{children:[s.jsxs("h2",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-3",children:["Manual Lockers (",M.length,")"]}),s.jsxs("div",{className:"space-y-2",children:[M.map(z=>s.jsx(oe,{className:"border-gray-100",children:s.jsxs(me,{className:"p-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ct,{className:"w-4 h-4 text-gray-300"}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-medium text-gray-700",children:["Locker #",z.locker_number]}),s.jsx("p",{className:"text-xs text-gray-400 capitalize",children:z.size})]})]}),s.jsxs("div",{className:"text-right",children:[z.access_code&&s.jsxs("p",{className:"text-xs font-mono text-gray-500",children:["Code: ",z.access_code]}),s.jsx(ot,{className:"text-xs border-0 bg-gray-100 text-gray-500 mt-0.5 capitalize",children:z.status})]})]})},z.id)),M.length===0&&s.jsx("p",{className:"text-gray-400 text-sm text-center py-4",children:"All lockers have smart locks assigned."})]})]})})]})]})})}function JQ({locker:e,status:t,selected:n,onClick:r}){const i=(t==null?void 0:t.online)!==!1,c=(t==null?void 0:t.locked)!==!1,d=(t==null?void 0:t.battery)!==void 0&&t.battery<20;return s.jsxs("button",{onClick:r,className:`w-full text-left p-3 rounded-xl border-2 transition-all ${n?"border-brand-blue bg-blue-50":"border-gray-100 bg-white hover:border-blue-200"}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center ${c?"bg-green-100":"bg-orange-100"}`,children:c?s.jsx(Ct,{className:"w-4 h-4 text-green-600"}):s.jsx(q0,{className:"w-4 h-4 text-orange-500"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"font-medium text-gray-900 text-sm",children:["Locker #",e.locker_number]}),s.jsxs("p",{className:"text-xs text-gray-400 capitalize",children:[e.lock_system_type," · ",e.size]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[d&&s.jsx(K0,{className:"w-4 h-4 text-amber-500"}),(t==null?void 0:t.battery)!==void 0&&s.jsxs("span",{className:`text-xs font-medium ${d?"text-amber-600":"text-gray-400"}`,children:[t.battery,"%"]}),s.jsx("div",{className:`w-2 h-2 rounded-full ${i?"bg-green-400":"bg-gray-300"}`})]})]}),(t==null?void 0:t.current_booking_id)&&s.jsx("div",{className:"mt-2 text-xs text-brand-blue bg-blue-50 rounded px-2 py-0.5 w-fit",children:"Active booking"})]})}function eX(){const[e,t]=b.useState("executive"),n=p=>{t(e===p?null:p)},r=[{name:"New York City",visitors:625e5,tier:"mega"},{name:"Miami",visitors:242e5,tier:"major"},{name:"Los Angeles",visitors:5e7,tier:"mega"},{name:"Orlando",visitors:75e6,tier:"mega"},{name:"Las Vegas",visitors:42e6,tier:"mega"},{name:"San Francisco",visitors:258e5,tier:"major"},{name:"Washington DC",visitors:246e5,tier:"major"},{name:"Chicago",visitors:576e5,tier:"mega"},{name:"Boston",visitors:219e5,tier:"major"},{name:"Seattle",visitors:147e5,tier:"major"},{name:"San Diego",visitors:351e5,tier:"major"},{name:"Atlanta",visitors:55e6,tier:"mega"},{name:"Honolulu",visitors:103e5,tier:"major"},{name:"New Orleans",visitors:192e5,tier:"major"},{name:"Philadelphia",visitors:44e6,tier:"major"},{name:"Nashville",visitors:169e5,tier:"major"},{name:"Denver",visitors:317e5,tier:"major"},{name:"Portland",visitors:89e5,tier:"medium"},{name:"Austin",visitors:251e5,tier:"major"},{name:"Charleston",visitors:75e5,tier:"medium"},{name:"Savannah",visitors:148e5,tier:"major"},{name:"Phoenix",visitors:45e6,tier:"major"},{name:"Houston",visitors:234e5,tier:"major"},{name:"Dallas",visitors:28e6,tier:"major"},{name:"Minneapolis",visitors:304e5,tier:"major"},{name:"Detroit",visitors:192e5,tier:"major"},{name:"Tampa",visitors:242e5,tier:"major"},{name:"Key West",visitors:5e6,tier:"medium"},{name:"St. Augustine",visitors:5e6,tier:"medium"},{name:"Salt Lake City",visitors:198e5,tier:"major"},{name:"Pittsburgh",visitors:125e5,tier:"medium"},{name:"Cleveland",visitors:193e5,tier:"major"},{name:"Kansas City",visitors:284e5,tier:"major"},{name:"San Antonio",visitors:37e6,tier:"major"},{name:"St. Louis",visitors:253e5,tier:"major"},{name:"Baltimore",visitors:252e5,tier:"major"},{name:"Milwaukee",visitors:12e6,tier:"medium"},{name:"Raleigh",visitors:177e5,tier:"major"},{name:"Charlotte",visitors:285e5,tier:"major"},{name:"Columbus",visitors:473e5,tier:"major"},{name:"Indianapolis",visitors:294e5,tier:"major"},{name:"Cincinnati",visitors:297e5,tier:"major"},{name:"Louisville",visitors:17e6,tier:"major"},{name:"Memphis",visitors:124e5,tier:"medium"},{name:"Anchorage",visitors:22e5,tier:"small"},{name:"Albuquerque",visitors:61e5,tier:"medium"},{name:"Tucson",visitors:41e5,tier:"small"},{name:"Oklahoma City",visitors:82e5,tier:"medium"},{name:"Richmond",visitors:45e5,tier:"small"},{name:"Providence",visitors:59e5,tier:"medium"}],i={avgBagPrice:12,platformFee:.15,partnerPayout:.85},d=(()=>{const p={mega:50,major:20,medium:8,small:3},g={mega:r.filter(z=>z.tier==="mega").length,major:r.filter(z=>z.tier==="major").length,medium:r.filter(z=>z.tier==="medium").length,small:r.filter(z=>z.tier==="small").length},w=g.mega*p.mega+g.major*p.major+g.medium*p.medium+g.small*p.small,N=r.reduce((z,H)=>z+H.visitors,0),j=N*.05,C=j*2,M=C*1.5,E=M*i.avgBagPrice,D=E*i.platformFee,I=E*i.partnerPayout;return{totalLocations:w,totalVisitors:N,storageUsers:j,totalBags:C,totalBagDays:M,grossRevenue:E,platformRevenue:D,partnerPayouts:I,avgRevenuePerLocation:D/w,avgRevenuePerPartner:I/w}})(),h={conservative:{...d,marketPenetration:.05,name:"Conservative"},moderate:{totalLocations:d.totalLocations*1.5,storageUsers:d.storageUsers*2,totalBags:d.totalBags*2,totalBagDays:d.totalBagDays*2,grossRevenue:d.grossRevenue*2,platformRevenue:d.platformRevenue*2,partnerPayouts:d.partnerPayouts*2,avgRevenuePerLocation:d.avgRevenuePerLocation*1.3,avgRevenuePerPartner:d.avgRevenuePerPartner*1.3,marketPenetration:.1,name:"Moderate"},optimistic:{totalLocations:d.totalLocations*2,storageUsers:d.storageUsers*3.5,totalBags:d.totalBags*3.5,totalBagDays:d.totalBagDays*3.5,grossRevenue:d.grossRevenue*3.5,platformRevenue:d.platformRevenue*3.5,partnerPayouts:d.partnerPayouts*3.5,avgRevenuePerLocation:d.avgRevenuePerLocation*1.75,avgRevenuePerPartner:d.avgRevenuePerPartner*1.75,marketPenetration:.15,name:"Optimistic"}},m=p=>p>=1e6?`$${(p/1e6).toFixed(2)}
539M`:`$${p.toLocaleString()}`,x=p=>p>=1e6?`${(p/1e6).toFixed(2)}M`:p.toLocaleString();return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-gradient-to-br from-blue-600 to-blue-800 text-white py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4",children:s.jsxs("div",{className:"text-center",children:[s.jsx(eg,{className:"w-16 h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Nationwide Expansion Revenue Report"}),s.jsx("p",{className:"text-xl text-blue-100 max-w-3xl mx-auto",children:"Strategic analysis of revenue potential with a Bounce-scale nationwide presence across the top 50 US cities"})]})})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-12",children:[s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("executive"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ek,{className:"w-6 h-6 text-blue-600"}),"Executive Summary"]}),e==="executive"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="executive"&&s.jsx(me,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-blue-50 border-2 border-blue-200 rounded-lg p-6",children:[s.jsx("h3",{className:"text-xl font-bold text-blue-900 mb-3",children:"Key Findings"}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Bounce operates 32,000+ locations"})," in 4,000+ cities globally (~100 major US cities)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"US luggage storage market:"})," $400M (2024) → $1B (2033) at 10.2% CAGR"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"176M+ annual travelers"})," across top 50 US cities (77.7M international + 98.5M domestic)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Opportunity:"})," 5-15% of travelers use luggage storage services"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Stow My Bags advantage:"})," Higher pricing ($12 avg vs Bounce $7.55) with Uber integration"]})]})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:Object.values(h).map(p=>s.jsxs("div",{className:"bg-white border-2 border-gray-200 rounded-lg p-6",children:[s.jsxs("h4",{className:"text-lg font-bold text-gray-900 mb-4",children:[p.name," Scenario"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Annual Platform Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-blue-600",children:m(p.platformRevenue)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Market Penetration"}),s.jsxs("div",{className:"text-xl font-semibold text-gray-900",children:[(p.marketPenetration*100).toFixed(0),"%"]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Total Locations"}),s.jsx("div",{className:"text-xl font-semibold text-gray-900",children:x(p.totalLocations)})]})]})]},p.name))})]})})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("market"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ci,{className:"w-6 h-6 text-green-600"}),"Market Analysis"]}),e==="market"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="market"&&s.jsxs(me,{children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-green-900 mb-4",children:"US Market Size"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"2024 Market Size:"}),s.jsx("span",{className:"font-bold text-green-700",children:"$400M"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"2033 Projection:"}),s.jsx("span",{className:"font-bold text-green-700",children:"$1.0B"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"CAGR:"}),s.jsx("span",{className:"font-bold text-green-700",children:"10.2%"})]})]})]}),s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-blue-900 mb-4",children:"Travel Volume (2024)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"International Visitors:"}),s.jsx("span",{className:"font-bold text-blue-700",children:"77.7M"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Domestic Trips:"}),s.jsx("span",{className:"font-bold text-blue-700",children:"98.5M"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Total:"}),s.jsx("span",{className:"font-bold text-blue-700",children:"176.2M"})]})]})]})]}),s.jsxs("div",{className:"mt-6 bg-purple-50 border border-purple-200 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-purple-900 mb-4",children:"Competitive Landscape: Bounce"}),s.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Global Locations"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:"32,000+"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Cities Worldwide"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:"4,000+"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Avg Price/Bag"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:"$7.55"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Insurance Coverage"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:"$10K"})]})]})]})]})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("cities"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(jt,{className:"w-6 h-6 text-coral-500"}),"Top 50 US Tourist Cities"]}),e==="cities"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="cities"&&s.jsx(me,{children:s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 max-h-96 overflow-y-auto",children:r.map((p,g)=>s.jsxs("div",{className:"bg-white border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("span",{className:"font-semibold text-gray-900",children:["#",g+1," ",p.name]}),s.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${p.tier==="mega"?"bg-red-100 text-red-700":p.tier==="major"?"bg-blue-100 text-blue-700":p.tier==="medium"?"bg-green-100 text-green-700":"bg-gray-100 text-gray-700"}`,children:p.tier})]}),s.jsxs("div",{className:"text-sm text-gray-600",children:[(p.visitors/1e6).toFixed(1),"M visitors/year"]})]},p.name))})})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("projections"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(es,{className:"w-6 h-6 text-green-600"}),"Revenue Projections"]}),e==="projections"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="projections"&&s.jsxs(me,{children:[s.jsx("div",{className:"space-y-6",children:Object.values(h).map(p=>s.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 rounded-xl p-6 border-2 border-blue-200",children:[s.jsxs("h3",{className:"text-2xl font-bold text-blue-900 mb-6",children:[p.name," Scenario"]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-6",children:[s.jsxs("div",{className:"bg-white rounded-lg p-4 border border-blue-200",children:[s.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Annual Platform Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-blue-600",children:m(p.platformRevenue)}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"15% of gross revenue"})]}),s.jsxs("div",{className:"bg-white rounded-lg p-4 border border-green-200",children:[s.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Partner Payouts"}),s.jsx("div",{className:"text-3xl font-bold text-green-600",children:m(p.partnerPayouts)}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"85% of gross revenue"})]}),s.jsxs("div",{className:"bg-white rounded-lg p-4 border border-purple-200",children:[s.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Gross Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-purple-600",children:m(p.grossRevenue)}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"Total market value"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white rounded-lg p-4",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Total Locations"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:x(p.totalLocations)})]}),s.jsxs("div",{className:"bg-white rounded-lg p-4",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Storage Users"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:x(p.storageUsers)})]}),s.jsxs("div",{className:"bg-white rounded-lg p-4",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Avg Revenue/Location"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:m(p.avgRevenuePerLocation)})]}),s.jsxs("div",{className:"bg-white rounded-lg p-4",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Total Bag-Days"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:x(p.totalBagDays)})]})]})]},p.name))}),s.jsxs("div",{className:"mt-8 bg-coral-50 border-2 border-coral-300 rounded-lg p-6",children:[s.jsxs("h4",{className:"font-bold text-coral-900 mb
539-4 flex items-center gap-2",children:[s.jsx(jk,{className:"w-5 h-5"}),"Key Assumptions"]}),s.jsxs("ul",{className:"space-y-2 text-gray-700 text-sm",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Locations per city:"})," Mega (50), Major (20), Medium (8), Small (3)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Market penetration:"})," Conservative (5%), Moderate (10%), Optimistic (15%)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Average bags per traveler:"})," 2 bags"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Average storage duration:"})," 1.5 days"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Average price per bag/day:"})," $12 (vs Bounce $7.55)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Platform fee:"})," 15% (Stow My Bags revenue)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Partner payout:"})," 85% (Partner earnings)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Total addressable market:"})," 176M+ travelers annually in top 50 cities"]})]})]}),s.jsxs("div",{className:"mt-6 bg-yellow-50 border-2 border-yellow-300 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-yellow-900 mb-4",children:"🎯 Strategic Recommendations"}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Phase 1:"})," Expand to 10 major cities (Year 1) - Target: $5-10M revenue"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Phase 2:"})," Add 20 mid-tier cities (Year 2) - Target: $20-40M revenue"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Phase 3:"})," Full nationwide rollout to 50 cities (Year 3-5) - Target: $75-185M revenue"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Competitive advantage:"})," Uber integration, higher-tier service, better partner payouts"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Tour affiliate program:"})," Additional $5-15M revenue stream from tours/attractions"]})]})]})]})]})]})]})}function tX(){return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-3xl font-bold text-center",children:"Partner Agreement"}),s.jsx("p",{className:"text-center text-gray-600 mt-2",children:"Last Updated: January 20, 2026"})]}),s.jsxs(me,{className:"prose prose-sm max-w-none space-y-6",children:[s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"1. Agreement Overview"}),s.jsx("p",{children:'This Partner Agreement ("Agreement") is between Stow My Bags, Inc. ("Platform", "we", "us") and you ("Partner") for the provision of luggage storage services through our marketplace platform. By applying to become a Partner, you agree to these terms.'})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"2. Partner Eligibility"}),s.jsx("p",{children:"To qualify as a Partner, you must:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Be at least 21 years of age"}),s.jsx("li",{children:"Own or legally operate a business with physical premises"}),s.jsx("li",{children:"Possess valid business licenses and permits for your location"}),s.jsx("li",{children:"Maintain commercial general liability insurance with minimum $1M coverage"}),s.jsx("li",{children:"Pass our background check and location verification process"}),s.jsx("li",{children:"Have a valid bank account for receiving payouts"}),s.jsx("li",{children:"Comply with all local zoning laws and regulations"})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"3. Partner Responsibilities"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"3.1 Storage Services"}),s.jsx("p",{children:"You agree to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Provide secure storage space as described 
539in your listing"}),s.jsx("li",{children:"Photograph all items upon check-in using the Platform app"}),s.jsx("li",{children:"Issue pickup numbers through the Platform system"}),s.jsx("li",{children:"Verify identification before releasing items to guests"}),s.jsx("li",{children:"Maintain cleanliness and security of storage areas"}),s.jsx("li",{children:"Respond to booking requests within 2 hours during business hours"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"3.2 Security Requirements"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Maintain secure locks on all storage areas"}),s.jsx("li",{children:"Install CCTV coverage of storage and check-in areas (required)"}),s.jsx("li",{children:"Keep storage areas climate-controlled and protected from elements"}),s.jsx("li",{children:"Limit access to authorized personnel only"}),s.jsx("li",{children:"Report any security incidents within 1 hour of discovery"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"3.3 Customer Service"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Provide friendly, professional service to all guests"}),s.jsx("li",{children:"Answer guest questions promptly and accurately"}),s.jsx("li",{children:"Handle complaints professionally and notify Platform immediately"}),s.jsx("li",{children:"Maintain a minimum 4.0-star rating"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"3.4 Availability"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Honor confirmed bookings unless force majeure"}),s.jsx("li",{children:"Keep your calendar updated in real-time"}),s.jsx("li",{children:"Provide 24-hour notice before blocking dates"}),s.jsx("li",{children:"Maintain posted business hours or update immediately"})]})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"4. Insurance and Liability"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.1 Required Insurance"}),s.jsx("p",{children:"You must maintain:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Commercial General Liability: Minimum $1,000,000 per occurrence"}),s.jsx("li",{children:"Bailee's Customer Insurance: Minimum $100,000 coverage"}),s.jsx("li",{children:"Property Insurance: Covering your premises"})]}),s.jsx("p",{className:"mt-2",children:"Platform must be named as an additional insured on all policies. Proof of insurance must be submitted annually."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.2 Partner Liability"}),s.jsx("p",{children:"You are responsible for loss or damage to guest items while in your custody, up to the coverage amounts provided. You agree to handle claims promptly and cooperate with insurance investigations."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.3 Platform Limitation of Liability"}
539),s.jsx("p",{children:"Stow My Bags acts solely as a marketplace and is not liable for loss, theft, or damage to stored items. Our maximum liability is limited to platform fees collected."})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"5. Pricing and Payments"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"5.1 Setting Prices"}),s.jsx("p",{children:"Partners set their own storage rates, subject to Platform approval. Rates must be competitive with local market pricing. The Platform reserves the right to reject unreasonable pricing."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"5.2 Platform Commission"}),s.jsx("p",{children:"The Platform retains a 25% commission on all bookings. This covers:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Payment processing fees"}),s.jsx("li",{children:"Marketing and customer acquisition"}),s.jsx("li",{children:"Platform maintenance and support"}),s.jsx("li",{children:"Insurance administration"}),s.jsx("li",{children:"Customer service"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"5.3 Payout Schedule"}),s.jsx("p",{children:"Partners receive payouts within 7 business days of booking completion via Stripe Connect. Payouts may be delayed for security reviews or disputed bookings."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"5.4 Cancellation Fees"}),s.jsx("p",{children:"If you cancel a confirmed booking without cause, you forfeit 100% of the booking fee as a penalty. Repeat cancellations may result in suspension."})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"6. Non-Compete and Exclusivity"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"6.1 Non-Compete Clause"}),s.jsx("p",{children:"During the term of this Agreement and for 12 months after termination, you agree not to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Solicit Stow My Bags customers to book directly, bypassing the Platform"}),s.jsx("li",{children:"Start or participate in a competing luggage storage marketplace"}),s.jsx("li",{children:"Share Platform customer data with competitors"})]}),s.jsx("p",{className:"font-semibold mt-3",children:"6.2 Platform Exclusivity"}),s.jsx("p",{children:"You may list your space on other platforms, but pricing on Stow My Bags must be equal to or better than competitors. You must honor bookings from all platforms fairly."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"7. Marketing and Branding"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"7.1 Platform Marketing"}),s.jsx("p",{children:"You grant Stow My Bags permission to use your business name, logo, photos, and location details in marketing materials. We will promote your location through SEO, advertising, and social media."}),s.jsx("p",{className:"font-semibold",children:"7.2 Partner Marketing Obligations"}),s.jsx("p",{children:"Partners agree to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Display Stow My Bags signage at check-in areas (provided by Platform)"}),s.jsx("li",{children:"Mention Platform partnership in local advertising"}),s.jsx("li",{children:"Use provided marketing materials (window decals, brochures)"}),s.jsx("li",{children:"Not disparage the Platform or its customers"})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"8. Quality Standards"}),s.jsx("p",{children:"Partners must maintain:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Minimum 4.0-star average rating (measured quarterly)"}),s.jsx("li",{children:"Response rate above 90% within 2 hours"}),s.jsx("li",{children:"Cancellation rate below 5%"}),s.jsx("li",{children:"Zero tolerance for discrimination or harassment"}),s.jsx("li",{children:"Compliance with all safety and accessibility regulations"})]}),s.jsx("p",{className:"mt-2",children:"Failure to meet quality standards may result in reduced visibility, suspension, or termination."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"9. 
539Verification and Audits"}),s.jsx("p",{children:"Platform reserves the right to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Conduct on-site inspections with 48 hours notice"}),s.jsx("li",{children:"Request updated insurance certificates annually"}),s.jsx("li",{children:"Verify business licenses and permits"}),s.jsx("li",{children:"Review CCTV footage in case of incidents"}),s.jsx("li",{children:"Conduct mystery shopper evaluations"})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"10. Intellectual Property"}),s.jsx("p",{children:"The Platform owns all intellectual property rights to the Stow My Bags brand, app, website, and technology. Partners receive a limited, non-transferable license to use Platform materials solely for authorized purposes during the Agreement term."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"11. Data and Privacy"}),s.jsx("p",{children:"Partners must comply with all applicable privacy laws (GDPR, CCPA, etc.). Customer data may only be used for providing storage services. Partners must not share, sell, or misuse customer information. Violations will result in immediate termination and legal action."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"12. Termination"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"12.1 By Partner"}),s.jsx("p",{children:"You may terminate this Agreement with 30 days written notice. You remain responsible for fulfilling all confirmed bookings."}),s.jsx("p",{className:"font-semibold",children:"12.2 By Platform"}),s.jsx("p",{children:"We may terminate immediately for:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Breach of this Agreement"}),s.jsx("li",{children:"Fraudulent activity"}),s.jsx("li",{children:"Consistent poor ratings or customer complaints"}),s.jsx("li",{children:"Loss of required insurance or licenses"}),s.jsx("li",{children:"Safety violations"}),s.jsx("li",{children:"Discriminatory practices"})]}),s.jsx("p",{className:"font-semibold mt-2",children:"12.3 Effect of Termination"}),s.jsx("p",{children:"Upon termination, your listing is removed, and you must return all Platform materials. Outstanding payouts will be processed per normal schedule. Non-compete and confidentiality obligations survive termination."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"13. Indemnification"}),s.jsx("p",{children:"Partners agree to indemnify and hold harmless Stow My Bags, its officers, employees, and agents from any claims, damages, losses, or expenses (including legal fees) arising from:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Your breach of this Agreement"}),s.jsx("li",{children:"Negligence in providing storage services"}),s.jsx("li",{children:"Loss or damage to customer property"}),s.jsx("li",{children:"Violations of law or regulation"}),s.jsx("li",{children:"Misuse of customer data"})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"14. Dispute Resolution"}),s.jsx("p",{children:"Any disputes arising from this Agreement shall be resolved through binding arbitration in accordance with the American Arbitration Association rules. Arbitration will be conducted in Wilmington, Delaware. Each party bears its own costs unless arbitrator rules otherwise."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"15. Force Majeure"}),s.jsx("p",{children:"Neither party is liable for failure to perform due to circumstances beyond reasonable control, including natural disasters, war, terrorism, pandemic, or government orders. Affected party must notify the other within 48 hours."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"16. Modifications"}),s.jsx("p",{children:"Platform may modify this Agreement with 30 days notice. Material changes require your acceptance. Continued participation after changes constitutes acceptance. Partners may terminate if they disagree with modifications."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"17. Independent Contractor"}),s.jsx("p",{children:"Partners are independent contractors, not employees or agents of Stow My Bags. You are responsible for your own taxes, insurance, and business expenses. This Agreement does not create a partnership or joint venture."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"18. Entire Agreement"}),s.jsx("p",{children:"This Agreement constitutes the entire understanding between parties and supersedes all prior agreements, whether written or oral. Any amendments must be in 
539writing and signed by both parties."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"19. Contact Information"}),s.jsxs("p",{children:["For questions about this Agreement:",s.jsx("br",{}),s.jsx("strong",{children:"Email:"})," [email protected]",s.jsx("br",{}),s.jsx("strong",{children:"Phone:"})," 1-800-STOW-BAG (Partner Support)",s.jsx("br",{}),s.jsx("strong",{children:"Mail:"})," Stow My Bags, Partner Relations, 123 Storage Street, Suite 100, Wilmington, DE 19801"]})]}),s.jsxs("div",{className:"mt-8 p-4 bg-purple-50 rounded-lg space-y-2",children:[s.jsx("p",{className:"text-sm text-gray-700",children:s.jsx("strong",{children:"Welcome to the Stow My Bags Partner Network!"})}),s.jsx("p",{className:"text-sm text-gray-700",children:"This Agreement protects both partners and customers while fostering a successful marketplace. We're committed to your success and provide ongoing support, marketing, and technology to help you maximize earnings."}),s.jsx("p",{className:"text-sm text-gray-700",children:"By completing your partner application, you acknowledge that you have read, understood, and agree to be bound by this Agreement."})]})]})]})})})}function sX(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState(!1),[c,d]=b.useState(!0),[h,m]=b.useState(!1);b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=await X.auth.me();if(g.partner_status!=="approved"&&g.role!=="admin"){e(At("PartnerLanding"));return}if(g.partner_agreement_accepted){e(At("PartnerPortal"));return}n(g)}catch(g){console.error("Error loading user:",g),e(At("Home"))}finally{d(!1)}},p=async()=>{if(!r){Xe.error("Please check the box to accept the agreement");return}m(!0);try{await X.auth.updateMe({partner_agreement_accepted:!0,partner_agreement_accepted_date:new Date().toISOString()}),Xe.success("Agreement accepted! Redirecting to Partner Portal..."),setTimeout(()=>{e(At("PartnerPortal"))},1500)}catch(g){console.error("Error accepting agreement:",g),Xe.error("Failed to save agreement. Please try again.")}finally{m(!1)}};return c?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs(oe,{children:[s.jsxs(Ce,{className:"bg-gradient-to-r from-purple-600 to-purple-700 text-white",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsx(Y0,{className:"w-8 h-8"}),s.jsx(Pe,{className:"text-3xl",children:"Partner Agreement"})]}),s.jsx("p",{className:"text-center text-purple-100 mt-2",children:"Welcome to the Stow My Bags Partner Network!"})]}),s.jsxs(me,{className:"p-8 space-y-6",children:[s.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-6",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-bold text-green-900 mb-2",children:["Congratulations, ",t==null?void 0:t.full_name,"!"]}),s.jsx("p",{className:"text-green-800",children:"Your partner application has been approved. Before you can access your Partner Portal and start listing locations, you must review and accept our Partner Agreement."})]})]})}),s.jsxs("div",{className:"border rounded-lg p-6 bg-gray-50",children:[s.jsx("h3",{className:"font-bold text-lg mb-3",children:"What You're Agreeing To:"}),s.jsxs("ul",{className:"space-y-2 text-sm text-gray-700",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Provide secure storage services to Stow My Bags customers"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Maintain required insurance coverage ($1M+ liability)"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Platform commission of 25% on all bookings"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Display Stow My Bags marketing materials at your location"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Non-compete clause (12 months after termination)"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Maintain minimum 4.0-star rating and quality standards"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-purple-600 mt-1",children:"•"}),s.jsx("span",{children:"Comply with all privacy and data protection laws"})]})]})]}),s.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:s.jsxs("p",{className:"text-sm text-blue-900",children:[s.jsx("strong",{children:"📄 Full Agreement:"})," You can review the complete Partner Agreement"," ",s.jsx("a",{href:At("PartnerAgreement"),target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline font-semibold",children:"here"}),". We recommend reading it thoroughly before accepting."]})}),s.jsx("div",{className:"border-t pt-6",children:s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[s.jsx(Rd,{checked:r,onCheckedChange:i,className:"mt-1"}),s.jsxs("span",{className:"text-sm text-gray-700 leading-relaxed group-hover:text-gray-900",children:[s.jsx("strong",{children:"I have read and agree to the Partner Agreement."})," ","I understand my responsibilities as a Stow My Bags storage partner, including insurance requirements, commission structure, quality standards, and all terms outlined in the agreement. I acknowledge that this is a legally binding contract."]})]})}),s.jsxs("div",{className:"flex gap-4 pt-4",children:[s.jsx(G,{variant:"outline",onClick:()=>e(At("Home")),disabled:h,className:"flex-1",children:"Cancel"}),s.jsx(G,{onClick:p,disabled:!r||h,className:"flex-1 bg-purple-600 hover:bg-purple-700 text-lg h-12",children:h?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Accepting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ms,{className:"w-5 h-5 mr-2"}),"Accept Agreement & Continue"]})})]}),s.jsx("p",{className:"text-xs text-gray-500 text-center pt-4",children:"By accepting this agreement, you are entering into a legally binding contract. If you have questions, contact [email protected] before proceeding."})]})]})})})}function nX(){const e=br(),[t,n]=b.useState(!1),[r,i]=b.useState({name:"",email:"",ph
539one:"",address:"",city:"",business_type:"",business_license:"",capacity:"",insurance_provider:"",insurance_policy:"",insurance_coverage:"",insurance_expiration:"",message:"",agreed_terms:!1,agreed_noncompete:!1,agreed_marketing:!1}),c=async d=>{d.preventDefault(),n(!0);try{if(!await X.auth.isAuthenticated())localStorage.setItem("partnerApplication",JSON.stringify(r)),Xe.success("Please sign in to complete your application"),setTimeout(()=>{X.auth.redirectToLogin(window.location.origin+"/host")},1500);else{const m=await X.auth.me();await X.auth.updateMe({partner_status:"pending",phone:r.phone}),await X.integrations.Core.SendEmail({to:"[email protected]",subject:"New Partner Application",body:`
540            New partner application received:
541
542            USER ID: ${m.id}
543            
544            CONTACT INFORMATION:
545            Name: ${r.name}
546            Email: ${r.email}
547            Phone: ${r.phone}
548
549            LOCATION DETAILS:
550            Address: ${r.address}
551            City: ${r.city}
552            Business Type: ${r.business_type}
553            Business License: ${r.business_license}
554            Storage Capacity: ${r.capacity} items
555
556            INSURANCE INFORMATION:
557            Provider: ${r.insurance_provider}
558            Policy Number: ${r.insurance_policy}
559            Coverage Amount: $${r.insurance_coverage}
560            Expiration Date: ${r.insurance_expiration}
561
562            AGREEMENTS:
563            ✓ Terms & Conditions: ${r.agreed_terms?"Accepted":"Not Accepted"}
564            ✓ Non-Compete Clause: ${r.agreed_noncompete?"Accepted":"Not Accepted"}
565            ✓ Marketing Materials: ${r.agreed_marketing?"Accepted":"Not Accepted"}
566
567            Additional Message: ${r.message||"None"}
568            
569            To approve this partner, update user ${m.id} partner_status to 'approved'
570          `}),Xe.success("Application submitted! We'll review and contact you within 24 hours."),setTimeout(()=>{e("/")},2e3)}}catch(h){console.error("Error:",h),Xe.error("Something went wrong. Please try again.")}finally{n(!1)}};return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx("div",{className:"bg-gradient-to-br from-blue-900 to-blue-800 text-white py-20 px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/750d03633_window-decal-6x6.png",alt:"Stow My Bags",className:"h-32 mx-auto mb-8"}),s.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Become a Storage Partner"}),s.jsx("p",{className:"text-xl text-blue-100 mb-8 max-w-3xl mx-auto",children:"Turn your extra space into income. Join our network of trusted storage locations and earn money by helping travelers."}),s.jsx(G,{onClick:()=>document.getElementById("apply-form").scrollIntoView({behavior:"smooth"}),className:"bg-white text-blue-900 hover:bg-blue-50 text-lg px-8 py-6 h-auto",children:"Start Earning Today"})]})}),s.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-16",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"Why Partner With Us?"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[s.jsxs(oe,{className:"p-6 text-center hover:shadow-lg transition-shadow",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(es,{className:"w-8 h-8 text-green-600"})}),s.jsx("h3",{className:"font-bold text-xl mb-2",children:"Earn Extra Income"}),s.jsx("p",{className:"text-gray-600",children:"Generate passive income from your unused space. Hosts earn $100-500+ per month."})]}),s.jsxs(oe,{className:"p-6 text-center hover:shadow-lg transition-shadow",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Ts,{className:"w-8 h-8 text-blue-600"})}),s.jsx("h3",{className:"font-bold text-xl mb-2",children:"Flexible Schedule"}),s.jsx("p",{className:"text-gray-600",children:"You control your availability. Set your own hours and rates that work for you."})]}),s.jsxs(oe,{className:"p-6 text-center hover:shadow-lg transition-shadow",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Tn,{className:"w-8 h-8 text-purple-600"})}),s.jsx("h3",{className:"font-bold text-xl mb-2",children:"Protected & Secure"}),s.jsx("p",{className:"text-gray-600",children:"All bookings are verified and protected. Insurance coverage included for peace of mind."})]})]})]}),s.jsx("div",{className:"bg-gray-50 py-16 px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12",children:"How It Works"}),s.jsxs("div",{className:"grid md:grid-cols-4 gap-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"1"}),s.jsx("h3",{className:"font-bold mb-2",children:"Apply"}),s.jsx("p",{className:"text-gray-600",children:"Submit your application with details about your space"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"2"}),s.jsx("h3",{className:"font-bold mb-2",children:"Get Verified"}),s.jsx("p",{className:"text-gray-600",children:"We'll review and approve your location within 24 hours"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"3"}),s.jsx("h3",{className:"font-bold mb-2",children:"List Your Space"}),s.jsx("p",{className:"text-gray-600",children:"Create your listing with photos and availability"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"4"}),s.jsx("h3",{className:"font-bold mb-2",children:"Start Earning"}),s.jsx("p",{className:"text-gray-600",children:"Accept bookings and get paid automatically"})]})]})]})}),s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-8",children:"Partner Requirements"}),s.jsx(oe,{className:"p-8",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Secure Space"}),s.jsx("p",{className:"text-gray-600",children:"Indoor, lockable storage area with controlled access"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Good Location"}),s.jsx("p",{className:"text-gray-600",children:"Near airports, tourist areas, or city centers"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Reliable Access"}),s.jsx("p",{className:"text-gray-600",children:"Ability to provide access during business hours"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ms,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Professional Service"}),s.jsx("p",{className:"text-gray-600",children:"Commitment to providing excellent customer experience"})]})]})]})})]}),s.jsx("div",{id:"apply-form",className:"bg-gradient-to-br from-blue-900 to-blue-800 py-16 px-4",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-white text-center mb-8",children:"Apply to Become a Partner"}),s.jsx(oe,{className:"p-8",children:s.jsxs("form",{onSubmit:c,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Full Name *"}),s.jsx(de,{required:!0,value:r.name,onChange:d=>i({...r,name:d.target.value}),placeholder:"John Smith"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Email *"}),s.jsx(de,{required:!0,type:"email",value:r.email,onChange:d=>i({...r,email:d.target.value}),placeholder:"[email protected]"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Phone Number *"}),s.jsx(de,{required:!0,type:"tel",value:r.phone,onChange:d=>i({...r,phone:d.target.value}),placeholder:"+1 (555) 123-4567"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Storage Location Address *"}),s.jsx(de,{required:!0,value:r.address,onChange:d=>i({...r,address:d.target.value}),placeholder:"123 Main St"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"City *"}),s.jsx(de,{required:!0,value:r.city,onChange:d=>i({...r,city:d.target.value}),placeholder:"New York"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Business Type *"}
570),s.jsxs("select",{required:!0,value:r.business_type,onChange:d=>i({...r,business_type:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:[s.jsx("option",{value:"",children:"Select type..."}),s.jsx("option",{value:"retail_store",children:"Retail Store"}),s.jsx("option",{value:"hotel",children:"Hotel"}),s.jsx("option",{value:"restaurant",children:"Restaurant/Cafe"}),s.jsx("option",{value:"office",children:"Office"}),s.jsx("option",{value:"storage_facility",children:"Storage Facility"}),s.jsx("option",{value:"other",children:"Other"})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Business License # *"}),s.jsx(de,{required:!0,value:r.business_license,onChange:d=>i({...r,business_license:d.target.value}),placeholder:"BL-123456"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Storage Capacity * (min. 5 items)"}),s.jsx(de,{required:!0,type:"number",min:"5",value:r.capacity,onChange:d=>i({...r,capacity:d.target.value}),placeholder:"10"})]})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Tn,{className:"w-5 h-5 text-blue-600"}),"Insurance Information *"]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"All partners must maintain business liability insurance with minimum $10,000 coverage"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Insurance Provider *"}),s.jsx(de,{required:!0,value:r.insurance_provider,onChange:d=>i({...r,insurance_provider:d.target.value}),placeholder:"State Farm, Allstate, etc."})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Policy Number *"}),s.jsx(de,{required:!0,value:r.insurance_policy,onChange:d=>i({...r,insurance_policy:d.target.value}),placeholder:"POL-123456789"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Coverage Amount * (USD)"}),s.jsx(de,{required:!0,type:"number",min:"10000",value:r.insurance_coverage,onChange:d=>i({...r,insurance_coverage:d.target.value}),placeholder:"10000"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Insurance Expiration Date *"}),s.jsx(de,{required:!0,type:"date",value:r.insurance_expiration,onChange:d=>i({...r,insurance_expiration:d.target.value}),min:new Date().toISOString().split("T")[0]})]})]})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Partner Agreements *"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{required:!0,type:"checkbox",checked:r.agreed_terms,onChange:d=>i({...r,agreed_terms:d.target.checked}),className:"mt-1"}),s.jsxs("span",{className:"text-sm text-gray-700",children:["I agree to the ",s.jsx("a",{href:"#",className:"text-blue-600 underline",children:"Terms & Conditions"})," and understand my obligations as a storage partner"]})]}),s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{required:!0,type:"checkbox",checked:r.agreed_noncompete,onChange:d=>i({...r,agreed_noncompete:d.target.checked}),className:"mt-1"}),s.jsx("span",{className:"text-sm text-gray-700",children:"I agree not to operate competing luggage storage services during and for 1 year after partnership"})]}),s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{required:!0,type:"checkbox",checked:r.agreed_marketing,onChange:d=>i({...r,agreed_marketing:d.target.checked}),className:"mt-1"}),s.jsx("span",{className:"text-sm text-gray-700",children:"I agree to prominently display Stow My Bags marketing materials at my location"})]})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Additional Information"}),s.jsx(Os,{value:r.message,onChange:d=>i({...r,message:d.target.value}),placeholder:"Tell us more about your space, special features, accessibility, etc.",className:"h-24"})]}),s.jsx(G,{type:"submit",disabled:t,className:"w-full bg-blue-600 hover:bg-blue-700 text-lg py-6 h-auto",children:t?"Submitting...":"Submit Application"})]})})]})}),s.jsx("div",{className:"max-w-6xl mx-auto px-4 py-16",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 text-center",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-4xl font-bold text-blue-600 mb-2",children:"50+"}),s.jsx("div",{className:"text-gray-600",children:"Active Partners"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-4xl font-bold text-blue-600 mb-2",children:"500+"}),s.jsx("div",{className:"text-gray-600",children:"Happy Customers"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-4xl font-bold text-blue-600 mb-2",children:"$350"}),s.jsx("div",{className:"text-gray-600",children:"Avg Monthly Earnings"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-4xl font-bold text-blue-600 mb-2",children:"4.9★"}),s.jsx("div",{className:"text-gray-600",children:"Partner Rating"})]})]})})]})}function rX({location:e,onClose:t,onSuccess:n}){var m,x,p,g;const[r,i]=b.useState({title:e.title||"",description:e.description||"",address:e.address||"",city:e.city||"",capacity:e.capacity||"",carry_on:((m=e.pricing)==null?void 0:m.carry_on)||"",checked_bag:((x=e.pricing)==null?void 0:x.checked_bag)||"",oversized:((p=e.pricing)==null?void 0:p.oversized)||"",xl_locker:((g=e.pricing)==null?void 0:g.xl_locker)||""}),[c,d]=b.useState(!1),h=async w=>{var N,j,_,C;w.preventDefault(),d(!0);
570try{const A={title:r.title,description:r.description,address:r.address,city:r.city,capacity:parseInt(r.capacity),pricing:{carry_on:r.carry_on?parseFloat(r.carry_on):null,checked_bag:r.checked_bag?parseFloat(r.checked_bag):null,oversized:r.oversized?parseFloat(r.oversized):null,xl_locker:r.xl_locker?parseFloat(r.xl_locker):null}},M=r.carry_on!=((N=e.pricing)==null?void 0:N.carry_on)||r.checked_bag!=((j=e.pricing)==null?void 0:j.checked_bag)||r.oversized!=((_=e.pricing)==null?void 0:_.oversized)||r.xl_locker!=((C=e.pricing)==null?void 0:C.xl_locker);M&&(A.pricing_approved=!1,A.status="under_review"),await X.entities.StorageLocation.update(e.id,A),Xe.success(M?"Location updated! Pricing changes submitted for admin approval.":"Location updated successfully!"),n()}catch(A){console.error("Error updating location:",A),Xe.error("Failed to update location")}finally{d(!1)}};return s.jsx(Na,{open:!0,onOpenChange:t,children:s.jsxs(Ai,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsx(Mi,{children:s.jsx(Ri,{children:"Edit Location & Set Pricing"})}),s.jsxs("form",{onSubmit:h,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"title",children:"Location Name"}),s.jsx(de,{id:"title",required:!0,value:r.title,onChange:w=>i({...r,title:w.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"description",children:"Description"}),s.jsx(Os,{id:"description",required:!0,value:r.description,onChange:w=>i({...r,description:w.target.value}),rows:3})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"address",children:"Address"}),s.jsx(de,{id:"address",required:!0,value:r.address,onChange:w=>i({...r,address:w.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"city",children:"City"}),s.jsx(de,{id:"city",required:!0,value:r.city,onChange:w=>i({...r,city:w.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"capacity",children:"Total Capacity (bags)"}),s.jsx(de,{id:"capacity",type:"number",min:"1",required:!0,value:r.capacity,onChange:w=>i({...r,capacity:w.target.value})})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(es,{className:"w-5 h-5 text-green-600"}),s.jsx("h3",{className:"font-semibold",children:"Custom Pricing (per day)"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Set your own rates based on your market demand. Changes require admin a
570pproval."}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"carry_on",children:"Carry-On Bag ($)"}),s.jsx(de,{id:"carry_on",type:"number",step:"0.01",min:"0",placeholder:"5.00",value:r.carry_on,onChange:w=>i({...r,carry_on:w.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"checked_bag",children:"Checked Bag ($)"}),s.jsx(de,{id:"checked_bag",type:"number",step:"0.01",min:"0",placeholder:"7.00",value:r.checked_bag,onChange:w=>i({...r,checked_bag:w.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"oversized",children:"Oversized Item ($)"}),s.jsx(de,{id:"oversized",type:"number",step:"0.01",min:"0",placeholder:"12.00",value:r.oversized,onChange:w=>i({...r,oversized:w.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"xl_locker",children:"XL Locker ($)"}),s.jsx(de,{id:"xl_locker",type:"number",step:"0.01",min:"0",placeholder:"25.00",value:r.xl_locker,onChange:w=>i({...r,xl_locker:w.target.value})})]})]}),s.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg text-sm text-blue-900",children:[s.jsx("p",{className:"font-semibold mb-1",children:"💡 Dynamic Pricing Tips:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[s.jsx("li",{children:"Prices automatically increase during high demand (80%+ capacity)"}),s.jsx("li",{children:"Set up promotions in Partner Portal to attract more bookings"}),s.jsx("li",{children:"Seasonal pricing can be configured for peak travel periods"})]})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(G,{type:"button",variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),s.jsx(G,{type:"submit",disabled:c,className:"flex-1 bg-green-600 hover:bg-green-700",children:c?"Saving...":"Save Changes"})]})]})]})})}function AM({location:e,onStatusChange:t}){const[n,r]=b.useState(!1),[i,c]=b.useState(!0),[d,h]=b.useState(null);b.useEffect(()=>{m()},[e.id]);const m=async()=>{try{c(!0);const{data:p}=await X.functions.invoke("stripeConnectStatus",{location_id:e.id});h(p),t&&t(p.onboarding_complete)}catch(p){console.error("Error checking Stripe status:",p)}finally{c(!1)}},x=async()=>{try{r(!0);const{data:p}=await X.functions.invoke("stripeConnectOnboard",{location_id:e.id});window.open(p.url,"_blank"),Xe.info("Complete Stripe onboarding in the new window, then refresh this page")}catch(p){console.error("Error starting Stripe Connect:",p),Xe.error("Failed to start Stripe onboarding")}finally{r(!1)}};return i?s.jsxs(G,{variant:"outline",disabled:!0,children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Checking..."]}):d!=null&&d.onboarding_complete?s.jsxs(G,{variant:"outline",disabled:!0,className:"bg-green-50 border-green-200",children:[s.jsx(ms,{className:"w-4 h-4 mr-2 text-green-600"}),"Stripe Connected"]}):s.jsx(G,{onClick:x,disabled:n,className:"bg-purple-600 hover:bg-purple-700",children:n?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-4 h-4 mr-2 animate-spin"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"Connect Stripe to Receive Payments"]})})}var Jg="Switch",[iX]=rn(Jg),[aX,oX]=iX(Jg),MM=b.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:c,required:d,disabled:h,value:m="on",onCheckedChange:x,form:p,...g}=e,[w,N]=b.useState(null),j=gt(t,E=>N(E)),_=b.useRef(!1),C=w?p||!!w.closest("form"):!0,[A,M]=vr({prop:i,defaultProp:c??!1,onChange:x,caller:Jg});return s.jsxs(aX,{scope:n,checked:A,disabled:h,children:[s.jsx(Ze.button,{type:"button",role:"switch","aria-checked":A,"aria-required":d,"data-state":OM(A),"data-disabled":h?"":void 0,disabled:h,value:m,...g,ref:j,onClick:Oe(e.onClick,E=>{M(D=>!D),C&&(_.current=E.isPropagationStopped(),_.current||E.stopPropagation())})}),C&&s.jsx(DM,{control:w,bubbles:!_.current,name:r,value:m,checked:A,required:d,disabled:h,form:p,style:{transform:"translateX(-100%)"}})]})});MM.displayName=Jg;var RM="SwitchThumb",LM=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=oX(RM,n);return s.jsx(Ze.span,{"data-state":OM(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});LM.displayName=RM;var lX="SwitchBubbleInput",DM=b.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},c)=>{const d=b.useRef(null),h=gt(d,c),m=Ng(n),x=wg(t);return b.useEffect(()=>{const p=d.current;
570if(!p)return;const g=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(g,"checked").set;if(m!==n&&N){const j=new Event("click",{bubbles:r});N.call(p,n),p.dispatchEvent(j)}},[m,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:h,style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});DM.displayName=lX;function OM(e){return e?"checked":"unchecked"}var IM=MM,cX=LM;const Zw=b.forwardRef(({className:e,...t},n)=>s.jsx(IM,{className:We("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(cX,{className:We("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Zw.displayName=IM.displayName;function dX({location:e,onUpdate:t}){const[n,r]=b.useState(!1),[i,c]=b.useState({capacity:e.capacity||10,available_spots:e.available_spots||10,status:e.status||"active"}),[d,h]=b.useState(!1),m=async g=>{g.preventDefault(),h(!0);try{await X.entities.StorageLocation.update(e.id,{capacity:i.capacity,available_spots:i.available_spots,status:i.status}),Xe.success("Availability updated successfully"),r(!1),t&&t()}catch(w){console.error("Error updating availability:",w),Xe.error("Failed to update availability")}finally{h(!1)}},x=async()=>{const g=e.status==="active"?"inactive":"active";try{await X.entities.StorageLocation.update(e.id,{status:g}),Xe.success(`Location ${g==="active"?"activated":"deactivated"}`),t&&t()}catch(w){console.error("Error toggling status:",w),Xe.error("Failed to update status")}},p=e.capacity>0?((e.capacity-e.available_spots)/e.capacity*100).toFixed(1):0;return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ds,{className:"w-5 h-5"}),"Availability Management"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(te,{htmlFor:"status-toggle",className:"text-sm",children:e.status==="active"?"Active":"Inactive"}),s.jsx(Zw,{id:"status-toggle",checked:e.status==="active",onCheckedChange:x})]}),s.jsx(G,{onClick:()=>r(!n),variant:"outline",size:"sm",children:n?"Cancel":"Edit"})]})]})}),s.jsx(me,{children:n?s.jsxs("form",{onSubmit:m,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{htmlFor:"capacity",children:"Total Capacity"}),s.jsx(de,{id:"capacity",type:"number",min:"1",required:!0,value:i.capacity,onChange:g=>c({...i,capacity:parseInt(g.target.value)})})]}),s.jsxs("div",{children:[s.jsx(te,{htmlFor:"available",children:"Available Spots"}),s.jsx(de,{id:"available",type:"number",min:"0",max:i.capacity,required:!0,value:i.available_spots,onChange:g=>c({...i,available_spots:parseInt(g.target.value)})})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"submit",disabled:d,className:"bg-green-600 hover:bg-green-700",children:d?"Saving...":"Save Changes"}),s.jsx(G,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"})]})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"text-center p-4 bg-blue-50 rounded-lg",children:[s.jsx("div",{className:"text-3xl font-bold text-blue-600",children:e.capacity}),s.jsx("div",{className:"text-sm text-gray-600",children:"Total Capacity"})]}),s.jsxs("div",{className:"text-center p-4 bg-green-50 rounded-lg",children:[s.jsx("div",{className:"text-3xl font-bold text-green-600",children:e.available_spots}),s.jsx("div",{className:"text-sm text-gray-600",children:"Available"})]}),s.jsxs("div",{className:"text-center p-4 bg-purple-50 rounded-lg",children:[s.jsxs("div",{className:"text-3xl font-bold text-purple-600",children:[p,"%"]}),s.jsx("div",{className:"text-sm text-gray-600",children:"Occupied"})]})]}),e.available_spots===0&&s.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-lg",children:[s.jsx(fn,{className:"w-5 h-5 text-red-600"}),s.jsx("span",{className:"text-sm text-red-800",children:"Location is fully booked"})]}),e.status!=="active"&&s.jsxs("div",{className:"flex items-center gap-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:[s.jsx(fn,{className:"w-5 h-5 text-yellow-600"}),s.jsx("span",{className:"text-sm text-yellow-800",children:"Location is inactive and not visible to customers"})]})]})})]})}function uX({location:e,onUpdate:t,onManagePromotions:n}){const[r,i]=b.useState(!1),[c,d]=b.useState(!1),h=async()=>
570{if(confirm("Are you sure you want to delete this location?"))try{await X.entities.StorageLocation.delete(e.id),t()}catch(p){console.error("Error deleting location:",p),alert("Error deleting location. Please try again.")}},m=p=>{switch(p){case"active":return"bg-green-100 text-green-800";case"inactive":return"bg-gray-100 text-gray-800";case"pending":return"bg-yellow-100 text-yellow-800";case"under_review":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},x=e.pricing&&(e.pricing.carry_on||e.pricing.checked_bag||e.pricing.oversized||e.pricing.xl_locker||e.pricing.combo);return s.jsxs(s.Fragment,{children:[s.jsx(oe,{children:s.jsxs(me,{className:"p-6",children:[s.jsx("div",{className:"flex justify-between items-start mb-4",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900",children:e.title}),s.jsx(ot,{className:m(e.status),children:e.status}),x&&s.jsx(ot,{variant:"outline",className:e.pricing_approved?"border-green-500 text-green-700":"border-yellow-500 text-yellow-700",children:e.pricing_approved?s.jsxs(s.Fragment,{children:[s.jsx(ms,{className:"w-3 h-3 mr-1"})," Pricing Approved"]}):s.jsxs(s.Fragment,{children:[s.jsx(fn,{className:"w-3 h-3 mr-1"})," Pricing Pending"]})})]}),s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(jt,{className:"w-4 h-4 mr-1"}),e.address,", ",e.city]}),s.jsx("p",{className:"text-gray-600 text-sm",children:e.description})]})}),x?s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-4",children:[e.pricing.carry_on&&s.jsxs("div",{className:"text-center p-3 bg-blue-50 rounded-lg",children:[s.jsx(es,{className:"w-4 h-4 text-blue-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-blue-600",children:["$",e.pricing.carry_on]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Carry-On/day"})]}),e.pricing.checked_bag&&s.jsxs("div",{className:"text-center p-3 bg-green-50 rounded-lg",children:[s.jsx(es,{className:"w-4 h-4 text-green-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-green-600",children:["$",e.pricing.checked_bag]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Checked Bag/day"})]}),e.pricing.oversized&&s.jsxs("div",{className:"text-center p-3 bg-purple-50 rounded-lg",children:[s.jsx(es,{className:"w-4 h-4 text-purple-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-purple-600",children:["$",e.pricing.oversized]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Oversized/day"})]}),e.pricing.xl_locker&&s.jsxs("div",{className:"text-center p-3 bg-orange-50 rounded-lg",children:[s.jsx(es,{className:"w-4 h-4 text-orange-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-orange-600",children:["$",e.pricing.xl_locker]}),s.jsx("div",{className:"text-xs text-gray-600",children:"XL Locker/day"})]}),e.pricing.combo&&s.jsxs("div",{className:"text-center p-3 bg-teal-50 rounded-lg",children:[s.jsx(es,{className:"w-4 h-4 text-teal-600 mx-auto mb-1"}),s.jsxs("div",{className:"text-lg font-bold text-teal-600",children:["$",e.pricing.combo]}),s.jsx("div",{className:"text-xs text-gray-600",children:"Combo/day"})]})]}):s.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-center gap-2 text-yellow-800",children:[s.jsx(fn,{className:"w-5 h-5"}),s.jsx("p",{className:"text-sm font-medium",children:"No pricing set - Click Edit to configure your rates"})]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[s.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[s.jsx(Ut,{className:"w-5 h-5 text-gray-600 mx-auto mb-1"}),s.jsx("div",{className:"text-lg font-bold text-gray-800",children:e.available_spots}),s.jsx("div",{className:"text-xs text-gray-600",children:"Available"})]}),s.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded-lg",children:[s.jsx(Ut,{className:"w-5 h-5 text-gray-600 mx-auto mb-1"}),s.jsx("div",{className:"text-lg font-bold text-gray-800",children:e.capacity}),s.jsx("div",{className:"text-xs text-gray-600",children:"Total Capacity"})]})]}),s.jsx("div",{className:"mb-4",children:s.jsx(AM,{location:e,onStatusChange:t})}),s.jsxs("div",{className:"flex gap-2 mb-3",children:[s.jsxs(G,{variant:"outline",className:"flex-1",size:"sm",onClick:()=>i(!0),children:[s.jsx(Tk,{className:"w-4 h-4 mr-2"}),"Edit & Pricing"]}),s.jsxs(G,{variant:"outline",className:"flex-1",size:"sm",onClick:n,children:[s.jsx(sg,{className:"w-4 h-4 mr-2"}),"Promotions"]}),s.jsx(G,{variant:"outline",className:"text-red-600 hover:bg-red-50",size:"sm",onClick:h,children:s.jsx(Z0,{className:"w-4 h-4"})})]}),s.jsxs(G,{variant:c?"default":"outline",className:"w-full",size:"sm",onClick:()=>d(!c),children:[s.jsx(Ut,{className:"w-4 h-4 mr-2"}),c?"Hide":"Manage"," Availability"]})]})}),c&&s.jsx(dX,{location:e,onUpdate:t}),r&&s.jsx(rX,{location:e,onClose:()=>i(!1),onSuccess:()=>{i(!1),t()}})]})}function hX({location:e,onUpdate:t}){var x;const[n,r]=b.useState(!1),[i,c]=b.useState({name:"",type:"percentage_off",value:10,min_days:1,min_hours:0,start_date:new Date().toISOString().split("T")[0],end_date:"",description:"",active:!0}),d=async()=>{try{const p={...i,id:Date.now().toString()},g=[...e.promotions||[],p];await X.entities.StorageLocation.update(e.id,{promotions:g}),r(!1),c({name:"",type:"percentage_off",value:10,min_days:1,min_hours:0,start_date:new Date().toISOString().split("T")[0],end_date:"",description:"",active:!0}),t()}catch(p){console.error("Error adding promotion:",p),alert("Failed to add promotion. Please try again.")}},h=async p=>{if(confirm("Delete this promotion?"))try{const g=e.promotions.filter(w=>w.id!==p);await X.entities.StorageLocation.update(e.id,{promotions:g}),t()}catch(g){console.error("Error deleting promotion:",g),alert("Failed to delete promotion. Please try again.")}},m=async p=>{try{const g=e.promotions.map(w=>w.id===p?{...w,active:!w.active}:w);await X.entities.StorageLocation.update(e.id,{promotions:g}),t()}catch(g){console.error("Error toggling promotion:",g)}};return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(sg,{className:"w-5 h-5"}),"Promotions & Deals"]}
570),s.jsxs(G,{onClick:()=>r(!n),size:"sm",children:[s.jsx(Ao,{className:"w-4 h-4 mr-2"}),"Add Promotion"]})]})}),s.jsxs(me,{className:"space-y-4",children:[n&&s.jsx(oe,{className:"p-4 bg-blue-50",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Promotion Name"}),s.jsx(de,{value:i.name,onChange:p=>c({...i,name:p.target.value}),placeholder:"e.g., Weekend Special"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Type"}),s.jsxs("select",{value:i.type,onChange:p=>c({...i,type:p.target.value}),className:"w-full px-3 py-2 border rounded-lg",children:[s.jsx("option",{value:"percentage_off",children:"Percentage Off"}),s.jsx("option",{value:"fixed_amount_off",children:"Fixed Amount Off"}),s.jsx("option",{value:"first_hours_free",children:"First Hours Free"}),s.jsx("option",{value:"multi_day_discount",children:"Multi-Day Discount"})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Value"}),s.jsx(de,{type:"number",value:i.value,onChange:p=>c({...i,value:parseFloat(p.target.value)}),placeholder:i.type==="percentage_off"?"10":"5"}),s.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:[i.type==="percentage_off"&&"Percentage off total",i.type==="fixed_amount_off"&&"Dollar amount off",i.type==="first_hours_free"&&"Number of free hours",i.type==="multi_day_discount"&&"Percentage off for multi-day"]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Min Days (0 for any)"}),s.jsx(de,{type:"number",value:i.min_days,onChange:p=>c({...i,min_days:parseInt(p.target.value)})})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Min Hours (0 for any)"}),s.jsx(de,{type:"number",value:i.min_hours,onChange:p=>c({...i,min_hours:parseInt(p.target.value)})})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Start Date"}),s.jsx(de,{type:"date",value:i.start_date,onChange:p=>c({...i,start_date:p.target.value})})]}),s.jsxs("div",{children:[s.jsx(te,{children:"End Date (Optional)"}),s.jsx(de,{type:"date",value:i.end_date,onChange:p=>c({...i,end_date:p.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Description"}),s.jsx(Os,{value:i.description,onChange:p=>c({...i,description:p.target.value}),placeholder:"Describe this promotion to customers"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(G,{onClick:d,className:"flex-1",children:"Save Promotion"}),s.jsx(G,{onClick:()=>r(!1),variant:"outline",children:"Cancel"})]})]})}),((x=e.promotions)==null?void 0:x.length)>0?s.jsx("div",{className:"space-y-2",children:e.promotions.map(p=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"font-semibold",children:p.name}),s.jsx(ot,{className:p.active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800",children:p.active?"Active":"Inactive"})]}),s.jsx("p",{className:"text-sm text-gray-600",children:p.description}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[p.start_date," ",p.end_date&&`to ${p.end_date}`]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(G,{size:"sm",variant:"outline",onClick:()=>m(p.id),children:p.active?"Pause":"Activate"}),s.jsx(G,{size:"sm",variant:"outline",className:"text-red-600",onClick:()=>h(p.id),children:s.jsx(Z0,{className:"w-4 h-4"})})]})]},p.id))}):s.jsx("p",{className:"text-center text-gray-500 py-4",children:"No promotions yet. Add one to attract more customers!"})]})]})}function fX({userId:e,onUpdate:t}){const[n,r]=b.useState([]),[i,c]=b.useState(!1),[d,h]=b.useState(null),[m,x]=b.useState(!0);b.useEffect(()=>{p()},[e]);const p=async()=>{try{const w=await X.entities.StorageLocation.filter({host_id:e},"-created_date",100);r(w)}catch(w){console.error("Error loading locations:",w)}finally{x(!1)}},g=()=>{c(!1),p(),t&&t()};return m?s.jsx("div",{className:"text-center py-8",children:"Loading locations..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold",children:"My Storage Locations"}),s.jsx("p",{className:"text-gray-600",children:"Manage your listings and pricing"})]}),s.jsxs(G,{onClick:()=>c(!i),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(Ao,{className:"w-5 h-5 mr-2"}),"Add Location"]})]}),i&&s.jsx(TM,{onSuccess:g,onCancel:()=>c(!1),userId:e}),n.length===0?s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx("h3",{className:"text-xl font-semibold mb-2",children:"No locations yet"}),s.jsx("p",{className:"text-gray-600 mb-6",children:"Add your first storage location to start earning"}),s.jsxs(G,{onClick:()=>c(!0),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(Ao,{className:"w-5 h-5 mr-2"}),"Add Your First Location"]})]}):s.jsx("div",{className:"space-y-4",children:n.map(w=>s.jsxs("div",{className:"space-y-4",children:[s.jsx(uX,{location:w,onUpdate:()=>{p(),t&&t()},onManagePromotions:()=>h(w)}),(d==null?void 0:d.id)===w.id&&s.jsx(hX,{location:w,onUpdate:()=>{p(),t&&t()}})]},w.id))})]})}function mX({userId:e}){const[t,n]=b.useState([]),[r,i]=b.useState([]),[c,d]=b.useState(!0);b.useEffect(()=>{h()},[e]);const h=async()=>{try{const p=await X.entities.StorageLocation.filter({host_id:e},"-created_date",100);i(p);const w=(await X.entities.Booking.list("-created_date",500)).filter(N=>p.some(j=>j.id===N.location_id));n(w)}catch(p){console.error("Error loading bookings:",p)}finally{d(!1)}},m=p=>{const g=r.find(w=>w.id===p);return(g==null?void 0:g.title)||"Unknown Location"},x=p=>{switch(p){case"confirmed":return"bg-green-100 text-green-800";
570case"pending":return"bg-yellow-100 text-yellow-800";case"completed":return"bg-blue-100 text-blue-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return c?s.jsx("div",{className:"text-center py-8",children:"Loading bookings..."}):t.length===0?s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx(Ut,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold mb-2",children:"No bookings yet"}),s.jsx("p",{className:"text-gray-600",children:"Bookings will appear here once customers reserve your locations"})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Bookings"}),s.jsx("p",{className:"text-gray-600",children:"View and manage all reservations for your locations"})]}),s.jsx("div",{className:"grid gap-4",children:t.map(p=>{var g;return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx(Pe,{className:"text-lg",children:m(p.location_id)}),s.jsx(ot,{className:x(p.status),children:p.status})]})}),s.jsxs(me,{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Q0,{className:"w-4 h-4 text-gray-500"}),s.jsx("span",{className:"font-medium",children:p.guest_name||"Guest"})]}),p.guest_phone&&s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(ld,{className:"w-4 h-4 text-gray-500"}),s.jsx("span",{children:p.guest_phone})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ds,{className:"w-4 h-4 text-gray-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Check-in"}),s.jsx("div",{className:"font-medium",children:new Date(p.start_date).toLocaleDateString()})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ds,{className:"w-4 h-4 text-gray-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Check-out"}),s.jsx("div",{className:"font-medium",children:new Date(p.end_date).toLocaleDateString()})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ut,{className:"w-4 h-4 text-gray-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Units"}),s.jsx("div",{className:"font-medium",children:p.number_of_units})]})]})]}),p.special_requests&&s.jsxs("div",{className:"text-sm bg-gray-50 p-3 rounded",children:[s.jsx("span",{className:"font-medium",children:"Special Requests: "}),p.special_requests]}),s.jsxs("div",{className:"flex justify-between items-center pt-3 border-t",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Total Amount"}),s.jsxs("span",{className:"text-lg font-bold text-green-600",children:["$",((g=p.total_price)==null?void 0:g.toFixed(2))||"0.00"]})]}),p.pickup_number&&s.jsxs("div",{className:"bg-blue-50 p-3 rounded text-sm",children:[s.jsx("span",{className:"font-medium",children:"Pickup #: "}),s.jsx("span",{className:"font-mono",children:p.pickup_number})]})]})]},p.id)})})]})}function pX({userId:e}){const[t,n]=b.useState({totalEarnings:0,thisMonth:0,lastMonth:0,pending:0,payoutHistory:[]}),[r,i]=b.useState(!0);b.useEffect(()=>{c()},[e]);const c=async()=>{try{const h=await X.entities.StorageLocation.filter({host_id:e},"-created_date",100);let m=0,x=0;const p=[];h.forEach(E=>{m+=E.total_payouts||0,x+=E.pending_payout||0,E.payout_history&&p.push(...E.payout_history.map(D=>({...D,location_title:E.title})))});const w=(await X.entities.Booking.list("-created_date",500)).filter(E=>h.some(D=>D.id===E.location_id)&&E.status==="completed"),N=new Date,j=new Date(N.getFullYear(),N.getMonth(),1),_=new Date(N.getFullYear(),N.getMonth()-1,1),C=new Date(N.getFullYear(),N.getMonth(),0),A=w.filter(E=>new Date(E.created_date)>=j).reduce((E,D)=>E+(D.total_price||0),0),M=w.filter(E=>{const D=new Date(E.created_date);return D>=_&&D<=C}).reduce((E,D)=>E+(D.total_price||0),0);n({totalEarnings:m,thisMonth:A,lastMonth:M,pending:x,payoutHistory:p.sort((E,D)=>new Date(D.date)-new Date(E.date))})}catch(h){console.error("Error loading earnings:",h)}finally{i(!1)}},d=()=>{const h=[["Date","Booking ID","Location","Amount","Status"].join(","),...t.payoutHistory.map(g=>[new Date(g.date).toLocaleDateString(),g.booking_id,g.location_title,`$${g.amount.toFixed(2)}`,g.status].join(","))].join(`
571`),m=new Blob([h],{type:"text/csv"}),x=window.URL.createObjectURL(m),p=document.createElement("a");p.href=x,p.download=`earnings-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(p),p.click(),window.URL.revokeObjectURL(x),p.remove()};return r?s.jsx("div",{className:"text-center py-8",children:"Loading earnings..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Earnings & Payouts"}),s.jsx("p",{className:"text-gray-600",children:"Track your income and payout history"})]}),s.jsxs(G,{onClick:d,variant:"outline",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"}),"Export CSV"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Total Paid Out"}),s.jsx(es,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",t.totalEarnings.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"All-time earnings"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"This Month"}),s.jsx(Ds,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",t.thisMonth.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Current month"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Last Month"}),s.jsx(Ci,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",t.lastMonth.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Previous month"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Pending Payout"}),s.jsx(es,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",t.pending.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Awaiting transfer"})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Payout History"})}),s.jsx(me,{children:t.payoutHistory.length===0?s.jsx("div",{className:"text-center py-8 text-gray-500",children:"No payouts yet"}):s.jsx("div",{className:"space-y-3",children:t.payoutHistory.slice(0,10).map((h,m)=>s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:h.location_title}),s.jsxs("div",{className:"text-sm text-gray-600",children:[new Date(h.date).toLocaleDateString()," • Booking #",h.booking_id.slice(-8)]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("div",{className:"font-bold text-green-600",children:["$",h.amount.toFixed(2)]}),s.jsx("div",{className:`text-xs ${h.status==="completed"?"text-green-600":h.status==="pending"?"text-yellow-600":"text-red-600"}`,children:h.status})]})]},m))})})]})]})}function gX({userId:e}){const[t,n]=b.useState([]),[r,i]=b.useState([]),[c,d]=b.useState("all"),[h,m]=b.useState(null),[x,p]=b.useState(!0),[g,w]=b.useState("");b.useEffect(()=>{N()},[e]);const N=async()=>{try{const E=await X.entities.StorageLocation.filter({host_id:e},"-created_date",100);i(E);const I=(await X.entities.StowNGoLocker.list("-created_date",500)).filter(z=>E.some(H=>H.id===z.location_id));n(I)}catch(E){console.error("Error loading lockers:",E),w("Failed to load lockers")}finally{p(!1)}},j=async(E,D)=>{try{await X.entities.StowNGoLocker.update(E,D),await N(),m(null),w("")}catch(I){console.error("Error updating locker:",I),w("Failed to update locker")}},_=c==="all"?t:t.filter(E=>E.location_id===c),C=E=>{switch(E){case"available":return"bg-green-100 text-green-800";
571case"occupied":return"bg-blue-100 text-blue-800";case"reserved":return"bg-yellow-100 text-yellow-800";case"maintenance":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},A=E=>E>=75?"text-green-600":E>=40?"text-yellow-600":"text-red-600",M={total:t.length,available:t.filter(E=>E.status==="available").length,occupied:t.filter(E=>E.status==="occupied").length,maintenance:t.filter(E=>E.status==="maintenance").length};return x?s.jsx("div",{className:"text-center py-8",children:"Loading lockers..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Locker Management"}),s.jsx("p",{className:"text-gray-600",children:"Monitor and manage your Stow-N-Go lockers"})]}),s.jsxs(ts,{value:c,onValueChange:d,children:[s.jsx(qt,{className:"w-64",children:s.jsx(ss,{placeholder:"Filter by location"})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"all",children:"All Locations"}),r.map(E=>s.jsx(Ge,{value:E.id,children:E.title},E.id))]})]})]}),g&&s.jsxs(en,{variant:"destructive",children:[s.jsx(fn,{className:"h-4 w-4"}),s.jsx(tn,{children:g})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsx(Pe,{className:"text-sm font-medium",children:"Total Lockers"})}),s.jsx(me,{children:s.jsx("div",{className:"text-2xl font-bold",children:M.total})})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsx(Pe,{className:"text-sm font-medium",children:"Available"})}),s.jsx(me,{children:s.jsx("div",{className:"text-2xl font-bold text-green-600",children:M.available})})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsx(Pe,{className:"text-sm font-medium",children:"Occupied"})}),s.jsx(me,{children:s.jsx("div",{className:"text-2xl font-bold text-blue-600",children:M.occupied})})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsx(Pe,{className:"text-sm font-medium",children:"Maintenance"})}),s.jsx(me,{children:s.jsx("div",{className:"text-2xl font-bold text-red-600",children:M.maintenance})})]})]}),s.jsx("div",{className:"grid gap-4",children:_.map(E=>{const D=r.find(I=>I.id===E.location_id);return s.jsx(oe,{className:"hover:shadow-lg transition-shadow",children:s.jsxs(me,{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-start mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx(gh,{className:"w-6 h-6 text-blue-600"})}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-bold text-lg",children:["Locker #",E.locker_number]}),s.jsx("p",{className:"text-sm text-gray-600",children:D==null?void 0:D.title})]})]}),s.jsx(ot,{className:C(E.status),children:E.status})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Size"}),s.jsx("div",{className:"font-medium capitalize",children:E.locker_size})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Price"}),s.jsxs("div",{className:"font-medium",children:["$",E.price_per_day,"/day"]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Lock System"}),s.jsx("div",{className:"font-medium capitalize",children:E.lock_system_type||"N/A"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(SL,{className:"w-3 h-3"}),"Battery"]}),s.jsxs("div",{className:`font-medium ${A(E.lock_battery_level)}`,children:[E.lock_battery_level||"N/A","%"]})]})]}),E.status==="occupied"&&E.current_booking_id&&s.jsx("div",{className:"bg-blue-50 rounded-lg p-3 mb-4",children:s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ct,{className:"w-4 h-4 text-blue-600"}),s.jsx("span",{className:"font-medium",children:"Active Booking"}),s.jsxs("span",{className:"text-gray-600",children:["#",E.current_booking_id.slice(-8)]})]})}),E.last_cleaned&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:[s.jsx(Ts,{className:"w-4 h-4"}),"Last cleaned: ",new Date(E.last_cleaned).toLocaleDateString()]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(G,{variant:"outline",size:"sm",onClick:()=>m(E),className:"flex items-center gap-2",children:[s.jsx(MD,{className:"w-4 h-4"}),"Edit"]}),E.status==="available"&&s.jsx(G,{variant:"outline",size:"sm",onClick:()=>j(E.id,{status:"maintenance"}),children:"Mark Maintenance"}),E.status==="maintenance"&&s.jsx(G,{variant:"outline",size:"sm",onClick:()=>j(E.id,{status:"available",out_of_service_reason:null}),children:"Mark Available"})]})]})},E.id)})}),_.length===0&&s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx(gh,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold mb-2",children:"No lockers found"}),s.jsx("p",{className:"text-gray-600",children:"No lockers match the selected filters"})]}),h&&s.jsx(Na,{open:!0,onOpenChange:()=>m(null),children:s.jsxs(Ai,{children:[s.jsx(Mi,{children:s.jsxs(Ri,{children:["Edit Locker #",h.locker_number]})}),s.jsx(xX,{locker:h,onSave:E=>j(h.id,E),onCancel:()=>m(null)})]})})]})}function xX({locker:e,onSave:t,onCancel:n}){const[r,i]=b.useState({status:e.status,price_per_day:e.price_per_day,out_of_service_reason:e.out_of_service_reason||"",lock_battery_level:e.lock_battery_level||100}),c=d=>{d.preventDefault(),t(r)};return s.jsxs("form",{onSubmit:c,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Status"}),s.jsxs(ts,{value:r.status,onValueChange:d=>i({...r,status:d}),children:[s.jsx(qt,{children:s.jsx(ss,{})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"available",children:"Available"}),s.jsx(Ge,{value:"occupied",children:"Occupied"}),s.jsx(Ge,{value:"reserved",children:"Reserved"}),s.jsx(Ge,{value:"maintenance",children:"Maintenance"})]})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Price per Day ($)"}),s.jsx(de,{type:"number",step:"0.01",value:r.price_per_day,onChange:d=>i({...r,price_per_day:parseFloat(d.target.value)}),required:!0})]}),r.status==="maintenance"&&s.jsxs("div",{children:[s.jsx(te,{children:"Reason for Maintenance"}),s.jsx(de,{value:r.out_of_service_reason,onChange:d=>i({...r,out_of_service_reason:d.target.value}),placeholder:"e.g., Lock malfunction, cleaning needed"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Battery Level (%)"}),s.jsx(de,{type:"number",min:"0",max:"100",value:r.lock_battery_level,onChange:d=>i({...r,lock_battery_level:parseInt(d.target.value)})})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"button",variant:"outline",onClick:n,className:"flex-1",children:"Cancel"}),s.jsx(G,{type:"submit",className:"flex-1 bg-blue-600 hover:bg-blue-700",children:"Save Changes"})]})]})}var Kw="Progress",Qw=100,[yX]=rn(Kw),[vX,bX]=yX(Kw),FM=b.forwardRef((e,t)=>
571{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:c=wX,...d}=e;(i||i===0)&&!nk(i)&&console.error(_X(`${i}`,"Progress"));const h=nk(i)?i:Qw;r!==null&&!rk(r,h)&&console.error(jX(`${r}`,"Progress"));const m=rk(r,h)?r:null,x=Xp(m)?c(m,h):void 0;return s.jsx(vX,{scope:n,value:m,max:h,children:s.jsx(Ze.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":Xp(m)?m:void 0,"aria-valuetext":x,role:"progressbar","data-state":$M(m,h),"data-value":m??void 0,"data-max":h,...d,ref:t})})});FM.displayName=Kw;var BM="ProgressIndicator",zM=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=bX(BM,n);return s.jsx(Ze.div,{"data-state":$M(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});zM.displayName=BM;function wX(e,t){return`${Math.round(e/t*100)}%`}function $M(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Xp(e){return typeof e=="number"}function nk(e){return Xp(e)&&!isNaN(e)&&e>0}function rk(e,t){return Xp(e)&&!isNaN(e)&&e<=t&&e>=0}function _X(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Qw}\`.`}function jX(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
572  - a positive number
573  - less than the value passed to \`max\` (or ${Qw} if no \`max\` prop is set)
574  - \`null\` or \`undefined\` if the progress is indeterminate.
575
576Defaulting to \`null\`.`}var UM=FM,NX=zM;const Xw=b.forwardRef(({className:e,value:t,...n},r)=>s.jsx(UM,{ref:r,className:We("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:s.jsx(NX,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Xw.displayName=UM.displayName;function SX({user:e,onComplete:t}){const[n,r]=b.useState({agreementAccepted:!1,stripeConnected:!1,locationAdded:!1,pricingSet:!1,pricingApproved:!1}),[i,c]=b.useState(!0);b.useEffect(()=>{d()},[e]);const d=async()=>{try{const w=(e==null?void 0:e.partner_agreement_accepted)||!1,N=await X.entities.StorageLocation.filter({host_id:e==null?void 0:e.id},"-created_date",100),j=N.some(M=>M.stripe_account_id&&M.stripe_onboarding_complete),_=N.length>0,C=N.some(M=>M.pricing),A=N.some(M=>M.pricing_approved);r({agreementAccepted:w,stripeConnected:j,locationAdded:_,pricingSet:C,pricingApproved:A}),w&&j&&_&&C&&A&&(t==null||t())}catch(w){console.error("Error checking progress:",w)}finally{c(!1)}},h=[{id:"agreement",title:"Review & Accept Agreements",description:"Partner agreement, liability release, and terms of service",completed:n.agreementAccepted,icon:Y0,action:()=>window.location.href="/partneragreementaccept",buttonText:"Review Agreements",required:!0},{id:"stripe",title:"Connect Stripe Account",description:"Set up your payout method to receive earnings",completed:n.stripeConnected,icon:H0,action:()=>{},buttonText:"Setup in Locations Tab",required:!0,disabled:!n.agreementAccepted},{id:"location",title:"Add Your Location",description:"Provide details about your storage space",completed:n.locationAdded,icon:jt,action:()=>{},buttonText:"Go to Locations Tab",required:!0,disabled:!n.agreementAccepted},{id:"pricing",title:"Set Your Pricing",description:"Configure rates for different bag types",completed:n.pricingSet,icon:es,action:()=>{},buttonText:"Configure in Locations",required:!0,disabled:!n.locationAdded},{id:"approval",title:"Await Admin Approval",description:"Your pricing will be reviewed for market competitiveness",completed:n.pricingApproved,icon:Ct,required:!0,pending:n.pricingSet&&!n.pricingApproved}],m=h.filter(w=>w.completed).length,x=h.length,p=m/x*100;if(i)return s.jsx("div",{className:"text-center py-8",children:"Loading onboarding status..."});const g=m===x;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(oe,{className:"border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",children:[s.jsxs(Ce,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(Pe,{className:"text-2xl",children:"Partner Onboarding"}),s.jsxs(ot,{className:g?"bg-green-600":"bg-blue-600",children:[m," of ",x," Complete"]})]}),s.jsx(kn,{className:"text-base",children:"Complete these steps to start accepting bookings and earning revenue"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"mb-6",children:[s.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[s.jsx("span",{className:"font-medium",children:"Overall Progress"}),s.jsxs("span",{className:"text-gray-600",children:[p.toFixed(0),"%"]})]}),s.jsx(Xw,{value:p,className:"h-3"})]}),g&&s.jsxs(en,{className:"mb-6 bg-green-50 border-green-200",children:[s.jsx(os,{className:"h-4 w-4 text-green-600"}),s.jsxs(tn,{className:"text-green-800",children:[s.jsx("strong",{children:"Congratulations!"})," Your onboarding is complete. You're now live and can start accepting bookings!"]})]}),s.jsx("div",{className:"space-y-4",children:h.map((w,N)=>{const j=w.icon,_=w.disabled;return s.jsxs("div",{className:`flex items-start gap-4 p-4 rounded-lg border-2 transition-all ${w.completed?"bg-green-50 border-green-200":w.pending?"bg-yellow-50 border-yellow-200":_?"bg-gray-50 border-gray-200 opacity-60":"bg-white border-gray-200 hover:border-green-300"}`,children:[s.jsx("div",{className:"flex-shrink-0 mt-1",children:w.
576completed?s.jsx("div",{className:"w-10 h-10 bg-green-600 rounded-full flex items-center justify-center",children:s.jsx(os,{className:"w-6 h-6 text-white"})}):w.pending?s.jsx("div",{className:"w-10 h-10 bg-yellow-500 rounded-full flex items-center justify-center animate-pulse",children:s.jsx(W0,{className:"w-6 h-6 text-white"})}):s.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${_?"bg-gray-300":"bg-blue-100"}`,children:_?s.jsx(Ct,{className:"w-5 h-5 text-gray-600"}):s.jsx(j,{className:"w-5 h-5 text-blue-600"})})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsxs("h3",{className:"font-semibold text-lg",children:[N+1,". ",w.title]}),w.required&&s.jsx(ot,{variant:"outline",className:"text-xs",children:"Required"})]}),s.jsx("p",{className:"text-gray-600 text-sm mb-3",children:w.description}),w.completed?s.jsxs("div",{className:"flex items-center gap-2 text-green-700 text-sm font-medium",children:[s.jsx(os,{className:"w-4 h-4"}),"Completed"]}):w.pending?s.jsxs("div",{className:"flex items-center gap-2 text-yellow-700 text-sm font-medium",children:[s.jsx(fn,{className:"w-4 h-4"}),"Pending Admin Review"]}):w.action&&w.buttonText?s.jsx(G,{onClick:w.action,disabled:_,size:"sm",className:_?"":"bg-green-600 hover:bg-green-700",children:w.buttonText}):null,_&&s.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Complete previous steps to unlock"})]})]},w.id)})})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Quick Start Guide"})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"📋 Before You Begin"}),s.jsxs("ul",{className:"text-sm text-gray-700 space-y-1 ml-4",children:[s.jsx("li",{children:"• Have your business/bank account information ready"}),s.jsx("li",{children:"• Prepare 3-5 photos of your storage space"}),s.jsx("li",{children:"• Research competitive pricing in your area"}
576),s.jsx("li",{children:"• Review your storage capacity and available locker sizes"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"💡 Tips for Success"}),s.jsxs("ul",{className:"text-sm text-gray-700 space-y-1 ml-4",children:[s.jsx("li",{children:"• High-quality photos increase booking conversions by 40%"}),s.jsx("li",{children:"• Competitive pricing helps you get approved faster"}),s.jsx("li",{children:"• Clear access instructions reduce customer support needs"}),s.jsx("li",{children:"• Complete all steps within 24 hours for priority review"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"⏱️ Estimated Time"}),s.jsxs("ul",{className:"text-sm text-gray-700 space-y-1 ml-4",children:[s.jsx("li",{children:"• Agreement review: 5 minutes"}),s.jsx("li",{children:"• Stripe setup: 10 minutes"}),s.jsx("li",{children:"• Location details: 15 minutes"}),s.jsx("li",{children:"• Pricing configuration: 5 minutes"}),s.jsx("li",{children:"• Admin approval: 1-2 business days"})]})]})]})]})]})}function kX({userId:e}){const[t,n]=b.useState([]),[r,i]=b.useState({totalPaidOut:0,pendingPayout:0,nextPayoutDate:null,connectedAccounts:0}),[c,d]=b.useState(!0);b.useEffect(()=>{h()},[e]);const h=async()=>{try{const p=await X.entities.StorageLocation.filter({host_id:e},"-created_date",100);n(p);let g=0,w=0,N=0;p.forEach(j=>{g+=j.total_payouts||0,w+=j.pending_payout||0,j.stripe_account_id&&j.stripe_onboarding_complete&&N++}),i({totalPaidOut:g,pendingPayout:w,nextPayoutDate:w>0?m():null,connectedAccounts:N})}catch(p){console.error("Error loading payout data:",p)}finally{d(!1)}},m=()=>{const p=new Date;return p.setDate(p.getDate()+7),p.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})},x=async p=>{try{const{data:g}=await X.functions.invoke("stripeConnectStatus",{location_id:p});g.account_link?window.location.href=g.account_link:alert("Stripe account is fully connected!")}catch(g){console.error("Error checking Stripe status:",g),alert("Failed to check Stripe status")}};return c?s.jsx("div",{className:"text-center py-8",children:"Loading payout information..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Payout Method & Settings"}),s.jsx("p",{className:"text-gray-600",children:"Manage your bank account connections and view payout details"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(es,{className:"w-4 h-4 text-green-600"}),"Total Paid Out"]})}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:["$",r.totalPaidOut.toFixed(2)]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"All-time earnings"})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(Ci,{className:"w-4 h-4 text-blue-600"}),"Pending Payout"]})}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:["$",r.pendingPayout.toFixed(2)]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Awaiting transfer"})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(Ds,{className:"w-4 h-4 text-purple-600"}),"Next Payout"]})}),s.jsxs(me,{children:[s.jsx("div",{className:"text-sm font-bold text-purple-600",children:r.nextPayoutDate||"No pending payouts"}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Estimated date"})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(Jj,{className:"w-4 h-4 text-orange-600"}),"Connected Accounts"]})}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold text-orange-600",children:[r.connectedAccounts,"/",t.length]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:"Locations with Stripe"})]})]})]}),s.jsxs(en,{className:"bg-blue-50 border-blue-200",children:[s.jsx(fn,{className:"h-4 w-4 text-blue-600"}),s.jsxs(tn,{className:"text-blue-900",children:[s.jsx("strong",{children:"How Payouts Work:"})," Earnings are automatically transferred to your bank account 2-7 business days after each completed booking. Each location requires its own Stripe Connect account for secure payouts."]})]}),s.jsx("div",{className:"space-y-4",children:t.length===0?s.jsxs(oe,{className:"p-12 text-center",children:[s.jsx(Jj,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold mb-2",children:"No Locations Yet"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Add your first location to set up payouts"}),s.jsx(G,{className:"bg-green-600 hover:bg-green-700",children:"Add Location"})]}):t.map(p=>{var w;const g=p.stripe_account_id&&p.stripe_onboarding_complete;return p.pending_payout>0,s.jsxs(oe,{className:g?"border-green-200":"border-yellow-200",children:[s.jsx(Ce,{children:s.jsx("div",{className:"flex justify-between items-start",children:s.jsxs("div",{children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[p.title,g&&s.jsxs(ot,{className:"bg-green-100 text-green-800",children:[s.jsx(os,{className:"w-3 h-3 mr-1"}),"Connected"]})]}),s.jsx(kn,{children:p.address})]})})}),s.jsx(me,{className:"space-y-4",children:g?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bg-green-50 rounded-lg p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-green-800",children:[s.jsx(H0,{className:"w-5 h-5"}),s.jsx("span",{className:"font-semibold",children:"Stripe Account Connected"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-gray-600",children:"Account ID"}),s.jsx("div",{className:"font-mono text-xs",children:p.stripe_account_id})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-gray-600",children:"Status"}),s.jsx("div",{className:"font-medium text-green-700",children:"Active & Verified"})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 pt-3 border-t border-green-200",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Total Paid"}),s.jsxs("div",{className:"font-bold text-green-700",children:["$",(p.total_payouts||0).toFixed(2)]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Pending"}),s.jsxs("div",{className:"font-bold text-blue-600",children:["$",(p.pending_payout||0).toFixed(2)]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Payouts"}),s.jsx("div",{className:"font-bold",children:((w=p.payout_history)==null?void 0:w.length)||0})]})]})]}),s.jsxs(G,{variant:"outline",size:"sm",onClick:()=>x(p.id),className:"w-full",children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"View Stripe Dashboard"]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(en,{className:"bg-yellow-50 border-yellow-200",children:[s.jsx(fn,{className:"h-4 w-4 text-yellow-600"}),s.jsxs(tn,{className:"text-yellow-800",children:[s.jsx("strong",{children:"Setup Required:"}
576)," Connect your Stripe account to receive payouts for this location."]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"You'll need:"}),s.jsxs("ul",{className:"mt-2 space-y-1 ml-4",children:[s.jsx("li",{children:"• Business or personal bank account"}),s.jsx("li",{children:"• Tax ID (EIN or SSN)"}),s.jsx("li",{children:"• Government-issued ID"}),s.jsx("li",{children:"• Business information (if applicable)"})]})]}),s.jsx(AM,{location:p,onSuccess:h})]})]})})]},p.id)})}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Payout FAQs"})}),s.jsxs(me,{className:"space-y-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1",children:"When will I receive my payouts?"}),s.jsx("p",{className:"text-gray-700",children:"Payouts are processed automatically 2-7 business days after each completed booking."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1",children:"Why do I need a separate account per location?"}),s.jsx("p",{className:"text-gray-700",children:"Stripe Connect requires individual accounts for compliance and tax reporting. This also allows you to track earnings per location."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1",children:"What fees does Stripe charge?"}),s.jsx("p",{className:"text-gray-700",children:"Stripe fees are automatically deducted before payouts. You receive 85% of the booking total (15% platform fee covers all payment processing)."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1",children:"How do I update my bank account?"}),s.jsx("p",{className:"text-gray-700",children:'Click "View Stripe Dashboard" to access your Stripe account settings and update banking information.'})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1",children:"Need Help?"}),s.jsxs("p",{className:"text-gray-700",children:["Contact our partner support team at ",s.jsx("strong",{children:"[email protected]"})," for assistance with payouts."]})]})]})]})]})}function CX(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState({totalLocations:0,activeBookings:0,totalEarnings:0,pendingApprovals:0}),[c,d]=b.useState(!0),[h,m]=b.useState(!1);b.useEffect(()=>{x()},[]);const x=async()=>{try{const p=await X.auth.me();if(p.partner_status!=="approved"&&p.role!=="admin"){e("/partnerlanding");return}if(!p.partner_agreement_accepted&&p.role!=="admin"){e("/partneragreementaccept");return}n(p);const g=await X.entities.StorageLocation.filter({host_id:p.id},"-created_date",100),N=(await X.entities.Booking.list("-created_date",500)).filter(E=>g.some(D=>D.id===E.location_id)),j=N.filter(E=>E.status==="confirmed"||E.status==="pending"),C=N.filter(E=>E.status==="completed").reduce((E,D)=>E+(D.total_price||0),0),A=g.filter(E=>!E.pricing_approved&&E.pricing).length;i({totalLocations:g.length,activeBookings:j.length,totalEarnings:C,pendingApprovals:A});const M=!p.partner_agreement_accepted||g.length===0||!g.some(E=>E.stripe_onboarding_complete)||!g.some(E=>E.pricing_approved);m(M)}catch(p){console.error("Error loading data:",p)}finally{d(!1)}};return c?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-green-50 to-white",children:[s.jsx("div",{className:"bg-gradient-to-r from-green-600 to-green-700 text-white py-12 px-4 border-b-4 border-green-800",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold mb-2",children:"Partner Portal"}),s.jsxs("p",{className:"text-green-100 text-lg",children:["Welcome back, ",t==null?void 0:t.full_name,"!"]})]}),s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/d8246ce0d_image.png",alt:"Stow My Bags",className:"h-16"})]})})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-8",children:s.jsxs(Ql,{defaultValue:"dashboard",className:"space-y-6",children:[s.jsxs(Fo,{className:"grid w-full grid-cols-4 lg:grid-cols-8",children:[s.jsx(Bt,{value:"dashboard",children:"Dashboard"}),s.jsxs(Bt,{value:"onboarding",children:["Onboarding",h&&s.jsx("span",{className:"ml-1 w-2 h-2 bg-red-600 rounded-full"})]}),s.jsx(Bt,{value:"lockers",children:"Lockers"}),s.jsx(Bt,{value:"locations",children:"Locations"}),s.jsx(Bt,{value:"bookings",children:"Bookings"}),s.jsx(Bt,{value:"payouts",children:"Payouts"}),s.jsx(Bt,{value:"earnings",children:"Earnings"}),s.jsx(Bt,{value:"checkin",children:"Check-In"})]}),s.jsx(zt,{value:"onboarding",children:s.jsx(SX,{user:t,onComplete:x})}),s.jsx(zt,{value:"lockers",children:s.jsx(gX,{userId:t==null?void 0:t.id})}),s.jsx(zt,{value:"payouts",children:s.jsx(kX,{userId:t==null?void 0:t.id})}),s.jsxs(zt,{value:"dashboard",className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Total Locations"}),s.jsx(jt,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsx("div",{className:"text-2xl font-bold",children:r.totalLocations}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Storage locations"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Active Bookings"}),s.jsx(Ut,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsx("div",{className:"text-2xl font-bold",children:r.activeBookings}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Current reservations"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Total Earnings"}),s.jsx(es,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",r.totalEarnings.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"From completed bookings"})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(Pe,{className:"text-sm font-medium",children:"Pending Approvals"}),s.jsx(Ci,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(me,{children:[s.jsx("div",{className:"text-2xl font-bold",children:r.pendingApprovals}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Pricing awaiting review"})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Getting Started"})}),s.jsxs(me,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-green-600 font-semibold",children:"1"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold",children:"Add Your Location"}),s.jsx("p",{className:"text-sm text-gray-600",children:'Go to "My Locations" tab and add your storage space with photos and details.'})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-green-600 font-semibold",children:"2"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold",children:"Set Your Pricing"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Configure custom rates for different bag types based on your market demand."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-green-600 font-semibold",children:"3"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold",children:"Start Accepting Bookings"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Once approved, your location will be visible to travelers and start earning."})]})]})]})]})]}),s.jsx(zt,{value:"locations",children:s.jsx(fX,{userId:t==null?void 0:t.id,onUpdate:x})}),s.jsx(zt,{value:"bookings",children:s.jsx(mX,{userId:t==null?void 0:t.id})}),s.jsx(zt,{value:"earnings",children:s.jsx(pX,{userId:t==null?void 0:t.id})}),s.jsx(zt,{value:"checkin",children:s.jsx(EM,{})})]})})]})}function PX(){const[e,t]=b.useState("customer"),n=[{icon:s.jsx(G0,{className:"w-8 h-8 text-blue-600"}),title:"Smart Search",description:"Find nearby luggage storage locations with real-time availability"},{icon:s.jsx(jt,{className:"w-8 h-8 text-green-600"}),title:"Multiple Locations",description:"Access storage at airports, hotels, and partner locations across cities"},{icon:s.jsx(Ts,{className:"w-8 h-8 text-purple-600"}),title:"Flexible Timing",description:"Book storage for hours, days, or longer - choose what works for you"},{icon:s.jsx(So,{className:"w-8 h-8 text-orange-600"}),title:"Delivery Options",description:"Self drop-off or schedule Uber pickup for convenient luggage handling"},{icon:s.jsx(Tn,{className:"w-8 h-8 text-red-600"}),title:"Full Insurance",description:"Every bag is insured up to full value for complete peace of mind"},{icon:s.jsx(H0,{className:"w-8 h-8 text-indigo-600"}),title:"Easy Payment",description:"Secure checkout with Stripe - pay only when you book"},{icon:s.jsx(Yn,{className:"w-8 h-8 text-yellow-600"}),title:"Rated & Reviewed",description:"See reviews and ratings from other travelers before booking"},{icon:s.jsx(fn,{className:"w-8 h-8 text-cyan-600"}),title:"Real-time Updates",description:"Get notifications for check-in, pickups, and delivery status"}],r=[{icon:s.jsx(Ci,{className:"w-8 h-8 text-blue-600"}
576),title:"Passive Income",description:"Monetize unused space in your business or property"},{icon:s.jsx(eg,{className:"w-8 h-8 text-green-600"}),title:"Business Dashboard",description:"Track bookings, earnings, and occupancy rates in real-time"},{icon:s.jsx(ng,{className:"w-8 h-8 text-purple-600"}),title:"Customer Management",description:"View bookings, manage check-ins, and track customer reviews"},{icon:s.jsx(Ut,{className:"w-8 h-8 text-orange-600"}),title:"Flexible Pricing",description:"Set your own rates for different bag types and storage sizes"},{icon:s.jsx(Ct,{className:"w-8 h-8 text-red-600"}),title:"Secure Operations",description:"Digital access codes, CCTV, and insurance coverage included"},{icon:s.jsx(So,{className:"w-8 h-8 text-indigo-600"}),title:"Uber Integration",description:"Auto-dispatch luggage pickups and deliveries through Uber"},{icon:s.jsx(Tn,{className:"w-8 h-8 text-yellow-600"}),title:"Protection & Support",description:"We handle insurance claims and customer support for you"},{icon:s.jsx(Ts,{className:"w-8 h-8 text-cyan-600"}),title:"24/7 Access",description:"Enable round-the-clock access to maximize your earnings"}];return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-slate-900 text-white",children:[s.jsx("div",{className:"bg-black/50 backdrop-blur-sm border-b border-blue-500/20",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-12",children:[s.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Stow My Bags Platform"}),s.jsx("p",{className:"text-xl text-gray-300",children:"Seamless luggage storage for travelers and partners"})]})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-12",children:s.jsxs(Ql,{value:e,onValueChange:t,className:"w-full",children:[s.jsxs(Fo,{className:"grid w-full max-w-md grid-cols-2 mb-8 bg-slate-800/50 border border-blue-500/20",children:[s.jsx(Bt,{value:"customer",className:"text-lg",children:"For Customers"}),s.jsx(Bt,{value:"partner",className:"text-lg",children:"For Partners"})]}),s.jsx(zt,{value:"customer",children:s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"bg-blue-600/10 border border-blue-500/30 rounded-lg p-8 mb-8",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Travel Without Baggage Stress"}),s.jsx("p",{className:"text-lg text-gray-300",children:"Whether you're arriving early or staying late, Stow My Bags keeps your luggage safe while you explore."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map((i,c)=>s.jsxs(oe,{className:"bg-slate-800/50 border-blue-500/20 hover:border-blue-500/50 transition-all",children:[s.jsxs(Ce,{children:[s.jsx("div",{className:"mb-4",children:i.icon}),s.jsx(Pe,{className:"text-white",children:i.title})]}),s.jsx(me,{children:s.jsx("p",{className:"text-gray-300",children:i.description})})]},c))}),s.jsxs("div",{className:"bg-green-600/10 border border-green-500/30 rounded-lg p-8 mt-12",children:[s.jsx("h3",{className:"text-2xl font-bold mb-6",children:"How It Works"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[{step:"1",title:"Search",desc:"Find nearby storage locations"}
vendor: 8,660 bytes, line 576
576,{step:"2",title:"Book",desc:"Choose your dates and bag types"},{step:"3",title:"Store",desc:"Drop off or schedule pickup"},{step:"4",title:"Retrieve",desc:"Pick up whenever you need"}].map((i,c)=>s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"bg-green-600 rounded-full w-12 h-12 flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:i.step}),s.jsx("h4",{className:"font-semibold mb-2",children:i.title}),s.jsx("p",{className:"text-sm text-gray-300",children:i.desc})]},c))})]})]})}),s.jsx(zt,{value:"partner",children:s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"bg-purple-600/10 border border-purple-500/30 rounded-lg p-8 mb-8",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Grow Your Business Revenue"}),s.jsx("p",{className:"text-lg text-gray-300",children:"Turn unused space into a reliable income stream with our all-in-one partner platform."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:r.map((i,c)=>s.jsxs(oe,{className:"bg-slate-800/50 border-purple-500/20 hover:border-purple-500/50 transition-all",children:[s.jsxs(Ce,{children:[s.jsx("div",{className:"mb-4",children:i.icon}),s.jsx(Pe,{className:"text-white",children:i.title})]}),s.jsx(me,{children:s.jsx("p",{className:"text-gray-300",children:i.description})})]},c))}),s.jsxs("div",{className:"bg-orange-600/10 border border-orange-500/30 rounded-lg p-8 mt-12",children:[s.jsx("h3",{className:"text-2xl font-bold mb-6",children:"Why Partner With Us"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-lg",children:"✓ Zero Setup Costs"}),s.jsx("p",{className:"text-gray-300",children:"No upfront investment required to get started"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-lg",children:"✓ We Handle Everything"}),s.jsx("p",{className:"text-gray-300",children:"Customer support, insurance, payments - all managed"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-lg",children:"✓ Flexible Operations"}),s.jsx("p",{className:"text-gray-300",children:"Set your own hours, rates, and availability"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-lg",children:"✓ Growth Opportunities"}),s.jsx("p",{className:"text-gray-300",children:"Scale your business with our network"})]})]})]})]})})]})}),s.jsx("div",{className:"bg-black/50 border-t border-blue-500/20 mt-20",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-12 text-center text-gray-400",children:s.jsx("p",{children:"© 2024 Stow My Bags. Secure luggage storage wherever you go."})})})]})}function TX(){return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-3xl font-bold text-center",children:"Privacy Policy"}),s.jsx("p",{className:"text-center text-gray-600 mt-2",children:"Last Updated: January 20, 2026"})]}),s.jsxs(me,{className:"prose prose-sm max-w-none space-y-6",children:[s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"1. Introduction"}),s.jsx("p",{children:'Stow My Bags ("we", "our", or "us") respects your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our luggage storage marketplace service.'})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"2. Information We Collect"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.1 Personal Information"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Name, email address, phone number"}),s.jsx("li",{children:"Payment information (processed securely by Stripe)"}),s.jsx("li",{children:"Profile photo (optional)"}),s.jsx("li",{children:"Government-issued ID (for identity verification)"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.2 Booking Information"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Storage dates, locations, and duration"}),s.jsx("li",{children:"Number and type of bags stored"}),s.jsx("li",{children:"Photos of stored items (for security and verification)"}),s.jsx("li",{children:"Delivery addresses (if applicable)"}),s.jsx("li",{children:"Special requests and communication with Partners"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.3 Location Data"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"GPS coordinates when searching for nearby storage locations"}),s.jsx("li",{children:"IP address and general location information"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.4 Usage Data"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Device information (browser type, operating system)"}),s.jsx("li",{children:"Pages visited, time spent on site, click patterns"}),s.jsx("li",{children:"Referral source and search terms"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"2.5 Communications"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Messages between Users and Partners"}),s.jsx("li",{children:"Customer support interactions"}),s.jsx("li",{children:"Reviews and ratings"})]})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"3. How We Use Your Information"}),s.jsx("p",{children:"We use collected information to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Facilitate bookings and connect Users with Partners"}),s.jsx("li",{children:"Process payments and prevent fraud"}),s.jsx("li",{children:"Send booking confirmations, reminders, and pickup notifications"}),s.jsx("li",{children:"Provide customer support and respond to inquiries"}),s.jsx("li",{children:"Improve our services through analytics and user feedback"}),s.jsx("li",{children:"Send marketing communications (with your consent)"}),s.jsx("li",{children:"Comply with legal obligations and enforce our Terms"}),s.jsx("li",{children:"Coordinate delivery services through Uber and other logistics partners"})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"4. Information Sharing"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.1 With Storage Partners"}),s.jsx("p",{children:"We share your name, phone number, booking details, and bag photos with the Partner hosting your storage to facilitate the service."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.2 With Service Providers"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Stripe:"})," Payment processing (subject to Stripe's Privacy Policy)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Uber:"})," Delivery logistics (subject to Uber's Privacy Policy)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Email providers:"})," Transactional and marketing emails"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Analytics platforms:"})," Service improvement and usage insights"]})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.3 Legal Requirements"}),s.jsx("p",{children:"We may disclose information when required by law, to protect our rights, prevent fraud, or ensure safety."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"4.4 Business Transfers"}),s.jsx("p",{children:"In the event of a merger, acquisition, or sale of assets, your information may be transferred to the acquiring entity."})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"5. Data Security"}),s.jsx("p",{children:"We implement industry-standard security measures including:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Encryption of data in transit and at rest"}),s.jsx("li",{children:"Secure payment processing through PCI-compliant providers"}),s.jsx("li",{children:"Regular security audits and vulnerability assessments"}),s.jsx("li",{children:"Access controls and employee training"}
576),s.jsx("li",{children:"Automatic logout after periods of inactivity"})]}),s.jsx("p",{className:"mt-2",children:"However, no method of transmission over the Internet is 100% secure. We cannot guarantee absolute security but continuously work to protect your data."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"6. Data Retention"}),s.jsx("p",{children:"We retain personal information for as long as necessary to provide services and comply with legal obligations:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Account data:"})," Until account deletion or 5 years of inactivity"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Booking records:"})," 7 years (for tax and legal purposes)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Payment information:"})," Retained by Stripe per their policies"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Communication logs:"})," 3 years"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Marketing data:"})," Until you unsubscribe"]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"7. Your Privacy Rights"}),s.jsx("p",{children:"You have the right to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Access:"})," Request a copy of your personal data"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Correction:"})," Update inaccurate or incomplete information"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Deletion:"})," Request deletion of your data (subject to legal obligations)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Portability:"})," Receive your data in a structured, machine-readable format"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Opt-out:"})," Unsubscribe from marketing emails at any time"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Object:"})," Object to processing based on legitimate interests"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Withdraw consent:"})," Where we rely on consent, you may withdraw it"]})]}),s.jsx("p",{className:"mt-2",children:"To exercise these rights, contact us at [email protected]. We will respond within 30 days."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"8. Cookies and Tracking"}),s.jsx("p",{children:"We use cookies and similar technologies to:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Remember your preferences and settings"}),s.jsx("li",{children:"Analyze site traffic and user behavior"}),s.jsx("li",{children:"Personalize content and advertisements"}),s.jsx("li",{children:"Prevent fraud and improve security"})]}),s.jsx("p",{className:"mt-2",children:"You can control cookies through your browser settings. Note that disabling cookies may limit functionality."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"9. Third-Party Links"}),s.jsx("p",{children:"Our service may contain links to third-party websites (e.g., Uber, partner websites). We are not responsible for their privacy practices. Please review their privacy policies before providing personal information."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"10. Children's Privacy"}),s.jsx("p",{children:"Our services are not intended for users under 18. We do not knowingly collect data from minors. If we discover we have collected such data, we will delete it immediately."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"11. International Data Transfers"}),s.jsx("p",{children:"Your information may be transferred to and processed in countries other than your own. We ensure adequate safeguards are in place for international transfers, including Standard Contractual Clauses."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"12. California Privacy Rights (CCPA)"}),s.jsx("p",{children:"California residents have additional rights under the CCPA, including:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Right to know what personal information is collected"}),s.jsx("li",{children:"Right to know if personal information is sold or disclosed"}),s.jsx("li",{children:"Right to opt-out of the sale of personal information"}),s.jsx("li",{children:"Right to non-discrimination for exercising privacy rights"})]}),s.jsxs("p",{className:"mt-2",children:[s.jsx("strong",{children:"Note:"})," We do not sell personal information."]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"13. Changes to This Policy"}),s.jsx("p",{children:"We may update this Privacy Policy periodically. We will notify you of material changes via email or prominent notice on our website. Continued use after changes constitutes acceptance."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"14. Contact Us"}),s.jsxs("p",{children:["For privacy-related questions or to exercise your rights:",s.jsx("br",{}),s.jsx("strong",{children:"Email:"})," [email protected]",s.jsx("br",{}),s.jsx("strong",{children:"Phone:"})," 1-800-STOW-BAG",s.jsx("br",{}),s.jsx("strong",{children:"Mail:"})," Stow My Bags, 123 Storage Street, Suite 100, Wilmington, DE 19801"]})]}),s.jsx("div",{className:"mt-8 p-4 bg-green-50 rounded-lg",children:s.jsxs("p",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"Your Privacy Matters:"})," We are committed to transparency and protecting your data. If you have concerns or questions about how we handle your information, please don't hesitate to reach out. We're here to help."]})})]})]})})})}function EX(){const[e,t]=b.useState(null),[n,r]=b.useState(null),[i,c]=b.useState(0),[d,h]=b.useState(""),[m,x]=b.useState(!0),[p,g]=b.useState(!1),[w,N]=b.useState(null),j=br();b.useEffect(()=>{_()},[]);const _=async()=>{try{const M=new URLSearchParams(window.location.search).get("booking_id");if(!M){N("No booking found"),x(!1);return}const E=await X.entities.Booking.filter({id:M});if(E.length===0){N("Booking not found"),x(!1);return}const D=E[0];t(D);const I=await X.entities.StorageLocation.filter({id:D.location_id});I.length>0&&r(I[0]),x(!1)}catch{N("Error loading booking"),x(!1)}},C=async A=>
576{if(A.preventDefault(),i===0){N("Please select a rating");return}g(!0);try{await X.entities.Review.create({location_id:e.location_id,booking_id:e.id,guest_id:e.guest_id,guest_name:e.guest_name,rating:i,comment:d}),j("/?review_submitted=true")}catch{N("Error submitting review"),g(!1)}};return m?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsx("p",{children:"Loading..."})}):w?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsxs(oe,{className:"w-96",children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Error"})}),s.jsxs(me,{children:[s.jsx("p",{className:"text-red-600",children:w}),s.jsx(G,{onClick:()=>j("/"),className:"mt-4",children:"Go Home"})]})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{children:"Leave a Review"}),n&&s.jsx("p",{className:"text-sm text-gray-600 mt-2",children:n.title})]}),s.jsx(me,{children:s.jsxs("form",{onSubmit:C,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-3",children:"How was your experience?"}),s.jsx("div",{className:"flex gap-3",children:[1,2,3,4,5].map(A=>s.jsx("button",{type:"button",onClick:()=>c(A),className:"focus:outline-none transition-transform hover:scale-110",children:s.jsx(Yn,{className:`w-8 h-8 ${A<=i?"fill-yellow-400 text-yellow-400":"text-gray-300"}`})},A))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Share your feedback (optional)"}),s.jsx(Os,{placeholder:"Tell us what you thought about our service...",value:d,onChange:A=>h(A.target.value),className:"h-32"})]}),s.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Booking Details"}),s.jsxs("div",{className:"text-sm space-y-1 text-gray-600",children:[s.jsxs("p",{children:["Pickup: ",e.pickup_number]}),s.jsxs("p",{children:["Stored: ",new Date(e.start_date).toLocaleDateString()," - ",new Date(e.end_date).toLocaleDateString()]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"submit",disabled:p,className:"flex-1",children:p?"Submitting...":"Submit Review"}),s.jsx(G,{type:"button",variant:"outline",onClick:()=>j("/"),className:"flex-1",children:"Skip"})]})]})})]})})})}function VM({location:e,lockers:t,onClose:n,guestMode:r=!1}){const[i,c]=b.useState(null),[d,h]=b.useState({start_date:"",end_date:"",locker_size:"",guest_name:"",guest_phone:"",delivery_requested:!1,delivery_type:"delivery",delivery_address:"",delivery_date:"",delivery_time:""}),[m,x]=b.useState(!1),[p,g]=b.useState(""),[w,N]=b.useState(0),[j,_]=b.useState(!1);b.useEffect(()=>{C()},[]);const C=async()=>{if(r){c(null);return}try{const Q=await X.auth.me();c(Q),h(J=>({...J,guest_name:Q.full_name||""}))}catch{console.error("User not authenticated"),c(null)}},A={small:t.filter(Q=>Q.locker_size==="small"),medium:t.filter(Q=>Q.locker_size==="medium"),large:t.filter(Q=>Q.locker_size==="large"),xl:t.filter(Q=>Q.locker_size==="xl"),combo:[...t.filter(Q=>Q.locker_size==="small"),...t.filter(Q=>Q.locker_size==="medium")]},M=d.locker_size?A[d.locker_size]:[],E=M[0],D=Q=>{var J;return Q==="combo"?15:((J=M[0])==null?void 0:J.price_per_day)||0},I=()=>{if(!d.start_date||!d.end_date||!d.locker_size)return 0;const Q=new Date(d.start_date),J=new Date(d.end_date);let le=Math.ceil((J-Q)/(1e3*60*60*24));le<1&&(le=1);const Me=D(d.locker_size)*le,ke=Me*.15,He=d.delivery_requested?w:0;return Me+ke+He};b.useEffect(()=>{d.delivery_requested&&d.delivery_address?z():N(0)},[d.delivery_requested,d.delivery_address,d.delivery_type]);const z=async()=>{_(!0);try{const Q=d.delivery_type==="pickup"?d.delivery_address:e.address,J=d.delivery_type==="delivery"?d.delivery_address:e.address,{data:le}=await X.functions.invoke("getDynamicDeliveryPrice",{pickup_address:Q,dropoff_address:J,booking_type:d.delivery_type});N(le.suggested_customer_fee||25)}catch(Q){console.error("Failed to fetch delivery price:",Q),N(25)}finally{_(!1)}},H=async Q=>{if(Q.preventDefault(),g(""),console.log("Form submitted"),!E){g("Please select a locker size");return}x(!0),console.log("Starting checkout process...");try{const J=Math.random().toString(36).substring(2,8).toUpperCase(),le=Math.random().toString(36).substring(2,10).toUpperCase(),xe=await X.entities.Booking.create({location_id:e.id,guest_id:(i==null?void 0:i.id)||null,start_date:d.start_date,end_date:d.end_date,number_of_units:1,total_price:I(),status:"pending",guest_name:d.guest_name,guest_phone:d.guest_phone,door_code:J,access_code:le,access_instructions:`Door Code: ${J} | Locker Code: ${le}`,payment_status:"pending",delivery_requested:d.delivery_requested,delivery_address:d.delivery_requested?d.delivery_address:null,delivery_time:d.delivery_requested?`${d.delivery_date} ${d.delivery_time}`:null,delivery_fee:d.delivery_requested?w:0});await X.entities.StowNGoLocker.update(E.id,{status:"reserved",current_booking_id:xe.id,door_code:J,lock_code:le,access_logs:[...E.access_logs||[],{timestamp:new Date().toISOString(),booking_id:xe.id,action:"reserved",performed_by:(i==null?void 0:i.id)||"guest"}]});const Me={small:"carry_on",medium:"checked_bag",large:"oversized",xl:"xl_locker",combo:"combo"},ke={booking:{start_date:d.start_date,end_date:d.end_date,number_of_units:1,guest_name:d.guest_name,guest_phone:d.guest_phone,guest_email:d.guest_name.toLowerCase().replace(/\s+/g,"")+"@guest.com",bag_type:Me[d.locker_size],pickup_requested:d.delivery_requested&&d.delivery_type==="pickup",pickup_address:d.delivery_requested&&d.delivery_type==="pickup"?d.delivery_address:"",pickup_time:d.delivery_requested&&d.delivery_type==="pickup"?`${d.delivery_date} ${d.delivery_time}`:"",delivery_requested:d.delivery_requested&&d.delivery_type==="delivery",delivery_address:d.delivery_requested&&d.delivery_type==="delivery"?d.delivery_address:"",delivery_time:d.delivery_requested&&d.delivery_type==="delivery"?`${d.delivery_date} ${d.delivery_time}`:"",special_requests:""},location:{id:e.id,stripe_account_id:e.stripe_account_id||null,stripe_onboarding_complete:e.stripe_onboarding_complete||!1}};console.log("Checkout payload:",ke);const{data:He}=await X.functions.invoke("createCheckout",ke);if(console.log("Checkout response:",He),He!=null&&He.url){if(console.log("Redirecting to:",He.url),window.self!==window.top){alert("Payment checkout is not available in preview mode. Please access this from your published app URL."),g("Checkout only works from published app");return}window.location.href=He.url}else throw new Error("No checkout URL received")}catch(J){console.error("Booking error:",J),g(J.message||"Failed to create booking")}finally{x(!1)}},V=I();return s.jsx(Na,{open:!0,onOpenChange:n,children:s.jsxs(Ai,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Mi,{children:[s.jsx(Ri,{className:"text-2xl",children:"Book Stow-N-Go Locker"}),s.jsxs("p",{className:"text-gray-600",children:[e.title," - ",e.city]})]}),s.jsxs("form",{onSubmit:H,className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Check-in Date"}),s.jsx(de,{type:"date",value:d.start_date,onChange:Q=>h({...d,start_date:Q.target.value}),min:new Date().toISOString().split("T")[0],required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Check-out Date"}),s.jsx(de,{type:"date",value:d.end_date,onChange:Q=>h({...d,end_date:Q.target.value}),min:d.start_date||new Date().toISOString().split("T")[0],required:!0})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Locker Size"}),s.jsxs(ts,{value:d.locker_size,onValueChange:Q=>h({...d,locker_size:Q}),children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"Select locker size"})}),s.jsx(Gt,{children:Object.entries(A).map(([Q,J])=>{if(J.length===0)return null;const le=Q==="combo"?15:J[0].price_per_day,xe=Q==="combo"?"Combo (1 Carry-On + 1 Checked)":Q.charAt(0).toUpperCase()+Q.slice(1);return s.jsxs(Ge,{value:Q,children:[xe," - $",le,"/day (",Q==="combo"?"Available":`${J.length} available`,")"]},Q)})})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Full Name"}),s.jsx(de,{value:d.guest_name,onChange:Q=>h({...d,guest_name:Q.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Phone Number"}),s.jsx(de,{type:"tel",value:d.guest_phone,onChange:Q=>h({...d,guest_phone:Q.target.value}),required:!0})]})]}),s.jsxs("div",{className:"border-2 border-blue-200 rounded-lg p-4 bg-blue-50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(So,{className:"w-5 h-5 text-blue-600"}),s.jsxs("div",{children:[s.jsx(te,{className:"text-base font-semibold",children:"Add Uber Direct Service"}),s.jsx("p",{className:"text-xs text-gray-600",children:"Professional pickup or delivery service"})]})]}),s.jsx(Zw,{checked:d.delivery_requested,onCheckedChange:Q=>h({...d,delivery_requested:Q})})]}
576),d.delivery_requested&&s.jsxs("div",{className:"space-y-4 mt-4 pt-4 border-t border-blue-200",children:[s.jsxs("div",{children:[s.jsx(te,{className:"mb-2 block",children:"Service Type"}),s.jsxs(aw,{value:d.delivery_type,onValueChange:Q=>h({...d,delivery_type:Q}),className:"flex gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Dh,{value:"pickup",id:"pickup"}),s.jsx(te,{htmlFor:"pickup",className:"font-normal cursor-pointer",children:"Pickup from my location"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Dh,{value:"delivery",id:"delivery"}),s.jsx(te,{htmlFor:"delivery",className:"font-normal cursor-pointer",children:"Deliver to my location"})]})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-1",children:d.delivery_type==="pickup"?"We will pick up your bags from your location and store them":"We will deliver your bags from storage to your location"})]}),s.jsxs("div",{children:[s.jsx(te,{children:d.delivery_type==="pickup"?"Pickup Address":"Delivery Address"}),s.jsx(de,{placeholder:"Enter full address (e.g., hotel, airport, vacation rental)",value:d.delivery_address,onChange:Q=>h({...d,delivery_address:Q.target.value}),required:d.delivery_requested})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Preferred Date"}),s.jsx(de,{type:"date",value:d.delivery_date,onChange:Q=>h({...d,delivery_date:Q.target.value}),min:d.start_date||new Date().toISOString().split("T")[0],required:d.delivery_requested})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Preferred Time"}),s.jsx(de,{type:"time",value:d.delivery_time,onChange:Q=>h({...d,delivery_time:Q.target.value}),required:d.delivery_requested})]})]}),j?s.jsxs(en,{children:[s.jsx(fn,{className:"h-4 w-4"}),s.jsx(tn,{children:"Calculating delivery price..."})]}):w>0&&s.jsxs(en,{className:"bg-green-50 border-green-200",children:[s.jsx(es,{className:"h-4 w-4 text-green-600"}),s.jsxs(tn,{className:"text-green-700",children:["Estimated ",d.delivery_type," fee: ",s.jsxs("strong",{children:["$",w.toFixed(2)]})]})]})]})]}),s.jsxs(en,{children:[s.jsx(Ct,{className:"h-4 w-4"}),s.jsx(tn,{children:"You'll receive instant access codes via email after payment. Access codes work 24/7 with no staff needed."})]}),V>0&&s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 space-y-2",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Locker Rental"}),s.jsxs("span",{children:["$",((V-w)/1.15).toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm text-gray-600",children:[s.jsx("span",{children:"Platform Fee (15%)"}),s.jsxs("span",{children:["$",((V-w)*.15/1.15).toFixed(2)]})]}),d.delivery_requested&&w>0&&s.jsxs("div",{className:"flex justify-between text-blue-600",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(So,{className:"w-4 h-4"}),"Uber Direct ",d.delivery_type==="pickup"?"Pickup":"Delivery"]}),s.jsxs("span",{children:["$",w.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between font-bold text-lg pt-2 border-t",children:[s.jsx("span",{children:"Total"}),s.jsxs("span",{children:["$",V.toFixed(2)]})]})]}),p&&s.jsxs(en,{variant:"destructive",children:[s.jsx(fn,{className:"h-4 w-4"}),s.jsx(tn,{children:p})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{type:"button",variant:"outline",onClick:n,className:"flex-1",children:"Cancel"}),s.jsx(G,{type:"submit",disabled:m||!d.locker_size||V===0,className:"flex-1 bg-blue-600 hover:bg-blue-700",children:m?"Processing...":"Proceed to Payment"})]})]})]})})}function WM(e,t){const n=b.useRef(t);b.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const AX=1;function MX(e){return Object.freeze({__version:AX,map:e})}function RX(e,t){return Object.freeze({...e,...t})}const HM=b.createContext(null),YM=HM.Provider;function qM(){const e=b.useContext(HM);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function LX(e){function t(n,r){const{instance:i,context:c}=e(n).current;return b.useImperativeHandle(r,()=>i),n.children==null?null:Et.createElement(YM,{value:c},n.children)}return b.forwardRef(t)}function DX(e){function t(n,r){const[i,c]=b.useState(!1),{instance:d}=e(n,c).current;b.useImperativeHandle(r,()=>d),b.useEffect(function(){i&&d.update()},[d,i,n.children]);const h=d._contentNode;return h?Id.createPortal(n.children,h):null}return b.forwardRef(t)}function OX(e){function t(n,r){const{instance:i}=e(n).current;return b.useImperativeHandle(r,()=>i),null}return b.forwardRef(t)}function GM(e,t){const n=b.useRef();b.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function Jw(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}
576:e}function IX(e,t){return function(r,i){const c=qM(),d=e(Jw(r,c),c);return WM(c.map,r.attribution),GM(d.current,r.eventHandlers),t(d.current,c,r,i),d}}var mh={exports:{}};/* @preserve
577 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
578 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
579 */var FX=mh.exports,ik;function BX(){return ik||(ik=1,(function(e,t){(function(n,r){r(t)})(FX,(function(n){var r="1.9.4";function i(o){var u,y,S,T;for(y=1,S=arguments.length;y<S;y++){T=arguments[y];for(u in T)o[u]=T[u]}return o}var c=Object.create||(function(){function o(){}return function(u){return o.prototype=u,new o}})();function d(o,u){var y=Array.prototype.slice;if(o.bind)return o.bind.apply(o,y.call(arguments,1));var S=y.call(arguments,2);return function(){return o.apply(u,S.length?S.concat(y.call(arguments)):arguments)}}var h=0;function m(o){return"_leaflet_id"in o||(o._leaflet_id=++h),o._leaflet_id}function x(o,u,y){var S,T,O,$;return $=function(){S=!1,T&&(O.apply(y,T),T=!1)},O=function(){S?T=arguments:(o.apply(y,arguments),setTimeout($,u),S=!0)},O}function p(o,u,y){var S=u[1],T=u[0],O=S-T;return o===S&&y?o:((o-T)%O+O)%O+T}function g(){return!1}function w(o,u){if(u===!1)return o;var y=Math.pow(10,u===void 0?6:u);return Math.round(o*y)/y}function N(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function j(o){return N(o).split(/\s+/)}function _(o,u){Object.prototype.hasOwnProperty.call(o,"options")||(o.options=o.options?c(o.options):{});for(var y in u)o.options[y]=u[y];return o.options}function C(o,u,y){var S=[];for(var T in o)S.push(encodeURIComponent(y?T.toUpperCase():T)+"="+encodeURIComponent(o[T]));return(!u||u.indexOf("?")===-1?"?":"&")+S.join("&")}var A=/\{ *([\w_ -]+) *\}/g;function M(o,u){return o.replace(A,function(y,S){var T=u[S];if(T===void 0)throw new Error("No value provided for variable "+y);return typeof T=="function"&&(T=T(u)),T})}var E=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function D(o,u){for(var y=0;y<o.length;y++)if(o[y]===u)return y;return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function z(o){return window["webkit"+o]||window["moz"+o]||window["ms"+o]}var H=0;function V(o){var u=+new Date,y=Math.max(0,16-(u-H));return H=u+y,window.setTimeout(o,y)}var Q=window.requestAnimationFrame||z("RequestAnimationFrame")||V,J=window.cancelAnimationFrame||z("CancelAnimationFrame")||z("CancelRequestAnimationFrame")||function(o){window.clearTimeout(o)};function le(o,u,y){if(y&&Q===V)o.call(u);else return Q.call(window,d(o,u))}function xe(o){o&&J.call(window,o)}var Me={__proto__:null,extend:i,create:c,bind:d,get lastId(){return h},stamp:m,throttle:x,wrapNum:p,falseFn:g,formatNum:w,trim:N,splitWords:j,setOptions:_,getParamString:C,template:M,isArray:E,indexOf:D,emptyImageUrl:I,requestFn:Q,cancelFn:J,requestAnimFrame:le,cancelAnimFrame:xe};function ke(){}ke.extend=function(o){var u=function(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},y=u.__super__=this.prototype,S=c(y);S.constructor=u,u.prototype=S;for(var T in this)Object.prototype.hasOwnProperty.call(this,T)&&T!=="prototype"&&T!=="__super__"&&(u[T]=this[T]);return o.statics&&i(u,o.statics),o.includes&&(He(o.includes),i.apply(null,[S].concat(o.includes))),i(S,o),delete S.statics,delete S.includes,S.options&&(S.options=y.options?c(y.options):{},i(S.options,o.options)),S._initHooks=[],S.callInitHooks=function(){if(!this._initHooksCalled){y.callInitHooks&&y.callInitHooks.call(this),this._initHooksCalled=!0;for(var O=0,$=S._initHooks.length;O<$;O++)S._initHooks[O].call(this)}},u},ke.include=function(o){var u=this.prototype.options;return i(this.prototype,o),o.options&&(this.prototype.options=u,this.mergeOptions(o.options)),this},ke.mergeOptions=function(o){return i(this.prototype.options,o),this},ke.addInitHook=function(o){var u=Array.prototype.slice.call(arguments,1),y=typeof o=="function"?o:function(){this[o].apply(this,u)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(y),this};function He(o){if(!(typeof L>"u"||!L||!L.Mixin)){o=E(o)?o:[o];for(var u=0;u<o.length;
579u++)o[u]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var ye={on:function(o,u,y){if(typeof o=="object")for(var S in o)this._on(S,o[S],u);else{o=j(o);for(var T=0,O=o.length;T<O;T++)this._on(o[T],u,y)}return this},off:function(o,u,y){if(!arguments.length)delete this._events;else if(typeof o=="object")for(var S in o)this._off(S,o[S],u);else{o=j(o);for(var T=arguments.length===1,O=0,$=o.length;O<$;O++)T?this._off(o[O]):this._off(o[O],u,y)}return this},_on:function(o,u,y,S){if(typeof u!="function"){console.warn("wrong listener type: "+typeof u);return}if(this._listens(o,u,y)===!1){y===this&&(y=void 0);var T={fn:u,ctx:y};S&&(T.once=!0),this._events=this._events||{},this._events[o]=this._events[o]||[],this._events[o].push(T)}},_off:function(o,u,y){var S,T,O;if(this._events&&(S=this._events[o],!!S)){if(arguments.length===1){if(this._firingCount)for(T=0,O=S.length;T<O;T++)S[T].fn=g;delete this._events[o];return}if(typeof u!="function"){console.warn("wrong listener type: "+typeof u);return}var $=this._listens(o,u,y);if($!==!1){var Z=S[$];this._firingCount&&(Z.fn=g,this._events[o]=S=S.slice()),S.splice($,1)}}},fire:function(o,u,y){if(!this.listens(o,y))return this;var S=i({},u,{type:o,target:this,sourceTarget:u&&u.sourceTarget||this});if(this._events){var T=this._events[o];if(T){this._firingCount=this._firingCount+1||1;for(var O=0,$=T.length;O<$;O++){var Z=T[O],se=Z.fn;Z.once&&this.off(o,se,Z.ctx),se.call(Z.ctx||this,S)}this._firingCount--}}return y&&this._propagateEvent(S),this},listens:function(o,u,y,S){typeof o!="string"&&console.warn('"string" type argument expected');var T=u;typeof u!="function"&&(S=!!u,T=void 0,y=void 0);var O=this._events&&this._events[o];if(O&&O.length&&this._listens(o,T,y)!==!1)return!0;if(S){for(var $ in this._eventParents)if(this._eventParents[$].listens(o,u,y,S))return!0}return!1},_listens:function(o,u,y){if(!this._events)return!1;var S=this._events[o]||[];if(!u)return!!S.length;y===this&&(y=void 0);for(var T=0,O=S.length;T<O;T++)if(S[T].fn===u&&S[T].ctx===y)return T;return!1},once:function(o,u,y){if(typeof o=="object")for(var S in o)this._on(S,o[S],u,!0);else{o=j(o);for(var T=0,O=o.length;T<O;T++)this._on(o[T],u,y,!0)}return this},addEventParent:function(o){return this._eventParents=this._eventParents||{},this._eventParents[m(o)]=o,this},removeEventParent:function(o){return this._eventParents&&delete this._eventParents[m(o)],this},_propagateEvent:function(o){for(var u in this._eventParents)this._eventParents[u].fire(o.type,i({layer:o.target,propagatedFrom:o.target},o),!0)}};ye.addEventListener=ye.on,ye.removeEventListener=ye.clearAllEventListeners=ye.off,ye.addOneTimeEventListener=ye.once,ye.fireEvent=ye.f
579ire,ye.hasEventListeners=ye.listens;var _e=ke.extend(ye);function B(o,u,y){this.x=y?Math.round(o):o,this.y=y?Math.round(u):u}var ce=Math.trunc||function(o){return o>0?Math.floor(o):Math.ceil(o)};B.prototype={clone:function(){return new B(this.x,this.y)},add:function(o){return this.clone()._add(ne(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(ne(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new B(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new B(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ce(this.x),this.y=ce(this.y),this},distanceTo:function(o){o=ne(o);var u=o.x-this.x,y=o.y-this.y;return Math.sqrt(u*u+y*y)},equals:function(o){return o=ne(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=ne(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+w(this.x)+", "+w(this.y)+")"}};function ne(o,u,y){return o instanceof B?o:E(o)?new B(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new B(o.x,o.y):new B(o,u,y)}function U(o,u){if(o)for(var y=u?[o,u]:o,S=0,T=y.length;S<T;S++)this.extend(y[S])}U.prototype={extend:function(o){var u,y;if(!o)return this;if(o instanceof B||typeof o[0]=="number"||"x"in o)u=y=ne(o);else if(o=ie(o),u=o.min,y=o.max,!u||!y)return this;return!this.min&&!this.max?(this.min=u.clone(),this.max=y.clone()):(this.min.x=Math.min(u.x,this.min.x),this.max.x=Math.max(y.x,this.max.x),this.min.y=Math.min(u.y,this.min.y),this.max.y=Math.max(y.y,this.max.y)),this},getCenter:function(o){return ne((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,o)},getBottomLeft:function(){return ne(this.min.x,this.max.y)},getTopRight:function(){return ne(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(o){var u,y;return typeof o[0]=="number"||o instanceof B?o=ne(o):o=ie(o),o instanceof U?(u=o.min,y=o.max):u=y=o,u.x>=this.min.x&&y.x<=this.max.x&&u.y>=this.min.y&&y.y<=this.max.y},intersects:function(o){o=ie(o);var u=this.min,y=this.max,S=o.min,T=o.max,O=T.x>=u.x&&S.x<=y.x,$=T.y>=u.y&&S.y<=y.y;return O&&$},overlaps:function(o){o=ie(o);var u=this.min,y=this.max,S=o.min,T=o.max,O=T.x>u.x&&S.x<y.x,$=T.y>u.y&&S.y<y.y;return O&&$},isValid:function(){return!!(this.min&&this.max)},pad:function(o){var u=this.min,y=this.max,S=Math.abs(u.x-y.x)*o,T=Math.abs(u.y-y.y)*o;return ie(ne(u.x-S,u.y-T),ne(y.x+S,y.y+T))},equals:function(o){return o?(o=ie(o),this.min.equals(o.getTopLeft())&&this.max.equals(o.getBottomRight())):!1}};function ie(o,u){return!o||o instanceof U?o:new U(o,u)}function je(o,u){if(o)for(var y=u?[o,u]:o,S=0,T=y.length;S<T;S++)this.extend(y[S])}je.prototype={extend:function(o){var u=this._southWest,y=this._northEast,S,T;if(o instanceof Se)S=o,T=o;else if(o instanceof je){if(S=o._southWest,T=o._northEast,!S||!T)return this}else return o?this.extend(Ne(o)||be(o)):this;return!u&&!y?(this._southWest=new Se(S.lat,S.lng),this._northEast=new Se(T.lat,T.lng)):(u.lat=Math.min(S.lat,u.lat),u.lng=Math.min(S.lng,u.lng),y.lat=Math.max(T.lat,y.lat),y.lng=Math.max(T.lng,y.lng)),this},pad:function(o){var u=this._southWest,y=this._northEast,S=Math.abs(u.lat-y.lat)*o,T=Math.abs(u.lng-y.lng)*o;return new je(new Se(u.lat-S,u.lng-T),new Se(y.lat+S,y.lng+T))},getCenter:function(){return new Se((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Se(this.getNorth(),this.getWest())},getSouthEast:function(){return new Se(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
579,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(o){typeof o[0]=="number"||o instanceof Se||"lat"in o?o=Ne(o):o=be(o);var u=this._southWest,y=this._northEast,S,T;return o instanceof je?(S=o.getSouthWest(),T=o.getNorthEast()):S=T=o,S.lat>=u.lat&&T.lat<=y.lat&&S.lng>=u.lng&&T.lng<=y.lng},intersects:function(o){o=be(o);var u=this._southWest,y=this._northEast,S=o.getSouthWest(),T=o.getNorthEast(),O=T.lat>=u.lat&&S.lat<=y.lat,$=T.lng>=u.lng&&S.lng<=y.lng;return O&&$},overlaps:function(o){o=be(o);var u=this._southWest,y=this._northEast,S=o.getSouthWest(),T=o.getNorthEast(),O=T.lat>u.lat&&S.lat<y.lat,$=T.lng>u.lng&&S.lng<y.lng;return O&&$},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(o,u){return o?(o=be(o),this._southWest.equals(o.getSouthWest(),u)&&this._northEast.equals(o.getNorthEast(),u)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function be(o,u){return o instanceof je?o:new je(o,u)}function Se(o,u,y){if(isNaN(o)||isNaN(u))throw new Error("Invalid LatLng object: ("+o+", "+u+")");this.lat=+o,this.lng=+u,y!==void 0&&(this.alt=+y)}Se.prototype={equals:function(o,u){if(!o)return!1;o=Ne(o);var y=Math.max(Math.abs(this.lat-o.lat),Math.abs(this.lng-o.lng));return y<=(u===void 0?1e-9:u)},toString:function(o){return"LatLng("+w(this.lat,o)+", "+w(this.lng,o)+")"},distanceTo:function(o){return Re.distance(this,Ne(o))},wrap:function(){return Re.wrapLatLng(this)},toBounds:function(o){var u=180*o/40075017,y=u/Math.cos(Math.PI/180*this.lat);return be([this.lat-u,this.lng-y],[this.lat+u,this.lng+y])},clone:function(){return new Se(this.lat,this.lng,this.alt)}};function Ne(o,u,y){return o instanceof Se?o:E(o)&&typeof o[0]!="object"?o.length===3?new Se(o[0],o[1],o[2]):o.length===2?new Se(o[0],o[1]):null:o==null?o:typeof o=="object"&&"lat"in o?new Se(o.lat,"lng"in o?o.lng:o.lon,o.alt):u===void 0?null:new Se(o,u,y)}var he={latLngToPoint:function(o,u){var y=this.projection.project(o),S=this.scale(u);return this.transformation._transform(y,S)},pointToLatLng:function(o,u){var y=this.scale(u),S=this.transformation.untransform(o,y);return this.projection.unproject(S)},project:function(o){return this.projection.project(o)},unproject:function(o){return this.projection.unproject(o)},scale:function(o){return 256*Math.pow(2,o)},zoom:function(o){return Math.log(o/256)/Math.LN2},getProjectedBounds:function(o){if(this.infinite)return null;var u=this.projection.bounds,y=this.scale(o),S=this.transformation.transform(u.min,y),T=this.transformation.transform(u.max,y);return new U(S,T)},infinite:!1,wrapLatLng:function(o){var u=this.wrapLng?p(o.lng,this.wrapLng,!0):o.lng,y=this.wrapLat?p(o.lat,this.wrapLat,!0):o.lat,S=o.alt;return new Se(y,u,S)},wrapLatLngBounds:function(o){var u=o.getCenter(),y=this.wrapLatLng(u),S=u.lat-y.lat,T=u.lng-y.lng;if(S===0&&T===0)return o;
579var O=o.getSouthWest(),$=o.getNorthEast(),Z=new Se(O.lat-S,O.lng-T),se=new Se($.lat-S,$.lng-T);return new je(Z,se)}},Re=i({},he,{wrapLng:[-180,180],R:6371e3,distance:function(o,u){var y=Math.PI/180,S=o.lat*y,T=u.lat*y,O=Math.sin((u.lat-o.lat)*y/2),$=Math.sin((u.lng-o.lng)*y/2),Z=O*O+Math.cos(S)*Math.cos(T)*$*$,se=2*Math.atan2(Math.sqrt(Z),Math.sqrt(1-Z));return this.R*se}}),qe=6378137,Je={R:qe,MAX_LATITUDE:85.0511287798,project:function(o){var u=Math.PI/180,y=this.MAX_LATITUDE,S=Math.max(Math.min(y,o.lat),-y),T=Math.sin(S*u);return new B(this.R*o.lng*u,this.R*Math.log((1+T)/(1-T))/2)},unproject:function(o){var u=180/Math.PI;return new Se((2*Math.atan(Math.exp(o.y/this.R))-Math.PI/2)*u,o.x*u/this.R)},bounds:(function(){var o=qe*Math.PI;return new U([-o,-o],[o,o])})()};function ht(o,u,y,S){if(E(o)){this._a=o[0],this._b=o[1],this._c=o[2],this._d=o[3];return}this._a=o,this._b=u,this._c=y,this._d=S}ht.prototype={transform:function(o,u){return this._transform(o.clone(),u)},_transform:function(o,u){return u=u||1,o.x=u*(this._a*o.x+this._b),o.y=u*(this._c*o.y+this._d),o},untransform:function(o,u){return u=u||1,new B((o.x/u-this._b)/this._a,(o.y/u-this._d)/this._c)}};function ct(o,u,y,S){return new ht(o,u,y,S)}var cs=i({},Re,{code:"EPSG:3857",projection:Je,transformation:(function(){var o=.5/(Math.PI*Je.R);return ct(o,.5,-o,.5)})()}),Vs=i({},cs,{code:"EPSG:900913"});function Nr(o){return document.createElementNS("http://www.w3.org/2000/svg",o)}function Sr(o,u){var y="",S,T,O,$,Z,se;for(S=0,O=o.length;S<O;S++){for(Z=o[S],T=0,$=Z.length;T<$;T++)se=Z[T],y+=(T?"L":"M")+se.x+" "+se.y;y+=u?Ve.svg?"z":"x":""}return y||"M0 0"}var An=document.documentElement.style,Li="ActiveXObject"in window,Qr=Li&&!document.addEventListener,ka="msLaunchUri"in navigator&&!("documentMode"in document),Xr=Ws("webkit"),sc=Ws("android"),Xd=Ws("android 2")||Ws("android 3"),pf=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),gf=sc&&Ws("Google")&&pf<537&&!("AudioNode"in window),nc=!!window.opera,rc=!ka&&Ws("chrome"),Uo=Ws("gecko")&&!Xr&&!nc&&!Li,xf=!rc&&Ws("safari"),Ca=Ws("phantom"),Pa="OTransition"in An,rx=navigator.platform.indexOf("Win")===0,Jd=Li&&"transition"in An,ic="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Xd,yf="MozPerspective"in An,eu=!window.L_DISABLE_3D&&(Jd||ic||yf)&&!Pa&&!Ca,Di=typeof orientation<"u"||Ws("mobile"),tu=Di&&Xr,su=Di&&ic,ac=!window.PointerEvent&&window.MSPointerEvent,Oi=!!(window.PointerEvent||ac),Ii="ontouchstart"in window||!!window.TouchEvent,vf=!window.L_NO_TOUCH&&(Ii||Oi),bf=Di&&nc,wf=Di&&Uo,_f=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,jf=(function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",g,u),window.removeEventListener("testPassiveEventSupport",g,u)}catch{}return o})(),nu=(function(){return!!document.createElement("canvas").getContext})(),oc=!!(document.createElementNS&&Nr("svg").createSVGRect),Vo=!!oc&&(function(){var o=document.createElement("div");return o.innerHTML="<svg/>",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),ru=!oc&&(function(){try{var o=document.createElement("div");o.innerHTML='<v:shape adj="1"/>';var u=o.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}})(),Wo=navigator.platform.indexOf("Mac")===0,ix=navigator.platform.indexOf("Linux")===0;function Ws(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var Ve={ie:Li,ielt9:Qr,edge:ka,webkit:Xr,android:sc,android23:Xd,androidStock:gf,opera:nc,chrome:rc,gecko:Uo,safari:xf,phantom:Ca,opera12:Pa,win:rx,ie3d:Jd,webkit3d:ic,ge
579cko3d:yf,any3d:eu,mobile:Di,mobileWebkit:tu,mobileWebkit3d:su,msPointer:ac,pointer:Oi,touch:vf,touchNative:Ii,mobileOpera:bf,mobileGecko:wf,retina:_f,passiveEvents:jf,canvas:nu,svg:oc,vml:ru,inlineSvg:Vo,mac:Wo,linux:ix},Ho=Ve.msPointer?"MSPointerDown":"pointerdown",lc=Ve.msPointer?"MSPointerMove":"pointermove",Nf=Ve.msPointer?"MSPointerUp":"pointerup",Sf=Ve.msPointer?"MSPointerCancel":"pointercancel",iu={touchstart:Ho,touchmove:lc,touchend:Nf,touchcancel:Sf},Jr={touchstart:ns,touchmove:cc,touchend:cc,touchcancel:cc},Fi={},au=!1;function ax(o,u,y){return u==="touchstart"&&ox(),Jr[u]?(y=Jr[u].bind(this,y),o.addEventListener(iu[u],y,!1),y):(console.warn("wrong event specified:",u),g)}function kf(o,u,y){if(!iu[u]){console.warn("wrong event specified:",u);return}o.removeEventListener(iu[u],y,!1)}function Cf(o){Fi[o.pointerId]=o}function Pf(o){Fi[o.pointerId]&&(Fi[o.pointerId]=o)}function ou(o){delete Fi[o.pointerId]}function ox(){au||(document.addEventListener(Ho,Cf,!0),document.addEventListener(lc,Pf,!0),document.addEventListener(Nf,ou,!0),document.addEventListener(Sf,ou,!0),au=!0)}function cc(o,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var y in Fi)u.touches.push(Fi[y]);u.changedTouches=[u],o(u)}}function ns(o,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&rs(u),cc(o,u)}function lx(o){var u={},y,S;for(S in o)y=o[S],u[S]=y&&y.bind?y.bind(o):y;return o=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var lu=200;function Tf(o,u){o.addEventListener("dblclick",u);var y=0,S;function T(O){if(O.detail!==1){S=O.detail;return}if(!(O.pointerType==="mouse"||O.sourceCapabilities&&!O.sourceCapabilities.firesTouchEvents)){var $=$i(O);if(!($.some(function(se){return se instanceof HTMLLabelElement&&se.attributes.for})&&!$.some(function(se){return se instanceof HTMLInputElement||se instanceof HTMLSelectElement}))){var Z=Date.now();Z-y<=lu?(S++,S===2&&u(lx(O))):S=1,y=Z}}}return o.addEventListener("click",T),{dblclick:u,simDblclick:T}}function dc(o,u){o.removeEventListener("dblclick",u.dblclick),o.removeEventListener("click",u.simDblclick)}var cu=Ma(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ta=Ma(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Yo=Ta==="webkitTransition"||Ta==="OTransition"?Ta+"End":"transitionend";function Mn(o){return typeof o=="string"?document.getElementById(o):o}function qo(o,u){var y=o.style[u]||o.currentStyle&&o.currentStyle[u];if((!y||y==="auto")&&document.defaultView){var S=document.defaultView.getComputedStyle(o,null);y=S?S[u]:null}return y==="auto"?null:y}function lt(o,u,y){var S=document.createElement(o);return S.className=u||"",y&&y.appendChild(S),S}function Ht(o){var u=o.parentNode;u&&u.removeChild(o)}function uc(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function Ea(o){var u=o.parentNode;u&&u.lastChild!==o&&u.appendChild(o)}function kr(o){var u=o.parentNode;u&&u.firstChild!==o&&u.insertBefore(o,u.firstChild)}function Aa(o,u){if(o.classList!==void 0)return o.classList.contains(u);var y=hc(o);return y.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(y)}function at(o,u){if(o.classList!==void 0)for(var y=j(u),S=0,T=y.length;S<T;S++)o.classList.add(y[S]);else if(!Aa(o,u)){var O=hc(o);du(o,(O?O+" ":"")+u)}}function Vt(o,u){o.classList!==void 0?o.classList.remove(u):du(o,N((" "+hc(o)+" ").replace(" "+u+" "," ")))}function du(o,u){o.className.baseVal===void 0?o.className=u:o.className.baseVal=u}function hc(o){return o.correspondingElement&&(o=o.correspondingElement),o.className.baseVal===void 0?o.className:o.className.baseVal}function Hs(o,u){"opacity"in o.style?o.style.opacity=u:"filter"in o.style&&Ef(o,u)}function Ef(o,u){var y=!1,S="DXImageTransform.Microsoft.Alpha";try{y=o.filters.item(S)}catch{if(u===1)return}u=Math.round(u*100),y?(y.Enabled=u!==100,y.Opacity=u):o.style.filter+=" progid:"+S+"(opacity="+u+")"}function Ma(o){for(var u=document.documentElement.style,y=0;y<o.length;y++)if(o[y]in u)return o[y];return!1}function Rn(o,u,y){var S=u||new B(0,0);o.style[cu]=(Ve.ie3d?"translate("+S.x+"px,"+S.y+"px)":"translate3d("+S.x+"px,"+S.y+"px,0)")+(y?" scale("+y+")":"")}function ds(o,u){o._leaflet_pos=u,Ve.any3d?Rn(o,u):(o.style.left=u.x+"px",o.style.top=u.y+"px")}function Cr(o){return o._leaflet_pos||new B(0,0)}var vt,Ra,fc;if("onselectstart"in document)vt=function(){rt(window,"selectstart",rs)},Ra=function(){Dt(window,"selectstart",rs)};else{var Bi=Ma(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);vt=function(){if(Bi){var o=document.documentElement.style;fc=o[Bi],o[Bi]="none"}},Ra=function(){Bi&&(document.documentElement.style[Bi]=fc,fc=void 0)}}function mc(){rt(window,"dragstart",rs)}function pc(){Dt(window,"dragstart",rs)}var Go,Zo;function La(o){for(;o.tabIndex===-1;)o=o.parentNode;o.style&&(Ln(),Go=o,Zo=o.style.outlineStyle,o.style.outlineStyle="none",rt(window,"keydown",Ln))}function Ln(){Go&&(Go.style.outlineStyle=Zo,Go=void 0,Zo=void 0,Dt(window,"keydown",Ln))}function Pr(o){do o=o.parentNode;while((!o.offsetWidth||!o.offsetHeight)&&o!==document.body);return o}function Zn(o){var u=o.getBoundingClientRect();return{x:u.width/o.offsetWidth||1,y:u.height/o.offsetHeight||1,boundingClientRect:u}}var Ko={__proto__:null,TRANSFORM:cu,TRANSITION:Ta,TRANSITION_END:Yo,get:Mn,getStyle:qo,create:lt,remove:Ht,empty:uc,toFront:Ea,toBack:kr,hasClass:Aa,addClass:at,removeClass:Vt,setClass:du,getClass:hc,setOpacity:Hs,testProp:Ma,setTransform:Rn,setPosition:ds,getPosition:Cr,get disableTextSelection(){return vt},get enableTextSelection(){return Ra},disableImageDrag:mc,enableImageDrag:pc,preventOutline:La,restoreOutline:Ln,getSizedParentNode:Pr,getScale:Zn};
579function rt(o,u,y,S){if(u&&typeof u=="object")for(var T in u)hu(o,T,u[T],y);else{u=j(u);for(var O=0,$=u.length;O<$;O++)hu(o,u[O],y,S)}return this}var js="_leaflet_events";function Dt(o,u,y,S){if(arguments.length===1)uu(o),delete o[js];else if(u&&typeof u=="object")for(var T in u)gc(o,T,u[T],y);else if(u=j(u),arguments.length===2)uu(o,function(Z){return D(u,Z)!==-1});else for(var O=0,$=u.length;O<$;O++)gc(o,u[O],y,S);return this}function uu(o,u){for(var y in o[js]){var S=y.split(/\d/)[0];(!u||u(S))&&gc(o,S,null,null,y)}}var zi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function hu(o,u,y,S){var T=u+m(y)+(S?"_"+m(S):"");if(o[js]&&o[js][T])return this;var O=function(Z){return y.call(S||o,Z||window.event)},$=O;!Ve.touchNative&&Ve.pointer&&u.indexOf("touch")===0?O=ax(o,u,O):Ve.touch&&u==="dblclick"?O=Tf(o,O):"addEventListener"in o?u==="touchstart"||u==="touchmove"||u==="wheel"||u==="mousewheel"?o.addEventListener(zi[u]||u,O,Ve.passiveEvents?{passive:!1}:!1):u==="mouseenter"||u==="mouseleave"?(O=function(Z){Z=Z||window.event,Jo(o,Z)&&$(Z)},o.addEventListener(zi[u],O,!1)):o.addEventListener(u,$,!1):o.attachEvent("on"+u,O),o[js]=o[js]||{},o[js][T]=O}function gc(o,u,y,S,T){T=T||u+m(y)+(S?"_"+m(S):"");var O=o[js]&&o[js][T];if(!O)return this;!Ve.touchNative&&Ve.pointer&&u.indexOf("touch")===0?kf(o,u,O):Ve.touch&&u==="dblclick"?dc(o,O):"removeEventListener"in o?o.removeEventListener(zi[u]||u,O,!1):o.detachEvent("on"+u,O),o[js][T]=null}function Kn(o){return o.stopPropagation?o.stopPropagation():o.originalEvent?o.originalEvent._stopped=!0:o.cancelBubble=!0,this}function xc(o){return hu(o,"wheel",Kn),this}function Qo(o){return rt(o,"mousedown touchstart dblclick contextmenu",Kn),o._leaflet_disable_click=!0,this}function rs(o){return o.preventDefault?o.preventDefault():o.returnValue=!1,this}function Dn(o){return rs(o),Kn(o),this}function $i(o){if(o.composedPath)return o.composedPath();for(var u=[],y=o.target;y;)u.push(y),y=y.parentNode;return u}function Xo(o,u){if(!u)return new B(o.clientX,o.clientY);var y=Zn(u),S=y.boundingClientRect;return new B((o.clientX-S.left)/y.x-u.clientLeft,(o.clientY-S.top)/y.y-u.clientTop)}var cx=Ve.linux&&Ve.chrome?window.devicePixelRatio:Ve.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Af(o){return Ve.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/cx:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function Jo(o,u){var y=u.relatedTarget;if(!y)return!0;try{for(;y&&y!==o;)y=y.parentNode}catch{return!1}return y!==o}var yc={__proto__:null,on:rt,off:Dt,stopPropagation:Kn,disableScrollPropagation:xc,disableClickPropagation:Qo,preventDefault:rs,stop:Dn,getPropagationPath:$i,getMousePosition:Xo,getWheelDelta:Af,isExternalTarget:Jo,addListener:rt,removeListener:Dt},vc=_e.extend({run:function(o,u,y,S){this.stop(),this._el=o,this._inProgress=!0,this._duration=y||.25,this._easeOutPower=1/Math.max(S||.5,.2),this._startPos=Cr(o),this._offset=u.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=le(this._animate,this),this._step()},_step:function(o){var u=+new Date-this._startTime,y=this._duration*1e3;u<y?this._runFrame(this._easeOut(u/y),o):(this._runFrame(1),this._complete())},_runFrame:function(o,u){var y=this._startPos.add(this._offset.multiplyBy(o));u&&y._round(),ds(this._el,y),this.fire("step")},_complete:function(){xe(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(o){return 1-Math.pow(1-o,this._easeOutPower)}}),xt=_e.extend({options:{crs:cs,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(o,u){u=_(this,u),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(o),this._initLayout(),this._onResize=d(this._onResize,this),this._initEvents(),u.maxBounds&&this.setMaxBounds(u.maxBounds),u.zoom!==void 0&&(this._zoom=this._limitZoom(u.zoom)),u.center&&u.zoom!==void 0&&this.setView(Ne(u.center),u.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ta&&Ve.any3d&&!Ve.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),rt(this._proxy,Yo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 5,687 bytes, line 579
579,setView:function(o,u,y){if(u=u===void 0?this._zoom:this._limitZoom(u),o=this._limitCenter(Ne(o),u,this.options.maxBounds),y=y||{},this._stop(),this._loaded&&!y.reset&&y!==!0){y.animate!==void 0&&(y.zoom=i({animate:y.animate},y.zoom),y.pan=i({animate:y.animate,duration:y.duration},y.pan));var S=this._zoom!==u?this._tryAnimatedZoom&&this._tryAnimatedZoom(o,u,y.zoom):this._tryAnimatedPan(o,y.pan);if(S)return clearTimeout(this._sizeTimer),this}return this._resetView(o,u,y.pan&&y.pan.noMoveStart),this},setZoom:function(o,u){return this._loaded?this.setView(this.getCenter(),o,{zoom:u}):(this._zoom=o,this)},zoomIn:function(o,u){return o=o||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+o,u)},zoomOut:function(o,u){return o=o||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-o,u)},setZoomAround:function(o,u,y){var S=this.getZoomScale(u),T=this.getSize().divideBy(2),O=o instanceof B?o:this.latLngToContainerPoint(o),$=O.subtract(T).multiplyBy(1-1/S),Z=this.containerPointToLatLng(T.add($));return this.setView(Z,u,{zoom:y})},_getBoundsCenterZoom:function(o,u){u=u||{},o=o.getBounds?o.getBounds():be(o);var y=ne(u.paddingTopLeft||u.padding||[0,0]),S=ne(u.paddingBottomRight||u.padding||[0,0]),T=this.getBoundsZoom(o,!1,y.add(S));if(T=typeof u.maxZoom=="number"?Math.min(u.maxZoom,T):T,T===1/0)return{center:o.getCenter(),zoom:T};var O=S.subtract(y).divideBy(2),$=this.project(o.getSouthWest(),T),Z=this.project(o.getNorthEast(),T),se=this.unproject($.add(Z).divideBy(2).add(O),T);return{center:se,zoom:T}},fitBounds:function(o,u){if(o=be(o),!o.isValid())throw new Error("Bounds are not valid.");var y=this._getBoundsCenterZoom(o,u);return this.setView(y.center,y.zoom,u)},fitWorld:function(o){return this.fitBounds([[-90,-180],[90,180]],o)},panTo:function(o,u){return this.setView(o,this._zoom,{pan:u})},panBy:function(o,u){if(o=ne(o).round(),u=u||{},!o.x&&!o.y)return this.fire("moveend");if(u.animate!==!0&&!this.getSize().contains(o))return this._resetView(this.unproject(this.project(this.getCenter()).add(o)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new vc,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),u.noMoveStart||this.fire("movestart"),u.animate!==!1){at(this._mapPane,"leaflet-pan-anim");var y=this._getMapPanePos().subtract(o).round();this._panAnim.run(this._mapPane,y,u.duration||.25,u.easeLinearity)}else this._rawPanBy(o),this.fire("move").fire("moveend");return this},flyTo:function(o,u,y){if(y=y||{},y.animate===!1||!Ve.any3d)return this.setView(o,u,y);this._stop();var S=this.project(this.getCenter()),T=this.project(o),O=this.getSize(),$=this._zoom;o=Ne(o),u=u===void 0?$:u;var Z=Math.max(O.x,O.y),se=Z*this.getZoomScale($,u),ue=T.distanceTo(S)||1,Te=1.42,Qe=Te*Te;function dt(Mt){var Za=Mt?-1:1,jx=Mt?se:Z,Nx=se*se-Z*Z+Za*Qe*Qe*ue*ue,Gi=2*jx*Qe*ue,Zi=Nx/Gi,Ki=Math.sqrt(Zi*Zi+1)-Zi,Rc=Ki<1e-9?-18:Math.log(Ki);return Rc}function Ns(Mt){return(Math.exp(Mt)-Math.exp(-Mt))/2}function vs(Mt){return(Math.exp(Mt)+Math.exp(-Mt))/2}function ln(Mt){return Ns(Mt)/vs(Mt)}var qs=dt(0);function qa(Mt){return Z*(vs(qs)/vs(qs+Te*Mt))}function Ru(Mt){return Z*(vs(qs)*ln(qs+Te*Mt)-Ns(qs))/Qe}function oi(Mt){return 1-Math.pow(1-Mt,1.5)}var Xf=Date.now(),qi=(dt(1)-qs)/Te,er=y.duration?1e3*y.duration:1e3*qi*.8;function Ga(){var Mt=(Date.now()-Xf)/er,Za=oi(Mt)*qi;Mt<=1?(this._flyToFrame=le(Ga,this),this._move(this.unproject(S.add(T.subtract(S).multiplyBy(Ru(Za)/ue)),$),this.getScaleZoom(Z/qa(Za),$),{flyTo:!0})):this._move(o,u)._moveEnd(!0)}return this._moveStart(!0,y.noMoveStart),Ga.call(this),this},flyToBounds:function(o,u){var y=this._getBoundsCenterZoom(o,u);return this.flyTo(y.center,y.zoom,u)},setMaxBounds:function(o){return o=be(o),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),o.isValid()?(this.options.maxBounds=o,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(o){var u=this.options.minZoom;return this.options.minZoom=o,this._loaded&&u!==o&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(o):this},setMaxZoom:function(o){var u=this.options.maxZoom;return this.options.maxZoom=o,this._loaded&&u!==o&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,u){this._enforcingBounds=!0;var y=this.getCenter(),S=this._limitCenter(y,this._zoom,be(o));return y.equals(S)||this.panTo(S,u),this._enforcingBounds=!1,this},panInside:function(o,u){u=u||{};var y=ne(u.paddingTopLeft||u.padding||[0,0]),S=ne(u.paddingBottomRight||u.padding||[0,0]),T=this.project(this.getCenter()),O=this.project(o),$=this.getPixelBounds(),Z=ie([$.min.add(y),$.max.subtract(S)]),se=Z.getSize();if(!Z.contains(O)){this._enforcingBounds=!0;var ue=O.subtract(Z.getCenter()),Te=Z.extend(O).getSize().subtract(se);T.x+=ue.x<0?-Te.x:Te.x,T.y+=ue.y<0?-Te.y:Te.y,this.panTo(this.unproject(T),u),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var y=this.getSize(),S=u.divideBy(2).round(),T=y.divideBy(2).round(),O=S.subtract(T);return!O.x&&!O.y?this:(o.animate&&o.pan?this.panBy(O):(o.pan&&this._rawPanBy(O),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:y}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}
579,locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=d(this._handleGeolocationResponse,this),y=d(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,y,o):navigator.geolocation.getCurrentPosition(u,y,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var u=o.code,y=o.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+y+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var u=o.coords.latitude,y=o.coords.longitude,S=new Se(u,y),T=S.toBounds(o.coords.accuracy*2),O=this._locateOptions;if(O.setView){var $=this.getBoundsZoom(T);this.setView(S,O.maxZoom?Math.min($,O.maxZoom):$)}var Z={latlng:S,bounds:T,timestamp:o.timestamp};for(var se in o.coords)typeof o.coords[se]=="number"&&(Z[se]=o.coords[se]);this.fire("locationfound",Z)}},addHandler:function(o,u){if(!u)return this;var y=this[o]=new u(this);return this._handlers.push(y),this.options[o]&&y.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ht(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(xe(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)Ht(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,u){var y="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),S=lt("div",y,u||this._mapPane);return o&&(this._panes[o]=S),S},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),u=this.unproject(o.getBottomLeft()),y=this.unproject(o.getTopRight());return new je(u,y)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,u,y){o=be(o),y=ne(y||[0,0]);var S=this.getZoom()||0,T=this.getMinZoom(),O=this.getMaxZoom(),$=o.getNorthWest(),Z=o.getSouthEast(),se=this.getSize().subtract(y),ue=ie(this.project(Z,S),this.project($,S)).getSize(),Te=Ve.any3d?this.options.zoomSnap:1,Qe=se.x/ue.x,dt=se.y/ue.y,Ns=u?Math.max(Qe,dt):Math.min(Qe,dt);return S=this.getScaleZoom(Ns,S),Te&&(S=Math.round(S/(Te/100))*(Te/100),S=u?Math.ceil(S/Te)*Te:Math.floor(S/Te)*Te),Math.max(T,Math.min(O,S))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,u){var y=this._getTopLeftPoint(o,u);return new U(y,y.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,u){var y=this.options.crs;return u=u===void 0?this._zoom:u,y.scale(o)/y.scale(u)},getScaleZoom:function(o,u){var y=this.options.crs;u=u===void 0?this._zoom:u;var S=y.zoom(o*y.scale(u));return isNaN(S)?1/0:S},project:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(Ne(o
579),u)},unproject:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(ne(o),u)},layerPointToLatLng:function(o){var u=ne(o).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(o){var u=this.project(Ne(o))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(Ne(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(be(o))},distance:function(o,u){return this.options.crs.distance(Ne(o),Ne(u))},containerPointToLayerPoint:function(o){return ne(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return ne(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var u=this.containerPointToLayerPoint(ne(o));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Ne(o)))},mouseEventToContainerPoint:function(o){return Xo(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var u=this._container=Mn(o);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");rt(u,"scroll",this._onScroll,this),this._containerId=m(u)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ve.any3d,at(o,"leaflet-container"+(Ve.touch?" leaflet-touch":"")+(Ve.retina?" leaflet-retina":"")+(Ve.ielt9?" leaflet-oldie":"")+(Ve.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=qo(o,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ds(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(at(o.markerPane,"leaflet-zoom-hide"),at(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,u,y){ds(this._mapPane,new B(0,0));var S=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var T=this._zoom!==u;this._moveStart(T,y)._move(o,u)._moveEnd(T),this.fire("viewreset"),S&&this.fire("load")},_moveStart:function(o,u){return o&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(o,u,y,S){u===void 0&&(u=this._zoom);var T=this._zoom!==u;return this._zoom=u,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),S?y&&y.pinch&&this.fire("zoom",y):((T||y&&y.pinch)&&this.fire("zoom",y),this.fire("move",y)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return xe(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){ds(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[m(this._container)]=this;var u=o?Dt:rt;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),Ve.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){xe(this._resizeRequest),this._resizeRequest=le(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,u){for(var y=[],S,T=u==="mouseout"||u==="mouseover",O=o.target||o.srcElement,$=!1;O;){if(S=this._targets[m(O)],S&&(u==="click"||u==="preclick")&&this._draggableMoved(S)){$=!0;break}if(S&&S.listens(u,!0)&&(T&&!Jo(O,o)||(y.push(S),T))||O===this._container)break;O=O.parentNode}return!y.length&&!$&&!T&&this.listens(u,!0)&&(y=[this]),y},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var u=o.target||o.srcElement;if(!(!this._loaded||u._leaflet_disable_events||o.type==="click"&&this._isCl
579ickDisabled(u))){var y=o.type;y==="mousedown"&&La(u),this._fireDOMEvent(o,y)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,u,y){if(o.type==="click"){var S=i({},o);S.type="preclick",this._fireDOMEvent(S,S.type,y)}var T=this._findEventTargets(o,u);if(y){for(var O=[],$=0;$<y.length;$++)y[$].listens(u,!0)&&O.push(y[$]);T=O.concat(T)}if(T.length){u==="contextmenu"&&rs(o);var Z=T[0],se={originalEvent:o};if(o.type!=="keypress"&&o.type!=="keydown"&&o.type!=="keyup"){var ue=Z.getLatLng&&(!Z._radius||Z._radius<=10);se.containerPoint=ue?this.latLngToContainerPoint(Z.getLatLng()):this.mouseEventToContainerPoint(o),se.layerPoint=this.containerPointToLayerPoint(se.containerPoint),se.latlng=ue?Z.getLatLng():this.layerPointToLatLng(se.layerPoint)}for($=0;$<T.length;$++)if(T[$].fire(u,se,!0),se.originalEvent._stopped||T[$].options.bubblingMouseEvents===!1&&D(this._mouseEvents,u)!==-1)return}},_draggableMoved:function(o){return o=o.dragging&&o.dragging.enabled()?o:this,o.dragging&&o.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var o=0,u=this._handlers.length;o<u;o++)this._handlers[o].disable()},whenReady:function(o,u){return this._loaded?o.call(u||this,{target:this}):this.on("load",o,u),this},_getMapPanePos:function(){return Cr(this._mapPane)||new B(0,0)},_moved:function(){var o=this._getMapPanePos();return o&&!o.equals([0,0])},_getTopLeftPoint:function(o,u){var y=o&&u!==void 0?this._getNewPixelOrigin(o,u):this.getPixelOrigin();return y.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(o,u){var y=this.getSize()._divideBy(2);return this.project(o,u)._subtract(y)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(o,u,y){var S=this._getNewPixelOrigin(y,u);return this.project(o,u)._subtract(S)},_latLngBoundsToNewLayerBounds:function(o,u,y){var S=this._getNewPixelOrigin(y,u);
vendor: 14,317 bytes, line 579
579return ie([this.project(o.getSouthWest(),u)._subtract(S),this.project(o.getNorthWest(),u)._subtract(S),this.project(o.getSouthEast(),u)._subtract(S),this.project(o.getNorthEast(),u)._subtract(S)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(o){return this.latLngToLayerPoint(o).subtract(this._getCenterLayerPoint())},_limitCenter:function(o,u,y){if(!y)return o;var S=this.project(o,u),T=this.getSize().divideBy(2),O=new U(S.subtract(T),S.add(T)),$=this._getBoundsOffset(O,y,u);return Math.abs($.x)<=1&&Math.abs($.y)<=1?o:this.unproject(S.add($),u)},_limitOffset:function(o,u){if(!u)return o;var y=this.getPixelBounds(),S=new U(y.min.add(o),y.max.add(o));return o.add(this._getBoundsOffset(S,u))},_getBoundsOffset:function(o,u,y){var S=ie(this.project(u.getNorthEast(),y),this.project(u.getSouthWest(),y)),T=S.min.subtract(o.min),O=S.max.subtract(o.max),$=this._rebound(T.x,-O.x),Z=this._rebound(T.y,-O.y);return new B($,Z)},_rebound:function(o,u){return o+u>0?Math.round(o-u)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(u))},_limitZoom:function(o){var u=this.getMinZoom(),y=this.getMaxZoom(),S=Ve.any3d?this.options.zoomSnap:1;return S&&(o=Math.round(o/S)*S),Math.max(u,Math.min(y,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Vt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,u){var y=this._getCenterOffset(o)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(y)?!1:(this.panBy(y,u),!0)},_createAnimProxy:function(){var o=this._proxy=lt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(u){var y=cu,S=this._proxy.style[y];Rn(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),S===this._proxy.style[y]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ht(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),u=this.getZoom();Rn(this._proxy,this.project(o,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,u,y){if(this._animatingZoom)return!0;if(y=y||{},!this._zoomAnimated||y.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var S=this.getZoomScale(u),T=this._getCenterOffset(o)._divideBy(1-1/S);return y.animate!==!0&&!this.getSize().contains(T)?!1:(le(function(){this._moveStart(!0,y.noMoveStart||!1)._animateZoom(o,u,!0)},this),!0)},_animateZoom:function(o,u,y,S){this._mapPane&&(y&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=u,at(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:u,noUpdate:S}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(d(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Vt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ei(o,u){return new xt(o,u)}var an=ke.extend({options:{position:"topright"},initialize:function(o){_(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var u=this._map;return u&&u.removeControl(this),this.options.position=o,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var u=this._container=this.onAdd(o),y=this.getPosition(),S=o._controlCorners[y];return at(u,"leaflet-control"),y.indexOf("bottom")!==-1?S.insertBefore(u,S.firstChild):S.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ht(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),ti=function(o){return new an(o)};xt.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},u="leaflet-",y=this._controlContainer=lt("div",u+"control-container",this._container);function S(T,O){var $=u+T+" "+u+O;o[T+O]=lt("div",$,y)}S("top","left"),S("top","right"),S("bottom","left"),S("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)Ht(this._controlCorners[o]);Ht(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var fu=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,u,y,S){return y<S?-1:S<y?1:0}},initialize:function(o,u,y){_(this,y),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var S in o)this._addLayer(o[S],S);for(S in u)this._addLayer(u[S],S,!0)},onAdd:function(o){this._initLayout(),this._update(),this._map=o,o.on("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(o){return an.prototype.addTo.call(this,o),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var o=0;o<this._layers.length;o++)this._layers[o].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(o,u){return this._addLayer(o,u),this._map?this._update():this},addOverlay:function(o,u){return this._addLayer(o,u,!0),this._map?this._update():this},removeLayer:function(o){o.off("add remove",this._onLayerChange,this);var u=this._getLayer(m(o));return u&&this._layers.splice(this._layers.indexOf(u),1),this._map?this._update():this},expand:function(){at(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var o=this._map.getSize().y-(this._container.offsetTop+50);return o<this._section.clientHeight?(at(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=o+"px"):Vt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Vt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var o="leaflet-control-layers",u=this._container=lt("div",o),y=this.options.collapsed;u.setAttribute("aria-haspopup",!0),Qo(u),xc(u);var S=this._section=lt("section",o+"-list");y&&(this._map.on("click",this.collapse,this),rt(u,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var T=this._layersLink=lt("a",o+"-toggle",u);T.href="#",T.title="Layers",T.setAttribute("role","button"),rt(T,{keydown:function(O){O.keyCode===13&&this._expandSafely()},click:function(O){rs(O),this._expandSafely()}},this),y||this.expand(),this._baseLayersList=lt("div",o+"-base",S),this._separator=lt("div",o+"-separator",S),this._overlaysList=lt("div",o+"-overlays",S),u.appendChild(S)},_getLayer:function(o){for(var u=0;u<this._layers.length;u++)if(this._layers[u]&&m(this._layers[u].layer)===o)return this._layers[u]},_addLayer:function(o,u,y){this._map&&o.on("add remove",this._onLayerChange,this),this._layers.push({layer:o,name:u,overlay:y}),this.options.sortLayers&&this._layers.sort(d(function(S,T){return this.options.sortFunction(S.layer,T.layer,S.name,T.name)},this)),this.options.autoZIndex&&o.setZIndex&&(this._lastZIndex++,o.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;uc(this._baseLayersList),uc(this._overlaysList),this._layerControlInputs=[];var o,u,y,S,T=0;for(y=0;y<this._layers.length;y++)S=this._layers[y],this._addItem(S),u=u||S.overlay,o=o||!S.overlay,T+=S.overlay?0:1;return this.options.hideSingleBase&&(o=o&&T>1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=u&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var u=this._getLayer(m(o.target)),y=u.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;y&&this._map.fire(y,u)},_createRadioElement:function(o,u){var y='<input type="radio" class="leaflet-control-layers-selector" name="'+o+'"'+(u?' checked="checked"':"")+"/>",S=document.createElement("div");return S.innerHTML=y,S.firstChild},_addItem:function(o){var u=document.createElement("label"),y=this._map.hasLayer(o.layer),S;o.overlay?(S=document.createElement("input"),S.type="checkbox",S.className="leaflet-control-layers-selector",S.defaultChecked=y):S=this._createRadioElement("leaflet-base-layers_"+m(this),y),this._layerControlInputs.push(S),S.layerId=m(o.layer),rt(S,"click",this._onInputClick,this);var T=document.createElement("span");T.innerHTML=" "+o.name;var O=document.createElement("span");u.appendChild(O),O.appendChild(S),O.appendChild(T);var $=o.overlay?this._overlaysList:this._baseLayersList;return $.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){if(!this._preventClick){var o=this._layerControlInputs,u,y,S=[],T=[];this._handlingClick=!0;for(var O=o.length-1;O>=0;O--)u=o[O],y=this._getLayer(u.layerId).layer,u.checked?S.push(y):u.checked||T.push(y);for(O=0;O<T.length;O++)this._map.hasLayer(T[O])&&this._map.removeLayer(T[O]);for(O=0;O<S.length;O++)this._map.hasLayer(S[O])||this._map.addLayer(S[O]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var o=this._layerControlInputs,u,y,S=this._map.getZoom(),T=o.length-1;T>=0;T--)u=o[T],y=this._getLayer(u.layerId).layer,u.disabled=y.options.minZoom!==void 0&&S<y.options.minZoom||y.options.maxZoom!==void 0&&S>y.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;this._preventClick=!0,rt(o,"click",rs),this.expand();var u=this;setTimeout(function(){Dt(o,"click",rs),u._preventClick=!1})}}),bc=function(o,u,y){return new fu(o,u,y)},Da=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(o){var u="leaflet-control-zoom",y=lt("div",u+" leaflet-bar"),S=this.options;return this._zoomInButton=this._createButton(S.zoomInText,S.zoomInTitle,u+"-in",y,this._zoomIn),this._zoomOutButton=this._createButton(S.zoomOutText,S.zoomOutTitle,u+"-out",y,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),y},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(o.shiftKey?3:1))},_zoomOut:function(o){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,u,y,S,T){var O=lt("a",y,S);return O.innerHTML=o,O.href="#",O.title=u,O.setAttribute("role","button"),O.setAttribute("aria-label",u),Qo(O),rt(O,"click",Dn),rt(O,"click",T,this),rt(O,"click",this._refocusOnMap,this),O},_updateDisabled:function(){var o=this._map,u="leaflet-disabled";Vt(this._zoomInButton,u),Vt(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(at(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(at(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});xt.mergeOptions({zoomControl:!0}),xt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Da,this.addControl(this.zoomControl))});var Mf=function(o){return new Da(o)},Ys=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var u="leaflet-control-scale",y=lt("div",u),S=this.options;return this._addScales(S,u+"-line",y),o.on(S.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),y},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,u,y){o.metric&&(this._mScale=lt("div",u,y)),o.imperial&&(this._iScale=lt("div",u,y))},_update:function(){var o=this._map,u=o.getSize().y/2,y=o.distance(o.containerPointToLatLng([0,u]),o.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(y)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var u=this._getRoundNum(o),y=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,y,u/o)},_updateImperial:function(o){var u=o*3.2808399,y,S,T;u>5280?(y=u/5280,S=this._getRoundNum(y),this._updateScale(this._iScale,S+" mi",S/y)):(T=this._getRoundNum(u),this._updateScale(this._iScale,T+" ft",T/u))},_updateScale:function(o,u,y){o.style.width=Math.round(this.options.maxWidth*y)+"px",o.innerHTML=u},_getRoundNum:function(o){var u=Math.pow(10,(Math.floor(o)+"").length-1),y=o/u;return y=y>=10?10:y>=5?5:y>=3?3:y>=2?2:1,u*y}}),Oa=function(o){return new Ys(o)},mu='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ui=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ve.inlineSvg?mu+" ":"")+"Leaflet</a>"},initialize:function(o){_(this,o),this._attributions={}}
579,onAdd:function(o){o.attributionControl=this,this._container=lt("div","leaflet-control-attribution"),Qo(this._container);for(var u in o._layers)o._layers[u].getAttribution&&this.addAttribution(o._layers[u].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var u in this._attributions)this._attributions[u]&&o.push(u);var y=[];this.options.prefix&&y.push(this.options.prefix),o.length&&y.push(o.join(", ")),this._container.innerHTML=y.join(' <span aria-hidden="true">|</span> ')}}});xt.mergeOptions({attributionControl:!0}),xt.addInitHook(function(){this.options.attributionControl&&new Ui().addTo(this)});var dx=function(o){return new Ui(o)};an.Layers=fu,an.Zoom=Da,an.Scale=Ys,an.Attribution=Ui,ti.layers=bc,ti.zoom=Mf,ti.scale=Oa,ti.attribution=dx;var pn=ke.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});pn.addTo=function(o,u){return o.addHandler(u,this),this};var pu={Events:ye},Ia=Ve.touch?"touchstart mousedown":"mousedown",On=_e.extend({options:{clickTolerance:3},initialize:function(o,u,y,S){_(this,S),this._element=o,this._dragStartTarget=u||o,this._preventOutline=y},enable:function(){this._enabled||(rt(this._dragStartTarget,Ia,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(On._dragging===this&&this.finishDrag(!0),Dt(this._dragStartTarget,Ia,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!Aa(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){On._dragging===this&&this.finishDrag();return}if(!(On._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(On._dragging=this,this._preventOutline&&La(this._element),mc(),vt(),!this._moving)){this.fire("down");var u=o.touches?o.touches[0]:o,y=Pr(this._element);this._startPoint=new B(u.clientX,u.clientY),this._startPos=Cr(this._element),this._parentScale=Zn(y);var S=o.type==="mousedown";rt(document,S?"mousemove":"touchmove",this._onMove,this),rt(document,S?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var u=o.touches&&o.touches.length===1?o.touches[0]:o,y=new B(u.clientX,u.clientY)._subtract(this._startPoint);!y.x&&!y.y||Math.abs(y.x)+Math.abs(y.y)<this.options.clickTolerance||(y.x/=this._parentScale.x,y.y/=this._parentScale.y,rs(o),this._moved||(this.fire("dragstart"),this._moved=!0,at(document.body,"leaflet-dragging"),this._lastTarget=o.target||o.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),at(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(y),this._moving=!0,this._lastEvent=o,this._updatePosition())}},_updatePosition:function(){var o={originalEvent:this._lastEvent};this.fire("predrag",o),ds(this._element,this._newPos),this.fire("drag",o)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(o){Vt(document.body,"leaflet-dragging"),this._lastTarget&&(Vt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Dt(document,"mousemove touchmove",this._onMove,this),Dt(document,"mouseup touchend touchcancel",this._onUp,this),pc(),Ra();var u=this._moved&&this._moving;this._moving=!1,On._dragging=!1,u&&this.fire("dragend",{noInertia:o,distance:this._newPos.distanceTo(this._startPos)})}});function gu(o,u,y){var S,T=[1,4,2,8],O,$,Z,se,ue,Te,Qe,dt;for(O=0,Te=o.length;O<Te;O++)o[O]._code=Vi(o[O],u);for(Z=0;Z<4;Z++){for(Qe=T[Z],S=[],O=0,Te=o.length,$=Te-1;O<Te;
579$=O++)se=o[O],ue=o[$],se._code&Qe?ue._code&Qe||(dt=_c(ue,se,Qe,u,y),dt._code=Vi(dt,u),S.push(dt)):(ue._code&Qe&&(dt=_c(ue,se,Qe,u,y),dt._code=Vi(dt,u),S.push(dt)),S.push(se));o=S}return o}function Rf(o,u){var y,S,T,O,$,Z,se,ue,Te;if(!o||o.length===0)throw new Error("latlngs not passed");gn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var Qe=Ne([0,0]),dt=be(o),Ns=dt.getNorthWest().distanceTo(dt.getSouthWest())*dt.getNorthEast().distanceTo(dt.getNorthWest());Ns<1700&&(Qe=xu(o));var vs=o.length,ln=[];for(y=0;y<vs;y++){var qs=Ne(o[y]);ln.push(u.project(Ne([qs.lat-Qe.lat,qs.lng-Qe.lng])))}for(Z=se=ue=0,y=0,S=vs-1;y<vs;S=y++)T=ln[y],O=ln[S],$=T.y*O.x-O.y*T.x,se+=(T.x+O.x)*$,ue+=(T.y+O.y)*$,Z+=$*3;Z===0?Te=ln[0]:Te=[se/Z,ue/Z];var qa=u.unproject(ne(Te));return Ne([qa.lat+Qe.lat,qa.lng+Qe.lng])}function xu(o){for(var u=0,y=0,S=0,T=0;T<o.length;T++){var O=Ne(o[T]);u+=O.lat,y+=O.lng,S++}return Ne([u/S,y/S])}var ux={__proto__:null,clipPolygon:gu,polygonCenter:Rf,centroid:xu};function wc(o,u){if(!u||!o.length)return o.slice();var y=u*u;return o=mx(o,y),o=fx(o,y),o}function Lf(o,u,y){return Math.sqrt(Wi(o,u,y,!0))}function hx(o,u,y){return Wi(o,u,y)}function fx(o,u){var y=o.length,S=typeof Uint8Array<"u"?Uint8Array:Array,T=new S(y);T[0]=T[y-1]=1,yu(o,T,u,0,y-1);var O,$=[];for(O=0;O<y;O++)T[O]&&$.push(o[O]);return $}function yu(o,u,y,S,T){var O=0,$,Z,se;for(Z=S+1;Z<=T-1;Z++)se=Wi(o[Z],o[S],o[T],!0),se>O&&($=Z,O=se);O>y&&(u[$]=1,yu(o,u,y,S,$),yu(o,u,y,$,T))}function mx(o,u){for(var y=[o[0]],S=1,T=0,O=o.length;S<O;S++)px(o[S],o[T])>u&&(y.push(o[S]),T=S);return T<O-1&&y.push(o[O-1]),y}var vu;function Df(o,u,y,S,T){var O=S?vu:Vi(o,y),$=Vi(u,y),Z,se,ue;for(vu=$;;){if(!(O|$))return[o,u];if(O&$)return!1;Z=O||$,se=_c(o,u,Z,y,T),ue=Vi(se,y),Z===O?(o=se,O=ue):(u=se,$=ue)}}function _c(o,u,y,S,T){var O=u.x-o.x,$=u.y-o.y,Z=S.min,se=S.max,ue,Te;return y&8?(ue=o.x+O*(se.y-o.y)/$,Te=se.y):y&4?(ue=o.x+O*(Z.y-o.y)/$,Te=Z.y):y&2?(ue=se.x,Te=o.y+$*(se.x-o.x)/O):y&1&&(ue=Z.x,Te=o.y+$*(Z.x-o.x)/O),new B(ue,Te,T)}function Vi(o,u){var y=0;return o.x<u.min.x?y|=1:o.x>u.max.x&&(y|=2),o.y<u.min.y?y|=4:o.y>u.max.y&&(y|=8),y}function px(o,u){var y=u.x-o.x,S=u.y-o.y;return y*y+S*S}function Wi(o,u,y,S){var T=u.x,O=u.y,$=y.x-T,Z=y.y-O,se=$*$+Z*Z,ue;return se>0&&(ue=((o.x-T)*$+(o.y-O)*Z)/se,ue>1?(T=y.x,O=y.y):ue>0&&(T+=$*ue,O+=Z*ue)),$=o.x-T,Z=o.y-O,S?$*$+Z*Z:new B(T,O)}function gn(o){return!E(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Of(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gn(o)}function If(o,u){var y,S,T,O,$,Z,se,ue;if(!o||o.length===0)throw new Error("latlngs not passed");gn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var Te=Ne([0,0]),Qe=be(o),dt=Qe.getNorthWest().distanceTo(Qe.getSouthWest
579())*Qe.getNorthEast().distanceTo(Qe.getNorthWest());dt<1700&&(Te=xu(o));var Ns=o.length,vs=[];for(y=0;y<Ns;y++){var ln=Ne(o[y]);vs.push(u.project(Ne([ln.lat-Te.lat,ln.lng-Te.lng])))}for(y=0,S=0;y<Ns-1;y++)S+=vs[y].distanceTo(vs[y+1])/2;if(S===0)ue=vs[0];else for(y=0,O=0;y<Ns-1;y++)if($=vs[y],Z=vs[y+1],T=$.distanceTo(Z),O+=T,O>S){se=(O-S)/T,ue=[Z.x-se*(Z.x-$.x),Z.y-se*(Z.y-$.y)];break}var qs=u.unproject(ne(ue));return Ne([qs.lat+Te.lat,qs.lng+Te.lng])}var Ff={__proto__:null,simplify:wc,pointToSegmentDistance:Lf,closestPointOnSegment:hx,clipSegment:Df,_getEdgeIntersection:_c,_getBitCode:Vi,_sqClosestPointOnSegment:Wi,isFlat:gn,_flat:Of,polylineCenter:If},bu={project:function(o){return new B(o.lng,o.lat)},unproject:function(o){return new Se(o.y,o.x)},bounds:new U([-180,-90],[180,90])},wu={R:6378137,R_MINOR:6356752314245179e-9,bounds:new U([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(o){var u=Math.PI/180,y=this.R,S=o.lat*u,T=this.R_MINOR/y,O=Math.sqrt(1-T*T),$=O*Math.sin(S),Z=Math.tan(Math.PI/4-S/2)/Math.pow((1-$)/(1+$),O/2);return S=-y*Math.log(Math.max(Z,1e-10)),new B(o.lng*u*y,S)},unproject:function(o){for(var u=180/Math.PI,y=this.R,S=this.R_MINOR/y,T=Math.sqrt(1-S*S),O=Math.exp(-o.y/y),$=Math.PI/2-2*Math.atan(O),Z=0,se=.1,ue;Z<15&&Math.abs(se)>1e-7;Z++)ue=T*Math.sin($),ue=Math.pow((1-ue)/(1+ue),T/2),se=Math.PI/2-2*Math.atan(O*ue)-$,$+=se;return new Se($*u,o.x*u/y)}},gx={__proto__:null,LonLat:bu,Mercator:wu,SphericalMercator:Je},xx=i({},Re,{code:"EPSG:3395",projection:wu,transformation:(function(){var o=.5/(Math.PI*wu.R);return ct(o,.5,-o,.5)})()}),Bf=i({},Re,{code:"EPSG:4326",projection:bu,transformation:ct(1/180,1,-1/180,.5)}),yx=i({},he,{projection:bu,transformation:ct(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,u){var y=u.lng-o.lng,S=u.lat-o.lat;return Math.sqrt(y*y+S*S)},infinite:!0});he.Earth=Re,he.EPSG3395=xx,he.EPSG3857=cs,he.EPSG900913=Vs,he.EPSG4326=Bf,he.Simple=yx;var In=_e.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[m(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[m(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var u=o.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var y=this.getEvents();u.on(y,this),this.once("remove",function(){u.off(y,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});xt.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var u=m(o);return this._layers[u]?this:(this._layers[u]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var u=m(o);return this._layers[u]?(this._loaded&&o.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return m(o)in this._layers},eachLayer:function(o,u){for(var y in this._layers)o.call(u,this._layers[y]);return this},_addLayers:function(o){o=o?E(o)?o:[o]:[];for(var u=0,y=o.length;u<y;u++)this.addLayer(o[u])},_addZoomLimit:function(o){(!isNaN(o.options.maxZoom)||!isNaN(o.options.minZoom))&&(this._zoomBoundLayers[m(o)]=o,this._updateZoomLevels())},_removeZoomLimit:function(o){var u=m(o);this._zoomBoundLayers[u]&&(delete this._zoomBoundLayers[u],this._updateZoomLevels())},_updateZoomLevels:function(){var o=1/0,u=-1/0,y=this._getZoomSpan();for(var S in this._zoomBoundLayers){var T=this._zoomBoundLayers[S].options;o=T.minZoom===void 0?o:Math.min(o,T.minZoom),u=T.maxZoom===void 0?u:Math.max(u,T.maxZoom)}this._layersMaxZoom=u===-1/0?void 0:u,this._layersMinZoom=o===1/0?void 0:o,y!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
579om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var si=In.extend({initialize:function(o,u){_(this,u),this._layers={};var y,S;if(o)for(y=0,S=o.length;y<S;y++)this.addLayer(o[y])},addLayer:function(o){var u=this.getLayerId(o);return this._layers[u]=o,this._map&&this._map.addLayer(o),this},removeLayer:function(o){var u=o in this._layers?o:this.getLayerId(o);return this._map&&this._layers[u]&&this._map.removeLayer(this._layers[u]),delete this._layers[u],this},hasLayer:function(o){var u=typeof o=="number"?o:this.getLayerId(o);return u in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(o){var u=Array.prototype.slice.call(arguments,1),y,S;for(y in this._layers)S=this._layers[y],S[o]&&S[o].apply(S,u);return this},onAdd:function(o){this.eachLayer(o.addLayer,o)},onRemove:function(o){this.eachLayer(o.removeLayer,o)},eachLayer:function(o,u){for(var y in this._layers)o.call(u,this._layers[y]);return this},getLayer:function(o){return this._layers[o]},getLayers:function(){var o=[];return this.eachLayer(o.push,o),o},setZIndex:function(o){return this.invoke("setZIndex",o)},getLayerId:function(o){return m(o)}}),el=function(o,u){return new si(o,u)},Tr=si.extend({addLayer:function(o){return this.hasLayer(o)?this:(o.addEventParent(this),si.prototype.addLayer.call(this,o),this.fire("layeradd",{layer:o}))},removeLayer:function(o){return this.hasLayer(o)?(o in this._layers&&(o=this._layers[o]),o.removeEventParent(this),si.prototype.removeLayer.call(this,o),this.fire("layerremove",{layer:o})):this},setStyle:function(o){return this.invoke("setStyle",o)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var o=new je;for(var u in this._layers){var y=this._layers[u];o.extend(y.getBounds?y.getBounds():y.getLatLng())}return o}}),zf=function(o,u){return new Tr(o,u)},Hi=ke.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(o){_(this,o)},createIcon:function(o){return this._createIcon("icon",o)},createShadow:function(o){return this._createIcon("shadow",o)},_createIcon:function(o,u){var y=this._getIconUrl(o);if(!y){if(o==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var S=this._createImg(y,u&&u.tagName==="IMG"?u:null);return this._setIconStyles(S,o),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),S},_setIconStyles:function(o,u){var y=this.options,S=y[u+"Size"];typeof S=="number"&&(S=[S,S]);var T=ne(S),O=ne(u==="shadow"&&y.shadowAnchor||y.iconAnchor||T&&T.divideBy(2,!0));o.className="leaflet-marker-"+u+" "+(y.className||""),O&&(o.style.marginLeft=-O.x+"px",o.style.marginTop=-O.y+"px"),T&&(o.style.width=T.x+"px",o.style.height=T.y+"px")},_createImg:function(o,u){return u=u||document.createElement("img"),u.src=o,u},_getIconUrl:function(o){return Ve.retina&&this.options[o+"RetinaUrl"]||this.options[o+"Url"]}});function $f(o){return new Hi(o)}var Fa=Hi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(o){return typeof Fa.imagePath!="string"&&(Fa.imagePath=this._detectIconPath()),(this.options.imagePath||Fa.imagePath)+Hi.prototype._getIconUrl.call(this,o)},_stripUrl:function(o){var u=function(y,S,T){var O=S.exec(y);return O&&O[T]};return o=u(o,/^url\((['"])?(.+)\1\)$/,2),o&&u(o,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var o=lt("div","leaflet-default-icon-path",document.body),u=qo(o,"background-image")||qo(o,"backgroundImage");if(document.body.removeChild(o),u=this._stripUrl(u),u)return u;var y=document.querySelector('link[href$="leaflet.css"]');return y?y.href.substring(0,y.href.length-11-1):""}}
vendor: 4,247 bytes, line 579
579),_u=pn.extend({initialize:function(o){this._marker=o},addHooks:function(){var o=this._marker._icon;this._draggable||(this._draggable=new On(o,o,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),at(o,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Vt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(o){var u=this._marker,y=u._map,S=this._marker.options.autoPanSpeed,T=this._marker.options.autoPanPadding,O=Cr(u._icon),$=y.getPixelBounds(),Z=y.getPixelOrigin(),se=ie($.min._subtract(Z).add(T),$.max._subtract(Z).subtract(T));if(!se.contains(O)){var ue=ne((Math.max(se.max.x,O.x)-se.max.x)/($.max.x-se.max.x)-(Math.min(se.min.x,O.x)-se.min.x)/($.min.x-se.min.x),(Math.max(se.max.y,O.y)-se.max.y)/($.max.y-se.max.y)-(Math.min(se.min.y,O.y)-se.min.y)/($.min.y-se.min.y)).multiplyBy(S);y.panBy(ue,{animate:!1}),this._draggable._newPos._add(ue),this._draggable._startPos._add(ue),ds(u._icon,this._draggable._newPos),this._onDrag(o),this._panRequest=le(this._adjustPan.bind(this,o))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(o){this._marker.options.autoPan&&(xe(this._panRequest),this._panRequest=le(this._adjustPan.bind(this,o)))},_onDrag:function(o){var u=this._marker,y=u._shadow,S=Cr(u._icon),T=u._map.layerPointToLatLng(S);y&&ds(y,S),u._latlng=T,o.latlng=T,o.oldLatLng=this._oldLatLng,u.fire("move",o).fire("drag",o)},_onDragEnd:function(o){xe(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",o)}}),Er=In.extend({options:{icon:new Fa,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(o,u){_(this,u),this._latlng=Ne(o)},onAdd:function(o){this._zoomAnimated=this._zoomAnimated&&o.options.markerZoomAnimation,this._zoomAnimated&&o.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(o){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&o.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(o){var u=this._latlng;return this._latlng=Ne(o),this.update(),this.fire("move",{oldLatLng:u,latlng:this._latlng})},setZIndexOffset:function(o){return this.options.zIndexOffset=o,this.update()},getIcon:function(){return this.options.icon},setIcon:function(o){return this.options.icon=o,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var o=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(o)}return this},_initIcon:function(){var o=this.options,u="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),y=o.icon.createIcon(this._icon),S=!1;y!==this._icon&&(this._icon&&this._removeIcon(),S=!0,o.title&&(y.title=o.title),y.tagName==="IMG"&&(y.alt=o.alt||"")),at(y,u),o.keyboard&&(y.tabIndex="0",y.setAttribute("role","button")),this._icon=y,o.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&rt(y,"focus",this._panOnFocus,this);var T=o.icon.createShadow(this._shadow),O=!1;T!==this._shadow&&(this._removeShadow(),O=!0),T&&(at(T,u),T.alt=""),this._shadow=T,o.opacity<1&&this._updateOpacity(),S&&this.getPane().appendChild(this._icon),this._initInteraction(),T&&O&&this.getPane(o.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}
vendor: 5,660 bytes, line 579
579),this.options.autoPanOnFocus&&Dt(this._icon,"focus",this._panOnFocus,this),Ht(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Ht(this._shadow),this._shadow=null},_setPos:function(o){this._icon&&ds(this._icon,o),this._shadow&&ds(this._shadow,o),this._zIndex=o.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(o){this._icon&&(this._icon.style.zIndex=this._zIndex+o)},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center).round();this._setPos(u)},_initInteraction:function(){if(this.options.interactive&&(at(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),_u)){var o=this.options.draggable;this.dragging&&(o=this.dragging.enabled(),this.dragging.disable()),this.dragging=new _u(this),o&&this.dragging.enable()}},setOpacity:function(o){return this.options.opacity=o,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var o=this.options.opacity;this._icon&&Hs(this._icon,o),this._shadow&&Hs(this._shadow,o)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var o=this._map;if(o){var u=this.options.icon.options,y=u.iconSize?ne(u.iconSize):ne(0,0),S=u.iconAnchor?ne(u.iconAnchor):ne(0,0);o.panInside(this._latlng,{paddingTopLeft:S,paddingBottomRight:y.subtract(S)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function vx(o,u){return new Er(o,u)}var ni=In.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(o){this._renderer=o.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(o){return _(this,o),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&o&&Object.prototype.hasOwnProperty.call(o,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),jc=ni.extend({options:{fill:!0,radius:10},initialize:function(o,u){_(this,u),this._latlng=Ne(o),this._radius=this.options.radius},setLatLng:function(o){var u=this._latlng;return this._latlng=Ne(o),this.redraw(),this.fire("move",{oldLatLng:u,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(o){return this.options.radius=this._radius=o,this.redraw()},getRadius:function(){return this._radius},setStyle:function(o){var u=o&&o.radius||this._radius;return ni.prototype.setStyle.call(this,o),this.setRadius(u),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var o=this._radius,u=this._radiusY||o,y=this._clickTolerance(),S=[o+y,u+y];this._pxBounds=new U(this._point.subtract(S),this._point.add(S))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(o){return o.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Uf(o,u){return new jc(o,u)}var Nc=jc.extend({initialize:function(o,u,y){if(typeof u=="number"&&(u=i({},y,{radius:u})),_(this,u),this._latlng=Ne(o),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(o){return this._mRadius=o,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var o=[this._radius,this._radiusY||this._radius];return new je(this._map.layerPointToLatLng(this._point.subtract(o)),this._map.layerPointToLatLng(this._point.add(o)))},setStyle:ni.prototype.setStyle,_project:function(){var o=this._latlng.lng,u=this._latlng.lat,y=this._map,S=y.options.crs;if(S.distance===Re.distance){var T=Math.PI/180,O=this._mRadius/Re.R/T,$=y.project([u+O,o]),Z=y.project([u-O,o]),se=$.add(Z).divideBy(2),ue=y.unproject(se).lat,Te=Math.acos((Math.cos(O*T)-Math.sin(u*T)*Math.sin(ue*T))/(Math.cos(u*T)*Math.cos(ue*T)))/T;(isNaN(Te)||Te===0)&&(Te=O/Math.cos(Math.PI/180*u)),this._point=se.subtract(y.getPixelOrigin()),this._radius=isNaN(Te)?0:se.x-y.project([ue,o-Te]).x,this._radiusY=se.y-$.y}else{var Qe=S.unproject(S.project(this._latlng).subtract([this._mRadius,0]));this._point=y.latLngToLayerPoint(this._latlng),this._radius=this._point.x-y.latLngToLayerPoint(Qe).x}this._updateBounds()}});function tl(o,u,y){return new Nc(o,u,y)}var on=ni.extend({options:{smoothFactor:1,noClip:!1},initialize:function(o,u){_(this,u),this._setLatLngs(o)},getLatLngs:function(){return this._latlngs},setLatLngs:function(o){return this._setLatLngs(o),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(o){for(var u=1/0,y=null,S=Wi,T,O,$=0,Z=this._parts.length;$<Z;$++)for(var se=this._parts[$],ue=1,Te=se.length;ue<Te;ue++){T=se[ue-1],O=se[ue];var Qe=S(o,T,O,!0);Qe<u&&(u=Qe,y=S(o,T,O))}return y&&(y.distance=Math.sqrt(u)),y}
579,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return If(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(o,u){return u=u||this._defaultShape(),o=Ne(o),u.push(o),this._bounds.extend(o),this.redraw()},_setLatLngs:function(o){this._bounds=new je,this._latlngs=this._convertLatLngs(o)},_defaultShape:function(){return gn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(o){for(var u=[],y=gn(o),S=0,T=o.length;S<T;S++)y?(u[S]=Ne(o[S]),this._bounds.extend(u[S])):u[S]=this._convertLatLngs(o[S]);return u},_project:function(){var o=new U;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,o),this._bounds.isValid()&&o.isValid()&&(this._rawPxBounds=o,this._updateBounds())},_updateBounds:function(){var o=this._clickTolerance(),u=new B(o,o);this._rawPxBounds&&(this._pxBounds=new U([this._rawPxBounds.min.subtract(u),this._rawPxBounds.max.add(u)]))},_projectLatlngs:function(o,u,y){var S=o[0]instanceof Se,T=o.length,O,$;if(S){for($=[],O=0;O<T;O++)$[O]=this._map.latLngToLayerPoint(o[O]),y.extend($[O]);u.push($)}else for(O=0;O<T;O++)this._projectLatlngs(o[O],u,y)},_clipPoints:function(){var o=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}var u=this._parts,y,S,T,O,$,Z,se;for(y=0,T=0,O=this._rings.length;y<O;y++)for(se=this._rings[y],S=0,$=se.length;S<$-1;S++)Z=Df(se[S],se[S+1],o,S,!0),Z&&(u[T]=u[T]||[],u[T].push(Z[0]),(Z[1]!==se[S+1]||S===$-2)&&(u[T].push(Z[1]),T++))}},_simplifyPoints:function(){for(var o=this._parts,u=this.options.smoothFactor,y=0,S=o.length;y<S;y++)o[y]=wc(o[y],u)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(o,u){var y,S,T,O,$,Z,se=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(y=0,O=this._parts.length;y<O;y++)for(Z=this._parts[y],S=0,$=Z.length,T=$-1;S<$;T=S++)if(!(!u&&S===0)&&Lf(o,Z[T],Z[S])<=se)return!0;return!1}});function bx(o,u){return new on(o,u)}on._flat=Of;var Ar=on.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
579,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Rf(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(o){var u=on.prototype._convertLatLngs.call(this,o),y=u.length;return y>=2&&u[0]instanceof Se&&u[0].equals(u[y-1])&&u.pop(),u},_setLatLngs:function(o){on.prototype._setLatLngs.call(this,o),gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,u=this.options.weight,y=new B(u,u);if(o=new U(o.min.subtract(y),o.max.add(y)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var S=0,T=this._rings.length,O;S<T;S++)O=gu(this._rings[S],o,!0),O.length&&this._parts.push(O)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(o){var u=!1,y,S,T,O,$,Z,se,ue;if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(O=0,se=this._parts.length;O<se;O++)for(y=this._parts[O],$=0,ue=y.length,Z=ue-1;$<ue;Z=$++)S=y[$],T=y[Z],S.y>o.y!=T.y>o.y&&o.x<(T.x-S.x)*(o.y-S.y)/(T.y-S.y)+S.x&&(u=!u);return u||on.prototype._containsPoint.call(this,o,!0)}});function wx(o,u){return new Ar(o,u)}var Qn=Tr.extend({initialize:function(o,u){_(this,u),this._layers={},o&&this.addData(o)},addData:function(o){var u=E(o)?o:o.features,y,S,T;if(u){for(y=0,S=u.length;y<S;y++)T=u[y],(T.geometries||T.geometry||T.features||T.coordinates)&&this.addData(T);return this}var O=this.options;if(O.filter&&!O.filter(o))return this;var $=Ba(o,O);return $?($.feature=Tc(o),$.defaultOptions=$.options,this.resetStyle($),O.onEachFeature&&O.onEachFeature(o,$),this.addLayer($)):this},resetStyle:function(o){return o===void 0?this.eachLayer(this.resetStyle,this):(o.options=i({},o.defaultOptions),this._setLayerStyle(o,this.options.style),this)},setStyle:function(o){return this.eachLayer(function(u){this._setLayerStyle(u,o)},this)},_setLayerStyle:function(o,u){o.setStyle&&(typeof u=="function"&&(u=u(o.feature)),o.setStyle(u))}});function Ba(o,u){var y=o.type==="Feature"?o.geometry:o,S=y?y.coordinates:null,T=[],O=u&&u.pointToLayer,$=u&&u.coordsToLatLng||kc,Z,se,ue,Te;if(!S&&!y)return null;switch(y.type){case"Point":return Z=$(S),Sc(O,o,Z,u);case"MultiPoint":for(ue=0,Te=S.length;ue<Te;ue++)Z=$(S[ue]),T.push(Sc(O,o,Z,u));return new Tr(T);case"LineString":case"MultiLineString":return se=sl(S,y.type==="LineString"?0:1,$),new on(se,u);case"Polygon":case"MultiPolygon":return se=sl(S,y.type==="Polygon"?1:2,$),new Ar(se,u);case"GeometryCollection":for(ue=0,Te=y.geometries.length;ue<Te;ue++){var Qe=Ba({geometry:y.geometries[ue],type:"Feature",properties:o.properties},u);Qe&&T.push(Qe)}return new Tr(T);case"FeatureCollection":for(ue=0,Te=y.features.length;ue<Te;ue++){var dt=Ba(y.features[ue],u);dt&&T.push(dt)}return new Tr(T);default:throw new Error("Invalid GeoJSON object.")}}function Sc(o,u,y,S){return o?o(u,y):new Er(y,S&&S.markersInheritOptions&&S)}function kc(o){return new Se(o[1],o[0],o[2])}function sl(o,u,y){for(var S=[],T=0,O=o.length,$;T<O;T++)$=u?sl(o[T],u-1,y):(y||kc)(o[T]),S.push($);return S}function Cc(o,u){return o=Ne(o),o.alt!==void 0?[w(o.lng,u),w(o.lat,u),w(o.alt,u)]:[w(o.lng,u),w(o.lat,u)]}function Pc(o,u,y,S){for(var T=[],O=0,$=o.length;O<$;O++)T.push(u?Pc(o[O],gn(o[O])?0:u-1,y,S):Cc(o[O],S));return!u&&y&&T.length>0&&T.push(T[0].slice()),T}function za(o,u){return o.feature?i({},o.feature,{geometry:u}):Tc(u)}function Tc(o){return o.type==="Feature"||o.type==="FeatureCollection"?o:{type:"Feature",properties:{},geometry:o}}var ju={toGeoJSON:function(o){return za(this,{type:"Point",coordinates:Cc(this.getLatLng(),o)})}};Er.include(ju),Nc.include(ju),jc.include(ju),on.include({toGeoJSON:function(o){var u=!gn(this._latlngs),y=Pc(this._latlngs,u?1:0,!1,o);return za(this,{type:(u?"Multi":"")+"LineString",coordinates:y})}}),Ar.include({toGeoJSON:function(o){var u=!gn(this._latlngs),y=u&&!gn(this._latlngs[0]),S=Pc(this._latlngs,y?2:u?1:0,!0,o);return u||(S=[S]),za(this,{type:(y?"Multi":"")+"Polygon",coordinates:S})}}),si.include({toMultiPoint:function(o){var u=[];return this.eachLayer(function(y){u.push(y.toGeoJSON(o).geometry.coordinates)}),za(this,{type:"MultiPoint",coordinates:u})},toGeoJSON:function(o){var u=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(u==="MultiPoint")return this.toMultiPoint(o);
vendor: 21,170 bytes, line 579
579var y=u==="GeometryCollection",S=[];return this.eachLayer(function(T){if(T.toGeoJSON){var O=T.toGeoJSON(o);if(y)S.push(O.geometry);else{var $=Tc(O);$.type==="FeatureCollection"?S.push.apply(S,$.features):S.push($)}}}),y?za(this,{geometries:S,type:"GeometryCollection"}):{type:"FeatureCollection",features:S}}});function Vf(o,u){return new Qn(o,u)}var Fn=Vf,ri=In.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(o,u,y){this._url=o,this._bounds=be(u),_(this,y)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(at(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ht(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(o){return this.options.opacity=o,this._image&&this._updateOpacity(),this},setStyle:function(o){return o.opacity&&this.setOpacity(o.opacity),this},bringToFront:function(){return this._map&&Ea(this._image),this},bringToBack:function(){return this._map&&kr(this._image),this},setUrl:function(o){return this._url=o,this._image&&(this._image.src=o),this},setBounds:function(o){return this._bounds=be(o),this._map&&this._reset(),this},getEvents:function(){var o={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var o=this._url.tagName==="IMG",u=this._image=o?this._url:lt("img");if(at(u,"leaflet-image-layer"),this._zoomAnimated&&at(u,"leaflet-zoom-animated"),this.options.className&&at(u,this.options.className),u.onselectstart=g,u.onmousemove=g,u.onload=d(this.fire,this,"load"),u.onerror=d(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),o){this._url=u.src;return}u.src=this._url,u.alt=this.options.alt},_animateZoom:function(o){var u=this._map.getZoomScale(o.zoom),y=this._map._latLngBoundsToNewLayerBounds(this._bounds,o.zoom,o.center).min;Rn(this._image,y,u)},_reset:function(){var o=this._image,u=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),y=u.getSize();ds(o,u.min),o.style.width=y.x+"px",o.style.height=y.y+"px"},_updateOpacity:function(){Hs(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var o=this.options.errorOverlayUrl;o&&this._url!==o&&(this._url=o,this._image.src=o)},getCenter:function(){return this._bounds.getCenter()}}),Wf=function(o,u,y){return new ri(o,u,y)},Nu=ri.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var o=this._url.tagName==="VIDEO",u=this._image=o?this._url:lt("video");if(at(u,"leaflet-image-layer"),this._zoomAnimated&&at(u,"leaflet-zoom-animated"),this.options.className&&at(u,this.options.className),u.onselectstart=g,u.onmousemove=g,u.onloadeddata=d(this.fire,this,"load"),o){for(var y=u.getElementsByTagName("source"),S=[],T=0;T<y.length;T++)S.push(y[T].src);this._url=y.length>0?S:[u.src];return}E(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var O=0;O<this._url.length;O++){var $=lt("source");$.src=this._url[O],u.appendChild($)}}});function Hf(o,u,y){return new Nu(o,u,y)}var Su=ri.extend({_initImage:function(){var o=this._image=this._url;at(o,"leaflet-image-layer"),this._zoomAnimated&&at(o,"leaflet-zoom-animated"),this.options.className&&at(o,this.options.className),o.onselectstart=g,o.onmousemove=g}});function ku(o,u,y){return new Su(o,u,y)}var Xn=In.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(o,u){o&&(o instanceof Se||E(o))?(this._latlng=Ne(o),_(this,u)):(_(this,o),this._source=u),this.options.content&&(this._content=this.options.content)},openOn:function(o){return o=arguments.length?o:this._source._map,o.hasLayer(this)||o.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(o){return this._map?this.close():(arguments.length?this._source=o:o=this._source,this._prepareOpen(),this.openOn(o._map)),this},onAdd:function(o){this._zoomAnimated=o._zoomAnimated,this._container||this._initLayout(),o._fadeAnimated&&Hs(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),o._fadeAnimated&&Hs(this._container,1),this.bringToFront(),this.options.interactive&&(at(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(o){o._fadeAnimated?(Hs(this._container,0),this._removeTimeout=setTimeout(d(Ht,void 0,this._container),200)):Ht(this._container),this.options.interactive&&(Vt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(o){return this._latlng=Ne(o),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(o){return this._content=o,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var o={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ea(this._container),this},bringToBack:function(){return this._map&&kr(this._container),this},_prepareOpen:function(o){var u=this._source;if(!u._map)return!1;if(u instanceof Tr){u=null;var y=this._source._layers;for(var S in y)if(y[S]._map){u=y[S];break}if(!u)return!1;this._source=u}if(!o)if(u.getCenter)o=u.getCenter();else if(u.getLatLng)o=u.getLatLng();else if(u.getBounds)o=u.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(o),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var o=this._contentNode,u=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof u=="string")o.innerHTML=u;else{for(;o.hasChildNodes();)o.removeChild(o.firstChild);o.appendChild(u)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var o=this._map.latLngToLayerPoint(this._latlng),u=ne(this.options.offset),y=this._getAnchor();this._zoomAnimated?ds(this._container,o.add(y)):u=u.add(o).add(y);var S=this._containerBottom=-u.y,T=this._containerLeft=-Math.round(this._containerWidth/2)+u.x;this._container.style.bottom=S+"px",this._container.style.left=T+"px"}},_getAnchor:function(){return[0,0]}});xt.include({_initOverlay:function(o,u,y,S){var T=u;return T instanceof o||(T=new o(S).setContent(u)),y&&T.setLatLng(y),T}}),In.include({_initOverlay:function(o,u,y,S){var T=y;return T instanceof o?(_(T,S),T._source=this):(T=u&&!S?u:new o(S,this),T.setContent(y)),T}});var Ec=Xn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(o){return o=arguments.length?o:this._source._map,!o.hasLayer(this)&&o._popup&&o._popup.options.autoClose&&o.removeLayer(o._popup),o._popup=this,Xn.prototype.openOn.call(this,o)},onAdd:function(o){Xn.prototype.onAdd.call(this,o),o.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ni||this._source.on("preclick",Kn))},onRemove:function(o){Xn.prototype.onRemove.call(this,o),o.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ni||this._source.off("preclick",Kn))},getEvents:function(){var o=Xn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(o.preclick=this.close),this.options.keepInView&&(o.moveend=this._adjustPan),o},_initLayout:function(){var o="leaflet-popup",u=this._container=lt("div",o+" "+(this.options.className||"")+" leaflet-zoom-animated"),y=this._wrapper=lt("div",o+"-content-wrapper",u);if(this._contentNode=lt("div",o+"-content",y),Qo(u),xc(this._contentNode),rt(u,"contextmenu",Kn),this._tipContainer=lt("div",o+"-tip-container",u),this._tip=lt("div",o+"-tip",this._tipContainer),this.options.closeButton){var S=this._closeButton=lt("a",o+"-close-button",u);S.setAttribute("role","button"),S.setAttribute("aria-label","Close popup"),S.href="#close",S.innerHTML='<span aria-hidden="true">&#215;</span>',rt(S,"click",function(T){rs(T),this.close()},this)}},_updateLayout:function(){var o=this._contentNode,u=o.style;u.width="",u.whiteSpace="nowrap";var y=o.offsetWidth;y=Math.min(y,this.options.maxWidth),y=Math.max(y,this.options.minWidth),u.width=y+1+"px",u.whiteSpace="",u.height="";var S=o.offsetHeight,T=this.options.maxHeight,O="leaflet-popup-scrolled";T&&S>T?(u.height=T+"px",at(o,O)):Vt(o,O),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),y=this._getAnchor();ds(this._container,u.add(y))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,u=parseInt(qo(this._container,"marginBottom"),10)||0,y=this._container.offsetHeight+u,S=this._containerWidth,T=new B(this._containerLeft,-y-this._containerBottom);T._add(Cr(this._container));var O=o.layerPointToContainerPoint(T),$=ne(this.options.autoPanPadding),Z=ne(this.options.autoPanPaddingTopLeft||$),se=ne(this.options.autoPanPaddingBottomRight||$),ue=o.getSize(),Te=0,Qe=0;O.x+S+se.x>ue.x&&(Te=O.x+S-ue.x+se.x),O.x-Te-Z.x<0&&(Te=O.x-Z.x),O.y+y+se.y>ue.y&&(Qe=O.y+y-ue.y+se.y),O.y-Qe-Z.y<0&&(Qe=O.y-Z.y),(Te||Qe)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([Te,Qe]))}},_getAnchor:function(){return ne(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),$a=function(o,u){return new Ec(o,u)};xt.mergeOptions({closePopupOnClick:!0}),xt.include({openPopup:function(o,u,y){return this._initOverlay(Ec,o,u,y).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),In.include({bindPopup:function(o,u){return this._popup=this._initOverlay(Ec,this._popup,o,u),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof Tr||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Dn(o);var u=o.layer||o.target;if(this._popup._source===u&&!(u instanceof ni)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=u,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var Ua=Xn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){Xn.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){Xn.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=Xn.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",u=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=lt("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+m(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var u,y,S=this._map,T=this._container,O=S.latLngToContainerPoint(S.getCenter()),$=S.layerPointToContainerPoint(o),Z=this.options.direction,se=T.offsetWidth,ue=T.offsetHeight,Te=ne(this.options.offset),Qe=this._getAnchor();Z==="top"?(u=se/2,y=ue):Z==="bottom"?(u=se/2,y=0):Z==="center"?(u=se/2,y=ue/2):Z==="right"?(u=0,y=ue/2):Z==="left"?(u=se,y=ue/2):$.x<O.x?(Z="right",u=0,y=ue/2):(Z="left",u=se+(Te.x+Qe.x)*2,y=ue/2),o=o.subtract(ne(u,y,!0)).add(Te).add(Qe),Vt(T,"leaflet-tooltip-right"),Vt(T,"leaflet-tooltip-left"),Vt(T,"leaflet-tooltip-top"),Vt(T,"leaflet-tooltip-bottom"),at(T,"leaflet-tooltip-"+Z),ds(T,o)},_updatePosition:function(){var o=this._map.latLngToLayerPoint(this._latlng);this._setPosition(o)},setOpacity:function(o){this.options.opacity=o,this._container&&Hs(this._container,o)},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center);this._setPosition(u)},_getAnchor:function(){return ne(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),nl=function(o,u){return new Ua(o,u)};xt.include({openTooltip:function(o,u,y){return this._initOverlay(Ua,o,u,y).openOn(this),this},closeTooltip:function(o){return o.close(),this}}),In.include({bindTooltip:function(o,u){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ua,this._tooltip,o,u),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(o){if(!(!o&&this._tooltipHandlersAdded)){var u=o?"off":"on",y={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?y.add=this._openTooltip:(y.mouseover=this._openTooltip,y.mouseout=this.closeTooltip,y.click=this._openTooltip,this._map?this._addFocusListeners():y.add=this._addFocusListeners),this._tooltip.options.sticky&&(y.mousemove=this._moveTooltip),this[u](y),this._tooltipHandlersAdded=!o}},openTooltip:function(o){return this._tooltip&&(this instanceof Tr||(this._tooltip._source=this),this._tooltip._prepareOpen(o)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(o){return this._tooltip&&this._tooltip.setContent(o),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(o){var u=typeof o.getElement=="function"&&o.getElement();u&&(rt(u,"focus",function(){this._tooltip._source=o,this.openTooltip()},this),rt(u,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(o){var u=typeof o.getElement=="function"&&o.getElement();u&&u.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(o){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var u=this;this._map.once("moveend",function(){u._openOnceFlag=!1,u._openTooltip(o)});return}this._tooltip._source=o.layer||o.target,this.openTooltip(this._tooltip.options.sticky?o.latlng:void 0)}},_moveTooltip:function(o){var u=o.latlng,y,S;this._tooltip.options.sticky&&o.originalEvent&&(y=this._map.mouseEventToContainerPoint(o.originalEvent),S=this._map.containerPointToLayerPoint(y),u=this._map.layerPointToLatLng(S)),this._tooltip.setLatLng(u)}});var Ac=Hi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(o){var u=o&&o.tagName==="DIV"?o:document.createElement("div"),y=this.options;if(y.html instanceof Element?(uc(u),u.appendChild(y.html)):u.innerHTML=y.html!==!1?y.html:"",y.bgPos){var S=ne(y.bgPos);u.style.backgroundPosition=-S.x+"px "+-S.y+"px"}return this._setIconStyles(u,"icon"),u},createShadow:function(){return null}});function Yf(o){return new Ac(o)}Hi.Default=Fa;var ii=In.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ve.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(o){_(this,o)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(o){o._addZoomLimit(this)},onRemove:function(o){this._removeAllTiles(),Ht(this._container),o._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ea(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(kr(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(o){return this.options.opacity=o,this._updateOpacity(),this},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var o=this._clampZoom(this._map.getZoom());o!==this._tileZoom&&(this._tileZoom=o,this._updateLevels()),this._update()}return this},getEvents:function(){var o={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=x(this._onMoveEnd,this.options.updateInterval,this)),o.move=this._onMove),this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},createTile:function(){return document.createElement("div")},getTileSize:function(){var o=this.options.tileSize;return o instanceof B?o:new B(o,o)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(o){for(var u=this.getPane().children,y=-o(-1/0,1/0),S=0,T=u.length,O;S<T;S++)O=u[S].style.zIndex,u[S]!==this._container&&O&&(y=o(y,+O));isFinite(y)&&(this.options.zIndex=y+o(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ve.ielt9){Hs(this._container,this.options.opacity);var o=+new Date,u=!1,y=!1;for(var S in this._tiles){var T=this._tiles[S];if(!(!T.current||!T.loaded)){var O=Math.min(1,(o-T.loaded)/200);Hs(T.el,O),O<1?u=!0:(T.active?y=!0:this._onOpaqueTile(T),T.active=!0)}}y&&!this._noPrune&&this._pruneTiles(),u&&(xe(this._fadeFrame),this._fadeFrame=le(this._updateOpacity,this))}},_onOpaqueTile:g,_initContainer:function(){this._container||(this._container=lt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var o=this._tileZoom,u=this.options.maxZoom;if(o!==void 0){for(var y in this._levels)y=Number(y),this._levels[y].el.children.length||y===o?(this._levels[y].el.style.zIndex=u-Math.abs(o-y),this._onUpdateLevel(y)):(Ht(this._levels[y].el),this._removeTilesAtZoom(y),this._onRemoveLevel(y),delete this._levels[y]);var S=this._levels[o],T=this._map;return S||(S=this._levels[o]={},S.el=lt("div","leaflet-tile-container leaflet-zoom-animated",this._container),S.el.style.zIndex=u,S.origin=T.project(T.unproject(T.getPixelOrigin()),o).roun
579d(),S.zoom=o,this._setZoomTransform(S,T.getCenter(),T.getZoom()),g(S.el.offsetWidth),this._onCreateLevel(S)),this._level=S,S}},_onUpdateLevel:g,_onRemoveLevel:g,_onCreateLevel:g,_pruneTiles:function(){if(this._map){var o,u,y=this._map.getZoom();if(y>this.options.maxZoom||y<this.options.minZoom){this._removeAllTiles();return}for(o in this._tiles)u=this._tiles[o],u.retain=u.current;for(o in this._tiles)if(u=this._tiles[o],u.current&&!u.active){var S=u.coords;this._retainParent(S.x,S.y,S.z,S.z-5)||this._retainChildren(S.x,S.y,S.z,S.z+2)}for(o in this._tiles)this._tiles[o].retain||this._removeTile(o)}},_removeTilesAtZoom:function(o){for(var u in this._tiles)this._tiles[u].coords.z===o&&this._removeTile(u)},_removeAllTiles:function(){for(var o in this._tiles)this._removeTile(o)},_invalidateAll:function(){for(var o in this._levels)Ht(this._levels[o].el),this._onRemoveLevel(Number(o)),delete this._levels[o];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(o,u,y,S){var T=Math.floor(o/2),O=Math.floor(u/2),$=y-1,Z=new B(+T,+O);Z.z=+$;var se=this._tileCoordsToKey(Z),ue=this._tiles[se];return ue&&ue.active?(ue.retain=!0,!0):(ue&&ue.loaded&&(ue.retain=!0),$>S?this._retainParent(T,O,$,S):!1)},_retainChildren:function(o,u,y,S){for(var T=2*o;T<2*o+2;T++)for(var O=2*u;O<2*u+2;O++){var $=new B(T,O);$.z=y+1;var Z=this._tileCoordsToKey($),se=this._tiles[Z];if(se&&se.active){se.retain=!0;continue}else se&&se.loaded&&(se.retain=!0);y+1<S&&this._retainChildren(T,O,y+1,S)}},_resetView:function(o){var u=o&&(o.pinch||o.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),u,u)},_animateZoom:function(o){this._setView(o.center,o.zoom,!0,o.noUpdate)},_clampZoom:function(o){var u=this.options;return u.minNativeZoom!==void 0&&o<u.minNativeZoom?u.minNativeZoom:u.maxNativeZoom!==void 0&&u.maxNativeZoom<o?u.maxNativeZoom:o},_setView:function(o,u,y,S){var T=Math.round(u);this.options.maxZoom!==void 0&&T>this.options.maxZoom||this.options.minZoom!==void 0&&T<this.options.minZoom?T=void 0:T=this._clampZoom(T);var O=this.options.updateWhenZooming&&T!==this._tileZoom;(!S||O)&&(this._tileZoom=T,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),T!==void 0&&this._update(o),y||this._pruneTiles(),this._noPrune=!!y),this._setZoomTransforms(o,u)},_setZoomTransforms:function(o,u){for(var y in this._levels)this._setZoomTransform(this._levels[y],o,u)},_setZoomTransform:function(o,u,y){var S=this._map.getZoomScale(y,o.zoom),T=o.origin.multiplyBy(S).subtract(this._map._getNewPixelOrigin(u,y)).round();Ve.any3d?Rn(o.el,T,S):ds(o.el,T)},_resetGrid:function(){var o=this._map,u=o.options.crs,y=this._tileSize=this.getTileSize(),S=this._tileZoom,T=this._map.getPixelWorldBounds(this._tileZoom);T&&(this._globalTileRange=this._pxBoundsToTileRange(T)),this._wrapX=u.wrapLng&&!this.options.noWrap&&[Math.floor(o.project([0,u.wrapLng[0]],S).x/y.x),Math.ceil(o.project([0,u.wrapLng[1]],S).x/y.y)],this._wrapY=u.wrapLat&&!this.options.noWrap&&[Math.floor(o.project([u.wrapLat[0],0],S).y/y.x),Math.ceil(o.project([u.wrapLat[1],0],S).y/y.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(o){var u=this._map,y=u._animatingZoom?Math.max(u._animateToZoom,u.getZoom()):u.getZoom(),S=u.getZoomScale(y,this._tileZoom),T=u.project(o,this._tileZoom).floor(),O=u.getSize().divideBy(S*2);return new U(T.subtract(O),T.add(O))},_update:function(o){var u=this._map;if(u){var y=this._clampZoom(u.getZoom());if(o===void 0&&(o=u.getCenter()),this._tileZoom!==void 0){var S=this._getTiledPixelBounds(o),T=this._pxBoundsToTileRange(S),O=T.getCenter(),$=[],Z=this.options.keepBuffer,se=new U(T.getBottomLeft().subtract([Z,-Z]),T.getTopRight().add([Z,-Z]));if(!(isFinite(T.min.x)&&isFinite(T.min.y)&&isFinite(T.max.x)&&isFinite(T.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ue in this._tiles){var Te=this._tiles[ue].coords;(Te.z!==this._tileZoom||!se.contains(new B(Te.x,Te.y)))&&(this._tiles[ue].current=!1)}if(Math.abs(y-this._tileZoom)>1){this._setView(o,y);return}for(var Qe=T.min.y;Qe<=T.max.y;Qe++)for(var dt=T.min.x;dt<=T.max.x;dt++){var Ns=new B(dt,Qe);if(Ns.z=this._tileZoom,!!this._isValidTile(Ns)){var vs=this._tiles[this._tileCoordsToKey(Ns)];vs?vs.current=!0:$.push(Ns)}}if($.sort(function(qs,qa){return qs.distanceTo(O)-qa.distanceTo(O)}),$.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ln=document.createDocumentFragment();for(dt=0;dt<$.length;dt++)this._addTile($[dt],ln);this._level.el.appendChild(ln)}}}},_isValidTile:function(o){var u=this._map.options.crs;if(!u.infinite){var y=this._globalTileRange;if(!u.wrapLng&&(o.x<y.min.x||o.x>y.max.x)||!u.wrapLat&&(o.y<y.min.y||o.y>y.max.y))return!1}if(!this.options.bounds)return!0;var S=this._tileCoordsToBounds(o);return be(this.options.bounds).overlaps(S)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var u=this._map,y=this.getTileSize(),S=o.scaleBy(y),T=S.add(y),O=u.unproject(S,o.z),$=u.unproject(T,o.z);return[O,$]},_tileCoordsToBounds:function(o){var u=this._tileCoordsToNwSe(o),y=new je(u[0],u[1]);return this.options.noWrap||(y=this._map.wrapLatLngBounds(y)),y}
vendor: 8,961 bytes, line 579
579,_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var u=o.split(":"),y=new B(+u[0],+u[1]);return y.z=+u[2],y},_removeTile:function(o){var u=this._tiles[o];u&&(Ht(u.el),delete this._tiles[o],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){at(o,"leaflet-tile");var u=this.getTileSize();o.style.width=u.x+"px",o.style.height=u.y+"px",o.onselectstart=g,o.onmousemove=g,Ve.ielt9&&this.options.opacity<1&&Hs(o,this.options.opacity)},_addTile:function(o,u){var y=this._getTilePos(o),S=this._tileCoordsToKey(o),T=this.createTile(this._wrapCoords(o),d(this._tileReady,this,o));this._initTile(T),this.createTile.length<2&&le(d(this._tileReady,this,o,null,T)),ds(T,y),this._tiles[S]={el:T,coords:o,current:!0},u.appendChild(T),this.fire("tileloadstart",{tile:T,coords:o})},_tileReady:function(o,u,y){u&&this.fire("tileerror",{error:u,tile:y,coords:o});var S=this._tileCoordsToKey(o);y=this._tiles[S],y&&(y.loaded=+new Date,this._map._fadeAnimated?(Hs(y.el,0),xe(this._fadeFrame),this._fadeFrame=le(this._updateOpacity,this)):(y.active=!0,this._pruneTiles()),u||(at(y.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:y.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ve.ielt9||!this._map._fadeAnimated?le(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var u=new B(this._wrapX?p(o.x,this._wrapX):o.x,this._wrapY?p(o.y,this._wrapY):o.y);return u.z=o.z,u},_pxBoundsToTileRange:function(o){var u=this.getTileSize();return new U(o.min.unscaleBy(u).floor(),o.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function Va(o){return new ii(o)}var ai=ii.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,u){this._url=o,u=_(this,u),u.detectRetina&&Ve.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,u){return this._url===o&&u===void 0&&(u=!0),this._url=o,u||this.redraw(),this},createTile:function(o,u){var y=document.createElement("img");return rt(y,"load",d(this._tileOnLoad,this,u,y)),rt(y,"error",d(this._tileOnError,this,u,y)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(y.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(y.referrerPolicy=this.options.referrerPolicy),y.alt="",y.src=this.getTileUrl(o),y},getTileUrl:function(o){var u={r:Ve.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var y=this._globalTileRange.max.y-o.y;this.options.tms&&(u.y=y),u["-y"]=y}return M(this._url,i(u,this.options))},_tileOnLoad:function(o,u){Ve.ielt9?setTimeout(d(o,this,null,u),0):o(null,u)},_tileOnError:function(o,u,y){var S=this.options.errorTileUrl;S&&u.getAttribute("src")!==S&&(u.src=S),o(y,u)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,u=this.options.maxZoom,y=this.options.zoomReverse,S=this.options.zoomOffset;return y&&(o=u-o),o+S},_getSubdomain:function(o){var u=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var o,u;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(u=this._tiles[o].el,u.onload=g,u.onerror=g,!u.complete)){u.src=I;var y=this._tiles[o].coords;Ht(u),delete this._tiles[o],this.fire("tileabort",{tile:u,coords:y})}},_removeTile:function(o){var u=this._tiles[o];if(u)return u.el.setAttribute("src",I),ii.prototype._removeTile.call(this,o)},_tileReady:function(o,u,y){if(!(!this._map||y&&y.getAttribute("src")===I))return ii.prototype._tileReady.call(this,o,u,y)}});function Cu(o,u){return new ai(o,u)}var rl=ai.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,u){this._url=o;var y=i({},this.defaultWmsParams);for(var S in u)S in this.options||(y[S]=u[S]);u=_(this,u);var T=u.detectRetina&&Ve.retina?2:1,O=this.getTileSize();y.width=O.x*T,y.height=O.y*T,this.wmsParams=y},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,ai.prototype.onAdd.call(this,o)},getTileUrl:function(o){var u=this._tileCoordsToNwSe(o),y=this._crs,S=ie(y.project(u[0]),y.project(u[1])),T=S.min,O=S.max,$=(this._wmsVersion>=1.3&&this._crs===Bf?[T.y,T.x,O.y,O.x]:[T.x,T.y,O.x,O.y]).join(","),Z=ai.prototype.getTileUrl.call(this,o);return Z+C(this.wmsParams,Z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$},setParams:function(o,u){return i(this.wmsParams,o),u||this.redraw(),this}});function qf(o,u){return new rl(o,u)}ai.WMS=rl,Cu.wms=qf;var Jn=In.extend({options:{padding:.1},initialize:function(o){_(this,o),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),at(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,u){var y=this._map.getZoomScale(u,this._zoom),S=this._map.getSize().multiplyBy(.5+this.options.padding),T=this._map.project(this._center,u),O=S.multiplyBy(-y).add(T).subtract(this._map._getNewPixelOrigin(o,u));Ve.any3d?Rn(this._container,O,y):ds(this._container,O)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,u=this._map.getSize(),y=this._map.containerPointToLayerPoint(u.multiplyBy(-o)).round();this._bounds=new U(y,y.add(u.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Pu=Jn.extend({options:{tolerance:0},getEvents:function(){var o=Jn.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Jn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");rt(o,"mousemove",this._onMouseMove,this),rt(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),rt(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){xe(this._redrawRequest),delete this._ctx,Ht(this._container),Dt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var u in this._layers)o=this._layers[u],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jn.prototype._update.call(this);var o=this._bounds,u=this._container,y=o.getSize(),S=Ve.retina?2:1;ds(u,o.min),u.width=S*y.x,u.height=S*y.y,u.style.width=y.x+"px",u.style.height=y.y+"px",Ve.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){Jn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[m(o)]=o;var u=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var u=o._order,y=u.next,S=u.prev;y?y.prev=S:this._drawLast=S,S?S.next=y:this._drawFirst=y,delete o._order,delete this._layers[m(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)}
579,_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var u=o.options.dashArray.split(/[, ]+/),y=[],S,T;for(T=0;T<u.length;T++){if(S=Number(u[T]),isNaN(S))return;y.push(S)}o.options._dashArray=y}else o.options._dashArray=o.options.dashArray},_requestRedraw:function(o){this._map&&(this._extendRedrawBounds(o),this._redrawRequest=this._redrawRequest||le(this._redraw,this))},_extendRedrawBounds:function(o){if(o._pxBounds){var u=(o.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new U,this._redrawBounds.extend(o._pxBounds.min.subtract([u,u])),this._redrawBounds.extend(o._pxBounds.max.add([u,u]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var o=this._redrawBounds;if(o){var u=o.getSize();this._ctx.clearRect(o.min.x,o.min.y,u.x,u.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var o,u=this._redrawBounds;if(this._ctx.save(),u){var y=u.getSize();this._ctx.beginPath(),this._ctx.rect(u.min.x,u.min.y,y.x,y.y),this._ctx.clip()}this._drawing=!0;for(var S=this._drawFirst;S;S=S.next)o=S.layer,(!u||o._pxBounds&&o._pxBounds.intersects(u))&&o._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(o,u){if(this._drawing){var y,S,T,O,$=o._parts,Z=$.length,se=this._ctx;if(Z){for(se.beginPath(),y=0;y<Z;y++){for(S=0,T=$[y].length;S<T;S++)O=$[y][S],se[S?"lineTo":"moveTo"](O.x,O.y);u&&se.closePath()}this._fillStroke(se,o)}}},_updateCircle:function(o){if(!(!this._drawing||o._empty())){var u=o._point,y=this._ctx,S=Math.max(Math.round(o._radius),1),T=(Math.max(Math.round(o._radiusY),1)||S)/S;T!==1&&(y.save(),y.scale(1,T)),y.beginPath(),y.arc(u.x,u.y/T,S,0,Math.PI*2,!1),T!==1&&y.restore(),this._fillStroke(y,o)}},_fillStroke:function(o,u){var y=u.options;y.fill&&(o.globalAlpha=y.fillOpacity,o.fillStyle=y.fillColor||y.color,o.fill(y.fillRule||"evenodd")),y.stroke&&y.weight!==0&&(o.setLineDash&&o.setLineDash(u.options&&u.options._dashArray||[]),o.globalAlpha=y.opacity,o.lineWidth=y.weight,o.strokeStyle=y.color,o.lineCap=y.lineCap,o.lineJoin=y.lineJoin,o.stroke())},_onClick:function(o){for(var u=this._map.mouseEventToLayerPoint(o),y,S,T=this._drawFirst;T;T=T.next)y=T.layer,y.options.interactive&&y._containsPoint(u)&&(!(o.type==="click"||o.type==="preclick")||!this._map._draggableMoved(y))&&(S=y);this._fireEvent(S?[S]:!1,o)},_onMouseMove:function(o){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var u=this._map.mouseEventToLayerPoint(o);this._handleMouseHover(o,u)}},_handleMouseOut:function(o){var u=this._hoveredLayer;u&&(Vt(this._container,"leaflet-interactive"),this._fireEvent([u],o,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(o,u){if(!this._mouseHoverThrottled){for(var y,S,T=this._drawFirst;T;T=T.next)y=T.layer,y.options.interactive&&y._containsPoint(u)&&(S=y);S!==this._hoveredLayer&&(this._handleMouseOut(o),S&&(at(this._container,"leaflet-interactive"),this._fireEvent([S],o,"mouseover"),this._hoveredLayer=S)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,o),this._mouseHoverThrottled=!0,setTimeout(d(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(o,u,y){this._map._fireDOMEvent(u,y||u.type,o)},_bringToFront:function(o){var u=o._order;if(u){var y=u.next,S=u.prev;if(y)y.prev=S;else return;S?S.next=y:y&&(this._drawFirst=y),u.prev=this._drawLast,this._drawLast.next=u,u.next=null,this._drawLast=u,this._requestRedraw(o)}},_bringToBack:function(o){var u=o._order;if(u){var y=u.next,S=u.prev;if(S)S.next=y;else return;y?y.prev=S:S&&(this._drawLast=S),u.prev=null,u.next=this._drawFirst,this._drawFirst.prev=u,this._drawFirst=u,this._requestRedraw(o)}}});function Tu(o){return Ve.canvas?new Pu(o):null}var Wa=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(o){return document.createElement("<lvml:"+o+' class="lvml">')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Gf={_initContainer:function(){this._container=lt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Jn.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var u=o._container=Wa("shape");at(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",o._path=Wa("path"),u.appendChild(o._path),this._updateStyle(o),this._layers[m(o)]=o},_addPath:function(o){var u=o._container;this._container.appendChild(u),o.options.interactive&&o.addInteractiveTarget(u)},_removePath:function(o){var u=o._container;Ht(u),o.removeInteractiveTarget(u),delete this._layers[m(o)]},_updateStyle:function(o){var u=o._stroke,y=o._fill,S=o.options,T=o._container;T.stroked=!!S.stroke,T.filled=!!S.fill,S.stroke?(u||(u=o._stroke=Wa("stroke")),T.appendChild(u),u.weight=S.weight+"px",u.color=S.color,u.opacity=S.opacity,S.dashArray?u.dashStyle=E(S.dashArray)?S.dashArray.join(" "):S.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=S.lineCap.replace("butt","flat"),u.joinstyle=S.lineJoin):u&&(T.removeChild(u),o._stroke=null),S.fill?(y||(y=o._fill=Wa("fill")),T.appendChild(y),y.color=S.fillColor||S.color,y.opacity=S.fillOpacity):y&&(T.removeChild(y),o._fill=null)},_updateCircle:function(o){var u=o._point.round(),y=Math.round(o._radius),S=Math.round(o._radiusY||y);this._setPath(o,o._empty()?"M0 0":"AL "+u.x+","+u.y+" "+y+","+S+" 0,"+65535*360)},_setPath:function(o,u){o._path.v=u},_bringToFront:function(o){Ea(o._container)},_bringToBack:function(o){kr(o._container)}},Bn=Ve.vml?Wa:Nr,Yi=Jn.extend({_initContainer:function(){this._container=Bn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Bn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ht(this._container),Dt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jn.prototype._update.call(this);var o=this._bounds,u=o.getSize(),y=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,y.setAttribute("width",u.x),y.setAttribute("height",u.y)),ds(y,o.min),y.setAttribute("viewBox",[o.min.x,o.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(o){var u=o._path=Bn("path");o.options.className&&at(u,o.options.className),o.options.interactive&&at(u,"leaflet-interactive"),this._updateStyle(o),this._layers[m(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){Ht(o._path),o.removeInteractiveTarget(o._path),delete this._layers[m(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var u=o._path,y=o.options;u&&(y.stroke?(u.setAttribute("stroke",y.color),u.setAttribute("stroke-opacity",y.opacity),u.setAttribute("stroke-width",y.weight),u.setAttribute("stroke-linecap",y.lineCap),u.setAttribute("stroke-linejoin",y.lineJoin),y.dashArray?u.setAttribute("stroke-dasharray",y.dashArray):u.removeAttribute("stroke-dasharray"),y.dashOffset?u.setAttribute("stroke-dashoffset",y.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),y.fill?(u.setAttribute("fill",y.fillColor||y.c
579olor),u.setAttribute("fill-opacity",y.fillOpacity),u.setAttribute("fill-rule",y.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(o,u){this._setPath(o,Sr(o._parts,u))},_updateCircle:function(o){var u=o._point,y=Math.max(Math.round(o._radius),1),S=Math.max(Math.round(o._radiusY),1)||y,T="a"+y+","+S+" 0 1,0 ",O=o._empty()?"M0 0":"M"+(u.x-y)+","+u.y+T+y*2+",0 "+T+-y*2+",0 ";this._setPath(o,O)},_setPath:function(o,u){o._path.setAttribute("d",u)},_bringToFront:function(o){Ea(o._path)},_bringToBack:function(o){kr(o._path)}});Ve.vml&&Yi.include(Gf);function Mc(o){return Ve.svg||Ve.vml?new Yi(o):null}xt.include({getRenderer:function(o){var u=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var u=this._paneRenderers[o];return u===void 0&&(u=this._createRenderer({pane:o}),this._paneRenderers[o]=u),u},_createRenderer:function(o){return this.options.preferCanvas&&Tu(o)||Mc(o)}});var Zf=Ar.extend({initialize:function(o,u){Ar.prototype.initialize.call(this,this._boundsToLatLngs(o),u)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))}
vendor: 9,887 bytes, line 579
579,_boundsToLatLngs:function(o){return o=be(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function _x(o,u){return new Zf(o,u)}Yi.create=Bn,Yi.pointsToPath=Sr,Qn.geometryToLayer=Ba,Qn.coordsToLatLng=kc,Qn.coordsToLatLngs=sl,Qn.latLngToCoords=Cc,Qn.latLngsToCoords=Pc,Qn.getFeature=za,Qn.asFeature=Tc,xt.mergeOptions({boxZoom:!0});var Ha=pn.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){rt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Dt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ht(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),vt(),mc(),this._startPoint=this._map.mouseEventToContainerPoint(o),rt(document,{contextmenu:Dn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=lt("div","leaflet-zoom-box",this._container),at(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var u=new U(this._point,this._startPoint),y=u.getSize();ds(this._box,u.min),this._box.style.width=y.x+"px",this._box.style.height=y.y+"px"},_finish:function(){this._moved&&(Ht(this._box),Vt(this._container,"leaflet-crosshair")),Ra(),pc(),Dt(document,{contextmenu:Dn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(d(this._resetState,this),0);var u=new je(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});xt.addInitHook("addHandler","boxZoom",Ha),xt.mergeOptions({doubleClickZoom:!0});var Kf=pn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var u=this._map,y=u.getZoom(),S=u.options.zoomDelta,T=o.originalEvent.shiftKey?y-S:y+S;u.options.doubleClickZoom==="center"?u.setZoom(T):u.setZoomAround(o.containerPoint,T)}});xt.addInitHook("addHandler","doubleClickZoom",Kf),xt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Eu=pn.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new On(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}at(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Vt(this._map._container,"leaflet-grab"),Vt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=be(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var u=this._lastTime=+new Date,y=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(y),this._times.push(u),this._prunePositions(u)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,u){return o-(o-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;o.x<u.min.x&&(o.x=this._viscousLimit(o.x,u.min.x)),o.y<u.min.y&&(o.y=this._viscousLimit(o.y,u.min.y)),o.x>u.max.x&&(o.x=this._viscousLimit(o.x,u.max.x)),o.y>u.max.y&&(o.y=this._viscousLimit(o.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,u=Math.round(o/2),y=this._initialWorldOffset,S=this._draggable._newPos.x,T=(S-u+y)%o+u-y,O=(S+u+y)%o-u-y,$=Math.abs(T+y)<Math.abs(O+y)?T:O;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=$},_onDragEnd:function(o){var u=this._map,y=u.options,S=!y.inertia||o.noInertia||this._times.length<2;if(u.fire("dragend",o),S)u.fire("moveend");else{this._prunePositions(+new Date);var T=this._lastPos.subtract(this._positions[0]),O=(this._lastTime-this._times[0])/1e3,$=y.easeLinearity,Z=T.multiplyBy($/O),se=Z.distanceTo([0,0]),ue=Math.min(y.inertiaMaxSpeed,se),Te=Z.multiplyBy(ue/se),Qe=ue/(y.inertiaDeceleration*$),dt=Te.multiplyBy(-Qe/2).round();!dt.x&&!dt.y?u.fire("moveend"):(dt=u._limitOffset(dt,u.options.maxBounds),le(function(){u.panBy(dt,{duration:Qe,easeLinearity:$,noMoveStart:!0,animate:!0})}))}}});xt.addInitHook("addHandler","dragging",Eu),xt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Au=pn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(o){this._map=o,this._setPanDelta(o.options.keyboardPanDelta),this._setZoomDelta(o.options.zoomDelta)},addHooks:function(){var o=this._map._container;o.tabIndex<=0&&(o.tabIndex="0"),rt(o,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Dt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var o=document.body,u=document.documentElement,y=o.scrollTop||u.scrollTop,S=o.scrollLeft||u.scrollLeft;this._map._container.focus(),window.scrollTo(S,y)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(o){var u=this._panKeys={},y=this.keyCodes,S,T;for(S=0,T=y.left.length;S<T;S++)u[y.left[S]]=[-1*o,0];for(S=0,T=y.right.length;S<T;S++)u[y.right[S]]=[o,0];for(S=0,T=y.down.length;S<T;S++)u[y.down[S]]=[0,o];for(S=0,T=y.up.length;S<T;S++)u[y.up[S]]=[0,-1*o]},_setZoomDelta:function(o){var u=this._zoomKeys={},y=this.keyCodes,S,T;for(S=0,T=y.zoomIn.length;S<T;S++)u[y.zoomIn[S]]=o;for(S=0,T=y.zoomOut.length;S<T;S++)u[y.zoomOut[S]]=-o},_addHooks:function(){rt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Dt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(o){if(!(o.altKey||o.ctrlKey||o.metaKey)){var u=o.keyCode,y=this._map,S;if(u in this._panKeys){if(!y._panAnim||!y._panAnim._inProgress)if(S=this._panKeys[u],o.shiftKey&&(S=ne(S).multiplyBy(3)),y.options.maxBounds&&(S=y._limitOffset(ne(S),y.options.maxBounds)),y.options.worldCopyJump){var T=y.wrapLatLng(y.unproject(y.project(y.getCenter()).add(S)));y.panTo(T)}else y.panBy(S)}else if(u in this._zoomKeys)y.setZoom(y.getZoom()+(o.shiftKey?3:1)*this._zoomKeys[u]);else if(u===27&&y._popup&&y._popup.options.closeOnEscapeKey)y.closePopup();else return;Dn(o)}}});xt.addInitHook("addHandler","keyboard",Au),xt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ot=pn.extend({addHooks:function(){rt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Dt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(o){var u=Af(o),y=this._map.options.wheelDebounceTime;this._delta+=u,this._lastMousePos=this._map.mouseEventToContainerPoint(o),this._startTime||(this._startTime=+new Date);var S=Math.max(y-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(d(this._performZoom,this),S),Dn(o)},_performZoom:function(){var o=this._map,u=o.getZoom(),y=this._map.options.zoomSnap||0;o._stop();var S=this._delta/(this._map.options.wheelPxPerZoomLevel*4),T=4*Math.log(2/(1+Math.exp(-Math.abs(S))))/Math.LN2,O=y?Math.ceil(T/y)*y:T,$=o._limitZoom(u+(this._delta>0?O:-O))-u;this._delta=0,this._startTime=null,$&&(o.options.scrollWheelZoom==="center"?o.setZoom(u+$):o.setZoomAround(this._lastMousePos,u+$))}});xt.addInitHook("addHandler","scrollWheelZoom",Ot);var Mu=600;xt.mergeOptions({tapHold:Ve.touchNative&&Ve.safari&&Ve.mobile,tapTolerance:15});var il=pn.extend({addHooks:function(){rt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Dt(this._map._container,"touchstart",this._onDown,this)}
579,_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var u=o.touches[0];this._startPos=this._newPos=new B(u.clientX,u.clientY),this._holdTimeout=setTimeout(d(function(){this._cancel(),this._isTapValid()&&(rt(document,"touchend",rs),rt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),Mu),rt(document,"touchend touchcancel contextmenu",this._cancel,this),rt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Dt(document,"touchend",rs),Dt(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Dt(document,"touchend touchcancel contextmenu",this._cancel,this),Dt(document,"touchmove",this._onMove,this)},_onMove:function(o){var u=o.touches[0];this._newPos=new B(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,u){var y=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});y._simulated=!0,u.target.dispatchEvent(y)}});xt.addInitHook("addHandler","tapHold",il),xt.mergeOptions({touchZoom:Ve.touch,bounceAtZoomLimits:!0});var Ya=pn.extend({addHooks:function(){at(this._map._container,"leaflet-touch-zoom"),rt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Vt(this._map._container,"leaflet-touch-zoom"),Dt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var u=this._map;if(!(!o.touches||o.touches.length!==2||u._animatingZoom||this._zooming)){var y=u.mouseEventToContainerPoint(o.touches[0]),S=u.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(y.add(S)._divideBy(2))),this._startDist=y.distanceTo(S),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),rt(document,"touchmove",this._onTouchMove,this),rt(document,"touchend touchcancel",this._onTouchEnd,this),rs(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var u=this._map,y=u.mouseEventToContainerPoint(o.touches[0]),S=u.mouseEventToContainerPoint(o.touches[1]),T=y.distanceTo(S)/this._startDist;if(this._zoom=u.getScaleZoom(T,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoom<u.getMinZoom()&&T<1||this._zoom>u.getMaxZoom()&&T>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,T===1)return}else{var O=y._add(S)._divideBy(2)._subtract(this._centerPoint);if(T===1&&O.x===0&&O.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(O),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),xe(this._animRequest);var $=d(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=le($,this,!0),rs(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,xe(this._animRequest),Dt(document,"touchmove",this._onTouchMove,this),Dt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});xt.addInitHook("addHandler","touchZoom",Ya),xt.BoxZoom=Ha,xt.DoubleClickZoom=Kf,xt.Drag=Eu,xt.Keyboard=Au,xt.ScrollWheelZoom=Ot,xt.TapHold=il,xt.TouchZoom=Ya,n.Bounds=U,n.Browser=Ve,n.CRS=he,n.Canvas=Pu,n.Circle=Nc,n.CircleMarker=jc,n.Class=ke,n.Control=an,n.DivIcon=Ac,n.DivOverlay=Xn,n.DomEvent=yc,n.DomUtil=Ko,n.Draggable=On,n.Evented=_e,n.FeatureGroup=Tr,n.GeoJSON=Qn,n.GridLayer=ii,n.Handler=pn,n.Icon=Hi,n.ImageOverlay=ri,n.LatLng=Se,n.LatLngBounds=je,n.Layer=In,n.LayerGroup=si,n.LineUtil=Ff,n.Map=xt,n.Marker=Er,n.Mixin=pu,n.Path=ni,n.Point=B,n.PolyUtil=ux,n.Polygon=Ar,n.Polyline=on,n.Popup=Ec,n.PosAnimation=vc,n.Projection=gx,n.Rectangle=Zf,n.Renderer=Jn,n.SVG=Yi,n.SVGOverlay=Su,n.TileLayer=ai,n.Tooltip=Ua,n.Transformation=ht,n.Util=Me,n.VideoOverlay=Nu,n.bind=d,n.bounds=ie,n.canvas=Tu,n.circle=tl,n.circleMarker=Uf,n.control=ti,n.divIcon=Yf,n.extend=i,n.featureGroup=zf,n.geoJSON=Vf,n.geoJson=Fn,n.gridLayer=Va,n.icon=$f,n.imageOverlay=Wf,n.latLng=Ne,n.latLngBounds=be,n.layerGroup=el,n.map=ei,n.marker=vx,n.point=ne,n.polygon=wx,n.polyline=bx,n.popup=$a,n.rectangle=_x,n.setOptions=_,n.stamp=m,n.svg=Mc,n.svgOverlay=ku,n.tileLayer=Cu,n.tooltip=nl,n.transformation=ct,n.version=r,n.videoOverlay=Hf;var Qf=window.L;n.noConflict=function(){return window.L=Qf,this},window.L=n}))}
579)(mh,mh.exports)),mh.exports}var ex=BX();function e_(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function t_(e,t){return t==null?function(r,i){const c=b.useRef();return c.current||(c.current=e(r,i)),c}:function(r,i){const c=b.useRef();c.current||(c.current=e(r,i));const d=b.useRef(r),{instance:h}=c.current;return b.useEffect(function(){d.current!==r&&(t(h,r,d.current),d.current=r)},[h,r,i]),c}}function zX(e,t){b.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var c;(c=t.layerContainer)==null||c.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function ZM(e){return function(n){const r=qM(),i=e(Jw(n,r),r);return WM(r.map,n.attribution),GM(i.current,n.eventHandlers),zX(i.current,r),i}}function $X(e,t){const n=t_(e,t),r=ZM(n);return LX(r)}function UX(e,t){const n=t_(e),r=IX(n,t);return DX(r)}function VX(e,t){const n=t_(e,t),r=ZM(n);return OX(r)}function WX(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function F0(){return F0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F0.apply(this,arguments)}function HX({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:c,placeholder:d,style:h,whenReady:m,zoom:x,...p},g){const[w]=b.useState({className:i,id:c,style:h}),[N,j]=b.useState(null);b.useImperativeHandle(g,()=>(N==null?void 0:N.map)??null,[N]);const _=b.useCallback(A=>{if(A!==null&&N===null){const M=new ex.Map(A,p);n!=null&&x!=null?M.setView(n,x):e!=null&&M.fitBounds(e,t),m!=null&&M.whenReady(m),j(MX(M))}},[]);b.useEffect(()=>()=>{N==null||N.map.remove()},[N]);const C=N?Et.createElement(YM,{value:N},r):d??null;return Et.createElement("div",F0({},w,{ref:_}),C)}const YX=b.forwardRef(HX),qX=$X(function({position:t,...n},r){const i=new ex.Marker(t,n);return e_(i,RX(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),GX=UX(function(t,n){const r=new ex.Popup(t,n.overlayContainer);return e_(r,n)},function(t,n,{position:r},i){b.useEffect(function(){const{instance:d}=t;function h(x){x.popup===d&&(d.update(),i(!0))}function m(x){x.popup===d&&i(!1)}return n.map.on({popupopen:h,popupclose:m}),n.overlayContainer==null?(r!=null&&d.setLatLng(r),d.openOn(n.map)):n.overlayContainer.bindPopup(d),function(){var p;n.map.off({popupopen:h,popupclose:m}),(p=n.overlayContainer)==null||p.unbindPopup(),n.map.removeLayer(d)}},[t,n,i,r])}),ZX=VX(function({url:t,...n},r){const i=new ex.TileLayer(t,Jw(n,r));return e_(i,r)},function(t,n,r){WX(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});function KX(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),[i,c]=b.useState(null),[d,h]=b.useState([]);b.useEffect(()=>{m(),x()},[]);const m=async()=>{try{const g=await X.auth.me();t(g)}catch{t(null)}},x=async()=>{try{const g=await X.entities.StowNGoLocker.filter({location_id:"city-storage-savannah",status:"available"});h(g)}catch(g){console.error("Failed to load lockers:",g)}},p=()=>{e?r(!0):X.auth.redirectToLogin(window.location.pathname)};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-coral-50 via-white to-blue-50",children:[s.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-r from-blue-900 to-blue-800 text-white",children:[s.jsx("div",{className:"absolute inset-0 bg-black/10"}),s.jsx("div",{className:"relative max-w-7xl mx-auto px-4 py-16 sm:py-24",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsx(ot,{className:"mb-4 bg-white/20 text-white border-white/30 backdrop-blur-sm",children:"🎉 Savannah Pilot Program"}),s.jsx("div",{className:"flex justify-center lg:justify-start mb-6 lg:ml-12",children:s.jsx("div",{className:"bg-white rounded-xl p-6",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/d67c9bec6_image.png",alt:"Stow-N-Go Savannah",className:"w-64 sm:w-80"})})}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center lg:justify-start",children:[s.jsxs(G,{onClick:p,size:"lg",className:"bg-white text-coral-600 hover:bg-coral-50 text-lg px-8 py-6 h-auto",children:[s.jsx(gh,{className:"w-5 h-5 mr-2"}),"Book Your Locker Now"]}),s.jsx(G,{variant:"outline",size:"lg",className:"bg-white/10 text-white border-white/30 hover:bg-white/20 text-lg px-8 py-6 h-auto backdrop-blur-sm",onClick:p,children:"Book Luggage Storage"})]})]}),s.jsxs("div",{className:"mt-8",children:[s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold mb-6",children:"Welcome to Stow-N-Go Savannah"}),s.jsx("div",{className:"h-[200px] lg:h-[250px] rounded-2xl overflow-hidden shadow-2xl border-4 border-white/20 mb-4",children:s.jsxs(YX,{center:[32.0809,-81.0912],zoom:15,style:{height:"100%",width:"100%"},scrollWheelZoom:!1,children:[s.jsx(ZX,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),s.jsx(qX,{position:[32.0809,-81.0912],children:s.jsx(GX,{children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"font-bold",children:"City Storage Savannah"}),s.jsx("p",{className:"text-sm",children:"Historic Downtown"}),s.jsx("p",{className:"text-xs text-gray-600",children:"24/7 Access"})]})})})]})}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-4 border-2 border-white/20",children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(jt,{className:"w-5 h-5"}),"City Storage - Indian Street"]}),s.jsxs("div",{className:"space-y-2 text-sm text-white/90",children:[s.jsx("p",{children:"560 Indian St"}),s.jsx("p",{children:"Savannah, GA 31401"}),s.jsxs("div",{className:"pt-2 mt-2 border-t border-white/20",children:[s.jsxs("p",{className:"flex items-center gap-2",children:[s.jsx(ld,{className:"w-4 h-4"}),"912-777-7008"]}),s.jsxs("p",{className:"flex items-center gap-2 mt-1",children:[s.jsx(Sp,{className:"w-4 h-4"}),"[email protected]"]})]})]})]})]})]})})]}),s.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[s.jsxs("div",{id:"how-it-works",className:"mb-16",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4 text-gray-900",children:"How Stow-N-Go Works"}),s.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:"Three simple steps to secure, contactless luggage storage"})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[s.jsx(oe,{className:"border-2 border-coral-100 hover:border-coral-300 transition-all",children:s.jsxs(Ce,{children:[s.jsx("div",{className:"w-12 h-12 bg-coral-100 rounded-full flex items-center justify-center mb-4",children:s.jsx(Ds,{className:"w-6 h-6 text-coral-600"})}),s.jsx(Pe,{children:"1. Book Online"}),s.jsx(kn,{children:"Select your locker size, dates, and optional Uber Direct delivery service"})]})}),s.jsx(oe,{className:"border-2 border-coral-100 hover:border-coral-300 transition-all",children:s.jsxs(Ce,{children:[s.jsx("div",{className:"w-12 h-12 bg-coral-100 rounded-full flex items-center justify-center mb-4",children:s.jsx(gh,{className:"w-6 h-6 text-coral-600"})}),s.jsx(Pe,{children:"2. Store Your Bags"}),s.jsx(kn,{children:"Use your unique access code to open your locker and securely store your belongings"})]})}),s.jsx(oe,{className:"border-2 border-coral-100 hover:border-coral-300 transition-all",children:s.jsxs(Ce,{children:[s.jsx("div",{className:"w-12 h-12 bg-coral-100 rounded-full flex items-center justify-center mb-4",children:s.jsx(os,{className:"w-6 h-6 text-coral-600"})}),s.jsx(Pe,{children:"3. Retrieve Anytime"}),s.jsx(kn,{children:"Return 24/7 to pick up your bags, or schedule Uber Direct delivery to your hotel"})]})})]})]}),s.jsx("div",{className:"bg-white rounded-2xl shadow-xl p-8 mb-12 border-2 border-coral-200",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8",children:[s.jsx("div",{className:"flex-1",children:s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/0b8cdba20_stowngosavannah.png",alt:"Stow-N-Go Savannah",className:"rounded-xl shadow-lg w-full"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx(ot,{className:"mb-4 bg-coral-100 text-coral-700",children:"Pilot Partner"}),s.jsx("h2",{className:"text-3xl font-bold mb-4 text-gray-900",children:"City Storage Savannah"}),s.jsxs("div",{className:"space-y-3 text-gray-700",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(jt,{className:"w-5 h-5 text-coral-600 mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"Prime Location"}),s.jsx("p",{className:"text-gray-600",children:"Centrally located in historic downtown Savannah"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ts,{className:"w-5 h-5 text-coral-600 mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"24/7 Access"}),s.jsx("p",{className:"text-gray-600",children:"Secure smart lockers available around the clock"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(So,{className:"w-5 h-5 text-coral-600 mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"Uber Direct Integration"}),s.jsx("p",{className:"text-gray-600",children:"Optional pickup and delivery service to/from hotels and vacation rentals"})]})]})]})]})]})}),s.jsx("div",{className:"mb-16 bg-gradient-to-r from-blue-600 to-blue-700 rounded-2xl shadow-xl p-8 sm:p-12 text-white",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-center",children:[s.jsxs("div",{children:[s.jsx(ot,{className:"mb-4 bg-white/20 text-white border-white/30",children:"Premium Service"}),s.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Uber Direct Pickup & Delivery"}),s.jsx("p",{className:"text-lg mb-6 text-blue-50",children:"Don't want to carry your bags? We'll bring them to you or pick them up from your location."}),s.jsxs("ul",{className:"space-y-3",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(os,{className:"w-5 h-5 text-blue-200 mt-1 flex-shrink-0"}),s.jsx("span",{children:"Same-day pickup from your hotel or vacation rental"})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(os,{className:"w-5 h-5 text-blue-200 mt-1 flex-shrink-0"}),s.jsx("span",{children:"Same-day delivery to your hotel or vacation rental"})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(os,{className:"w-5 h-5 text-blue-200 mt-1 flex-shrink-0"}),s.jsx("span",{children:"Real-time tracking and notifications"})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(os,{className:"w-5 h-5 text-blue-200 mt-1 flex-shrink-0"}),s.jsx("span",{children:"Professional, insured courier service"})]})]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-6 border border-white/20",children:[s.jsx("h3",{className:"text-xl font-semibold mb-4",children:"How to Add Delivery"}),s.jsxs("div",{className:"space-y-3 text-blue-50",children:[s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-bold text-white",children:"1."}),'Book your locker and check "Add delivery service"']}),s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-bold text-white",children:"2."}),"Provide your delivery address and preferred time"]}),s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"font-bold text-white",children:"3."}),"Track your delivery in real-time via your booking"]})]}),s.jsx("div",{className:"mt-6 pt-6 border-t border-white/20",children:s.jsxs("p",{className:"text-sm text-blue-100",children:[s.jsx("strong",{children:"Note:"})," Delivery pricing is calculated based on distance and timing. Hotel/rental pickups and deliveries start at $20."]})})]})]})}),s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-gray-900",children:"Why Choose Stow-N-Go Savannah?"}),s.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[s.jsx(oe,{className:"text-center",children:s.jsxs(me,{className:"pt-6",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Ts,{className:"w-8 h-8 text-coral-600"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"24/7 Access"}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Access your belongings anytime, day or night"})]})}),s.jsx(oe,{className:"text-center",children:s.jsxs(me,{className:"pt-6",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Tn,{className:"w-8 h-8 text-blue-600"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Fully Insured"}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Your items are protected with comprehensive coverage"})]})}),s.jsx(oe,{className:"text-center",children:s.jsxs(me,{className:"pt-6",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(So,{className:"w-8 h-8 text-green-600"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Uber Direct"}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Optional pickup and delivery service available"})]})}),s.jsx(oe,{className:"text-center",children:s.jsxs(me,{className:"pt-6",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(jt,{className:"w-8 h-8 text-purple-600"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Prime Location"}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Right in the heart of historic Savannah"})]})})]})]}),s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-gray-900",children:"Locker Sizes & Pricing"}),s.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[s.jsxs(oe,{className:"border-2 hover:border-coral-400 transition-all",children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-coral-600",children:"Small"}),s.jsx(kn,{children:"Perfect for carry-ons"})]}),s.jsxs(me,{children:[s.jsxs("p",{className:"text-3xl font-bold mb-2",children:["$8",s.jsx("span",{className:"text-lg font-normal text-gray-600",children:"/day"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Fits: backpacks, small bags"}),s.jsxs("ul",{className:"text-sm space-y-1 text-gray-700",children:[s.jsx("li",{children:'• 12" x 12" x 18"'}),s.jsx("li",{children:"• Digital lock"}),s.jsx("li",{children:"• Climate controlled"})]})]})]}),s.jsxs(oe,{className:"border-2 hover:border-coral-400 transition-all border-coral-300 shadow-lg",children:[s.jsxs(Ce,{children:[s.jsx(ot,{className:"w-fit mb-2 bg-coral-600",children:"Most Popular"}),s.jsx(Pe,{className:"text-coral-600",children:"Medium"}),s.jsx(kn,{children:"Standard checked bags"})]}),s.jsxs(me,{children:[s.jsxs("p",{className:"text-3xl font-bold mb-2",children:["$12",s.jsx("span",{className:"text-lg font-normal text-gray-600",children:"/day"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Fits: standard suitcases"}),s.jsxs("ul",{className:"text-sm space-y-1 text-gray-700",children:[s.jsx("li",{children:'• 18" x 18" x 24"'}),s.jsx("li",{children:"• Digital lock"}),s.jsx("li",{children:"• Climate controlled"})]})]})]}),s.jsxs(oe,{className:"border-2 hover:border-coral-400 transition-all",children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-coral-600",children:"Large"}),s.jsx(kn,{children:"Oversized luggage"})]}),s.jsxs(me,{children:[s.jsxs("p",{className:"text-3xl font-bold mb-2",children:["$18",s.j
vendor: 6,519 bytes, line 579
579sx("span",{className:"text-lg font-normal text-gray-600",children:"/day"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Fits: large suitcases, gear"}),s.jsxs("ul",{className:"text-sm space-y-1 text-gray-700",children:[s.jsx("li",{children:'• 24" x 24" x 30"'}),s.jsx("li",{children:"• Digital lock"}),s.jsx("li",{children:"• Climate controlled"})]})]})]}),s.jsxs(oe,{className:"border-2 hover:border-coral-400 transition-all",children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-coral-600",children:"XL"}),s.jsx(kn,{children:"Multiple bags or bulky items"})]}),s.jsxs(me,{children:[s.jsxs("p",{className:"text-3xl font-bold mb-2",children:["$25",s.jsx("span",{className:"text-lg font-normal text-gray-600",children:"/day"})]}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Fits: multiple bags, equipment"}),s.jsxs("ul",{className:"text-sm space-y-1 text-gray-700",children:[s.jsx("li",{children:'• 30" x 30" x 36"'}),s.jsx("li",{children:"• Digital lock"}),s.jsx("li",{children:"• Climate controlled"})]})]})]})]})]}),s.jsx("div",{id:"uber-direct",className:"mb-16",children:s.jsxs(oe,{className:"border-2 border-blue-200 bg-gradient-to-br from-blue-50 to-white",children:[s.jsxs(Ce,{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(So,{className:"w-8 h-8 text-blue-600"}),s.jsx(Pe,{className:"text-2xl",children:"Uber Direct Pickup & Delivery Service"})]}),s.jsx(kn,{className:"text-base",children:"Add professional courier service to your booking for ultimate convenience"})]}),s.jsxs(me,{className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(os,{className:"w-5 h-5 text-green-600"}),"Delivery Options"]}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Hotel Pickup:"})," We pick up your bags from your Savannah hotel or vacation rental"]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Hotel Delivery:"})," We deliver your bags to your Savannah hotel or vacation rental"]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Custom Locations:"})," Any address within Savannah metro area"]})]})]})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold text-lg mb-3 flex items-center gap-2",children:[s.jsx(os,{className:"w-5 h-5 text-green-600"}),"Service Features"]}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Real-time Tracking:"})," Monitor your delivery via Uber's platform"]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Insured Transit:"})," Full protection during transport"]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Scheduled Windows:"})," Choose your preferred delivery time"]})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"text-blue-600",children:"•"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Professional Couriers:"})," Vetted, reliable Uber delivery partners"]})]})]})]})]}),s.jsxs("div",{className:"bg-white rounded-lg p-6 border-2 border-blue-200",children:[s.jsx("h3",{className:"font-semibold text-lg mb-3 text-gray-900",children:"Pricing Information"}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{className:"bg-blue-50 rounded-lg p-4",children:[s.jsx("p",{className:"font-semibold text-blue-900 mb-1",children:"Hotel/Rental Pickup"}),s.jsx("p",{className:"text-2xl font-bold text-blue-600",children:"$20+"}),s.jsx("p",{className:"text-gray-600 mt-1",children:"Within Savannah area"})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-4",children:[s.jsx("p",{className:"font-semibold text-blue-900 mb-1",children:"Hotel/Rental Delivery"}),s.jsx("p",{className:"text-2xl font-bold text-blue-600",children:"$20+"}),s.jsx("p",{className:"text-gray-600 mt-1",children:"Within Savannah area"})]})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-4",children:"* Pricing is dynamic based on distance, demand, and selected time window. Final price shown during booking."})]})]})]})}),s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-gray-900",children:"Secure & Reliable"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Tn,{className:"w-10 h-10 text-green-600"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"$1,000 Insurance"}),s.jsx("p",{className:"text-gray-600",children:"Every locker covered by comprehensive insurance"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-20 h-20 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-10 h-10 text-purple-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Smart Lock Technology"}),s.jsx("p",{className:"text-gray-600",children:"Secure digital access codes, no keys needed"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-20 h-20 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsxs("svg",{className:"w-10 h-10 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.
579664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"24/7 Surveillance"}),s.jsx("p",{className:"text-gray-600",children:"Monitored by security cameras at all times"})]})]})]}),s.jsxs("div",{className:"bg-gradient-to-r from-coral-600 to-coral-700 rounded-2xl shadow-xl p-8 sm:p-12 text-white text-center mb-16",children:[s.jsx("h2",{className:"text-slate-400 mb-4 text-3xl font-bold sm:text-4xl",children:"Ready to Store Your Bags?"}),s.jsx("p",{className:"text-xl mb-8 text-coral-100",children:"Experience the convenience of 24/7 luggage storage in Savannah"}),s.jsxs(G,{onClick:p,size:"lg",className:"bg-zinc-300 text-[#000000] px-12 py-6 text-lg font-medium rounded-md inline-flex items-center justify-center gap-2 whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 shadow hover:bg-coral-50 h-auto",children:[s.jsx(gh,{className:"w-5 h-5 mr-2"}),"Book Your Locker Now"]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 mb-16",children:[s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(jt,{className:"w-6 h-6 text-coral-600"}),"Location"]})}),s.jsxs(me,{className:"space-y-3",children:[s.jsx("p",{className:"font-semibold text-lg",children:"City Storage - Savannah"}),s.jsx("p",{className:"text-gray-600",children:"Historic Downtown Savannah, GA"}),s.jsxs("div",{className:"pt-4",children:[s.jsxs("p",{className:"text-sm text-gray-600 mb-2",children:[s.jsx("strong",{children:"Access Hours:"})," 24/7 (Self-Service Lockers)"]}),s.jsxs("p",{className:"text-sm text-gray-600",children:[s.jsx("strong",{children:"Nearby:"})," River Street, Forsyth Park, City Market"]})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(ld,{className:"w-6 h-6 text-coral-600"}),"Need Help?"]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsx("p",{className:"text-gray-700",children:"Our support team is available to assist with bookings, deliveries, and any questions."}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(G,{variant:"outline",className:"w-full justify-start",asChild:!0,children:s.jsxs("a",{href:"tel:+1-555-STOW-BAG",children:[s.jsx(ld,{className:"w-4 h-4 mr-2"}),"Call: 1-555-STOW-BAG"]})}),s.jsx(G,{variant:"outline",className:"w-full justify-start",asChild:!0,children:s.jsxs("a",{href:"mailto:[email protected]",children:[s.jsx(Sp,{className:"w-4 h-4 mr-2"}),"[email protected]"]})})]})]})]})]}),s.jsxs("div",{className:"bg-yellow-50 border-2 border-yellow-200 rounded-xl p-6 text-center",children:[s.jsx(ot,{className:"mb-3 bg-yellow-600",children:"Pilot Program"}),s.jsx("p",{className:"text-gray-700",children:"This is our inaugural Savannah location! As a pilot program participant, you'll enjoy special launch pricing and help shape the future of luggage storage in Savannah. Thank you for being part of our journey."})]})]}),s.jsx("footer",{className:"bg-gray-900 text-white py-8 mt-16",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-4 text-center",children:[s.jsx("p",{className:"mb-2",children:"© 2026 Stow My Bags - Savannah Pilot"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"Secure luggage storage powered by smart technology"})]})}),n&&s.jsx(VM,{location:{id:"city-storage-savannah",title:"City Storage Savannah",city:"Savannah",address:"560 Indian St, Savannah, GA",latitude:32.0809,longitude:-81.0912,airport_address:"Savannah/Hilton Head International Airport",airport_latitude:32.1276,airport_longitude:-81.2021},lockers:d,onClose:()=>r(!1)})]})}function QX({facility:e,onClose:t}){const[n,r]=b.useState([]),[i,c]=b.useState(!0),[d,h]=b.useState(!1),[m,x]=b.useState({guest_name:"",guest_email:"",guest_phone:"",locker_id:"",start_date:Up(new Date,"yyyy-MM-dd"),end_date:Up(I9(new Date,1),"yyyy-MM-dd")});b.useEffect(()=>{X.entities.Locker.filter({facility_id:e.id,status:"available"}).then(r).finally(()=>c(!1))},[e.id]);const p=(_,C)=>x(A=>({...A,[_]:C})),g=Math.max(1,V9(new Date(m.end_date),new Date(m.start_date))),w=n.find(_=>_.id===m.locker_id),N=w?w.price_per_day*g:0,j=async()=>{var C;if(!m.locker_id||!m.guest_name||!m.guest_email)return;if(h(!0),window.self!==window.top){alert("Checkout is only available from the published app. Please open the app directly."),h(!1);return}const _=await X.functions.invoke("createLockerCheckout",{facility:e,locker:w,form:m,numDays:g,total:N});(C=_.data)!=null&&C.url&&(window.location.href=_.data.url),h(!1)};return s.jsx(Na,{open:!0,onOpenChange:t,children:s.jsxs(Ai,{className:"max-w-md",children:[s.jsx(Mi,{children:s.jsxs(Ri,{className:"flex items-center gap-2",children:[s.jsx(Ct,{className:"w-5 h-5 text-brand-blue"}),"Book a Locker — ",e.name]})}),i?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(It,{className:"w-6 h-6 animate-spin text-blue-600"})}):s.jsx("div",{className:"space-y-4",children:n.length===0?s.jsx("p",{className:"text-center text-gray-500 py-4",children:"No lockers available at this facility right now."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(te,{children:"Select Locker"}),s.jsxs(ts,{value:m.locker_id,onValueChange:_=>p("locker_id",_),children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"Choose a locker..."})}),s.jsx(Gt,{children:n.map(_=>s.jsxs(Ge,{value:_.id,children:["Locker #",_.locker_number," — ",_.size," — $",_.price_per_day,"/day"]}
579,_.id))})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Check-in Date"}),s.jsx(de,{type:"date",value:m.start_date,onChange:_=>p("start_date",_.target.value)})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Check-out Date"}),s.jsx(de,{type:"date",value:m.end_date,onChange:_=>p("end_date",_.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Your Name *"}),s.jsx(de,{value:m.guest_name,onChange:_=>p("guest_name",_.target.value),placeholder:"John Smith"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Email *"}),s.jsx(de,{type:"email",value:m.guest_email,onChange:_=>p("guest_email",_.target.value),placeholder:"[email protected]"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Phone"}),s.jsx(de,{value:m.guest_phone,onChange:_=>p("guest_phone",_.target.value),placeholder:"(555) 000-0000"})]}),w&&s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3 space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-600",children:["$",w.price_per_day,"/day × ",g," day",g!==1?"s":""]}),s.jsxs("span",{children:["$",N.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between font-bold text-base border-t pt-1 mt-1",children:[s.jsx("span",{children:"Total"}),s.jsxs("span",{className:"text-brand-blue",children:["$",N.toFixed(2)]})]})]}),s.jsxs(G,{onClick:j,disabled:d||!m.locker_id||!m.guest_name||!m.guest_email,className:"w-full bg-coral hover:bg-coral-dark text-white py-5",children:[d?s.jsx(It,{className:"w-4 h-4 animate-spin mr-2"}):null,"Pay & Get Access Code"]})]})})]})})}function XX(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[i,c]=b.useState(""),[d,h]=b.useState(null),[m,x]=b.useState(!1);b.useEffect(()=>{p()},[]);const p=async()=>{r(!0);const w=await X.entities.Facility.filter({status:"active"});t(w),r(!1)},g=e.filter(w=>{var N,j,_;return!i||((N=w.name)==null?void 0:N.toLowerCase().includes(i.toLowerCase()))||((j=w.city)==null?void 0:j.toLowerCase().includes(i.toLowerCase()))||((_=w.address)==null?void 0:_.toLowerCase().includes(i.toLowerCase()))});return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-blue-900 text-white py-12 px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Find a Locker Near You"}),s.jsx("p",{className:"text-blue-200 mb-6",children:"24/7 access at partner self-storage facilities"}),s.jsxs("div",{className:"relative max-w-lg mx-auto",children:[s.jsx(G0,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(de,{placeholder:"Search by city or location...",value:i,onChange:w=>c(w.target.value),className:"pl-10 py-6 text-gray-900 text-base"})]})]})}),s.jsx("div",{className:"max-w-4xl mx-auto px-4 py-8",children:n?s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(It,{className:"w-8 h-8 animate-spin text-blue-600"})}):g.length===0?s.jsxs("div",{className:"text-center py-20 text-gray-500",children:[s.jsx(Ct,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),s.jsx("p",{className:"text-lg font-medium",children:"No facilities found"}),s.jsx("p",{className:"text-sm mt-1",children:"Try a different search or check back soon."})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("p",{className:"text-gray-500 text-sm",children:[g.length," location",g.length!==1?"s":""," found"]}),g.map(w=>s.jsx(JX,{facility:w,onBook:()=>{h(w),x(!0)}},w.id))]})}),m&&d&&s.jsx(QX,{facility:d,onClose:()=>{x(!1),h(null)}})]})}function JX({facility:e,onBook:t}){return s.jsx("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm hover:shadow-md transition-shadow p-5",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-brand-blue-light rounded-lg flex items-center justify-center flex-shrink-0 mt-1",children:s.jsx(Ct,{className:"w-5 h-5 text-brand-blue"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900 text-lg",children:e.name}),s.jsxs("div",{className:"flex items-center gap-1 text-gray-500 text-sm mt-1",children:[s.jsx(jt,{className:"w-3.5 h-3.5"}),s.jsxs("span",{children:[e.address,", ",e.city,", ",e.state]})]}),s.jsxs("div",{className:"flex items-center gap-1 text-gray-500 text-sm mt-0.5",children:[s.jsx(Ts,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:e.access_hours||"24/7 Access"})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:(e.amenities||[]).map(n=>s.jsx(ot,{variant:"secondary",className:"text-xs capitalize",children:n.replace(/_/g," ")},n))})]})]})}),s.jsxs("div",{className:"flex flex-col items-end gap-2",children:[s.jsxs(ot,{className:"bg-green-100 text-green-700 border-0",children:[e.available_lockers||0," lockers available"]}),s.jsxs(G,{onClick:t,className:"bg-coral hover:bg-coral-dark text-white",children:["Book Now ",s.jsx(gr,{className:"w-4 h-4 ml-1"})]})]})]})})}const eJ=[{id:"august",name:"August",logo:"🔐",description:"August Smart Lock Pro & Connect",authType:"OAuth",features:["Remote unlock","Access logs","Auto-lock"],supported:!0}
579,{id:"yale",name:"Yale",logo:"🔒",description:"Yale Assure & Access Series",authType:"API Key",features:["PIN codes","Remote unlock","Tamper alerts"],supported:!0},{id:"schlage",name:"Schlage",logo:"🗝️",description:"Schlage Encode & Connect",authType:"API Key",features:["Access codes","Remote lock/unlock","Usage history"],supported:!0},{id:"igloohome",name:"igloohome",logo:"🏠",description:"igloohome Smart Padlock & Deadbolt",authType:"API Key",features:["Offline PIN codes","Time-limited access","Audit trail"],supported:!0},{id:"noke",name:"Noke",logo:"📱",description:"Noke Smart Access (BLE + Cloud)",authType:"API Key",features:["Bluetooth","Cloud keys","Activity logs"],supported:!0},{id:"other",name:"Other / Manual",logo:"⚙️",description:"Manual code management",authType:"None",features:["Manual code entry","Email delivery"],supported:!0}];function tJ({selected:e,onSelect:t}){return s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:"Choose Your Lock Brand"}),s.jsx("p",{className:"text-gray-500 text-sm mb-6",children:"Select the smart lock system installed at your facility."}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:eJ.map(n=>s.jsxs("button",{onClick:()=>t(n),className:`text-left p-4 rounded-xl border-2 transition-all hover:border-blue-400 hover:shadow-sm ${(e==null?void 0:e.id)===n.id?"border-brand-blue bg-blue-50":"border-gray-100 bg-white"}`,children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:n.logo}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-900",children:n.name}),s.jsx("p",{className:"text-xs text-gray-500",children:n.description})]})]}),(e==null?void 0:e.id)===n.id&&s.jsx(os,{className:"w-5 h-5 text-brand-blue flex-shrink-0"})]}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.jsx(ot,{variant:"outline",className:"text-xs",children:n.authType}),n.features.slice(0,2).map(r=>s.jsx(ot,{className:"text-xs bg-gray-100 text-gray-600 border-0",children:r},r))]})]},n.id))})]})}const sJ={august:[{key:"api_key",label:"August API Key",type:"password",placeholder:"aug_api_xxxxxxxxxxxx",help:"Found in August Developer Portal → My Apps"},{key:"installation_id",label:"Installation ID",type:"text",placeholder:"lock-installation-id",help:"Your property installation ID from August dashboard"}],yale:[{key:"api_key",label:"Yale API Key",type:"password",placeholder:"yk_live_xxxxxxxxxxxx",help:"From Yale Developer Hub → API Keys"},{key:"site_id",label:"Site ID",type:"text",placeholder:"site_xxxx",help:"Your Yale Access site identifier"}],schlage:[{key:"client_id",label:"Client ID",type:"text",placeholder:"schlage_client_xxxx",help:"From Schlage Home Developer portal"},{key:"client_secret",label:"Client Secret",type:"password",placeholder:"••••••••••",help:"Keep this secret — never share it"},{key:"device_id",label:"Device / Lock ID",type:"text",placeholder:"device_xxxx",help:"The ID of your Schlage Encode lock"}],igloohome:[{key:"api_key",label:"igloohome API Key",type:"password",placeholder:"iglooapi_xxxx",help:"From igloohome Booking Engine API → Keys"},{key:"lock_id",label:"Lock ID",type:"text",placeholder:"LOCK_XXXXX",help:"Found on the lock packaging or igloohome app"}],noke:[{key:"api_key",label:"Noke API Key",type:"password",placeholder:"noke_xxxxxxxxxxxx",help:"From Noke Web → Developer → API Keys"},{key:"company_id",label:"Company ID",type:"text",placeholder:"company_xxxxx",help:"Your Noke company account ID"}],other:[{key:"note",label:"Notes (optional)",type:"text",placeholder:"Manual code management — no API required",help:"You can manually assign codes to lockers"}]},nJ={august:"https://developer.august.com",yale:"https://developer.yalehome.com",schlage:"https://developer.schlage.com",igloohome:"https://developer.igloohome.co",noke:"https://noke.com/developers",other:null};function rJ({brand:e,credentials:t,onChange:n,onNext:r,onBack:i}){const[c,d]=b.useState(t||{}),h=sJ[e==null?void 0:e.id]||[],m=nJ[e==null?void 0:e.id],x=(g,w)=>{const N={...c,[g]:w};d(N),n(N)},p=(e==null?void 0:e.id)==="other"||h.every(g=>{var w;return g.key==="note"||((w=c[g.key])==null?void 0:w.trim())});return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx("span",{className:"text-2xl",children:e==null?void 0:e.logo}),s.jsxs("h2",{className:"text-xl font-bold text-gray-900",children:[e==null?void 0:e.name," Credentials"]})]}),s.jsxs("p",{className:"text-gray-500 text-sm mb-5",children:["Enter your API credentials to connect ",e==null?void 0:e.name," to Stow-N-Go."]}),m&&s.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-brand-blue hover:underline mb-5",children:[s.jsx(fa,{className:"w-4 h-4"}),"Get your ",e==null?void 0:e.name," API credentials →"]}),s.jsx("div",{className:"space-y-4",children:h.map(g=>s.jsxs("div",{children:[s.jsx(te,{className:"mb-1",children:g.label}),s.jsx(de,{type:g.type,value:c[g.key]||"",onChange:w=>x(g.key,w.target.value),placeholder:g.placeholder}),g.help&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 flex items-center gap-1",children:[s.jsx(Cd,{className:"w-3 h-3"})," ",g.help]})]},g.key))}),(e==null?void 0:e.id)!=="other"&&s.jsxs("div",{className:"mt-4 p-3 bg-amber-50 rounded-lg flex gap-2",children:[s.jsx(Cd,{className:"w-4 h-4 text-amber-600 flex-shrink-0 mt-0.5"}),s.jsx("p",{className:"text-xs text-amber-700",children:"Credentials are stored securely and only used for lock control API calls. They are never shared with customers."})]}),s.jsxs("div",{className:"flex gap-3 mt-6",children:[s.jsx(G,{variant:"outline",onClick:i,className:"flex-1",children:"Back"}),s.jsx(G,{onClick:r,disabled:!p,className:"flex-1 bg-brand-blue hover:bg-blue-700 text-white",children:"Test Connection"})]})]})}function iJ({brand:e,credentials:t,facility:n,onResult:r,onNext:i,onBack:c}){var g;const[d,h]=b.useState(null),[m,x]=b.useState(null),p=async()=>{h("testing"),x(null);const N=(await X.functions.invoke("testSmartLockConnection",{brand_id:e.id,credentials:t,facility_id:n==null?void 0:n.id})).data;N.success?(h("success"),x(N),r({success:!0,devices:N.devices||[]})):(h("error"),x(N),r({success:!1,error:N.error}))};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx("span",{className:"text-2xl",children:e==null?void 0:e.logo}),s.jsx("h2",{className:"text-xl font-bold text-gray-900",children:"Test Connection"})]}),s.jsxs("p",{className:"text-gray-500 text-sm mb-6",children:["We'll verify your ",e==null?void 0:e.name," credentials and discover connected locks."]}),s.jsxs("div",{className:"flex flex-col items-center py-8",children:[d===null&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-20 h-20 rounded-full bg-blue-50 flex items-center justify-center mb-4",children:s.jsx(Mk,{className:"w-10 h-10 text-brand-blue"})}),s.jsxs("p",{className:"text-gray-600 text-sm mb-6",children:["Ready to test your ",e==null?void 0:e.name," connection"]}),s.jsx(G,{onClick:p,className:"bg-brand-blue hover:bg-blue-700 text-white px-8",children:"Run Connection Test"})]}),d==="testing"&&s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"w-16 h-16 text-brand-blue animate-spin mb
579-4"}),s.jsxs("p",{className:"text-gray-700 font-medium",children:["Connecting to ",e==null?void 0:e.name,"..."]}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Verifying credentials & discovering locks"})]}),d==="success"&&s.jsxs(s.Fragment,{children:[s.jsx(os,{className:"w-16 h-16 text-green-500 mb-4"}),s.jsx("p",{className:"text-green-700 font-bold text-lg",children:"Connection Successful!"}),((g=m==null?void 0:m.devices)==null?void 0:g.length)>0&&s.jsxs("div",{className:"mt-4 w-full space-y-2",children:[s.jsxs("p",{className:"text-sm text-gray-500 text-center mb-2",children:[m.devices.length," lock",m.devices.length!==1?"s":""," discovered"]}),m.devices.map((w,N)=>s.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-green-50 rounded-lg border border-green-100",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:w.name||`Lock ${N+1}`}),s.jsx("p",{className:"text-xs text-gray-500",children:w.id})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${w.status==="locked"?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"}`,children:w.status||"online"})]},N))]}),s.jsxs(G,{onClick:p,variant:"ghost",size:"sm",className:"mt-3 text-gray-400",children:[s.jsx(jv,{className:"w-3 h-3 mr-1"})," Re-test"]})]}),d==="error"&&s.jsxs(s.Fragment,{children:[s.jsx(tg,{className:"w-16 h-16 text-red-400 mb-4"}),s.jsx("p",{className:"text-red-700 font-bold text-lg",children:"Connection Failed"}),s.jsx("p",{className:"text-gray-500 text-sm mt-1 text-center max-w-xs",children:(m==null?void 0:m.error)||"Unable to connect. Please check your credentials."}),s.jsxs(G,{onClick:p,className:"mt-4 bg-brand-blue hover:bg-blue-700 text-white",children:[s.jsx(jv,{className:"w-4 h-4 mr-2"})," Try Again"]})]})]}),s.jsxs("div",{className:"flex gap-3 mt-4 border-t pt-4",children:[s.jsx(G,{variant:"outline",onClick:c,className:"flex-1",children:"Back"}),s.jsx(G,{onClick:i,disabled:d!=="success"&&(e==null?void 0:e.id)!=="other",className:"flex-1 bg-brand-blue hover:bg-blue-700 text-white",children:(e==null?void 0:e.id)==="other"?"Skip & Continue":"Assign to Lockers →"})]})]})}function aJ({facility:e,brand:t,credentials:n,onAssigned:r,onNext:i,onBack:c}){const[d,h]=b.useState([]),[m,x]=b.useState(!0),[p,g]=b.useState({}),[w,N]=b.useState(!1),j=(t==null?void 0:t.id)!=="other"?[{id:"dev_001",name:`${t==null?void 0:t.name} Lock - Unit A`},{id:"dev_002",name:`${t==null?void 0:t.name} Lock - Unit B`},{id:"dev_003",name:`${t==null?void 0:t.name} Lock - Unit C`}]:[];b.useEffect(()=>{X.entities.Locker.filter({facility_id:e==null?void 0:e.id}).then(h).finally(()=>x(!1))},[e==null?void 0:e.id]);const _=(M,E)=>{g(D=>({...D,[M]:E}))},C=async()=>{N(!0),await Promise.all(Object.entries(p).map(([M,E])=>X.entities.Locker.update(M,{lock_system_type:t.id==="other"?"manual":t.id,lock_device_id:E}))),await X.entities.Facility.update(e.id,{access_instructions:`${t.id.toUpperCase()} lock system configured. ${Object.keys(p).length} lockers assigned.`}),r(Object.keys(p)),N(!1),i()},A=Object.keys(p).length;return m?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(It,{className:"w-6 h-6 animate-spin text-blue-600"})}):s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:"Assign Locks to Lockers"}),s.jsxs("p",{className:"text-gray-500 text-sm mb-6",children:["Map each physical ",t==null?void 0:t.name," lock to a locker in your facility."]}),d.length===0?s.jsxs("div",{className:"text-center py-8 text-gray-400",children:[s.jsx(Ct,{className:"w-10 h-10 mx-auto mb-2 text-gray-200"}),s.jsx("p",{children:"No lockers found. Add lockers first from the Facility Portal."})]}):s.jsx("div",{className:"space-y-3 max-h-72 overflow-y-auto pr-1",children:d.map(M=>s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-100",children:[s.jsx("div",{className:"w-8 h-8 bg-brand-blue-light rounded-lg flex items-center justify-center flex-shrink-0",children:s.jsx(Ct,{className:"w-4 h-4 text-brand-blue"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"font-medium text-sm text-gray-900",children:["Locker #",M.locker_number]}),s.jsx("p",{className:"text-xs text-gray-500 capitalize",children:M.size})]}),(t==null?void 0:t.id)==="other"?s.jsx(ot,{className:"bg-gray-100 text-gray-500 border-0 text-xs",children:"Manual"}):s.jsxs(ts,{value:p[M.id]||"",onValueChange:E=>_(M.id,E),children:[s.jsx(qt,{className:"w-44 h-8 text-xs",children:s.jsx(ss,{placeholder:"Assign device..."})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"_none",children:"No device"}),j.map(E=>s.jsx(Ge,{value:E.id,children:E.name},E.id))]})]}),p[M.id]&&p[M.id]!=="_none"&&s.jsx(os,{className:"w-4 h-4 text-green-500 flex-shrink-0"})]},M.id))}),A>0&&s.jsxs("p",{className:"text-sm text-brand-blue mt-3 font-medium",children:[A," locker",A!==1?"s":""," assigned"]}),s.jsxs("div",{className:"flex gap-3 mt-6",children:[s.jsx(G,{variant:"outline",onClick:c,className:"flex-1",children:"Back"}),s.jsxs(G,{onClick:C,disabled:w||d.length>0&&(t==null?void 0:t.id)!=="other"&&A===0,className:"flex-1 bg-brand-blue hover:bg-blue-700 text-white",children:[w?s.jsx(It,{className:"w-4 h-4 animate-spin mr-2"}):null,(t==null?void 0:t.id)==="other"?"Save & Finish":`Save ${A>0?`(${A})`:""} & Finish`]})]})]})}function oJ({config:e,facility:t}){const{brand:n,assignedLockers:r}=e;return s.jsxs("div",{className:"text-center",children:[s.jsx(os,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Setup Complete!"}),s.jsxs("p",{className:"text-gray-500 mb-6",children:[n==null?void 0:n.name," is connected to ",s.jsx("strong",{children:t==null?void 0:t.name}),".",(r==null?void 0:r.length)>0&&` ${r.length} locker${r.length!==1?"s":""} are now smart-lock enabled.`]}),s.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-6 space-y-3",children:[s.jsx("p",{className:"font-semibold text-gray-700 text-sm",children:"What happens next:"}),["When a booking is confirmed & paid, an access code is automatically generated.","The code is sent to the customer via email instantly.","You can monitor all lock status in real-time from the Facility Portal.",(n==null?void 0:n.id)!=="other"?"Remote unlock is available for any confirmed booking.":"You can manually update codes from the locker management panel."].map((i,c)=>s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"w-5 h-5 rounded-full bg-brand-blue text-white text-xs flex items-center justify-center flex-shrink-0 mt-0.5",children:c+1}),s.jsx("p",{className:"text-sm text-gray-600",children:i})]},c))]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx(Ls,{to:At("LockMonitor"),className:"flex-1",children:s.jsxs(G,{className:"w-full bg-brand-blue hover:bg-blue-700 text-white",children:[s.jsx(pD,{className:"w-4 h-4 mr-2"})," View Lock Monitor"]})}),s.jsx(Ls,{to:At("FacilityPortal"),className:"flex-1",children:s.jsxs(G,{variant:"outline",className:"w-full",children:["Back to Portal ",s.jsx(jL,{className:"w-4 h-4 ml-2"})]})})]})]})}const _v=["Select Brand","Credentials","Test Connection","Assign Lockers","Complete"];function lJ(){const[e,t]=b.useState(0),[n,r]=b.useState(null),[i,c]=b.useState(!0),[d,h]=b.useState({brand:null,credentials:{},connectionStatus:null,assignedLockers:[]});b.useEffect(()=>{(async()=>{try{const w=await X.auth.me(),N=await X.entities.Facility.filter({partner_id:w.id});N[0]&&r(N[0])}catch{X.auth.redirectToLogin()}finally{c(!1)}})()},[]);const m=g=>h(w=>({...w,...g})),x=()=>t(g=>Math.min(g+1,_v.length-1)),p=()=>t(g=>Math.max(g-1,0));return i?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent roun
579ded-full animate-spin"})}):s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(Ls,{to:At("FacilityPortal"),children:s.jsx(G,{variant:"ghost",size:"icon",children:s.jsx(_k,{className:"w-4 h-4"})})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Smart Lock Setup"}),s.jsx("p",{className:"text-sm text-gray-500",children:n==null?void 0:n.name})]})]}),s.jsx("div",{className:"flex items-center mb-8",children:_v.map((g,w)=>s.jsxs(Et.Fragment,{children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold transition-all ${w<e?"bg-green-500 text-white":w===e?"bg-brand-blue text-white":"bg-gray-200 text-gray-400"}`,children:w<e?"✓":w+1}),s.jsx("span",{className:`text-xs mt-1 hidden sm:block ${w===e?"text-brand-blue font-medium":"text-gray-400"}`,children:g})]}),w<_v.length-1&&s.jsx("div",{className:`flex-1 h-0.5 mx-1 ${w<e?"bg-green-400":"bg-gray-200"}`})]},w))}),s.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-100 p-6",children:[e===0&&s.jsx(tJ,{selected:d.brand,onSelect:g=>{m({brand:g,credentials:{}}),x()}}),e===1&&s.jsx(rJ,{brand:d.brand,credentials:d.credentials,onChange:g=>m({credentials:g}),onNext:x,onBack:p}),e===2&&s.jsx(iJ,{brand:d.brand,credentials:d.credentials,facility:n,onResult:g=>m({connectionStatus:g}),onNext:x,onBack:p}),e===3&&s.jsx(aJ,{facility:n,brand:d.brand,credentials:d.credentials,onAssigned:g=>m({assignedLockers:g}),onNext:x,onBack:p}),e===4&&s.jsx(oJ,{config:d,facility:n})]})]})})}function cJ({location:e,lockers:t}){const[n,r]=b.useState(!1),i=t.filter(h=>h.status==="available"),c={small:i.filter(h=>h.locker_size==="small").length,medium:i.filter(h=>h.locker_size==="medium").length,large:i.filter(h=>h.locker_size==="large").length,xl:i.filter(h=>h.locker_size==="xl").length},d=t.length>0?{min:Math.min(...t.map(h=>h.price_per_day)),max:Math.max(...t.map(h=>h.price_per_day))}:{min:0,max:0};return s.jsxs(s.Fragment,{children:[s.jsxs(oe,{className:"hover:shadow-lg transition-shadow",children:[s.jsxs(Ce,{children:[s.jsxs("div",{className:"flex justify-between items-start mb-2",children:[s.jsx(Pe,{className:"text-xl",children:e.title}),s.jsx(ot,{className:"bg-coral-500 text-white",children:"24/7"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-gray-600 text-sm",children:[s.jsx(jt,{className:"w-4 h-4"}),s.jsx("span",{children:e.city})]})]}),s.jsx(me,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-2",children:[s.jsx(Ct,{className:"w-4 h-4 text-blue-600"}),s.jsx("span",{children:"Available Lockers"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.small>0&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-medium",children:"Small:"})," ",c.small]}),c.medium>0&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-medium",children:"Medium:"})," ",c.medium]}),c.large>0&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-medium",children:"Large:"})," ",c.large]}),c.xl>0&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"font-medium",children:"XL:"})," ",c.xl]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(es,{className:"w-4 h-4 text-green-600"}),s.jsxs("span",{className:"font-semibold",children:["$",d.min," - $",d.max]}),s.jsx("span",{className:"text-gray-500",children:"per day"})]}),s.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:e.address}),e.features&&e.features.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:e.features.slice(0,3).map((h,m)=>s.jsx(ot,{variant:"outline",className:"text-xs",children:h.replace(/_/g," ")},m))}),s.jsx(G,{onClick:()=>r(!0),className:"w-full bg-blue-600 hover:bg-blue-700",disabled:i.length===0,children:i.length>0?"Book Locker":"No Lockers Available"})]})})]}),n&&s.jsx(VM,{location:e,lockers:i,onClose:()=>r(!1)})]})}function dJ(){br();const[e,t]=b.useState(null),[n,r]=b.useState([]),[i,c]=b.useState([]),[d,h]=b.useState(!0),[m,x]=b.useState(""),[p,g]=b.useState("all");b.useEffect(()=>{w()},[]);const w=async()=>{try{const j=await X.auth.me();t(j);const _=await X.entities.StorageLocation.list(),C=await X.entities.StowNGoLocker.list(),A=[...new Set(C.map(E=>E.location_id))],M=_.filter(E=>A.includes(E.id));r(M),c(C)}catch(j){console.error("Error loading data:",j)}finally{h(!1)}},N=n.filter(j=>{const _=!m||j.city.toLowerCase().includes(m.toLowerCase()),C=i.filter(M=>M.location_id===j.id),A=p==="all"||C.some(M=>M.locker_size===p&&M.status==="available");return _&&A&&C.length>0});return d?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-gradient-to-br from-blue-900 to-blue-800 text-white py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/7bdcf34f5_image.png",alt:"Stow-N-Go",className:"h-40 mx-auto mb-6"}),s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold mb-4",children:"24/7 Self-Service Storage"}),s.jsx("p",{className:"text-xl text-blue-100 max-w-2xl mx-auto",children:"Secure smart lockers with instant access codes. Store your bags anytime, anywhere."})]}),s.jsxs("div",{className:"grid md:grid-cols-4 gap-6 max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-500 rounded-full flex items-center justify-center mx-auto mb-3",children:s.jsx(Ts,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"font-semibold mb-1",children:"24/7 Access"}),s.jsx("p",{className:"text-sm text-blue-100",children:"Anytime access"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-500 rounded-full flex items-center justify-center mx-auto mb-3",children:s.jsx(Ct,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"font-semibold mb-1",children:"Smart Locks"}),s.jsx("p",{className:"text-sm text-blue-100",children:"Wireless security"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-500 rounded-full flex items-center justify-center mx-auto mb-3",children:s.jsx(Tn,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"font-semibold mb-1",children:"100% Secure"}),s.jsx("p",{className:"text-sm text-blue-100",children:"Fully insured"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-coral-500 rounded-full flex items-center justify-center mx-auto mb-3",children:s.jsx(jt,{className:"w-8 h-8 text-white"})}),s.jsx("h3",{className:"font-semibold mb-1",children:"Prime Spots"}),s.jsx("p",{className:"text-sm text-blue-100",children:"Near airports"})]})]})]})}),s.jsx("div",{className:"bg-white border-b sticky top-16 z-10",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:s.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(G0,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),s.jsx(de,{placeholder:"Search by city...",value:m,onChange:j=>x(j.target.value),className:"pl-10"})]}),s.jsx("div",{className:"w-full md:w-48",children:s.jsxs(ts,{value:p,onValueChange:g,children:[s.jsxs(qt,{children:[s.jsx(tD,{className:"w-4 h-4 mr-2"}),s.jsx(ss,{placeholder:"Locker Size"})]}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"all",children:"All Sizes"}),s.jsx(Ge,{value:"small",children:"Small"}),s.jsx(Ge,{value:"medium",children:"Medium"}),s.jsx(Ge,{value:"large",children:"Large"}),s.jsx(Ge,{value:"xl",children:"XL"})]})]})})]})})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:N.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(jt,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"No Locations Found"}),s.jsx("p",{className:"text-gray-500",children:"Try adjusting your search criteria"})]}):s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:N.map(j=>s.jsx(cJ,{location:j,lockers:i.filter(_=>_.location_id===j.id)},j.id))})})]})}function uJ({onComplete:e}){const[t,n]=b.useState(1),[r,i]=b.useState({building_code:"",access_instructions:"",locker_prefix:"",numbering_start:"1"});return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Hardware Setup Guide"})}),s.jsxs(me,{className:"space-y-6",children:[t===1&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[s.jsx(Ct,{className:"w-5 h-5 text-blue-600"}),"Step 1: Building Access"]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Set up the main building entry code that guests will use for 24/7 access."}),s.jsxs("div",{children:[s.jsx(te,{children:"Building Entry Code"}),s.jsx(de,{value:r.building_code,onChange:c=>i({...r,building_code:c.target.value}),placeholder:"e.g., 1234, #5678*, A12B34"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"This can be a numeric code, key fob code, or door keypad sequence"})]}
579),s.jsxs("div",{children:[s.jsx(te,{children:"Access Instructions"}),s.jsx(Os,{value:r.access_instructions,onChange:c=>i({...r,access_instructions:c.target.value}),placeholder:"Example: Enter through front glass door on Main St. Use code to unlock. Lockers are immediately on your right in the hallway.",rows:4})]}),s.jsxs(en,{children:[s.jsx(Cd,{className:"h-4 w-4"}),s.jsxs(tn,{children:[s.jsx("strong",{children:"Pro Tip:"})," Be specific! Include landmarks, floor numbers, and turn-by-turn directions from the entrance to the lockers."]})]}),s.jsx(G,{onClick:()=>n(2),className:"w-full",disabled:!r.building_code||!r.access_instructions,children:"Continue to Locker Setup"})]}),t===2&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[s.jsx(jt,{className:"w-5 h-5 text-blue-600"}),"Step 2: Locker Identification"]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Help us label your lockers consistently for easy identification."}),s.jsxs("div",{children:[s.jsx(te,{children:"Locker Number Prefix (Optional)"}),s.jsx(de,{value:r.locker_prefix,onChange:c=>i({...r,locker_prefix:c.target.value}),placeholder:"e.g., SNG, LOC, UNIT"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"This will be added before each locker number (e.g., SNG-001, LOC-001)"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Starting Number"}),s.jsx(de,{type:"number",value:r.numbering_start,onChange:c=>i({...r,numbering_start:c.target.value}),min:"1"})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[s.jsx("p",{className:"text-sm font-medium mb-2",children:"Preview:"}),s.jsxs("div",{className:"space-y-1 text-sm text-gray-600",children:[s.jsxs("p",{children:["Small Lockers: ",r.locker_prefix,"S-",r.numbering_start,", ",r.locker_prefix,"S-",parseInt(r.numbering_start)+1,", ..."]}),s.jsxs("p",{children:["Medium Lockers: ",r.locker_prefix,"M-",r.numbering_start,", ",r.locker_prefix,"M-",parseInt(r.numbering_start)+1,", ..."]}),s.jsxs("p",{children:["Large Lockers: ",r.locker_prefix,"L-",r.numbering_start,", ",r.locker_prefix,"L-",parseInt(r.numbering_start)+1,", ..."]}),s.jsxs("p",{children:["XL Lockers: ",r.locker_prefix,"XL-",r.numbering_start,", ",r.locker_prefix,"XL-",parseInt(r.numbering_start)+1,", ..."]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{variant:"outline",onClick:()=>n(1),className:"flex-1",children:"Back"}),s.jsx(G,{onClick:()=>n(3),className:"flex-1",children:"Continue to Lock Labels"})]})]}),t===3&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"font-semibold",children:"Step 3: Physical Locker Labels"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Label each physical locker clearly so guests can easily find their assigned unit."}),s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 space-y-3",children:[s.jsx("h4",{className:"font-medium text-blue-900",children:"Labeling Best Practices:"}),s.jsxs("ul",{className:"space-y-2 text-sm text-blue-800",children:[s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"font-bold",children:"1."}),s.jsx("span",{children:"Use weather-resistant labels or engraved plates"})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"font-bold",children:"2."}),s.jsx("span",{children:"Make numbers at least 2 inches tall for visibility"})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"font-bold",children:"3."}),s.jsx("span",{children:"Include size designation (S, M, L, XL)"})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"font-bold",children:"4."}),s.jsx("span",{children:"Add QR codes for quick mobile access (optional)"})]}),s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"font-bold",children:"5."}),s.jsx("span",{children:"Position labels above or beside the lock for easy viewing"})]})]})]}),s.jsxs(en,{children:[s.jsx(Cd,{className:"h-4 w-4"}),s.jsx(tn,{children:"We can generate printable label templates for you in the resources section."})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{variant:"outline",onClick:()=>n(2),className:"flex-1",children:"Back"}),s.jsx(G,{onClick:e,className:"flex-1 bg-green-600 hover:bg-green-700",children:"Hardware Setup Complete"})]})]})]})]})}function hJ({onComplete:e}){const[t,n]=b.useState(""),[r,i]=b.useState({api_key:"",device_ids:"",webhook_url:"",notes:""}),d={noke:{name:"Nokē Smart Locks",apiDocs:"https://noke.com/pages/developer",fields:["API Key","Device IDs"],guide:"Get your API key from the Nokē Developer Portal. Device IDs can be found in your Nokē app under each lock."},igloohome:{name:"igloohome",apiDocs:"https://developer.igloohome.co/",fields:["Client ID","Client Secret","Lock IDs"],guide:"Access the igloohome Developer Portal to generate credentials. Lock IDs are visible in your igloohome app."},tuya:{name:"Tuya Smart",apiDocs:"https://developer.tuya.com/",fields:["Access ID","Access Secret","Device IDs"],guide:"Create a Cloud Project in Tuya IoT Platform. Link your devices and get credentials from the project overview."},iloq:{name:"iLOQ",apiDocs:"https://api.ilocks.cloud/",fields:["API Key","Lock IDs","Session Token"],guide:"Contact iLOQ support to enable API access. You will receive API credentials via email."},smartelock:{name:"SMARTELOCK",apiDocs:"https://www.smartelock.com/api",fields:["Account ID","API Token","Lock Serial Numbers"],guide:"Log into SMARTELOCK dashboard and navigate to Settings > API Access to generate tokens."}}[t];return s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"API Integration Setup"})}),s.jsxs(me,{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Select Your Lock System"}),s.jsxs(ts,{value:t,onValueChange:n,children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"Choose your smart lock provider"})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"noke",children:"Nokē Smart Locks"}),s.jsx(Ge,{value:"igloohome",children:"igloohome"}),s.jsx(Ge,{value:"tuya",children:"Tuya Smart"}),s.jsx(Ge,{value:"iloq",children:"iLOQ"}),s.jsx(Ge,{value:"smartelock",children:"SMARTELOCK"})]})]})]}),d&&s.jsxs(Ql,{defaultValue:"setup",children:[s.jsxs(Fo,{className:"grid w-full grid-cols-2",children:[s.jsx(Bt,{value:"setup",children:"Setup Guide"}),s.jsx(Bt,{value:"config",children:"Configuration"})]}),s.jsxs(zt,{value:"setup",className:"space-y-4",children:[s.jsxs(en,{children:[s.jsx(Cd,{className:"h-4 w-4"}),s.jsxs(tn,{children:[s.jsx("strong",{children:d.name})," - ",d.guide]})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 space-y-3",children:[s.jsx("h4",{className:"font-semibold",children:"Required Information:"}),s.jsx("ul",{className:"space-y-1",children:d.fields.map((h,m)=>s.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[s.jsx(ms,{className:"w-4 h-4 text-green-600"}),h]},m))})]}),s.jsxs(G,{variant:"outline",onClick:()=>window.open(d.apiDocs,"_blank"),className:"w-full",children:["Open ",d.name," Developer Docs",s.jsx(fa,{className:"w-4 h-4 ml-2"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold text-sm",children:"Qu
579ick Start Steps:"}),s.jsxs("ol",{className:"space-y-2 text-sm text-gray-600 list-decimal list-inside",children:[s.jsxs("li",{children:["Log into your ",d.name," account"]}),s.jsx("li",{children:"Navigate to Developer/API section"}),s.jsx("li",{children:"Generate or copy your API credentials"}),s.jsx("li",{children:"List all device/lock IDs you want to use"}),s.jsx("li",{children:"Enter the information in the Configuration tab"})]})]})]}),s.jsxs(zt,{value:"config",className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"API Key / Access Token"}),s.jsx(de,{type:"password",value:r.api_key,onChange:h=>i({...r,api_key:h.target.value}),placeholder:"Enter your API key"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Device IDs / Lock Serial Numbers"}),s.jsx(Os,{value:r.device_ids,onChange:h=>i({...r,device_ids:h.target.value}),placeholder:`One per line, e.g.
580LOCK-001-ABC123
581LOCK-002-DEF456`,rows:4}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Enter one device ID per line. These will be matched to your locker inventory."})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Webhook URL (Optional)"}),s.jsx(de,{value:r.webhook_url,onChange:h=>i({...r,webhook_url:h.target.value}),placeholder:"https://..."}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"If your lock system supports webhooks, we'll configure them automatically"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Additional Notes"}),s.jsx(Os,{value:r.notes,onChange:h=>i({...r,notes:h.target.value}),placeholder:"Any special configuration, limitations, or notes...",rows:3})]}),s.jsxs(en,{children:[s.jsx(Cd,{className:"h-4 w-4"}),s.jsx(tn,{children:"Your API credentials are encrypted and stored securely. We only use them to generate access codes for your bookings."})]})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{variant:"outline",className:"flex-1",children:"Save for Later"}),s.jsx(G,{onClick:e,className:"flex-1 bg-blue-600 hover:bg-blue-700",disabled:!t||!r.api_key,children:"Continue to Testing"})]})]})]})}var tx="Collapsible",[fJ,KM]=rn(tx),[mJ,s_]=fJ(tx),QM=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:c,onOpenChange:d,...h}=e,[m,x]=vr({prop:r,defaultProp:i??!1,onChange:d,caller:tx});return s.jsx(mJ,{scope:n,disabled:c,contentId:xr(),open:m,onOpenToggle:b.useCallback(()=>x(p=>!p),[x]),children:s.jsx(Ze.div,{"data-state":r_(m),"data-disabled":c?"":void 0,...h,ref:t})})});QM.displayName=tx;var XM="CollapsibleTrigger",JM=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=s_(XM,n);return s.jsx(Ze.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":r_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Oe(e.onClick,i.onOpenToggle)})});JM.displayName=XM;var n_="CollapsibleContent",eR=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=s_(n_,e.__scopeCollapsible);return s.jsx(wr,{present:n||i.open,children:({present:c})=>s.jsx(pJ,{...r,ref:t,present:c})})});eR.displayName=n_;var pJ=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...c}=e,d=s_(n_,n),[h,m]=b.useState(r),x=b.useRef(null),p=gt(t,x),g=b.useRef(0),w=g.current,N=b.useRef(0),j=N.current,_=d.open||h,C=b.useRef(_),A=b.useRef(void 0);return b.useEffect(()=>{const M=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(M)},[]),Us(()=>{const M=x.current;if(M){A.current=A.current||{transitionDuration:M.style.transitionDuration,animationName:M.style.animationName},M.style.transitionDuration="0s",M.style.animationName="none";const E=M.getBoundingClientRect();g.current=E.height,N.current=E.width,C.current||(M.style.transitionDuration=A.current.transitionDuration,M.style.animationName=A.current.animationName),m(r)}},[d.open,r]),s.jsx(Ze.div,{"data-state":r_(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!_,...c,ref:p,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...e.style},children:_&&i})});function r_(e){return e?"open":"closed"}var gJ=QM,xJ=JM,yJ=eR,Kr="Accordion",vJ=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[i_,bJ,wJ]=fg(Kr),[sx]=rn(Kr,[wJ,KM]),a_=KM(),tR=Et.forwardRef((e,t)=>
581{const{type:n,...r}=e,i=r,c=r;return s.jsx(i_.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(SJ,{...c,ref:t}):s.jsx(NJ,{...i,ref:t})})});tR.displayName=Kr;var[sR,_J]=sx(Kr),[nR,jJ]=sx(Kr,{collapsible:!1}),NJ=Et.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:c=!1,...d}=e,[h,m]=vr({prop:n,defaultProp:r??"",onChange:i,caller:Kr});return s.jsx(sR,{scope:e.__scopeAccordion,value:Et.useMemo(()=>h?[h]:[],[h]),onItemOpen:m,onItemClose:Et.useCallback(()=>c&&m(""),[c,m]),children:s.jsx(nR,{scope:e.__scopeAccordion,collapsible:c,children:s.jsx(rR,{...d,ref:t})})})}),SJ=Et.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...c}=e,[d,h]=vr({prop:n,defaultProp:r??[],onChange:i,caller:Kr}),m=Et.useCallback(p=>h((g=[])=>[...g,p]),[h]),x=Et.useCallback(p=>h((g=[])=>g.filter(w=>w!==p)),[h]);return s.jsx(sR,{scope:e.__scopeAccordion,value:d,onItemOpen:m,onItemClose:x,children:s.jsx(nR,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(rR,{...c,ref:t})})})}),[kJ,nx]=sx(Kr),rR=Et.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:c="vertical",...d}=e,h=Et.useRef(null),m=gt(h,t),x=bJ(n),g=Vd(i)==="ltr",w=Oe(e.onKeyDown,N=>{var V;if(!vJ.includes(N.key))return;const j=N.target,_=x().filter(Q=>{var J;return!((J=Q.ref.current)!=null&&J.disabled)}),C=_.findIndex(Q=>Q.ref.current===j),A=_.length;if(C===-1)return;N.preventDefault();let M=C;const E=0,D=A-1,I=()=>{M=C+1,M>D&&(M=E)},z=()=>{M=C-1,M<E&&(M=D)};switch(N.key){case"Home":M=E;break;case"End":M=D;break;case"ArrowRight":c==="horizontal"&&(g?I():z());break;case"ArrowDown":c==="vertical"&&I();break;case"ArrowLeft":c==="horizontal"&&(g?z():I());break;case"ArrowUp":c==="vertical"&&z();break}const H=M%A;(V=_[H].ref.current)==null||V.focus()});return s.jsx(kJ,{scope:n,disabled:r,direction:i,orientation:c,children:s.jsx(i_.Slot,{scope:n,children:s.jsx(Ze.div,{...d,"data-orientation":c,ref:m,onKeyDown:r?void 0:w})})})}),Jp="AccordionItem",[CJ,o_]=sx(Jp),iR=Et.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,c=nx(Jp,n),d=_J(Jp,n),h=a_(n),m=xr(),x=r&&d.value.includes(r)||!1,p=c.disabled||e.disabled;return s.jsx(CJ,{scope:n,open:x,disabled:p,triggerId:m,children:s.jsx(gJ,{"data-orientation":c.orientation,"data-state":uR(x),...h,...i,ref:t,disabled:p,open:x,onOpenChange:g=>{g?d.onItemOpen(r):d.onItemClose(r)}})})});iR.displayName=Jp;var aR="AccordionHeader",oR=Et.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=nx(Kr,n),c=o_(aR,n);return s.jsx(Ze.h3,{"data-orientation":i.orientation,"data-state":uR(c.open),"data-disabled":c.disabled?"":void 0,...r,ref:t})});oR.displayName=aR;var B0="AccordionTrigger",lR=Et.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=nx(Kr,n),c=o_(B0,n),d=jJ(B0,n),h=a_(n);return s.jsx(i_.ItemSlot,{scope:n,children:s.jsx(xJ,{"aria-disabled":c.open&&!d.collapsible||void 0,"data-orientation":i.orientation,id:c.triggerId,...h,...r,ref:t})})});lR.displayName=B0;var cR="AccordionContent",dR=Et.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=nx(Kr,n),c=o_(cR,n),d=a_(n);return s.jsx(yJ,{role:"region","aria-labelledby":c.triggerId,"data-orientation":i.orientation,...d,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});dR.displayName=cR;function uR(e){return e?"open":"closed"}var PJ=tR,TJ=iR,EJ=oR,hR=lR,fR=dR;const AJ=PJ,mR=b.forwardRef(({className:e,...t},n)=>s.jsx(TJ,{ref:n,className:We("border-b",e),...t}));mR.displayName="AccordionItem";const pR=b.forwardRef(({className:e,children:t,...n},r)=>s.jsx(EJ,{className:"flex",children:s.jsxs(hR,{ref:r,className:We("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(pr,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));pR.displayName=hR.displayName;const gR=b.forwardRef(({className:e,children:t,...n},r)=>s.jsx(fR,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:We("pb-4 pt-0",e),children:t})}));gR.displayName=fR.displayName;function MJ({onComplete:e}){const t=[{q:"How do guests receive their access codes?",a:"Guests receive both building entry and locker codes via email immediately after payment. Codes are also visible in their booking confirmation and account dashboard."},{q:"What happens if a guest loses their code?",a:'Guests can retrieve their codes anytime by logging into their account. Partners can also view active codes in the Partner Portal under "Active Bookings".'},{q:"How often should I change locker codes?",a:"Codes are automatically rotated after each booking checkout. For security, we recommend manually changing building entry codes quarterly."},{q:"What if a lock battery dies?",a:"You will receive low battery alerts at 20%. Most smart locks last 6-12 months on a charge. Keep spare batteries on hand and log maintenance in the Partner Portal."},{q:"Can I temporarily disable a locker?",a:'Yes! In the Partner Portal, change the locker status to "Maintenance" and it will not appear in search results until you mark it available again.'},{q:"How do I handle guest issues or complaints?",a:"Contact us immediately via the Partner Portal support chat or call our 24/7 hotline. We handle all customer service and will coordinate with you for resolutions."},{q:"What insurance coverage is required?",a:"Partners must maintain general liability insurance covering stored property. We provide up to $10,000 coverage per booking as an additional layer."},{q:"How do payouts work?",a:"Earnings are transferred weekly to your connected bank account. You can view pending and completed payouts in the Earnings section of the Partner Portal."}],n=[{title:"Getting Started with Stow-N-Go",duration:"5:30",thumb:"video1"},{title:"Configuring Smart Locks",duration:"8:15",thumb:"video2"},{title:"Managing Bookings & Access Codes",duration:"6:45",thumb:"video3"},{title:"Troubleshooting Common Issues",duration:"10:20",thumb:"video4"}];return s.jsx("div",{className:"space-y-6",children:s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Resources & Support"})}),s.jsxs(me,{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[s.jsx(eN,{className:"w-5 h-5 text-blue-600"}),"Video Tutorials"]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:n.map((r,i)=>s.jsx("div",{className:"border rounded-lg p-3 hover:bg-gray-50 cursor-pointer transition-colors",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded flex items-center justify-center flex-shrink-0",children:s.jsx(eN,{className:"w-6 h-6 text-blue-600"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm truncate",children:r.title}),s.jsx("p",{className:"text-xs text-gray-500",children:r.duration})]})]})},i))})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Y0,{className:"w-5 h-5 text-blue-600"}),"Downloadable Resources"]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(G,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"}),"Locker Label Template (PDF)"]}),s.jsxs(G,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"}),"Guest Instructions Poster (PDF)"]}),s.jsxs(G,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"}),"Partner Agreement (PDF)"]}),s.jsxs(G,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"}),"Maintenance Checklist (PDF)"]})]})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[s.jsx(Sk,{className:"w-5 h-5 text-blue-600"}),"Frequently Asked Questions"]}),s.jsx(AJ,{type:"single",collapsible:!0,className:"w-full",children:t.map((r,i)=>s.jsxs(mR,{value:`item-${i}`,children:[s.jsx(pR,{className:"text-left text-sm",children:r.q}),s.jsx(gR,{className:"text-sm text-gray-600",children:r.a})]},i))})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-4",children:[s.jsx("h4",{className:"font-semibold text-blue-900 mb-3",children:"Need More Help?"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(G,{variant:"ghost",className:"w-full justify-start text-blue-700 hover:text-blue-800 hover:bg-blue-100",children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"Full Documentation Portal"]}),s.jsxs(G,{variant:"ghost",className:"w-full justify-start text-blue-700 hover:text-blue-800 hover:bg-blue-100",children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"Partner Community Forum"]}),s.jsxs(G,{variant:"ghost",className:"w-full justify-start text-blue-700 hover:text-blue-800 hover:bg-blue-100",children:[s.jsx(fa,{className:"w-4 h-4 mr-2"}),"24/7 Support Chat"]})]})]}),s.jsx(G,{onClick:e,className:"w-full bg-green-600 hover:bg-green-700",size:"lg",children:"Complete Onboarding & Go to Portal"})]})]})})}function RJ(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState(!0),[c,d]=b.useState("welcome"),[h,m]=b.useState([]),x=[{id:"welcome",label:"Welcome",icon:ms},{id:"hardware",label:"Hardware Setup",icon:Ct},{id:"api",label:"API Integration",icon:Mk},{id:"testing",label:"Test & Verify",icon:Pk},{id:"resources",label:"Resources",icon:Sk}];b.useEffect(()=>{p()},[]);const p=async()=>{try{const N=await X.auth.me();n(N)}catch{X.auth.redirectToLogin(window.location.href)}finally{i(!1)}},g=N=>{h.includes(N)||m([...h,N])},w=h.length/x.length*100;return r?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/7bdcf34f5_image.png",alt:"Stow-N-Go",className:"h-20 mx-auto mb-4"}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Stow-N-Go Partner Onboarding"}),s.jsx("p",{className:"text-gray-600",children:"Welcome! Let's get your 24/7 smart locker system set up."})]}),s.jsxs("div",{className:"mb-8",children:[s.jsx(Xw,{value:w,className:"h-2"}),s.jsxs("p",{className:"text-sm text-gray-600 mt-2 text-center",children:[h.length," of ",x.length," steps completed"]})]}),s.jsx("div",{className:"flex justify-center mb-8 overflow-x-auto",children:s.jsx("div",{className:"flex gap-2",children:x.map((N,j)=>{const _=N.icon,C=c===N.id,A=h.includes(N.id);return s.jsxs("button",{onClick:()=>d(N.id),className:`flex flex-col items-center p-3 rounded-lg transition-all min-w-[100px] ${C?"bg-blue-100 border-2 border-blue-600":A?"bg-green-50 border-2 border-green-600":"bg-white border border-gray-200 hover:bg-gray-50"}`,children:[s.jsx(_,{className:`w-6 h-6 mb-1 ${C?"text-blue-600":A?"text-green-600":"text-gray-400"}`}),s.jsx("span",{className:`text-xs font-medium ${C?"text-blue-600":A?"text-green-600":"text-gray-600"}`,children:N.label})]},N.id)})})}),s.jsxs("div",{className:"max-w-4xl mx-auto",children:[c==="welcome"&&s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Welcome to Stow-N-Go!"})}),s.jsxs(me,{className:"space-y-6",children:[s.jsx("p",{className:"text-gray-600 leading-relaxed",children:"You're about to join our network of 24/7 self-service storage providers. This onboarding process will guide you through setting up your smart locker system."}),s.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"What You'll Need:"}),s.jsxs("ul",{className:"space-y-2 text-sm text-blue-800",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ms,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Your smart lock system credentials (API keys, device IDs)"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ms,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Building access codes and instructions"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ms,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Locker inventory details (sizes and pricing)"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(ms,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"15-30 minutes to complete setup"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"font-semibold text-gray-900",children:"Supported Lock Systems:"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"border rounded-lg p-3 text-center",children:[s.jsx("p",{className:"font-medium",children:"Nokē"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Smart Padlocks"})]}),s.jsxs("div",{className:"border rounded-lg p-3 text-center",children:[s.jsx("p",{className:"font-medium",children:"igloohome"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Smart Locks"})]}),s.jsxs("div",{className:"border rounded-lg p-3 text-center",children:[s.jsx("p",{className:"font-medium",children:"Tuya"}),s.jsx("p",{className:"text-xs text-gray-500",children:"IoT Locks"})]})]})]}),s.jsx(G,{onClick:()=>{g("welcome"),d("hardware")},className:"w-full bg-blue-600 hover:bg-blue-700",size:"lg",children:"Let's Get Started"})]})]}),c==="hardware"&&s.jsx(uJ,{onComplete:()=>{g("hardware"),d("api")}}),c==="api"&&s.jsx(hJ,{onComplete:()=>{g("api"),d("testing")}}),c==="testing"&&s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Test Your Setup"})}),s.jsxs(me,{className:"space-y-6",children:[s.jsx("p",{className:"text-gray-600",children:"Let's verify everything is working correctly before going live."}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"1. Test Building Access"}),s.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Verify guests can enter using the building code you provided."}
581),s.jsx(G,{variant:"outline",size:"sm",children:"Send Test Code to My Phone"})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"2. Test Locker Lock"}),s.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Generate a test code and verify it opens a locker."}),s.jsx(G,{variant:"outline",size:"sm",children:"Generate Test Lock Code"})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"3. Verify Notifications"}),s.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Ensure you receive booking notifications."}),s.jsx(G,{variant:"outline",size:"sm",children:"Send Test Notification"})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(G,{variant:"outline",onClick:()=>d("api"),className:"flex-1",children:"Back"}),s.jsx(G,{onClick:()=>{g("testing"),d("resources")},className:"flex-1 bg-green-600 hover:bg-green-700",children:"All Tests Passed"})]})]})]}),c==="resources"&&s.jsx(MJ,{onComplete:()=>{g("resources"),e(At("PartnerPortal"))}})]})]})})}function LJ(){const e=br(),[t,n]=b.useState(null),[r,i]=b.useState(!0),[c,d]=b.useState(!1),[h,m]=b.useState(!1),[x,p]=b.useState(""),[g,w]=b.useState({location_name:"",address:"",city:"",building_entry_code:"",building_access_instructions:"",lock_system_type:"",lock_system_details:"",code_generation_method:"",small_count:0,small_price:0,medium_count:0,medium_price:0,large_count:0,large_price:0,xl_count:0,xl_price:0,business_name:"",contact_phone:"",contact_email:"",agreed_to_terms:!1,agreed_to_insurance:!1});b.useEffect(()=>{N()},[]);const N=async()=>{try{const _=await X.auth.me();n(_),w(C=>({...C,contact_email:_.email}))}catch{X.auth.redirectToLogin(window.location.href)}finally{i(!1)}},j=async _=>{_.preventDefault(),p(""),d(!0);try{const C=parseInt(g.small_count)+parseInt(g.medium_count)+parseInt(g.large_count)+parseInt(g.xl_count);if(C===0){p("Please add at least one locker"),d(!1);return}if(!g.agreed_to_terms||!g.agreed_to_insurance){p("Please agree to all terms and conditions"),d(!1);return}const A=await X.entities.StorageLocation.create({title:g.location_name,address:g.address,city:g.city,capacity:C,unit_type:"small_bags",status:"pending",host_id:t.id,business_type:"storage_facility",agreed_to_terms:g.agreed_to_terms,description:`Stow-N-Go 24/7 Self-Service Location - ${C} Smart Lockers`,amenities:["24_7_access","secure_lock","indoor"],access_codes:[{code:g.building_entry_code,description:"Building Entry Code",in_use:!0}]}),M=[],E=["small","medium","large","xl"];for(const D of E){const I=parseInt(g[`${D}_count`])||0,z=parseFloat(g[`${D}_price`])||0;for(let H=1;H<=I;H++)M.push({location_id:A.id,locker_number:`${D.toUpperCase()}-${H}`,locker_size:D,status:"available",price_per_day:z,lock_system_type:g.lock_system_type,door_code:g.building_entry_code,access_instructions:g.building_access_instructions})}M.length>0&&await X.entities.StowNGoLocker.bulkCreate(M),await X.entities.Notification.create({user_id:t.id,title:"Stow-N-Go Application Submitted",message:`Your application for ${g.location_name} has been submitted and is pending review.`,type:"general"}),m(!0),setTimeout(()=>{e(At("PartnerPortal"))},3e3)}catch(C){console.error("Submission error:",C),p(C.message||"Failed to submit application")}finally{d(!1)}};return r?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):h?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-4",children:s.jsx(oe,{className:"max-w-md w-full",children:s.jsxs(me,{className:"pt-6 text-center",children:[s.jsx(ms,{className:"w-16 h-16 text-green-600 mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Application Submitted!"}),s.jsx("p",{className:"text-gray-600 mb-4",children:"Your Stow-N-Go partner application has been submitted. We'll review your information and contact you within 48 hours."}),s.jsx("p",{className:"text-sm text-gray-500",children:"Redirecting to Partner Portal..."})]})})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6967861d66a3f9ca4997b8fe/7bdcf34f5_image.png",alt:"Stow-N-Go",className:"h-24 mx-auto mb-4"}),s.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Become a Stow-N-Go Partner"}),s.jsx("p",{className:"text-gray-600",children:"Join our 24/7 self-service storage network"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-6",children:[s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(jt,{className:"w-5 h-5"}),"Location Information"]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Location Name"}),s.jsx(de,{value:g.location_name,onChange:_=>w({...g,location_name:_.target.value}),placeholder:"Downtown Storage Center",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Full Address"}),s.jsx(de,{value:g.address,onChange:_=>w({...g,address:_.target.value}),placeholder:"123 Main St",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{children:"City"}),s.jsx(de,{value:g.city,onChange:_=>w({...g,city:_.target.value}),placeholder:"Savannah",required:!0})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ct,{className:"w-5 h-5"}),"Building Access"]})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Building Entry Code"}),s.jsx(de,{value:g.building_entry_code,onChange:_=>w({...g,building_entry_code:_.target.value}),placeholder:"1234",required:!0}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Main door/gate access code for 24/7 entry"})]}
581),s.jsxs("div",{children:[s.jsx(te,{children:"Access Instructions"}),s.jsx(Os,{value:g.building_access_instructions,onChange:_=>w({...g,building_access_instructions:_.target.value}),placeholder:"Enter through front door, lockers are in hallway on the right...",rows:4,required:!0})]})]})]}),s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{children:"Smart Lock System"}),s.jsx(kn,{children:"Information about your wireless padlock system"})]}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Lock System Type"}),s.jsxs(ts,{value:g.lock_system_type,onValueChange:_=>w({...g,lock_system_type:_}),children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"Select lock system"})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"noke",children:"Nokē Smart Locks"}),s.jsx(Ge,{value:"tuya",children:"Tuya Smart Locks"}),s.jsx(Ge,{value:"igloohome",children:"igloohome"}),s.jsx(Ge,{value:"iloq",children:"iLOQ"}),s.jsx(Ge,{value:"smartelock",children:"SMARTELOCK"}),s.jsx(Ge,{value:"other",children:"Other"})]})]})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Lock System Details"}),s.jsx(Os,{value:g.lock_system_details,onChange:_=>w({...g,lock_system_details:_.target.value}),placeholder:"Device IDs, API credentials, account information...",rows:3}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"We'll use this to integrate with your lock system"})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Code Generation Method"}),s.jsxs(ts,{value:g.code_generation_method,onValueChange:_=>w({...g,code_generation_method:_}),children:[s.jsx(qt,{children:s.jsx(ss,{placeholder:"How do you generate codes?"})}),s.jsxs(Gt,{children:[s.jsx(Ge,{value:"api",children:"Via API (Automated)"}),s.jsx(Ge,{value:"manual_app",children:"Manual via Mobile App"}),s.jsx(Ge,{value:"qr_code",children:"QR Code Generation"}),s.jsx(Ge,{value:"preset_codes",children:"Pre-set Codes"}),s.jsx(Ge,{value:"other",children:"Other Method"})]})]})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(es,{className:"w-5 h-5"}),"Locker Inventory & Pricing"]})}),s.jsxs(me,{className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Small Lockers (Carry-on size)"}),s.jsx(de,{type:"number",min:"0",value:g.small_count,onChange:_=>w({...g,small_count:_.target.value}),placeholder:"Quantity"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Price per Day ($)"}),s.jsx(de,{type:"number",min:"0",step:"0.01",value:g.small_price,onChange:_=>w({...g,small_price:_.target.value}),placeholder:"10.00"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Medium Lockers (Checked bag size)"}),s.jsx(de,{type:"number",min:"0",value:g.medium_count,onChange:_=>w({...g,medium_count:_.target.value}),placeholder:"Quantity"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Price per Day ($)"}),s.jsx(de,{type:"number",min:"0",step:"0.01",value:g.medium_price,onChange:_=>w({...g,medium_price:_.target.value}),placeholder:"15.00"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Large Lockers (Multiple bags)"}),s.jsx(de,{type:"number",min:"0",value:g.large_count,onChange:_=>w({...g,large_count:_.target.value}),placeholder:"Quantity"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Price per Day ($)"}),s.jsx(de,{type:"number",min:"0",step:"0.01",value:g.large_price,onChange:_=>w({...g,large_price:_.target.value}),placeholder:"20.00"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"XL Lockers (Oversized items)"}),s.jsx(de,{type:"number",min:"0",value:g.xl_count,onChange:_=>w({...g,xl_count:_.target.value}),placeholder:"Quantity"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(te,{children:"Price per Day ($)"}),s.jsx(de,{type:"number",min:"0",step:"0.01",value:g.xl_price,onChange:_=>w({...g,xl_price:_.target.value}),placeholder:"25.00"})]})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{children:s.jsx(Pe,{children:"Business Contact Information"})}),s.jsxs(me,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Business N
581ame"}),s.jsx(de,{value:g.business_name,onChange:_=>w({...g,business_name:_.target.value}),placeholder:"Your Business LLC",required:!0})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(te,{children:"Contact Phone"}),s.jsx(de,{type:"tel",value:g.contact_phone,onChange:_=>w({...g,contact_phone:_.target.value}),placeholder:"(555) 123-4567",required:!0})]}),s.jsxs("div",{children:[s.jsx(te,{children:"Contact Email"}),s.jsx(de,{type:"email",value:g.contact_email,onChange:_=>w({...g,contact_email:_.target.value}),required:!0})]})]})]})]}),s.jsx(oe,{children:s.jsxs(me,{className:"pt-6 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Rd,{id:"terms",checked:g.agreed_to_terms,onCheckedChange:_=>w({...g,agreed_to_terms:_})}),s.jsx("label",{htmlFor:"terms",className:"text-sm leading-relaxed cursor-pointer",children:"I agree to the Stow-N-Go Partner Terms and Conditions, including 24/7 access requirements, maintenance responsibilities, and commission structure"})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Rd,{id:"insurance",checked:g.agreed_to_insurance,onCheckedChange:_=>w({...g,agreed_to_insurance:_})}),s.jsx("label",{htmlFor:"insurance",className:"text-sm leading-relaxed cursor-pointer",children:"I confirm that my facility has appropriate insurance coverage and will maintain the smart lock system in working condition"})]})]})}),x&&s.jsxs(en,{variant:"destructive",children:[s.jsx(fn,{className:"h-4 w-4"}),s.jsx(tn,{children:x})]}),s.jsx(G,{type:"submit",disabled:c,className:"w-full bg-blue-600 hover:bg-blue-700 py-6 text-lg",children:c?"Submitting Application...":"Submit Application"})]})]})})}function DJ(){return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs(oe,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-3xl font-bold text-center",children:"Terms of Service"}),s.jsx("p",{className:"text-center text-gray-600 mt-2",children:"Last Updated: January 20, 2026"})]}),s.jsxs(me,{className:"prose prose-sm max-w-none space-y-6",children:[s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"1. Acceptance of Terms"}),s.jsx("p",{children:'By accessing or using Stow My Bags ("Service"), you agree to be bound by these Terms of Service. If you do not agree to these terms, you may not use the Service.'})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"2. Description of Service"}),s.jsx("p",{children:'Stow My Bags is a peer-to-peer luggage storage marketplace that connects travelers ("Users") with verified storage partners ("Partners") who provide secure luggage storage services. We facilitate bookings, payments, and logistics but do not directly provide storage services.'})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"3. User Responsibilities"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"3.1 Account Information"}),s.jsx("p",{children:"You must provide accurate, current, and complete information during registration and keep your account information updated."}),s.jsx("p",{className:"font-semibold",children:"3.2 Prohibited Items"}),s.jsx("p",{children:"You may not store:"}),s.jsxs("ul",{className:"list-disc ml-6 space-y-1",children:[s.jsx("li",{children:"Illegal substances or contraband"}),s.jsx("li",{children:"Weapons, firearms, or explosives"}),s.jsx("li",{children:"Perishable food items"}),s.jsx("li",{children:"Hazardous materials or chemicals"}),s.jsx("li",{children:"Live animals"}),s.jsx("li",{children:"Items exceeding $10,000 in value without prior written approval"})]}),s.jsx("p",{className:"font-semibold",children:"3.3 Liability for Contents"}),s.jsx("p",{children:"You are solely responsible for the contents of your stored items. You agree to indemnify Stow My Bags and its Partners against any claims arising from prohibited or illegal items."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"4. Booking and Payment"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"4.1 Pricing"}),s.jsx("p",{children:"Storage rates are set by individual Partners and displayed during booking. All prices are in USD and include applicable platform fees."}),s.jsx("p",{className:"font-semibold",children:"4.2 Payment Processing"}),s.jsx("p",{children:"Payments are processed through Stripe. By making a booking, you authorize us to charge your payment method for the total booking amount."}),s.jsx("p",{className:"font-semibold",children:"4.3 Cancellations"}),s.jsx("p",{children:"Cancellations made more than 24 hours before check-in receive a full refund minus a $5 processing fee. Cancellations within 24 hours are non-refundable."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"5. Insurance and Liability"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"5.
5811 Basic Coverage"}),s.jsx("p",{children:"All bookings include basic coverage up to $500 per bag for loss or damage while in Partner's custody. This coverage is provided through our Partner's insurance policies."}),s.jsx("p",{className:"font-semibold",children:"5.2 Limitations"}),s.jsx("p",{children:"Coverage does not include: cash, jewelry, electronics over $1,000, items not declared during check-in, or damage due to improper packing. Stow My Bags is not responsible for Partner negligence or force majeure events."}),s.jsx("p",{className:"font-semibold",children:"5.3 Additional Insurance"}),s.jsx("p",{children:"You may purchase additional insurance coverage during booking for high-value items. Claims must be filed within 48 hours of discovery with photographic evidence."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"6. Check-In and Check-Out"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"6.1 Check-In Process"}),s.jsx("p",{children:"Partners will photograph your bags upon check-in and provide you with a unique pickup number. Keep this number secure as it is required for retrieval."}),s.jsx("p",{className:"font-semibold",children:"6.2 Check-Out Process"}),s.jsx("p",{children:"You must present your pickup number and valid photo ID to retrieve bags. Partners may refuse release without proper identification."}),s.jsx("p",{className:"font-semibold",children:"6.3 Extended Storage"}),s.jsx("p",{children:"If you fail to retrieve bags by the scheduled end date, additional daily charges will apply. Bags left more than 30 days past end date may be considered abandoned."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"7. Delivery Services"}),s.jsx("p",{children:"Optional delivery services are provided through third-party logistics partners (including Uber Direct). Delivery times are estimates and not guaranteed. You must be available to receive delivery or authorize a secure drop-off location."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"8. Dispute Resolution"}),s.jsx("p",{children:"Any disputes arising from this agreement shall be resolved through binding arbitration in accordance with the laws of the State of Delaware. You waive your right to participate in class action lawsuits."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"9. Modifications"}),s.jsx("p",{children:"We reserve the right to modify these Terms at any time. Continued use of the Service after changes constitutes acceptance of modified terms. We will notify users of material changes via email."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"10. Termination"}),s.jsx("p",{children:"We may suspend or terminate your account for violation of these Terms, fraudulent activity, or at our discretion. Upon termination, you remain liable for any outstanding charges."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-bold mb-3",children:"11. Contact Information"}),s.jsxs("p",{children:["For questions about these Terms, contact us at:",s.jsx("br",{}),"Email: [email protected]",s.jsx("br",{}),"Phone: 1-800-STOW-BAG"]})]}),s.jsx("div",{className:"mt-8 p-4 bg-blue-50 rounded-lg",children:s.jsxs("p",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"IMPORTANT:"})," These Terms constitute a legally binding agreement. Please read carefully and consult with legal counsel if you have questions. By using Stow My Bags, you acknowledge that you have read, understood, and agree to be bound by these Terms."]})})]})]})})})}function OJ(){var w;const[e,t]=b.useState("all"),[n,r]=b.useState("savannah");Et.useEffect(()=>{const N=document.createElement("script");return N.src="https://widget.getyourguide.com/dist/pa.umd.production.min.js",N.async=!0,N.setAttribute("data-gyg-partner-id","9FKCOE9"),document.body.appendChild(N),()=>{document.body.removeChild(N)}},[]);const i={viator:{enabled:!0,baseUrl:"https://www.viator.com",pid:"P00286222",mcid:"42383",commission:"8%"},getYourGuide:{enabled:!0,baseUrl:"https://www.getyourguide.com",partnerId:"9FKCOE9",commission:"7%"},trustedTours:{enabled:!0,baseUrl:"https://affiliate.trustedtours.com",affiliateId:"YOUR_FLEXOFFERS_AFFILIATE_ID",commission:"4.75%"}},c={savannah:[{title:"Old Town Trolley Tours",description:"Hop-on hop-off tour of historic Savannah with 15 stops",price:"from $44.89",duration:"90 minutes",rating:4.5,reviews:1200,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1533094602577-198d3beab8ea?w=400"},{title:"Savannah Riverboat Dinner Cruise",description:"Evening dinner cruise on the Georgia Queen with live entertainment",price:"from $79",duration:"2 hours",rating:4.7,reviews:850,category:"dining",provider:"trustedTours",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Ghost & Gravestones Tour",description:"Haunted evening tour through Savannah's most spooky locations",price:"from $35",duration:"90 minutes",rating:4.8,reviews:2100,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1509248961158-e54f6934749c?w=400"},{title:"Historic Walking Tour",description:"Guided walking tour through Savannah's historic district",price:"from $30",duration:"2 hours",rating:4.6,reviews:980,category:"sightseeing",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=400"},{title:"Savannah Food Tour",description:"Taste your way through Savannah with local cuisine samples",price:"from $65",duration:"3 hours",rating:4.9,reviews:1500,category:"dining",provider:"viator",image:"https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=400"},{title:"Dolphin & Wildlife Cruise",description:"See dolphins and local wildlife on a guided boat tour",price:"from $45",duration:"2 hours",rating:4.7,reviews:750,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"},{title:"Pub Crawl Tour",description:"Evening pub crawl through historic Savannah bars",price:"from $40",duration:"3 hours",rating:4.5,reviews:620,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1514933651103-005eec06c04b?w=400"},{title:"Forsyth Park Bike Tour",description:"Guided bike tour through parks and historic neighborhoods",price:"from $38",duration:"2.5 hours",rating:4.6,reviews:450,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1571068316344-75bc76f77890?w=400"},{title:"Bonaventure Cemetery Tour",description:"Explore Savannah's most famous cemetery with expert guide",price:"from $42",duration:"2 hours",rating:4.7,reviews:820,category:"sightseeing",provider:"viator",image:"https://images.unsplash.com/photo-1578926288207-27b3e174f0d6?w=400"},{title:"Kayak Nature Tour",description:"Paddle through coastal marshlands and see wildlife up close",price:"from $55",duration:"3 hours",rating:4.8,reviews:640,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Pirate Ship Adventure",description:"Family-friendly pirate adventure cruise with activities",price:"from $35",duration:"90 minutes",rating:4.6,reviews:950,category:"entertainment",provider:"trustedTours",image:"https://images.unsplash.com/photo-1590523741831-ab7e8b8f9c7f?w=400"},{title:"Southern Cooking Class",description:"Learn to cook authentic Southern dishes with local chefs",price:"from $89",duration:"3 hours",rating:4.9,reviews:420,category:"dining",provider:"viator",image:"https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=400"},{title:"Sunset Harbor Cruise",description:"Romantic sunset cruise along Savannah's historic waterfront",price:"from $52",duration:"2 hours",rating:4.7,reviews:890,category:"entertainment",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"},{title:"Wormsloe Plantation Tour",description:"Visit the iconic oak-lined entrance and colonial ruins",price:"from $45",duration:"2.5 hours",rating:4.6,reviews:720,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1542223189-67a03fa0f0bd?w=400"},{title:"Photography Walking Tour",description:"Capture Savannah's beauty with a professional photographer",price:"from $75",duration:"3 hours",rating:4.8,reviews:380,category:"sightseeing",provider:"viator",image:"https://images.unsplash.com/photo-1452587925148-ce544e77e70d?w=400"},{title:"Tybee Island Beach Day Trip",description:"Full day excursion to Savannah's nearby beach paradise",price:"from $68",duration:"6 hours",rating:4.7,reviews:1100,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"}],charleston:[{title:"Historic Carriage Tour",description:"Classic horse-
581drawn carriage through Charleston's historic district",price:"from $35",duration:"60 minutes",rating:4.7,reviews:2800,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?w=400"},{title:"Fort Sumter Ferry & Tour",description:"Visit where the Civil War began with guided tour and ferry ride",price:"from $32",duration:"2.5 hours",rating:4.6,reviews:1950,category:"sightseeing",provider:"viator",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Charleston Food Tour",description:"Taste Lowcountry cuisine at the city's best restaurants",price:"from $72",duration:"3 hours",rating:4.9,reviews:1620,category:"dining",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=400"},{title:"Ghost Walking Tour",description:"Explore Charleston's haunted history after dark",price:"from $29",duration:"90 minutes",rating:4.5,reviews:2200,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1509248961158-e54f6934749c?w=400"},{title:"Plantation Tour Experience",description:"Visit historic plantations and beautiful gardens",price:"from $58",duration:"4 hours",rating:4.8,reviews:1440,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1542223189-67a03fa0f0bd?w=400"},{title:"Harbor Sunset Sail",description:"Sunset sailing cruise through Charleston Harbor",price:"from $55",duration:"2 hours",rating:4.9,reviews:980,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"},{title:"Culinary History Tour",description:"Learn about Charleston's culinary heritage with tastings",price:"from $68",duration:"3 hours",rating:4.7,reviews:1120,category:"dining",provider:"viator",image:"https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=400"},{title:"Patriots Point Naval Museum",description:"Tour historic naval vessels including USS Yorktown",price:"from $32",duration:"2 hours",rating:4.6,reviews:1580,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Folly Beach Day Trip",description:"Relax at Charleston's favorite beach destination",price:"from $45",duration:"5 hours",rating:4.5,reviews:890,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"},{title:"Pub Crawl & History Tour",description:"Visit historic pubs while learning Charleston's stories",price:"from $42",duration:"3 hours",rating:4.6,reviews:740,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1514933651103-005eec06c04b?w=400"}],keywest:[{title:"Sunset Sail & Celebration",description:"Famous Key West sunset cruise with champagne toast",price:"from $65",duration:"2 hours",rating:4.9,reviews:3200,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"},{title:"Snorkeling Adventure",description:"Explore coral reefs and tropical fish in crystal waters",price:"from $75",duration:"4 hours",rating:4.8,reviews:2150,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"},{title:"Conch Republic Food Tour",description:"Taste Key West's famous conch fritters and seafood",price:"from $68",duration:"3 hours",rating:4.7,reviews:1680,category:"dining",provider:"trustedTours",image:"https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=400"},{title:"Ernest Hemingway Home",description:"Tour the famous writer's home and meet the six-toed cats",price:"from $18",duration:"60 minutes",rating:4.6,reviews:2900,category:"sightseeing",provider:"viator",image:"https://images.unsplash.com/photo-1542223189-67a03fa0f0bd?w=400"},{title:"Glass Bottom Boat Tour",description:"See underwater life without getting wet",price:"from $45",duration:"2 hours",rating:4.5,reviews:1420,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Duval Street Pub Crawl",description:"Experience Key West nightlife and famous bars",price:"from $38",duration:"3 hours",rating:4.7,reviews:1850,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1514933651103-005eec06c04b?w=400"},{title:"Jet Ski Tour",description:"Thrilling jet ski adventure around the island",price:"from $120",duration:"90 minutes",rating:4.8,reviews:980,category:"nature",provider:"trustedTours",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"},{title:"Dry Tortugas National Park",description:"Full day excursion to remote paradise with snorkeling",price:"from $185",duration:"8 hours",rating:4.9,reviews:1240,category:"nature",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400"},{title:"Ghost & Legends Tour",description:"Explore Key West's spo
581oky and mysterious past",price:"from $32",duration:"90 minutes",rating:4.6,reviews:1560,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1509248961158-e54f6934749c?w=400"},{title:"Parasailing Adventure",description:"Soar 500 feet above the turquoise waters",price:"from $85",duration:"60 minutes",rating:4.8,reviews:1120,category:"nature",provider:"trustedTours",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"}],staugustine:[{title:"Historic Sightseeing Train",description:"Narrated tour of America's oldest city",price:"from $35",duration:"70 minutes",rating:4.6,reviews:1890,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1533094602577-198d3beab8ea?w=400"},{title:"Castillo de San Marcos Tour",description:"Explore the oldest masonry fort in the US",price:"from $15",duration:"90 minutes",rating:4.7,reviews:2450,category:"sightseeing",provider:"viator",image:"https://images.unsplash.com/photo-1542223189-67a03fa0f0bd?w=400"},{title:"Ghost Tour of St. Augustine",description:"Walk through haunted streets and hear spine-tingling tales",price:"from $28",duration:"90 minutes",rating:4.8,reviews:3100,category:"entertainment",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1509248961158-e54f6934749c?w=400"},{title:"Colonial Quarter Experience",description:"Interactive living history museum with reenactments",price:"from $18",duration:"2 hours",rating:4.5,reviews:1320,category:"sightseeing",provider:"trustedTours",image:"https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?w=400"},{title:"Dolphin & Wildlife Cruise",description:"See dolphins and birds in their natural habitat",price:"from $42",duration:"90 minutes",rating:4.7,reviews:1680,category:"nature",provider:"viator",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"},{title:"St. Augustine Food Tour",description:"Taste the flavors of the nation's oldest city",price:"from $62",duration:"3 hours",rating:4.8,reviews:920,category:"dining",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=400"},{title:"Alligator Farm & Zoo",description:"See alligators, crocodiles, and exotic animals",price:"from $29",duration:"2 hours",rating:4.6,reviews:2140,category:"nature",provider:"trustedTours",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"},{title:"Old Town Pub Tour",description:"Visit historic pubs and learn local history",price:"from $39",duration:"2.5 hours",rating:4.5,reviews:840,category:"entertainment",provider:"viator",image:"https://images.unsplash.com/photo-1514933651103-005eec06c04b?w=400"},{title:"Scenic Helicopter Tour",description:"Aerial views of historic St. Augustine and coastline",price:"from $75",duration:"30 minutes",rating:4.9,reviews:650,category:"sightseeing",provider:"getYourGuide",image:"https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=400"},{title:"Kayak Eco Tour",description:"Paddle through salt marshes and coastal waterways",price:"from $55",duration:"2.5 hours",rating:4.7,reviews:780,category:"nature",provider:"trustedTours",image:"https://images.unsplash.com/photo-1559827260-dc66d52bef19?w=400"}]},d=[{id:"all",label:"All Tours",icon:ip},{id:"sightseeing",label:"Sightseeing",icon:jt},{id:"dining",label:"Food & Dining",icon:ng},{id:"entertainment",label:"Entertainment",icon:Yn},{id:"nature",label:"Nature & Wildlife",icon:Ts}],h=N=>{const j=i[N.provider];if(!j||!j.enabled)return"#";switch(N.provider){case"viator":return`${j.baseUrl}?pid=${j.pid}&mcid=${j.mcid}&medium=link&medium_version=selector`;case"getYourGuide":return`${j.baseUrl}/s/?q=${encodeURIComponent(N.title)}&partner_id=${j.partnerId}`;case"trustedTours":return`${j.baseUrl}/savannah?aid=${j.affiliateId}`;default:return"#"}},m=N=>{switch(N){case"viator":return"Viator";case"getYourGuide":return"GetYourGuide";case"trustedTours":return"Trusted Tours";default:return"Partner"}},x=c[n]||[],p=e==="all"?x:x.filter(N=>N.category===e),g=[{id:"savannah",name:"Savannah",color:"blue"},{id:"charleston",name:"Charleston",color:"purple"},{id:"keywest",name:"Key West",color:"teal"},{id:"staugustine",name:"Saint Augustine",color:"orange"}];return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-gradient-to-br from-blue-600 to-blue-800 text-white py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4",children:s.jsxs("div",{className:"text-center",children:[s.jsx(ip,{className:"w-16 h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Explore Tours & Attractions"}),s.jsx("p",{className:"text-xl text-blue-100 max-w-2xl mx-auto",children:"Discover the best tours, attractions, and experiences while your bags are safely stored"})]})})}),s.jsx("div",{className:"bg-white border-b",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 py-6",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:g.map(N=>s.jsx("button",{onClick:()=>r(N.id),className:`relative px-6 py-3 rounded-lg font-semibold transition-all ${n===N.id?"bg-blue-600 text-white shadow-lg":"bg-white text-gray-700 hover:bg-gray-50 border-2"}`,children:N.name},N.id))})})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-12",children:[i.trustedTours.affiliateId.includes("YOUR_")&&s.jsxs("div",{className:"mb-8 p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[s.jsx("h3",{className:"font-semibold text-yellow-900 mb-2",children:"⚠️ Affiliate Setup Required"}
581),s.jsx("p",{className:"text-sm text-yellow-800 mb-2",children:"To earn full commissions, update the remaining affiliate IDs in the ToursAttractions.js file:"}),s.jsx("ul",{className:"text-sm text-yellow-800 list-disc ml-5 space-y-1",children:s.jsxs("li",{children:["Trusted Tours (4.75% commission): Sign up at ",s.jsx("a",{href:"https://www.flexoffers.com",target:"_blank",className:"underline",children:"flexoffers.com"})]})})]}),s.jsx("div",{className:"flex flex-wrap gap-3 mb-8 justify-center",children:d.map(N=>{const j=N.icon;return s.jsxs("button",{onClick:()=>t(N.id),className:`flex items-center gap-2 px-6 py-3 rounded-lg font-medium transition-all ${e===N.id?"bg-blue-600 text-white shadow-lg":"bg-white text-gray-700 hover:bg-gray-50 border"}`,children:[s.jsx(j,{className:"w-4 h-4"}),N.label]},N.id)})}),n==="savannah"&&s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6 text-center",children:"Browse All Savannah Tours"}),s.jsx("div",{"data-gyg-href":"https://widget.getyourguide.com/default/activities.frame","data-gyg-q":"Savannah","data-gyg-locale-code":"en-US","data-gyg-widget":"activities","data-gyg-partner-id":"9FKCOE9","data-gyg-number-of-items":"12",className:"min-h-[600px]"})]}),n==="charleston"&&s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6 text-center",children:"Browse All Charleston Tours"}),s.jsx("div",{"data-gyg-href":"https://widget.getyourguide.com/default/city.frame","data-gyg-location-id":"894","data-gyg-locale-code":"en-US","data-gyg-widget":"city","data-gyg-partner-id":"9FKCOE9",className:"min-h-[600px]"})]}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:p.map((N,j)=>s.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-shadow",children:[s.jsxs("div",{className:"relative h-48 overflow-hidden",children:[s.jsx("img",{src:N.image,alt:N.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute top-3 right-3 bg-white px-3 py-1 rounded-full text-sm font-semibold text-blue-600",children:N.price})]}),s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-lg",children:N.title}),s.jsx(kn,{className:"text-sm",children:N.description})]}),s.jsx(me,{children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ts,{className:"w-4 h-4"}),N.duration]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Yn,{className:"w-4 h-4 fill-yellow-400 text-yellow-400"}),N.rating," (",N.reviews,")"]})]}),s.jsxs("div",{className:"text-xs text-gray-500",children:["via ",m(N.provider)]}),s.jsx("a",{href:h(N),target:"_blank",rel:"noopener noreferrer",className:"block",children:s.jsxs(G,{className:"w-full bg-blue-600 hover:bg-blue-700",children:["Book Now",s.jsx(fa,{className:"w-4 h-4 ml-2"})]})})]})})]},j))}),p.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(ip,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"No tours found in this category"})]}),s.jsxs("div",{className:"mt-16 bg-blue-50 rounded-xl p-8",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4 text-center",children:"Perfect Timing for Your Adventures"}),s.jsxs("p",{className:"text-gray-700 text-center max-w-3xl mx-auto mb-6",children:["Drop your bags at a Stow My Bags partner location and explore ",(w=g.find(N=>N.id===n))==null?void 0:w.name," hands-free! Book your tours and activities while your luggage is safely stored."]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mt-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-12 h-12 flex items-center justify-center mx-auto mb-3 font-bold",children:"1"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Store Your Bags"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Drop off at any partner location"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-12 h-12 flex items-center justify-center mx-auto mb-3 font-bold",children:"2"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Book Your Tours"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Choose from amazing experiences"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"bg-blue-600 text-white rounded-full w-12 h-12 flex items-center justify-center mx-auto mb-3 font-bold",children:"3"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Explore Freely"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Enjoy Savannah without the weight"})]})]})]})]})]})}function IJ(){const[e,t]=b.useState("executive"),n=N=>{t(e===N?null:N)},r={viator:{name:"Viator",commission:.08,avgTourPrice:75,marketShare:.4},getYourGuide:{name:"GetYourGuide",commission:.07,avgTourPrice:65,marketShare:.35},trustedTours:{name:"Trusted Tours",commission:.0475,avgTourPrice:85,marketShare:.25}},i=r.viator.commission*r.viator.marketShare+r.getYourGuide.commission*r.getYourGuide.marketShare+r.trustedTours.commission*r.trustedTours.marketShare,c=r.viator.avgTourPrice*r.viator.marketShare+r.getYourGuide.avgTourPrice*r.getYourGuide.marketShare+r.trustedTours.avgTourPrice*r.trustedTours.marketShare,d={storageLocations:50,annualBookings:5e3,toursPerBooking:.15,avgToursPerCustomer:1.5},h={scenarios:{conservative:{annualBookings:132e3},moderate:{annualBookings:264e3},optimistic:{annualBookings:462e3}}},m=(N,j,_)=>{const C=N*j*_,A=C*c,M=A*i;return{totalTourBookings:C,grossTourSales:A,commissionRevenue:M,revenuePerStorageBooking:M/N}},x={current:m(d.annualBookings,.15,1.5),improved:m(d.annualBookings,.25,2),optimized:m(d.annualBookings,.35,2.5)},p={conservative:{low:m(h.scenarios.conservative.annualBookings,.15,1.5),medium:m(h.scenarios.conservative.annualBookings,.25,2),high:m(h.scenarios.conservative.annualBookings,.35,2.5)},moderate:{low:m(h.scenarios.moderate.annualBookings,.15,1.5),medium:m(h.scenarios.moderate.annualBookings,.25,2),high:m(h.scenarios.moderate.annualBookings,.35,2.5)},optimistic:{low:m(h.scenarios.optimistic.annualBookings,.15,1.5),medium:m(h.scenarios.optimistic.annualBookings,.25,2),high:m(h.scenarios.optimistic.annualBookings,.35,2.5)}},g=N=>N>=1e6?`$${(N/1e6).toFixed(2)}
581M`:`$${N.toLocaleString(void 0,{maximumFractionDigits:0})}`,w=N=>N.toLocaleString(void 0,{maximumFractionDigits:0});return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("div",{className:"bg-gradient-to-br from-coral-500 to-coral-700 text-white py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4",children:s.jsxs("div",{className:"text-center",children:[s.jsx(ip,{className:"w-16 h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-5xl font-bold mb-4",children:"Tours & Attractions Revenue Report"}),s.jsx("p",{className:"text-xl text-white/90 max-w-3xl mx-auto",children:"Strategic analysis of affiliate commission revenue from tour and attraction bookings"})]})})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-12",children:[s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("executive"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ek,{className:"w-6 h-6 text-coral-600"}),"Executive Summary"]}),e==="executive"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="executive"&&s.jsx(me,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-coral-50 border-2 border-coral-200 rounded-lg p-6",children:[s.jsx("h3",{className:"text-xl font-bold text-coral-900 mb-4",children:"Key Findings"}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Affiliate Partners:"})," Viator (8%), GetYourGuide (7%), Trusted Tours (4.75%)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Blended Commission:"})," ",(i*100).toFixed(2),"% across all platforms"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Average Tour Price:"})," $",c.toFixed(2)," (weighted)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Conversion Opportunity:"})," 15-35% of storage customers book tours"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Current Savannah Potential:"})," ",g(x.current.commissionRevenue)," - ",g(x.optimized.commissionRevenue),"/year"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Nationwide Potential:"})," ",g(p.moderate.medium.commissionRevenue)," - ",g(p.optimistic.high.commissionRevenue),"/year"]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-gradient-to-br from-blue-500 to-blue-600 text-white rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Conservative"}),s.jsx("div",{className:"text-4xl font-bold mb-2",children:g(p.conservative.low.commissionRevenue)}),s.jsx("div",{className:"text-sm text-blue-100",children:"15% conversion, 1.5 tours/customer"})]}),s.jsxs("div",{className:"bg-gradient-to-br from-coral-500 to-coral-600 text-white rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Moderate"}),s.jsx("div",{className:"text-4xl font-bold mb-2",children:g(p.moderate.medium.commissionRevenue)}),s.jsx("div",{className:"text-sm text-coral-100",children:"25% conversion, 2.0 tours/customer"})]}),s.jsxs("div",{className:"bg-gradient-to-br from-green-500 to-green-600 text-white rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold mb-4",children:"Optimistic"}),s.jsx("div",{className:"text-4xl font-bold mb-2",children:g(p.optimistic.high.commissionRevenue)}),s.jsx("div",{className:"text-sm text-green-100",children:"35% conversion, 2.5 tours/customer"})]})]})]})})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("programs"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ck,{className:"w-6 h-6 text-blue-600"}),"Affiliate Programs"]}),e==="programs"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="programs"&&s.jsxs(me,{children:[s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:Object.values(r).map(N=>s.jsxs("div",{className:"bg-white border-2 border-gray-200 rounded-lg p-6",children:[s.jsx("h4",{className:"text-xl font-bold text-gray-900 mb-4",children:N.name}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-600",children:"Commission:"}),s.jsxs("span",{className:"font-bold text-coral-600",children:[(N.commission*100).toFixed(2),"%"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-600",children:"Avg Tour Price:"}),s.jsxs("span",{className:"font-bold text-blue-600",children:["$",N.avgTourPrice]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-600",children:"Market Share:"}),s.jsxs("span",{className:"font-bold text-green-600",children:[(N.marketShare*100).toFixed(0),"%"]})]}),s.jsxs("div",{className:"pt-3 border-t",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Revenue per booking:"}),s.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["$",(N.avgTourPrice*N.
581commission).toFixed(2)]})]})]})]},N.name))}),s.jsxs("div",{className:"mt-6 bg-purple-50 border border-purple-200 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-purple-900 mb-4",children:"Blended Performance Metrics"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Weighted Avg Commission"}),s.jsxs("div",{className:"text-3xl font-bold text-purple-700",children:[(i*100).toFixed(2),"%"]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Weighted Avg Tour Price"}),s.jsxs("div",{className:"text-3xl font-bold text-purple-700",children:["$",c.toFixed(2)]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Avg Revenue per Tour"}),s.jsxs("div",{className:"text-3xl font-bold text-purple-700",children:["$",(c*i).toFixed(2)]})]})]})]})]})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("savannah"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(ng,{className:"w-6 h-6 text-green-600"}),"Current Savannah Performance"]}),e==="savannah"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="savannah"&&s.jsxs(me,{children:[s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6 mb-6",children:[s.jsx("h4",{className:"font-bold text-blue-900 mb-4",children:"Current Metrics"}),s.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Annual Storage Bookings"}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:w(d.annualBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Storage Locations"}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:d.storageLocations})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Current Conversion"}),s.jsxs("div",{className:"text-2xl font-bold text-blue-700",children:[(d.toursPerBooking*100).toFixed(0),"%"]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Tours per Customer"}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:d.avgToursPerCustomer})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-white border-2 border-gray-300 rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-4",children:"Current (15% Conv.)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Annual Tour Bookings"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:w(x.current.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-xl font-bold text-blue-600",children:g(x.current.grossTourSales)})]}),s.jsxs("div",{className:"pt-3 border-t",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-coral-600",children:g(x.current.commissionRevenue)})]})]})]}),s.jsxs("div",{className:"bg-white border-2 border-coral-300 rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-4",children:"Improved (25% Conv.)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Annual Tour Bookings"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:w(x.improved.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-xl font-bold text-blue-600",children:g(x.improved.grossTourSales)})]}),s.jsxs("div",{className:"pt-3 border-t",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-coral-600",children:g(x.improved.commissionRevenue)})]})]})]}),s.jsxs("div",{className:"bg-gradient-to-br from-green-50 to-green-100 border-2 border-green-300 rounded-lg p-6",children:[s.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-4",children:"Optimized (35% Conv.)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Annual Tour Bookings"}),s.jsx("div",{className:"text-xl font-bold text-gray-900",children:w(x.optimized.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-xl font-bold text-blue-600",children:g(x.optimized.grossTourSales)})]}),s.jsxs("div",{className:"pt-3 border-t",children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-3xl font-bold text-green-700",children:g(x.optimized.commissionRevenue)})]})]})]})]})]})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("nationwide"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(eg,{className:"w-6 h-6 text-purple-600"}),"Nationwide Revenue Projections"]}),e==="nationwide"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="nationwide"&&s.jsxs(me,{children:[s.jsx("div",{className:"space-y-6",children:Object.entries(p).map(([N,j])=>s.jsxs("div",{className:"bg-gradient-to-r from-gray-50 to-gray-100 rounded-xl p-6 border-2 border-gray-200",children:[s.jsxs("h3",{className:"text-2xl font-bold text-gray-900 mb-6 capitalize",children:[N," Market Scenario"]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-white rounded-lg p-6 border-2 border-blue-200",children:[s.jsx("h4",{className:"font-semibold text-blue-900 mb-4",children:"Low Conversion (15%)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Tour Bookings/Year"}),s.jsx("div",{className:"text-lg font-bold text-gray-900",children:w(j.low.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-lg font-bold text-blue-600",children:g(j.low.grossTourSales)})]}),s.jsxs("div",{className:"pt-2 border-t",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-2xl font-bold text-coral-600",children:g(j.low.commissionRevenue)})]})]})]}),s.jsxs("div",{className:"bg-white rounded-lg p-6 border-2 border-coral-200",children:[s.jsx("h4",{className:"font-semibold text-coral-900 mb
581-4",children:"Medium Conversion (25%)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Tour Bookings/Year"}),s.jsx("div",{className:"text-lg font-bold text-gray-900",children:w(j.medium.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-lg font-bold text-blue-600",children:g(j.medium.grossTourSales)})]}),s.jsxs("div",{className:"pt-2 border-t",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-2xl font-bold text-coral-600",children:g(j.medium.commissionRevenue)})]})]})]}),s.jsxs("div",{className:"bg-gradient-to-br from-green-50 to-green-100 rounded-lg p-6 border-2 border-green-300",children:[s.jsx("h4",{className:"font-semibold text-green-900 mb-4",children:"High Conversion (35%)"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Tour Bookings/Year"}),s.jsx("div",{className:"text-lg font-bold text-gray-900",children:w(j.high.totalTourBookings)})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Gross Tour Sales"}),s.jsx("div",{className:"text-lg font-bold text-blue-600",children:g(j.high.grossTourSales)})]}),s.jsxs("div",{className:"pt-2 border-t",children:[s.jsx("div",{className:"text-xs text-gray-600",children:"Commission Revenue"}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:g(j.high.commissionRevenue)})]})]})]})]})]},N))}),s.jsxs("div",{className:"mt-6 bg-yellow-50 border-2 border-yellow-300 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-yellow-900 mb-4",children:"📊 Revenue Per Storage Booking"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Low Conversion (15%)"}),s.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:["$",(c*i*.15*1.5).toFixed(2)]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"Medium Conversion (25%)"}),s.jsxs("div",{className:"text-2xl font-bold text-coral-600",children:["$",(c*i*.25*2).toFixed(2)]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-gray-600",children:"High Conversion (35%)"}),s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:["$",(c*i*.35*2.5).toFixed(2)]})]})]})]})]})]}),s.jsxs(oe,{children:[s.jsx(Ce,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>n("strategy"),children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(Ci,{className:"w-6 h-6 text-green-600"}),"Strategic Recommendations"]}),e==="strategy"?s.jsx(pi,{}):s.jsx(pr,{})]})}),e==="strategy"&&s.jsx(me,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-green-50 border-2 border-green-300 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-green-900 mb-4",children:"🎯 Implementation Strategy"}),s.jsxs("div",{className:"space-y-3 text-gray-700",children:[s.jsxs("div",{children:[s.jsx("h5",{className:"font-semibold text-green-800 mb-2",children:"Phase 1: Savannah Optimization (Months 1-3)"}),s.jsxs("ul",{className:"ml-5 space-y-1 text-sm",children:[s.jsx("li",{children:"• Complete affiliate sign-ups and integrate tracking codes"}),s.jsx("li",{children:"• Add prominent tour CTAs on confirmation pages and booking receipts"}),s.jsx("li",{children:"• Create dedicated tours landing pages for Charleston, Key West, St. Augustine"}),s.jsxs("li",{children:["• Target: 20-25% conversion rate, ",g(x.improved.commissionRevenue),"/year"]})]})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-semibold text-green-800 mb-2",children:"Phase 2: Multi-City Launch (Months 4-12)"}),s.jsxs("ul",{className:"ml-5 space-y-1 text-sm",children:[s.jsx("li",{children:"• Launch in 5-10 major tourist cities"}),s.jsx("li",{children:"• Implement email marketing campaigns for tour suggestions"}),s.jsx("li",{children:"• Add tour recommendations based on storage location"}),s.jsxs("li",{children:["• Target: ",g(p.conservative.medium.commissionRevenue*.2),"/year"]})]})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-semibold text-green-800 mb-2",children:"Phase 3: Nationwide Scale (Years 2-3)"}),s.jsxs("ul",{className:"ml-5 space-y-1 text-sm",children:[s.jsx("li",{children:"• Expand to all 50 major US cities"}),s.jsx("li",{children:"• Implement AI-powered tour recommendations"}),s.jsx("li",{children:"• Partner with hotels and travel agencies for co-marketing"}),s.jsxs("li",{children:["• Target: ",g(p.moderate.medium.commissionRevenue)," - ",g(p.optimistic.high.commissionRevenue),"/year"]})]})]})]})]}),s.jsxs("div",{className:"bg-blue-50 border-2 border-blue-300 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-blue-900 mb-4",children:"💡 Conversion Optimization Tactics"}),s.jsxs("ul",{className:"space-y-2 text-gray-700",children:[s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Post-Booking Thank You Page:"})," Show personalized tour recommendations (Expected 10-15% conversion)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Email Follow-Up:"})," Send curated tour suggestions 24 hours after booking (5-8% conversion)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"In-App Tours Tab:"})," Always visible navigation with featured tours (3-5% conversion)"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Location-Based Recommendations:"})," Show nearby tours when viewing storage locations"]}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Bundle Deals:"}),' "Store + Tour" packages with small discounts (15-20% conversion lift)']}),s.jsxs("li",{children:["• ",s.jsx("strong",{children:"Partner Promotions:"})," Storage location hosts promote local tours (5-10% incremental)"]})]})]}),s.jsxs("div",{className:"bg-coral-50 border-2 border-coral-300 rounded-lg p-6",children:[s.jsx("h4",{className:"font-bold text-coral-900 mb
581-4",children:"📈 Financial Summary"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h5",{className:"font-semibold text-coral-800 mb-3",children:"3-Year Revenue Projection"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Year 1 (Savannah + 10 cities):"}),s.jsx("span",{className:"font-bold text-coral-700",children:g(x.improved.commissionRevenue*3)})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Year 2 (30 cities):"}),s.jsx("span",{className:"font-bold text-coral-700",children:g(p.conservative.medium.commissionRevenue*.6)})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Year 3 (50 cities, optimized):"}),s.jsx("span",{className:"font-bold text-coral-700",children:g(p.moderate.medium.commissionRevenue)})]}),s.jsxs("div",{className:"pt-2 border-t flex justify-between",children:[s.jsx("span",{className:"font-bold text-gray-900",children:"3-Year Total:"}),s.jsx("span",{className:"text-xl font-bold text-green-700",children:g(x.improved.commissionRevenue*3+p.conservative.medium.commissionRevenue*.6+p.moderate.medium.commissionRevenue)})]})]})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-semibold text-coral-800 mb-3",children:"Combined Revenue Potential"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Storage Platform Fee (15%):"}),s.jsx("span",{className:"font-bold text-blue-700",children:g(75e6)})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-700",children:"Tour Commissions:"}),s.jsx("span",{className:"font-bold text-coral-700",children:g(p.moderate.medium.commissionRevenue)})]}),s.jsxs("div",{className:"pt-2 border-t flex justify-between",children:[s.jsx("span",{className:"font-bold text-gray-900",children:"Total Annual Revenue:"}),s.jsx("span",{className:"text-xl font-bold text-green-700",children:g(75e6+p.moderate.medium.commissionRevenue)})]}),s.jsxs("div",{className:"text-xs text-gray-600 mt-2",children:["Tours add ",s.jsxs("strong",{children:[(p.moderate.medium.commissionRevenue/75e6*100).toFixed(1),"%"]})," incremental revenue"]})]})]})]})]})]})})]})]})]})}function FJ(){return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex gap-3 mb-6 print:hidden",children:[s.jsxs(G,{onClick:()=>window.print(),className:"bg-blue-600 hover:bg-blue-700",children:[s.jsx(kD,{className:"w-4 h-4 mr-2"})," Print / Save as PDF"]}),s.jsx(ot,{className:"bg-green-100 text-green-800 border-green-300 text-sm py-2 px-3",children:"Pilot Partner — City Storage Savannah GA"})]}),s.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-10 print:shadow-none print:rounded-none print:p-0",children:[s.jsxs("div",{className:"border-b-2 border-blue-600 pb-6 mb-8",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-blue-700",children:"Stow-N-Go 24/7"}),s.jsx("p",{className:"text-gray-500 mt-1",children:"Partner Onboarding Guide — Pilot Program"})]}),s.jsxs("div",{className:"text-right text-sm text-gray-500",children:[s.jsx("p",{children:"Prepared for:"}),s.jsx("p",{className:"font-bold text-gray-800 text-base",children:"City Storage"}),s.jsx("p",{children:"Savannah, GA"}),s.jsx("p",{className:"mt-1",children:"March 2026"})]})]}),s.jsx("div",{className:"mt-4 p-4 bg-blue-50 rounded-lg border border-blue-200",children:s.jsx("p",{className:"text-blue-800 text-sm font-medium",children:"Welcome to the Stow-N-Go 24/7 pilot program! You are our first partner location. This guide will walk you through everything needed to go live and start earning revenue from your unused storage capacity."})})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"1"}),"What is Stow-N-Go 24/7?"]}),s.jsx("p",{className:"text-gray-700 mb-4",children:"Stow-N-Go 24/7 is a self-service locker storage platform that turns your existing storage units into bookable, contactless storage lockers — available 24 hours a day, 7 days a week, with no staff required."}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{icon:"📱",title:"Customer Books Online",desc:"Customers find your location, choose a locker size, pick dates, and pay online."},{icon:"🔐",title:"They Get Access Instantly",desc:"A unique access code is emailed automatically. They show up, enter the code, and store their items."},{icon:"💵",title:"You Earn Revenue",desc:"You receive 75% of every booking. Stow-N-Go keeps 25% as a platform fee."}].map((e,t)=>s.jsxs("div",{className:"p-4 border rounded-lg text-center",children:[s.jsx("div",{className:"text-3xl mb-2",children:e.icon}
581),s.jsx("h3",{className:"font-semibold text-gray-800 mb-1",children:e.title}),s.jsx("p",{className:"text-sm text-gray-600",children:e.desc})]},t))})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"2"}),s.jsx(es,{className:"w-5 h-5 text-blue-600"}),"Revenue & Pricing"]}),s.jsx("div",{className:"overflow-hidden rounded-lg border mb-4",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-gray-50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left p-3 font-semibold text-gray-700",children:"Locker Size"}),s.jsx("th",{className:"text-left p-3 font-semibold text-gray-700",children:"Suggested Daily Rate"}),s.jsx("th",{className:"text-left p-3 font-semibold text-gray-700",children:"Your Cut (75%)"}),s.jsx("th",{className:"text-left p-3 font-semibold text-gray-700",children:"Platform Fee (25%)"})]})}),s.jsx("tbody",{children:[{size:"Small",rate:"$8/day",yours:"$6/day",platform:"$2/day"},{size:"Medium",rate:"$12/day",yours:"$9/day",platform:"$3/day"},{size:"Large",rate:"$18/day",yours:"$13.50/day",platform:"$4.50/day"},{size:"XL",rate:"$25/day",yours:"$18.75/day",platform:"$6.25/day"}].map((e,t)=>s.jsxs("tr",{className:t%2===0?"bg-white":"bg-gray-50",children:[s.jsx("td",{className:"p-3 font-medium",children:e.size}),s.jsx("td",{className:"p-3 text-blue-700 font-semibold",children:e.rate}),s.jsx("td",{className:"p-3 text-green-700 font-semibold",children:e.yours}),s.jsx("td",{className:"p-3 text-gray-500",children:e.platform})]},t))})]})}),s.jsx("p",{className:"text-sm text-gray-500",children:"* Pricing is flexible. You can set your own rates per locker. These are suggested rates based on market research."})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"3"}),"What We Need From You"]}),s.jsx("div",{className:"space-y-3",children:[{label:"Facility name, full address, phone & email",done:!1},{label:"Number of lockers you want to make available (start small — even 5-10 is fine)",done:!1},{label:"Locker sizes available (small / medium / large / XL)",done:!1},{label:"Your pricing preference per locker size per day (or use our suggested rates)",done:!1},{label:"Access instructions for customers (gate code, how to find lockers, etc.)",done:!1},{label:"A few photos of the facility and the locker area",done:!1},{label:"Business email address for booking notifications",done:!1},{label:"Bank account details for payouts via Stripe (see Section 5)",done:!1}].map((e,t)=>s.jsxs("div",{className:"flex items-start gap-3 p-3 border rounded-lg",children:[s.jsx("div",{className:"w-5 h-5 border-2 border-gray-400 rounded mt-0.5 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700",children:e.label})]},t))})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"4"}),s.jsx(Ct,{className:"w-5 h-5 text-blue-600"}),"Smart Locks (Optional but Recommended)"]}),s.jsx("p",{className:"text-gray-700 mb-4",children:"For the best customer experience, we recommend installing wireless smart padlocks on each locker. These allow automatic code generation and remote access — no manual code management needed."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[s.jsxs("div",{className:"p-4 border rounded-lg bg-green-50 border-green-200",children:[s.jsx("h3",{className:"font-semibold text-green-800 mb-2",children:"✅ With Smart Locks"}),s.jsxs("ul",{className:"text-sm text-green-700 space-y-1",children:[s.jsx("li",{children:"• Codes auto-generated per booking"}),s.jsx("li",{children:"• Remote lock/unlock from dashboard"}),s.jsx("li",{children:"• Battery monitoring alerts"}),s.jsx("li",{children:"• Full access audit log"})]})]}),s.jsxs("div",{className:"p-4 border rounded-lg bg-gray-50",children:[s.jsx("h3",{className:"font-semibold text-gray-700 mb-2",children:"🔑 Without Smart Locks (Manual)"}),s.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[s.jsx("li",{children:"• You set a code on each padlock manually"}),s.jsx("li",{children:"• Code is shared with customer at booking"}),s.jsx("li",{children:"• You change the code between bookings"}),s.jsx("li",{children:"• Works fine for pilot phase"})]})]})]}),s.jsx("div",{className:"p-4 bg-blue-50 rounded-lg border border-blue-200",children:s.jsxs("p",{className:"text-sm text-blue-800",children:[s.jsx("strong",{children:"Recommended brands:"})," Noke, igloohome, August, Yale, Schlage. We support all of these in our platform. Approximate cost: $50–$150 per lock. For the pilot, manual locks work perfectly fine — we can upgrade later."]})})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"5"}),s.jsx("span",{children:"💳"}),"Getting Paid — Stripe Setup"]}),s.jsxs("p",{className:"text-gray-700 mb-4",children:["Payments are processed through ",s.jsx("strong",{children:"Stripe"}),", the same payment platform used by Amazon, Shopify, and Lyft. It is free to set up. You will need to create a Stripe account to receive your payouts."]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 border-l-4 border-blue-600 bg-blue-50 rounded-r-lg",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Step 1 — Create a Free Stripe Account"}),s.jsxs("ol",{className:"text-sm text-blue-800 space-y-1 list-decimal ml-4",children:[s.jsxs("li",{children:["Go to ",s.jsx("strong",{children:"stripe.com"}),' and click "Start now"']}),s.jsx("li",{children:"Enter your business email and create a password"}),s.jsx("li",{children:"Verify your email address"})]})]}),s.jsxs("div",{className:"p-4 border-l-4 border-blue-600 bg-blue-50 rounded-r-lg",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Step 2 — Complete Business Verification"}),s.jsx("p",{className:"text-sm text-blue-800 mb-2",children:"Stripe will ask for the following to verify your business and enable payouts:"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm text-blue-800",children:[s.jsxs("ul",{className:"space-y-1",children:[s.jsx("li",{children:"✓ Legal business name"}),s.jsx("li",{children:"✓ Business address (Savannah, GA)"}),s.jsx("li",{children:"✓ Business type (LLC, Sole Prop, etc.)"}),s.jsx("li",{children:"✓ EIN / Tax ID number"})]}),s.jsxs("ul",{className:"space-y-1",children:[s.jsx("li",{children:"✓ Owner's full legal name"}),s.jsx("li",{children:"✓ Owner's date of birth"}),s.jsx("li",{children:"✓ Owner's last 4 digits of SSN"}),s.jsx("li",{children:"✓ Bank account for deposits"})]})]})]}),s.jsxs("div",{className:"p-4 border-l-4 border-blue-600 bg-blue-50 rounded-r-lg",children:[s.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Step 3 — Connect to Stow-N-Go 24/7"}),s.jsxs("ol",{className:"text-sm text-blue-800 space-y-1 list-decimal ml-4",children:[s.jsx("li",{children:"Once your Str
581ipe account is set up, log into your Stow-N-Go Partner Portal"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:'"Connect Stripe"'})," in the portal"]}),s.jsx("li",{children:"Follow the prompts — takes about 2 minutes"}),s.jsx("li",{children:"You're done! Payouts will be deposited to your bank account automatically after each booking"})]})]})]}),s.jsxs("div",{className:"mt-4 p-3 bg-yellow-50 border border-yellow-300 rounded-lg flex items-start gap-2",children:[s.jsx(fn,{className:"w-5 h-5 text-yellow-600 flex-shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-sm text-yellow-800",children:[s.jsx("strong",{children:"Payout timing:"})," Stripe typically deposits funds to your bank account within 2 business days after a booking is completed. For new accounts, the first payout may take 7 days."]})]})]}),s.jsxs("section",{className:"mb-10",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"6"}),s.jsx(ID,{className:"w-5 h-5 text-blue-600"}),"Go-Live Checklist"]}),s.jsx("div",{className:"space-y-2",children:["Facility info submitted (name, address, photos, access instructions)","Lockers inventoried and numbered","Pricing set per locker size","Stripe account created and connected","Test booking completed end-to-end","Access code received and verified to open lockers","Facility listed as 'Active' on Stow-N-Go 24/7 platform","Partner notified of first live booking"].map((e,t)=>s.jsxs("div",{className:"flex items-center gap-3 p-3 border rounded-lg hover:bg-gray-50",children:[s.jsx("div",{className:"w-5 h-5 border-2 border-blue-400 rounded flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 text-sm",children:e})]},t))})]}),s.jsxs("section",{className:"mb-8",children:[s.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center gap-2",children:[s.jsx("span",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:"7"}),s.jsx(Pk,{className:"w-5 h-5 text-blue-600"}),"Support & Next Steps"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Your Partner Dashboard"}),s.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Once set up, you'll have access to your partner portal where you can:"}),s.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[s.jsx("li",{children:"• View all current and past bookings"}),s.jsx("li",{children:"• See real-time locker status"}),s.jsx("li",{children:"• Monitor revenue and payouts"}),s.jsx("li",{children:"• Manage locker availability"}),s.jsx("li",{children:"• Control smart lock access"})]})]}),s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Contact Us"}),s.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"We'll be with you every step of the way during this pilot."}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Email:"})," [email protected]"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Phone:"})," Available upon request"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Onboarding call:"})," We'll schedule a 30-min video call to walk through everything together"]})]})]})]})]}),s.jsxs("div",{className:"border-t pt-6 text-center text-sm text-gray-400",children:[s.jsx("p",{className:"font-semibold text-gray-600 mb-1",children:"Stow-N-Go 24/7 — Pilot Partner Program"}),s.jsx("p",{children:"This document is confidential and intended for City Storage, Savannah GA only."}),s.jsx("p",{className:"mt-1",children:"© 2026 Stow-N-Go 24/7. All rights reserved."})]})]})]})})}function BJ({children:e,currentPageName:t}){return t==="Home"?e:s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx("nav",{className:"bg-white border-b sticky top-0 z-10",children:s.jsx("div",{className:"max-w-6xl mx-auto px-4 flex items-center h-14",children:s.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-7 h-7 bg-brand-blue rounded-lg flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-white",f
581ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),s.jsxs("span",{className:"font-bold text-gray-900",children:["Stow-N-Go ",s.jsx("span",{className:"text-coral",children:"24/7"})]})]})})}),s.jsx("main",{children:e})]})}const zJ={AdminDashboard:fB,AdminPartners:N9,Arrivals:OY,BookingSuccess:IY,Bookings:rq,CheckIn:oq,Dashboard:lq,Departures:dq,FacilityPortal:hq,FacilitySignup:fq,Home:mq,Home_backup:pq,Home_backup_current:$Q,Host:KQ,LockMonitor:XQ,NationwideRevenueReport:eX,PartnerAgreement:tX,PartnerAgreementAccept:sX,PartnerLanding:nX,PartnerPortal:CX,Presentation:PX,PrivacyPolicy:TX,Review:EX,SAV:KX,Search:XX,SmartLockSetup:lJ,StowNGo:dJ,StowNGoOnboarding:RJ,StowNGoPartnerSignup:LJ,TermsOfService:DJ,ToursAttractions:OJ,ToursRevenueReport:IJ,PartnerOnboardingDoc:FJ},xR={mainPage:"Home",Pages:zJ,Layout:BJ};function $J(){const e=Bd(),{isAuthenticated:t}=sC(),{Pages:n,mainPage:r}=xR,i=r;return b.useEffect(()=>{const c=e.pathname;let d;if(c==="/"||c==="")d=i;else{const h=c.replace(/^\//,"").split("/")[0];d=Object.keys(n).find(p=>p.toLowerCase()===h.toLowerCase())||null}t&&d&&X.appLogs.logUserInApp(d).catch(()=>{})},[e,t,n,i]),null}function UJ({}){var i;const t=Bd().pathname.substring(1),{data:n,isFetched:r}=w6({queryKey:["user"],queryFn:async()=>{try{return{user:await X.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return s.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:s.jsx("div",{className:"max-w-md w-full",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),s.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),s.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",s.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&s.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:s.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),s.jsxs("div",{className:"text-left space-y-1",children:[s.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),s.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."})]})]})}),s.jsx("div",{className:"pt-6",children:s.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:[s.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.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 VJ=()=>s.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:s.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:s.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.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"})})}),s.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),s.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."}),s.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[s.jsx("p",{children:"If you believe this is an error, you can:"}),s.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[s.jsx("li",{children:"Verify you are logged in with the correct account"}),s.jsx("li",{children:"Contact the app administrator for access"}),s.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),{Pages:yR,Layout:ak,mainPage:WJ}=xR,vR=WJ,HJ=yR[vR],ok=({children:e,currentPageName:t})=>ak?s.jsx(ak,{currentPageName:t,children:e}):s.jsx(s.Fragment,{children:e}),YJ=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=sC();if(t||e)return s.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:s.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 s.jsx(VJ,{});if(n.type==="auth_required")return r(),null}return s.jsxs(m5,{children:[s.jsx(op,{path:"/",element:s.jsx(ok,{currentPageName:vR,children:s.jsx(HJ,{})})}),Object.entries(yR).map(([i,c])=>s.jsx(op,{path:`/${i}`,element:s.jsx(ok,{currentPageName:i,children:s.jsx(c,{})})},i)),s.jsx(op,{path:"*",element:s.jsx(UJ,{})})]})};
581function qJ(){return s.jsx(RF,{children:s.jsxs(c6,{client:_6,children:[s.jsxs(w5,{children:[s.jsx($J,{}),s.jsx(YJ,{})]}),s.jsx(IO,{})]})})}uL.createRoot(document.getElementById("root")).render(s.jsx(qJ,{}))});export default GJ();

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.