@dirathea/busical 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-D-ZX1V3I.css +1 -0
- package/dist/client/assets/index-afTIFwLy.js +100 -0
- package/dist/client/index.html +2 -2
- package/dist/client/sw.js +1 -1
- package/package.json +9 -3
- package/dist/client/assets/index-BQ96LB2s.css +0 -1
- package/dist/client/assets/index-Dclvnqq8.js +0 -100
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
function FN(e,t){for(var a=0;a<t.length;a++){const i=t[a];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=a(s);fetch(s.href,l)}})();function mS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ym={exports:{}},zl={};var Wb;function GN(){if(Wb)return zl;Wb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(i,s,l){var d=null;if(l!==void 0&&(d=""+l),s.key!==void 0&&(d=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:d,ref:s!==void 0?s:null,props:l}}return zl.Fragment=t,zl.jsx=a,zl.jsxs=a,zl}var Kb;function qN(){return Kb||(Kb=1,Ym.exports=GN()),Ym.exports}var u=qN(),Bm={exports:{}},nt={};var $b;function WN(){if($b)return nt;$b=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(M,V,Q){this.props=M,this.context=V,this.refs=T,this.updater=Q||C}N.prototype.isReactComponent={},N.prototype.setState=function(M,V){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,V,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function R(){}R.prototype=N.prototype;function O(M,V,Q){this.props=M,this.context=V,this.refs=T,this.updater=Q||C}var j=O.prototype=new R;j.constructor=O,E(j,N.prototype),j.isPureReactComponent=!0;var I=Array.isArray;function P(){}var A={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function Z(M,V,Q){var ee=Q.ref;return{$$typeof:e,type:M,key:V,ref:ee!==void 0?ee:null,props:Q}}function ne(M,V){return Z(M.type,V,M.props)}function ae(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function fe(M){var V={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Q){return V[Q]})}var pe=/\/+/g;function ce(M,V){return typeof M=="object"&&M!==null&&M.key!=null?fe(""+M.key):V.toString(36)}function F(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(P,P):(M.status="pending",M.then(function(V){M.status==="pending"&&(M.status="fulfilled",M.value=V)},function(V){M.status==="pending"&&(M.status="rejected",M.reason=V)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function k(M,V,Q,ee,re){var we=typeof M;(we==="undefined"||we==="boolean")&&(M=null);var de=!1;if(M===null)de=!0;else switch(we){case"bigint":case"string":case"number":de=!0;break;case"object":switch(M.$$typeof){case e:case t:de=!0;break;case y:return de=M._init,k(de(M._payload),V,Q,ee,re)}}if(de)return re=re(M),de=ee===""?"."+ce(M,0):ee,I(re)?(Q="",de!=null&&(Q=de.replace(pe,"$&/")+"/"),k(re,V,Q,"",function(ve){return ve})):re!=null&&(ae(re)&&(re=ne(re,Q+(re.key==null||M&&M.key===re.key?"":(""+re.key).replace(pe,"$&/")+"/")+de)),V.push(re)),1;de=0;var ye=ee===""?".":ee+":";if(I(M))for(var Fe=0;Fe<M.length;Fe++)ee=M[Fe],we=ye+ce(ee,Fe),de+=k(ee,V,Q,we,re);else if(Fe=b(M),typeof Fe=="function")for(M=Fe.call(M),Fe=0;!(ee=M.next()).done;)ee=ee.value,we=ye+ce(ee,Fe++),de+=k(ee,V,Q,we,re);else if(we==="object"){if(typeof M.then=="function")return k(F(M),V,Q,ee,re);throw V=String(M),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return de}function X(M,V,Q){if(M==null)return M;var ee=[],re=0;return k(M,ee,"","",function(we){return V.call(Q,we,re++)}),ee}function z(M){if(M._status===-1){var V=M._result;V=V(),V.then(function(Q){(M._status===0||M._status===-1)&&(M._status=1,M._result=Q)},function(Q){(M._status===0||M._status===-1)&&(M._status=2,M._result=Q)}),M._status===-1&&(M._status=0,M._result=V)}if(M._status===1)return M._result.default;throw M._result}var K=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},oe={map:X,forEach:function(M,V,Q){X(M,function(){V.apply(this,arguments)},Q)},count:function(M){var V=0;return X(M,function(){V++}),V},toArray:function(M){return X(M,function(V){return V})||[]},only:function(M){if(!ae(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return nt.Activity=v,nt.Children=oe,nt.Component=N,nt.Fragment=a,nt.Profiler=s,nt.PureComponent=O,nt.StrictMode=i,nt.Suspense=p,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,nt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return A.H.useMemoCache(M)}},nt.cache=function(M){return function(){return M.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(M,V,Q){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ee=E({},M.props),re=M.key;if(V!=null)for(we in V.key!==void 0&&(re=""+V.key),V)!_.call(V,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&V.ref===void 0||(ee[we]=V[we]);var we=arguments.length-2;if(we===1)ee.children=Q;else if(1<we){for(var de=Array(we),ye=0;ye<we;ye++)de[ye]=arguments[ye+2];ee.children=de}return Z(M.type,re,ee)},nt.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:l,_context:M},M},nt.createElement=function(M,V,Q){var ee,re={},we=null;if(V!=null)for(ee in V.key!==void 0&&(we=""+V.key),V)_.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(re[ee]=V[ee]);var de=arguments.length-2;if(de===1)re.children=Q;else if(1<de){for(var ye=Array(de),Fe=0;Fe<de;Fe++)ye[Fe]=arguments[Fe+2];re.children=ye}if(M&&M.defaultProps)for(ee in de=M.defaultProps,de)re[ee]===void 0&&(re[ee]=de[ee]);return Z(M,we,re)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(M){return{$$typeof:f,render:M}},nt.isValidElement=ae,nt.lazy=function(M){return{$$typeof:y,_payload:{_status:-1,_result:M},_init:z}},nt.memo=function(M,V){return{$$typeof:m,type:M,compare:V===void 0?null:V}},nt.startTransition=function(M){var V=A.T,Q={};A.T=Q;try{var ee=M(),re=A.S;re!==null&&re(Q,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(P,K)}catch(we){K(we)}finally{V!==null&&Q.types!==null&&(V.types=Q.types),A.T=V}},nt.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},nt.use=function(M){return A.H.use(M)},nt.useActionState=function(M,V,Q){return A.H.useActionState(M,V,Q)},nt.useCallback=function(M,V){return A.H.useCallback(M,V)},nt.useContext=function(M){return A.H.useContext(M)},nt.useDebugValue=function(){},nt.useDeferredValue=function(M,V){return A.H.useDeferredValue(M,V)},nt.useEffect=function(M,V){return A.H.useEffect(M,V)},nt.useEffectEvent=function(M){return A.H.useEffectEvent(M)},nt.useId=function(){return A.H.useId()},nt.useImperativeHandle=function(M,V,Q){return A.H.useImperativeHandle(M,V,Q)},nt.useInsertionEffect=function(M,V){return A.H.useInsertionEffect(M,V)},nt.useLayoutEffect=function(M,V){return A.H.useLayoutEffect(M,V)},nt.useMemo=function(M,V){return A.H.useMemo(M,V)},nt.useOptimistic=function(M,V){return A.H.useOptimistic(M,V)},nt.useReducer=function(M,V,Q){return A.H.useReducer(M,V,Q)},nt.useRef=function(M){return A.H.useRef(M)},nt.useState=function(M){return A.H.useState(M)},nt.useSyncExternalStore=function(M,V,Q){return A.H.useSyncExternalStore(M,V,Q)},nt.useTransition=function(){return A.H.useTransition()},nt.version="19.2.3",nt}var Xb;function yc(){return Xb||(Xb=1,Bm.exports=WN()),Bm.exports}var x=yc();const Sn=mS(x),vc=FN({__proto__:null,default:Sn},[x]);var Hm={exports:{}},Ul={},Vm={exports:{}},Fm={};var Qb;function KN(){return Qb||(Qb=1,(function(e){function t(k,X){var z=k.length;k.push(X);e:for(;0<z;){var K=z-1>>>1,oe=k[K];if(0<s(oe,X))k[K]=X,k[z]=oe,z=K;else break e}}function a(k){return k.length===0?null:k[0]}function i(k){if(k.length===0)return null;var X=k[0],z=k.pop();if(z!==X){k[0]=z;e:for(var K=0,oe=k.length,M=oe>>>1;K<M;){var V=2*(K+1)-1,Q=k[V],ee=V+1,re=k[ee];if(0>s(Q,z))ee<oe&&0>s(re,Q)?(k[K]=re,k[ee]=z,K=ee):(k[K]=Q,k[V]=z,K=V);else if(ee<oe&&0>s(re,z))k[K]=re,k[ee]=z,K=ee;else break e}}return X}function s(k,X){var z=k.sortIndex-X.sortIndex;return z!==0?z:k.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var p=[],m=[],y=1,v=null,w=3,b=!1,C=!1,E=!1,T=!1,N=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function j(k){for(var X=a(m);X!==null;){if(X.callback===null)i(m);else if(X.startTime<=k)i(m),X.sortIndex=X.expirationTime,t(p,X);else break;X=a(m)}}function I(k){if(E=!1,j(k),!C)if(a(p)!==null)C=!0,P||(P=!0,fe());else{var X=a(m);X!==null&&F(I,X.startTime-k)}}var P=!1,A=-1,_=5,Z=-1;function ne(){return T?!0:!(e.unstable_now()-Z<_)}function ae(){if(T=!1,P){var k=e.unstable_now();Z=k;var X=!0;try{e:{C=!1,E&&(E=!1,R(A),A=-1),b=!0;var z=w;try{t:{for(j(k),v=a(p);v!==null&&!(v.expirationTime>k&&ne());){var K=v.callback;if(typeof K=="function"){v.callback=null,w=v.priorityLevel;var oe=K(v.expirationTime<=k);if(k=e.unstable_now(),typeof oe=="function"){v.callback=oe,j(k),X=!0;break t}v===a(p)&&i(p),j(k)}else i(p);v=a(p)}if(v!==null)X=!0;else{var M=a(m);M!==null&&F(I,M.startTime-k),X=!1}}break e}finally{v=null,w=z,b=!1}X=void 0}}finally{X?fe():P=!1}}}var fe;if(typeof O=="function")fe=function(){O(ae)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ce=pe.port2;pe.port1.onmessage=ae,fe=function(){ce.postMessage(null)}}else fe=function(){N(ae,0)};function F(k,X){A=N(function(){k(e.unstable_now())},X)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(k){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var z=w;w=X;try{return k()}finally{w=z}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(k,X){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=w;w=k;try{return X()}finally{w=z}},e.unstable_scheduleCallback=function(k,X,z){var K=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?K+z:K):z=K,k){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=z+oe,k={id:y++,callback:X,priorityLevel:k,startTime:z,expirationTime:oe,sortIndex:-1},z>K?(k.sortIndex=z,t(m,k),a(p)===null&&k===a(m)&&(E?(R(A),A=-1):E=!0,F(I,z-K))):(k.sortIndex=oe,t(p,k),C||b||(C=!0,P||(P=!0,fe()))),k},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(k){var X=w;return function(){var z=w;w=X;try{return k.apply(this,arguments)}finally{w=z}}}})(Fm)),Fm}var Zb;function $N(){return Zb||(Zb=1,Vm.exports=KN()),Vm.exports}var Gm={exports:{}},Xn={};var Jb;function XN(){if(Jb)return Xn;Jb=1;var e=yc();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(p,m,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:p,containerInfo:m,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Xn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Xn.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(p,m,null,y)},Xn.flushSync=function(p){var m=d.T,y=i.p;try{if(d.T=null,i.p=2,p)return p()}finally{d.T=m,i.p=y,i.d.f()}},Xn.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},Xn.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Xn.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,v=f(y,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:b}):y==="script"&&i.d.X(p,{crossOrigin:v,integrity:w,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Xn.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},Xn.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,v=f(y,m.crossOrigin);i.d.L(p,y,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Xn.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=f(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Xn.requestFormReset=function(p){i.d.r(p)},Xn.unstable_batchedUpdates=function(p,m){return p(m)},Xn.useFormState=function(p,m,y){return d.H.useFormState(p,m,y)},Xn.useFormStatus=function(){return d.H.useHostTransitionStatus()},Xn.version="19.2.3",Xn}var e0;function pS(){if(e0)return Gm.exports;e0=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(),Gm.exports=XN(),Gm.exports}var t0;function QN(){if(t0)return Ul;t0=1;var e=$N(),t=yc(),a=pS();function i(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var r=n,o=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(o=r.return),n=r.return;while(n)}return r.tag===3?o:null}function d(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(l(n)!==n)throw Error(i(188))}function m(n){var r=n.alternate;if(!r){if(r=l(n),r===null)throw Error(i(188));return r!==n?null:n}for(var o=n,c=r;;){var h=o.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){o=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===o)return p(h),n;if(g===c)return p(h),r;g=g.sibling}throw Error(i(188))}if(o.return!==c.return)o=h,c=g;else{for(var S=!1,D=h.child;D;){if(D===o){S=!0,o=h,c=g;break}if(D===c){S=!0,c=h,o=g;break}D=D.sibling}if(!S){for(D=g.child;D;){if(D===o){S=!0,o=g,c=h;break}if(D===c){S=!0,c=g,o=h;break}D=D.sibling}if(!S)throw Error(i(189))}}if(o.alternate!==c)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),O=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=ae&&n[ae]||n["@@iterator"],typeof n=="function"?n:null)}var pe=Symbol.for("react.client.reference");function ce(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===pe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case N:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case Z:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case C:return"Portal";case O:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case j:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case A:return r=n.displayName||null,r!==null?r:ce(n.type)||"Memo";case _:r=n._payload,n=n._init;try{return ce(n(r))}catch{}}return null}var F=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},K=[],oe=-1;function M(n){return{current:n}}function V(n){0>oe||(n.current=K[oe],K[oe]=null,oe--)}function Q(n,r){oe++,K[oe]=n.current,n.current=r}var ee=M(null),re=M(null),we=M(null),de=M(null);function ye(n,r){switch(Q(we,r),Q(re,n),Q(ee,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?gb(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=gb(r),n=yb(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(ee),Q(ee,n)}function Fe(){V(ee),V(re),V(we)}function ve(n){n.memoizedState!==null&&Q(de,n);var r=ee.current,o=yb(r,n.type);r!==o&&(Q(re,n),Q(ee,o))}function te(n){re.current===n&&(V(ee),V(re)),de.current===n&&(V(de),_l._currentValue=z)}var me,be;function et(n){if(me===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);me=r&&r[1]||"",be=-1<o.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+me+n+be}var Te=!1;function xe(n,r){if(!n||Te)return"";Te=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(J){var $=J}Reflect.construct(n,[],le)}else{try{le.call()}catch(J){$=J}n.call(le.prototype)}}else{try{throw Error()}catch(J){$=J}(le=n())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(J){if(J&&$&&typeof J.stack=="string")return[J.stack,$.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),S=g[0],D=g[1];if(S&&D){var U=S.split(`
|
|
4
|
+
`),W=D.split(`
|
|
5
|
+
`);for(h=c=0;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;for(;h<W.length&&!W[h].includes("DetermineComponentFrameRoot");)h++;if(c===U.length||h===W.length)for(c=U.length-1,h=W.length-1;1<=c&&0<=h&&U[c]!==W[h];)h--;for(;1<=c&&0<=h;c--,h--)if(U[c]!==W[h]){if(c!==1||h!==1)do if(c--,h--,0>h||U[c]!==W[h]){var ie=`
|
|
6
|
+
`+U[c].replace(" at new "," at ");return n.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",n.displayName)),ie}while(1<=c&&0<=h);break}}}finally{Te=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?et(o):""}function _e(n,r){switch(n.tag){case 26:case 27:case 5:return et(n.type);case 16:return et("Lazy");case 13:return n.child!==r&&r!==null?et("Suspense Fallback"):et("Suspense");case 19:return et("SuspenseList");case 0:case 15:return xe(n.type,!1);case 11:return xe(n.type.render,!1);case 1:return xe(n.type,!0);case 31:return et("Activity");default:return""}}function dt(n){try{var r="",o=null;do r+=_e(n,o),o=n,n=n.return;while(n);return r}catch(c){return`
|
|
7
|
+
Error generating stack: `+c.message+`
|
|
8
|
+
`+c.stack}}var tt=Object.prototype.hasOwnProperty,ot=e.unstable_scheduleCallback,Re=e.unstable_cancelCallback,qe=e.unstable_shouldYield,Oe=e.unstable_requestPaint,Ne=e.unstable_now,ke=e.unstable_getCurrentPriorityLevel,rt=e.unstable_ImmediatePriority,at=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,gt=e.unstable_LowPriority,Gt=e.unstable_IdlePriority,yn=e.log,vn=e.unstable_setDisableYieldValue,jt=null,De=null;function jn(n){if(typeof yn=="function"&&vn(n),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(jt,n)}catch{}}var rn=Math.clz32?Math.clz32:Yn,Pt=Math.log,Mt=Math.LN2;function Yn(n){return n>>>=0,n===0?32:31-(Pt(n)/Mt|0)|0}var st=256,Kn=262144,Zt=4194304;function Lt(n){var r=n&42;if(r!==0)return r;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function nr(n,r,o){var c=n.pendingLanes;if(c===0)return 0;var h=0,g=n.suspendedLanes,S=n.pingedLanes;n=n.warmLanes;var D=c&134217727;return D!==0?(c=D&~g,c!==0?h=Lt(c):(S&=D,S!==0?h=Lt(S):o||(o=D&~n,o!==0&&(h=Lt(o))))):(D=c&~g,D!==0?h=Lt(D):S!==0?h=Lt(S):o||(o=c&~n,o!==0&&(h=Lt(o)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,o=r&-r,g>=o||g===32&&(o&4194048)!==0)?r:h}function Sr(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Ur(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pr(){var n=Zt;return Zt<<=1,(Zt&62914560)===0&&(Zt=4194304),n}function Mn(n){for(var r=[],o=0;31>o;o++)r.push(n);return r}function $n(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function _n(n,r,o,c,h,g){var S=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var D=n.entanglements,U=n.expirationTimes,W=n.hiddenUpdates;for(o=S&~o;0<o;){var ie=31-rn(o),le=1<<ie;D[ie]=0,U[ie]=-1;var $=W[ie];if($!==null)for(W[ie]=null,ie=0;ie<$.length;ie++){var J=$[ie];J!==null&&(J.lane&=-536870913)}o&=~le}c!==0&&Je(n,c,0),g!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=g&~(S&~r))}function Je(n,r,o){n.pendingLanes|=r,n.suspendedLanes&=~r;var c=31-rn(r);n.entangledLanes|=r,n.entanglements[c]=n.entanglements[c]|1073741824|o&261930}function L(n,r){var o=n.entangledLanes|=r;for(n=n.entanglements;o;){var c=31-rn(o),h=1<<c;h&r|n[c]&r&&(n[c]|=r),o&=~h}}function B(n,r){var o=r&-r;return o=(o&42)!==0?1:q(o),(o&(n.suspendedLanes|r))!==0?0:o}function q(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function he(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ge(){var n=X.p;return n!==0?n:(n=window.event,n===void 0?32:Yb(n.type))}function Ye(n,r){var o=X.p;try{return X.p=n,r()}finally{X.p=o}}var Ee=Math.random().toString(36).slice(2),Se="__reactFiber$"+Ee,Ce="__reactProps$"+Ee,ze="__reactContainer$"+Ee,He="__reactEvents$"+Ee,Le="__reactListeners$"+Ee,St="__reactHandles$"+Ee,yt="__reactResources$"+Ee,Jt="__reactMarker$"+Ee;function qt(n){delete n[Se],delete n[Ce],delete n[He],delete n[Le],delete n[St]}function en(n){var r=n[Se];if(r)return r;for(var o=n.parentNode;o;){if(r=o[ze]||o[Se]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(n=Cb(n);n!==null;){if(o=n[Se])return o;n=Cb(n)}return r}n=o,o=n.parentNode}return null}function ht(n){if(n=n[Se]||n[ze]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Cn(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(i(33))}function kn(n){var r=n[yt];return r||(r=n[yt]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Wt(n){n[Jt]=!0}var an=new Set,Kt={};function Bn(n,r){Hn(n,r),Hn(n+"Capture",r)}function Hn(n,r){for(Kt[n]=r,n=0;n<r.length;n++)an.add(r[n])}var Jr=RegExp("^[: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]*$"),ea={},ta={};function vt(n){return tt.call(ta,n)?!0:tt.call(ea,n)?!1:Jr.test(n)?ta[n]=!0:(ea[n]=!0,!1)}function $t(n,r,o){if(vt(r))if(o===null)n.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+o)}}function rr(n,r,o){if(o===null)n.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+o)}}function xn(n,r,o,c){if(c===null)n.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(r,o,""+c)}}function xt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ja(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Vo(n,r,o){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,g=c.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(S){o=""+S,g.call(this,S)}}),Object.defineProperty(n,r,{enumerable:c.enumerable}),{getValue:function(){return o},setValue:function(S){o=""+S},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function ao(n){if(!n._valueTracker){var r=ja(n)?"checked":"value";n._valueTracker=Vo(n,r,""+n[r])}}function Fo(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var o=r.getValue(),c="";return n&&(c=ja(n)?n.checked?"true":"false":n.value),n=c,n!==o?(r.setValue(n),!0):!1}function ci(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Ws=/[\n"\\]/g;function dr(n){return n.replace(Ws,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ks(n,r,o,c,h,g,S,D){n.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.type=S:n.removeAttribute("type"),r!=null?S==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+xt(r)):n.value!==""+xt(r)&&(n.value=""+xt(r)):S!=="submit"&&S!=="reset"||n.removeAttribute("value"),r!=null?$s(n,S,xt(r)):o!=null?$s(n,S,xt(o)):c!=null&&n.removeAttribute("value"),h==null&&g!=null&&(n.defaultChecked=!!g),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?n.name=""+xt(D):n.removeAttribute("name")}function jc(n,r,o,c,h,g,S,D){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||o!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){ao(n);return}o=o!=null?""+xt(o):"",r=r!=null?""+xt(r):o,D||r===n.value||(n.value=r),n.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=D?n.checked:!!c,n.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(n.name=S),ao(n)}function $s(n,r,o){r==="number"&&ci(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function ui(n,r,o,c){if(n=n.options,r){r={};for(var h=0;h<o.length;h++)r["$"+o[h]]=!0;for(o=0;o<n.length;o++)h=r.hasOwnProperty("$"+n[o].value),n[o].selected!==h&&(n[o].selected=h),h&&c&&(n[o].defaultSelected=!0)}else{for(o=""+xt(o),r=null,h=0;h<n.length;h++){if(n[h].value===o){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Mc(n,r,o){if(r!=null&&(r=""+xt(r),r!==n.value&&(n.value=r),o==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=o!=null?""+xt(o):""}function Ae(n,r,o,c){if(r==null){if(c!=null){if(o!=null)throw Error(i(92));if(F(c)){if(1<c.length)throw Error(i(93));c=c[0]}o=c}o==null&&(o=""),r=o}o=xt(r),n.defaultValue=o,c=n.textContent,c===o&&c!==""&&c!==null&&(n.value=c),ao(n)}function Ge(n,r){if(r){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=r;return}}n.textContent=r}var it=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Xt(n,r,o){var c=r.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":c?n.setProperty(r,o):typeof o!="number"||o===0||it.has(r)?r==="float"?n.cssFloat=o:n[r]=(""+o).trim():n[r]=o+"px"}function ln(n,r,o){if(r!=null&&typeof r!="object")throw Error(i(62));if(n=n.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&o[h]!==c&&Xt(n,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Xt(n,g,r[g])}function Tn(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Ma=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_a=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ka(n){return _a.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function na(){}var _c=null;function Uf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Go=null,qo=null;function py(n){var r=ht(n);if(r&&(n=r.stateNode)){var o=n[Ce]||null;e:switch(n=r.stateNode,r.type){case"input":if(Ks(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),r=o.name,o.type==="radio"&&r!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+dr(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var c=o[r];if(c!==n&&c.form===n.form){var h=c[Ce]||null;if(!h)throw Error(i(90));Ks(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<o.length;r++)c=o[r],c.form===n.form&&Fo(c)}break e;case"textarea":Mc(n,o.value,o.defaultValue);break e;case"select":r=o.value,r!=null&&ui(n,!!o.multiple,r,!1)}}}var Pf=!1;function gy(n,r,o){if(Pf)return n(r,o);Pf=!0;try{var c=n(r);return c}finally{if(Pf=!1,(Go!==null||qo!==null)&&(bu(),Go&&(r=Go,n=qo,qo=Go=null,py(r),n)))for(r=0;r<n.length;r++)py(n[r])}}function Xs(n,r){var o=n.stateNode;if(o===null)return null;var c=o[Ce]||null;if(c===null)return null;o=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,r,typeof o));return o}var La=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yf=!1;if(La)try{var Qs={};Object.defineProperty(Qs,"passive",{get:function(){Yf=!0}}),window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{Yf=!1}var di=null,Bf=null,kc=null;function yy(){if(kc)return kc;var n,r=Bf,o=r.length,c,h="value"in di?di.value:di.textContent,g=h.length;for(n=0;n<o&&r[n]===h[n];n++);var S=o-n;for(c=1;c<=S&&r[o-c]===h[g-c];c++);return kc=h.slice(n,1<c?1-c:void 0)}function Lc(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Ic(){return!0}function vy(){return!1}function fr(n){function r(o,c,h,g,S){this._reactName=o,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var D in n)n.hasOwnProperty(D)&&(o=n[D],this[D]=o?o(g):g[D]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ic:vy,this.isPropagationStopped=vy,this}return v(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ic)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ic)},persist:function(){},isPersistent:Ic}),r}var io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=fr(io),Zs=v({},io,{view:0,detail:0}),HT=fr(Zs),Hf,Vf,Js,Uc=v({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Js&&(Js&&n.type==="mousemove"?(Hf=n.screenX-Js.screenX,Vf=n.screenY-Js.screenY):Vf=Hf=0,Js=n),Hf)},movementY:function(n){return"movementY"in n?n.movementY:Vf}}),xy=fr(Uc),VT=v({},Uc,{dataTransfer:0}),FT=fr(VT),GT=v({},Zs,{relatedTarget:0}),Ff=fr(GT),qT=v({},io,{animationName:0,elapsedTime:0,pseudoElement:0}),WT=fr(qT),KT=v({},io,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),$T=fr(KT),XT=v({},io,{data:0}),by=fr(XT),QT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZT={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"},JT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eR(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=JT[n])?!!r[n]:!1}function Gf(){return eR}var tR=v({},Zs,{key:function(n){if(n.key){var r=QT[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Lc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ZT[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gf,charCode:function(n){return n.type==="keypress"?Lc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Lc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),nR=fr(tR),rR=v({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wy=fr(rR),aR=v({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gf}),iR=fr(aR),oR=v({},io,{propertyName:0,elapsedTime:0,pseudoElement:0}),sR=fr(oR),lR=v({},Uc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),cR=fr(lR),uR=v({},io,{newState:0,oldState:0}),dR=fr(uR),fR=[9,13,27,32],qf=La&&"CompositionEvent"in window,el=null;La&&"documentMode"in document&&(el=document.documentMode);var hR=La&&"TextEvent"in window&&!el,Sy=La&&(!qf||el&&8<el&&11>=el),Ey=" ",Cy=!1;function Ty(n,r){switch(n){case"keyup":return fR.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ry(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Wo=!1;function mR(n,r){switch(n){case"compositionend":return Ry(r);case"keypress":return r.which!==32?null:(Cy=!0,Ey);case"textInput":return n=r.data,n===Ey&&Cy?null:n;default:return null}}function pR(n,r){if(Wo)return n==="compositionend"||!qf&&Ty(n,r)?(n=yy(),kc=Bf=di=null,Wo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Sy&&r.locale!=="ko"?null:r.data;default:return null}}var gR={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 Ny(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!gR[n.type]:r==="textarea"}function Ay(n,r,o,c){Go?qo?qo.push(c):qo=[c]:Go=c,r=Nu(r,"onChange"),0<r.length&&(o=new zc("onChange","change",null,o,c),n.push({event:o,listeners:r}))}var tl=null,nl=null;function yR(n){ub(n,0)}function Pc(n){var r=Cn(n);if(Fo(r))return n}function Dy(n,r){if(n==="change")return r}var Oy=!1;if(La){var Wf;if(La){var Kf="oninput"in document;if(!Kf){var jy=document.createElement("div");jy.setAttribute("oninput","return;"),Kf=typeof jy.oninput=="function"}Wf=Kf}else Wf=!1;Oy=Wf&&(!document.documentMode||9<document.documentMode)}function My(){tl&&(tl.detachEvent("onpropertychange",_y),nl=tl=null)}function _y(n){if(n.propertyName==="value"&&Pc(nl)){var r=[];Ay(r,nl,n,Uf(n)),gy(yR,r)}}function vR(n,r,o){n==="focusin"?(My(),tl=r,nl=o,tl.attachEvent("onpropertychange",_y)):n==="focusout"&&My()}function xR(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Pc(nl)}function bR(n,r){if(n==="click")return Pc(r)}function wR(n,r){if(n==="input"||n==="change")return Pc(r)}function SR(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Er=typeof Object.is=="function"?Object.is:SR;function rl(n,r){if(Er(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var o=Object.keys(n),c=Object.keys(r);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var h=o[c];if(!tt.call(r,h)||!Er(n[h],r[h]))return!1}return!0}function ky(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ly(n,r){var o=ky(n);n=0;for(var c;o;){if(o.nodeType===3){if(c=n+o.textContent.length,n<=r&&c>=r)return{node:o,offset:r-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ky(o)}}function Iy(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Iy(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function zy(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=ci(n.document);r instanceof n.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)n=r.contentWindow;else break;r=ci(n.document)}return r}function $f(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var ER=La&&"documentMode"in document&&11>=document.documentMode,Ko=null,Xf=null,al=null,Qf=!1;function Uy(n,r,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Qf||Ko==null||Ko!==ci(c)||(c=Ko,"selectionStart"in c&&$f(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),al&&rl(al,c)||(al=c,c=Nu(Xf,"onSelect"),0<c.length&&(r=new zc("onSelect","select",null,r,o),n.push({event:r,listeners:c}),r.target=Ko)))}function oo(n,r){var o={};return o[n.toLowerCase()]=r.toLowerCase(),o["Webkit"+n]="webkit"+r,o["Moz"+n]="moz"+r,o}var $o={animationend:oo("Animation","AnimationEnd"),animationiteration:oo("Animation","AnimationIteration"),animationstart:oo("Animation","AnimationStart"),transitionrun:oo("Transition","TransitionRun"),transitionstart:oo("Transition","TransitionStart"),transitioncancel:oo("Transition","TransitionCancel"),transitionend:oo("Transition","TransitionEnd")},Zf={},Py={};La&&(Py=document.createElement("div").style,"AnimationEvent"in window||(delete $o.animationend.animation,delete $o.animationiteration.animation,delete $o.animationstart.animation),"TransitionEvent"in window||delete $o.transitionend.transition);function so(n){if(Zf[n])return Zf[n];if(!$o[n])return n;var r=$o[n],o;for(o in r)if(r.hasOwnProperty(o)&&o in Py)return Zf[n]=r[o];return n}var Yy=so("animationend"),By=so("animationiteration"),Hy=so("animationstart"),CR=so("transitionrun"),TR=so("transitionstart"),RR=so("transitioncancel"),Vy=so("transitionend"),Fy=new Map,Jf="abort auxClick beforeToggle 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(" ");Jf.push("scrollEnd");function ra(n,r){Fy.set(n,r),Bn(r,[n])}var Yc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Yr=[],Xo=0,eh=0;function Bc(){for(var n=Xo,r=eh=Xo=0;r<n;){var o=Yr[r];Yr[r++]=null;var c=Yr[r];Yr[r++]=null;var h=Yr[r];Yr[r++]=null;var g=Yr[r];if(Yr[r++]=null,c!==null&&h!==null){var S=c.pending;S===null?h.next=h:(h.next=S.next,S.next=h),c.pending=h}g!==0&&Gy(o,h,g)}}function Hc(n,r,o,c){Yr[Xo++]=n,Yr[Xo++]=r,Yr[Xo++]=o,Yr[Xo++]=c,eh|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function th(n,r,o,c){return Hc(n,r,o,c),Vc(n)}function lo(n,r){return Hc(n,null,null,r),Vc(n)}function Gy(n,r,o){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o);for(var h=!1,g=n.return;g!==null;)g.childLanes|=o,c=g.alternate,c!==null&&(c.childLanes|=o),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(h=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,h&&r!==null&&(h=31-rn(o),n=g.hiddenUpdates,c=n[h],c===null?n[h]=[r]:c.push(r),r.lane=o|536870912),g):null}function Vc(n){if(50<Rl)throw Rl=0,um=null,Error(i(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Qo={};function NR(n,r,o,c){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(n,r,o,c){return new NR(n,r,o,c)}function nh(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ia(n,r){var o=n.alternate;return o===null?(o=Cr(n.tag,r,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=r,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,r=n.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function qy(n,r){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,r=o.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Fc(n,r,o,c,h,g){var S=0;if(c=n,typeof n=="function")nh(n)&&(S=1);else if(typeof n=="string")S=MN(n,o,ee.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Z:return n=Cr(31,o,r,h),n.elementType=Z,n.lanes=g,n;case E:return co(o.children,h,g,r);case T:S=8,h|=24;break;case N:return n=Cr(12,o,r,h|2),n.elementType=N,n.lanes=g,n;case I:return n=Cr(13,o,r,h),n.elementType=I,n.lanes=g,n;case P:return n=Cr(19,o,r,h),n.elementType=P,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:S=10;break e;case R:S=9;break e;case j:S=11;break e;case A:S=14;break e;case _:S=16,c=null;break e}S=29,o=Error(i(130,n===null?"null":typeof n,"")),c=null}return r=Cr(S,o,r,h),r.elementType=n,r.type=c,r.lanes=g,r}function co(n,r,o,c){return n=Cr(7,n,c,r),n.lanes=o,n}function rh(n,r,o){return n=Cr(6,n,null,r),n.lanes=o,n}function Wy(n){var r=Cr(18,null,null,0);return r.stateNode=n,r}function ah(n,r,o){return r=Cr(4,n.children!==null?n.children:[],n.key,r),r.lanes=o,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Ky=new WeakMap;function Br(n,r){if(typeof n=="object"&&n!==null){var o=Ky.get(n);return o!==void 0?o:(r={value:n,source:r,stack:dt(r)},Ky.set(n,r),r)}return{value:n,source:r,stack:dt(r)}}var Zo=[],Jo=0,Gc=null,il=0,Hr=[],Vr=0,fi=null,pa=1,ga="";function za(n,r){Zo[Jo++]=il,Zo[Jo++]=Gc,Gc=n,il=r}function $y(n,r,o){Hr[Vr++]=pa,Hr[Vr++]=ga,Hr[Vr++]=fi,fi=n;var c=pa;n=ga;var h=32-rn(c)-1;c&=~(1<<h),o+=1;var g=32-rn(r)+h;if(30<g){var S=h-h%5;g=(c&(1<<S)-1).toString(32),c>>=S,h-=S,pa=1<<32-rn(r)+h|o<<h|c,ga=g+n}else pa=1<<g|o<<h|c,ga=n}function ih(n){n.return!==null&&(za(n,1),$y(n,1,0))}function oh(n){for(;n===Gc;)Gc=Zo[--Jo],Zo[Jo]=null,il=Zo[--Jo],Zo[Jo]=null;for(;n===fi;)fi=Hr[--Vr],Hr[Vr]=null,ga=Hr[--Vr],Hr[Vr]=null,pa=Hr[--Vr],Hr[Vr]=null}function Xy(n,r){Hr[Vr++]=pa,Hr[Vr++]=ga,Hr[Vr++]=fi,pa=r.id,ga=r.overflow,fi=n}var Vn=null,tn=null,Rt=!1,hi=null,Fr=!1,sh=Error(i(519));function mi(n){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(Br(r,n)),sh}function Qy(n){var r=n.stateNode,o=n.type,c=n.memoizedProps;switch(r[Se]=n,r[Ce]=c,o){case"dialog":wt("cancel",r),wt("close",r);break;case"iframe":case"object":case"embed":wt("load",r);break;case"video":case"audio":for(o=0;o<Al.length;o++)wt(Al[o],r);break;case"source":wt("error",r);break;case"img":case"image":case"link":wt("error",r),wt("load",r);break;case"details":wt("toggle",r);break;case"input":wt("invalid",r),jc(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":wt("invalid",r);break;case"textarea":wt("invalid",r),Ae(r,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||r.textContent===""+o||c.suppressHydrationWarning===!0||mb(r.textContent,o)?(c.popover!=null&&(wt("beforetoggle",r),wt("toggle",r)),c.onScroll!=null&&wt("scroll",r),c.onScrollEnd!=null&&wt("scrollend",r),c.onClick!=null&&(r.onclick=na),r=!0):r=!1,r||mi(n,!0)}function Zy(n){for(Vn=n.return;Vn;)switch(Vn.tag){case 5:case 31:case 13:Fr=!1;return;case 27:case 3:Fr=!0;return;default:Vn=Vn.return}}function es(n){if(n!==Vn)return!1;if(!Rt)return Zy(n),Rt=!0,!1;var r=n.tag,o;if((o=r!==3&&r!==27)&&((o=r===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Tm(n.type,n.memoizedProps)),o=!o),o&&tn&&mi(n),Zy(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));tn=Eb(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));tn=Eb(n)}else r===27?(r=tn,Ai(n.type)?(n=Om,Om=null,tn=n):tn=r):tn=Vn?qr(n.stateNode.nextSibling):null;return!0}function uo(){tn=Vn=null,Rt=!1}function lh(){var n=hi;return n!==null&&(gr===null?gr=n:gr.push.apply(gr,n),hi=null),n}function ol(n){hi===null?hi=[n]:hi.push(n)}var ch=M(null),fo=null,Ua=null;function pi(n,r,o){Q(ch,r._currentValue),r._currentValue=o}function Pa(n){n._currentValue=ch.current,V(ch)}function uh(n,r,o){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===o)break;n=n.return}}function dh(n,r,o,c){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var g=h.dependencies;if(g!==null){var S=h.child;g=g.firstContext;e:for(;g!==null;){var D=g;g=h;for(var U=0;U<r.length;U++)if(D.context===r[U]){g.lanes|=o,D=g.alternate,D!==null&&(D.lanes|=o),uh(g.return,o,n),c||(S=null);break e}g=D.next}}else if(h.tag===18){if(S=h.return,S===null)throw Error(i(341));S.lanes|=o,g=S.alternate,g!==null&&(g.lanes|=o),uh(S,o,n),S=null}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===n){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}}function ts(n,r,o,c){n=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var S=h.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var D=h.type;Er(h.pendingProps.value,S.value)||(n!==null?n.push(D):n=[D])}}else if(h===de.current){if(S=h.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(_l):n=[_l])}h=h.return}n!==null&&dh(r,n,o,c),r.flags|=262144}function qc(n){for(n=n.firstContext;n!==null;){if(!Er(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function ho(n){fo=n,Ua=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Fn(n){return Jy(fo,n)}function Wc(n,r){return fo===null&&ho(n),Jy(n,r)}function Jy(n,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},Ua===null){if(n===null)throw Error(i(308));Ua=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Ua=Ua.next=r;return o}var AR=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(o,c){n.push(c)}};this.abort=function(){r.aborted=!0,n.forEach(function(o){return o()})}},DR=e.unstable_scheduleCallback,OR=e.unstable_NormalPriority,Rn={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fh(){return{controller:new AR,data:new Map,refCount:0}}function sl(n){n.refCount--,n.refCount===0&&DR(OR,function(){n.controller.abort()})}var ll=null,hh=0,ns=0,rs=null;function jR(n,r){if(ll===null){var o=ll=[];hh=0,ns=gm(),rs={status:"pending",value:void 0,then:function(c){o.push(c)}}}return hh++,r.then(ev,ev),r}function ev(){if(--hh===0&&ll!==null){rs!==null&&(rs.status="fulfilled");var n=ll;ll=null,ns=0,rs=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function MR(n,r){var o=[],c={status:"pending",value:null,reason:null,then:function(h){o.push(h)}};return n.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<o.length;h++)(0,o[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<o.length;h++)(0,o[h])(void 0)}),c}var tv=k.S;k.S=function(n,r){Ux=Ne(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&jR(n,r),tv!==null&&tv(n,r)};var mo=M(null);function mh(){var n=mo.current;return n!==null?n:Ft.pooledCache}function Kc(n,r){r===null?Q(mo,mo.current):Q(mo,r.pool)}function nv(){var n=mh();return n===null?null:{parent:Rn._currentValue,pool:n}}var as=Error(i(460)),ph=Error(i(474)),$c=Error(i(542)),Xc={then:function(){}};function rv(n){return n=n.status,n==="fulfilled"||n==="rejected"}function av(n,r,o){switch(o=n[o],o===void 0?n.push(r):o!==r&&(r.then(na,na),r=o),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,ov(n),n;default:if(typeof r.status=="string")r.then(na,na);else{if(n=Ft,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=r,n.status="pending",n.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,ov(n),n}throw go=r,as}}function po(n){try{var r=n._init;return r(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(go=o,as):o}}var go=null;function iv(){if(go===null)throw Error(i(459));var n=go;return go=null,n}function ov(n){if(n===as||n===$c)throw Error(i(483))}var is=null,cl=0;function Qc(n){var r=cl;return cl+=1,is===null&&(is=[]),av(is,n,r)}function ul(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Zc(n,r){throw r.$$typeof===w?Error(i(525)):(n=Object.prototype.toString.call(r),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function sv(n){function r(H,Y){if(n){var G=H.deletions;G===null?(H.deletions=[Y],H.flags|=16):G.push(Y)}}function o(H,Y){if(!n)return null;for(;Y!==null;)r(H,Y),Y=Y.sibling;return null}function c(H){for(var Y=new Map;H!==null;)H.key!==null?Y.set(H.key,H):Y.set(H.index,H),H=H.sibling;return Y}function h(H,Y){return H=Ia(H,Y),H.index=0,H.sibling=null,H}function g(H,Y,G){return H.index=G,n?(G=H.alternate,G!==null?(G=G.index,G<Y?(H.flags|=67108866,Y):G):(H.flags|=67108866,Y)):(H.flags|=1048576,Y)}function S(H){return n&&H.alternate===null&&(H.flags|=67108866),H}function D(H,Y,G,se){return Y===null||Y.tag!==6?(Y=rh(G,H.mode,se),Y.return=H,Y):(Y=h(Y,G),Y.return=H,Y)}function U(H,Y,G,se){var Ke=G.type;return Ke===E?ie(H,Y,G.props.children,se,G.key):Y!==null&&(Y.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===_&&po(Ke)===Y.type)?(Y=h(Y,G.props),ul(Y,G),Y.return=H,Y):(Y=Fc(G.type,G.key,G.props,null,H.mode,se),ul(Y,G),Y.return=H,Y)}function W(H,Y,G,se){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==G.containerInfo||Y.stateNode.implementation!==G.implementation?(Y=ah(G,H.mode,se),Y.return=H,Y):(Y=h(Y,G.children||[]),Y.return=H,Y)}function ie(H,Y,G,se,Ke){return Y===null||Y.tag!==7?(Y=co(G,H.mode,se,Ke),Y.return=H,Y):(Y=h(Y,G),Y.return=H,Y)}function le(H,Y,G){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=rh(""+Y,H.mode,G),Y.return=H,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return G=Fc(Y.type,Y.key,Y.props,null,H.mode,G),ul(G,Y),G.return=H,G;case C:return Y=ah(Y,H.mode,G),Y.return=H,Y;case _:return Y=po(Y),le(H,Y,G)}if(F(Y)||fe(Y))return Y=co(Y,H.mode,G,null),Y.return=H,Y;if(typeof Y.then=="function")return le(H,Qc(Y),G);if(Y.$$typeof===O)return le(H,Wc(H,Y),G);Zc(H,Y)}return null}function $(H,Y,G,se){var Ke=Y!==null?Y.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ke!==null?null:D(H,Y,""+G,se);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case b:return G.key===Ke?U(H,Y,G,se):null;case C:return G.key===Ke?W(H,Y,G,se):null;case _:return G=po(G),$(H,Y,G,se)}if(F(G)||fe(G))return Ke!==null?null:ie(H,Y,G,se,null);if(typeof G.then=="function")return $(H,Y,Qc(G),se);if(G.$$typeof===O)return $(H,Y,Wc(H,G),se);Zc(H,G)}return null}function J(H,Y,G,se,Ke){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return H=H.get(G)||null,D(Y,H,""+se,Ke);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case b:return H=H.get(se.key===null?G:se.key)||null,U(Y,H,se,Ke);case C:return H=H.get(se.key===null?G:se.key)||null,W(Y,H,se,Ke);case _:return se=po(se),J(H,Y,G,se,Ke)}if(F(se)||fe(se))return H=H.get(G)||null,ie(Y,H,se,Ke,null);if(typeof se.then=="function")return J(H,Y,G,Qc(se),Ke);if(se.$$typeof===O)return J(H,Y,G,Wc(Y,se),Ke);Zc(Y,se)}return null}function Ie(H,Y,G,se){for(var Ke=null,Dt=null,Ve=Y,ct=Y=0,Ct=null;Ve!==null&&ct<G.length;ct++){Ve.index>ct?(Ct=Ve,Ve=null):Ct=Ve.sibling;var Ot=$(H,Ve,G[ct],se);if(Ot===null){Ve===null&&(Ve=Ct);break}n&&Ve&&Ot.alternate===null&&r(H,Ve),Y=g(Ot,Y,ct),Dt===null?Ke=Ot:Dt.sibling=Ot,Dt=Ot,Ve=Ct}if(ct===G.length)return o(H,Ve),Rt&&za(H,ct),Ke;if(Ve===null){for(;ct<G.length;ct++)Ve=le(H,G[ct],se),Ve!==null&&(Y=g(Ve,Y,ct),Dt===null?Ke=Ve:Dt.sibling=Ve,Dt=Ve);return Rt&&za(H,ct),Ke}for(Ve=c(Ve);ct<G.length;ct++)Ct=J(Ve,H,ct,G[ct],se),Ct!==null&&(n&&Ct.alternate!==null&&Ve.delete(Ct.key===null?ct:Ct.key),Y=g(Ct,Y,ct),Dt===null?Ke=Ct:Dt.sibling=Ct,Dt=Ct);return n&&Ve.forEach(function(_i){return r(H,_i)}),Rt&&za(H,ct),Ke}function Ze(H,Y,G,se){if(G==null)throw Error(i(151));for(var Ke=null,Dt=null,Ve=Y,ct=Y=0,Ct=null,Ot=G.next();Ve!==null&&!Ot.done;ct++,Ot=G.next()){Ve.index>ct?(Ct=Ve,Ve=null):Ct=Ve.sibling;var _i=$(H,Ve,Ot.value,se);if(_i===null){Ve===null&&(Ve=Ct);break}n&&Ve&&_i.alternate===null&&r(H,Ve),Y=g(_i,Y,ct),Dt===null?Ke=_i:Dt.sibling=_i,Dt=_i,Ve=Ct}if(Ot.done)return o(H,Ve),Rt&&za(H,ct),Ke;if(Ve===null){for(;!Ot.done;ct++,Ot=G.next())Ot=le(H,Ot.value,se),Ot!==null&&(Y=g(Ot,Y,ct),Dt===null?Ke=Ot:Dt.sibling=Ot,Dt=Ot);return Rt&&za(H,ct),Ke}for(Ve=c(Ve);!Ot.done;ct++,Ot=G.next())Ot=J(Ve,H,ct,Ot.value,se),Ot!==null&&(n&&Ot.alternate!==null&&Ve.delete(Ot.key===null?ct:Ot.key),Y=g(Ot,Y,ct),Dt===null?Ke=Ot:Dt.sibling=Ot,Dt=Ot);return n&&Ve.forEach(function(VN){return r(H,VN)}),Rt&&za(H,ct),Ke}function Ht(H,Y,G,se){if(typeof G=="object"&&G!==null&&G.type===E&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case b:e:{for(var Ke=G.key;Y!==null;){if(Y.key===Ke){if(Ke=G.type,Ke===E){if(Y.tag===7){o(H,Y.sibling),se=h(Y,G.props.children),se.return=H,H=se;break e}}else if(Y.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===_&&po(Ke)===Y.type){o(H,Y.sibling),se=h(Y,G.props),ul(se,G),se.return=H,H=se;break e}o(H,Y);break}else r(H,Y);Y=Y.sibling}G.type===E?(se=co(G.props.children,H.mode,se,G.key),se.return=H,H=se):(se=Fc(G.type,G.key,G.props,null,H.mode,se),ul(se,G),se.return=H,H=se)}return S(H);case C:e:{for(Ke=G.key;Y!==null;){if(Y.key===Ke)if(Y.tag===4&&Y.stateNode.containerInfo===G.containerInfo&&Y.stateNode.implementation===G.implementation){o(H,Y.sibling),se=h(Y,G.children||[]),se.return=H,H=se;break e}else{o(H,Y);break}else r(H,Y);Y=Y.sibling}se=ah(G,H.mode,se),se.return=H,H=se}return S(H);case _:return G=po(G),Ht(H,Y,G,se)}if(F(G))return Ie(H,Y,G,se);if(fe(G)){if(Ke=fe(G),typeof Ke!="function")throw Error(i(150));return G=Ke.call(G),Ze(H,Y,G,se)}if(typeof G.then=="function")return Ht(H,Y,Qc(G),se);if(G.$$typeof===O)return Ht(H,Y,Wc(H,G),se);Zc(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,Y!==null&&Y.tag===6?(o(H,Y.sibling),se=h(Y,G),se.return=H,H=se):(o(H,Y),se=rh(G,H.mode,se),se.return=H,H=se),S(H)):o(H,Y)}return function(H,Y,G,se){try{cl=0;var Ke=Ht(H,Y,G,se);return is=null,Ke}catch(Ve){if(Ve===as||Ve===$c)throw Ve;var Dt=Cr(29,Ve,null,H.mode);return Dt.lanes=se,Dt.return=H,Dt}}}var yo=sv(!0),lv=sv(!1),gi=!1;function gh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yh(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function yi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function vi(n,r,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(_t&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=Vc(n),Gy(n,null,o),r}return Hc(n,c,r,o),Vc(n)}function dl(n,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194048)!==0)){var c=r.lanes;c&=n.pendingLanes,o|=c,r.lanes=o,L(n,o)}}function vh(n,r){var o=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var h=null,g=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};g===null?h=g=S:g=g.next=S,o=o.next}while(o!==null);g===null?h=g=r:g=g.next=r}else h=g=r;o={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=r:n.next=r,o.lastBaseUpdate=r}var xh=!1;function fl(){if(xh){var n=rs;if(n!==null)throw n}}function hl(n,r,o,c){xh=!1;var h=n.updateQueue;gi=!1;var g=h.firstBaseUpdate,S=h.lastBaseUpdate,D=h.shared.pending;if(D!==null){h.shared.pending=null;var U=D,W=U.next;U.next=null,S===null?g=W:S.next=W,S=U;var ie=n.alternate;ie!==null&&(ie=ie.updateQueue,D=ie.lastBaseUpdate,D!==S&&(D===null?ie.firstBaseUpdate=W:D.next=W,ie.lastBaseUpdate=U))}if(g!==null){var le=h.baseState;S=0,ie=W=U=null,D=g;do{var $=D.lane&-536870913,J=$!==D.lane;if(J?(Et&$)===$:(c&$)===$){$!==0&&$===ns&&(xh=!0),ie!==null&&(ie=ie.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Ie=n,Ze=D;$=r;var Ht=o;switch(Ze.tag){case 1:if(Ie=Ze.payload,typeof Ie=="function"){le=Ie.call(Ht,le,$);break e}le=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Ze.payload,$=typeof Ie=="function"?Ie.call(Ht,le,$):Ie,$==null)break e;le=v({},le,$);break e;case 2:gi=!0}}$=D.callback,$!==null&&(n.flags|=64,J&&(n.flags|=8192),J=h.callbacks,J===null?h.callbacks=[$]:J.push($))}else J={lane:$,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ie===null?(W=ie=J,U=le):ie=ie.next=J,S|=$;if(D=D.next,D===null){if(D=h.shared.pending,D===null)break;J=D,D=J.next,J.next=null,h.lastBaseUpdate=J,h.shared.pending=null}}while(!0);ie===null&&(U=le),h.baseState=U,h.firstBaseUpdate=W,h.lastBaseUpdate=ie,g===null&&(h.shared.lanes=0),Ei|=S,n.lanes=S,n.memoizedState=le}}function cv(n,r){if(typeof n!="function")throw Error(i(191,n));n.call(r)}function uv(n,r){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)cv(o[n],r)}var os=M(null),Jc=M(0);function dv(n,r){n=Ka,Q(Jc,n),Q(os,r),Ka=n|r.baseLanes}function bh(){Q(Jc,Ka),Q(os,os.current)}function wh(){Ka=Jc.current,V(os),V(Jc)}var Tr=M(null),Gr=null;function xi(n){var r=n.alternate;Q(bn,bn.current&1),Q(Tr,n),Gr===null&&(r===null||os.current!==null||r.memoizedState!==null)&&(Gr=n)}function Sh(n){Q(bn,bn.current),Q(Tr,n),Gr===null&&(Gr=n)}function fv(n){n.tag===22?(Q(bn,bn.current),Q(Tr,n),Gr===null&&(Gr=n)):bi()}function bi(){Q(bn,bn.current),Q(Tr,Tr.current)}function Rr(n){V(Tr),Gr===n&&(Gr=null),V(bn)}var bn=M(0);function eu(n){for(var r=n;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Am(o)||Dm(o)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Ya=0,lt=null,Yt=null,Nn=null,tu=!1,ss=!1,vo=!1,nu=0,ml=0,ls=null,_R=0;function fn(){throw Error(i(321))}function Eh(n,r){if(r===null)return!1;for(var o=0;o<r.length&&o<n.length;o++)if(!Er(n[o],r[o]))return!1;return!0}function Ch(n,r,o,c,h,g){return Ya=g,lt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,k.H=n===null||n.memoizedState===null?$v:Ph,vo=!1,g=o(c,h),vo=!1,ss&&(g=mv(r,o,c,h)),hv(n),g}function hv(n){k.H=yl;var r=Yt!==null&&Yt.next!==null;if(Ya=0,Nn=Yt=lt=null,tu=!1,ml=0,ls=null,r)throw Error(i(300));n===null||An||(n=n.dependencies,n!==null&&qc(n)&&(An=!0))}function mv(n,r,o,c){lt=n;var h=0;do{if(ss&&(ls=null),ml=0,ss=!1,25<=h)throw Error(i(301));if(h+=1,Nn=Yt=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}k.H=Xv,g=r(o,c)}while(ss);return g}function kR(){var n=k.H,r=n.useState()[0];return r=typeof r.then=="function"?pl(r):r,n=n.useState()[0],(Yt!==null?Yt.memoizedState:null)!==n&&(lt.flags|=1024),r}function Th(){var n=nu!==0;return nu=0,n}function Rh(n,r,o){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~o}function Nh(n){if(tu){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}tu=!1}Ya=0,Nn=Yt=lt=null,ss=!1,ml=nu=0,ls=null}function ar(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nn===null?lt.memoizedState=Nn=n:Nn=Nn.next=n,Nn}function wn(){if(Yt===null){var n=lt.alternate;n=n!==null?n.memoizedState:null}else n=Yt.next;var r=Nn===null?lt.memoizedState:Nn.next;if(r!==null)Nn=r,Yt=n;else{if(n===null)throw lt.alternate===null?Error(i(467)):Error(i(310));Yt=n,n={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},Nn===null?lt.memoizedState=Nn=n:Nn=Nn.next=n}return Nn}function ru(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pl(n){var r=ml;return ml+=1,ls===null&&(ls=[]),n=av(ls,n,r),r=lt,(Nn===null?r.memoizedState:Nn.next)===null&&(r=r.alternate,k.H=r===null||r.memoizedState===null?$v:Ph),n}function au(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return pl(n);if(n.$$typeof===O)return Fn(n)}throw Error(i(438,String(n)))}function Ah(n){var r=null,o=lt.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var c=lt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),o===null&&(o=ru(),lt.updateQueue=o),o.memoCache=r,o=r.data[r.index],o===void 0)for(o=r.data[r.index]=Array(n),c=0;c<n;c++)o[c]=ne;return r.index++,o}function Ba(n,r){return typeof r=="function"?r(n):r}function iu(n){var r=wn();return Dh(r,Yt,n)}function Dh(n,r,o){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=o;var h=n.baseQueue,g=c.pending;if(g!==null){if(h!==null){var S=h.next;h.next=g.next,g.next=S}r.baseQueue=h=g,c.pending=null}if(g=n.baseState,h===null)n.memoizedState=g;else{r=h.next;var D=S=null,U=null,W=r,ie=!1;do{var le=W.lane&-536870913;if(le!==W.lane?(Et&le)===le:(Ya&le)===le){var $=W.revertLane;if($===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),le===ns&&(ie=!0);else if((Ya&$)===$){W=W.next,$===ns&&(ie=!0);continue}else le={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(D=U=le,S=g):U=U.next=le,lt.lanes|=$,Ei|=$;le=W.action,vo&&o(g,le),g=W.hasEagerState?W.eagerState:o(g,le)}else $={lane:le,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(D=U=$,S=g):U=U.next=$,lt.lanes|=le,Ei|=le;W=W.next}while(W!==null&&W!==r);if(U===null?S=g:U.next=D,!Er(g,n.memoizedState)&&(An=!0,ie&&(o=rs,o!==null)))throw o;n.memoizedState=g,n.baseState=S,n.baseQueue=U,c.lastRenderedState=g}return h===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Oh(n){var r=wn(),o=r.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var c=o.dispatch,h=o.pending,g=r.memoizedState;if(h!==null){o.pending=null;var S=h=h.next;do g=n(g,S.action),S=S.next;while(S!==h);Er(g,r.memoizedState)||(An=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),o.lastRenderedState=g}return[g,c]}function pv(n,r,o){var c=lt,h=wn(),g=Rt;if(g){if(o===void 0)throw Error(i(407));o=o()}else o=r();var S=!Er((Yt||h).memoizedState,o);if(S&&(h.memoizedState=o,An=!0),h=h.queue,_h(vv.bind(null,c,h,n),[n]),h.getSnapshot!==r||S||Nn!==null&&Nn.memoizedState.tag&1){if(c.flags|=2048,cs(9,{destroy:void 0},yv.bind(null,c,h,o,r),null),Ft===null)throw Error(i(349));g||(Ya&127)!==0||gv(c,r,o)}return o}function gv(n,r,o){n.flags|=16384,n={getSnapshot:r,value:o},r=lt.updateQueue,r===null?(r=ru(),lt.updateQueue=r,r.stores=[n]):(o=r.stores,o===null?r.stores=[n]:o.push(n))}function yv(n,r,o,c){r.value=o,r.getSnapshot=c,xv(r)&&bv(n)}function vv(n,r,o){return o(function(){xv(r)&&bv(n)})}function xv(n){var r=n.getSnapshot;n=n.value;try{var o=r();return!Er(n,o)}catch{return!0}}function bv(n){var r=lo(n,2);r!==null&&yr(r,n,2)}function jh(n){var r=ar();if(typeof n=="function"){var o=n;if(n=o(),vo){jn(!0);try{o()}finally{jn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:n},r}function wv(n,r,o,c){return n.baseState=o,Dh(n,Yt,typeof c=="function"?c:Ba)}function LR(n,r,o,c,h){if(lu(n))throw Error(i(485));if(n=r.action,n!==null){var g={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};k.T!==null?o(!0):g.isTransition=!1,c(g),o=r.pending,o===null?(g.next=r.pending=g,Sv(r,g)):(g.next=o.next,r.pending=o.next=g)}}function Sv(n,r){var o=r.action,c=r.payload,h=n.state;if(r.isTransition){var g=k.T,S={};k.T=S;try{var D=o(h,c),U=k.S;U!==null&&U(S,D),Ev(n,r,D)}catch(W){Mh(n,r,W)}finally{g!==null&&S.types!==null&&(g.types=S.types),k.T=g}}else try{g=o(h,c),Ev(n,r,g)}catch(W){Mh(n,r,W)}}function Ev(n,r,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){Cv(n,r,c)},function(c){return Mh(n,r,c)}):Cv(n,r,o)}function Cv(n,r,o){r.status="fulfilled",r.value=o,Tv(r),n.state=o,r=n.pending,r!==null&&(o=r.next,o===r?n.pending=null:(o=o.next,r.next=o,Sv(n,o)))}function Mh(n,r,o){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=o,Tv(r),r=r.next;while(r!==c)}n.action=null}function Tv(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Rv(n,r){return r}function Nv(n,r){if(Rt){var o=Ft.formState;if(o!==null){e:{var c=lt;if(Rt){if(tn){t:{for(var h=tn,g=Fr;h.nodeType!==8;){if(!g){h=null;break t}if(h=qr(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){tn=qr(h.nextSibling),c=h.data==="F!";break e}}mi(c)}c=!1}c&&(r=o[0])}}return o=ar(),o.memoizedState=o.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rv,lastRenderedState:r},o.queue=c,o=qv.bind(null,lt,c),c.dispatch=o,c=jh(!1),g=Uh.bind(null,lt,!1,c.queue),c=ar(),h={state:r,dispatch:null,action:n,pending:null},c.queue=h,o=LR.bind(null,lt,h,g,o),h.dispatch=o,c.memoizedState=n,[r,o,!1]}function Av(n){var r=wn();return Dv(r,Yt,n)}function Dv(n,r,o){if(r=Dh(n,r,Rv)[0],n=iu(Ba)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=pl(r)}catch(S){throw S===as?$c:S}else c=r;r=wn();var h=r.queue,g=h.dispatch;return o!==r.memoizedState&&(lt.flags|=2048,cs(9,{destroy:void 0},IR.bind(null,h,o),null)),[c,g,n]}function IR(n,r){n.action=r}function Ov(n){var r=wn(),o=Yt;if(o!==null)return Dv(r,o,n);wn(),r=r.memoizedState,o=wn();var c=o.queue.dispatch;return o.memoizedState=n,[r,c,!1]}function cs(n,r,o,c){return n={tag:n,create:o,deps:c,inst:r,next:null},r=lt.updateQueue,r===null&&(r=ru(),lt.updateQueue=r),o=r.lastEffect,o===null?r.lastEffect=n.next=n:(c=o.next,o.next=n,n.next=c,r.lastEffect=n),n}function jv(){return wn().memoizedState}function ou(n,r,o,c){var h=ar();lt.flags|=n,h.memoizedState=cs(1|r,{destroy:void 0},o,c===void 0?null:c)}function su(n,r,o,c){var h=wn();c=c===void 0?null:c;var g=h.memoizedState.inst;Yt!==null&&c!==null&&Eh(c,Yt.memoizedState.deps)?h.memoizedState=cs(r,g,o,c):(lt.flags|=n,h.memoizedState=cs(1|r,g,o,c))}function Mv(n,r){ou(8390656,8,n,r)}function _h(n,r){su(2048,8,n,r)}function zR(n){lt.flags|=4;var r=lt.updateQueue;if(r===null)r=ru(),lt.updateQueue=r,r.events=[n];else{var o=r.events;o===null?r.events=[n]:o.push(n)}}function _v(n){var r=wn().memoizedState;return zR({ref:r,nextImpl:n}),function(){if((_t&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function kv(n,r){return su(4,2,n,r)}function Lv(n,r){return su(4,4,n,r)}function Iv(n,r){if(typeof r=="function"){n=n();var o=r(n);return function(){typeof o=="function"?o():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function zv(n,r,o){o=o!=null?o.concat([n]):null,su(4,4,Iv.bind(null,r,n),o)}function kh(){}function Uv(n,r){var o=wn();r=r===void 0?null:r;var c=o.memoizedState;return r!==null&&Eh(r,c[1])?c[0]:(o.memoizedState=[n,r],n)}function Pv(n,r){var o=wn();r=r===void 0?null:r;var c=o.memoizedState;if(r!==null&&Eh(r,c[1]))return c[0];if(c=n(),vo){jn(!0);try{n()}finally{jn(!1)}}return o.memoizedState=[c,r],c}function Lh(n,r,o){return o===void 0||(Ya&1073741824)!==0&&(Et&261930)===0?n.memoizedState=r:(n.memoizedState=o,n=Yx(),lt.lanes|=n,Ei|=n,o)}function Yv(n,r,o,c){return Er(o,r)?o:os.current!==null?(n=Lh(n,o,c),Er(n,r)||(An=!0),n):(Ya&42)===0||(Ya&1073741824)!==0&&(Et&261930)===0?(An=!0,n.memoizedState=o):(n=Yx(),lt.lanes|=n,Ei|=n,r)}function Bv(n,r,o,c,h){var g=X.p;X.p=g!==0&&8>g?g:8;var S=k.T,D={};k.T=D,Uh(n,!1,r,o);try{var U=h(),W=k.S;if(W!==null&&W(D,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ie=MR(U,c);gl(n,r,ie,Dr(n))}else gl(n,r,c,Dr(n))}catch(le){gl(n,r,{then:function(){},status:"rejected",reason:le},Dr())}finally{X.p=g,S!==null&&D.types!==null&&(S.types=D.types),k.T=S}}function UR(){}function Ih(n,r,o,c){if(n.tag!==5)throw Error(i(476));var h=Hv(n).queue;Bv(n,h,r,z,o===null?UR:function(){return Vv(n),o(c)})}function Hv(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:z},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:o},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Vv(n){var r=Hv(n);r.next===null&&(r=n.alternate.memoizedState),gl(n,r.next.queue,{},Dr())}function zh(){return Fn(_l)}function Fv(){return wn().memoizedState}function Gv(){return wn().memoizedState}function PR(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var o=Dr();n=yi(o);var c=vi(r,n,o);c!==null&&(yr(c,r,o),dl(c,r,o)),r={cache:fh()},n.payload=r;return}r=r.return}}function YR(n,r,o){var c=Dr();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},lu(n)?Wv(r,o):(o=th(n,r,o,c),o!==null&&(yr(o,n,c),Kv(o,r,c)))}function qv(n,r,o){var c=Dr();gl(n,r,o,c)}function gl(n,r,o,c){var h={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(lu(n))Wv(r,h);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var S=r.lastRenderedState,D=g(S,o);if(h.hasEagerState=!0,h.eagerState=D,Er(D,S))return Hc(n,r,h,0),Ft===null&&Bc(),!1}catch{}if(o=th(n,r,h,c),o!==null)return yr(o,n,c),Kv(o,r,c),!0}return!1}function Uh(n,r,o,c){if(c={lane:2,revertLane:gm(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lu(n)){if(r)throw Error(i(479))}else r=th(n,o,c,2),r!==null&&yr(r,n,2)}function lu(n){var r=n.alternate;return n===lt||r!==null&&r===lt}function Wv(n,r){ss=tu=!0;var o=n.pending;o===null?r.next=r:(r.next=o.next,o.next=r),n.pending=r}function Kv(n,r,o){if((o&4194048)!==0){var c=r.lanes;c&=n.pendingLanes,o|=c,r.lanes=o,L(n,o)}}var yl={readContext:Fn,use:au,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};yl.useEffectEvent=fn;var $v={readContext:Fn,use:au,useCallback:function(n,r){return ar().memoizedState=[n,r===void 0?null:r],n},useContext:Fn,useEffect:Mv,useImperativeHandle:function(n,r,o){o=o!=null?o.concat([n]):null,ou(4194308,4,Iv.bind(null,r,n),o)},useLayoutEffect:function(n,r){return ou(4194308,4,n,r)},useInsertionEffect:function(n,r){ou(4,2,n,r)},useMemo:function(n,r){var o=ar();r=r===void 0?null:r;var c=n();if(vo){jn(!0);try{n()}finally{jn(!1)}}return o.memoizedState=[c,r],c},useReducer:function(n,r,o){var c=ar();if(o!==void 0){var h=o(r);if(vo){jn(!0);try{o(r)}finally{jn(!1)}}}else h=r;return c.memoizedState=c.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},c.queue=n,n=n.dispatch=YR.bind(null,lt,n),[c.memoizedState,n]},useRef:function(n){var r=ar();return n={current:n},r.memoizedState=n},useState:function(n){n=jh(n);var r=n.queue,o=qv.bind(null,lt,r);return r.dispatch=o,[n.memoizedState,o]},useDebugValue:kh,useDeferredValue:function(n,r){var o=ar();return Lh(o,n,r)},useTransition:function(){var n=jh(!1);return n=Bv.bind(null,lt,n.queue,!0,!1),ar().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,o){var c=lt,h=ar();if(Rt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=r(),Ft===null)throw Error(i(349));(Et&127)!==0||gv(c,r,o)}h.memoizedState=o;var g={value:o,getSnapshot:r};return h.queue=g,Mv(vv.bind(null,c,g,n),[n]),c.flags|=2048,cs(9,{destroy:void 0},yv.bind(null,c,g,o,r),null),o},useId:function(){var n=ar(),r=Ft.identifierPrefix;if(Rt){var o=ga,c=pa;o=(c&~(1<<32-rn(c)-1)).toString(32)+o,r="_"+r+"R_"+o,o=nu++,0<o&&(r+="H"+o.toString(32)),r+="_"}else o=_R++,r="_"+r+"r_"+o.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:zh,useFormState:Nv,useActionState:Nv,useOptimistic:function(n){var r=ar();r.memoizedState=r.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=Uh.bind(null,lt,!0,o),o.dispatch=r,[n,r]},useMemoCache:Ah,useCacheRefresh:function(){return ar().memoizedState=PR.bind(null,lt)},useEffectEvent:function(n){var r=ar(),o={impl:n};return r.memoizedState=o,function(){if((_t&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},Ph={readContext:Fn,use:au,useCallback:Uv,useContext:Fn,useEffect:_h,useImperativeHandle:zv,useInsertionEffect:kv,useLayoutEffect:Lv,useMemo:Pv,useReducer:iu,useRef:jv,useState:function(){return iu(Ba)},useDebugValue:kh,useDeferredValue:function(n,r){var o=wn();return Yv(o,Yt.memoizedState,n,r)},useTransition:function(){var n=iu(Ba)[0],r=wn().memoizedState;return[typeof n=="boolean"?n:pl(n),r]},useSyncExternalStore:pv,useId:Fv,useHostTransitionStatus:zh,useFormState:Av,useActionState:Av,useOptimistic:function(n,r){var o=wn();return wv(o,Yt,n,r)},useMemoCache:Ah,useCacheRefresh:Gv};Ph.useEffectEvent=_v;var Xv={readContext:Fn,use:au,useCallback:Uv,useContext:Fn,useEffect:_h,useImperativeHandle:zv,useInsertionEffect:kv,useLayoutEffect:Lv,useMemo:Pv,useReducer:Oh,useRef:jv,useState:function(){return Oh(Ba)},useDebugValue:kh,useDeferredValue:function(n,r){var o=wn();return Yt===null?Lh(o,n,r):Yv(o,Yt.memoizedState,n,r)},useTransition:function(){var n=Oh(Ba)[0],r=wn().memoizedState;return[typeof n=="boolean"?n:pl(n),r]},useSyncExternalStore:pv,useId:Fv,useHostTransitionStatus:zh,useFormState:Ov,useActionState:Ov,useOptimistic:function(n,r){var o=wn();return Yt!==null?wv(o,Yt,n,r):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Ah,useCacheRefresh:Gv};Xv.useEffectEvent=_v;function Yh(n,r,o,c){r=n.memoizedState,o=o(c,r),o=o==null?r:v({},r,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Bh={enqueueSetState:function(n,r,o){n=n._reactInternals;var c=Dr(),h=yi(c);h.payload=r,o!=null&&(h.callback=o),r=vi(n,h,c),r!==null&&(yr(r,n,c),dl(r,n,c))},enqueueReplaceState:function(n,r,o){n=n._reactInternals;var c=Dr(),h=yi(c);h.tag=1,h.payload=r,o!=null&&(h.callback=o),r=vi(n,h,c),r!==null&&(yr(r,n,c),dl(r,n,c))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var o=Dr(),c=yi(o);c.tag=2,r!=null&&(c.callback=r),r=vi(n,c,o),r!==null&&(yr(r,n,o),dl(r,n,o))}};function Qv(n,r,o,c,h,g,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,S):r.prototype&&r.prototype.isPureReactComponent?!rl(o,c)||!rl(h,g):!0}function Zv(n,r,o,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,c),r.state!==n&&Bh.enqueueReplaceState(r,r.state,null)}function xo(n,r){var o=r;if("ref"in r){o={};for(var c in r)c!=="ref"&&(o[c]=r[c])}if(n=n.defaultProps){o===r&&(o=v({},o));for(var h in n)o[h]===void 0&&(o[h]=n[h])}return o}function Jv(n){Yc(n)}function ex(n){console.error(n)}function tx(n){Yc(n)}function cu(n,r){try{var o=n.onUncaughtError;o(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function nx(n,r,o){try{var c=n.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Hh(n,r,o){return o=yi(o),o.tag=3,o.payload={element:null},o.callback=function(){cu(n,r)},o}function rx(n){return n=yi(n),n.tag=3,n}function ax(n,r,o,c){var h=o.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;n.payload=function(){return h(g)},n.callback=function(){nx(r,o,c)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(n.callback=function(){nx(r,o,c),typeof h!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})})}function BR(n,r,o,c,h){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=o.alternate,r!==null&&ts(r,o,h,!0),o=Tr.current,o!==null){switch(o.tag){case 31:case 13:return Gr===null?wu():o.alternate===null&&hn===0&&(hn=3),o.flags&=-257,o.flags|=65536,o.lanes=h,c===Xc?o.flags|=16384:(r=o.updateQueue,r===null?o.updateQueue=new Set([c]):r.add(c),hm(n,c,h)),!1;case 22:return o.flags|=65536,c===Xc?o.flags|=16384:(r=o.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=r):(o=r.retryQueue,o===null?r.retryQueue=new Set([c]):o.add(c)),hm(n,c,h)),!1}throw Error(i(435,o.tag))}return hm(n,c,h),wu(),!1}if(Rt)return r=Tr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==sh&&(n=Error(i(422),{cause:c}),ol(Br(n,o)))):(c!==sh&&(r=Error(i(423),{cause:c}),ol(Br(r,o))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,c=Br(c,o),h=Hh(n.stateNode,c,h),vh(n,h),hn!==4&&(hn=2)),!1;var g=Error(i(520),{cause:c});if(g=Br(g,o),Tl===null?Tl=[g]:Tl.push(g),hn!==4&&(hn=2),r===null)return!0;c=Br(c,o),o=r;do{switch(o.tag){case 3:return o.flags|=65536,n=h&-h,o.lanes|=n,n=Hh(o.stateNode,c,n),vh(o,n),!1;case 1:if(r=o.type,g=o.stateNode,(o.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ci===null||!Ci.has(g))))return o.flags|=65536,h&=-h,o.lanes|=h,h=rx(h),ax(h,n,o,c),vh(o,h),!1}o=o.return}while(o!==null);return!1}var Vh=Error(i(461)),An=!1;function Gn(n,r,o,c){r.child=n===null?lv(r,null,o,c):yo(r,n.child,o,c)}function ix(n,r,o,c,h){o=o.render;var g=r.ref;if("ref"in c){var S={};for(var D in c)D!=="ref"&&(S[D]=c[D])}else S=c;return ho(r),c=Ch(n,r,o,S,g,h),D=Th(),n!==null&&!An?(Rh(n,r,h),Ha(n,r,h)):(Rt&&D&&ih(r),r.flags|=1,Gn(n,r,c,h),r.child)}function ox(n,r,o,c,h){if(n===null){var g=o.type;return typeof g=="function"&&!nh(g)&&g.defaultProps===void 0&&o.compare===null?(r.tag=15,r.type=g,sx(n,r,g,c,h)):(n=Fc(o.type,null,c,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,!Qh(n,h)){var S=g.memoizedProps;if(o=o.compare,o=o!==null?o:rl,o(S,c)&&n.ref===r.ref)return Ha(n,r,h)}return r.flags|=1,n=Ia(g,c),n.ref=r.ref,n.return=r,r.child=n}function sx(n,r,o,c,h){if(n!==null){var g=n.memoizedProps;if(rl(g,c)&&n.ref===r.ref)if(An=!1,r.pendingProps=c=g,Qh(n,h))(n.flags&131072)!==0&&(An=!0);else return r.lanes=n.lanes,Ha(n,r,h)}return Fh(n,r,o,c,h)}function lx(n,r,o,c){var h=c.children,g=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(g=g!==null?g.baseLanes|o:o,n!==null){for(c=r.child=n.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~g}else c=0,r.child=null;return cx(n,r,g,o,c)}if((o&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Kc(r,g!==null?g.cachePool:null),g!==null?dv(r,g):bh(),fv(r);else return c=r.lanes=536870912,cx(n,r,g!==null?g.baseLanes|o:o,o,c)}else g!==null?(Kc(r,g.cachePool),dv(r,g),bi(),r.memoizedState=null):(n!==null&&Kc(r,null),bh(),bi());return Gn(n,r,h,o),r.child}function vl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function cx(n,r,o,c,h){var g=mh();return g=g===null?null:{parent:Rn._currentValue,pool:g},r.memoizedState={baseLanes:o,cachePool:g},n!==null&&Kc(r,null),bh(),fv(r),n!==null&&ts(n,r,c,!0),r.childLanes=h,null}function uu(n,r){return r=fu({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function ux(n,r,o){return yo(r,n.child,null,o),n=uu(r,r.pendingProps),n.flags|=2,Rr(r),r.memoizedState=null,n}function HR(n,r,o){var c=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Rt){if(c.mode==="hidden")return n=uu(r,c),r.lanes=536870912,vl(null,n);if(Sh(r),(n=tn)?(n=Sb(n,Fr),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:fi!==null?{id:pa,overflow:ga}:null,retryLane:536870912,hydrationErrors:null},o=Wy(n),o.return=r,r.child=o,Vn=r,tn=null)):n=null,n===null)throw mi(r);return r.lanes=536870912,null}return uu(r,c)}var g=n.memoizedState;if(g!==null){var S=g.dehydrated;if(Sh(r),h)if(r.flags&256)r.flags&=-257,r=ux(n,r,o);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(i(558));else if(An||ts(n,r,o,!1),h=(o&n.childLanes)!==0,An||h){if(c=Ft,c!==null&&(S=B(c,o),S!==0&&S!==g.retryLane))throw g.retryLane=S,lo(n,S),yr(c,n,S),Vh;wu(),r=ux(n,r,o)}else n=g.treeContext,tn=qr(S.nextSibling),Vn=r,Rt=!0,hi=null,Fr=!1,n!==null&&Xy(r,n),r=uu(r,c),r.flags|=4096;return r}return n=Ia(n.child,{mode:c.mode,children:c.children}),n.ref=r.ref,r.child=n,n.return=r,n}function du(n,r){var o=r.ref;if(o===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(r.flags|=4194816)}}function Fh(n,r,o,c,h){return ho(r),o=Ch(n,r,o,c,void 0,h),c=Th(),n!==null&&!An?(Rh(n,r,h),Ha(n,r,h)):(Rt&&c&&ih(r),r.flags|=1,Gn(n,r,o,h),r.child)}function dx(n,r,o,c,h,g){return ho(r),r.updateQueue=null,o=mv(r,c,o,h),hv(n),c=Th(),n!==null&&!An?(Rh(n,r,g),Ha(n,r,g)):(Rt&&c&&ih(r),r.flags|=1,Gn(n,r,o,g),r.child)}function fx(n,r,o,c,h){if(ho(r),r.stateNode===null){var g=Qo,S=o.contextType;typeof S=="object"&&S!==null&&(g=Fn(S)),g=new o(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Bh,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},gh(r),S=o.contextType,g.context=typeof S=="object"&&S!==null?Fn(S):Qo,g.state=r.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(Yh(r,o,S,c),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Bh.enqueueReplaceState(g,g.state,null),hl(r,c,g,h),fl(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(n===null){g=r.stateNode;var D=r.memoizedProps,U=xo(o,D);g.props=U;var W=g.context,ie=o.contextType;S=Qo,typeof ie=="object"&&ie!==null&&(S=Fn(ie));var le=o.getDerivedStateFromProps;ie=typeof le=="function"||typeof g.getSnapshotBeforeUpdate=="function",D=r.pendingProps!==D,ie||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(D||W!==S)&&Zv(r,g,c,S),gi=!1;var $=r.memoizedState;g.state=$,hl(r,c,g,h),fl(),W=r.memoizedState,D||$!==W||gi?(typeof le=="function"&&(Yh(r,o,le,c),W=r.memoizedState),(U=gi||Qv(r,o,U,c,$,W,S))?(ie||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=W),g.props=c,g.state=W,g.context=S,c=U):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,yh(n,r),S=r.memoizedProps,ie=xo(o,S),g.props=ie,le=r.pendingProps,$=g.context,W=o.contextType,U=Qo,typeof W=="object"&&W!==null&&(U=Fn(W)),D=o.getDerivedStateFromProps,(W=typeof D=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==le||$!==U)&&Zv(r,g,c,U),gi=!1,$=r.memoizedState,g.state=$,hl(r,c,g,h),fl();var J=r.memoizedState;S!==le||$!==J||gi||n!==null&&n.dependencies!==null&&qc(n.dependencies)?(typeof D=="function"&&(Yh(r,o,D,c),J=r.memoizedState),(ie=gi||Qv(r,o,ie,c,$,J,U)||n!==null&&n.dependencies!==null&&qc(n.dependencies))?(W||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,J,U),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,J,U)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=J),g.props=c,g.state=J,g.context=U,c=ie):(typeof g.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),c=!1)}return g=c,du(n,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,n!==null&&c?(r.child=yo(r,n.child,null,h),r.child=yo(r,null,o,h)):Gn(n,r,o,h),r.memoizedState=g.state,n=r.child):n=Ha(n,r,h),n}function hx(n,r,o,c){return uo(),r.flags|=256,Gn(n,r,o,c),r.child}var Gh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qh(n){return{baseLanes:n,cachePool:nv()}}function Wh(n,r,o){return n=n!==null?n.childLanes&~o:0,r&&(n|=Ar),n}function mx(n,r,o){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,S;if((S=g)||(S=n!==null&&n.memoizedState===null?!1:(bn.current&2)!==0),S&&(h=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,n===null){if(Rt){if(h?xi(r):bi(),(n=tn)?(n=Sb(n,Fr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:fi!==null?{id:pa,overflow:ga}:null,retryLane:536870912,hydrationErrors:null},o=Wy(n),o.return=r,r.child=o,Vn=r,tn=null)):n=null,n===null)throw mi(r);return Dm(n)?r.lanes=32:r.lanes=536870912,null}var D=c.children;return c=c.fallback,h?(bi(),h=r.mode,D=fu({mode:"hidden",children:D},h),c=co(c,h,o,null),D.return=r,c.return=r,D.sibling=c,r.child=D,c=r.child,c.memoizedState=qh(o),c.childLanes=Wh(n,S,o),r.memoizedState=Gh,vl(null,c)):(xi(r),Kh(r,D))}var U=n.memoizedState;if(U!==null&&(D=U.dehydrated,D!==null)){if(g)r.flags&256?(xi(r),r.flags&=-257,r=$h(n,r,o)):r.memoizedState!==null?(bi(),r.child=n.child,r.flags|=128,r=null):(bi(),D=c.fallback,h=r.mode,c=fu({mode:"visible",children:c.children},h),D=co(D,h,o,null),D.flags|=2,c.return=r,D.return=r,c.sibling=D,r.child=c,yo(r,n.child,null,o),c=r.child,c.memoizedState=qh(o),c.childLanes=Wh(n,S,o),r.memoizedState=Gh,r=vl(null,c));else if(xi(r),Dm(D)){if(S=D.nextSibling&&D.nextSibling.dataset,S)var W=S.dgst;S=W,c=Error(i(419)),c.stack="",c.digest=S,ol({value:c,source:null,stack:null}),r=$h(n,r,o)}else if(An||ts(n,r,o,!1),S=(o&n.childLanes)!==0,An||S){if(S=Ft,S!==null&&(c=B(S,o),c!==0&&c!==U.retryLane))throw U.retryLane=c,lo(n,c),yr(S,n,c),Vh;Am(D)||wu(),r=$h(n,r,o)}else Am(D)?(r.flags|=192,r.child=n.child,r=null):(n=U.treeContext,tn=qr(D.nextSibling),Vn=r,Rt=!0,hi=null,Fr=!1,n!==null&&Xy(r,n),r=Kh(r,c.children),r.flags|=4096);return r}return h?(bi(),D=c.fallback,h=r.mode,U=n.child,W=U.sibling,c=Ia(U,{mode:"hidden",children:c.children}),c.subtreeFlags=U.subtreeFlags&65011712,W!==null?D=Ia(W,D):(D=co(D,h,o,null),D.flags|=2),D.return=r,c.return=r,c.sibling=D,r.child=c,vl(null,c),c=r.child,D=n.child.memoizedState,D===null?D=qh(o):(h=D.cachePool,h!==null?(U=Rn._currentValue,h=h.parent!==U?{parent:U,pool:U}:h):h=nv(),D={baseLanes:D.baseLanes|o,cachePool:h}),c.memoizedState=D,c.childLanes=Wh(n,S,o),r.memoizedState=Gh,vl(n.child,c)):(xi(r),o=n.child,n=o.sibling,o=Ia(o,{mode:"visible",children:c.children}),o.return=r,o.sibling=null,n!==null&&(S=r.deletions,S===null?(r.deletions=[n],r.flags|=16):S.push(n)),r.child=o,r.memoizedState=null,o)}function Kh(n,r){return r=fu({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function fu(n,r){return n=Cr(22,n,null,r),n.lanes=0,n}function $h(n,r,o){return yo(r,n.child,null,o),n=Kh(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function px(n,r,o){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),uh(n.return,r,o)}function Xh(n,r,o,c,h,g){var S=n.memoizedState;S===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:h,treeForkCount:g}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=o,S.tailMode=h,S.treeForkCount=g)}function gx(n,r,o){var c=r.pendingProps,h=c.revealOrder,g=c.tail;c=c.children;var S=bn.current,D=(S&2)!==0;if(D?(S=S&1|2,r.flags|=128):S&=1,Q(bn,S),Gn(n,r,c,o),c=Rt?il:0,!D&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&px(n,o,r);else if(n.tag===19)px(n,o,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(o=r.child,h=null;o!==null;)n=o.alternate,n!==null&&eu(n)===null&&(h=o),o=o.sibling;o=h,o===null?(h=r.child,r.child=null):(h=o.sibling,o.sibling=null),Xh(r,!1,h,o,g,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&eu(n)===null){r.child=h;break}n=h.sibling,h.sibling=o,o=h,h=n}Xh(r,!0,o,null,g,c);break;case"together":Xh(r,!1,null,null,void 0,c);break;default:r.memoizedState=null}return r.child}function Ha(n,r,o){if(n!==null&&(r.dependencies=n.dependencies),Ei|=r.lanes,(o&r.childLanes)===0)if(n!==null){if(ts(n,r,o,!1),(o&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(i(153));if(r.child!==null){for(n=r.child,o=Ia(n,n.pendingProps),r.child=o,o.return=r;n.sibling!==null;)n=n.sibling,o=o.sibling=Ia(n,n.pendingProps),o.return=r;o.sibling=null}return r.child}function Qh(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&qc(n)))}function VR(n,r,o){switch(r.tag){case 3:ye(r,r.stateNode.containerInfo),pi(r,Rn,n.memoizedState.cache),uo();break;case 27:case 5:ve(r);break;case 4:ye(r,r.stateNode.containerInfo);break;case 10:pi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Sh(r),null;break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(xi(r),r.flags|=128,null):(o&r.child.childLanes)!==0?mx(n,r,o):(xi(r),n=Ha(n,r,o),n!==null?n.sibling:null);xi(r);break;case 19:var h=(n.flags&128)!==0;if(c=(o&r.childLanes)!==0,c||(ts(n,r,o,!1),c=(o&r.childLanes)!==0),h){if(c)return gx(n,r,o);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Q(bn,bn.current),c)break;return null;case 22:return r.lanes=0,lx(n,r,o,r.pendingProps);case 24:pi(r,Rn,n.memoizedState.cache)}return Ha(n,r,o)}function yx(n,r,o){if(n!==null)if(n.memoizedProps!==r.pendingProps)An=!0;else{if(!Qh(n,o)&&(r.flags&128)===0)return An=!1,VR(n,r,o);An=(n.flags&131072)!==0}else An=!1,Rt&&(r.flags&1048576)!==0&&$y(r,il,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(n=po(r.elementType),r.type=n,typeof n=="function")nh(n)?(c=xo(n,c),r.tag=1,r=fx(null,r,n,c,o)):(r.tag=0,r=Fh(null,r,n,c,o));else{if(n!=null){var h=n.$$typeof;if(h===j){r.tag=11,r=ix(null,r,n,c,o);break e}else if(h===A){r.tag=14,r=ox(null,r,n,c,o);break e}}throw r=ce(n)||n,Error(i(306,r,""))}}return r;case 0:return Fh(n,r,r.type,r.pendingProps,o);case 1:return c=r.type,h=xo(c,r.pendingProps),fx(n,r,c,h,o);case 3:e:{if(ye(r,r.stateNode.containerInfo),n===null)throw Error(i(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,yh(n,r),hl(r,c,null,o);var S=r.memoizedState;if(c=S.cache,pi(r,Rn,c),c!==g.cache&&dh(r,[Rn],o,!0),fl(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=hx(n,r,c,o);break e}else if(c!==h){h=Br(Error(i(424)),r),ol(h),r=hx(n,r,c,o);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,tn=qr(n.firstChild),Vn=r,Rt=!0,hi=null,Fr=!0,o=lv(r,null,c,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(uo(),c===h){r=Ha(n,r,o);break e}Gn(n,r,c,o)}r=r.child}return r;case 26:return du(n,r),n===null?(o=Ab(r.type,null,r.pendingProps,null))?r.memoizedState=o:Rt||(o=r.type,n=r.pendingProps,c=Au(we.current).createElement(o),c[Se]=r,c[Ce]=n,qn(c,o,n),Wt(c),r.stateNode=c):r.memoizedState=Ab(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return ve(r),n===null&&Rt&&(c=r.stateNode=Tb(r.type,r.pendingProps,we.current),Vn=r,Fr=!0,h=tn,Ai(r.type)?(Om=h,tn=qr(c.firstChild)):tn=h),Gn(n,r,r.pendingProps.children,o),du(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Rt&&((h=c=tn)&&(c=xN(c,r.type,r.pendingProps,Fr),c!==null?(r.stateNode=c,Vn=r,tn=qr(c.firstChild),Fr=!1,h=!0):h=!1),h||mi(r)),ve(r),h=r.type,g=r.pendingProps,S=n!==null?n.memoizedProps:null,c=g.children,Tm(h,g)?c=null:S!==null&&Tm(h,S)&&(r.flags|=32),r.memoizedState!==null&&(h=Ch(n,r,kR,null,null,o),_l._currentValue=h),du(n,r),Gn(n,r,c,o),r.child;case 6:return n===null&&Rt&&((n=o=tn)&&(o=bN(o,r.pendingProps,Fr),o!==null?(r.stateNode=o,Vn=r,tn=null,n=!0):n=!1),n||mi(r)),null;case 13:return mx(n,r,o);case 4:return ye(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=yo(r,null,c,o):Gn(n,r,c,o),r.child;case 11:return ix(n,r,r.type,r.pendingProps,o);case 7:return Gn(n,r,r.pendingProps,o),r.child;case 8:return Gn(n,r,r.pendingProps.children,o),r.child;case 12:return Gn(n,r,r.pendingProps.children,o),r.child;case 10:return c=r.pendingProps,pi(r,r.type,c.value),Gn(n,r,c.children,o),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,ho(r),h=Fn(h),c=c(h),r.flags|=1,Gn(n,r,c,o),r.child;case 14:return ox(n,r,r.type,r.pendingProps,o);case 15:return sx(n,r,r.type,r.pendingProps,o);case 19:return gx(n,r,o);case 31:return HR(n,r,o);case 22:return lx(n,r,o,r.pendingProps);case 24:return ho(r),c=Fn(Rn),n===null?(h=mh(),h===null&&(h=Ft,g=fh(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=o),h=g),r.memoizedState={parent:c,cache:h},gh(r),pi(r,Rn,h)):((n.lanes&o)!==0&&(yh(n,r),hl(r,null,null,o),fl()),h=n.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),pi(r,Rn,c)):(c=g.cache,pi(r,Rn,c),c!==h.cache&&dh(r,[Rn],o,!0))),Gn(n,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Va(n){n.flags|=4}function Zh(n,r,o,c,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Fx())n.flags|=8192;else throw go=Xc,ph}else n.flags&=-16777217}function vx(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!_b(r))if(Fx())n.flags|=8192;else throw go=Xc,ph}function hu(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Pr():536870912,n.lanes|=r,hs|=r)}function xl(n,r){if(!Rt)switch(n.tailMode){case"hidden":r=n.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function nn(n){var r=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(r)for(var h=n.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=o,r}function FR(n,r,o){var c=r.pendingProps;switch(oh(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(r),null;case 1:return nn(r),null;case 3:return o=r.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Pa(Rn),Fe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(es(r)?Va(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,lh())),nn(r),null;case 26:var h=r.type,g=r.memoizedState;return n===null?(Va(r),g!==null?(nn(r),vx(r,g)):(nn(r),Zh(r,h,null,c,o))):g?g!==n.memoizedState?(Va(r),nn(r),vx(r,g)):(nn(r),r.flags&=-16777217):(n=n.memoizedProps,n!==c&&Va(r),nn(r),Zh(r,h,n,c,o)),null;case 27:if(te(r),o=we.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Va(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return nn(r),null}n=ee.current,es(r)?Qy(r):(n=Tb(h,c,o),r.stateNode=n,Va(r))}return nn(r),null;case 5:if(te(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Va(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return nn(r),null}if(g=ee.current,es(r))Qy(r);else{var S=Au(we.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?S.createElement(h,{is:c.is}):S.createElement(h)}}g[Se]=r,g[Ce]=c;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=g;e:switch(qn(g,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Va(r)}}return nn(r),Zh(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,o),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==c&&Va(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(i(166));if(n=we.current,es(r)){if(n=r.stateNode,o=r.memoizedProps,c=null,h=Vn,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}n[Se]=r,n=!!(n.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||mb(n.nodeValue,o)),n||mi(r,!0)}else n=Au(n).createTextNode(c),n[Se]=r,r.stateNode=n}return nn(r),null;case 31:if(o=r.memoizedState,n===null||n.memoizedState!==null){if(c=es(r),o!==null){if(n===null){if(!c)throw Error(i(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Se]=r}else uo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;nn(r),n=!1}else o=lh(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return r.flags&256?(Rr(r),r):(Rr(r),null);if((r.flags&128)!==0)throw Error(i(558))}return nn(r),null;case 13:if(c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=es(r),c!==null&&c.dehydrated!==null){if(n===null){if(!h)throw Error(i(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[Se]=r}else uo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;nn(r),h=!1}else h=lh(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Rr(r),r):(Rr(r),null)}return Rr(r),(r.flags&128)!==0?(r.lanes=o,r):(o=c!==null,n=n!==null&&n.memoizedState!==null,o&&(c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)),o!==n&&o&&(r.child.flags|=8192),hu(r,r.updateQueue),nn(r),null);case 4:return Fe(),n===null&&bm(r.stateNode.containerInfo),nn(r),null;case 10:return Pa(r.type),nn(r),null;case 19:if(V(bn),c=r.memoizedState,c===null)return nn(r),null;if(h=(r.flags&128)!==0,g=c.rendering,g===null)if(h)xl(c,!1);else{if(hn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=eu(n),g!==null){for(r.flags|=128,xl(c,!1),n=g.updateQueue,r.updateQueue=n,hu(r,n),r.subtreeFlags=0,n=o,o=r.child;o!==null;)qy(o,n),o=o.sibling;return Q(bn,bn.current&1|2),Rt&&za(r,c.treeForkCount),r.child}n=n.sibling}c.tail!==null&&Ne()>vu&&(r.flags|=128,h=!0,xl(c,!1),r.lanes=4194304)}else{if(!h)if(n=eu(g),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,hu(r,n),xl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Rt)return nn(r),null}else 2*Ne()-c.renderingStartTime>vu&&o!==536870912&&(r.flags|=128,h=!0,xl(c,!1),r.lanes=4194304);c.isBackwards?(g.sibling=r.child,r.child=g):(n=c.last,n!==null?n.sibling=g:r.child=g,c.last=g)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Ne(),n.sibling=null,o=bn.current,Q(bn,h?o&1|2:o&1),Rt&&za(r,c.treeForkCount),n):(nn(r),null);case 22:case 23:return Rr(r),wh(),c=r.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(o&536870912)!==0&&(r.flags&128)===0&&(nn(r),r.subtreeFlags&6&&(r.flags|=8192)):nn(r),o=r.updateQueue,o!==null&&hu(r,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==o&&(r.flags|=2048),n!==null&&V(mo),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Pa(Rn),nn(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function GR(n,r){switch(oh(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Pa(Rn),Fe(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return te(r),null;case 31:if(r.memoizedState!==null){if(Rr(r),r.alternate===null)throw Error(i(340));uo()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Rr(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(i(340));uo()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return V(bn),null;case 4:return Fe(),null;case 10:return Pa(r.type),null;case 22:case 23:return Rr(r),wh(),n!==null&&V(mo),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Pa(Rn),null;case 25:return null;default:return null}}function xx(n,r){switch(oh(r),r.tag){case 3:Pa(Rn),Fe();break;case 26:case 27:case 5:te(r);break;case 4:Fe();break;case 31:r.memoizedState!==null&&Rr(r);break;case 13:Rr(r);break;case 19:V(bn);break;case 10:Pa(r.type);break;case 22:case 23:Rr(r),wh(),n!==null&&V(mo);break;case 24:Pa(Rn)}}function bl(n,r){try{var o=r.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var h=c.next;o=h;do{if((o.tag&n)===n){c=void 0;var g=o.create,S=o.inst;c=g(),S.destroy=c}o=o.next}while(o!==h)}}catch(D){zt(r,r.return,D)}}function wi(n,r,o){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&n)===n){var S=c.inst,D=S.destroy;if(D!==void 0){S.destroy=void 0,h=r;var U=o,W=D;try{W()}catch(ie){zt(h,U,ie)}}}c=c.next}while(c!==g)}}catch(ie){zt(r,r.return,ie)}}function bx(n){var r=n.updateQueue;if(r!==null){var o=n.stateNode;try{uv(r,o)}catch(c){zt(n,n.return,c)}}}function wx(n,r,o){o.props=xo(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(c){zt(n,r,c)}}function wl(n,r){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof o=="function"?n.refCleanup=o(c):o.current=c}}catch(h){zt(n,r,h)}}function ya(n,r){var o=n.ref,c=n.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(h){zt(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(h){zt(n,r,h)}else o.current=null}function Sx(n){var r=n.type,o=n.memoizedProps,c=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(h){zt(n,n.return,h)}}function Jh(n,r,o){try{var c=n.stateNode;hN(c,n.type,o,r),c[Ce]=r}catch(h){zt(n,n.return,h)}}function Ex(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ai(n.type)||n.tag===4}function em(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ex(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function tm(n,r,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,r):(r=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,r.appendChild(n),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=na));else if(c!==4&&(c===27&&Ai(n.type)&&(o=n.stateNode,r=null),n=n.child,n!==null))for(tm(n,r,o),n=n.sibling;n!==null;)tm(n,r,o),n=n.sibling}function mu(n,r,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?o.insertBefore(n,r):o.appendChild(n);else if(c!==4&&(c===27&&Ai(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(mu(n,r,o),n=n.sibling;n!==null;)mu(n,r,o),n=n.sibling}function Cx(n){var r=n.stateNode,o=n.memoizedProps;try{for(var c=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);qn(r,c,o),r[Se]=n,r[Ce]=o}catch(g){zt(n,n.return,g)}}var Fa=!1,Dn=!1,nm=!1,Tx=typeof WeakSet=="function"?WeakSet:Set,Un=null;function qR(n,r){if(n=n.containerInfo,Em=Lu,n=zy(n),$f(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{o.nodeType,g.nodeType}catch{o=null;break e}var S=0,D=-1,U=-1,W=0,ie=0,le=n,$=null;t:for(;;){for(var J;le!==o||h!==0&&le.nodeType!==3||(D=S+h),le!==g||c!==0&&le.nodeType!==3||(U=S+c),le.nodeType===3&&(S+=le.nodeValue.length),(J=le.firstChild)!==null;)$=le,le=J;for(;;){if(le===n)break t;if($===o&&++W===h&&(D=S),$===g&&++ie===c&&(U=S),(J=le.nextSibling)!==null)break;le=$,$=le.parentNode}le=J}o=D===-1||U===-1?null:{start:D,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(Cm={focusedElem:n,selectionRange:o},Lu=!1,Un=r;Un!==null;)if(r=Un,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Un=n;else for(;Un!==null;){switch(r=Un,g=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)h=n[o],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,o=r,h=g.memoizedProps,g=g.memoizedState,c=o.stateNode;try{var Ie=xo(o.type,h);n=c.getSnapshotBeforeUpdate(Ie,g),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ze){zt(o,o.return,Ze)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,o=n.nodeType,o===9)Nm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Nm(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=r.sibling,n!==null){n.return=r.return,Un=n;break}Un=r.return}}function Rx(n,r,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:qa(n,o),c&4&&bl(5,o);break;case 1:if(qa(n,o),c&4)if(n=o.stateNode,r===null)try{n.componentDidMount()}catch(S){zt(o,o.return,S)}else{var h=xo(o.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(S){zt(o,o.return,S)}}c&64&&bx(o),c&512&&wl(o,o.return);break;case 3:if(qa(n,o),c&64&&(n=o.updateQueue,n!==null)){if(r=null,o.child!==null)switch(o.child.tag){case 27:case 5:r=o.child.stateNode;break;case 1:r=o.child.stateNode}try{uv(n,r)}catch(S){zt(o,o.return,S)}}break;case 27:r===null&&c&4&&Cx(o);case 26:case 5:qa(n,o),r===null&&c&4&&Sx(o),c&512&&wl(o,o.return);break;case 12:qa(n,o);break;case 31:qa(n,o),c&4&&Dx(n,o);break;case 13:qa(n,o),c&4&&Ox(n,o),c&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=tN.bind(null,o),wN(n,o))));break;case 22:if(c=o.memoizedState!==null||Fa,!c){r=r!==null&&r.memoizedState!==null||Dn,h=Fa;var g=Dn;Fa=c,(Dn=r)&&!g?Wa(n,o,(o.subtreeFlags&8772)!==0):qa(n,o),Fa=h,Dn=g}break;case 30:break;default:qa(n,o)}}function Nx(n){var r=n.alternate;r!==null&&(n.alternate=null,Nx(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&qt(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var on=null,hr=!1;function Ga(n,r,o){for(o=o.child;o!==null;)Ax(n,r,o),o=o.sibling}function Ax(n,r,o){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(jt,o)}catch{}switch(o.tag){case 26:Dn||ya(o,r),Ga(n,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Dn||ya(o,r);var c=on,h=hr;Ai(o.type)&&(on=o.stateNode,hr=!1),Ga(n,r,o),Ol(o.stateNode),on=c,hr=h;break;case 5:Dn||ya(o,r);case 6:if(c=on,h=hr,on=null,Ga(n,r,o),on=c,hr=h,on!==null)if(hr)try{(on.nodeType===9?on.body:on.nodeName==="HTML"?on.ownerDocument.body:on).removeChild(o.stateNode)}catch(g){zt(o,r,g)}else try{on.removeChild(o.stateNode)}catch(g){zt(o,r,g)}break;case 18:on!==null&&(hr?(n=on,bb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),ws(n)):bb(on,o.stateNode));break;case 4:c=on,h=hr,on=o.stateNode.containerInfo,hr=!0,Ga(n,r,o),on=c,hr=h;break;case 0:case 11:case 14:case 15:wi(2,o,r),Dn||wi(4,o,r),Ga(n,r,o);break;case 1:Dn||(ya(o,r),c=o.stateNode,typeof c.componentWillUnmount=="function"&&wx(o,r,c)),Ga(n,r,o);break;case 21:Ga(n,r,o);break;case 22:Dn=(c=Dn)||o.memoizedState!==null,Ga(n,r,o),Dn=c;break;default:Ga(n,r,o)}}function Dx(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ws(n)}catch(o){zt(r,r.return,o)}}}function Ox(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ws(n)}catch(o){zt(r,r.return,o)}}function WR(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Tx),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Tx),r;default:throw Error(i(435,n.tag))}}function pu(n,r){var o=WR(n);r.forEach(function(c){if(!o.has(c)){o.add(c);var h=nN.bind(null,n,c);c.then(h,h)}})}function mr(n,r){var o=r.deletions;if(o!==null)for(var c=0;c<o.length;c++){var h=o[c],g=n,S=r,D=S;e:for(;D!==null;){switch(D.tag){case 27:if(Ai(D.type)){on=D.stateNode,hr=!1;break e}break;case 5:on=D.stateNode,hr=!1;break e;case 3:case 4:on=D.stateNode.containerInfo,hr=!0;break e}D=D.return}if(on===null)throw Error(i(160));Ax(g,S,h),on=null,hr=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)jx(r,n),r=r.sibling}var aa=null;function jx(n,r){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:mr(r,n),pr(n),c&4&&(wi(3,n,n.return),bl(3,n),wi(5,n,n.return));break;case 1:mr(r,n),pr(n),c&512&&(Dn||o===null||ya(o,o.return)),c&64&&Fa&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var h=aa;if(mr(r,n),pr(n),c&512&&(Dn||o===null||ya(o,o.return)),c&4){var g=o!==null?o.memoizedState:null;if(c=n.memoizedState,o===null)if(c===null)if(n.stateNode===null){e:{c=n.type,o=n.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Jt]||g[Se]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),qn(g,c,o),g[Se]=n,Wt(g),c=g;break e;case"link":var S=jb("link","href",h).get(c+(o.href||""));if(S){for(var D=0;D<S.length;D++)if(g=S[D],g.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&g.getAttribute("rel")===(o.rel==null?null:o.rel)&&g.getAttribute("title")===(o.title==null?null:o.title)&&g.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(D,1);break t}}g=h.createElement(c),qn(g,c,o),h.head.appendChild(g);break;case"meta":if(S=jb("meta","content",h).get(c+(o.content||""))){for(D=0;D<S.length;D++)if(g=S[D],g.getAttribute("content")===(o.content==null?null:""+o.content)&&g.getAttribute("name")===(o.name==null?null:o.name)&&g.getAttribute("property")===(o.property==null?null:o.property)&&g.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&g.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(D,1);break t}}g=h.createElement(c),qn(g,c,o),h.head.appendChild(g);break;default:throw Error(i(468,c))}g[Se]=n,Wt(g),c=g}n.stateNode=c}else Mb(h,n.type,n.stateNode);else n.stateNode=Ob(h,c,n.memoizedProps);else g!==c?(g===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):g.count--,c===null?Mb(h,n.type,n.stateNode):Ob(h,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Jh(n,n.memoizedProps,o.memoizedProps)}break;case 27:mr(r,n),pr(n),c&512&&(Dn||o===null||ya(o,o.return)),o!==null&&c&4&&Jh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(mr(r,n),pr(n),c&512&&(Dn||o===null||ya(o,o.return)),n.flags&32){h=n.stateNode;try{Ge(h,"")}catch(Ie){zt(n,n.return,Ie)}}c&4&&n.stateNode!=null&&(h=n.memoizedProps,Jh(n,h,o!==null?o.memoizedProps:h)),c&1024&&(nm=!0);break;case 6:if(mr(r,n),pr(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,o=n.stateNode;try{o.nodeValue=c}catch(Ie){zt(n,n.return,Ie)}}break;case 3:if(ju=null,h=aa,aa=Du(r.containerInfo),mr(r,n),aa=h,pr(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{ws(r.containerInfo)}catch(Ie){zt(n,n.return,Ie)}nm&&(nm=!1,Mx(n));break;case 4:c=aa,aa=Du(n.stateNode.containerInfo),mr(r,n),pr(n),aa=c;break;case 12:mr(r,n),pr(n);break;case 31:mr(r,n),pr(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,pu(n,c)));break;case 13:mr(r,n),pr(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(yu=Ne()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,pu(n,c)));break;case 22:h=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,W=Fa,ie=Dn;if(Fa=W||h,Dn=ie||U,mr(r,n),Dn=ie,Fa=W,pr(n),c&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(o===null||U||Fa||Dn||bo(n)),o=null,r=n;;){if(r.tag===5||r.tag===26){if(o===null){U=o=r;try{if(g=U.stateNode,h)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{D=U.stateNode;var le=U.memoizedProps.style,$=le!=null&&le.hasOwnProperty("display")?le.display:null;D.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(Ie){zt(U,U.return,Ie)}}}else if(r.tag===6){if(o===null){U=r;try{U.stateNode.nodeValue=h?"":U.memoizedProps}catch(Ie){zt(U,U.return,Ie)}}}else if(r.tag===18){if(o===null){U=r;try{var J=U.stateNode;h?wb(J,!0):wb(U.stateNode,!1)}catch(Ie){zt(U,U.return,Ie)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;o===r&&(o=null),r=r.return}o===r&&(o=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=n.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,pu(n,o))));break;case 19:mr(r,n),pr(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,pu(n,c)));break;case 30:break;case 21:break;default:mr(r,n),pr(n)}}function pr(n){var r=n.flags;if(r&2){try{for(var o,c=n.return;c!==null;){if(Ex(c)){o=c;break}c=c.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var h=o.stateNode,g=em(n);mu(n,g,h);break;case 5:var S=o.stateNode;o.flags&32&&(Ge(S,""),o.flags&=-33);var D=em(n);mu(n,D,S);break;case 3:case 4:var U=o.stateNode.containerInfo,W=em(n);tm(n,W,U);break;default:throw Error(i(161))}}catch(ie){zt(n,n.return,ie)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Mx(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Mx(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function qa(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Rx(n,r.alternate,r),r=r.sibling}function bo(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:wi(4,r,r.return),bo(r);break;case 1:ya(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&wx(r,r.return,o),bo(r);break;case 27:Ol(r.stateNode);case 26:case 5:ya(r,r.return),bo(r);break;case 22:r.memoizedState===null&&bo(r);break;case 30:bo(r);break;default:bo(r)}n=n.sibling}}function Wa(n,r,o){for(o=o&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=n,g=r,S=g.flags;switch(g.tag){case 0:case 11:case 15:Wa(h,g,o),bl(4,g);break;case 1:if(Wa(h,g,o),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(W){zt(c,c.return,W)}if(c=g,h=c.updateQueue,h!==null){var D=c.stateNode;try{var U=h.shared.hiddenCallbacks;if(U!==null)for(h.shared.hiddenCallbacks=null,h=0;h<U.length;h++)cv(U[h],D)}catch(W){zt(c,c.return,W)}}o&&S&64&&bx(g),wl(g,g.return);break;case 27:Cx(g);case 26:case 5:Wa(h,g,o),o&&c===null&&S&4&&Sx(g),wl(g,g.return);break;case 12:Wa(h,g,o);break;case 31:Wa(h,g,o),o&&S&4&&Dx(h,g);break;case 13:Wa(h,g,o),o&&S&4&&Ox(h,g);break;case 22:g.memoizedState===null&&Wa(h,g,o),wl(g,g.return);break;case 30:break;default:Wa(h,g,o)}r=r.sibling}}function rm(n,r){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&sl(o))}function am(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&sl(n))}function ia(n,r,o,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_x(n,r,o,c),r=r.sibling}function _x(n,r,o,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:ia(n,r,o,c),h&2048&&bl(9,r);break;case 1:ia(n,r,o,c);break;case 3:ia(n,r,o,c),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&sl(n)));break;case 12:if(h&2048){ia(n,r,o,c),n=r.stateNode;try{var g=r.memoizedProps,S=g.id,D=g.onPostCommit;typeof D=="function"&&D(S,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){zt(r,r.return,U)}}else ia(n,r,o,c);break;case 31:ia(n,r,o,c);break;case 13:ia(n,r,o,c);break;case 23:break;case 22:g=r.stateNode,S=r.alternate,r.memoizedState!==null?g._visibility&2?ia(n,r,o,c):Sl(n,r):g._visibility&2?ia(n,r,o,c):(g._visibility|=2,us(n,r,o,c,(r.subtreeFlags&10256)!==0||!1)),h&2048&&rm(S,r);break;case 24:ia(n,r,o,c),h&2048&&am(r.alternate,r);break;default:ia(n,r,o,c)}}function us(n,r,o,c,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var g=n,S=r,D=o,U=c,W=S.flags;switch(S.tag){case 0:case 11:case 15:us(g,S,D,U,h),bl(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?us(g,S,D,U,h):Sl(g,S):(ie._visibility|=2,us(g,S,D,U,h)),h&&W&2048&&rm(S.alternate,S);break;case 24:us(g,S,D,U,h),h&&W&2048&&am(S.alternate,S);break;default:us(g,S,D,U,h)}r=r.sibling}}function Sl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var o=n,c=r,h=c.flags;switch(c.tag){case 22:Sl(o,c),h&2048&&rm(c.alternate,c);break;case 24:Sl(o,c),h&2048&&am(c.alternate,c);break;default:Sl(o,c)}r=r.sibling}}var El=8192;function ds(n,r,o){if(n.subtreeFlags&El)for(n=n.child;n!==null;)kx(n,r,o),n=n.sibling}function kx(n,r,o){switch(n.tag){case 26:ds(n,r,o),n.flags&El&&n.memoizedState!==null&&_N(o,aa,n.memoizedState,n.memoizedProps);break;case 5:ds(n,r,o);break;case 3:case 4:var c=aa;aa=Du(n.stateNode.containerInfo),ds(n,r,o),aa=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=El,El=16777216,ds(n,r,o),El=c):ds(n,r,o));break;default:ds(n,r,o)}}function Lx(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Cl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var c=r[o];Un=c,zx(c,n)}Lx(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ix(n),n=n.sibling}function Ix(n){switch(n.tag){case 0:case 11:case 15:Cl(n),n.flags&2048&&wi(9,n,n.return);break;case 3:Cl(n);break;case 12:Cl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,gu(n)):Cl(n);break;default:Cl(n)}}function gu(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var c=r[o];Un=c,zx(c,n)}Lx(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:wi(8,r,r.return),gu(r);break;case 22:o=r.stateNode,o._visibility&2&&(o._visibility&=-3,gu(r));break;default:gu(r)}n=n.sibling}}function zx(n,r){for(;Un!==null;){var o=Un;switch(o.tag){case 0:case 11:case 15:wi(8,o,r);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:sl(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,Un=c;else e:for(o=n;Un!==null;){c=Un;var h=c.sibling,g=c.return;if(Nx(c),c===o){Un=null;break e}if(h!==null){h.return=g,Un=h;break e}Un=g}}}var KR={getCacheForType:function(n){var r=Fn(Rn),o=r.data.get(n);return o===void 0&&(o=n(),r.data.set(n,o)),o},cacheSignal:function(){return Fn(Rn).controller.signal}},$R=typeof WeakMap=="function"?WeakMap:Map,_t=0,Ft=null,bt=null,Et=0,It=0,Nr=null,Si=!1,fs=!1,im=!1,Ka=0,hn=0,Ei=0,wo=0,om=0,Ar=0,hs=0,Tl=null,gr=null,sm=!1,yu=0,Ux=0,vu=1/0,xu=null,Ci=null,Ln=0,Ti=null,ms=null,$a=0,lm=0,cm=null,Px=null,Rl=0,um=null;function Dr(){return(_t&2)!==0&&Et!==0?Et&-Et:k.T!==null?gm():ge()}function Yx(){if(Ar===0)if((Et&536870912)===0||Rt){var n=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),Ar=n}else Ar=536870912;return n=Tr.current,n!==null&&(n.flags|=32),Ar}function yr(n,r,o){(n===Ft&&(It===2||It===9)||n.cancelPendingCommit!==null)&&(ps(n,0),Ri(n,Et,Ar,!1)),$n(n,o),((_t&2)===0||n!==Ft)&&(n===Ft&&((_t&2)===0&&(wo|=o),hn===4&&Ri(n,Et,Ar,!1)),va(n))}function Bx(n,r,o){if((_t&6)!==0)throw Error(i(327));var c=!o&&(r&127)===0&&(r&n.expiredLanes)===0||Sr(n,r),h=c?ZR(n,r):fm(n,r,!0),g=c;do{if(h===0){fs&&!c&&Ri(n,r,0,!1);break}else{if(o=n.current.alternate,g&&!XR(o)){h=fm(n,r,!1),g=!1;continue}if(h===2){if(g=r,n.errorRecoveryDisabledLanes&g)var S=0;else S=n.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var D=n;h=Tl;var U=D.current.memoizedState.isDehydrated;if(U&&(ps(D,S).flags|=256),S=fm(D,S,!1),S!==2){if(im&&!U){D.errorRecoveryDisabledLanes|=g,wo|=g,h=4;break e}g=gr,gr=h,g!==null&&(gr===null?gr=g:gr.push.apply(gr,g))}h=S}if(g=!1,h!==2)continue}}if(h===1){ps(n,0),Ri(n,r,0,!0);break}e:{switch(c=n,g=h,g){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:Ri(c,r,Ar,!Si);break e;case 2:gr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(h=yu+300-Ne(),10<h)){if(Ri(c,r,Ar,!Si),nr(c,0,!0)!==0)break e;$a=r,c.timeoutHandle=vb(Hx.bind(null,c,o,gr,xu,sm,r,Ar,wo,hs,Si,g,"Throttled",-0,0),h);break e}Hx(c,o,gr,xu,sm,r,Ar,wo,hs,Si,g,null,-0,0)}}break}while(!0);va(n)}function Hx(n,r,o,c,h,g,S,D,U,W,ie,le,$,J){if(n.timeoutHandle=-1,le=r.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:na},kx(r,g,le);var Ie=(g&62914560)===g?yu-Ne():(g&4194048)===g?Ux-Ne():0;if(Ie=kN(le,Ie),Ie!==null){$a=g,n.cancelPendingCommit=Ie(Xx.bind(null,n,r,g,o,c,h,S,D,U,ie,le,null,$,J)),Ri(n,g,S,!W);return}}Xx(n,r,g,o,c,h,S,D,U)}function XR(n){for(var r=n;;){var o=r.tag;if((o===0||o===11||o===15)&&r.flags&16384&&(o=r.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var c=0;c<o.length;c++){var h=o[c],g=h.getSnapshot;h=h.value;try{if(!Er(g(),h))return!1}catch{return!1}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ri(n,r,o,c){r&=~om,r&=~wo,n.suspendedLanes|=r,n.pingedLanes&=~r,c&&(n.warmLanes|=r),c=n.expirationTimes;for(var h=r;0<h;){var g=31-rn(h),S=1<<g;c[g]=-1,h&=~S}o!==0&&Je(n,o,r)}function bu(){return(_t&6)===0?(Nl(0),!1):!0}function dm(){if(bt!==null){if(It===0)var n=bt.return;else n=bt,Ua=fo=null,Nh(n),is=null,cl=0,n=bt;for(;n!==null;)xx(n.alternate,n),n=n.return;bt=null}}function ps(n,r){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,gN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),$a=0,dm(),Ft=n,bt=o=Ia(n.current,null),Et=r,It=0,Nr=null,Si=!1,fs=Sr(n,r),im=!1,hs=Ar=om=wo=Ei=hn=0,gr=Tl=null,sm=!1,(r&8)!==0&&(r|=r&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=r;0<c;){var h=31-rn(c),g=1<<h;r|=n[h],c&=~g}return Ka=r,Bc(),o}function Vx(n,r){lt=null,k.H=yl,r===as||r===$c?(r=iv(),It=3):r===ph?(r=iv(),It=4):It=r===Vh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Nr=r,bt===null&&(hn=1,cu(n,Br(r,n.current)))}function Fx(){var n=Tr.current;return n===null?!0:(Et&4194048)===Et?Gr===null:(Et&62914560)===Et||(Et&536870912)!==0?n===Gr:!1}function Gx(){var n=k.H;return k.H=yl,n===null?yl:n}function qx(){var n=k.A;return k.A=KR,n}function wu(){hn=4,Si||(Et&4194048)!==Et&&Tr.current!==null||(fs=!0),(Ei&134217727)===0&&(wo&134217727)===0||Ft===null||Ri(Ft,Et,Ar,!1)}function fm(n,r,o){var c=_t;_t|=2;var h=Gx(),g=qx();(Ft!==n||Et!==r)&&(xu=null,ps(n,r)),r=!1;var S=hn;e:do try{if(It!==0&&bt!==null){var D=bt,U=Nr;switch(It){case 8:dm(),S=6;break e;case 3:case 2:case 9:case 6:Tr.current===null&&(r=!0);var W=It;if(It=0,Nr=null,gs(n,D,U,W),o&&fs){S=0;break e}break;default:W=It,It=0,Nr=null,gs(n,D,U,W)}}QR(),S=hn;break}catch(ie){Vx(n,ie)}while(!0);return r&&n.shellSuspendCounter++,Ua=fo=null,_t=c,k.H=h,k.A=g,bt===null&&(Ft=null,Et=0,Bc()),S}function QR(){for(;bt!==null;)Wx(bt)}function ZR(n,r){var o=_t;_t|=2;var c=Gx(),h=qx();Ft!==n||Et!==r?(xu=null,vu=Ne()+500,ps(n,r)):fs=Sr(n,r);e:do try{if(It!==0&&bt!==null){r=bt;var g=Nr;t:switch(It){case 1:It=0,Nr=null,gs(n,r,g,1);break;case 2:case 9:if(rv(g)){It=0,Nr=null,Kx(r);break}r=function(){It!==2&&It!==9||Ft!==n||(It=7),va(n)},g.then(r,r);break e;case 3:It=7;break e;case 4:It=5;break e;case 7:rv(g)?(It=0,Nr=null,Kx(r)):(It=0,Nr=null,gs(n,r,g,7));break;case 5:var S=null;switch(bt.tag){case 26:S=bt.memoizedState;case 5:case 27:var D=bt;if(S?_b(S):D.stateNode.complete){It=0,Nr=null;var U=D.sibling;if(U!==null)bt=U;else{var W=D.return;W!==null?(bt=W,Su(W)):bt=null}break t}}It=0,Nr=null,gs(n,r,g,5);break;case 6:It=0,Nr=null,gs(n,r,g,6);break;case 8:dm(),hn=6;break e;default:throw Error(i(462))}}JR();break}catch(ie){Vx(n,ie)}while(!0);return Ua=fo=null,k.H=c,k.A=h,_t=o,bt!==null?0:(Ft=null,Et=0,Bc(),hn)}function JR(){for(;bt!==null&&!qe();)Wx(bt)}function Wx(n){var r=yx(n.alternate,n,Ka);n.memoizedProps=n.pendingProps,r===null?Su(n):bt=r}function Kx(n){var r=n,o=r.alternate;switch(r.tag){case 15:case 0:r=dx(o,r,r.pendingProps,r.type,void 0,Et);break;case 11:r=dx(o,r,r.pendingProps,r.type.render,r.ref,Et);break;case 5:Nh(r);default:xx(o,r),r=bt=qy(r,Ka),r=yx(o,r,Ka)}n.memoizedProps=n.pendingProps,r===null?Su(n):bt=r}function gs(n,r,o,c){Ua=fo=null,Nh(r),is=null,cl=0;var h=r.return;try{if(BR(n,h,r,o,Et)){hn=1,cu(n,Br(o,n.current)),bt=null;return}}catch(g){if(h!==null)throw bt=h,g;hn=1,cu(n,Br(o,n.current)),bt=null;return}r.flags&32768?(Rt||c===1?n=!0:fs||(Et&536870912)!==0?n=!1:(Si=n=!0,(c===2||c===9||c===3||c===6)&&(c=Tr.current,c!==null&&c.tag===13&&(c.flags|=16384))),$x(r,n)):Su(r)}function Su(n){var r=n;do{if((r.flags&32768)!==0){$x(r,Si);return}n=r.return;var o=FR(r.alternate,r,Ka);if(o!==null){bt=o;return}if(r=r.sibling,r!==null){bt=r;return}bt=r=n}while(r!==null);hn===0&&(hn=5)}function $x(n,r){do{var o=GR(n.alternate,n);if(o!==null){o.flags&=32767,bt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(n=n.sibling,n!==null)){bt=n;return}bt=n=o}while(n!==null);hn=6,bt=null}function Xx(n,r,o,c,h,g,S,D,U){n.cancelPendingCommit=null;do Eu();while(Ln!==0);if((_t&6)!==0)throw Error(i(327));if(r!==null){if(r===n.current)throw Error(i(177));if(g=r.lanes|r.childLanes,g|=eh,_n(n,o,g,S,D,U),n===Ft&&(bt=Ft=null,Et=0),ms=r,Ti=n,$a=o,lm=g,cm=h,Px=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,rN(Be,function(){return tb(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,h=X.p,X.p=2,S=_t,_t|=4;try{qR(n,r,o)}finally{_t=S,X.p=h,k.T=c}}Ln=1,Qx(),Zx(),Jx()}}function Qx(){if(Ln===1){Ln=0;var n=Ti,r=ms,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=k.T,k.T=null;var c=X.p;X.p=2;var h=_t;_t|=4;try{jx(r,n);var g=Cm,S=zy(n.containerInfo),D=g.focusedElem,U=g.selectionRange;if(S!==D&&D&&D.ownerDocument&&Iy(D.ownerDocument.documentElement,D)){if(U!==null&&$f(D)){var W=U.start,ie=U.end;if(ie===void 0&&(ie=W),"selectionStart"in D)D.selectionStart=W,D.selectionEnd=Math.min(ie,D.value.length);else{var le=D.ownerDocument||document,$=le&&le.defaultView||window;if($.getSelection){var J=$.getSelection(),Ie=D.textContent.length,Ze=Math.min(U.start,Ie),Ht=U.end===void 0?Ze:Math.min(U.end,Ie);!J.extend&&Ze>Ht&&(S=Ht,Ht=Ze,Ze=S);var H=Ly(D,Ze),Y=Ly(D,Ht);if(H&&Y&&(J.rangeCount!==1||J.anchorNode!==H.node||J.anchorOffset!==H.offset||J.focusNode!==Y.node||J.focusOffset!==Y.offset)){var G=le.createRange();G.setStart(H.node,H.offset),J.removeAllRanges(),Ze>Ht?(J.addRange(G),J.extend(Y.node,Y.offset)):(G.setEnd(Y.node,Y.offset),J.addRange(G))}}}}for(le=[],J=D;J=J.parentNode;)J.nodeType===1&&le.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<le.length;D++){var se=le[D];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Lu=!!Em,Cm=Em=null}finally{_t=h,X.p=c,k.T=o}}n.current=r,Ln=2}}function Zx(){if(Ln===2){Ln=0;var n=Ti,r=ms,o=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||o){o=k.T,k.T=null;var c=X.p;X.p=2;var h=_t;_t|=4;try{Rx(n,r.alternate,r)}finally{_t=h,X.p=c,k.T=o}}Ln=3}}function Jx(){if(Ln===4||Ln===3){Ln=0,Oe();var n=Ti,r=ms,o=$a,c=Px;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Ln=5:(Ln=0,ms=Ti=null,eb(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ci=null),he(o),r=r.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(jt,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=k.T,h=X.p,X.p=2,k.T=null;try{for(var g=n.onRecoverableError,S=0;S<c.length;S++){var D=c[S];g(D.value,{componentStack:D.stack})}}finally{k.T=r,X.p=h}}($a&3)!==0&&Eu(),va(n),h=n.pendingLanes,(o&261930)!==0&&(h&42)!==0?n===um?Rl++:(Rl=0,um=n):Rl=0,Nl(0)}}function eb(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,sl(r)))}function Eu(){return Qx(),Zx(),Jx(),tb()}function tb(){if(Ln!==5)return!1;var n=Ti,r=lm;lm=0;var o=he($a),c=k.T,h=X.p;try{X.p=32>o?32:o,k.T=null,o=cm,cm=null;var g=Ti,S=$a;if(Ln=0,ms=Ti=null,$a=0,(_t&6)!==0)throw Error(i(331));var D=_t;if(_t|=4,Ix(g.current),_x(g,g.current,S,o),_t=D,Nl(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(jt,g)}catch{}return!0}finally{X.p=h,k.T=c,eb(n,r)}}function nb(n,r,o){r=Br(o,r),r=Hh(n.stateNode,r,2),n=vi(n,r,2),n!==null&&($n(n,2),va(n))}function zt(n,r,o){if(n.tag===3)nb(n,n,o);else for(;r!==null;){if(r.tag===3){nb(r,n,o);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ci===null||!Ci.has(c))){n=Br(o,n),o=rx(2),c=vi(r,o,2),c!==null&&(ax(o,c,r,n),$n(c,2),va(c));break}}r=r.return}}function hm(n,r,o){var c=n.pingCache;if(c===null){c=n.pingCache=new $R;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(o)||(im=!0,h.add(o),n=eN.bind(null,n,r,o),r.then(n,n))}function eN(n,r,o){var c=n.pingCache;c!==null&&c.delete(r),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Ft===n&&(Et&o)===o&&(hn===4||hn===3&&(Et&62914560)===Et&&300>Ne()-yu?(_t&2)===0&&ps(n,0):om|=o,hs===Et&&(hs=0)),va(n)}function rb(n,r){r===0&&(r=Pr()),n=lo(n,r),n!==null&&($n(n,r),va(n))}function tN(n){var r=n.memoizedState,o=0;r!==null&&(o=r.retryLane),rb(n,o)}function nN(n,r){var o=0;switch(n.tag){case 31:case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(o=h.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(r),rb(n,o)}function rN(n,r){return ot(n,r)}var Cu=null,ys=null,mm=!1,Tu=!1,pm=!1,Ni=0;function va(n){n!==ys&&n.next===null&&(ys===null?Cu=ys=n:ys=ys.next=n),Tu=!0,mm||(mm=!0,iN())}function Nl(n,r){if(!pm&&Tu){pm=!0;do for(var o=!1,c=Cu;c!==null;){if(n!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var S=c.suspendedLanes,D=c.pingedLanes;g=(1<<31-rn(42|n)+1)-1,g&=h&~(S&~D),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(o=!0,sb(c,g))}else g=Et,g=nr(c,c===Ft?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Sr(c,g)||(o=!0,sb(c,g));c=c.next}while(o);pm=!1}}function aN(){ab()}function ab(){Tu=mm=!1;var n=0;Ni!==0&&pN()&&(n=Ni);for(var r=Ne(),o=null,c=Cu;c!==null;){var h=c.next,g=ib(c,r);g===0?(c.next=null,o===null?Cu=h:o.next=h,h===null&&(ys=o)):(o=c,(n!==0||(g&3)!==0)&&(Tu=!0)),c=h}Ln!==0&&Ln!==5||Nl(n),Ni!==0&&(Ni=0)}function ib(n,r){for(var o=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var S=31-rn(g),D=1<<S,U=h[S];U===-1?((D&o)===0||(D&c)!==0)&&(h[S]=Ur(D,r)):U<=r&&(n.expiredLanes|=D),g&=~D}if(r=Ft,o=Et,o=nr(n,n===r?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,o===0||n===r&&(It===2||It===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Re(c),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Sr(n,o)){if(r=o&-o,r===n.callbackPriority)return r;switch(c!==null&&Re(c),he(o)){case 2:case 8:o=at;break;case 32:o=Be;break;case 268435456:o=Gt;break;default:o=Be}return c=ob.bind(null,n),o=ot(o,c),n.callbackPriority=r,n.callbackNode=o,r}return c!==null&&c!==null&&Re(c),n.callbackPriority=2,n.callbackNode=null,2}function ob(n,r){if(Ln!==0&&Ln!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Eu()&&n.callbackNode!==o)return null;var c=Et;return c=nr(n,n===Ft?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Bx(n,c,r),ib(n,Ne()),n.callbackNode!=null&&n.callbackNode===o?ob.bind(null,n):null)}function sb(n,r){if(Eu())return null;Bx(n,r,!0)}function iN(){yN(function(){(_t&6)!==0?ot(rt,aN):ab()})}function gm(){if(Ni===0){var n=ns;n===0&&(n=st,st<<=1,(st&261888)===0&&(st=256)),Ni=n}return Ni}function lb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ka(""+n)}function cb(n,r){var o=r.ownerDocument.createElement("input");return o.name=r.name,o.value=r.value,n.id&&o.setAttribute("form",n.id),r.parentNode.insertBefore(o,r),n=new FormData(n),o.parentNode.removeChild(o),n}function oN(n,r,o,c,h){if(r==="submit"&&o&&o.stateNode===h){var g=lb((h[Ce]||null).action),S=c.submitter;S&&(r=(r=S[Ce]||null)?lb(r.formAction):S.getAttribute("formAction"),r!==null&&(g=r,S=null));var D=new zc("action","action",null,c,h);n.push({event:D,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ni!==0){var U=S?cb(h,S):new FormData(h);Ih(o,{pending:!0,data:U,method:h.method,action:g},null,U)}}else typeof g=="function"&&(D.preventDefault(),U=S?cb(h,S):new FormData(h),Ih(o,{pending:!0,data:U,method:h.method,action:g},g,U))},currentTarget:h}]})}}for(var ym=0;ym<Jf.length;ym++){var vm=Jf[ym],sN=vm.toLowerCase(),lN=vm[0].toUpperCase()+vm.slice(1);ra(sN,"on"+lN)}ra(Yy,"onAnimationEnd"),ra(By,"onAnimationIteration"),ra(Hy,"onAnimationStart"),ra("dblclick","onDoubleClick"),ra("focusin","onFocus"),ra("focusout","onBlur"),ra(CR,"onTransitionRun"),ra(TR,"onTransitionStart"),ra(RR,"onTransitionCancel"),ra(Vy,"onTransitionEnd"),Hn("onMouseEnter",["mouseout","mouseover"]),Hn("onMouseLeave",["mouseout","mouseover"]),Hn("onPointerEnter",["pointerout","pointerover"]),Hn("onPointerLeave",["pointerout","pointerover"]),Bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Al="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(" "),cN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Al));function ub(n,r){r=(r&4)!==0;for(var o=0;o<n.length;o++){var c=n[o],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var S=c.length-1;0<=S;S--){var D=c[S],U=D.instance,W=D.currentTarget;if(D=D.listener,U!==g&&h.isPropagationStopped())break e;g=D,h.currentTarget=W;try{g(h)}catch(ie){Yc(ie)}h.currentTarget=null,g=U}else for(S=0;S<c.length;S++){if(D=c[S],U=D.instance,W=D.currentTarget,D=D.listener,U!==g&&h.isPropagationStopped())break e;g=D,h.currentTarget=W;try{g(h)}catch(ie){Yc(ie)}h.currentTarget=null,g=U}}}}function wt(n,r){var o=r[He];o===void 0&&(o=r[He]=new Set);var c=n+"__bubble";o.has(c)||(db(r,n,2,!1),o.add(c))}function xm(n,r,o){var c=0;r&&(c|=4),db(o,n,c,r)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function bm(n){if(!n[Ru]){n[Ru]=!0,an.forEach(function(o){o!=="selectionchange"&&(cN.has(o)||xm(o,!1,n),xm(o,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Ru]||(r[Ru]=!0,xm("selectionchange",!1,r))}}function db(n,r,o,c){switch(Yb(r)){case 2:var h=zN;break;case 8:h=UN;break;default:h=Lm}o=h.bind(null,r,o,n),h=void 0,!Yf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(r,o,{capture:!0,passive:h}):n.addEventListener(r,o,!0):h!==void 0?n.addEventListener(r,o,{passive:h}):n.addEventListener(r,o,!1)}function wm(n,r,o,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var D=c.stateNode.containerInfo;if(D===h)break;if(S===4)for(S=c.return;S!==null;){var U=S.tag;if((U===3||U===4)&&S.stateNode.containerInfo===h)return;S=S.return}for(;D!==null;){if(S=en(D),S===null)return;if(U=S.tag,U===5||U===6||U===26||U===27){c=g=S;continue e}D=D.parentNode}}c=c.return}gy(function(){var W=g,ie=Uf(o),le=[];e:{var $=Fy.get(n);if($!==void 0){var J=zc,Ie=n;switch(n){case"keypress":if(Lc(o)===0)break e;case"keydown":case"keyup":J=nR;break;case"focusin":Ie="focus",J=Ff;break;case"focusout":Ie="blur",J=Ff;break;case"beforeblur":case"afterblur":J=Ff;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=xy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=FT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=iR;break;case Yy:case By:case Hy:J=WT;break;case Vy:J=sR;break;case"scroll":case"scrollend":J=HT;break;case"wheel":J=cR;break;case"copy":case"cut":case"paste":J=$T;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=wy;break;case"toggle":case"beforetoggle":J=dR}var Ze=(r&4)!==0,Ht=!Ze&&(n==="scroll"||n==="scrollend"),H=Ze?$!==null?$+"Capture":null:$;Ze=[];for(var Y=W,G;Y!==null;){var se=Y;if(G=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||G===null||H===null||(se=Xs(Y,H),se!=null&&Ze.push(Dl(Y,se,G))),Ht)break;Y=Y.return}0<Ze.length&&($=new J($,Ie,null,o,ie),le.push({event:$,listeners:Ze}))}}if((r&7)===0){e:{if($=n==="mouseover"||n==="pointerover",J=n==="mouseout"||n==="pointerout",$&&o!==_c&&(Ie=o.relatedTarget||o.fromElement)&&(en(Ie)||Ie[ze]))break e;if((J||$)&&($=ie.window===ie?ie:($=ie.ownerDocument)?$.defaultView||$.parentWindow:window,J?(Ie=o.relatedTarget||o.toElement,J=W,Ie=Ie?en(Ie):null,Ie!==null&&(Ht=l(Ie),Ze=Ie.tag,Ie!==Ht||Ze!==5&&Ze!==27&&Ze!==6)&&(Ie=null)):(J=null,Ie=W),J!==Ie)){if(Ze=xy,se="onMouseLeave",H="onMouseEnter",Y="mouse",(n==="pointerout"||n==="pointerover")&&(Ze=wy,se="onPointerLeave",H="onPointerEnter",Y="pointer"),Ht=J==null?$:Cn(J),G=Ie==null?$:Cn(Ie),$=new Ze(se,Y+"leave",J,o,ie),$.target=Ht,$.relatedTarget=G,se=null,en(ie)===W&&(Ze=new Ze(H,Y+"enter",Ie,o,ie),Ze.target=G,Ze.relatedTarget=Ht,se=Ze),Ht=se,J&&Ie)t:{for(Ze=uN,H=J,Y=Ie,G=0,se=H;se;se=Ze(se))G++;se=0;for(var Ke=Y;Ke;Ke=Ze(Ke))se++;for(;0<G-se;)H=Ze(H),G--;for(;0<se-G;)Y=Ze(Y),se--;for(;G--;){if(H===Y||Y!==null&&H===Y.alternate){Ze=H;break t}H=Ze(H),Y=Ze(Y)}Ze=null}else Ze=null;J!==null&&fb(le,$,J,Ze,!1),Ie!==null&&Ht!==null&&fb(le,Ht,Ie,Ze,!0)}}e:{if($=W?Cn(W):window,J=$.nodeName&&$.nodeName.toLowerCase(),J==="select"||J==="input"&&$.type==="file")var Dt=Dy;else if(Ny($))if(Oy)Dt=wR;else{Dt=xR;var Ve=vR}else J=$.nodeName,!J||J.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?W&&Tn(W.elementType)&&(Dt=Dy):Dt=bR;if(Dt&&(Dt=Dt(n,W))){Ay(le,Dt,o,ie);break e}Ve&&Ve(n,$,W),n==="focusout"&&W&&$.type==="number"&&W.memoizedProps.value!=null&&$s($,"number",$.value)}switch(Ve=W?Cn(W):window,n){case"focusin":(Ny(Ve)||Ve.contentEditable==="true")&&(Ko=Ve,Xf=W,al=null);break;case"focusout":al=Xf=Ko=null;break;case"mousedown":Qf=!0;break;case"contextmenu":case"mouseup":case"dragend":Qf=!1,Uy(le,o,ie);break;case"selectionchange":if(ER)break;case"keydown":case"keyup":Uy(le,o,ie)}var ct;if(qf)e:{switch(n){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else Wo?Ty(n,o)&&(Ct="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Ct="onCompositionStart");Ct&&(Sy&&o.locale!=="ko"&&(Wo||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&Wo&&(ct=yy()):(di=ie,Bf="value"in di?di.value:di.textContent,Wo=!0)),Ve=Nu(W,Ct),0<Ve.length&&(Ct=new by(Ct,n,null,o,ie),le.push({event:Ct,listeners:Ve}),ct?Ct.data=ct:(ct=Ry(o),ct!==null&&(Ct.data=ct)))),(ct=hR?mR(n,o):pR(n,o))&&(Ct=Nu(W,"onBeforeInput"),0<Ct.length&&(Ve=new by("onBeforeInput","beforeinput",null,o,ie),le.push({event:Ve,listeners:Ct}),Ve.data=ct)),oN(le,n,W,o,ie)}ub(le,r)})}function Dl(n,r,o){return{instance:n,listener:r,currentTarget:o}}function Nu(n,r){for(var o=r+"Capture",c=[];n!==null;){var h=n,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Xs(n,o),h!=null&&c.unshift(Dl(n,h,g)),h=Xs(n,r),h!=null&&c.push(Dl(n,h,g))),n.tag===3)return c;n=n.return}return[]}function uN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function fb(n,r,o,c,h){for(var g=r._reactName,S=[];o!==null&&o!==c;){var D=o,U=D.alternate,W=D.stateNode;if(D=D.tag,U!==null&&U===c)break;D!==5&&D!==26&&D!==27||W===null||(U=W,h?(W=Xs(o,g),W!=null&&S.unshift(Dl(o,W,U))):h||(W=Xs(o,g),W!=null&&S.push(Dl(o,W,U)))),o=o.return}S.length!==0&&n.push({event:r,listeners:S})}var dN=/\r\n?/g,fN=/\u0000|\uFFFD/g;function hb(n){return(typeof n=="string"?n:""+n).replace(dN,`
|
|
9
|
+
`).replace(fN,"")}function mb(n,r){return r=hb(r),hb(n)===r}function Bt(n,r,o,c,h,g){switch(o){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||Ge(n,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&Ge(n,""+c);break;case"className":rr(n,"class",c);break;case"tabIndex":rr(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":rr(n,o,c);break;case"style":ln(n,c,g);break;case"data":if(r!=="object"){rr(n,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||o!=="href")){n.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=ka(""+c),n.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(r!=="input"&&Bt(n,r,"name",h.name,h,null),Bt(n,r,"formEncType",h.formEncType,h,null),Bt(n,r,"formMethod",h.formMethod,h,null),Bt(n,r,"formTarget",h.formTarget,h,null)):(Bt(n,r,"encType",h.encType,h,null),Bt(n,r,"method",h.method,h,null),Bt(n,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=ka(""+c),n.setAttribute(o,c);break;case"onClick":c!=null&&(n.onclick=na);break;case"onScroll":c!=null&&wt("scroll",n);break;case"onScrollEnd":c!=null&&wt("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}o=ka(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""+c):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":c===!0?n.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,c):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(o,c):n.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(o):n.setAttribute(o,c);break;case"popover":wt("beforetoggle",n),wt("toggle",n),$t(n,"popover",c);break;case"xlinkActuate":xn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":xn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":xn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":xn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":xn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":xn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":xn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":xn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":xn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":$t(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Ma.get(o)||o,$t(n,o,c))}}function Sm(n,r,o,c,h,g){switch(o){case"style":ln(n,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof c=="string"?Ge(n,c):(typeof c=="number"||typeof c=="bigint")&&Ge(n,""+c);break;case"onScroll":c!=null&&wt("scroll",n);break;case"onScrollEnd":c!=null&&wt("scrollend",n);break;case"onClick":c!=null&&(n.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kt.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(h=o.endsWith("Capture"),r=o.slice(2,h?o.length-7:void 0),g=n[Ce]||null,g=g!=null?g[o]:null,typeof g=="function"&&n.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(r,c,h);break e}o in n?n[o]=c:c===!0?n.setAttribute(o,""):$t(n,o,c)}}}function qn(n,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",n),wt("load",n);var c=!1,h=!1,g;for(g in o)if(o.hasOwnProperty(g)){var S=o[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Bt(n,r,g,S,o,null)}}h&&Bt(n,r,"srcSet",o.srcSet,o,null),c&&Bt(n,r,"src",o.src,o,null);return;case"input":wt("invalid",n);var D=g=S=h=null,U=null,W=null;for(c in o)if(o.hasOwnProperty(c)){var ie=o[c];if(ie!=null)switch(c){case"name":h=ie;break;case"type":S=ie;break;case"checked":U=ie;break;case"defaultChecked":W=ie;break;case"value":g=ie;break;case"defaultValue":D=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,r));break;default:Bt(n,r,c,ie,o,null)}}jc(n,g,D,U,W,S,h,!1);return;case"select":wt("invalid",n),c=S=g=null;for(h in o)if(o.hasOwnProperty(h)&&(D=o[h],D!=null))switch(h){case"value":g=D;break;case"defaultValue":S=D;break;case"multiple":c=D;default:Bt(n,r,h,D,o,null)}r=g,o=S,n.multiple=!!c,r!=null?ui(n,!!c,r,!1):o!=null&&ui(n,!!c,o,!0);return;case"textarea":wt("invalid",n),g=h=c=null;for(S in o)if(o.hasOwnProperty(S)&&(D=o[S],D!=null))switch(S){case"value":c=D;break;case"defaultValue":h=D;break;case"children":g=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(i(91));break;default:Bt(n,r,S,D,o,null)}Ae(n,c,h,g);return;case"option":for(U in o)o.hasOwnProperty(U)&&(c=o[U],c!=null)&&(U==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":Bt(n,r,U,c,o,null));return;case"dialog":wt("beforetoggle",n),wt("toggle",n),wt("cancel",n),wt("close",n);break;case"iframe":case"object":wt("load",n);break;case"video":case"audio":for(c=0;c<Al.length;c++)wt(Al[c],n);break;case"image":wt("error",n),wt("load",n);break;case"details":wt("toggle",n);break;case"embed":case"source":case"link":wt("error",n),wt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in o)if(o.hasOwnProperty(W)&&(c=o[W],c!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Bt(n,r,W,c,o,null)}return;default:if(Tn(r)){for(ie in o)o.hasOwnProperty(ie)&&(c=o[ie],c!==void 0&&Sm(n,r,ie,c,o,void 0));return}}for(D in o)o.hasOwnProperty(D)&&(c=o[D],c!=null&&Bt(n,r,D,c,o,null))}function hN(n,r,o,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,S=null,D=null,U=null,W=null,ie=null;for(J in o){var le=o[J];if(o.hasOwnProperty(J)&&le!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":U=le;default:c.hasOwnProperty(J)||Bt(n,r,J,null,c,le)}}for(var $ in c){var J=c[$];if(le=o[$],c.hasOwnProperty($)&&(J!=null||le!=null))switch($){case"type":g=J;break;case"name":h=J;break;case"checked":W=J;break;case"defaultChecked":ie=J;break;case"value":S=J;break;case"defaultValue":D=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(i(137,r));break;default:J!==le&&Bt(n,r,$,J,c,le)}}Ks(n,S,D,U,W,ie,g,h);return;case"select":J=S=D=$=null;for(g in o)if(U=o[g],o.hasOwnProperty(g)&&U!=null)switch(g){case"value":break;case"multiple":J=U;default:c.hasOwnProperty(g)||Bt(n,r,g,null,c,U)}for(h in c)if(g=c[h],U=o[h],c.hasOwnProperty(h)&&(g!=null||U!=null))switch(h){case"value":$=g;break;case"defaultValue":D=g;break;case"multiple":S=g;default:g!==U&&Bt(n,r,h,g,c,U)}r=D,o=S,c=J,$!=null?ui(n,!!o,$,!1):!!c!=!!o&&(r!=null?ui(n,!!o,r,!0):ui(n,!!o,o?[]:"",!1));return;case"textarea":J=$=null;for(D in o)if(h=o[D],o.hasOwnProperty(D)&&h!=null&&!c.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Bt(n,r,D,null,c,h)}for(S in c)if(h=c[S],g=o[S],c.hasOwnProperty(S)&&(h!=null||g!=null))switch(S){case"value":$=h;break;case"defaultValue":J=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==g&&Bt(n,r,S,h,c,g)}Mc(n,$,J);return;case"option":for(var Ie in o)$=o[Ie],o.hasOwnProperty(Ie)&&$!=null&&!c.hasOwnProperty(Ie)&&(Ie==="selected"?n.selected=!1:Bt(n,r,Ie,null,c,$));for(U in c)$=c[U],J=o[U],c.hasOwnProperty(U)&&$!==J&&($!=null||J!=null)&&(U==="selected"?n.selected=$&&typeof $!="function"&&typeof $!="symbol":Bt(n,r,U,$,c,J));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ze in o)$=o[Ze],o.hasOwnProperty(Ze)&&$!=null&&!c.hasOwnProperty(Ze)&&Bt(n,r,Ze,null,c,$);for(W in c)if($=c[W],J=o[W],c.hasOwnProperty(W)&&$!==J&&($!=null||J!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,r));break;default:Bt(n,r,W,$,c,J)}return;default:if(Tn(r)){for(var Ht in o)$=o[Ht],o.hasOwnProperty(Ht)&&$!==void 0&&!c.hasOwnProperty(Ht)&&Sm(n,r,Ht,void 0,c,$);for(ie in c)$=c[ie],J=o[ie],!c.hasOwnProperty(ie)||$===J||$===void 0&&J===void 0||Sm(n,r,ie,$,c,J);return}}for(var H in o)$=o[H],o.hasOwnProperty(H)&&$!=null&&!c.hasOwnProperty(H)&&Bt(n,r,H,null,c,$);for(le in c)$=c[le],J=o[le],!c.hasOwnProperty(le)||$===J||$==null&&J==null||Bt(n,r,le,$,c,J)}function pb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var h=o[c],g=h.transferSize,S=h.initiatorType,D=h.duration;if(g&&D&&pb(S)){for(S=0,D=h.responseEnd,c+=1;c<o.length;c++){var U=o[c],W=U.startTime;if(W>D)break;var ie=U.transferSize,le=U.initiatorType;ie&&pb(le)&&(U=U.responseEnd,S+=ie*(U<D?1:(D-W)/(U-W)))}if(--c,r+=8*(g+S)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Em=null,Cm=null;function Au(n){return n.nodeType===9?n:n.ownerDocument}function gb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yb(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Tm(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Rm=null;function pN(){var n=window.event;return n&&n.type==="popstate"?n===Rm?!1:(Rm=n,!0):(Rm=null,!1)}var vb=typeof setTimeout=="function"?setTimeout:void 0,gN=typeof clearTimeout=="function"?clearTimeout:void 0,xb=typeof Promise=="function"?Promise:void 0,yN=typeof queueMicrotask=="function"?queueMicrotask:typeof xb<"u"?function(n){return xb.resolve(null).then(n).catch(vN)}:vb;function vN(n){setTimeout(function(){throw n})}function Ai(n){return n==="head"}function bb(n,r){var o=r,c=0;do{var h=o.nextSibling;if(n.removeChild(o),h&&h.nodeType===8)if(o=h.data,o==="/$"||o==="/&"){if(c===0){n.removeChild(h),ws(r);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")Ol(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Ol(o);for(var g=o.firstChild;g;){var S=g.nextSibling,D=g.nodeName;g[Jt]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&g.rel.toLowerCase()==="stylesheet"||o.removeChild(g),g=S}}else o==="body"&&Ol(n.ownerDocument.body);o=h}while(o);ws(r)}function wb(n,r){var o=n;n=0;do{var c=o.nextSibling;if(o.nodeType===1?r?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(r?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=c}while(o)}function Nm(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var o=r;switch(r=r.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Nm(o),qt(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function xN(n,r,o,c){for(;n.nodeType===1;){var h=o;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Jt])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=qr(n.nextSibling),n===null)break}return null}function bN(n,r,o){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=qr(n.nextSibling),n===null))return null;return n}function Sb(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=qr(n.nextSibling),n===null))return null;return n}function Am(n){return n.data==="$?"||n.data==="$~"}function Dm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function wN(n,r){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||o.readyState!=="loading")r();else{var c=function(){r(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function qr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Om=null;function Eb(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(r===0)return qr(n.nextSibling);r--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||r++}n=n.nextSibling}return null}function Cb(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(r===0)return n;r--}else o!=="/$"&&o!=="/&"||r++}n=n.previousSibling}return null}function Tb(n,r,o){switch(r=Au(o),n){case"html":if(n=r.documentElement,!n)throw Error(i(452));return n;case"head":if(n=r.head,!n)throw Error(i(453));return n;case"body":if(n=r.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Ol(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);qt(n)}var Wr=new Map,Rb=new Set;function Du(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Xa=X.d;X.d={f:SN,r:EN,D:CN,C:TN,L:RN,m:NN,X:DN,S:AN,M:ON};function SN(){var n=Xa.f(),r=bu();return n||r}function EN(n){var r=ht(n);r!==null&&r.tag===5&&r.type==="form"?Vv(r):Xa.r(n)}var vs=typeof document>"u"?null:document;function Nb(n,r,o){var c=vs;if(c&&typeof r=="string"&&r){var h=dr(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof o=="string"&&(h+='[crossorigin="'+o+'"]'),Rb.has(h)||(Rb.add(h),n={rel:n,crossOrigin:o,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),qn(r,"link",n),Wt(r),c.head.appendChild(r)))}}function CN(n){Xa.D(n),Nb("dns-prefetch",n,null)}function TN(n,r){Xa.C(n,r),Nb("preconnect",n,r)}function RN(n,r,o){Xa.L(n,r,o);var c=vs;if(c&&n&&r){var h='link[rel="preload"][as="'+dr(r)+'"]';r==="image"&&o&&o.imageSrcSet?(h+='[imagesrcset="'+dr(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(h+='[imagesizes="'+dr(o.imageSizes)+'"]')):h+='[href="'+dr(n)+'"]';var g=h;switch(r){case"style":g=xs(n);break;case"script":g=bs(n)}Wr.has(g)||(n=v({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:n,as:r},o),Wr.set(g,n),c.querySelector(h)!==null||r==="style"&&c.querySelector(jl(g))||r==="script"&&c.querySelector(Ml(g))||(r=c.createElement("link"),qn(r,"link",n),Wt(r),c.head.appendChild(r)))}}function NN(n,r){Xa.m(n,r);var o=vs;if(o&&n){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+dr(c)+'"][href="'+dr(n)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=bs(n)}if(!Wr.has(g)&&(n=v({rel:"modulepreload",href:n},r),Wr.set(g,n),o.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Ml(g)))return}c=o.createElement("link"),qn(c,"link",n),Wt(c),o.head.appendChild(c)}}}function AN(n,r,o){Xa.S(n,r,o);var c=vs;if(c&&n){var h=kn(c).hoistableStyles,g=xs(n);r=r||"default";var S=h.get(g);if(!S){var D={loading:0,preload:null};if(S=c.querySelector(jl(g)))D.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":r},o),(o=Wr.get(g))&&jm(n,o);var U=S=c.createElement("link");Wt(U),qn(U,"link",n),U._p=new Promise(function(W,ie){U.onload=W,U.onerror=ie}),U.addEventListener("load",function(){D.loading|=1}),U.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Ou(S,r,c)}S={type:"stylesheet",instance:S,count:1,state:D},h.set(g,S)}}}function DN(n,r){Xa.X(n,r);var o=vs;if(o&&n){var c=kn(o).hoistableScripts,h=bs(n),g=c.get(h);g||(g=o.querySelector(Ml(h)),g||(n=v({src:n,async:!0},r),(r=Wr.get(h))&&Mm(n,r),g=o.createElement("script"),Wt(g),qn(g,"link",n),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function ON(n,r){Xa.M(n,r);var o=vs;if(o&&n){var c=kn(o).hoistableScripts,h=bs(n),g=c.get(h);g||(g=o.querySelector(Ml(h)),g||(n=v({src:n,async:!0,type:"module"},r),(r=Wr.get(h))&&Mm(n,r),g=o.createElement("script"),Wt(g),qn(g,"link",n),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function Ab(n,r,o,c){var h=(h=we.current)?Du(h):null;if(!h)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(r=xs(o.href),o=kn(h).hoistableStyles,c=o.get(r),c||(c={type:"style",instance:null,count:0,state:null},o.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=xs(o.href);var g=kn(h).hoistableStyles,S=g.get(n);if(S||(h=h.ownerDocument||h,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,S),(g=h.querySelector(jl(n)))&&!g._p&&(S.instance=g,S.state.loading=5),Wr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Wr.set(n,o),g||jN(h,n,o,S.state))),r&&c===null)throw Error(i(528,""));return S}if(r&&c!==null)throw Error(i(529,""));return null;case"script":return r=o.async,o=o.src,typeof o=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=bs(o),o=kn(h).hoistableScripts,c=o.get(r),c||(c={type:"script",instance:null,count:0,state:null},o.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function xs(n){return'href="'+dr(n)+'"'}function jl(n){return'link[rel="stylesheet"]['+n+"]"}function Db(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function jN(n,r,o,c){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=n.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),qn(r,"link",o),Wt(r),n.head.appendChild(r))}function bs(n){return'[src="'+dr(n)+'"]'}function Ml(n){return"script[async]"+n}function Ob(n,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var c=n.querySelector('style[data-href~="'+dr(o.href)+'"]');if(c)return r.instance=c,Wt(c),c;var h=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Wt(c),qn(c,"style",h),Ou(c,o.precedence,n),r.instance=c;case"stylesheet":h=xs(o.href);var g=n.querySelector(jl(h));if(g)return r.state.loading|=4,r.instance=g,Wt(g),g;c=Db(o),(h=Wr.get(h))&&jm(c,h),g=(n.ownerDocument||n).createElement("link"),Wt(g);var S=g;return S._p=new Promise(function(D,U){S.onload=D,S.onerror=U}),qn(g,"link",c),r.state.loading|=4,Ou(g,o.precedence,n),r.instance=g;case"script":return g=bs(o.src),(h=n.querySelector(Ml(g)))?(r.instance=h,Wt(h),h):(c=o,(h=Wr.get(g))&&(c=v({},o),Mm(c,h)),n=n.ownerDocument||n,h=n.createElement("script"),Wt(h),qn(h,"link",c),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Ou(c,o.precedence,n));return r.instance}function Ou(n,r,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,S=0;S<c.length;S++){var D=c[S];if(D.dataset.precedence===r)g=D;else if(g!==h)break}g?g.parentNode.insertBefore(n,g.nextSibling):(r=o.nodeType===9?o.head:o,r.insertBefore(n,r.firstChild))}function jm(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Mm(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var ju=null;function jb(n,r,o){if(ju===null){var c=new Map,h=ju=new Map;h.set(o,c)}else h=ju,c=h.get(o),c||(c=new Map,h.set(o,c));if(c.has(n))return c;for(c.set(n,null),o=o.getElementsByTagName(n),h=0;h<o.length;h++){var g=o[h];if(!(g[Jt]||g[Se]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(r)||"";S=n+S;var D=c.get(S);D?D.push(g):c.set(S,[g])}}return c}function Mb(n,r,o){n=n.ownerDocument||n,n.head.insertBefore(o,r==="title"?n.querySelector("head > title"):null)}function MN(n,r,o){if(o===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function _b(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function _N(n,r,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var h=xs(c.href),g=r.querySelector(jl(h));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Mu.bind(n),r.then(n,n)),o.state.loading|=4,o.instance=g,Wt(g);return}g=r.ownerDocument||r,c=Db(c),(h=Wr.get(h))&&jm(c,h),g=g.createElement("link"),Wt(g);var S=g;S._p=new Promise(function(D,U){S.onload=D,S.onerror=U}),qn(g,"link",c),o.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,r),(r=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Mu.bind(n),r.addEventListener("load",o),r.addEventListener("error",o))}}var _m=0;function kN(n,r){return n.stylesheets&&n.count===0&&ku(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var c=setTimeout(function(){if(n.stylesheets&&ku(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+r);0<n.imgBytes&&_m===0&&(_m=62500*mN());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ku(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>_m?50:800)+r);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function Mu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ku(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var _u=null;function ku(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,_u=new Map,r.forEach(LN,n),_u=null,Mu.call(n))}function LN(n,r){if(!(r.state.loading&4)){var o=_u.get(n);if(o)var c=o.get(null);else{o=new Map,_u.set(n,o);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var S=h[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),c=S)}c&&o.set(null,c)}h=r.instance,S=h.getAttribute("data-precedence"),g=o.get(S)||c,g===c&&o.set(null,h),o.set(S,h),this.count++,c=Mu.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var _l={$$typeof:O,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function IN(n,r,o,c,h,g,S,D,U){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function kb(n,r,o,c,h,g,S,D,U,W,ie,le){return n=new IN(n,r,o,S,U,W,ie,le,D),r=1,g===!0&&(r|=24),g=Cr(3,null,null,r),n.current=g,g.stateNode=n,r=fh(),r.refCount++,n.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:o,cache:r},gh(g),n}function Lb(n){return n?(n=Qo,n):Qo}function Ib(n,r,o,c,h,g){h=Lb(h),c.context===null?c.context=h:c.pendingContext=h,c=yi(r),c.payload={element:o},g=g===void 0?null:g,g!==null&&(c.callback=g),o=vi(n,c,r),o!==null&&(yr(o,n,r),dl(o,n,r))}function zb(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<r?o:r}}function km(n,r){zb(n,r),(n=n.alternate)&&zb(n,r)}function Ub(n){if(n.tag===13||n.tag===31){var r=lo(n,67108864);r!==null&&yr(r,n,67108864),km(n,67108864)}}function Pb(n){if(n.tag===13||n.tag===31){var r=Dr();r=q(r);var o=lo(n,r);o!==null&&yr(o,n,r),km(n,r)}}var Lu=!0;function zN(n,r,o,c){var h=k.T;k.T=null;var g=X.p;try{X.p=2,Lm(n,r,o,c)}finally{X.p=g,k.T=h}}function UN(n,r,o,c){var h=k.T;k.T=null;var g=X.p;try{X.p=8,Lm(n,r,o,c)}finally{X.p=g,k.T=h}}function Lm(n,r,o,c){if(Lu){var h=Im(c);if(h===null)wm(n,r,c,Iu,o),Bb(n,c);else if(YN(h,n,r,o,c))c.stopPropagation();else if(Bb(n,c),r&4&&-1<PN.indexOf(n)){for(;h!==null;){var g=ht(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Lt(g.pendingLanes);if(S!==0){var D=g;for(D.pendingLanes|=2,D.entangledLanes|=2;S;){var U=1<<31-rn(S);D.entanglements[1]|=U,S&=~U}va(g),(_t&6)===0&&(vu=Ne()+500,Nl(0))}}break;case 31:case 13:D=lo(g,2),D!==null&&yr(D,g,2),bu(),km(g,2)}if(g=Im(c),g===null&&wm(n,r,c,Iu,o),g===h)break;h=g}h!==null&&c.stopPropagation()}else wm(n,r,c,null,o)}}function Im(n){return n=Uf(n),zm(n)}var Iu=null;function zm(n){if(Iu=null,n=en(n),n!==null){var r=l(n);if(r===null)n=null;else{var o=r.tag;if(o===13){if(n=d(r),n!==null)return n;n=null}else if(o===31){if(n=f(r),n!==null)return n;n=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Iu=n,null}function Yb(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ke()){case rt:return 2;case at:return 8;case Be:case gt:return 32;case Gt:return 268435456;default:return 32}default:return 32}}var Um=!1,Di=null,Oi=null,ji=null,kl=new Map,Ll=new Map,Mi=[],PN="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".split(" ");function Bb(n,r){switch(n){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":kl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ll.delete(r.pointerId)}}function Il(n,r,o,c,h,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:o,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=ht(r),r!==null&&Ub(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function YN(n,r,o,c,h){switch(r){case"focusin":return Di=Il(Di,n,r,o,c,h),!0;case"dragenter":return Oi=Il(Oi,n,r,o,c,h),!0;case"mouseover":return ji=Il(ji,n,r,o,c,h),!0;case"pointerover":var g=h.pointerId;return kl.set(g,Il(kl.get(g)||null,n,r,o,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Ll.set(g,Il(Ll.get(g)||null,n,r,o,c,h)),!0}return!1}function Hb(n){var r=en(n.target);if(r!==null){var o=l(r);if(o!==null){if(r=o.tag,r===13){if(r=d(o),r!==null){n.blockedOn=r,Ye(n.priority,function(){Pb(o)});return}}else if(r===31){if(r=f(o),r!==null){n.blockedOn=r,Ye(n.priority,function(){Pb(o)});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function zu(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var o=Im(n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);_c=c,o.target.dispatchEvent(c),_c=null}else return r=ht(o),r!==null&&Ub(r),n.blockedOn=o,!1;r.shift()}return!0}function Vb(n,r,o){zu(n)&&o.delete(r)}function BN(){Um=!1,Di!==null&&zu(Di)&&(Di=null),Oi!==null&&zu(Oi)&&(Oi=null),ji!==null&&zu(ji)&&(ji=null),kl.forEach(Vb),Ll.forEach(Vb)}function Uu(n,r){n.blockedOn===r&&(n.blockedOn=null,Um||(Um=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BN)))}var Pu=null;function Fb(n){Pu!==n&&(Pu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pu===n&&(Pu=null);for(var r=0;r<n.length;r+=3){var o=n[r],c=n[r+1],h=n[r+2];if(typeof c!="function"){if(zm(c||o)===null)continue;break}var g=ht(o);g!==null&&(n.splice(r,3),r-=3,Ih(g,{pending:!0,data:h,method:o.method,action:c},c,h))}}))}function ws(n){function r(U){return Uu(U,n)}Di!==null&&Uu(Di,n),Oi!==null&&Uu(Oi,n),ji!==null&&Uu(ji,n),kl.forEach(r),Ll.forEach(r);for(var o=0;o<Mi.length;o++){var c=Mi[o];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Mi.length&&(o=Mi[0],o.blockedOn===null);)Hb(o),o.blockedOn===null&&Mi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var h=o[c],g=o[c+1],S=h[Ce]||null;if(typeof g=="function")S||Fb(o);else if(S){var D=null;if(g&&g.hasAttribute("formAction")){if(h=g,S=g[Ce]||null)D=S.formAction;else if(zm(h)!==null)continue}else D=S.action;typeof D=="function"?o[c+1]=D:(o.splice(c,3),c-=3),Fb(o)}}}function Gb(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return h=S})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),c||setTimeout(o,20)}function o(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function Pm(n){this._internalRoot=n}Yu.prototype.render=Pm.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(i(409));var o=r.current,c=Dr();Ib(o,c,n,r,null,null)},Yu.prototype.unmount=Pm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Ib(n.current,2,null,n,null,null),bu(),r[ze]=null}};function Yu(n){this._internalRoot=n}Yu.prototype.unstable_scheduleHydration=function(n){if(n){var r=ge();n={blockedOn:null,target:n,priority:r};for(var o=0;o<Mi.length&&r!==0&&r<Mi[o].priority;o++);Mi.splice(o,0,n),o===0&&Hb(n)}};var qb=t.version;if(qb!=="19.2.3")throw Error(i(527,qb,"19.2.3"));X.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=m(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var HN={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bu.isDisabled&&Bu.supportsFiber)try{jt=Bu.inject(HN),De=Bu}catch{}}return Ul.createRoot=function(n,r){if(!s(n))throw Error(i(299));var o=!1,c="",h=Jv,g=ex,S=tx;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=kb(n,1,!1,null,null,o,c,null,h,g,S,Gb),n[ze]=r.current,bm(n),new Pm(r)},Ul.hydrateRoot=function(n,r,o){if(!s(n))throw Error(i(299));var c=!1,h="",g=Jv,S=ex,D=tx,U=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(D=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),r=kb(n,1,!0,r,o??null,c,h,U,g,S,D,Gb),r.context=Lb(null),o=r.current,c=Dr(),c=q(c),h=yi(c),h.callback=null,vi(o,h,c),o=c,r.current.lanes=o,$n(r,o),va(r),n[ze]=r.current,bm(n),new Yu(r)},Ul.version="19.2.3",Ul}var n0;function ZN(){if(n0)return Hm.exports;n0=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(),Hm.exports=QN(),Hm.exports}var JN=ZN();var gS=e=>{throw TypeError(e)},eA=(e,t,a)=>t.has(e)||gS("Cannot "+a),qm=(e,t,a)=>(eA(e,t,"read from private field"),a?a.call(e):t.get(e)),tA=(e,t,a)=>t.has(e)?gS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),r0="popstate";function nA(e={}){function t(i,s){let{pathname:l,search:d,hash:f}=i.location;return sc("",{pathname:l,search:d,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function a(i,s){return typeof s=="string"?s:Ta(s)}return aA(t,a,null,e)}function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function gn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rA(){return Math.random().toString(36).substring(2,10)}function a0(e,t){return{usr:e.state,key:e.key,idx:t}}function sc(e,t,a=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?eo(t):t,state:a,key:t&&t.key||i||rA()}}function Ta({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function eo(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function aA(e,t,a,i={}){let{window:s=document.defaultView,v5Compat:l=!1}=i,d=s.history,f="POP",p=null,m=y();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function y(){return(d.state||{idx:null}).idx}function v(){f="POP";let T=y(),N=T==null?null:T-m;m=T,p&&p({action:f,location:E.location,delta:N})}function w(T,N){f="PUSH";let R=sc(E.location,T,N);m=y()+1;let O=a0(R,m),j=E.createHref(R);try{d.pushState(O,"",j)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(j)}l&&p&&p({action:f,location:E.location,delta:1})}function b(T,N){f="REPLACE";let R=sc(E.location,T,N);m=y();let O=a0(R,m),j=E.createHref(R);d.replaceState(O,"",j),l&&p&&p({action:f,location:E.location,delta:0})}function C(T){return yS(T)}let E={get action(){return f},get location(){return e(s,d)},listen(T){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(r0,v),p=T,()=>{s.removeEventListener(r0,v),p=null}},createHref(T){return t(s,T)},createURL:C,encodeLocation(T){let N=C(T);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:w,replace:b,go(T){return d.go(T)}};return E}function yS(e,t=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),pt(a,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Ta(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=a+i),new URL(i,a)}var Kl,i0=class{constructor(e){if(tA(this,Kl,new Map),e)for(let[t,a]of e)this.set(t,a)}get(e){if(qm(this,Kl).has(e))return qm(this,Kl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){qm(this,Kl).set(e,t)}};Kl=new WeakMap;var iA=new Set(["lazy","caseSensitive","path","id","index","children"]);function oA(e){return iA.has(e)}var sA=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function lA(e){return sA.has(e)}function cA(e){return e.index===!0}function lc(e,t,a=[],i={},s=!1){return e.map((l,d)=>{let f=[...a,String(d)],p=typeof l.id=="string"?l.id:f.join("-");if(pt(l.index!==!0||!l.children,"Cannot specify children on an index route"),pt(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),cA(l)){let m={...l,id:p};return i[p]=o0(m,t(m)),m}else{let m={...l,id:p,children:void 0};return i[p]=o0(m,t(m)),l.children&&(m.children=lc(l.children,t,f,i,s)),m}})}function o0(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Hi(e,t,a="/"){return $l(e,t,a,!1)}function $l(e,t,a,i){let s=typeof t=="string"?eo(t):t,l=Qr(s.pathname||"/",a);if(l==null)return null;let d=vS(e);dA(d);let f=null;for(let p=0;f==null&&p<d.length;++p){let m=SA(l);f=bA(d[p],m,i)}return f}function uA(e,t){let{route:a,pathname:i,params:s}=e;return{id:a.id,pathname:i,params:s,data:t[a.id],loaderData:t[a.id],handle:a.handle}}function vS(e,t=[],a=[],i="",s=!1){let l=(d,f,p=s,m)=>{let y={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&p)return;pt(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let v=Ea([i,y.relativePath]),w=a.concat(y);d.children&&d.children.length>0&&(pt(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),vS(d.children,t,w,v,p)),!(d.path==null&&!d.index)&&t.push({path:v,score:vA(v,d.index),routesMeta:w})};return e.forEach((d,f)=>{if(d.path===""||!d.path?.includes("?"))l(d,f);else for(let p of xS(d.path))l(d,f,!0,p)}),t}function xS(e){let t=e.split("/");if(t.length===0)return[];let[a,...i]=t,s=a.endsWith("?"),l=a.replace(/\?$/,"");if(i.length===0)return s?[l,""]:[l];let d=xS(i.join("/")),f=[];return f.push(...d.map(p=>p===""?l:[l,p].join("/"))),s&&f.push(...d),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function dA(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:xA(t.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var fA=/^:[\w-]+$/,hA=3,mA=2,pA=1,gA=10,yA=-2,s0=e=>e==="*";function vA(e,t){let a=e.split("/"),i=a.length;return a.some(s0)&&(i+=yA),t&&(i+=mA),a.filter(s=>!s0(s)).reduce((s,l)=>s+(fA.test(l)?hA:l===""?pA:gA),i)}function xA(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function bA(e,t,a=!1){let{routesMeta:i}=e,s={},l="/",d=[];for(let f=0;f<i.length;++f){let p=i[f],m=f===i.length-1,y=l==="/"?t:t.slice(l.length)||"/",v=Od({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),w=p.route;if(!v&&m&&a&&!i[i.length-1].route.index&&(v=Od({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!v)return null;Object.assign(s,v.params),d.push({params:s,pathname:Ea([l,v.pathname]),pathnameBase:TA(Ea([l,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(l=Ea([l,v.pathnameBase]))}return d}function Od(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,i]=wA(e.path,e.caseSensitive,e.end),s=t.match(a);if(!s)return null;let l=s[0],d=l.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:i.reduce((m,{paramName:y,isOptional:v},w)=>{if(y==="*"){let C=f[w]||"";d=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const b=f[w];return v&&!b?m[y]=void 0:m[y]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:d,pattern:e}}function wA(e,t=!1,a=!0){gn(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 i=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,p)=>(i.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function SA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Qr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,i=e.charAt(a);return i&&i!=="/"?null:e.slice(a)||"/"}function EA({basename:e,pathname:t}){return t==="/"?e:Ea([e,t])}var bS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,of=e=>bS.test(e);function CA(e,t="/"){let{pathname:a,search:i="",hash:s=""}=typeof e=="string"?eo(e):e,l;if(a)if(of(a))l=a;else{if(a.includes("//")){let d=a;a=a.replace(/\/\/+/g,"/"),gn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${a}`)}a.startsWith("/")?l=l0(a.substring(1),"/"):l=l0(a,t)}else l=t;return{pathname:l,search:RA(i),hash:NA(s)}}function l0(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Wm(e,t,a,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function wS(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function sf(e){let t=wS(e);return t.map((a,i)=>i===t.length-1?a.pathname:a.pathnameBase)}function lf(e,t,a,i=!1){let s;typeof e=="string"?s=eo(e):(s={...e},pt(!s.pathname||!s.pathname.includes("?"),Wm("?","pathname","search",s)),pt(!s.pathname||!s.pathname.includes("#"),Wm("#","pathname","hash",s)),pt(!s.search||!s.search.includes("#"),Wm("#","search","hash",s)));let l=e===""||s.pathname==="",d=l?"/":s.pathname,f;if(d==null)f=a;else{let v=t.length-1;if(!i&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),v-=1;s.pathname=w.join("/")}f=v>=0?t[v]:"/"}let p=CA(s,f),m=d&&d!=="/"&&d.endsWith("/"),y=(l||d===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var Ea=e=>e.join("/").replace(/\/\/+/g,"/"),TA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),RA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,NA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,xc=class{constructor(e,t,a,i=!1){this.status=e,this.statusText=t||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function cc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bc(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var SS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ES(e,t){let a=e;if(typeof a!="string"||!bS.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,s=!1;if(SS)try{let l=new URL(window.location.href),d=a.startsWith("//")?new URL(l.protocol+a):new URL(a),f=Qr(d.pathname,t);d.origin===l.origin&&f!=null?a=f+d.search+d.hash:s=!0}catch{gn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:a}}var Gi=Symbol("Uninstrumented");function AA(e,t){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:t.id,index:t.index,path:t.path,instrument(l){let d=Object.keys(a);for(let f of d)l[f]&&a[f].push(l[f])}}));let i={};if(typeof t.lazy=="function"&&a.lazy.length>0){let s=Ds(a.lazy,t.lazy,()=>{});s&&(i.lazy=s)}if(typeof t.lazy=="object"){let s=t.lazy;["middleware","loader","action"].forEach(l=>{let d=s[l],f=a[`lazy.${l}`];if(typeof d=="function"&&f.length>0){let p=Ds(f,d,()=>{});p&&(i.lazy=Object.assign(i.lazy||{},{[l]:p}))}})}return["loader","action"].forEach(s=>{let l=t[s];if(typeof l=="function"&&a[s].length>0){let d=l[Gi]??l,f=Ds(a[s],d,(...p)=>c0(p[0]));f&&(s==="loader"&&d.hydrate===!0&&(f.hydrate=!0),f[Gi]=d,i[s]=f)}}),t.middleware&&t.middleware.length>0&&a.middleware.length>0&&(i.middleware=t.middleware.map(s=>{let l=s[Gi]??s,d=Ds(a.middleware,l,(...f)=>c0(f[0]));return d?(d[Gi]=l,d):s})),i}function DA(e,t){let a={navigate:[],fetch:[]};if(t.forEach(i=>i({instrument(s){let l=Object.keys(s);for(let d of l)s[d]&&a[d].push(s[d])}})),a.navigate.length>0){let i=e.navigate[Gi]??e.navigate,s=Ds(a.navigate,i,(...l)=>{let[d,f]=l;return{to:typeof d=="number"||typeof d=="string"?d:d?Ta(d):".",...u0(e,f??{})}});s&&(s[Gi]=i,e.navigate=s)}if(a.fetch.length>0){let i=e.fetch[Gi]??e.fetch,s=Ds(a.fetch,i,(...l)=>{let[d,,f,p]=l;return{href:f??".",fetcherKey:d,...u0(e,p??{})}});s&&(s[Gi]=i,e.fetch=s)}return e}function Ds(e,t,a){return e.length===0?null:async(...i)=>{let s=await CS(e,a(...i),()=>t(...i),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function CS(e,t,a,i){let s=e[i],l;if(s){let d,f=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=CS(e,t,a,i-1),l=await d,pt(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await s(f,t)}catch(p){console.error("An instrumentation function threw an error:",p)}d||await f(),await d}else try{l={type:"success",value:await a()}}catch(d){l={type:"error",value:d}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function c0(e){let{request:t,context:a,params:i,unstable_pattern:s}=e;return{request:OA(t),params:{...i},unstable_pattern:s,context:jA(a)}}function u0(e,t){return{currentUrl:Ta(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function OA(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function jA(e){if(_A(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var MA=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function _A(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===MA}var TS=["POST","PUT","PATCH","DELETE"],kA=new Set(TS),LA=["GET",...TS],IA=new Set(LA),RS=new Set([301,302,303,307,308]),zA=new Set([307,308]),Km={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},UA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},PA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),NS="remix-router-transitions",AS=Symbol("ResetLoaderData");function YA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,a=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";pt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=e.hydrationRouteProperties||[],s=e.mapRouteProperties||PA,l=s;if(e.unstable_instrumentations){let L=e.unstable_instrumentations;l=B=>({...s(B),...AA(L.map(q=>q.route).filter(Boolean),B)})}let d={},f=lc(e.routes,l,void 0,d),p,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=e.dataStrategy||GA,v={...e.future},w=null,b=new Set,C=null,E=null,T=null,N=e.hydrationData!=null,R=Hi(f,e.history.location,m),O=!1,j=null,I;if(R==null&&!e.patchRoutesOnNavigation){let L=Kr(404,{pathname:e.history.location.pathname}),{matches:B,route:q}=Hu(f);I=!0,R=B,j={[q.id]:L}}else if(R&&!e.hydrationData&&Pr(R,f,e.history.location.pathname).active&&(R=null),R)if(R.some(L=>L.route.lazy))I=!1;else if(!R.some(L=>ig(L.route)))I=!0;else{let L=e.hydrationData?e.hydrationData.loaderData:null,B=e.hydrationData?e.hydrationData.errors:null;if(B){let q=R.findIndex(he=>B[he.route.id]!==void 0);I=R.slice(0,q+1).every(he=>!Rp(he.route,L,B))}else I=R.every(q=>!Rp(q.route,L,B))}else{I=!1,R=[];let L=Pr(null,f,e.history.location.pathname);L.active&&L.matches&&(O=!0,R=L.matches)}let P,A={historyAction:e.history.action,location:e.history.location,matches:R,initialized:I,navigation:Km,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||j,fetchers:new Map,blockers:new Map},_="POP",Z=null,ne=!1,ae,fe=!1,pe=new Map,ce=null,F=!1,k=!1,X=new Set,z=new Map,K=0,oe=-1,M=new Map,V=new Set,Q=new Map,ee=new Map,re=new Set,we=new Map,de,ye=null;function Fe(){if(w=e.history.listen(({action:L,location:B,delta:q})=>{if(de){de(),de=void 0;return}gn(we.size===0||q!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=Kn({currentLocation:A.location,nextLocation:B,historyAction:L});if(he&&q!=null){let ge=new Promise(Ye=>{de=Ye});e.history.go(q*-1),st(he,{state:"blocked",location:B,proceed(){st(he,{state:"proceeding",proceed:void 0,reset:void 0,location:B}),ge.then(()=>e.history.go(q))},reset(){let Ye=new Map(A.blockers);Ye.set(he,Pl),me({blockers:Ye})}}),Z?.resolve(),Z=null;return}return xe(L,B)}),a){cD(t,pe);let L=()=>uD(t,pe);t.addEventListener("pagehide",L),ce=()=>t.removeEventListener("pagehide",L)}return A.initialized||xe("POP",A.location,{initialHydration:!0}),P}function ve(){w&&w(),ce&&ce(),b.clear(),ae&&ae.abort(),A.fetchers.forEach((L,B)=>vn(B)),A.blockers.forEach((L,B)=>Yn(B))}function te(L){return b.add(L),()=>b.delete(L)}function me(L,B={}){L.matches&&(L.matches=L.matches.map(ge=>{let Ye=d[ge.route.id],Ee=ge.route;return Ee.element!==Ye.element||Ee.errorElement!==Ye.errorElement||Ee.hydrateFallbackElement!==Ye.hydrateFallbackElement?{...ge,route:Ye}:ge})),A={...A,...L};let q=[],he=[];A.fetchers.forEach((ge,Ye)=>{ge.state==="idle"&&(re.has(Ye)?q.push(Ye):he.push(Ye))}),re.forEach(ge=>{!A.fetchers.has(ge)&&!z.has(ge)&&q.push(ge)}),[...b].forEach(ge=>ge(A,{deletedFetchers:q,newErrors:L.errors??null,viewTransitionOpts:B.viewTransitionOpts,flushSync:B.flushSync===!0})),q.forEach(ge=>vn(ge)),he.forEach(ge=>A.fetchers.delete(ge))}function be(L,B,{flushSync:q}={}){let he=A.actionData!=null&&A.navigation.formMethod!=null&&Jn(A.navigation.formMethod)&&A.navigation.state==="loading"&&L.state?._isRedirect!==!0,ge;B.actionData?Object.keys(B.actionData).length>0?ge=B.actionData:ge=null:he?ge=A.actionData:ge=null;let Ye=B.loaderData?b0(A.loaderData,B.loaderData,B.matches||[],B.errors):A.loaderData,Ee=A.blockers;Ee.size>0&&(Ee=new Map(Ee),Ee.forEach((He,Le)=>Ee.set(Le,Pl)));let Se=F?!1:Ur(L,B.matches||A.matches),Ce=ne===!0||A.navigation.formMethod!=null&&Jn(A.navigation.formMethod)&&L.state?._isRedirect!==!0;p&&(f=p,p=void 0),F||_==="POP"||(_==="PUSH"?e.history.push(L,L.state):_==="REPLACE"&&e.history.replace(L,L.state));let ze;if(_==="POP"){let He=pe.get(A.location.pathname);He&&He.has(L.pathname)?ze={currentLocation:A.location,nextLocation:L}:pe.has(L.pathname)&&(ze={currentLocation:L,nextLocation:A.location})}else if(fe){let He=pe.get(A.location.pathname);He?He.add(L.pathname):(He=new Set([L.pathname]),pe.set(A.location.pathname,He)),ze={currentLocation:A.location,nextLocation:L}}me({...B,actionData:ge,loaderData:Ye,historyAction:_,location:L,initialized:!0,navigation:Km,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:Ce,blockers:Ee},{viewTransitionOpts:ze,flushSync:q===!0}),_="POP",ne=!1,fe=!1,F=!1,k=!1,Z?.resolve(),Z=null,ye?.resolve(),ye=null}async function et(L,B){if(Z?.resolve(),Z=null,typeof L=="number"){Z||(Z=C0());let yt=Z.promise;return e.history.go(L),yt}let q=Tp(A.location,A.matches,m,L,B?.fromRouteId,B?.relative),{path:he,submission:ge,error:Ye}=d0(!1,q,B),Ee=A.location,Se=sc(A.location,he,B&&B.state);Se={...Se,...e.history.encodeLocation(Se)};let Ce=B&&B.replace!=null?B.replace:void 0,ze="PUSH";Ce===!0?ze="REPLACE":Ce===!1||ge!=null&&Jn(ge.formMethod)&&ge.formAction===A.location.pathname+A.location.search&&(ze="REPLACE");let He=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,Le=(B&&B.flushSync)===!0,St=Kn({currentLocation:Ee,nextLocation:Se,historyAction:ze});if(St){st(St,{state:"blocked",location:Se,proceed(){st(St,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),et(L,B)},reset(){let yt=new Map(A.blockers);yt.set(St,Pl),me({blockers:yt})}});return}await xe(ze,Se,{submission:ge,pendingError:Ye,preventScrollReset:He,replace:B&&B.replace,enableViewTransition:B&&B.viewTransition,flushSync:Le,callSiteDefaultShouldRevalidate:B&&B.unstable_defaultShouldRevalidate})}function Te(){ye||(ye=C0()),at(),me({revalidation:"loading"});let L=ye.promise;return A.navigation.state==="submitting"?L:A.navigation.state==="idle"?(xe(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),L):(xe(_||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:fe===!0}),L)}async function xe(L,B,q){ae&&ae.abort(),ae=null,_=L,F=(q&&q.startUninterruptedRevalidation)===!0,Sr(A.location,A.matches),ne=(q&&q.preventScrollReset)===!0,fe=(q&&q.enableViewTransition)===!0;let he=p||f,ge=q&&q.overrideNavigation,Ye=q?.initialHydration&&A.matches&&A.matches.length>0&&!O?A.matches:Hi(he,B,m),Ee=(q&&q.flushSync)===!0;if(Ye&&A.initialized&&!k&&JA(A.location,B)&&!(q&&q.submission&&Jn(q.submission.formMethod))){be(B,{matches:Ye},{flushSync:Ee});return}let Se=Pr(Ye,he,B.pathname);if(Se.active&&Se.matches&&(Ye=Se.matches),!Ye){let{error:qt,notFoundMatches:en,route:ht}=Zt(B.pathname);be(B,{matches:en,loaderData:{},errors:{[ht.id]:qt}},{flushSync:Ee});return}ae=new AbortController;let Ce=Ns(e.history,B,ae.signal,q&&q.submission),ze=e.getContext?await e.getContext():new i0,He;if(q&&q.pendingError)He=[Vi(Ye).route.id,{type:"error",error:q.pendingError}];else if(q&&q.submission&&Jn(q.submission.formMethod)){let qt=await _e(Ce,B,q.submission,Ye,ze,Se.active,q&&q.initialHydration===!0,{replace:q.replace,flushSync:Ee});if(qt.shortCircuited)return;if(qt.pendingActionResult){let[en,ht]=qt.pendingActionResult;if(jr(ht)&&cc(ht.error)&&ht.error.status===404){ae=null,be(B,{matches:qt.matches,loaderData:{},errors:{[en]:ht.error}});return}}Ye=qt.matches||Ye,He=qt.pendingActionResult,ge=$m(B,q.submission),Ee=!1,Se.active=!1,Ce=Ns(e.history,Ce.url,Ce.signal)}let{shortCircuited:Le,matches:St,loaderData:yt,errors:Jt}=await dt(Ce,B,Ye,ze,Se.active,ge,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Ee,He,q&&q.callSiteDefaultShouldRevalidate);Le||(ae=null,be(B,{matches:St||Ye,...w0(He),loaderData:yt,errors:Jt}))}async function _e(L,B,q,he,ge,Ye,Ee,Se={}){at();let Ce=sD(B,q);if(me({navigation:Ce},{flushSync:Se.flushSync===!0}),Ye){let Le=await Mn(he,B.pathname,L.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:yt,route:Jt}=Hu(f);return{matches:yt,pendingActionResult:[Jt.id,{type:"error",error:Le.error}]}}let St=Vi(Le.partialMatches).route.id;return{matches:Le.partialMatches,pendingActionResult:[St,{type:"error",error:Le.error}]}}else if(Le.matches)he=Le.matches;else{let{notFoundMatches:St,error:yt,route:Jt}=Zt(B.pathname);return{matches:St,pendingActionResult:[Jt.id,{type:"error",error:yt}]}}}let ze,He=gd(he,B);if(!He.route.action&&!He.route.lazy)ze={type:"error",error:Kr(405,{method:L.method,pathname:B.pathname,routeId:He.route.id})};else{let Le=js(l,d,L,he,He,Ee?[]:i,ge),St=await ke(L,Le,ge,null);if(ze=St[He.route.id],!ze){for(let yt of he)if(St[yt.route.id]){ze=St[yt.route.id];break}}if(L.signal.aborted)return{shortCircuited:!0}}if(Ro(ze)){let Le;return Se&&Se.replace!=null?Le=Se.replace:Le=y0(ze.response.headers.get("Location"),new URL(L.url),m,e.history)===A.location.pathname+A.location.search,await Ne(L,ze,!0,{submission:q,replace:Le}),{shortCircuited:!0}}if(jr(ze)){let Le=Vi(he,He.route.id);return(Se&&Se.replace)!==!0&&(_="PUSH"),{matches:he,pendingActionResult:[Le.route.id,ze,He.route.id]}}return{matches:he,pendingActionResult:[He.route.id,ze]}}async function dt(L,B,q,he,ge,Ye,Ee,Se,Ce,ze,He,Le,St){let yt=Ye||$m(B,Ee),Jt=Ee||Se||E0(yt),qt=!F&&!ze;if(ge){if(qt){let $t=tt(Le);me({navigation:yt,...$t!==void 0?{actionData:$t}:{}},{flushSync:He})}let vt=await Mn(q,B.pathname,L.signal);if(vt.type==="aborted")return{shortCircuited:!0};if(vt.type==="error"){if(vt.partialMatches.length===0){let{matches:rr,route:xn}=Hu(f);return{matches:rr,loaderData:{},errors:{[xn.id]:vt.error}}}let $t=Vi(vt.partialMatches).route.id;return{matches:vt.partialMatches,loaderData:{},errors:{[$t]:vt.error}}}else if(vt.matches)q=vt.matches;else{let{error:$t,notFoundMatches:rr,route:xn}=Zt(B.pathname);return{matches:rr,loaderData:{},errors:{[xn.id]:$t}}}}let en=p||f,{dsMatches:ht,revalidatingFetchers:Cn}=f0(L,he,l,d,e.history,A,q,Jt,B,ze?[]:i,ze===!0,k,X,re,Q,V,en,m,e.patchRoutesOnNavigation!=null,Le,St);if(oe=++K,!e.dataStrategy&&!ht.some(vt=>vt.shouldLoad)&&!ht.some(vt=>vt.route.middleware&&vt.route.middleware.length>0)&&Cn.length===0){let vt=rn();return be(B,{matches:q,loaderData:{},errors:Le&&jr(Le[1])?{[Le[0]]:Le[1].error}:null,...w0(Le),...vt?{fetchers:new Map(A.fetchers)}:{}},{flushSync:He}),{shortCircuited:!0}}if(qt){let vt={};if(!ge){vt.navigation=yt;let $t=tt(Le);$t!==void 0&&(vt.actionData=$t)}Cn.length>0&&(vt.fetchers=ot(Cn)),me(vt,{flushSync:He})}Cn.forEach(vt=>{De(vt.key),vt.controller&&z.set(vt.key,vt.controller)});let kn=()=>Cn.forEach(vt=>De(vt.key));ae&&ae.signal.addEventListener("abort",kn);let{loaderResults:Wt,fetcherResults:an}=await rt(ht,Cn,L,he);if(L.signal.aborted)return{shortCircuited:!0};ae&&ae.signal.removeEventListener("abort",kn),Cn.forEach(vt=>z.delete(vt.key));let Kt=Vu(Wt);if(Kt)return await Ne(L,Kt.result,!0,{replace:Ce}),{shortCircuited:!0};if(Kt=Vu(an),Kt)return V.add(Kt.key),await Ne(L,Kt.result,!0,{replace:Ce}),{shortCircuited:!0};let{loaderData:Bn,errors:Hn}=x0(A,q,Wt,Le,Cn,an);ze&&A.errors&&(Hn={...A.errors,...Hn});let Jr=rn(),ea=Pt(oe),ta=Jr||ea||Cn.length>0;return{matches:q,loaderData:Bn,errors:Hn,...ta?{fetchers:new Map(A.fetchers)}:{}}}function tt(L){if(L&&!jr(L[1]))return{[L[0]]:L[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function ot(L){return L.forEach(B=>{let q=A.fetchers.get(B.key),he=Yl(void 0,q?q.data:void 0);A.fetchers.set(B.key,he)}),new Map(A.fetchers)}async function Re(L,B,q,he){De(L);let ge=(he&&he.flushSync)===!0,Ye=p||f,Ee=Tp(A.location,A.matches,m,q,B,he?.relative),Se=Hi(Ye,Ee,m),Ce=Pr(Se,Ye,Ee);if(Ce.active&&Ce.matches&&(Se=Ce.matches),!Se){gt(L,B,Kr(404,{pathname:Ee}),{flushSync:ge});return}let{path:ze,submission:He,error:Le}=d0(!0,Ee,he);if(Le){gt(L,B,Le,{flushSync:ge});return}let St=e.getContext?await e.getContext():new i0,yt=(he&&he.preventScrollReset)===!0;if(He&&Jn(He.formMethod)){await qe(L,B,ze,Se,St,Ce.active,ge,yt,He,he&&he.unstable_defaultShouldRevalidate);return}Q.set(L,{routeId:B,path:ze}),await Oe(L,B,ze,Se,St,Ce.active,ge,yt,He)}async function qe(L,B,q,he,ge,Ye,Ee,Se,Ce,ze){at(),Q.delete(L);let He=A.fetchers.get(L);Be(L,lD(Ce,He),{flushSync:Ee});let Le=new AbortController,St=Ns(e.history,q,Le.signal,Ce);if(Ye){let xt=await Mn(he,new URL(St.url).pathname,St.signal,L);if(xt.type==="aborted")return;if(xt.type==="error"){gt(L,B,xt.error,{flushSync:Ee});return}else if(xt.matches)he=xt.matches;else{gt(L,B,Kr(404,{pathname:q}),{flushSync:Ee});return}}let yt=gd(he,q);if(!yt.route.action&&!yt.route.lazy){let xt=Kr(405,{method:Ce.formMethod,pathname:q,routeId:B});gt(L,B,xt,{flushSync:Ee});return}z.set(L,Le);let Jt=K,qt=js(l,d,St,he,yt,i,ge),en=await ke(St,qt,ge,L),ht=en[yt.route.id];if(!ht){for(let xt of qt)if(en[xt.route.id]){ht=en[xt.route.id];break}}if(St.signal.aborted){z.get(L)===Le&&z.delete(L);return}if(re.has(L)){if(Ro(ht)||jr(ht)){Be(L,Ja(void 0));return}}else{if(Ro(ht))if(z.delete(L),oe>Jt){Be(L,Ja(void 0));return}else return V.add(L),Be(L,Yl(Ce)),Ne(St,ht,!1,{fetcherSubmission:Ce,preventScrollReset:Se});if(jr(ht)){gt(L,B,ht.error);return}}let Cn=A.navigation.location||A.location,kn=Ns(e.history,Cn,Le.signal),Wt=p||f,an=A.navigation.state!=="idle"?Hi(Wt,A.navigation.location,m):A.matches;pt(an,"Didn't find any matches after fetcher action");let Kt=++K;M.set(L,Kt);let Bn=Yl(Ce,ht.data);A.fetchers.set(L,Bn);let{dsMatches:Hn,revalidatingFetchers:Jr}=f0(kn,ge,l,d,e.history,A,an,Ce,Cn,i,!1,k,X,re,Q,V,Wt,m,e.patchRoutesOnNavigation!=null,[yt.route.id,ht],ze);Jr.filter(xt=>xt.key!==L).forEach(xt=>{let ja=xt.key,Vo=A.fetchers.get(ja),ao=Yl(void 0,Vo?Vo.data:void 0);A.fetchers.set(ja,ao),De(ja),xt.controller&&z.set(ja,xt.controller)}),me({fetchers:new Map(A.fetchers)});let ea=()=>Jr.forEach(xt=>De(xt.key));Le.signal.addEventListener("abort",ea);let{loaderResults:ta,fetcherResults:vt}=await rt(Hn,Jr,kn,ge);if(Le.signal.aborted)return;if(Le.signal.removeEventListener("abort",ea),M.delete(L),z.delete(L),Jr.forEach(xt=>z.delete(xt.key)),A.fetchers.has(L)){let xt=Ja(ht.data);A.fetchers.set(L,xt)}let $t=Vu(ta);if($t)return Ne(kn,$t.result,!1,{preventScrollReset:Se});if($t=Vu(vt),$t)return V.add($t.key),Ne(kn,$t.result,!1,{preventScrollReset:Se});let{loaderData:rr,errors:xn}=x0(A,an,ta,void 0,Jr,vt);Pt(Kt),A.navigation.state==="loading"&&Kt>oe?(pt(_,"Expected pending action"),ae&&ae.abort(),be(A.navigation.location,{matches:an,loaderData:rr,errors:xn,fetchers:new Map(A.fetchers)})):(me({errors:xn,loaderData:b0(A.loaderData,rr,an,xn),fetchers:new Map(A.fetchers)}),k=!1)}async function Oe(L,B,q,he,ge,Ye,Ee,Se,Ce){let ze=A.fetchers.get(L);Be(L,Yl(Ce,ze?ze.data:void 0),{flushSync:Ee});let He=new AbortController,Le=Ns(e.history,q,He.signal);if(Ye){let ht=await Mn(he,new URL(Le.url).pathname,Le.signal,L);if(ht.type==="aborted")return;if(ht.type==="error"){gt(L,B,ht.error,{flushSync:Ee});return}else if(ht.matches)he=ht.matches;else{gt(L,B,Kr(404,{pathname:q}),{flushSync:Ee});return}}let St=gd(he,q);z.set(L,He);let yt=K,Jt=js(l,d,Le,he,St,i,ge),en=(await ke(Le,Jt,ge,L))[St.route.id];if(z.get(L)===He&&z.delete(L),!Le.signal.aborted){if(re.has(L)){Be(L,Ja(void 0));return}if(Ro(en))if(oe>yt){Be(L,Ja(void 0));return}else{V.add(L),await Ne(Le,en,!1,{preventScrollReset:Se});return}if(jr(en)){gt(L,B,en.error);return}Be(L,Ja(en.data))}}async function Ne(L,B,q,{submission:he,fetcherSubmission:ge,preventScrollReset:Ye,replace:Ee}={}){q||(Z?.resolve(),Z=null),B.response.headers.has("X-Remix-Revalidate")&&(k=!0);let Se=B.response.headers.get("Location");pt(Se,"Expected a Location header on the redirect Response"),Se=y0(Se,new URL(L.url),m,e.history);let Ce=sc(A.location,Se,{_isRedirect:!0});if(a){let Jt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))Jt=!0;else if(of(Se)){const qt=yS(Se,!0);Jt=qt.origin!==t.location.origin||Qr(qt.pathname,m)==null}if(Jt){Ee?t.location.replace(Se):t.location.assign(Se);return}}ae=null;let ze=Ee===!0||B.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:He,formAction:Le,formEncType:St}=A.navigation;!he&&!ge&&He&&Le&&St&&(he=E0(A.navigation));let yt=he||ge;if(zA.has(B.response.status)&&yt&&Jn(yt.formMethod))await xe(ze,Ce,{submission:{...yt,formAction:Se},preventScrollReset:Ye||ne,enableViewTransition:q?fe:void 0});else{let Jt=$m(Ce,he);await xe(ze,Ce,{overrideNavigation:Jt,fetcherSubmission:ge,preventScrollReset:Ye||ne,enableViewTransition:q?fe:void 0})}}async function ke(L,B,q,he){let ge,Ye={};try{ge=await WA(y,L,B,he,q,!1)}catch(Ee){return B.filter(Se=>Se.shouldLoad).forEach(Se=>{Ye[Se.route.id]={type:"error",error:Ee}}),Ye}if(L.signal.aborted)return Ye;if(!Jn(L.method))for(let Ee of B){if(ge[Ee.route.id]?.type==="error")break;!ge.hasOwnProperty(Ee.route.id)&&!A.loaderData.hasOwnProperty(Ee.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Ee.route.id))&&Ee.shouldCallHandler()&&(ge[Ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ee.route.id}`)})}for(let[Ee,Se]of Object.entries(ge))if(rD(Se)){let Ce=Se.result;Ye[Ee]={type:"redirect",response:QA(Ce,L,Ee,B,m)}}else Ye[Ee]=await XA(Se);return Ye}async function rt(L,B,q,he){let ge=ke(q,L,he,null),Ye=Promise.all(B.map(async Ce=>{if(Ce.matches&&Ce.match&&Ce.request&&Ce.controller){let He=(await ke(Ce.request,Ce.matches,he,Ce.key))[Ce.match.route.id];return{[Ce.key]:He}}else return Promise.resolve({[Ce.key]:{type:"error",error:Kr(404,{pathname:Ce.path})}})})),Ee=await ge,Se=(await Ye).reduce((Ce,ze)=>Object.assign(Ce,ze),{});return{loaderResults:Ee,fetcherResults:Se}}function at(){k=!0,Q.forEach((L,B)=>{z.has(B)&&X.add(B),De(B)})}function Be(L,B,q={}){A.fetchers.set(L,B),me({fetchers:new Map(A.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function gt(L,B,q,he={}){let ge=Vi(A.matches,B);vn(L),me({errors:{[ge.route.id]:q},fetchers:new Map(A.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function Gt(L){return ee.set(L,(ee.get(L)||0)+1),re.has(L)&&re.delete(L),A.fetchers.get(L)||UA}function yn(L,B){De(L,B?.reason),Be(L,Ja(null))}function vn(L){let B=A.fetchers.get(L);z.has(L)&&!(B&&B.state==="loading"&&M.has(L))&&De(L),Q.delete(L),M.delete(L),V.delete(L),re.delete(L),X.delete(L),A.fetchers.delete(L)}function jt(L){let B=(ee.get(L)||0)-1;B<=0?(ee.delete(L),re.add(L)):ee.set(L,B),me({fetchers:new Map(A.fetchers)})}function De(L,B){let q=z.get(L);q&&(q.abort(B),z.delete(L))}function jn(L){for(let B of L){let q=Gt(B),he=Ja(q.data);A.fetchers.set(B,he)}}function rn(){let L=[],B=!1;for(let q of V){let he=A.fetchers.get(q);pt(he,`Expected fetcher: ${q}`),he.state==="loading"&&(V.delete(q),L.push(q),B=!0)}return jn(L),B}function Pt(L){let B=[];for(let[q,he]of M)if(he<L){let ge=A.fetchers.get(q);pt(ge,`Expected fetcher: ${q}`),ge.state==="loading"&&(De(q),M.delete(q),B.push(q))}return jn(B),B.length>0}function Mt(L,B){let q=A.blockers.get(L)||Pl;return we.get(L)!==B&&we.set(L,B),q}function Yn(L){A.blockers.delete(L),we.delete(L)}function st(L,B){let q=A.blockers.get(L)||Pl;pt(q.state==="unblocked"&&B.state==="blocked"||q.state==="blocked"&&B.state==="blocked"||q.state==="blocked"&&B.state==="proceeding"||q.state==="blocked"&&B.state==="unblocked"||q.state==="proceeding"&&B.state==="unblocked",`Invalid blocker state transition: ${q.state} -> ${B.state}`);let he=new Map(A.blockers);he.set(L,B),me({blockers:he})}function Kn({currentLocation:L,nextLocation:B,historyAction:q}){if(we.size===0)return;we.size>1&&gn(!1,"A router only supports one blocker at a time");let he=Array.from(we.entries()),[ge,Ye]=he[he.length-1],Ee=A.blockers.get(ge);if(!(Ee&&Ee.state==="proceeding")&&Ye({currentLocation:L,nextLocation:B,historyAction:q}))return ge}function Zt(L){let B=Kr(404,{pathname:L}),q=p||f,{matches:he,route:ge}=Hu(q);return{notFoundMatches:he,route:ge,error:B}}function Lt(L,B,q){if(C=L,T=B,E=q||null,!N&&A.navigation===Km){N=!0;let he=Ur(A.location,A.matches);he!=null&&me({restoreScrollPosition:he})}return()=>{C=null,T=null,E=null}}function nr(L,B){return E&&E(L,B.map(he=>uA(he,A.loaderData)))||L.key}function Sr(L,B){if(C&&T){let q=nr(L,B);C[q]=T()}}function Ur(L,B){if(C){let q=nr(L,B),he=C[q];if(typeof he=="number")return he}return null}function Pr(L,B,q){if(e.patchRoutesOnNavigation)if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:$l(B,q,m,!0)}}else return{active:!0,matches:$l(B,q,m,!0)||[]};return{active:!1,matches:null}}async function Mn(L,B,q,he){if(!e.patchRoutesOnNavigation)return{type:"success",matches:L};let ge=L;for(;;){let Ye=p==null,Ee=p||f,Se=d;try{await e.patchRoutesOnNavigation({signal:q,path:B,matches:ge,fetcherKey:he,patch:(He,Le)=>{q.aborted||h0(He,Le,Ee,Se,l,!1)}})}catch(He){return{type:"error",error:He,partialMatches:ge}}finally{Ye&&!q.aborted&&(f=[...f])}if(q.aborted)return{type:"aborted"};let Ce=Hi(Ee,B,m),ze=null;if(Ce){if(Object.keys(Ce[0].params).length===0)return{type:"success",matches:Ce};if(ze=$l(Ee,B,m,!0),!(ze&&ge.length<ze.length&&$n(ge,ze.slice(0,ge.length))))return{type:"success",matches:Ce}}if(ze||(ze=$l(Ee,B,m,!0)),!ze||$n(ge,ze))return{type:"success",matches:null};ge=ze}}function $n(L,B){return L.length===B.length&&L.every((q,he)=>q.route.id===B[he].route.id)}function _n(L){d={},p=lc(L,l,void 0,d)}function Je(L,B,q=!1){let he=p==null;h0(L,B,p||f,d,l,q),he&&(f=[...f],me({}))}return P={get basename(){return m},get future(){return v},get state(){return A},get routes(){return f},get window(){return t},initialize:Fe,subscribe:te,enableScrollRestoration:Lt,navigate:et,fetch:Re,revalidate:Te,createHref:L=>e.history.createHref(L),encodeLocation:L=>e.history.encodeLocation(L),getFetcher:Gt,resetFetcher:yn,deleteFetcher:jt,dispose:ve,getBlocker:Mt,deleteBlocker:Yn,patchRoutes:Je,_internalFetchControllers:z,_internalSetRoutes:_n,_internalSetStateDoNotUseOrYouWillBreakYourApp(L){me(L)}},e.unstable_instrumentations&&(P=DA(P,e.unstable_instrumentations.map(L=>L.router).filter(Boolean))),P}function BA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Tp(e,t,a,i,s,l){let d,f;if(s){d=[];for(let m of t)if(d.push(m),m.route.id===s){f=m;break}}else d=t,f=t[t.length-1];let p=lf(i||".",sf(d),Qr(e.pathname,a)||e.pathname,l==="path");if(i==null&&(p.search=e.search,p.hash=e.hash),(i==null||i===""||i===".")&&f){let m=sg(p.search);if(f.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let y=new URLSearchParams(p.search),v=y.getAll("index");y.delete("index"),v.filter(b=>b).forEach(b=>y.append("index",b));let w=y.toString();p.search=w?`?${w}`:""}}return a!=="/"&&(p.pathname=EA({basename:a,pathname:p.pathname})),Ta(p)}function d0(e,t,a){if(!a||!BA(a))return{path:t};if(a.formMethod&&!oD(a.formMethod))return{path:t,error:Kr(405,{method:a.formMethod})};let i=()=>({path:t,error:Kr(400,{type:"invalid-body"})}),l=(a.formMethod||"get").toUpperCase(),d=kS(t);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Jn(l))return i();let v=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((w,[b,C])=>`${w}${b}=${C}
|
|
10
|
+
`,""):String(a.body);return{path:t,submission:{formMethod:l,formAction:d,formEncType:a.formEncType,formData:void 0,json:void 0,text:v}}}else if(a.formEncType==="application/json"){if(!Jn(l))return i();try{let v=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:t,submission:{formMethod:l,formAction:d,formEncType:a.formEncType,formData:void 0,json:v,text:void 0}}}catch{return i()}}}pt(typeof FormData=="function","FormData is not available in this environment");let f,p;if(a.formData)f=Ap(a.formData),p=a.formData;else if(a.body instanceof FormData)f=Ap(a.body),p=a.body;else if(a.body instanceof URLSearchParams)f=a.body,p=v0(f);else if(a.body==null)f=new URLSearchParams,p=new FormData;else try{f=new URLSearchParams(a.body),p=v0(f)}catch{return i()}let m={formMethod:l,formAction:d,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Jn(m.formMethod))return{path:t,submission:m};let y=eo(t);return e&&y.search&&sg(y.search)&&f.append("index",""),y.search=`?${f}`,{path:Ta(y),submission:m}}function f0(e,t,a,i,s,l,d,f,p,m,y,v,w,b,C,E,T,N,R,O,j){let I=O?jr(O[1])?O[1].error:O[1].data:void 0,P=s.createURL(l.location),A=s.createURL(p),_;if(y&&l.errors){let F=Object.keys(l.errors)[0];_=d.findIndex(k=>k.route.id===F)}else if(O&&jr(O[1])){let F=O[0];_=d.findIndex(k=>k.route.id===F)-1}let Z=O?O[1].statusCode:void 0,ne=Z&&Z>=400,ae={currentUrl:P,currentParams:l.matches[0]?.params||{},nextUrl:A,nextParams:d[0].params,...f,actionResult:I,actionStatus:Z},fe=bc(d),pe=d.map((F,k)=>{let{route:X}=F,z=null;if(_!=null&&k>_?z=!1:X.lazy?z=!0:ig(X)?y?z=Rp(X,l.loaderData,l.errors):HA(l.loaderData,l.matches[k],F)&&(z=!0):z=!1,z!==null)return Np(a,i,e,fe,F,m,t,z);let K=!1;typeof j=="boolean"?K=j:ne?K=!1:(v||P.pathname+P.search===A.pathname+A.search||P.search!==A.search||VA(l.matches[k],F))&&(K=!0);let oe={...ae,defaultShouldRevalidate:K},M=ec(F,oe);return Np(a,i,e,fe,F,m,t,M,oe,j)}),ce=[];return C.forEach((F,k)=>{if(y||!d.some(ee=>ee.route.id===F.routeId)||b.has(k))return;let X=l.fetchers.get(k),z=X&&X.state!=="idle"&&X.data===void 0,K=Hi(T,F.path,N);if(!K){if(R&&z)return;ce.push({key:k,routeId:F.routeId,path:F.path,matches:null,match:null,request:null,controller:null});return}if(E.has(k))return;let oe=gd(K,F.path),M=new AbortController,V=Ns(s,F.path,M.signal),Q=null;if(w.has(k))w.delete(k),Q=js(a,i,V,K,oe,m,t);else if(z)v&&(Q=js(a,i,V,K,oe,m,t));else{let ee;typeof j=="boolean"?ee=j:ne?ee=!1:ee=v;let re={...ae,defaultShouldRevalidate:ee};ec(oe,re)&&(Q=js(a,i,V,K,oe,m,t,re))}Q&&ce.push({key:k,routeId:F.routeId,path:F.path,matches:Q,match:oe,request:V,controller:M})}),{dsMatches:pe,revalidatingFetchers:ce}}function ig(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Rp(e,t,a){if(e.lazy)return!0;if(!ig(e))return!1;let i=t!=null&&e.id in t,s=a!=null&&a[e.id]!==void 0;return!i&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!i&&!s}function HA(e,t,a){let i=!t||a.route.id!==t.route.id,s=!e.hasOwnProperty(a.route.id);return i||s}function VA(e,t){let a=e.route.path;return e.pathname!==t.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==t.params["*"]}function ec(e,t){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(t);if(typeof a=="boolean")return a}return t.defaultShouldRevalidate}function h0(e,t,a,i,s,l){let d;if(e){let m=i[e];pt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),d=m.children}else d=a;let f=[],p=[];if(t.forEach(m=>{let y=d.find(v=>DS(m,v));y?p.push({existingRoute:y,newRoute:m}):f.push(m)}),f.length>0){let m=lc(f,s,[e||"_","patch",String(d?.length||"0")],i);d.push(...m)}if(l&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:y,newRoute:v}=p[m],w=y,[b]=lc([v],s,[],{},!0);Object.assign(w,{element:b.element?b.element:w.element,errorElement:b.errorElement?b.errorElement:w.errorElement,hydrateFallbackElement:b.hydrateFallbackElement?b.hydrateFallbackElement:w.hydrateFallbackElement})}}function DS(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((a,i)=>t.children?.some(s=>DS(a,s))):!1}var m0=new WeakMap,OS=({key:e,route:t,manifest:a,mapRouteProperties:i})=>{let s=a[t.id];if(pt(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let l=s.lazy[e];if(!l)return;let d=m0.get(s);d||(d={},m0.set(s,d));let f=d[e];if(f)return f;let p=(async()=>{let m=oA(e),v=s[e]!==void 0&&e!=="hasErrorBoundary";if(m)gn(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),d[e]=Promise.resolve();else if(v)gn(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let w=await l();w!=null&&(Object.assign(s,{[e]:w}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(w=>w===void 0)&&(s.lazy=void 0))})();return d[e]=p,p},p0=new WeakMap;function FA(e,t,a,i,s){let l=a[e.id];if(pt(l,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=p0.get(l);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let v=(async()=>{pt(typeof e.lazy=="function","No lazy route function found");let w=await e.lazy(),b={};for(let C in w){let E=w[C];if(E===void 0)continue;let T=lA(C),R=l[C]!==void 0&&C!=="hasErrorBoundary";T?gn(!T,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?gn(!R,`Route "${l.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):b[C]=E}Object.assign(l,b),Object.assign(l,{...i(l),lazy:void 0})})();return p0.set(l,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let d=Object.keys(e.lazy),f=[],p;for(let y of d){if(s&&s.includes(y))continue;let v=OS({key:y,route:e,manifest:a,mapRouteProperties:i});v&&(f.push(v),y===t&&(p=v))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function g0(e){let t=e.matches.filter(s=>s.shouldLoad),a={};return(await Promise.all(t.map(s=>s.resolve()))).forEach((s,l)=>{a[t[l].route.id]=s}),a}async function GA(e){return e.matches.some(t=>t.route.middleware)?jS(e,()=>g0(e)):g0(e)}function jS(e,t){return qA(e,t,i=>{if(iD(i))throw i;return i},tD,a);function a(i,s,l){if(l)return Promise.resolve(Object.assign(l.value,{[s]:{type:"error",result:i}}));{let{matches:d}=e,f=Math.min(Math.max(d.findIndex(m=>m.route.id===s),0),Math.max(d.findIndex(m=>m.shouldCallHandler()),0)),p=Vi(d,d[f].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:i}})}}}async function qA(e,t,a,i,s){let{matches:l,request:d,params:f,context:p,unstable_pattern:m}=e,y=l.flatMap(w=>w.route.middleware?w.route.middleware.map(b=>[w.route.id,b]):[]);return await MS({request:d,params:f,context:p,unstable_pattern:m},y,t,a,i,s)}async function MS(e,t,a,i,s,l,d=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let p=t[d];if(!p)return await a();let[m,y]=p,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await MS(e,t,a,i,s,l,d+1)},v.value}catch(b){return v={value:await l(b,m,v)},v.value}};try{let b=await y(e,w),C=b!=null?i(b):void 0;return s(C)?C:v?C??v.value:(v={value:await w()},v.value)}catch(b){return await l(b,m,v)}}function _S(e,t,a,i,s){let l=OS({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),d=FA(i.route,Jn(a.method)?"action":"loader",t,e,s);return{middleware:l,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function Np(e,t,a,i,s,l,d,f,p=null,m){let y=!1,v=_S(e,t,a,s,l);return{...s,_lazyPromises:v,shouldLoad:f,shouldRevalidateArgs:p,shouldCallHandler(w){return y=!0,p?typeof m=="boolean"?ec(s,{...p,defaultShouldRevalidate:m}):typeof w=="boolean"?ec(s,{...p,defaultShouldRevalidate:w}):ec(s,p):f},resolve(w){let{lazy:b,loader:C,middleware:E}=s.route,T=y||f||w&&!Jn(a.method)&&(b||C),N=E&&E.length>0&&!C&&!b;return T&&(Jn(a.method)||!N)?KA({request:a,unstable_pattern:i,match:s,lazyHandlerPromise:v?.handler,lazyRoutePromise:v?.route,handlerOverride:w,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function js(e,t,a,i,s,l,d,f=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:_S(e,t,a,p,l),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Np(e,t,a,bc(i),p,l,d,!0,f))}async function WA(e,t,a,i,s,l){a.some(m=>m._lazyPromises?.middleware)&&await Promise.all(a.map(m=>m._lazyPromises?.middleware));let d={request:t,unstable_pattern:bc(a),params:a[0].params,context:s,matches:a},p=await e({...d,fetcherKey:i,runClientMiddleware:m=>{let y=d;return jS(y,()=>m({...y,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function KA({request:e,unstable_pattern:t,match:a,lazyHandlerPromise:i,lazyRoutePromise:s,handlerOverride:l,scopedContext:d}){let f,p,m=Jn(e.method),y=m?"action":"loader",v=w=>{let b,C=new Promise((N,R)=>b=R);p=()=>b(),e.signal.addEventListener("abort",p);let E=N=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):w({request:e,unstable_pattern:t,params:a.params,context:d},...N!==void 0?[N]:[]),T=(async()=>{try{return{type:"data",result:await(l?l(R=>E(R)):E())}}catch(N){return{type:"error",result:N}}})();return Promise.race([T,C])};try{let w=m?a.route.action:a.route.loader;if(i||s)if(w){let b,[C]=await Promise.all([v(w).catch(E=>{b=E}),i,s]);if(b!==void 0)throw b;f=C}else{await i;let b=m?a.route.action:a.route.loader;if(b)[f]=await Promise.all([v(b),s]);else if(y==="action"){let C=new URL(e.url),E=C.pathname+C.search;throw Kr(405,{method:e.method,pathname:E,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(w)f=await v(w);else{let b=new URL(e.url),C=b.pathname+b.search;throw Kr(404,{pathname:C})}}catch(w){return{type:"error",result:w}}finally{p&&e.signal.removeEventListener("abort",p)}return f}async function $A(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function XA(e){let{result:t,type:a}=e;if(og(t)){let i;try{i=await $A(t)}catch(s){return{type:"error",error:s}}return a==="error"?{type:"error",error:new xc(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:"data",data:i,statusCode:t.status,headers:t.headers}}return a==="error"?S0(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:eD(t),statusCode:cc(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:cc(t)?t.status:void 0}:S0(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function QA(e,t,a,i,s){let l=e.headers.get("Location");if(pt(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!of(l)){let d=i.slice(0,i.findIndex(f=>f.route.id===a)+1);l=Tp(new URL(t.url),d,s,l),e.headers.set("Location",l)}return e}function y0(e,t,a,i){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(of(e)){let l=e,d=l.startsWith("//")?new URL(t.protocol+l):new URL(l);if(s.includes(d.protocol))throw new Error("Invalid redirect location");let f=Qr(d.pathname,a)!=null;if(d.origin===t.origin&&f)return d.pathname+d.search+d.hash}try{let l=i.createURL(e);if(s.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ns(e,t,a,i){let s=e.createURL(kS(t)).toString(),l={signal:a};if(i&&Jn(i.formMethod)){let{formMethod:d,formEncType:f}=i;l.method=d.toUpperCase(),f==="application/json"?(l.headers=new Headers({"Content-Type":f}),l.body=JSON.stringify(i.json)):f==="text/plain"?l.body=i.text:f==="application/x-www-form-urlencoded"&&i.formData?l.body=Ap(i.formData):l.body=i.formData}return new Request(s,l)}function Ap(e){let t=new URLSearchParams;for(let[a,i]of e.entries())t.append(a,typeof i=="string"?i:i.name);return t}function v0(e){let t=new FormData;for(let[a,i]of e.entries())t.append(a,i);return t}function ZA(e,t,a,i=!1,s=!1){let l={},d=null,f,p=!1,m={},y=a&&jr(a[1])?a[1].error:void 0;return e.forEach(v=>{if(!(v.route.id in t))return;let w=v.route.id,b=t[w];if(pt(!Ro(b),"Cannot handle redirect results in processLoaderData"),jr(b)){let C=b.error;if(y!==void 0&&(C=y,y=void 0),d=d||{},s)d[w]=C;else{let E=Vi(e,w);d[E.route.id]==null&&(d[E.route.id]=C)}i||(l[w]=AS),p||(p=!0,f=cc(b.error)?b.error.status:500),b.headers&&(m[w]=b.headers)}else l[w]=b.data,b.statusCode&&b.statusCode!==200&&!p&&(f=b.statusCode),b.headers&&(m[w]=b.headers)}),y!==void 0&&a&&(d={[a[0]]:y},a[2]&&(l[a[2]]=void 0)),{loaderData:l,errors:d,statusCode:f||200,loaderHeaders:m}}function x0(e,t,a,i,s,l){let{loaderData:d,errors:f}=ZA(t,a,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:v}=p;if(v&&v.signal.aborted)return;let w=l[m];if(pt(w,"Did not find corresponding fetcher result"),jr(w)){let b=Vi(e.matches,y?.route.id);f&&f[b.route.id]||(f={...f,[b.route.id]:w.error}),e.fetchers.delete(m)}else if(Ro(w))pt(!1,"Unhandled fetcher revalidation redirect");else{let b=Ja(w.data);e.fetchers.set(m,b)}}),{loaderData:d,errors:f}}function b0(e,t,a,i){let s=Object.entries(t).filter(([,l])=>l!==AS).reduce((l,[d,f])=>(l[d]=f,l),{});for(let l of a){let d=l.route.id;if(!t.hasOwnProperty(d)&&e.hasOwnProperty(d)&&l.route.loader&&(s[d]=e[d]),i&&i.hasOwnProperty(d))break}return s}function w0(e){return e?jr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Vi(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function Hu(e){let t=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Kr(e,{pathname:t,routeId:a,method:i,type:s,message:l}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(d="Bad Request",i&&t&&a?f=`You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:s==="invalid-body"&&(f="Unable to encode submission body")):e===403?(d="Forbidden",f=`Route "${a}" does not match URL "${t}"`):e===404?(d="Not Found",f=`No route matches URL "${t}"`):e===405&&(d="Method Not Allowed",i&&t&&a?f=`You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:i&&(f=`Invalid request method "${i.toUpperCase()}"`)),new xc(e||500,d,new Error(f),!0)}function Vu(e){let t=Object.entries(e);for(let a=t.length-1;a>=0;a--){let[i,s]=t[a];if(Ro(s))return{key:i,result:s}}}function kS(e){let t=typeof e=="string"?eo(e):e;return Ta({...t,hash:""})}function JA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function eD(e){return new xc(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function tD(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,a])=>typeof t=="string"&&nD(a))}function nD(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function rD(e){return og(e.result)&&RS.has(e.result.status)}function jr(e){return e.type==="error"}function Ro(e){return(e&&e.type)==="redirect"}function S0(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function og(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function aD(e){return RS.has(e)}function iD(e){return og(e)&&aD(e.status)&&e.headers.has("Location")}function oD(e){return IA.has(e.toUpperCase())}function Jn(e){return kA.has(e.toUpperCase())}function sg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gd(e,t){let a=typeof t=="string"?eo(t).search:t.search;if(e[e.length-1].route.index&&sg(a||""))return e[e.length-1];let i=wS(e);return i[i.length-1]}function E0(e){let{formMethod:t,formAction:a,formEncType:i,text:s,formData:l,json:d}=e;if(!(!t||!a||!i)){if(s!=null)return{formMethod:t,formAction:a,formEncType:i,formData:void 0,json:void 0,text:s};if(l!=null)return{formMethod:t,formAction:a,formEncType:i,formData:l,json:void 0,text:void 0};if(d!==void 0)return{formMethod:t,formAction:a,formEncType:i,formData:void 0,json:d,text:void 0}}}function $m(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function sD(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Yl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function lD(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ja(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function cD(e,t){try{let a=e.sessionStorage.getItem(NS);if(a){let i=JSON.parse(a);for(let[s,l]of Object.entries(i||{}))l&&Array.isArray(l)&&t.set(s,new Set(l||[]))}}catch{}}function uD(e,t){if(t.size>0){let a={};for(let[i,s]of t)a[i]=[...s];try{e.sessionStorage.setItem(NS,JSON.stringify(a))}catch(i){gn(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function C0(){let e,t,a=new Promise((i,s)=>{e=async l=>{i(l);try{await a}catch{}},t=async l=>{s(l);try{await a}catch{}}});return{promise:a,resolve:e,reject:t}}var Io=x.createContext(null);Io.displayName="DataRouter";var wc=x.createContext(null);wc.displayName="DataRouterState";var LS=x.createContext(!1);function dD(){return x.useContext(LS)}var lg=x.createContext({isTransitioning:!1});lg.displayName="ViewTransition";var IS=x.createContext(new Map);IS.displayName="Fetchers";var fD=x.createContext(null);fD.displayName="Await";var zr=x.createContext(null);zr.displayName="Navigation";var cf=x.createContext(null);cf.displayName="Location";var fa=x.createContext({outlet:null,matches:[],isDataRoute:!1});fa.displayName="Route";var cg=x.createContext(null);cg.displayName="RouteError";var zS="REACT_ROUTER_ERROR",hD="REDIRECT",mD="ROUTE_ERROR_RESPONSE";function pD(e){if(e.startsWith(`${zS}:${hD}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function gD(e){if(e.startsWith(`${zS}:${mD}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new xc(t.status,t.statusText,t.data)}catch{}}function yD(e,{relative:t}={}){pt(Hs(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:i}=x.useContext(zr),{hash:s,pathname:l,search:d}=Sc(e,{relative:t}),f=l;return a!=="/"&&(f=l==="/"?a:Ea([a,l])),i.createHref({pathname:f,search:d,hash:s})}function Hs(){return x.useContext(cf)!=null}function to(){return pt(Hs(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(cf).location}var US="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PS(e){x.useContext(zr).static||x.useLayoutEffect(e)}function uf(){let{isDataRoute:e}=x.useContext(fa);return e?MD():vD()}function vD(){pt(Hs(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Io),{basename:t,navigator:a}=x.useContext(zr),{matches:i}=x.useContext(fa),{pathname:s}=to(),l=JSON.stringify(sf(i)),d=x.useRef(!1);return PS(()=>{d.current=!0}),x.useCallback((p,m={})=>{if(gn(d.current,US),!d.current)return;if(typeof p=="number"){a.go(p);return}let y=lf(p,JSON.parse(l),s,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ea([t,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[t,a,l,s,e])}var xD=x.createContext(null);function bD(e){let t=x.useContext(fa).outlet;return x.useMemo(()=>t&&x.createElement(xD.Provider,{value:e},t),[t,e])}function Sc(e,{relative:t}={}){let{matches:a}=x.useContext(fa),{pathname:i}=to(),s=JSON.stringify(sf(a));return x.useMemo(()=>lf(e,JSON.parse(s),i,t==="path"),[e,s,i,t])}function wD(e,t,a,i,s){pt(Hs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=x.useContext(zr),{matches:d}=x.useContext(fa),f=d[d.length-1],p=f?f.params:{},m=f?f.pathname:"/",y=f?f.pathnameBase:"/",v=f&&f.route;{let R=v&&v.path||"";BS(m,!v||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=to(),b;b=w;let C=b.pathname||"/",E=C;if(y!=="/"){let R=y.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=Hi(e,{pathname:E});return gn(v||T!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),gn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),RD(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},p,R.params),pathname:Ea([y,l.encodeLocation?l.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?y:Ea([y,l.encodeLocation?l.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),d,a,i,s)}function SD(){let e=jD(),t=cc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:l},"ErrorBoundary")," or"," ",x.createElement("code",{style:l},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),a?x.createElement("pre",{style:s},a):null,d)}var ED=x.createElement(SD,null),YS=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=gD(e.digest);a&&(e=a)}let t=e!==void 0?x.createElement(fa.Provider,{value:this.props.routeContext},x.createElement(cg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(CD,{error:e},t):t}};YS.contextType=LS;var Xm=new WeakMap;function CD({children:e,error:t}){let{basename:a}=x.useContext(zr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=pD(t.digest);if(i){let s=Xm.get(t);if(s)throw s;let l=ES(i.location,a);if(SS&&!Xm.get(t))if(l.isExternal||i.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:i.replace}));throw Xm.set(t,d),d}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function TD({routeContext:e,match:t,children:a}){let i=x.useContext(Io);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(fa.Provider,{value:e},a)}function RD(e,t=[],a=null,i=null,s=null){if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,d=a?.errors;if(d!=null){let y=l.findIndex(v=>v.route.id&&d?.[v.route.id]!==void 0);pt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let f=!1,p=-1;if(a)for(let y=0;y<l.length;y++){let v=l[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=y),v.route.id){let{loaderData:w,errors:b}=a,C=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!b||b[v.route.id]===void 0);if(v.route.lazy||C){f=!0,p>=0?l=l.slice(0,p+1):l=[l[0]];break}}}let m=a&&i?(y,v)=>{i(y,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:bc(a.matches),errorInfo:v})}:void 0;return l.reduceRight((y,v,w)=>{let b,C=!1,E=null,T=null;a&&(b=d&&v.route.id?d[v.route.id]:void 0,E=v.route.errorElement||ED,f&&(p<0&&w===0?(BS("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,T=null):p===w&&(C=!0,T=v.route.hydrateFallbackElement||null)));let N=t.concat(l.slice(0,w+1)),R=()=>{let O;return b?O=E:C?O=T:v.route.Component?O=x.createElement(v.route.Component,null):v.route.element?O=v.route.element:O=y,x.createElement(TD,{match:v,routeContext:{outlet:y,matches:N,isDataRoute:a!=null},children:O})};return a&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?x.createElement(YS,{location:a.location,revalidation:a.revalidation,component:E,error:b,children:R(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):R()},null)}function ug(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ND(e){let t=x.useContext(Io);return pt(t,ug(e)),t}function AD(e){let t=x.useContext(wc);return pt(t,ug(e)),t}function DD(e){let t=x.useContext(fa);return pt(t,ug(e)),t}function dg(e){let t=DD(e),a=t.matches[t.matches.length-1];return pt(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function OD(){return dg("useRouteId")}function jD(){let e=x.useContext(cg),t=AD("useRouteError"),a=dg("useRouteError");return e!==void 0?e:t.errors?.[a]}function MD(){let{router:e}=ND("useNavigate"),t=dg("useNavigate"),a=x.useRef(!1);return PS(()=>{a.current=!0}),x.useCallback(async(s,l={})=>{gn(a.current,US),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var T0={};function BS(e,t,a){!t&&!T0[e]&&(T0[e]=!0,gn(!1,a))}var R0={};function N0(e,t){!e&&!R0[t]&&(R0[t]=!0,console.warn(t))}var _D="useOptimistic",A0=vc[_D],kD=()=>{};function LD(e){return A0?A0(e):[e,kD]}function ID(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&gn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:x.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&gn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:x.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&gn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var zD=["HydrateFallback","hydrateFallbackElement"],UD=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",t(a))}})}};function PD({router:e,flushSync:t,onError:a,unstable_useTransitions:i}){i=dD()||i;let[l,d]=x.useState(e.state),[f,p]=LD(l),[m,y]=x.useState(),[v,w]=x.useState({isTransitioning:!1}),[b,C]=x.useState(),[E,T]=x.useState(),[N,R]=x.useState(),O=x.useRef(new Map),j=x.useCallback((_,{deletedFetchers:Z,newErrors:ne,flushSync:ae,viewTransitionOpts:fe})=>{ne&&a&&Object.values(ne).forEach(ce=>a(ce,{location:_.location,params:_.matches[0]?.params??{},unstable_pattern:bc(_.matches)})),_.fetchers.forEach((ce,F)=>{ce.data!==void 0&&O.current.set(F,ce.data)}),Z.forEach(ce=>O.current.delete(ce)),N0(ae===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let pe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(N0(fe==null||pe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!fe||!pe){t&&ae?t(()=>d(_)):i===!1?d(_):x.startTransition(()=>{i===!0&&p(ce=>D0(ce,_)),d(_)});return}if(t&&ae){t(()=>{E&&(b?.resolve(),E.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation})});let ce=e.window.document.startViewTransition(()=>{t(()=>d(_))});ce.finished.finally(()=>{t(()=>{C(void 0),T(void 0),y(void 0),w({isTransitioning:!1})})}),t(()=>T(ce));return}E?(b?.resolve(),E.skipTransition(),R({state:_,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation})):(y(_),w({isTransitioning:!0,flushSync:!1,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation}))},[e.window,t,E,b,i,p,a]);x.useLayoutEffect(()=>e.subscribe(j),[e,j]),x.useEffect(()=>{v.isTransitioning&&!v.flushSync&&C(new UD)},[v]),x.useEffect(()=>{if(b&&m&&e.window){let _=m,Z=b.promise,ne=e.window.document.startViewTransition(async()=>{i===!1?d(_):x.startTransition(()=>{i===!0&&p(ae=>D0(ae,_)),d(_)}),await Z});ne.finished.finally(()=>{C(void 0),T(void 0),y(void 0),w({isTransitioning:!1})}),T(ne)}},[m,b,e.window,i,p]),x.useEffect(()=>{b&&m&&f.location.key===m.location.key&&b.resolve()},[b,E,f.location,m]),x.useEffect(()=>{!v.isTransitioning&&N&&(y(N.state),w({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),R(void 0))},[v.isTransitioning,N]);let I=x.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,Z,ne)=>e.navigate(_,{state:Z,preventScrollReset:ne?.preventScrollReset}),replace:(_,Z,ne)=>e.navigate(_,{replace:!0,state:Z,preventScrollReset:ne?.preventScrollReset})}),[e]),P=e.basename||"/",A=x.useMemo(()=>({router:e,navigator:I,static:!1,basename:P,onError:a}),[e,I,P,a]);return x.createElement(x.Fragment,null,x.createElement(Io.Provider,{value:A},x.createElement(wc.Provider,{value:f},x.createElement(IS.Provider,{value:O.current},x.createElement(lg.Provider,{value:v},x.createElement(FD,{basename:P,location:f.location,navigationType:f.historyAction,navigator:I,unstable_useTransitions:i},x.createElement(YD,{routes:e.routes,future:e.future,state:f,onError:a})))))),null)}function D0(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var YD=x.memo(BD);function BD({routes:e,future:t,state:a,onError:i}){return wD(e,void 0,a,i,t)}function HD({to:e,replace:t,state:a,relative:i}){pt(Hs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=x.useContext(zr);gn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=x.useContext(fa),{pathname:d}=to(),f=uf(),p=lf(e,sf(l),d,i==="path"),m=JSON.stringify(p);return x.useEffect(()=>{f(JSON.parse(m),{replace:t,state:a,relative:i})},[f,m,i,t,a]),null}function VD(e){return bD(e.context)}function FD({basename:e="/",children:t=null,location:a,navigationType:i="POP",navigator:s,static:l=!1,unstable_useTransitions:d}){pt(!Hs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),p=x.useMemo(()=>({basename:f,navigator:s,static:l,unstable_useTransitions:d,future:{}}),[f,s,l,d]);typeof a=="string"&&(a=eo(a));let{pathname:m="/",search:y="",hash:v="",state:w=null,key:b="default"}=a,C=x.useMemo(()=>{let E=Qr(m,f);return E==null?null:{location:{pathname:E,search:y,hash:v,state:w,key:b},navigationType:i}},[f,m,y,v,w,b,i]);return gn(C!=null,`<Router basename="${f}"> is not able to match the URL "${m}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:x.createElement(zr.Provider,{value:p},x.createElement(cf.Provider,{children:t,value:C}))}var yd="get",vd="application/x-www-form-urlencoded";function df(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function GD(e){return df(e)&&e.tagName.toLowerCase()==="button"}function qD(e){return df(e)&&e.tagName.toLowerCase()==="form"}function WD(e){return df(e)&&e.tagName.toLowerCase()==="input"}function KD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $D(e,t){return e.button===0&&(!t||t==="_self")&&!KD(e)}var Fu=null;function XD(){if(Fu===null)try{new FormData(document.createElement("form"),0),Fu=!1}catch{Fu=!0}return Fu}var QD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qm(e){return e!=null&&!QD.has(e)?(gn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vd}"`),null):e}function ZD(e,t){let a,i,s,l,d;if(qD(e)){let f=e.getAttribute("action");i=f?Qr(f,t):null,a=e.getAttribute("method")||yd,s=Qm(e.getAttribute("enctype"))||vd,l=new FormData(e)}else if(GD(e)||WD(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||f.getAttribute("action");if(i=p?Qr(p,t):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||yd,s=Qm(e.getAttribute("formenctype"))||Qm(f.getAttribute("enctype"))||vd,l=new FormData(f,e),!XD()){let{name:m,type:y,value:v}=e;if(y==="image"){let w=m?`${m}.`:"";l.append(`${w}x`,"0"),l.append(`${w}y`,"0")}else m&&l.append(m,v)}}else{if(df(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=yd,i=null,s=vd,d=e}return l&&s==="text/plain"&&(d=l,l=void 0),{action:i,method:a.toLowerCase(),encType:s,formData:l,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function fg(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function JD(e,t,a,i){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:t&&Qr(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function eO(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function nO(e,t,a){let i=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let d=await eO(l,a);return d.links?d.links():[]}return[]}));return oO(i.flat(1).filter(tO).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function O0(e,t,a,i,s,l){let d=(p,m)=>a[m]?p.route.id!==a[m].route.id:!0,f=(p,m)=>a[m].pathname!==p.pathname||a[m].route.path?.endsWith("*")&&a[m].params["*"]!==p.params["*"];return l==="assets"?t.filter((p,m)=>d(p,m)||f(p,m)):l==="data"?t.filter((p,m)=>{let y=i.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(d(p,m)||f(p,m))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function rO(e,t,{includeHydrateFallback:a}={}){return aO(e.map(i=>{let s=t.routes[i.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function aO(e){return[...new Set(e)]}function iO(e){let t={},a=Object.keys(e).sort();for(let i of a)t[i]=e[i];return t}function oO(e,t){let a=new Set;return new Set(t),e.reduce((i,s)=>{let l=JSON.stringify(iO(s));return a.has(l)||(a.add(l),i.push({key:l,link:s})),i},[])}function HS(){let e=x.useContext(Io);return fg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function sO(){let e=x.useContext(wc);return fg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var hg=x.createContext(void 0);hg.displayName="FrameworkContext";function VS(){let e=x.useContext(hg);return fg(e,"You must render this element inside a <HydratedRouter> element"),e}function lO(e,t){let a=x.useContext(hg),[i,s]=x.useState(!1),[l,d]=x.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:v}=t,w=x.useRef(null);x.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let E=N=>{N.forEach(R=>{d(R.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return w.current&&T.observe(w.current),()=>{T.disconnect()}}},[e]),x.useEffect(()=>{if(i){let E=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(E)}}},[i]);let b=()=>{s(!0)},C=()=>{s(!1),d(!1)};return a?e!=="intent"?[l,w,{}]:[l,w,{onFocus:Bl(f,b),onBlur:Bl(p,C),onMouseEnter:Bl(m,b),onMouseLeave:Bl(y,C),onTouchStart:Bl(v,b)}]:[!1,w,{}]}function Bl(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function cO({page:e,...t}){let{router:a}=HS(),i=x.useMemo(()=>Hi(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?x.createElement(dO,{page:e,matches:i,...t}):null}function uO(e){let{manifest:t,routeModules:a}=VS(),[i,s]=x.useState([]);return x.useEffect(()=>{let l=!1;return nO(e,t,a).then(d=>{l||s(d)}),()=>{l=!0}},[e,t,a]),i}function dO({page:e,matches:t,...a}){let i=to(),{future:s,manifest:l,routeModules:d}=VS(),{basename:f}=HS(),{loaderData:p,matches:m}=sO(),y=x.useMemo(()=>O0(e,t,m,l,i,"data"),[e,t,m,l,i]),v=x.useMemo(()=>O0(e,t,m,l,i,"assets"),[e,t,m,l,i]),w=x.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,T=!1;if(t.forEach(R=>{let O=l.routes[R.route.id];!O||!O.hasLoader||(!y.some(j=>j.route.id===R.route.id)&&R.route.id in p&&d[R.route.id]?.shouldRevalidate||O.hasClientLoader?T=!0:E.add(R.route.id))}),E.size===0)return[];let N=JD(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return T&&E.size>0&&N.searchParams.set("_routes",t.filter(R=>E.has(R.route.id)).map(R=>R.route.id).join(",")),[N.pathname+N.search]},[f,s.unstable_trailingSlashAwareDataRequests,p,i,l,y,t,e,d]),b=x.useMemo(()=>rO(v,l),[v,l]),C=uO(v);return x.createElement(x.Fragment,null,w.map(E=>x.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...a})),b.map(E=>x.createElement("link",{key:E,rel:"modulepreload",href:E,...a})),C.map(({key:E,link:T})=>x.createElement("link",{key:E,nonce:a.nonce,...T})))}function fO(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var hO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hO&&(window.__reactRouterVersion="7.12.0")}catch{}function mO(e,t){return YA({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:nA({window:t?.window}),hydrationData:pO(),routes:e,mapRouteProperties:ID,hydrationRouteProperties:zD,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function pO(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:gO(e.errors)}),e}function gO(e){if(!e)return null;let t=Object.entries(e),a={};for(let[i,s]of t)if(s&&s.__type==="RouteErrorResponse")a[i]=new xc(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let l=window[s.__subType];if(typeof l=="function")try{let d=new l(s.message);d.stack="",a[i]=d}catch{}}if(a[i]==null){let l=new Error(s.message);l.stack="",a[i]=l}}else a[i]=s;return a}var FS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ki=x.forwardRef(function({onClick:t,discover:a="render",prefetch:i="none",relative:s,reloadDocument:l,replace:d,state:f,target:p,to:m,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:w,...b},C){let{basename:E,unstable_useTransitions:T}=x.useContext(zr),N=typeof m=="string"&&FS.test(m),R=ES(m,E);m=R.to;let O=yD(m,{relative:s}),[j,I,P]=lO(i,b),A=bO(m,{replace:d,state:f,target:p,preventScrollReset:y,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:w,unstable_useTransitions:T});function _(ne){t&&t(ne),ne.defaultPrevented||A(ne)}let Z=x.createElement("a",{...b,...P,href:R.absoluteURL||O,onClick:R.isExternal||l?t:_,ref:fO(C,I),target:p,"data-discover":!N&&a==="render"?"true":void 0});return j&&!N?x.createElement(x.Fragment,null,Z,x.createElement(cO,{page:O})):Z});Ki.displayName="Link";var yO=x.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:i="",end:s=!1,style:l,to:d,viewTransition:f,children:p,...m},y){let v=Sc(d,{relative:m.relative}),w=to(),b=x.useContext(wc),{navigator:C,basename:E}=x.useContext(zr),T=b!=null&&TO(v)&&f===!0,N=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,R=w.pathname,O=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(R=R.toLowerCase(),O=O?O.toLowerCase():null,N=N.toLowerCase()),O&&E&&(O=Qr(O,E)||O);const j=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let I=R===N||!s&&R.startsWith(N)&&R.charAt(j)==="/",P=O!=null&&(O===N||!s&&O.startsWith(N)&&O.charAt(N.length)==="/"),A={isActive:I,isPending:P,isTransitioning:T},_=I?t:void 0,Z;typeof i=="function"?Z=i(A):Z=[i,I?"active":null,P?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let ne=typeof l=="function"?l(A):l;return x.createElement(Ki,{...m,"aria-current":_,className:Z,ref:y,style:ne,to:d,viewTransition:f},typeof p=="function"?p(A):p)});yO.displayName="NavLink";var vO=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:i,replace:s,state:l,method:d=yd,action:f,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:w,...b},C)=>{let{unstable_useTransitions:E}=x.useContext(zr),T=EO(),N=CO(f,{relative:m}),R=d.toLowerCase()==="get"?"get":"post",O=typeof f=="string"&&FS.test(f),j=I=>{if(p&&p(I),I.defaultPrevented)return;I.preventDefault();let P=I.nativeEvent.submitter,A=P?.getAttribute("formmethod")||d,_=()=>T(P||I.currentTarget,{fetcherKey:t,method:A,navigate:a,replace:s,state:l,relative:m,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:w});E&&a!==!1?x.startTransition(()=>_()):_()};return x.createElement("form",{ref:C,method:R,action:N,onSubmit:i?p:j,...b,"data-discover":!O&&e==="render"?"true":void 0})});vO.displayName="Form";function xO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function GS(e){let t=x.useContext(Io);return pt(t,xO(e)),t}function bO(e,{target:t,replace:a,state:i,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let m=uf(),y=to(),v=Sc(e,{relative:l});return x.useCallback(w=>{if($D(w,t)){w.preventDefault();let b=a!==void 0?a:Ta(y)===Ta(v),C=()=>m(e,{replace:b,state:i,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:f});p?x.startTransition(()=>C()):C()}},[y,m,v,a,i,t,e,s,l,d,f,p])}var wO=0,SO=()=>`__${String(++wO)}__`;function EO(){let{router:e}=GS("useSubmit"),{basename:t}=x.useContext(zr),a=OD(),i=e.fetch,s=e.navigate;return x.useCallback(async(l,d={})=>{let{action:f,method:p,encType:m,formData:y,body:v}=ZD(l,t);if(d.navigate===!1){let w=d.fetcherKey||SO();await i(w,a,d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||p,formEncType:d.encType||m,flushSync:d.flushSync})}else await s(d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||p,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,s,t,a])}function CO(e,{relative:t}={}){let{basename:a}=x.useContext(zr),i=x.useContext(fa);pt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),l={...Sc(e||".",{relative:t})},d=to();if(e==null){l.search=d.search;let f=new URLSearchParams(l.search),p=f.getAll("index");if(p.some(y=>y==="")){f.delete("index"),p.filter(v=>v).forEach(v=>f.append("index",v));let y=f.toString();l.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(l.pathname=l.pathname==="/"?a:Ea([a,l.pathname])),Ta(l)}function TO(e,{relative:t}={}){let a=x.useContext(lg);pt(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=GS("useViewTransitionState"),s=Sc(e,{relative:t});if(!a.isTransitioning)return!1;let l=Qr(a.currentLocation.pathname,i)||a.currentLocation.pathname,d=Qr(a.nextLocation.pathname,i)||a.nextLocation.pathname;return Od(s.pathname,d)!=null||Od(s.pathname,l)!=null}var Ra=pS();const RO=mS(Ra);function NO(e){return x.createElement(PD,{flushSync:Ra.flushSync,...e})}const AO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,i)=>i?i.toUpperCase():a.toLowerCase()),j0=e=>{const t=DO(e);return t.charAt(0).toUpperCase()+t.slice(1)},qS=(...e)=>e.filter((t,a,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===a).join(" ").trim(),OO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var jO={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"};const MO=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:d,...f},p)=>x.createElement("svg",{ref:p,...jO,width:t,height:t,stroke:e,strokeWidth:i?Number(a)*24/Number(t):a,className:qS("lucide",s),...!l&&!OO(f)&&{"aria-hidden":"true"},...f},[...d.map(([m,y])=>x.createElement(m,y)),...Array.isArray(l)?l:[l]]));const Tt=(e,t)=>{const a=x.forwardRef(({className:i,...s},l)=>x.createElement(MO,{ref:l,iconNode:t,className:qS(`lucide-${AO(j0(e))}`,`lucide-${e}`,i),...s}));return a.displayName=j0(e),a};const _O=[["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"}]],kO=Tt("briefcase",_O);const LO=[["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"}]],uc=Tt("calendar",LO);const IO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zO=Tt("check",IO);const UO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],WS=Tt("chevron-down",UO);const PO=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],M0=Tt("chevron-left",PO);const YO=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_0=Tt("chevron-right",YO);const BO=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],HO=Tt("chevron-up",BO);const VO=[["path",{d:"M10.88 21.94 15.46 14",key:"xkve6t"}],["path",{d:"M21.17 8H12",key:"19dcdn"}],["path",{d:"M3.95 6.06 8.54 14",key:"g8jz9m"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],FO=Tt("chromium",VO);const GO=[["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"}]],mg=Tt("circle-question-mark",GO);const qO=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tc=Tt("clock",qO);const WO=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],pg=Tt("code",WO);const KO=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],KS=Tt("download",KO);const $O=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],XO=Tt("ellipsis-vertical",$O);const QO=[["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"}]],k0=Tt("external-link",QO);const ZO=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],JO=Tt("eye-off",ZO);const ej=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tj=Tt("eye",ej);const nj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$S=Tt("file-text",nj);const rj=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],L0=Tt("github",rj);const aj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ij=Tt("globe",aj);const oj=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],sj=Tt("handshake",oj);const lj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cj=Tt("info",lj);const uj=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],XS=Tt("link",uj);const dj=[["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"}]],jd=Tt("lock",dj);const fj=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],QS=Tt("mail",fj);const hj=[["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"}]],ZS=Tt("map-pin",hj);const mj=[["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"}]],pj=Tt("monitor",mj);const gj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],I0=Tt("moon",gj);const yj=[["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"}]],Dp=Tt("refresh-cw",yj);const vj=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],xj=Tt("scale",vj);const bj=[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gg=Tt("shield-check",bj);const wj=[["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"}]],Op=Tt("shield",wj);const Sj=[["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"}]],Ej=Tt("square-pen",Sj);const Cj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],z0=Tt("sun",Cj);const Tj=[["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"}]],jp=Tt("triangle-alert",Tj);const Rj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Nj=Tt("users",Rj);const Aj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ff=Tt("x",Aj);function JS(e){var t,a,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(a=JS(e[t]))&&(i&&(i+=" "),i+=a)}else for(a in e)e[a]&&(i&&(i+=" "),i+=a);return i}function e1(){for(var e,t,a=0,i="",s=arguments.length;a<s;a++)(e=arguments[a])&&(t=JS(e))&&(i&&(i+=" "),i+=t);return i}const U0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,P0=e1,hf=(e,t)=>a=>{var i;if(t?.variants==null)return P0(e,a?.class,a?.className);const{variants:s,defaultVariants:l}=t,d=Object.keys(s).map(m=>{const y=a?.[m],v=l?.[m];if(y===null)return null;const w=U0(y)||U0(v);return s[m][w]}),f=a&&Object.entries(a).reduce((m,y)=>{let[v,w]=y;return w===void 0||(m[v]=w),m},{}),p=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,y)=>{let{class:v,className:w,...b}=y;return Object.entries(b).every(C=>{let[E,T]=C;return Array.isArray(T)?T.includes({...l,...f}[E]):{...l,...f}[E]===T})?[...m,v,w]:m},[]);return P0(e,d,p,a?.class,a?.className)};function Y0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mf(...e){return t=>{let a=!1;const i=e.map(s=>{const l=Y0(s,t);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Y0(e[s],null)}}}}function zn(...e){return x.useCallback(mf(...e),e)}function zs(e){const t=Oj(e),a=x.forwardRef((i,s)=>{const{children:l,...d}=i,f=x.Children.toArray(l),p=f.find(Mj);if(p){const m=p.props.children,y=f.map(v=>v===p?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:v);return u.jsx(t,{...d,ref:s,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return u.jsx(t,{...d,ref:s,children:l})});return a.displayName=`${e}.Slot`,a}var Dj=zs("Slot");function Oj(e){const t=x.forwardRef((a,i)=>{const{children:s,...l}=a;if(x.isValidElement(s)){const d=kj(s),f=_j(l,s.props);return s.type!==x.Fragment&&(f.ref=i?mf(i,d):d),x.cloneElement(s,f)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jj=Symbol("radix.slottable");function Mj(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jj}function _j(e,t){const a={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?a[i]=(...f)=>{const p=l(...f);return s(...f),p}:s&&(a[i]=s):i==="style"?a[i]={...s,...l}:i==="className"&&(a[i]=[s,l].filter(Boolean).join(" "))}return{...e,...a}}function kj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Lj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qt=Lj.reduce((e,t)=>{const a=zs(`Primitive.${t}`),i=x.forwardRef((s,l)=>{const{asChild:d,...f}=s,p=d?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(p,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function t1(e,t){e&&Ra.flushSync(()=>e.dispatchEvent(t))}function Ij(e,t){const a=x.createContext(t),i=l=>{const{children:d,...f}=l,p=x.useMemo(()=>f,Object.values(f));return u.jsx(a.Provider,{value:p,children:d})};i.displayName=e+"Provider";function s(l){const d=x.useContext(a);if(d)return d;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,s]}function no(e,t=[]){let a=[];function i(l,d){const f=x.createContext(d),p=a.length;a=[...a,d];const m=v=>{const{scope:w,children:b,...C}=v,E=w?.[e]?.[p]||f,T=x.useMemo(()=>C,Object.values(C));return u.jsx(E.Provider,{value:T,children:b})};m.displayName=l+"Provider";function y(v,w){const b=w?.[e]?.[p]||f,C=x.useContext(b);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${l}\``)}return[m,y]}const s=()=>{const l=a.map(d=>x.createContext(d));return function(f){const p=f?.[e]||l;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:p}}),[f,p])}};return s.scopeName=e,[i,zj(s,...t)]}function zj(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const d=i.reduce((f,{useScope:p,scopeName:m})=>{const v=p(l)[`__scope${m}`];return{...f,...v}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return a.scopeName=t.scopeName,a}function yg(e){const t=e+"CollectionProvider",[a,i]=no(t),[s,l]=a(t,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:T,children:N}=E,R=Sn.useRef(null),O=Sn.useRef(new Map).current;return u.jsx(s,{scope:T,itemMap:O,collectionRef:R,children:N})};d.displayName=t;const f=e+"CollectionSlot",p=zs(f),m=Sn.forwardRef((E,T)=>{const{scope:N,children:R}=E,O=l(f,N),j=zn(T,O.collectionRef);return u.jsx(p,{ref:j,children:R})});m.displayName=f;const y=e+"CollectionItemSlot",v="data-radix-collection-item",w=zs(y),b=Sn.forwardRef((E,T)=>{const{scope:N,children:R,...O}=E,j=Sn.useRef(null),I=zn(T,j),P=l(y,N);return Sn.useEffect(()=>(P.itemMap.set(j,{ref:j,...O}),()=>{P.itemMap.delete(j)})),u.jsx(w,{[v]:"",ref:I,children:R})});b.displayName=y;function C(E){const T=l(e+"CollectionConsumer",E);return Sn.useCallback(()=>{const R=T.collectionRef.current;if(!R)return[];const O=Array.from(R.querySelectorAll(`[${v}]`));return Array.from(T.itemMap.values()).sort((P,A)=>O.indexOf(P.ref.current)-O.indexOf(A.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:d,Slot:m,ItemSlot:b},C,i]}function ut(e,t,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e?.(s),a===!1||!s.defaultPrevented)return t?.(s)}}var ri=globalThis?.document?x.useLayoutEffect:()=>{},Uj=vc[" useInsertionEffect ".trim().toString()]||ri;function Vs({prop:e,defaultProp:t,onChange:a=()=>{},caller:i}){const[s,l,d]=Pj({defaultProp:t,onChange:a}),f=e!==void 0,p=f?e:s;{const y=x.useRef(e!==void 0);x.useEffect(()=>{const v=y.current;v!==f&&console.warn(`${i} is changing from ${v?"controlled":"uncontrolled"} to ${f?"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.`),y.current=f},[f,i])}const m=x.useCallback(y=>{if(f){const v=Yj(y)?y(e):y;v!==e&&d.current?.(v)}else l(y)},[f,e,l,d]);return[p,m]}function Pj({defaultProp:e,onChange:t}){const[a,i]=x.useState(e),s=x.useRef(a),l=x.useRef(t);return Uj(()=>{l.current=t},[t]),x.useEffect(()=>{s.current!==a&&(l.current?.(a),s.current=a)},[a,s]),[a,i,l]}function Yj(e){return typeof e=="function"}function Bj(e,t){return x.useReducer((a,i)=>t[a][i]??a,e)}var oi=e=>{const{present:t,children:a}=e,i=Hj(t),s=typeof a=="function"?a({present:i.isPresent}):x.Children.only(a),l=zn(i.ref,Vj(s));return typeof a=="function"||i.isPresent?x.cloneElement(s,{ref:l}):null};oi.displayName="Presence";function Hj(e){const[t,a]=x.useState(),i=x.useRef(null),s=x.useRef(e),l=x.useRef("none"),d=e?"mounted":"unmounted",[f,p]=Bj(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const m=Gu(i.current);l.current=f==="mounted"?m:"none"},[f]),ri(()=>{const m=i.current,y=s.current;if(y!==e){const w=l.current,b=Gu(m);e?p("MOUNT"):b==="none"||m?.display==="none"?p("UNMOUNT"):p(y&&w!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),ri(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,v=b=>{const E=Gu(i.current).includes(CSS.escape(b.animationName));if(b.target===t&&E&&(p("ANIMATION_END"),!s.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},w=b=>{b.target===t&&(l.current=Gu(i.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(m),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(m=>{i.current=m?getComputedStyle(m):null,a(m)},[])}}function Gu(e){return e?.animationName||"none"}function Vj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Fj=vc[" useId ".trim().toString()]||(()=>{}),Gj=0;function $i(e){const[t,a]=x.useState(Fj());return ri(()=>{a(i=>i??String(Gj++))},[e]),e||(t?`radix-${t}`:"")}var pf="Collapsible",[qj,n1]=no(pf),[Wj,vg]=qj(pf),r1=x.forwardRef((e,t)=>{const{__scopeCollapsible:a,open:i,defaultOpen:s,disabled:l,onOpenChange:d,...f}=e,[p,m]=Vs({prop:i,defaultProp:s??!1,onChange:d,caller:pf});return u.jsx(Wj,{scope:a,disabled:l,contentId:$i(),open:p,onOpenToggle:x.useCallback(()=>m(y=>!y),[m]),children:u.jsx(Qt.div,{"data-state":bg(p),"data-disabled":l?"":void 0,...f,ref:t})})});r1.displayName=pf;var a1="CollapsibleTrigger",i1=x.forwardRef((e,t)=>{const{__scopeCollapsible:a,...i}=e,s=vg(a1,a);return u.jsx(Qt.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":bg(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...i,ref:t,onClick:ut(e.onClick,s.onOpenToggle)})});i1.displayName=a1;var xg="CollapsibleContent",o1=x.forwardRef((e,t)=>{const{forceMount:a,...i}=e,s=vg(xg,e.__scopeCollapsible);return u.jsx(oi,{present:a||s.open,children:({present:l})=>u.jsx(Kj,{...i,ref:t,present:l})})});o1.displayName=xg;var Kj=x.forwardRef((e,t)=>{const{__scopeCollapsible:a,present:i,children:s,...l}=e,d=vg(xg,a),[f,p]=x.useState(i),m=x.useRef(null),y=zn(t,m),v=x.useRef(0),w=v.current,b=x.useRef(0),C=b.current,E=d.open||f,T=x.useRef(E),N=x.useRef(void 0);return x.useEffect(()=>{const R=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(R)},[]),ri(()=>{const R=m.current;if(R){N.current=N.current||{transitionDuration:R.style.transitionDuration,animationName:R.style.animationName},R.style.transitionDuration="0s",R.style.animationName="none";const O=R.getBoundingClientRect();v.current=O.height,b.current=O.width,T.current||(R.style.transitionDuration=N.current.transitionDuration,R.style.animationName=N.current.animationName),p(i)}},[d.open,i]),u.jsx(Qt.div,{"data-state":bg(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!E,...l,ref:y,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...e.style},children:E&&s})});function bg(e){return e?"open":"closed"}var $j=r1,Xj=i1,Qj=o1,Zj=x.createContext(void 0);function wg(e){const t=x.useContext(Zj);return e||t||"ltr"}var ha="Accordion",Jj=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Sg,eM,tM]=yg(ha),[gf]=no(ha,[tM,n1]),Eg=n1(),s1=Sn.forwardRef((e,t)=>{const{type:a,...i}=e,s=i,l=i;return u.jsx(Sg.Provider,{scope:e.__scopeAccordion,children:a==="multiple"?u.jsx(iM,{...l,ref:t}):u.jsx(aM,{...s,ref:t})})});s1.displayName=ha;var[l1,nM]=gf(ha),[c1,rM]=gf(ha,{collapsible:!1}),aM=Sn.forwardRef((e,t)=>{const{value:a,defaultValue:i,onValueChange:s=()=>{},collapsible:l=!1,...d}=e,[f,p]=Vs({prop:a,defaultProp:i??"",onChange:s,caller:ha});return u.jsx(l1,{scope:e.__scopeAccordion,value:Sn.useMemo(()=>f?[f]:[],[f]),onItemOpen:p,onItemClose:Sn.useCallback(()=>l&&p(""),[l,p]),children:u.jsx(c1,{scope:e.__scopeAccordion,collapsible:l,children:u.jsx(u1,{...d,ref:t})})})}),iM=Sn.forwardRef((e,t)=>{const{value:a,defaultValue:i,onValueChange:s=()=>{},...l}=e,[d,f]=Vs({prop:a,defaultProp:i??[],onChange:s,caller:ha}),p=Sn.useCallback(y=>f((v=[])=>[...v,y]),[f]),m=Sn.useCallback(y=>f((v=[])=>v.filter(w=>w!==y)),[f]);return u.jsx(l1,{scope:e.__scopeAccordion,value:d,onItemOpen:p,onItemClose:m,children:u.jsx(c1,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(u1,{...l,ref:t})})})}),[oM,yf]=gf(ha),u1=Sn.forwardRef((e,t)=>{const{__scopeAccordion:a,disabled:i,dir:s,orientation:l="vertical",...d}=e,f=Sn.useRef(null),p=zn(f,t),m=eM(a),v=wg(s)==="ltr",w=ut(e.onKeyDown,b=>{if(!Jj.includes(b.key))return;const C=b.target,E=m().filter(_=>!_.ref.current?.disabled),T=E.findIndex(_=>_.ref.current===C),N=E.length;if(T===-1)return;b.preventDefault();let R=T;const O=0,j=N-1,I=()=>{R=T+1,R>j&&(R=O)},P=()=>{R=T-1,R<O&&(R=j)};switch(b.key){case"Home":R=O;break;case"End":R=j;break;case"ArrowRight":l==="horizontal"&&(v?I():P());break;case"ArrowDown":l==="vertical"&&I();break;case"ArrowLeft":l==="horizontal"&&(v?P():I());break;case"ArrowUp":l==="vertical"&&P();break}const A=R%N;E[A].ref.current?.focus()});return u.jsx(oM,{scope:a,disabled:i,direction:s,orientation:l,children:u.jsx(Sg.Slot,{scope:a,children:u.jsx(Qt.div,{...d,"data-orientation":l,ref:p,onKeyDown:i?void 0:w})})})}),Md="AccordionItem",[sM,Cg]=gf(Md),d1=Sn.forwardRef((e,t)=>{const{__scopeAccordion:a,value:i,...s}=e,l=yf(Md,a),d=nM(Md,a),f=Eg(a),p=$i(),m=i&&d.value.includes(i)||!1,y=l.disabled||e.disabled;return u.jsx(sM,{scope:a,open:m,disabled:y,triggerId:p,children:u.jsx($j,{"data-orientation":l.orientation,"data-state":y1(m),...f,...s,ref:t,disabled:y,open:m,onOpenChange:v=>{v?d.onItemOpen(i):d.onItemClose(i)}})})});d1.displayName=Md;var f1="AccordionHeader",h1=Sn.forwardRef((e,t)=>{const{__scopeAccordion:a,...i}=e,s=yf(ha,a),l=Cg(f1,a);return u.jsx(Qt.h3,{"data-orientation":s.orientation,"data-state":y1(l.open),"data-disabled":l.disabled?"":void 0,...i,ref:t})});h1.displayName=f1;var Mp="AccordionTrigger",m1=Sn.forwardRef((e,t)=>{const{__scopeAccordion:a,...i}=e,s=yf(ha,a),l=Cg(Mp,a),d=rM(Mp,a),f=Eg(a);return u.jsx(Sg.ItemSlot,{scope:a,children:u.jsx(Xj,{"aria-disabled":l.open&&!d.collapsible||void 0,"data-orientation":s.orientation,id:l.triggerId,...f,...i,ref:t})})});m1.displayName=Mp;var p1="AccordionContent",g1=Sn.forwardRef((e,t)=>{const{__scopeAccordion:a,...i}=e,s=yf(ha,a),l=Cg(p1,a),d=Eg(a);return u.jsx(Qj,{role:"region","aria-labelledby":l.triggerId,"data-orientation":s.orientation,...d,...i,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});g1.displayName=p1;function y1(e){return e?"open":"closed"}var lM=s1,cM=d1,uM=h1,dM=m1,fM=g1;function ai(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...a)=>t.current?.(...a),[])}function hM(e,t=globalThis?.document){const a=ai(e);x.useEffect(()=>{const i=s=>{s.key==="Escape"&&a(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[a,t])}var mM="DismissableLayer",_p="dismissableLayer.update",pM="dismissableLayer.pointerDownOutside",gM="dismissableLayer.focusOutside",B0,v1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tg=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:d,onDismiss:f,...p}=e,m=x.useContext(v1),[y,v]=x.useState(null),w=y?.ownerDocument??globalThis?.document,[,b]=x.useState({}),C=zn(t,A=>v(A)),E=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(T),R=y?E.indexOf(y):-1,O=m.layersWithOutsidePointerEventsDisabled.size>0,j=R>=N,I=xM(A=>{const _=A.target,Z=[...m.branches].some(ne=>ne.contains(_));!j||Z||(s?.(A),d?.(A),A.defaultPrevented||f?.())},w),P=bM(A=>{const _=A.target;[...m.branches].some(ne=>ne.contains(_))||(l?.(A),d?.(A),A.defaultPrevented||f?.())},w);return hM(A=>{R===m.layers.size-1&&(i?.(A),!A.defaultPrevented&&f&&(A.preventDefault(),f()))},w),x.useEffect(()=>{if(y)return a&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(B0=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),H0(),()=>{a&&m.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=B0)}},[y,w,a,m]),x.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),H0())},[y,m]),x.useEffect(()=>{const A=()=>b({});return document.addEventListener(_p,A),()=>document.removeEventListener(_p,A)},[]),u.jsx(Qt.div,{...p,ref:C,style:{pointerEvents:O?j?"auto":"none":void 0,...e.style},onFocusCapture:ut(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ut(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ut(e.onPointerDownCapture,I.onPointerDownCapture)})});Tg.displayName=mM;var yM="DismissableLayerBranch",vM=x.forwardRef((e,t)=>{const a=x.useContext(v1),i=x.useRef(null),s=zn(t,i);return x.useEffect(()=>{const l=i.current;if(l)return a.branches.add(l),()=>{a.branches.delete(l)}},[a.branches]),u.jsx(Qt.div,{...e,ref:s})});vM.displayName=yM;function xM(e,t=globalThis?.document){const a=ai(e),i=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let p=function(){x1(pM,a,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=p,t.addEventListener("click",s.current,{once:!0})):p()}else t.removeEventListener("click",s.current);i.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,a]),{onPointerDownCapture:()=>i.current=!0}}function bM(e,t=globalThis?.document){const a=ai(e),i=x.useRef(!1);return x.useEffect(()=>{const s=l=>{l.target&&!i.current&&x1(gM,a,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,a]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function H0(){const e=new CustomEvent(_p);document.dispatchEvent(e)}function x1(e,t,a,{discrete:i}){const s=a.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&s.addEventListener(e,t,{once:!0}),i?t1(s,l):s.dispatchEvent(l)}var Zm="focusScope.autoFocusOnMount",Jm="focusScope.autoFocusOnUnmount",V0={bubbles:!1,cancelable:!0},wM="FocusScope",Rg=x.forwardRef((e,t)=>{const{loop:a=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...d}=e,[f,p]=x.useState(null),m=ai(s),y=ai(l),v=x.useRef(null),w=zn(t,E=>p(E)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let E=function(O){if(b.paused||!f)return;const j=O.target;f.contains(j)?v.current=j:Yi(v.current,{select:!0})},T=function(O){if(b.paused||!f)return;const j=O.relatedTarget;j!==null&&(f.contains(j)||Yi(v.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const I of O)I.removedNodes.length>0&&Yi(f)};document.addEventListener("focusin",E),document.addEventListener("focusout",T);const R=new MutationObserver(N);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),R.disconnect()}}},[i,f,b.paused]),x.useEffect(()=>{if(f){G0.add(b);const E=document.activeElement;if(!f.contains(E)){const N=new CustomEvent(Zm,V0);f.addEventListener(Zm,m),f.dispatchEvent(N),N.defaultPrevented||(SM(NM(b1(f)),{select:!0}),document.activeElement===E&&Yi(f))}return()=>{f.removeEventListener(Zm,m),setTimeout(()=>{const N=new CustomEvent(Jm,V0);f.addEventListener(Jm,y),f.dispatchEvent(N),N.defaultPrevented||Yi(E??document.body,{select:!0}),f.removeEventListener(Jm,y),G0.remove(b)},0)}}},[f,m,y,b]);const C=x.useCallback(E=>{if(!a&&!i||b.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,N=document.activeElement;if(T&&N){const R=E.currentTarget,[O,j]=EM(R);O&&j?!E.shiftKey&&N===j?(E.preventDefault(),a&&Yi(O,{select:!0})):E.shiftKey&&N===O&&(E.preventDefault(),a&&Yi(j,{select:!0})):N===R&&E.preventDefault()}},[a,i,b.paused]);return u.jsx(Qt.div,{tabIndex:-1,...d,ref:w,onKeyDown:C})});Rg.displayName=wM;function SM(e,{select:t=!1}={}){const a=document.activeElement;for(const i of e)if(Yi(i,{select:t}),document.activeElement!==a)return}function EM(e){const t=b1(e),a=F0(t,e),i=F0(t.reverse(),e);return[a,i]}function b1(e){const t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)t.push(a.currentNode);return t}function F0(e,t){for(const a of e)if(!CM(a,{upTo:t}))return a}function CM(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 TM(e){return e instanceof HTMLInputElement&&"select"in e}function Yi(e,{select:t=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&TM(e)&&t&&e.select()}}var G0=RM();function RM(){let e=[];return{add(t){const a=e[0];t!==a&&a?.pause(),e=q0(e,t),e.unshift(t)},remove(t){e=q0(e,t),e[0]?.resume()}}}function q0(e,t){const a=[...e],i=a.indexOf(t);return i!==-1&&a.splice(i,1),a}function NM(e){return e.filter(t=>t.tagName!=="A")}var AM="Portal",Ng=x.forwardRef((e,t)=>{const{container:a,...i}=e,[s,l]=x.useState(!1);ri(()=>l(!0),[]);const d=a||s&&globalThis?.document?.body;return d?RO.createPortal(u.jsx(Qt.div,{...i,ref:t}),d):null});Ng.displayName=AM;var ep=0;function w1(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??W0()),document.body.insertAdjacentElement("beforeend",e[1]??W0()),ep++,()=>{ep===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ep--}},[])}function W0(){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 Sa=function(){return Sa=Object.assign||function(t){for(var a,i=1,s=arguments.length;i<s;i++){a=arguments[i];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(t[l]=a[l])}return t},Sa.apply(this,arguments)};function S1(e,t){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]]);return a}function DM(e,t,a){if(a||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var xd="right-scroll-bar-position",bd="width-before-scroll-bar",OM="with-scroll-bars-hidden",jM="--removed-body-scroll-bar-size";function tp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MM(e,t){var a=x.useState(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(i){var s=a.value;s!==i&&(a.value=i,a.callback(i,s))}}}})[0];return a.callback=t,a.facade}var _M=typeof window<"u"?x.useLayoutEffect:x.useEffect,K0=new WeakMap;function kM(e,t){var a=MM(null,function(i){return e.forEach(function(s){return tp(s,i)})});return _M(function(){var i=K0.get(a);if(i){var s=new Set(i),l=new Set(e),d=a.current;s.forEach(function(f){l.has(f)||tp(f,null)}),l.forEach(function(f){s.has(f)||tp(f,d)})}K0.set(a,e)},[e]),a}function LM(e){return e}function IM(e,t){t===void 0&&(t=LM);var a=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(l){var d=t(l,i);return a.push(d),function(){a=a.filter(function(f){return f!==d})}},assignSyncMedium:function(l){for(i=!0;a.length;){var d=a;a=[],d.forEach(l)}a={push:function(f){return l(f)},filter:function(){return a}}},assignMedium:function(l){i=!0;var d=[];if(a.length){var f=a;a=[],f.forEach(l),d=a}var p=function(){var y=d;d=[],y.forEach(l)},m=function(){return Promise.resolve().then(p)};m(),a={push:function(y){d.push(y),m()},filter:function(y){return d=d.filter(y),a}}}};return s}function zM(e){e===void 0&&(e={});var t=IM(null);return t.options=Sa({async:!0,ssr:!1},e),t}var E1=function(e){var t=e.sideCar,a=S1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,Sa({},a))};E1.isSideCarExport=!0;function UM(e,t){return e.useMedium(t),E1}var C1=zM(),np=function(){},vf=x.forwardRef(function(e,t){var a=x.useRef(null),i=x.useState({onScrollCapture:np,onWheelCapture:np,onTouchMoveCapture:np}),s=i[0],l=i[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,y=e.enabled,v=e.shards,w=e.sideCar,b=e.noRelative,C=e.noIsolation,E=e.inert,T=e.allowPinchZoom,N=e.as,R=N===void 0?"div":N,O=e.gapMode,j=S1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=w,P=kM([a,t]),A=Sa(Sa({},j),s);return x.createElement(x.Fragment,null,y&&x.createElement(I,{sideCar:C1,removeScrollBar:m,shards:v,noRelative:b,noIsolation:C,inert:E,setCallbacks:l,allowPinchZoom:!!T,lockRef:a,gapMode:O}),d?x.cloneElement(x.Children.only(f),Sa(Sa({},A),{ref:P})):x.createElement(R,Sa({},A,{className:p,ref:P}),f))});vf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vf.classNames={fullWidth:bd,zeroRight:xd};var PM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=PM();return t&&e.setAttribute("nonce",t),e}function BM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var VM=function(){var e=0,t=null;return{add:function(a){e==0&&(t=YM())&&(BM(t,a),HM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FM=function(){var e=VM();return function(t,a){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}},T1=function(){var e=FM(),t=function(a){var i=a.styles,s=a.dynamic;return e(i,s),null};return t},GM={left:0,top:0,right:0,gap:0},rp=function(e){return parseInt(e||"",10)||0},qM=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[rp(a),rp(i),rp(s)]},WM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return GM;var t=qM(e),a=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-a+t[2]-t[0])}},KM=T1(),Ms="data-scroll-locked",$M=function(e,t,a,i){var s=e.left,l=e.top,d=e.right,f=e.gap;return a===void 0&&(a="margin"),`
|
|
13
|
+
.`.concat(OM,` {
|
|
14
|
+
overflow: hidden `).concat(i,`;
|
|
15
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
16
|
+
}
|
|
17
|
+
body[`).concat(Ms,`] {
|
|
18
|
+
overflow: hidden `).concat(i,`;
|
|
19
|
+
overscroll-behavior: contain;
|
|
20
|
+
`).concat([t&&"position: relative ".concat(i,";"),a==="margin"&&`
|
|
21
|
+
padding-left: `.concat(s,`px;
|
|
22
|
+
padding-top: `).concat(l,`px;
|
|
23
|
+
padding-right: `).concat(d,`px;
|
|
24
|
+
margin-left:0;
|
|
25
|
+
margin-top:0;
|
|
26
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
27
|
+
`),a==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(xd,` {
|
|
31
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(bd,` {
|
|
35
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(xd," .").concat(xd,` {
|
|
39
|
+
right: 0 `).concat(i,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.`).concat(bd," .").concat(bd,` {
|
|
43
|
+
margin-right: 0 `).concat(i,`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body[`).concat(Ms,`] {
|
|
47
|
+
`).concat(jM,": ").concat(f,`px;
|
|
48
|
+
}
|
|
49
|
+
`)},$0=function(){var e=parseInt(document.body.getAttribute(Ms)||"0",10);return isFinite(e)?e:0},XM=function(){x.useEffect(function(){return document.body.setAttribute(Ms,($0()+1).toString()),function(){var e=$0()-1;e<=0?document.body.removeAttribute(Ms):document.body.setAttribute(Ms,e.toString())}},[])},QM=function(e){var t=e.noRelative,a=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;XM();var l=x.useMemo(function(){return WM(s)},[s]);return x.createElement(KM,{styles:$M(l,!t,s,a?"":"!important")})},kp=!1;if(typeof window<"u")try{var qu=Object.defineProperty({},"passive",{get:function(){return kp=!0,!0}});window.addEventListener("test",qu,qu),window.removeEventListener("test",qu,qu)}catch{kp=!1}var Ss=kp?{passive:!1}:!1,ZM=function(e){return e.tagName==="TEXTAREA"},R1=function(e,t){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[t]!=="hidden"&&!(a.overflowY===a.overflowX&&!ZM(e)&&a[t]==="visible")},JM=function(e){return R1(e,"overflowY")},e_=function(e){return R1(e,"overflowX")},X0=function(e,t){var a=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=N1(e,i);if(s){var l=A1(e,i),d=l[1],f=l[2];if(d>f)return!0}i=i.parentNode}while(i&&i!==a.body);return!1},t_=function(e){var t=e.scrollTop,a=e.scrollHeight,i=e.clientHeight;return[t,a,i]},n_=function(e){var t=e.scrollLeft,a=e.scrollWidth,i=e.clientWidth;return[t,a,i]},N1=function(e,t){return e==="v"?JM(t):e_(t)},A1=function(e,t){return e==="v"?t_(t):n_(t)},r_=function(e,t){return e==="h"&&t==="rtl"?-1:1},a_=function(e,t,a,i,s){var l=r_(e,window.getComputedStyle(t).direction),d=l*i,f=a.target,p=t.contains(f),m=!1,y=d>0,v=0,w=0;do{if(!f)break;var b=A1(e,f),C=b[0],E=b[1],T=b[2],N=E-T-l*C;(C||N)&&N1(e,f)&&(v+=N,w+=C);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!p&&f!==document.body||p&&(t.contains(f)||t===f));return(y&&Math.abs(v)<1||!y&&Math.abs(w)<1)&&(m=!0),m},Wu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Q0=function(e){return[e.deltaX,e.deltaY]},Z0=function(e){return e&&"current"in e?e.current:e},i_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},o_=function(e){return`
|
|
50
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
51
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
52
|
+
`)},s_=0,Es=[];function l_(e){var t=x.useRef([]),a=x.useRef([0,0]),i=x.useRef(),s=x.useState(s_++)[0],l=x.useState(T1)[0],d=x.useRef(e);x.useEffect(function(){d.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var E=DM([e.lockRef.current],(e.shards||[]).map(Z0),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=x.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var N=Wu(E),R=a.current,O="deltaX"in E?E.deltaX:R[0]-N[0],j="deltaY"in E?E.deltaY:R[1]-N[1],I,P=E.target,A=Math.abs(O)>Math.abs(j)?"h":"v";if("touches"in E&&A==="h"&&P.type==="range")return!1;var _=window.getSelection(),Z=_&&_.anchorNode,ne=Z?Z===P||Z.contains(P):!1;if(ne)return!1;var ae=X0(A,P);if(!ae)return!0;if(ae?I=A:(I=A==="v"?"h":"v",ae=X0(A,P)),!ae)return!1;if(!i.current&&"changedTouches"in E&&(O||j)&&(i.current=I),!I)return!0;var fe=i.current||I;return a_(fe,T,E,fe==="h"?O:j)},[]),p=x.useCallback(function(E){var T=E;if(!(!Es.length||Es[Es.length-1]!==l)){var N="deltaY"in T?Q0(T):Wu(T),R=t.current.filter(function(I){return I.name===T.type&&(I.target===T.target||T.target===I.shadowParent)&&i_(I.delta,N)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var O=(d.current.shards||[]).map(Z0).filter(Boolean).filter(function(I){return I.contains(T.target)}),j=O.length>0?f(T,O[0]):!d.current.noIsolation;j&&T.cancelable&&T.preventDefault()}}},[]),m=x.useCallback(function(E,T,N,R){var O={name:E,delta:T,target:N,should:R,shadowParent:c_(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(j){return j!==O})},1)},[]),y=x.useCallback(function(E){a.current=Wu(E),i.current=void 0},[]),v=x.useCallback(function(E){m(E.type,Q0(E),E.target,f(E,e.lockRef.current))},[]),w=x.useCallback(function(E){m(E.type,Wu(E),E.target,f(E,e.lockRef.current))},[]);x.useEffect(function(){return Es.push(l),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",p,Ss),document.addEventListener("touchmove",p,Ss),document.addEventListener("touchstart",y,Ss),function(){Es=Es.filter(function(E){return E!==l}),document.removeEventListener("wheel",p,Ss),document.removeEventListener("touchmove",p,Ss),document.removeEventListener("touchstart",y,Ss)}},[]);var b=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(l,{styles:o_(s)}):null,b?x.createElement(QM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function c_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const u_=UM(C1,l_);var Ag=x.forwardRef(function(e,t){return x.createElement(vf,Sa({},e,{ref:t,sideCar:u_}))});Ag.classNames=vf.classNames;var d_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cs=new WeakMap,Ku=new WeakMap,$u={},ap=0,D1=function(e){return e&&(e.host||D1(e.parentNode))},f_=function(e,t){return t.map(function(a){if(e.contains(a))return a;var i=D1(a);return i&&e.contains(i)?i:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},h_=function(e,t,a,i){var s=f_(t,Array.isArray(e)?e:[e]);$u[a]||($u[a]=new WeakMap);var l=$u[a],d=[],f=new Set,p=new Set(s),m=function(v){!v||f.has(v)||(f.add(v),m(v.parentNode))};s.forEach(m);var y=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(w){if(f.has(w))y(w);else try{var b=w.getAttribute(i),C=b!==null&&b!=="false",E=(Cs.get(w)||0)+1,T=(l.get(w)||0)+1;Cs.set(w,E),l.set(w,T),d.push(w),E===1&&C&&Ku.set(w,!0),T===1&&w.setAttribute(a,"true"),C||w.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",w,N)}})};return y(t),f.clear(),ap++,function(){d.forEach(function(v){var w=Cs.get(v)-1,b=l.get(v)-1;Cs.set(v,w),l.set(v,b),w||(Ku.has(v)||v.removeAttribute(i),Ku.delete(v)),b||v.removeAttribute(a)}),ap--,ap||(Cs=new WeakMap,Cs=new WeakMap,Ku=new WeakMap,$u={})}},O1=function(e,t,a){a===void 0&&(a="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=d_(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),h_(i,s,a,"aria-hidden")):function(){return null}},xf="Dialog",[j1]=no(xf),[m_,ma]=j1(xf),M1=e=>{const{__scopeDialog:t,children:a,open:i,defaultOpen:s,onOpenChange:l,modal:d=!0}=e,f=x.useRef(null),p=x.useRef(null),[m,y]=Vs({prop:i,defaultProp:s??!1,onChange:l,caller:xf});return u.jsx(m_,{scope:t,triggerRef:f,contentRef:p,contentId:$i(),titleId:$i(),descriptionId:$i(),open:m,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(v=>!v),[y]),modal:d,children:a})};M1.displayName=xf;var _1="DialogTrigger",k1=x.forwardRef((e,t)=>{const{__scopeDialog:a,...i}=e,s=ma(_1,a),l=zn(t,s.triggerRef);return u.jsx(Qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":jg(s.open),...i,ref:l,onClick:ut(e.onClick,s.onOpenToggle)})});k1.displayName=_1;var Dg="DialogPortal",[p_,L1]=j1(Dg,{forceMount:void 0}),I1=e=>{const{__scopeDialog:t,forceMount:a,children:i,container:s}=e,l=ma(Dg,t);return u.jsx(p_,{scope:t,forceMount:a,children:x.Children.map(i,d=>u.jsx(oi,{present:a||l.open,children:u.jsx(Ng,{asChild:!0,container:s,children:d})}))})};I1.displayName=Dg;var _d="DialogOverlay",z1=x.forwardRef((e,t)=>{const a=L1(_d,e.__scopeDialog),{forceMount:i=a.forceMount,...s}=e,l=ma(_d,e.__scopeDialog);return l.modal?u.jsx(oi,{present:i||l.open,children:u.jsx(y_,{...s,ref:t})}):null});z1.displayName=_d;var g_=zs("DialogOverlay.RemoveScroll"),y_=x.forwardRef((e,t)=>{const{__scopeDialog:a,...i}=e,s=ma(_d,a);return u.jsx(Ag,{as:g_,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(Qt.div,{"data-state":jg(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Mo="DialogContent",U1=x.forwardRef((e,t)=>{const a=L1(Mo,e.__scopeDialog),{forceMount:i=a.forceMount,...s}=e,l=ma(Mo,e.__scopeDialog);return u.jsx(oi,{present:i||l.open,children:l.modal?u.jsx(v_,{...s,ref:t}):u.jsx(x_,{...s,ref:t})})});U1.displayName=Mo;var v_=x.forwardRef((e,t)=>{const a=ma(Mo,e.__scopeDialog),i=x.useRef(null),s=zn(t,a.contentRef,i);return x.useEffect(()=>{const l=i.current;if(l)return O1(l)},[]),u.jsx(P1,{...e,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ut(e.onCloseAutoFocus,l=>{l.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:ut(e.onPointerDownOutside,l=>{const d=l.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&l.preventDefault()}),onFocusOutside:ut(e.onFocusOutside,l=>l.preventDefault())})}),x_=x.forwardRef((e,t)=>{const a=ma(Mo,e.__scopeDialog),i=x.useRef(!1),s=x.useRef(!1);return u.jsx(P1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||a.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=l.target;a.triggerRef.current?.contains(d)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),P1=x.forwardRef((e,t)=>{const{__scopeDialog:a,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...d}=e,f=ma(Mo,a),p=x.useRef(null),m=zn(t,p);return w1(),u.jsxs(u.Fragment,{children:[u.jsx(Rg,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:u.jsx(Tg,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":jg(f.open),...d,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(b_,{titleId:f.titleId}),u.jsx(S_,{contentRef:p,descriptionId:f.descriptionId})]})]})}),Og="DialogTitle",Y1=x.forwardRef((e,t)=>{const{__scopeDialog:a,...i}=e,s=ma(Og,a);return u.jsx(Qt.h2,{id:s.titleId,...i,ref:t})});Y1.displayName=Og;var B1="DialogDescription",H1=x.forwardRef((e,t)=>{const{__scopeDialog:a,...i}=e,s=ma(B1,a);return u.jsx(Qt.p,{id:s.descriptionId,...i,ref:t})});H1.displayName=B1;var V1="DialogClose",F1=x.forwardRef((e,t)=>{const{__scopeDialog:a,...i}=e,s=ma(V1,a);return u.jsx(Qt.button,{type:"button",...i,ref:t,onClick:ut(e.onClick,()=>s.onOpenChange(!1))})});F1.displayName=V1;function jg(e){return e?"open":"closed"}var G1="DialogTitleWarning",[b5,q1]=Ij(G1,{contentName:Mo,titleName:Og,docsSlug:"dialog"}),b_=({titleId:e})=>{const t=q1(G1),a=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
53
|
+
|
|
54
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
55
|
+
|
|
56
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},w_="DialogDescriptionWarning",S_=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q1(w_).contentName}}.`;return x.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},E_=M1,C_=k1,T_=I1,R_=z1,N_=U1,A_=Y1,D_=H1,O_=F1,ip={exports:{}},op={};var J0;function j_(){if(J0)return op;J0=1;var e=yc();function t(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var a=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,d=e.useDebugValue;function f(v,w){var b=w(),C=i({inst:{value:b,getSnapshot:w}}),E=C[0].inst,T=C[1];return l(function(){E.value=b,E.getSnapshot=w,p(E)&&T({inst:E})},[v,b,w]),s(function(){return p(E)&&T({inst:E}),v(function(){p(E)&&T({inst:E})})},[v]),d(b),b}function p(v){var w=v.getSnapshot;v=v.value;try{var b=w();return!a(v,b)}catch{return!0}}function m(v,w){return w()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return op.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,op}var ew;function W1(){return ew||(ew=1,ip.exports=j_()),ip.exports}var M_=W1();function __(e){const[t,a]=x.useState(void 0);return ri(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let d,f;if("borderBoxSize"in l){const p=l.borderBoxSize,m=Array.isArray(p)?p[0]:p;d=m.inlineSize,f=m.blockSize}else d=e.offsetWidth,f=e.offsetHeight;a({width:d,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else a(void 0)},[e]),t}const k_=["top","right","bottom","left"],Ji=Math.min,Mr=Math.max,kd=Math.round,Os=Math.floor,Ca=e=>({x:e,y:e}),L_={left:"right",right:"left",bottom:"top",top:"bottom"},I_={start:"end",end:"start"};function Ld(e,t,a){return Mr(e,Ji(t,a))}function Na(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function si(e){return e.split("-")[1]}function Mg(e){return e==="x"?"y":"x"}function bf(e){return e==="y"?"height":"width"}const z_=new Set(["top","bottom"]);function $r(e){return z_.has(Lr(e))?"y":"x"}function wf(e){return Mg($r(e))}function U_(e,t,a){a===void 0&&(a=!1);const i=si(e),s=wf(e),l=bf(s);let d=s==="x"?i===(a?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(d=Id(d)),[d,Id(d)]}function P_(e){const t=Id(e);return[Lp(e),t,Lp(t)]}function Lp(e){return e.replace(/start|end/g,t=>I_[t])}const tw=["left","right"],nw=["right","left"],Y_=["top","bottom"],B_=["bottom","top"];function H_(e,t,a){switch(e){case"top":case"bottom":return a?t?nw:tw:t?tw:nw;case"left":case"right":return t?Y_:B_;default:return[]}}function V_(e,t,a,i){const s=si(e);let l=H_(Lr(e),a==="start",i);return s&&(l=l.map(d=>d+"-"+s),t&&(l=l.concat(l.map(Lp)))),l}function Id(e){return e.replace(/left|right|bottom|top/g,t=>L_[t])}function F_(e){return{top:0,right:0,bottom:0,left:0,...e}}function _g(e){return typeof e!="number"?F_(e):{top:e,right:e,bottom:e,left:e}}function zd(e){const{x:t,y:a,width:i,height:s}=e;return{width:i,height:s,top:a,left:t,right:t+i,bottom:a+s,x:t,y:a}}function rw(e,t,a){let{reference:i,floating:s}=e;const l=$r(t),d=wf(t),f=bf(d),p=Lr(t),m=l==="y",y=i.x+i.width/2-s.width/2,v=i.y+i.height/2-s.height/2,w=i[f]/2-s[f]/2;let b;switch(p){case"top":b={x:y,y:i.y-s.height};break;case"bottom":b={x:y,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:v};break;case"left":b={x:i.x-s.width,y:v};break;default:b={x:i.x,y:i.y}}switch(si(t)){case"start":b[d]-=w*(a&&m?-1:1);break;case"end":b[d]+=w*(a&&m?-1:1);break}return b}const G_=async(e,t,a)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:d}=a,f=l.filter(Boolean),p=await(d.isRTL==null?void 0:d.isRTL(t));let m=await d.getElementRects({reference:e,floating:t,strategy:s}),{x:y,y:v}=rw(m,i,p),w=i,b={},C=0;for(let E=0;E<f.length;E++){const{name:T,fn:N}=f[E],{x:R,y:O,data:j,reset:I}=await N({x:y,y:v,initialPlacement:i,placement:w,strategy:s,middlewareData:b,rects:m,platform:d,elements:{reference:e,floating:t}});y=R??y,v=O??v,b={...b,[T]:{...b[T],...j}},I&&C<=50&&(C++,typeof I=="object"&&(I.placement&&(w=I.placement),I.rects&&(m=I.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:s}):I.rects),{x:y,y:v}=rw(m,w,p)),E=-1)}return{x:y,y:v,placement:w,strategy:s,middlewareData:b}};async function dc(e,t){var a;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:d,elements:f,strategy:p}=e,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:w=!1,padding:b=0}=Na(t,e),C=_g(b),T=f[w?v==="floating"?"reference":"floating":v],N=zd(await l.getClippingRect({element:(a=await(l.isElement==null?void 0:l.isElement(T)))==null||a?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:y,strategy:p})),R=v==="floating"?{x:i,y:s,width:d.floating.width,height:d.floating.height}:d.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),j=await(l.isElement==null?void 0:l.isElement(O))?await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1}:{x:1,y:1},I=zd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:O,strategy:p}):R);return{top:(N.top-I.top+C.top)/j.y,bottom:(I.bottom-N.bottom+C.bottom)/j.y,left:(N.left-I.left+C.left)/j.x,right:(I.right-N.right+C.right)/j.x}}const q_=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:i,placement:s,rects:l,platform:d,elements:f,middlewareData:p}=t,{element:m,padding:y=0}=Na(e,t)||{};if(m==null)return{};const v=_g(y),w={x:a,y:i},b=wf(s),C=bf(b),E=await d.getDimensions(m),T=b==="y",N=T?"top":"left",R=T?"bottom":"right",O=T?"clientHeight":"clientWidth",j=l.reference[C]+l.reference[b]-w[b]-l.floating[C],I=w[b]-l.reference[b],P=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m));let A=P?P[O]:0;(!A||!await(d.isElement==null?void 0:d.isElement(P)))&&(A=f.floating[O]||l.floating[C]);const _=j/2-I/2,Z=A/2-E[C]/2-1,ne=Ji(v[N],Z),ae=Ji(v[R],Z),fe=ne,pe=A-E[C]-ae,ce=A/2-E[C]/2+_,F=Ld(fe,ce,pe),k=!p.arrow&&si(s)!=null&&ce!==F&&l.reference[C]/2-(ce<fe?ne:ae)-E[C]/2<0,X=k?ce<fe?ce-fe:ce-pe:0;return{[b]:w[b]+X,data:{[b]:F,centerOffset:ce-F-X,...k&&{alignmentOffset:X}},reset:k}}}),W_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,i;const{placement:s,middlewareData:l,rects:d,initialPlacement:f,platform:p,elements:m}=t,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...T}=Na(e,t);if((a=l.arrow)!=null&&a.alignmentOffset)return{};const N=Lr(s),R=$r(f),O=Lr(f)===f,j=await(p.isRTL==null?void 0:p.isRTL(m.floating)),I=w||(O||!E?[Id(f)]:P_(f)),P=C!=="none";!w&&P&&I.push(...V_(f,E,C,j));const A=[f,...I],_=await dc(t,T),Z=[];let ne=((i=l.flip)==null?void 0:i.overflows)||[];if(y&&Z.push(_[N]),v){const ce=U_(s,d,j);Z.push(_[ce[0]],_[ce[1]])}if(ne=[...ne,{placement:s,overflows:Z}],!Z.every(ce=>ce<=0)){var ae,fe;const ce=(((ae=l.flip)==null?void 0:ae.index)||0)+1,F=A[ce];if(F&&(!(v==="alignment"?R!==$r(F):!1)||ne.every(z=>$r(z.placement)===R?z.overflows[0]>0:!0)))return{data:{index:ce,overflows:ne},reset:{placement:F}};let k=(fe=ne.filter(X=>X.overflows[0]<=0).sort((X,z)=>X.overflows[1]-z.overflows[1])[0])==null?void 0:fe.placement;if(!k)switch(b){case"bestFit":{var pe;const X=(pe=ne.filter(z=>{if(P){const K=$r(z.placement);return K===R||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,oe)=>K+oe,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:pe[0];X&&(k=X);break}case"initialPlacement":k=f;break}if(s!==k)return{reset:{placement:k}}}return{}}}};function aw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iw(e){return k_.some(t=>e[t]>=0)}const K_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a}=t,{strategy:i="referenceHidden",...s}=Na(e,t);switch(i){case"referenceHidden":{const l=await dc(t,{...s,elementContext:"reference"}),d=aw(l,a.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:iw(d)}}}case"escaped":{const l=await dc(t,{...s,altBoundary:!0}),d=aw(l,a.floating);return{data:{escapedOffsets:d,escaped:iw(d)}}}default:return{}}}}},K1=new Set(["left","top"]);async function $_(e,t){const{placement:a,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),d=Lr(a),f=si(a),p=$r(a)==="y",m=K1.has(d)?-1:1,y=l&&p?-1:1,v=Na(t,e);let{mainAxis:w,crossAxis:b,alignmentAxis:C}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof C=="number"&&(b=f==="end"?C*-1:C),p?{x:b*y,y:w*m}:{x:w*m,y:b*y}}const X_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,i;const{x:s,y:l,placement:d,middlewareData:f}=t,p=await $_(t,e);return d===((a=f.offset)==null?void 0:a.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:l+p.y,data:{...p,placement:d}}}}},Q_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:T=>{let{x:N,y:R}=T;return{x:N,y:R}}},...p}=Na(e,t),m={x:a,y:i},y=await dc(t,p),v=$r(Lr(s)),w=Mg(v);let b=m[w],C=m[v];if(l){const T=w==="y"?"top":"left",N=w==="y"?"bottom":"right",R=b+y[T],O=b-y[N];b=Ld(R,b,O)}if(d){const T=v==="y"?"top":"left",N=v==="y"?"bottom":"right",R=C+y[T],O=C-y[N];C=Ld(R,C,O)}const E=f.fn({...t,[w]:b,[v]:C});return{...E,data:{x:E.x-a,y:E.y-i,enabled:{[w]:l,[v]:d}}}}}},Z_=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:a,y:i,placement:s,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Na(e,t),y={x:a,y:i},v=$r(s),w=Mg(v);let b=y[w],C=y[v];const E=Na(f,t),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const O=w==="y"?"height":"width",j=l.reference[w]-l.floating[O]+T.mainAxis,I=l.reference[w]+l.reference[O]-T.mainAxis;b<j?b=j:b>I&&(b=I)}if(m){var N,R;const O=w==="y"?"width":"height",j=K1.has(Lr(s)),I=l.reference[v]-l.floating[O]+(j&&((N=d.offset)==null?void 0:N[v])||0)+(j?0:T.crossAxis),P=l.reference[v]+l.reference[O]+(j?0:((R=d.offset)==null?void 0:R[v])||0)-(j?T.crossAxis:0);C<I?C=I:C>P&&(C=P)}return{[w]:b,[v]:C}}}},J_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,i;const{placement:s,rects:l,platform:d,elements:f}=t,{apply:p=()=>{},...m}=Na(e,t),y=await dc(t,m),v=Lr(s),w=si(s),b=$r(s)==="y",{width:C,height:E}=l.floating;let T,N;v==="top"||v==="bottom"?(T=v,N=w===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(N=v,T=w==="end"?"top":"bottom");const R=E-y.top-y.bottom,O=C-y.left-y.right,j=Ji(E-y[T],R),I=Ji(C-y[N],O),P=!t.middlewareData.shift;let A=j,_=I;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(_=O),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(A=R),P&&!w){const ne=Mr(y.left,0),ae=Mr(y.right,0),fe=Mr(y.top,0),pe=Mr(y.bottom,0);b?_=C-2*(ne!==0||ae!==0?ne+ae:Mr(y.left,y.right)):A=E-2*(fe!==0||pe!==0?fe+pe:Mr(y.top,y.bottom))}await p({...t,availableWidth:_,availableHeight:A});const Z=await d.getDimensions(f.floating);return C!==Z.width||E!==Z.height?{reset:{rects:!0}}:{}}}};function Sf(){return typeof window<"u"}function ro(e){return kg(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Aa(e){var t;return(t=(kg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kg(e){return Sf()?e instanceof Node||e instanceof Wn(e).Node:!1}function sn(e){return Sf()?e instanceof Element||e instanceof Wn(e).Element:!1}function On(e){return Sf()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function Ip(e){return!Sf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}const e2=new Set(["inline","contents"]);function zo(e){const{overflow:t,overflowX:a,overflowY:i,display:s}=Ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+a)&&!e2.has(s)}const t2=new Set(["table","td","th"]);function n2(e){return t2.has(ro(e))}const r2=[":popover-open",":modal"];function Ef(e){return r2.some(t=>{try{return e.matches(t)}catch{return!1}})}const a2=["transform","translate","scale","rotate","perspective"],i2=["transform","translate","scale","rotate","perspective","filter"],o2=["paint","layout","strict","content"];function Lg(e){const t=Cf(),a=sn(e)?Ir(e):e;return a2.some(i=>a[i]?a[i]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!t&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!t&&(a.filter?a.filter!=="none":!1)||i2.some(i=>(a.willChange||"").includes(i))||o2.some(i=>(a.contain||"").includes(i))}function s2(e){let t=ii(e);for(;On(t)&&!ni(t);){if(Lg(t))return t;if(Ef(t))return null;t=ii(t)}return null}function Cf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const l2=new Set(["html","body","#document"]);function ni(e){return l2.has(ro(e))}function Ir(e){return Wn(e).getComputedStyle(e)}function Tf(e){return sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ip(e)&&e.host||Aa(e);return Ip(t)?t.host:t}function $1(e){const t=ii(e);return ni(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&zo(t)?t:$1(t)}function Xi(e,t,a){var i;t===void 0&&(t=[]),a===void 0&&(a=!0);const s=$1(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),d=Wn(s);if(l){const f=zp(d);return t.concat(d,d.visualViewport||[],zo(s)?s:[],f&&a?Xi(f):[])}return t.concat(s,Xi(s,[],a))}function zp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X1(e){const t=Ir(e);let a=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=On(e),l=s?e.offsetWidth:a,d=s?e.offsetHeight:i,f=kd(a)!==l||kd(i)!==d;return f&&(a=l,i=d),{width:a,height:i,$:f}}function Ig(e){return sn(e)?e:e.contextElement}function _s(e){const t=Ig(e);if(!On(t))return Ca(1);const a=t.getBoundingClientRect(),{width:i,height:s,$:l}=X1(t);let d=(l?kd(a.width):a.width)/i,f=(l?kd(a.height):a.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const c2=Ca(0);function Q1(e){const t=Wn(e);return!Cf()||!t.visualViewport?c2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function u2(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Wn(e)?!1:t}function _o(e,t,a,i){t===void 0&&(t=!1),a===void 0&&(a=!1);const s=e.getBoundingClientRect(),l=Ig(e);let d=Ca(1);t&&(i?sn(i)&&(d=_s(i)):d=_s(e));const f=u2(l,a,i)?Q1(l):Ca(0);let p=(s.left+f.x)/d.x,m=(s.top+f.y)/d.y,y=s.width/d.x,v=s.height/d.y;if(l){const w=Wn(l),b=i&&sn(i)?Wn(i):i;let C=w,E=zp(C);for(;E&&i&&b!==C;){const T=_s(E),N=E.getBoundingClientRect(),R=Ir(E),O=N.left+(E.clientLeft+parseFloat(R.paddingLeft))*T.x,j=N.top+(E.clientTop+parseFloat(R.paddingTop))*T.y;p*=T.x,m*=T.y,y*=T.x,v*=T.y,p+=O,m+=j,C=Wn(E),E=zp(C)}}return zd({width:y,height:v,x:p,y:m})}function Rf(e,t){const a=Tf(e).scrollLeft;return t?t.left+a:_o(Aa(e)).left+a}function Z1(e,t){const a=e.getBoundingClientRect(),i=a.left+t.scrollLeft-Rf(e,a),s=a.top+t.scrollTop;return{x:i,y:s}}function d2(e){let{elements:t,rect:a,offsetParent:i,strategy:s}=e;const l=s==="fixed",d=Aa(i),f=t?Ef(t.floating):!1;if(i===d||f&&l)return a;let p={scrollLeft:0,scrollTop:0},m=Ca(1);const y=Ca(0),v=On(i);if((v||!v&&!l)&&((ro(i)!=="body"||zo(d))&&(p=Tf(i)),On(i))){const b=_o(i);m=_s(i),y.x=b.x+i.clientLeft,y.y=b.y+i.clientTop}const w=d&&!v&&!l?Z1(d,p):Ca(0);return{width:a.width*m.x,height:a.height*m.y,x:a.x*m.x-p.scrollLeft*m.x+y.x+w.x,y:a.y*m.y-p.scrollTop*m.y+y.y+w.y}}function f2(e){return Array.from(e.getClientRects())}function h2(e){const t=Aa(e),a=Tf(e),i=e.ownerDocument.body,s=Mr(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Mr(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let d=-a.scrollLeft+Rf(e);const f=-a.scrollTop;return Ir(i).direction==="rtl"&&(d+=Mr(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:d,y:f}}const ow=25;function m2(e,t){const a=Wn(e),i=Aa(e),s=a.visualViewport;let l=i.clientWidth,d=i.clientHeight,f=0,p=0;if(s){l=s.width,d=s.height;const y=Cf();(!y||y&&t==="fixed")&&(f=s.offsetLeft,p=s.offsetTop)}const m=Rf(i);if(m<=0){const y=i.ownerDocument,v=y.body,w=getComputedStyle(v),b=y.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,C=Math.abs(i.clientWidth-v.clientWidth-b);C<=ow&&(l-=C)}else m<=ow&&(l+=m);return{width:l,height:d,x:f,y:p}}const p2=new Set(["absolute","fixed"]);function g2(e,t){const a=_o(e,!0,t==="fixed"),i=a.top+e.clientTop,s=a.left+e.clientLeft,l=On(e)?_s(e):Ca(1),d=e.clientWidth*l.x,f=e.clientHeight*l.y,p=s*l.x,m=i*l.y;return{width:d,height:f,x:p,y:m}}function sw(e,t,a){let i;if(t==="viewport")i=m2(e,a);else if(t==="document")i=h2(Aa(e));else if(sn(t))i=g2(t,a);else{const s=Q1(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zd(i)}function J1(e,t){const a=ii(e);return a===t||!sn(a)||ni(a)?!1:Ir(a).position==="fixed"||J1(a,t)}function y2(e,t){const a=t.get(e);if(a)return a;let i=Xi(e,[],!1).filter(f=>sn(f)&&ro(f)!=="body"),s=null;const l=Ir(e).position==="fixed";let d=l?ii(e):e;for(;sn(d)&&!ni(d);){const f=Ir(d),p=Lg(d);!p&&f.position==="fixed"&&(s=null),(l?!p&&!s:!p&&f.position==="static"&&!!s&&p2.has(s.position)||zo(d)&&!p&&J1(e,d))?i=i.filter(y=>y!==d):s=f,d=ii(d)}return t.set(e,i),i}function v2(e){let{element:t,boundary:a,rootBoundary:i,strategy:s}=e;const d=[...a==="clippingAncestors"?Ef(t)?[]:y2(t,this._c):[].concat(a),i],f=d[0],p=d.reduce((m,y)=>{const v=sw(t,y,s);return m.top=Mr(v.top,m.top),m.right=Ji(v.right,m.right),m.bottom=Ji(v.bottom,m.bottom),m.left=Mr(v.left,m.left),m},sw(t,f,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function x2(e){const{width:t,height:a}=X1(e);return{width:t,height:a}}function b2(e,t,a){const i=On(t),s=Aa(t),l=a==="fixed",d=_o(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const p=Ca(0);function m(){p.x=Rf(s)}if(i||!i&&!l)if((ro(t)!=="body"||zo(s))&&(f=Tf(t)),i){const b=_o(t,!0,l,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else s&&m();l&&!i&&s&&m();const y=s&&!i&&!l?Z1(s,f):Ca(0),v=d.left+f.scrollLeft-p.x-y.x,w=d.top+f.scrollTop-p.y-y.y;return{x:v,y:w,width:d.width,height:d.height}}function sp(e){return Ir(e).position==="static"}function lw(e,t){if(!On(e)||Ir(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return Aa(e)===a&&(a=a.ownerDocument.body),a}function eE(e,t){const a=Wn(e);if(Ef(e))return a;if(!On(e)){let s=ii(e);for(;s&&!ni(s);){if(sn(s)&&!sp(s))return s;s=ii(s)}return a}let i=lw(e,t);for(;i&&n2(i)&&sp(i);)i=lw(i,t);return i&&ni(i)&&sp(i)&&!Lg(i)?a:i||s2(e)||a}const w2=async function(e){const t=this.getOffsetParent||eE,a=this.getDimensions,i=await a(e.floating);return{reference:b2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function S2(e){return Ir(e).direction==="rtl"}const E2={convertOffsetParentRelativeRectToViewportRelativeRect:d2,getDocumentElement:Aa,getClippingRect:v2,getOffsetParent:eE,getElementRects:w2,getClientRects:f2,getDimensions:x2,getScale:_s,isElement:sn,isRTL:S2};function tE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C2(e,t){let a=null,i;const s=Aa(e);function l(){var f;clearTimeout(i),(f=a)==null||f.disconnect(),a=null}function d(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),l();const m=e.getBoundingClientRect(),{left:y,top:v,width:w,height:b}=m;if(f||t(),!w||!b)return;const C=Os(v),E=Os(s.clientWidth-(y+w)),T=Os(s.clientHeight-(v+b)),N=Os(y),O={rootMargin:-C+"px "+-E+"px "+-T+"px "+-N+"px",threshold:Mr(0,Ji(1,p))||1};let j=!0;function I(P){const A=P[0].intersectionRatio;if(A!==p){if(!j)return d();A?d(!1,A):i=setTimeout(()=>{d(!1,1e-7)},1e3)}A===1&&!tE(m,e.getBoundingClientRect())&&d(),j=!1}try{a=new IntersectionObserver(I,{...O,root:s.ownerDocument})}catch{a=new IntersectionObserver(I,O)}a.observe(e)}return d(!0),l}function Up(e,t,a,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=Ig(e),y=s||l?[...m?Xi(m):[],...Xi(t)]:[];y.forEach(N=>{s&&N.addEventListener("scroll",a,{passive:!0}),l&&N.addEventListener("resize",a)});const v=m&&f?C2(m,a):null;let w=-1,b=null;d&&(b=new ResizeObserver(N=>{let[R]=N;R&&R.target===m&&b&&(b.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),a()}),m&&!p&&b.observe(m),b.observe(t));let C,E=p?_o(e):null;p&&T();function T(){const N=_o(e);E&&!tE(E,N)&&a(),E=N,C=requestAnimationFrame(T)}return a(),()=>{var N;y.forEach(R=>{s&&R.removeEventListener("scroll",a),l&&R.removeEventListener("resize",a)}),v?.(),(N=b)==null||N.disconnect(),b=null,p&&cancelAnimationFrame(C)}}const T2=X_,R2=Q_,N2=W_,A2=J_,D2=K_,cw=q_,O2=Z_,j2=(e,t,a)=>{const i=new Map,s={platform:E2,...a},l={...s.platform,_c:i};return G_(e,t,{...s,platform:l})};var M2=typeof document<"u",_2=function(){},wd=M2?x.useLayoutEffect:_2;function Ud(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 a,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(i=a;i--!==0;)if(!Ud(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=a;i--!==0;){const l=s[i];if(!(l==="_owner"&&e.$$typeof)&&!Ud(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function nE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uw(e,t){const a=nE(e);return Math.round(t*a)/a}function lp(e){const t=x.useRef(e);return wd(()=>{t.current=e}),t}function rE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:d}={},transform:f=!0,whileElementsMounted:p,open:m}=e,[y,v]=x.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[w,b]=x.useState(i);Ud(w,i)||b(i);const[C,E]=x.useState(null),[T,N]=x.useState(null),R=x.useCallback(z=>{z!==P.current&&(P.current=z,E(z))},[]),O=x.useCallback(z=>{z!==A.current&&(A.current=z,N(z))},[]),j=l||C,I=d||T,P=x.useRef(null),A=x.useRef(null),_=x.useRef(y),Z=p!=null,ne=lp(p),ae=lp(s),fe=lp(m),pe=x.useCallback(()=>{if(!P.current||!A.current)return;const z={placement:t,strategy:a,middleware:w};ae.current&&(z.platform=ae.current),j2(P.current,A.current,z).then(K=>{const oe={...K,isPositioned:fe.current!==!1};ce.current&&!Ud(_.current,oe)&&(_.current=oe,Ra.flushSync(()=>{v(oe)}))})},[w,t,a,ae,fe]);wd(()=>{m===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,v(z=>({...z,isPositioned:!1})))},[m]);const ce=x.useRef(!1);wd(()=>(ce.current=!0,()=>{ce.current=!1}),[]),wd(()=>{if(j&&(P.current=j),I&&(A.current=I),j&&I){if(ne.current)return ne.current(j,I,pe);pe()}},[j,I,pe,ne,Z]);const F=x.useMemo(()=>({reference:P,floating:A,setReference:R,setFloating:O}),[R,O]),k=x.useMemo(()=>({reference:j,floating:I}),[j,I]),X=x.useMemo(()=>{const z={position:a,left:0,top:0};if(!k.floating)return z;const K=uw(k.floating,y.x),oe=uw(k.floating,y.y);return f?{...z,transform:"translate("+K+"px, "+oe+"px)",...nE(k.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:K,top:oe}},[a,f,k.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:pe,refs:F,elements:k,floatingStyles:X}),[y,pe,F,k,X])}const k2=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:i,padding:s}=typeof e=="function"?e(a):e;return i&&t(i)?i.current!=null?cw({element:i.current,padding:s}).fn(a):{}:i?cw({element:i,padding:s}).fn(a):{}}}},aE=(e,t)=>({...T2(e),options:[e,t]}),iE=(e,t)=>({...R2(e),options:[e,t]}),oE=(e,t)=>({...O2(e),options:[e,t]}),sE=(e,t)=>({...N2(e),options:[e,t]}),lE=(e,t)=>({...A2(e),options:[e,t]}),cE=(e,t)=>({...D2(e),options:[e,t]}),L2=(e,t)=>({...k2(e),options:[e,t]});var I2="Arrow",uE=x.forwardRef((e,t)=>{const{children:a,width:i=10,height:s=5,...l}=e;return u.jsx(Qt.svg,{...l,ref:t,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});uE.displayName=I2;var z2=uE,zg="Popper",[dE,fE]=no(zg),[U2,hE]=dE(zg),mE=e=>{const{__scopePopper:t,children:a}=e,[i,s]=x.useState(null);return u.jsx(U2,{scope:t,anchor:i,onAnchorChange:s,children:a})};mE.displayName=zg;var pE="PopperAnchor",gE=x.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:i,...s}=e,l=hE(pE,a),d=x.useRef(null),f=zn(t,d),p=x.useRef(null);return x.useEffect(()=>{const m=p.current;p.current=i?.current||d.current,m!==p.current&&l.onAnchorChange(p.current)}),i?null:u.jsx(Qt.div,{...s,ref:f})});gE.displayName=pE;var Ug="PopperContent",[P2,Y2]=dE(Ug),yE=x.forwardRef((e,t)=>{const{__scopePopper:a,side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:C,...E}=e,T=hE(Ug,a),[N,R]=x.useState(null),O=zn(t,de=>R(de)),[j,I]=x.useState(null),P=__(j),A=P?.width??0,_=P?.height??0,Z=i+(l!=="center"?"-"+l:""),ne=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ae=Array.isArray(m)?m:[m],fe=ae.length>0,pe={padding:ne,boundary:ae.filter(H2),altBoundary:fe},{refs:ce,floatingStyles:F,placement:k,isPositioned:X,middlewareData:z}=rE({strategy:"fixed",placement:Z,whileElementsMounted:(...de)=>Up(...de,{animationFrame:b==="always"}),elements:{reference:T.anchor},middleware:[aE({mainAxis:s+_,alignmentAxis:d}),p&&iE({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?oE():void 0,...pe}),p&&sE({...pe}),lE({...pe,apply:({elements:de,rects:ye,availableWidth:Fe,availableHeight:ve})=>{const{width:te,height:me}=ye.reference,be=de.floating.style;be.setProperty("--radix-popper-available-width",`${Fe}px`),be.setProperty("--radix-popper-available-height",`${ve}px`),be.setProperty("--radix-popper-anchor-width",`${te}px`),be.setProperty("--radix-popper-anchor-height",`${me}px`)}}),j&&L2({element:j,padding:f}),V2({arrowWidth:A,arrowHeight:_}),w&&cE({strategy:"referenceHidden",...pe})]}),[K,oe]=bE(k),M=ai(C);ri(()=>{X&&M?.()},[X,M]);const V=z.arrow?.x,Q=z.arrow?.y,ee=z.arrow?.centerOffset!==0,[re,we]=x.useState();return ri(()=>{N&&we(window.getComputedStyle(N).zIndex)},[N]),u.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:X?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(P2,{scope:a,placedSide:K,onArrowChange:I,arrowX:V,arrowY:Q,shouldHideArrow:ee,children:u.jsx(Qt.div,{"data-side":K,"data-align":oe,...E,ref:O,style:{...E.style,animation:X?void 0:"none"}})})})});yE.displayName=Ug;var vE="PopperArrow",B2={top:"bottom",right:"left",bottom:"top",left:"right"},xE=x.forwardRef(function(t,a){const{__scopePopper:i,...s}=t,l=Y2(vE,i),d=B2[l.placedSide];return u.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:u.jsx(z2,{...s,ref:a,style:{...s.style,display:"block"}})})});xE.displayName=vE;function H2(e){return e!==null}var V2=e=>({name:"transformOrigin",options:e,fn(t){const{placement:a,rects:i,middlewareData:s}=t,d=s.arrow?.centerOffset!==0,f=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[m,y]=bE(a),v={start:"0%",center:"50%",end:"100%"}[y],w=(s.arrow?.x??0)+f/2,b=(s.arrow?.y??0)+p/2;let C="",E="";return m==="bottom"?(C=d?v:`${w}px`,E=`${-p}px`):m==="top"?(C=d?v:`${w}px`,E=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,E=d?v:`${b}px`):m==="left"&&(C=`${i.floating.width+p}px`,E=d?v:`${b}px`),{data:{x:C,y:E}}}});function bE(e){const[t,a="center"]=e.split("-");return[t,a]}var F2=mE,G2=gE,q2=yE,W2=xE,cp="rovingFocusGroup.onEntryFocus",K2={bubbles:!1,cancelable:!0},Ec="RovingFocusGroup",[Pp,wE,$2]=yg(Ec),[X2,SE]=no(Ec,[$2]),[Q2,Z2]=X2(Ec),EE=x.forwardRef((e,t)=>u.jsx(Pp.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Pp.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(J2,{...e,ref:t})})}));EE.displayName=Ec;var J2=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,orientation:i,loop:s=!1,dir:l,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...v}=e,w=x.useRef(null),b=zn(t,w),C=wg(l),[E,T]=Vs({prop:d,defaultProp:f??null,onChange:p,caller:Ec}),[N,R]=x.useState(!1),O=ai(m),j=wE(a),I=x.useRef(!1),[P,A]=x.useState(0);return x.useEffect(()=>{const _=w.current;if(_)return _.addEventListener(cp,O),()=>_.removeEventListener(cp,O)},[O]),u.jsx(Q2,{scope:a,orientation:i,dir:C,loop:s,currentTabStopId:E,onItemFocus:x.useCallback(_=>T(_),[T]),onItemShiftTab:x.useCallback(()=>R(!0),[]),onFocusableItemAdd:x.useCallback(()=>A(_=>_+1),[]),onFocusableItemRemove:x.useCallback(()=>A(_=>_-1),[]),children:u.jsx(Qt.div,{tabIndex:N||P===0?-1:0,"data-orientation":i,...v,ref:b,style:{outline:"none",...e.style},onMouseDown:ut(e.onMouseDown,()=>{I.current=!0}),onFocus:ut(e.onFocus,_=>{const Z=!I.current;if(_.target===_.currentTarget&&Z&&!N){const ne=new CustomEvent(cp,K2);if(_.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const ae=j().filter(k=>k.focusable),fe=ae.find(k=>k.active),pe=ae.find(k=>k.id===E),F=[fe,pe,...ae].filter(Boolean).map(k=>k.ref.current);RE(F,y)}}I.current=!1}),onBlur:ut(e.onBlur,()=>R(!1))})})}),CE="RovingFocusGroupItem",TE=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,focusable:i=!0,active:s=!1,tabStopId:l,children:d,...f}=e,p=$i(),m=l||p,y=Z2(CE,a),v=y.currentTabStopId===m,w=wE(a),{onFocusableItemAdd:b,onFocusableItemRemove:C,currentTabStopId:E}=y;return x.useEffect(()=>{if(i)return b(),()=>C()},[i,b,C]),u.jsx(Pp.ItemSlot,{scope:a,id:m,focusable:i,active:s,children:u.jsx(Qt.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:t,onMouseDown:ut(e.onMouseDown,T=>{i?y.onItemFocus(m):T.preventDefault()}),onFocus:ut(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:ut(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){y.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const N=nk(T,y.orientation,y.dir);if(N!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let O=w().filter(j=>j.focusable).map(j=>j.ref.current);if(N==="last")O.reverse();else if(N==="prev"||N==="next"){N==="prev"&&O.reverse();const j=O.indexOf(T.currentTarget);O=y.loop?rk(O,j+1):O.slice(j+1)}setTimeout(()=>RE(O))}}),children:typeof d=="function"?d({isCurrentTabStop:v,hasTabStop:E!=null}):d})})});TE.displayName=CE;var ek={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function nk(e,t,a){const i=tk(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return ek[i]}function RE(e,t=!1){const a=document.activeElement;for(const i of e)if(i===a||(i.focus({preventScroll:t}),document.activeElement!==a))return}function rk(e,t){return e.map((a,i)=>e[(t+i)%e.length])}var ak=EE,ik=TE,Yp=["Enter"," "],ok=["ArrowDown","PageUp","Home"],NE=["ArrowUp","PageDown","End"],sk=[...ok,...NE],lk={ltr:[...Yp,"ArrowRight"],rtl:[...Yp,"ArrowLeft"]},ck={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cc="Menu",[fc,uk,dk]=yg(Cc),[Uo,AE]=no(Cc,[dk,fE,SE]),Nf=fE(),DE=SE(),[fk,Po]=Uo(Cc),[hk,Tc]=Uo(Cc),OE=e=>{const{__scopeMenu:t,open:a=!1,children:i,dir:s,onOpenChange:l,modal:d=!0}=e,f=Nf(t),[p,m]=x.useState(null),y=x.useRef(!1),v=ai(l),w=wg(s);return x.useEffect(()=>{const b=()=>{y.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>y.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),u.jsx(F2,{...f,children:u.jsx(fk,{scope:t,open:a,onOpenChange:v,content:p,onContentChange:m,children:u.jsx(hk,{scope:t,onClose:x.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:w,modal:d,children:i})})})};OE.displayName=Cc;var mk="MenuAnchor",Pg=x.forwardRef((e,t)=>{const{__scopeMenu:a,...i}=e,s=Nf(a);return u.jsx(G2,{...s,...i,ref:t})});Pg.displayName=mk;var Yg="MenuPortal",[pk,jE]=Uo(Yg,{forceMount:void 0}),ME=e=>{const{__scopeMenu:t,forceMount:a,children:i,container:s}=e,l=Po(Yg,t);return u.jsx(pk,{scope:t,forceMount:a,children:u.jsx(oi,{present:a||l.open,children:u.jsx(Ng,{asChild:!0,container:s,children:i})})})};ME.displayName=Yg;var Xr="MenuContent",[gk,Bg]=Uo(Xr),_E=x.forwardRef((e,t)=>{const a=jE(Xr,e.__scopeMenu),{forceMount:i=a.forceMount,...s}=e,l=Po(Xr,e.__scopeMenu),d=Tc(Xr,e.__scopeMenu);return u.jsx(fc.Provider,{scope:e.__scopeMenu,children:u.jsx(oi,{present:i||l.open,children:u.jsx(fc.Slot,{scope:e.__scopeMenu,children:d.modal?u.jsx(yk,{...s,ref:t}):u.jsx(vk,{...s,ref:t})})})})}),yk=x.forwardRef((e,t)=>{const a=Po(Xr,e.__scopeMenu),i=x.useRef(null),s=zn(t,i);return x.useEffect(()=>{const l=i.current;if(l)return O1(l)},[]),u.jsx(Hg,{...e,ref:s,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:ut(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),vk=x.forwardRef((e,t)=>{const a=Po(Xr,e.__scopeMenu);return u.jsx(Hg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),xk=zs("MenuContent.ScrollLock"),Hg=x.forwardRef((e,t)=>{const{__scopeMenu:a,loop:i=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:w,onDismiss:b,disableOutsideScroll:C,...E}=e,T=Po(Xr,a),N=Tc(Xr,a),R=Nf(a),O=DE(a),j=uk(a),[I,P]=x.useState(null),A=x.useRef(null),_=zn(t,A,T.onContentChange),Z=x.useRef(0),ne=x.useRef(""),ae=x.useRef(0),fe=x.useRef(null),pe=x.useRef("right"),ce=x.useRef(0),F=C?Ag:x.Fragment,k=C?{as:xk,allowPinchZoom:!0}:void 0,X=K=>{const oe=ne.current+K,M=j().filter(de=>!de.disabled),V=document.activeElement,Q=M.find(de=>de.ref.current===V)?.textValue,ee=M.map(de=>de.textValue),re=jk(ee,oe,Q),we=M.find(de=>de.textValue===re)?.ref.current;(function de(ye){ne.current=ye,window.clearTimeout(Z.current),ye!==""&&(Z.current=window.setTimeout(()=>de(""),1e3))})(oe),we&&setTimeout(()=>we.focus())};x.useEffect(()=>()=>window.clearTimeout(Z.current),[]),w1();const z=x.useCallback(K=>pe.current===fe.current?.side&&_k(K,fe.current?.area),[]);return u.jsx(gk,{scope:a,searchRef:ne,onItemEnter:x.useCallback(K=>{z(K)&&K.preventDefault()},[z]),onItemLeave:x.useCallback(K=>{z(K)||(A.current?.focus(),P(null))},[z]),onTriggerLeave:x.useCallback(K=>{z(K)&&K.preventDefault()},[z]),pointerGraceTimerRef:ae,onPointerGraceIntentChange:x.useCallback(K=>{fe.current=K},[]),children:u.jsx(F,{...k,children:u.jsx(Rg,{asChild:!0,trapped:s,onMountAutoFocus:ut(l,K=>{K.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:u.jsx(Tg,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:w,onDismiss:b,children:u.jsx(ak,{asChild:!0,...O,dir:N.dir,orientation:"vertical",loop:i,currentTabStopId:I,onCurrentTabStopIdChange:P,onEntryFocus:ut(p,K=>{N.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(q2,{role:"menu","aria-orientation":"vertical","data-state":$E(T.open),"data-radix-menu-content":"",dir:N.dir,...R,...E,ref:_,style:{outline:"none",...E.style},onKeyDown:ut(E.onKeyDown,K=>{const M=K.target.closest("[data-radix-menu-content]")===K.currentTarget,V=K.ctrlKey||K.altKey||K.metaKey,Q=K.key.length===1;M&&(K.key==="Tab"&&K.preventDefault(),!V&&Q&&X(K.key));const ee=A.current;if(K.target!==ee||!sk.includes(K.key))return;K.preventDefault();const we=j().filter(de=>!de.disabled).map(de=>de.ref.current);NE.includes(K.key)&&we.reverse(),Dk(we)}),onBlur:ut(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(Z.current),ne.current="")}),onPointerMove:ut(e.onPointerMove,hc(K=>{const oe=K.target,M=ce.current!==K.clientX;if(K.currentTarget.contains(oe)&&M){const V=K.clientX>ce.current?"right":"left";pe.current=V,ce.current=K.clientX}}))})})})})})})});_E.displayName=Xr;var bk="MenuGroup",Vg=x.forwardRef((e,t)=>{const{__scopeMenu:a,...i}=e;return u.jsx(Qt.div,{role:"group",...i,ref:t})});Vg.displayName=bk;var wk="MenuLabel",kE=x.forwardRef((e,t)=>{const{__scopeMenu:a,...i}=e;return u.jsx(Qt.div,{...i,ref:t})});kE.displayName=wk;var Pd="MenuItem",dw="menu.itemSelect",Af=x.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:i,...s}=e,l=x.useRef(null),d=Tc(Pd,e.__scopeMenu),f=Bg(Pd,e.__scopeMenu),p=zn(t,l),m=x.useRef(!1),y=()=>{const v=l.current;if(!a&&v){const w=new CustomEvent(dw,{bubbles:!0,cancelable:!0});v.addEventListener(dw,b=>i?.(b),{once:!0}),t1(v,w),w.defaultPrevented?m.current=!1:d.onClose()}};return u.jsx(LE,{...s,ref:p,disabled:a,onClick:ut(e.onClick,y),onPointerDown:v=>{e.onPointerDown?.(v),m.current=!0},onPointerUp:ut(e.onPointerUp,v=>{m.current||v.currentTarget?.click()}),onKeyDown:ut(e.onKeyDown,v=>{const w=f.searchRef.current!=="";a||w&&v.key===" "||Yp.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});Af.displayName=Pd;var LE=x.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:i=!1,textValue:s,...l}=e,d=Bg(Pd,a),f=DE(a),p=x.useRef(null),m=zn(t,p),[y,v]=x.useState(!1),[w,b]=x.useState("");return x.useEffect(()=>{const C=p.current;C&&b((C.textContent??"").trim())},[l.children]),u.jsx(fc.ItemSlot,{scope:a,disabled:i,textValue:s??w,children:u.jsx(ik,{asChild:!0,...f,focusable:!i,children:u.jsx(Qt.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:m,onPointerMove:ut(e.onPointerMove,hc(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ut(e.onPointerLeave,hc(C=>d.onItemLeave(C))),onFocus:ut(e.onFocus,()=>v(!0)),onBlur:ut(e.onBlur,()=>v(!1))})})})}),Sk="MenuCheckboxItem",IE=x.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:i,...s}=e;return u.jsx(BE,{scope:e.__scopeMenu,checked:a,children:u.jsx(Af,{role:"menuitemcheckbox","aria-checked":Yd(a)?"mixed":a,...s,ref:t,"data-state":Gg(a),onSelect:ut(s.onSelect,()=>i?.(Yd(a)?!0:!a),{checkForDefaultPrevented:!1})})})});IE.displayName=Sk;var zE="MenuRadioGroup",[Ek,Ck]=Uo(zE,{value:void 0,onValueChange:()=>{}}),UE=x.forwardRef((e,t)=>{const{value:a,onValueChange:i,...s}=e,l=ai(i);return u.jsx(Ek,{scope:e.__scopeMenu,value:a,onValueChange:l,children:u.jsx(Vg,{...s,ref:t})})});UE.displayName=zE;var PE="MenuRadioItem",YE=x.forwardRef((e,t)=>{const{value:a,...i}=e,s=Ck(PE,e.__scopeMenu),l=a===s.value;return u.jsx(BE,{scope:e.__scopeMenu,checked:l,children:u.jsx(Af,{role:"menuitemradio","aria-checked":l,...i,ref:t,"data-state":Gg(l),onSelect:ut(i.onSelect,()=>s.onValueChange?.(a),{checkForDefaultPrevented:!1})})})});YE.displayName=PE;var Fg="MenuItemIndicator",[BE,Tk]=Uo(Fg,{checked:!1}),HE=x.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:i,...s}=e,l=Tk(Fg,a);return u.jsx(oi,{present:i||Yd(l.checked)||l.checked===!0,children:u.jsx(Qt.span,{...s,ref:t,"data-state":Gg(l.checked)})})});HE.displayName=Fg;var Rk="MenuSeparator",VE=x.forwardRef((e,t)=>{const{__scopeMenu:a,...i}=e;return u.jsx(Qt.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});VE.displayName=Rk;var Nk="MenuArrow",FE=x.forwardRef((e,t)=>{const{__scopeMenu:a,...i}=e,s=Nf(a);return u.jsx(W2,{...s,...i,ref:t})});FE.displayName=Nk;var Ak="MenuSub",[w5,GE]=Uo(Ak),Xl="MenuSubTrigger",qE=x.forwardRef((e,t)=>{const a=Po(Xl,e.__scopeMenu),i=Tc(Xl,e.__scopeMenu),s=GE(Xl,e.__scopeMenu),l=Bg(Xl,e.__scopeMenu),d=x.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=l,m={__scopeMenu:e.__scopeMenu},y=x.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return x.useEffect(()=>y,[y]),x.useEffect(()=>{const v=f.current;return()=>{window.clearTimeout(v),p(null)}},[f,p]),u.jsx(Pg,{asChild:!0,...m,children:u.jsx(LE,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":s.contentId,"data-state":$E(a.open),...e,ref:mf(t,s.onTriggerChange),onClick:v=>{e.onClick?.(v),!(e.disabled||v.defaultPrevented)&&(v.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:ut(e.onPointerMove,hc(v=>{l.onItemEnter(v),!v.defaultPrevented&&!e.disabled&&!a.open&&!d.current&&(l.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{a.onOpenChange(!0),y()},100))})),onPointerLeave:ut(e.onPointerLeave,hc(v=>{y();const w=a.content?.getBoundingClientRect();if(w){const b=a.content?.dataset.side,C=b==="right",E=C?-5:5,T=w[C?"left":"right"],N=w[C?"right":"left"];l.onPointerGraceIntentChange({area:[{x:v.clientX+E,y:v.clientY},{x:T,y:w.top},{x:N,y:w.top},{x:N,y:w.bottom},{x:T,y:w.bottom}],side:b}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(v),v.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:ut(e.onKeyDown,v=>{const w=l.searchRef.current!=="";e.disabled||w&&v.key===" "||lk[i.dir].includes(v.key)&&(a.onOpenChange(!0),a.content?.focus(),v.preventDefault())})})})});qE.displayName=Xl;var WE="MenuSubContent",KE=x.forwardRef((e,t)=>{const a=jE(Xr,e.__scopeMenu),{forceMount:i=a.forceMount,...s}=e,l=Po(Xr,e.__scopeMenu),d=Tc(Xr,e.__scopeMenu),f=GE(WE,e.__scopeMenu),p=x.useRef(null),m=zn(t,p);return u.jsx(fc.Provider,{scope:e.__scopeMenu,children:u.jsx(oi,{present:i||l.open,children:u.jsx(fc.Slot,{scope:e.__scopeMenu,children:u.jsx(Hg,{id:f.contentId,"aria-labelledby":f.triggerId,...s,ref:m,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{d.isUsingKeyboardRef.current&&p.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:ut(e.onFocusOutside,y=>{y.target!==f.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:ut(e.onEscapeKeyDown,y=>{d.onClose(),y.preventDefault()}),onKeyDown:ut(e.onKeyDown,y=>{const v=y.currentTarget.contains(y.target),w=ck[d.dir].includes(y.key);v&&w&&(l.onOpenChange(!1),f.trigger?.focus(),y.preventDefault())})})})})})});KE.displayName=WE;function $E(e){return e?"open":"closed"}function Yd(e){return e==="indeterminate"}function Gg(e){return Yd(e)?"indeterminate":e?"checked":"unchecked"}function Dk(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function Ok(e,t){return e.map((a,i)=>e[(t+i)%e.length])}function jk(e,t,a){const s=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=a?e.indexOf(a):-1;let d=Ok(e,Math.max(l,0));s.length===1&&(d=d.filter(m=>m!==a));const p=d.find(m=>m.toLowerCase().startsWith(s.toLowerCase()));return p!==a?p:void 0}function Mk(e,t){const{x:a,y:i}=e;let s=!1;for(let l=0,d=t.length-1;l<t.length;d=l++){const f=t[l],p=t[d],m=f.x,y=f.y,v=p.x,w=p.y;y>i!=w>i&&a<(v-m)*(i-y)/(w-y)+m&&(s=!s)}return s}function _k(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return Mk(a,t)}function hc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kk=OE,Lk=Pg,Ik=ME,zk=_E,Uk=Vg,Pk=kE,Yk=Af,Bk=IE,Hk=UE,Vk=YE,Fk=HE,Gk=VE,qk=FE,Wk=qE,Kk=KE,Df="DropdownMenu",[$k]=no(Df,[AE]),ur=AE(),[Xk,XE]=$k(Df),QE=e=>{const{__scopeDropdownMenu:t,children:a,dir:i,open:s,defaultOpen:l,onOpenChange:d,modal:f=!0}=e,p=ur(t),m=x.useRef(null),[y,v]=Vs({prop:s,defaultProp:l??!1,onChange:d,caller:Df});return u.jsx(Xk,{scope:t,triggerId:$i(),triggerRef:m,contentId:$i(),open:y,onOpenChange:v,onOpenToggle:x.useCallback(()=>v(w=>!w),[v]),modal:f,children:u.jsx(kk,{...p,open:y,onOpenChange:v,dir:i,modal:f,children:a})})};QE.displayName=Df;var ZE="DropdownMenuTrigger",JE=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:i=!1,...s}=e,l=XE(ZE,a),d=ur(a);return u.jsx(Lk,{asChild:!0,...d,children:u.jsx(Qt.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...s,ref:mf(t,l.triggerRef),onPointerDown:ut(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(l.onOpenToggle(),l.open||f.preventDefault())}),onKeyDown:ut(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&l.onOpenToggle(),f.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});JE.displayName=ZE;var Qk="DropdownMenuPortal",eC=e=>{const{__scopeDropdownMenu:t,...a}=e,i=ur(t);return u.jsx(Ik,{...i,...a})};eC.displayName=Qk;var tC="DropdownMenuContent",nC=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=XE(tC,a),l=ur(a),d=x.useRef(!1);return u.jsx(zk,{id:s.contentId,"aria-labelledby":s.triggerId,...l,...i,ref:t,onCloseAutoFocus:ut(e.onCloseAutoFocus,f=>{d.current||s.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:ut(e.onInteractOutside,f=>{const p=f.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,y=p.button===2||m;(!s.modal||y)&&(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)"}})});nC.displayName=tC;var Zk="DropdownMenuGroup",Jk=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Uk,{...s,...i,ref:t})});Jk.displayName=Zk;var eL="DropdownMenuLabel",tL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Pk,{...s,...i,ref:t})});tL.displayName=eL;var nL="DropdownMenuItem",rC=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Yk,{...s,...i,ref:t})});rC.displayName=nL;var rL="DropdownMenuCheckboxItem",aL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Bk,{...s,...i,ref:t})});aL.displayName=rL;var iL="DropdownMenuRadioGroup",oL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Hk,{...s,...i,ref:t})});oL.displayName=iL;var sL="DropdownMenuRadioItem",lL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Vk,{...s,...i,ref:t})});lL.displayName=sL;var cL="DropdownMenuItemIndicator",uL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Fk,{...s,...i,ref:t})});uL.displayName=cL;var dL="DropdownMenuSeparator",fL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Gk,{...s,...i,ref:t})});fL.displayName=dL;var hL="DropdownMenuArrow",mL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(qk,{...s,...i,ref:t})});mL.displayName=hL;var pL="DropdownMenuSubTrigger",gL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Wk,{...s,...i,ref:t})});gL.displayName=pL;var yL="DropdownMenuSubContent",vL=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...i}=e,s=ur(a);return u.jsx(Kk,{...s,...i,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)"}})});vL.displayName=yL;var xL=QE,bL=JE,wL=eC,SL=nC,EL=rC,CL="Label",aC=x.forwardRef((e,t)=>u.jsx(Qt.label,{...e,ref:t,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));aC.displayName=CL;var TL=aC;const RL=(e,t)=>{const a=new Array(e.length+t.length);for(let i=0;i<e.length;i++)a[i]=e[i];for(let i=0;i<t.length;i++)a[e.length+i]=t[i];return a},NL=(e,t)=>({classGroupId:e,validator:t}),iC=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),Bd="-",fw=[],AL="arbitrary..",DL=e=>{const t=jL(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return OL(d);const f=d.split(Bd),p=f[0]===""&&f.length>1?1:0;return oC(f,p,t)},getConflictingClassGroupIds:(d,f)=>{if(f){const p=i[d],m=a[d];return p?m?RL(m,p):p:m||fw}return a[d]||fw}}},oC=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const s=e[t],l=a.nextPart.get(s);if(l){const m=oC(e,t+1,l);if(m)return m}const d=a.validators;if(d===null)return;const f=t===0?e.join(Bd):e.slice(t).join(Bd),p=d.length;for(let m=0;m<p;m++){const y=d[m];if(y.validator(f))return y.classGroupId}},OL=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),i=t.slice(0,a);return i?AL+i:void 0})(),jL=e=>{const{theme:t,classGroups:a}=e;return ML(a,t)},ML=(e,t)=>{const a=iC();for(const i in e){const s=e[i];qg(s,a,i,t)}return a},qg=(e,t,a,i)=>{const s=e.length;for(let l=0;l<s;l++){const d=e[l];_L(d,t,a,i)}},_L=(e,t,a,i)=>{if(typeof e=="string"){kL(e,t,a);return}if(typeof e=="function"){LL(e,t,a,i);return}IL(e,t,a,i)},kL=(e,t,a)=>{const i=e===""?t:sC(t,e);i.classGroupId=a},LL=(e,t,a,i)=>{if(zL(e)){qg(e(i),t,a,i);return}t.validators===null&&(t.validators=[]),t.validators.push(NL(a,e))},IL=(e,t,a,i)=>{const s=Object.entries(e),l=s.length;for(let d=0;d<l;d++){const[f,p]=s[d];qg(p,sC(t,f),a,i)}},sC=(e,t)=>{let a=e;const i=t.split(Bd),s=i.length;for(let l=0;l<s;l++){const d=i[l];let f=a.nextPart.get(d);f||(f=iC(),a.nextPart.set(d,f)),a=f}return a},zL=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,UL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),i=Object.create(null);const s=(l,d)=>{a[l]=d,t++,t>e&&(t=0,i=a,a=Object.create(null))};return{get(l){let d=a[l];if(d!==void 0)return d;if((d=i[l])!==void 0)return s(l,d),d},set(l,d){l in a?a[l]=d:s(l,d)}}},Bp="!",hw=":",PL=[],mw=(e,t,a,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:i,isExternal:s}),YL=e=>{const{prefix:t,experimentalParseClassName:a}=e;let i=s=>{const l=[];let d=0,f=0,p=0,m;const y=s.length;for(let E=0;E<y;E++){const T=s[E];if(d===0&&f===0){if(T===hw){l.push(s.slice(p,E)),p=E+1;continue}if(T==="/"){m=E;continue}}T==="["?d++:T==="]"?d--:T==="("?f++:T===")"&&f--}const v=l.length===0?s:s.slice(p);let w=v,b=!1;v.endsWith(Bp)?(w=v.slice(0,-1),b=!0):v.startsWith(Bp)&&(w=v.slice(1),b=!0);const C=m&&m>p?m-p:void 0;return mw(l,b,w,C)};if(t){const s=t+hw,l=i;i=d=>d.startsWith(s)?l(d.slice(s.length)):mw(PL,!1,d,void 0,!0)}if(a){const s=i;i=l=>a({className:l,parseClassName:s})}return i},BL=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,i)=>{t.set(a,1e6+i)}),a=>{const i=[];let s=[];for(let l=0;l<a.length;l++){const d=a[l],f=d[0]==="[",p=t.has(d);f||p?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(d)):s.push(d)}return s.length>0&&(s.sort(),i.push(...s)),i}},HL=e=>({cache:UL(e.cacheSize),parseClassName:YL(e),sortModifiers:BL(e),...DL(e)}),VL=/\s+/,FL=(e,t)=>{const{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,d=[],f=e.trim().split(VL);let p="";for(let m=f.length-1;m>=0;m-=1){const y=f[m],{isExternal:v,modifiers:w,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:E}=a(y);if(v){p=y+(p.length>0?" "+p:p);continue}let T=!!E,N=i(T?C.substring(0,E):C);if(!N){if(!T){p=y+(p.length>0?" "+p:p);continue}if(N=i(C),!N){p=y+(p.length>0?" "+p:p);continue}T=!1}const R=w.length===0?"":w.length===1?w[0]:l(w).join(":"),O=b?R+Bp:R,j=O+N;if(d.indexOf(j)>-1)continue;d.push(j);const I=s(N,T);for(let P=0;P<I.length;++P){const A=I[P];d.push(O+A)}p=y+(p.length>0?" "+p:p)}return p},GL=(...e)=>{let t=0,a,i,s="";for(;t<e.length;)(a=e[t++])&&(i=lC(a))&&(s&&(s+=" "),s+=i);return s},lC=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=lC(e[i]))&&(a&&(a+=" "),a+=t);return a},qL=(e,...t)=>{let a,i,s,l;const d=p=>{const m=t.reduce((y,v)=>v(y),e());return a=HL(m),i=a.cache.get,s=a.cache.set,l=f,f(p)},f=p=>{const m=i(p);if(m)return m;const y=FL(p,a);return s(p,y),y};return l=d,(...p)=>l(GL(...p))},WL=[],In=e=>{const t=a=>a[e]||WL;return t.isThemeGetter=!0,t},cC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KL=/^\d+\/\d+$/,$L=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XL=/\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$/,QL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ZL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ts=e=>KL.test(e),mt=e=>!!e&&!Number.isNaN(Number(e)),ki=e=>!!e&&Number.isInteger(Number(e)),up=e=>e.endsWith("%")&&mt(e.slice(0,-1)),Qa=e=>$L.test(e),eI=()=>!0,tI=e=>XL.test(e)&&!QL.test(e),dC=()=>!1,nI=e=>ZL.test(e),rI=e=>JL.test(e),aI=e=>!Ue(e)&&!Pe(e),iI=e=>Fs(e,mC,dC),Ue=e=>cC.test(e),So=e=>Fs(e,pC,tI),dp=e=>Fs(e,uI,mt),pw=e=>Fs(e,fC,dC),oI=e=>Fs(e,hC,rI),Xu=e=>Fs(e,gC,nI),Pe=e=>uC.test(e),Hl=e=>Gs(e,pC),sI=e=>Gs(e,dI),gw=e=>Gs(e,fC),lI=e=>Gs(e,mC),cI=e=>Gs(e,hC),Qu=e=>Gs(e,gC,!0),Fs=(e,t,a)=>{const i=cC.exec(e);return i?i[1]?t(i[1]):a(i[2]):!1},Gs=(e,t,a=!1)=>{const i=uC.exec(e);return i?i[1]?t(i[1]):a:!1},fC=e=>e==="position"||e==="percentage",hC=e=>e==="image"||e==="url",mC=e=>e==="length"||e==="size"||e==="bg-size",pC=e=>e==="length",uI=e=>e==="number",dI=e=>e==="family-name",gC=e=>e==="shadow",fI=()=>{const e=In("color"),t=In("font"),a=In("text"),i=In("font-weight"),s=In("tracking"),l=In("leading"),d=In("breakpoint"),f=In("container"),p=In("spacing"),m=In("radius"),y=In("shadow"),v=In("inset-shadow"),w=In("text-shadow"),b=In("drop-shadow"),C=In("blur"),E=In("perspective"),T=In("aspect"),N=In("ease"),R=In("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...j(),Pe,Ue],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],_=()=>[Pe,Ue,p],Z=()=>[Ts,"full","auto",..._()],ne=()=>[ki,"none","subgrid",Pe,Ue],ae=()=>["auto",{span:["full",ki,Pe,Ue]},ki,Pe,Ue],fe=()=>[ki,"auto",Pe,Ue],pe=()=>["auto","min","max","fr",Pe,Ue],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",..._()],X=()=>[Ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],z=()=>[e,Pe,Ue],K=()=>[...j(),gw,pw,{position:[Pe,Ue]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",lI,iI,{size:[Pe,Ue]}],V=()=>[up,Hl,So],Q=()=>["","none","full",m,Pe,Ue],ee=()=>["",mt,Hl,So],re=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[mt,up,gw,pw],ye=()=>["","none",C,Pe,Ue],Fe=()=>["none",mt,Pe,Ue],ve=()=>["none",mt,Pe,Ue],te=()=>[mt,Pe,Ue],me=()=>[Ts,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qa],breakpoint:[Qa],color:[eI],container:[Qa],"drop-shadow":[Qa],ease:["in","out","in-out"],font:[aI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qa],shadow:[Qa],spacing:["px",mt],text:[Qa],"text-shadow":[Qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ts,Ue,Pe,T]}],container:["container"],columns:[{columns:[mt,Ue,Pe,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[ki,"auto",Pe,Ue]}],basis:[{basis:[Ts,"full","auto",f,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mt,Ts,"auto","initial","none",Ue]}],grow:[{grow:["",mt,Pe,Ue]}],shrink:[{shrink:["",mt,Pe,Ue]}],order:[{order:[ki,"first","last","none",Pe,Ue]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[f,"screen",...X()]}],"min-w":[{"min-w":[f,"screen","none",...X()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",a,Hl,So]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Pe,dp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",up,Ue]}],"font-family":[{font:[sI,Ue,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:[s,Pe,Ue]}],"line-clamp":[{"line-clamp":[mt,"none",Pe,dp]}],leading:[{leading:[l,..._()]}],"list-image":[{"list-image":["none",Pe,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pe,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[mt,"from-font","auto",Pe,So]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[mt,"auto",Pe,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe,Ue]}],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",Pe,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ki,Pe,Ue],radial:["",Pe,Ue],conic:[ki,Pe,Ue]},cI,oI]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mt,Pe,Ue]}],"outline-w":[{outline:["",mt,Hl,So]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",y,Qu,Xu]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",v,Qu,Xu]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[mt,So]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",w,Qu,Xu]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[mt,Pe,Ue]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"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":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Pe,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[mt]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pe,Ue]}],filter:[{filter:["","none",Pe,Ue]}],blur:[{blur:ye()}],brightness:[{brightness:[mt,Pe,Ue]}],contrast:[{contrast:[mt,Pe,Ue]}],"drop-shadow":[{"drop-shadow":["","none",b,Qu,Xu]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",mt,Pe,Ue]}],"hue-rotate":[{"hue-rotate":[mt,Pe,Ue]}],invert:[{invert:["",mt,Pe,Ue]}],saturate:[{saturate:[mt,Pe,Ue]}],sepia:[{sepia:["",mt,Pe,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Pe,Ue]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[mt,Pe,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[mt,Pe,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mt,Pe,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mt,Pe,Ue]}],"backdrop-invert":[{"backdrop-invert":["",mt,Pe,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[mt,Pe,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[mt,Pe,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",mt,Pe,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pe,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mt,"initial",Pe,Ue]}],ease:[{ease:["linear","initial",N,Pe,Ue]}],delay:[{delay:[mt,Pe,Ue]}],animate:[{animate:["none",R,Pe,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Pe,Ue]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[Pe,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",Pe,Ue]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",Pe,Ue]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[mt,Hl,So,dp]}],stroke:[{stroke:["none",...z()]}],"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"]}},hI=qL(fI);function At(...e){return hI(e1(e))}const mI=hf("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function un({className:e,variant:t="default",size:a="default",asChild:i=!1,...s}){const l=i?Dj:"button";return u.jsx(l,{"data-slot":"button","data-variant":t,"data-size":a,className:At(mI({variant:t,size:a,className:e})),...s})}function pI(){const[e,t]=x.useState(null),[a,i]=x.useState(!1),[s,l]=x.useState(!1);return x.useEffect(()=>{if(window.matchMedia("(display-mode: standalone)").matches){l(!0);return}const f=m=>{m.preventDefault(),t(m),i(!0)},p=()=>{l(!0),i(!1),t(null)};return window.addEventListener("beforeinstallprompt",f),window.addEventListener("appinstalled",p),()=>{window.removeEventListener("beforeinstallprompt",f),window.removeEventListener("appinstalled",p)}},[]),{installPrompt:e,isInstallable:a,isInstalled:s,handleInstall:async()=>{if(e)try{await e.prompt();const{outcome:f}=await e.userChoice;f==="accepted"&&(l(!0),i(!1),t(null))}catch(f){console.error("Installation failed:",f)}}}}function gI({...e}){return u.jsx(xL,{"data-slot":"dropdown-menu",...e})}function yI({...e}){return u.jsx(bL,{"data-slot":"dropdown-menu-trigger",...e})}function vI({className:e,align:t="start",sideOffset:a=4,...i}){return u.jsx(wL,{children:u.jsx(SL,{"data-slot":"dropdown-menu-content",sideOffset:a,align:t,className:At("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto data-[state=closed]:overflow-hidden",e),...i})})}function fp({className:e,inset:t,variant:a="default",...i}){return u.jsx(EL,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:At("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i})}const yC=x.createContext(void 0),yw="busical-theme";function xI(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function bI({children:e}){const[t,a]=x.useState(()=>typeof window>"u"?"system":localStorage.getItem(yw)||"system");return x.useEffect(()=>{const i=document.documentElement,s=l=>{const d=l==="system"?xI():l;i.classList.remove("light","dark"),i.classList.add(d)};if(s(t),localStorage.setItem(yw,t),t==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>s("system");return l.addEventListener("change",d),()=>l.removeEventListener("change",d)}},[t]),u.jsx(yC.Provider,{value:{theme:t,setTheme:a},children:e})}function wI(){const e=x.useContext(yC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function SI(){const{setTheme:e}=wI();return u.jsxs(gI,{children:[u.jsx(yI,{asChild:!0,children:u.jsxs(un,{variant:"ghost",size:"icon",title:"Toggle theme",children:[u.jsx(z0,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),u.jsx(I0,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),u.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),u.jsxs(vI,{align:"end",children:[u.jsxs(fp,{onClick:()=>e("light"),children:[u.jsx(z0,{className:"mr-2 h-4 w-4"}),"Light"]}),u.jsxs(fp,{onClick:()=>e("dark"),children:[u.jsx(I0,{className:"mr-2 h-4 w-4"}),"Dark"]}),u.jsxs(fp,{onClick:()=>e("system"),children:[u.jsx(pj,{className:"mr-2 h-4 w-4"}),"System"]})]})]})}function EI({onRefresh:e,loading:t=!1}){const{isInstallable:a,isInstalled:i,handleInstall:s}=pI();return u.jsx("header",{className:"border-b bg-background",children:u.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-4",children:[u.jsxs(Ki,{to:"/",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[u.jsx("span",{className:"text-2xl",children:"📅"}),u.jsx("h1",{className:"text-xl font-bold",children:"BusiCal"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(un,{variant:"ghost",size:"sm",asChild:!0,className:"gap-1.5",children:u.jsxs(Ki,{to:"/faq",children:[u.jsx(mg,{className:"h-4 w-4"}),u.jsx("span",{className:"hidden sm:inline",children:"FAQ"})]})}),a&&!i&&u.jsxs(un,{variant:"default",size:"sm",onClick:s,title:"Install BusiCal as an app",className:"gap-2",children:[u.jsx(KS,{className:"h-4 w-4"}),"Install"]}),u.jsx(un,{variant:"ghost",size:"icon",onClick:e,disabled:t,title:"Refresh events",children:u.jsx(Dp,{className:t?"animate-spin":""})}),u.jsx(SI,{})]})]})})}function CI(){const e=new Date().getFullYear();return u.jsx("footer",{className:"border-t bg-background",children:u.jsx("div",{className:"container mx-auto px-4 py-6 max-w-4xl",children:u.jsxs("div",{className:"text-center space-y-1",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"For those who had a busy day ✨"}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Built by"," ",u.jsx("a",{href:"https://dirathea.com",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground transition-colors",children:"dirathea"})," ","from Berlin with 🧡 ",e]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.jsx(Ki,{to:"/about",className:"underline hover:text-foreground transition-colors",children:"Why I built this?"}),u.jsx("span",{className:"mx-2",children:"•"}),u.jsx(Ki,{to:"/privacy",className:"underline hover:text-foreground transition-colors",children:"Privacy Policy"}),u.jsx("span",{className:"mx-2",children:"•"}),u.jsx(Ki,{to:"/terms",className:"underline hover:text-foreground transition-colors",children:"Terms of Service"}),u.jsx("span",{className:"mx-2",children:"•"}),u.jsx("a",{href:"https://www.buymeacoffee.com/dirathea?utm_source=busical&utm_medium=footer",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground transition-colors",children:"Buy me a coffee ☕"})]})]})})})}function la({className:e,size:t="default",...a}){return u.jsx("div",{"data-slot":"card","data-size":t,className:At("ring-foreground/10 bg-card text-card-foreground gap-6 overflow-hidden rounded-xl py-6 text-sm shadow-xs ring-1 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",e),...a})}function Ql({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:At("gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...t})}function Zl({className:e,...t}){return u.jsx("div",{"data-slot":"card-title",className:At("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function vC({className:e,...t}){return u.jsx("div",{"data-slot":"card-description",className:At("text-muted-foreground text-sm",e),...t})}function Jl({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:At("px-6 group-data-[size=sm]/card:px-4",e),...t})}function TI(){const[e,t]=x.useState(!1),[a,i]=x.useState(null);x.useEffect(()=>{const d=f=>{i(f.detail.registration),t(!0)};return window.addEventListener("swUpdate",d),()=>{window.removeEventListener("swUpdate",d)}},[]);const s=()=>{a&&a.waiting&&a.waiting.postMessage({type:"SKIP_WAITING"})},l=()=>{t(!1)};return e?u.jsx("div",{className:"fixed bottom-4 right-4 z-50 max-w-sm",children:u.jsx(la,{className:"p-4 shadow-lg border-2",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Dp,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-semibold text-sm mb-1",children:"Update Available"}),u.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"A new version of BusiCal is available. Refresh to get the latest features and fixes."}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs(un,{size:"sm",onClick:s,className:"flex-1",children:[u.jsx(Dp,{className:"h-3 w-3 mr-1"}),"Update Now"]}),u.jsx(un,{size:"sm",variant:"outline",onClick:l,children:u.jsx(ff,{className:"h-3 w-3"})})]})]})]})})}):null}class Of{static fromString(t){return new Of(t)}constructor(t){this.value=t}icaltype="binary";decodeValue(){return this._b64_decode(this.value)}setEncodedValue(t){this.value=this._b64_encode(t)}_b64_encode(t){let a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i,s,l,d,f,p,m,y,v=0,w=0,b="",C=[];if(!t)return t;do i=t.charCodeAt(v++),s=t.charCodeAt(v++),l=t.charCodeAt(v++),y=i<<16|s<<8|l,d=y>>18&63,f=y>>12&63,p=y>>6&63,m=y&63,C[w++]=a.charAt(d)+a.charAt(f)+a.charAt(p)+a.charAt(m);while(v<t.length);b=C.join("");let E=t.length%3;return(E?b.slice(0,E-3):b)+"===".slice(E||3)}_b64_decode(t){let a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i,s,l,d,f,p,m,y,v=0,w=0,b="",C=[];if(!t)return t;t+="";do d=a.indexOf(t.charAt(v++)),f=a.indexOf(t.charAt(v++)),p=a.indexOf(t.charAt(v++)),m=a.indexOf(t.charAt(v++)),y=d<<18|f<<12|p<<6|m,i=y>>16&255,s=y>>8&255,l=y&255,p==64?C[w++]=String.fromCharCode(i):m==64?C[w++]=String.fromCharCode(i,s):C[w++]=String.fromCharCode(i,s,l);while(v<t.length);return b=C.join(""),b}toString(){return this.value}}const RI=/([PDWHMTS]{1,1})/,NI=["weeks","days","hours","minutes","seconds","isNegative"];class tr{static fromSeconds(t){return new tr().fromSeconds(t)}static isValueString(t){return t[0]==="P"||t[1]==="P"}static fromString(t){let a=0,i=Object.create(null),s=0;for(;(a=t.search(RI))!==-1;){let l=t[a],d=t.slice(0,Math.max(0,a));t=t.slice(a+1),s+=AI(l,d,i)}if(s<2)throw new Error('invalid duration value: Not enough duration components in "'+t+'"');return new tr(i)}static fromData(t){return new tr(t)}constructor(t){this.wrappedJSObject=this,this.fromData(t)}weeks=0;days=0;hours=0;minutes=0;seconds=0;isNegative=!1;icalclass="icalduration";icaltype="duration";clone(){return tr.fromData(this)}toSeconds(){let t=this.seconds+60*this.minutes+3600*this.hours+86400*this.days+604800*this.weeks;return this.isNegative?-t:t}fromSeconds(t){let a=Math.abs(t);return this.isNegative=t<0,this.days=Pn(a/86400),this.days%7==0?(this.weeks=this.days/7,this.days=0):this.weeks=0,a-=(this.days+7*this.weeks)*86400,this.hours=Pn(a/3600),a-=this.hours*3600,this.minutes=Pn(a/60),a-=this.minutes*60,this.seconds=a,this}fromData(t){for(let a of NI)t&&a in t?this[a]=t[a]:this[a]=0}reset(){this.isNegative=!1,this.weeks=0,this.days=0,this.hours=0,this.minutes=0,this.seconds=0}compare(t){let a=this.toSeconds(),i=t.toSeconds();return(a>i)-(a<i)}normalize(){this.fromSeconds(this.toSeconds())}toString(){if(this.toSeconds()==0)return"PT0S";{let t="";this.isNegative&&(t+="-"),t+="P";let a=!1;return this.weeks?this.days||this.hours||this.minutes||this.seconds?t+=this.weeks*7+this.days+"D":(t+=this.weeks+"W",a=!0):this.days&&(t+=this.days+"D"),a||(this.hours||this.minutes||this.seconds)&&(t+="T",this.hours&&(t+=this.hours+"H"),this.minutes&&(t+=this.minutes+"M"),this.seconds&&(t+=this.seconds+"S")),t}}toICALString(){return this.toString()}}function AI(e,t,a){let i;switch(e){case"P":t&&t==="-"?a.isNegative=!0:a.isNegative=!1;break;case"D":i="days";break;case"W":i="weeks";break;case"H":i="hours";break;case"M":i="minutes";break;case"S":i="seconds";break;default:return 0}if(i){if(!t&&t!==0)throw new Error('invalid duration value: Missing number before "'+e+'"');let s=parseInt(t,10);if(mc(s))throw new Error('invalid duration value: Invalid number "'+t+'" before "'+e+'"');a[i]=s}return 1}class ei{static fromString(t,a){let i=t.split("/");if(i.length!==2)throw new Error('Invalid string value: "'+t+'" must contain a "/" char.');let s={start:ue.fromDateTimeString(i[0],a)},l=i[1];return tr.isValueString(l)?s.duration=tr.fromString(l):s.end=ue.fromDateTimeString(l,a),new ei(s)}static fromData(t){return new ei(t)}static fromJSON(t,a,i){function s(l,d){return i?ue.fromString(l,d):ue.fromDateTimeString(l,d)}return tr.isValueString(t[1])?ei.fromData({start:s(t[0],a),duration:tr.fromString(t[1])}):ei.fromData({start:s(t[0],a),end:s(t[1],a)})}constructor(t){if(this.wrappedJSObject=this,t&&"start"in t){if(t.start&&!(t.start instanceof ue))throw new TypeError(".start must be an instance of ICAL.Time");this.start=t.start}if(t&&t.end&&t.duration)throw new Error("cannot accept both end and duration");if(t&&"end"in t){if(t.end&&!(t.end instanceof ue))throw new TypeError(".end must be an instance of ICAL.Time");this.end=t.end}if(t&&"duration"in t){if(t.duration&&!(t.duration instanceof tr))throw new TypeError(".duration must be an instance of ICAL.Duration");this.duration=t.duration}}start=null;end=null;duration=null;icalclass="icalperiod";icaltype="period";clone(){return ei.fromData({start:this.start?this.start.clone():null,end:this.end?this.end.clone():null,duration:this.duration?this.duration.clone():null})}getDuration(){return this.duration?this.duration:this.end.subtractDate(this.start)}getEnd(){if(this.end)return this.end;{let t=this.start.clone();return t.addDuration(this.duration),t}}compare(t){return t.compare(this.start)<0?1:t.compare(this.getEnd())>0?-1:0}toString(){return this.start+"/"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+"/"+(this.end||this.duration).toICALString()}}class ue{static _dowCache={};static _wnCache={};static daysInMonth(t,a){let i=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=30;return t<1||t>12||(s=i[t],t==2&&(s+=ue.isLeapYear(a))),s}static isLeapYear(t){return t<=1752?t%4==0:t%4==0&&t%100!=0||t%400==0}static fromDayOfYear(t,a){let i=a,s=t,l=new ue;l.auto_normalize=!1;let d=ue.isLeapYear(i)?1:0;if(s<1)return i--,d=ue.isLeapYear(i)?1:0,s+=ue.daysInYearPassedMonth[d][12],ue.fromDayOfYear(s,i);if(s>ue.daysInYearPassedMonth[d][12])return d=ue.isLeapYear(i)?1:0,s-=ue.daysInYearPassedMonth[d][12],i++,ue.fromDayOfYear(s,i);l.year=i,l.isDate=!0;for(let f=11;f>=0;f--)if(s>ue.daysInYearPassedMonth[d][f]){l.month=f+1,l.day=s-ue.daysInYearPassedMonth[d][f];break}return l.auto_normalize=!0,l}static fromStringv2(t){return new ue({year:parseInt(t.slice(0,4),10),month:parseInt(t.slice(5,7),10),day:parseInt(t.slice(8,10),10),isDate:!0})}static fromDateString(t){return new ue({year:Zn(t.slice(0,4)),month:Zn(t.slice(5,7)),day:Zn(t.slice(8,10)),isDate:!0})}static fromDateTimeString(t,a){if(t.length<19)throw new Error('invalid date-time value: "'+t+'"');let i,s;t.slice(-1)==="Z"?i=We.utcTimezone:a&&(s=a.getParameter("tzid"),a.parent&&(a.parent.name==="standard"||a.parent.name==="daylight"?i=We.localTimezone:s&&(i=a.parent.getTimeZoneByID(s))));const l={year:Zn(t.slice(0,4)),month:Zn(t.slice(5,7)),day:Zn(t.slice(8,10)),hour:Zn(t.slice(11,13)),minute:Zn(t.slice(14,16)),second:Zn(t.slice(17,19))};return s&&!i&&(l.timezone=s),new ue(l,i)}static fromString(t,a){return t.length>10?ue.fromDateTimeString(t,a):ue.fromDateString(t)}static fromJSDate(t,a){return new ue().fromJSDate(t,a)}static fromData=function(a,i){return new ue().fromData(a,i)};static now(){return ue.fromJSDate(new Date,!1)}static weekOneStarts(t,a){let i=ue.fromData({year:t,month:1,day:1,isDate:!0}),s=i.dayOfWeek(),l=a||ue.DEFAULT_WEEK_START;return s>ue.THURSDAY&&(i.day+=7),l>ue.THURSDAY&&(i.day-=7),i.day-=s-l,i}static getDominicalLetter(t){let a="GFEDCBA",i=(t+(t/4|0)+(t/400|0)-(t/100|0)-1)%7;return ue.isLeapYear(t)?a[(i+6)%7]+a[i]:a[i]}static#e=null;static get epochTime(){return this.#e||(this.#e=ue.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"})),this.#e}static _cmp_attr(t,a,i){return t[i]>a[i]?1:t[i]<a[i]?-1:0}static daysInYearPassedMonth=[[0,31,59,90,120,151,181,212,243,273,304,334,365],[0,31,60,91,121,152,182,213,244,274,305,335,366]];static SUNDAY=1;static MONDAY=2;static TUESDAY=3;static WEDNESDAY=4;static THURSDAY=5;static FRIDAY=6;static SATURDAY=7;static DEFAULT_WEEK_START=2;constructor(t,a){this.wrappedJSObject=this,this._time=Object.create(null),this._time.year=0,this._time.month=1,this._time.day=1,this._time.hour=0,this._time.minute=0,this._time.second=0,this._time.isDate=!1,this.fromData(t,a)}icalclass="icaltime";_cachedUnixTime=null;get icaltype(){return this.isDate?"date":"date-time"}zone=null;_pendingNormalization=!1;get year(){return this._getTimeAttr("year")}set year(t){this._setTimeAttr("year",t)}get month(){return this._getTimeAttr("month")}set month(t){this._setTimeAttr("month",t)}get day(){return this._getTimeAttr("day")}set day(t){this._setTimeAttr("day",t)}get hour(){return this._getTimeAttr("hour")}set hour(t){this._setTimeAttr("hour",t)}get minute(){return this._getTimeAttr("minute")}set minute(t){this._setTimeAttr("minute",t)}get second(){return this._getTimeAttr("second")}set second(t){this._setTimeAttr("second",t)}get isDate(){return this._getTimeAttr("isDate")}set isDate(t){this._setTimeAttr("isDate",t)}_getTimeAttr(t){return this._pendingNormalization&&(this._normalize(),this._pendingNormalization=!1),this._time[t]}_setTimeAttr(t,a){t==="isDate"&&a&&!this._time.isDate&&this.adjust(0,0,0,0),this._cachedUnixTime=null,this._pendingNormalization=!0,this._time[t]=a}clone(){return new ue(this._time,this.zone)}reset(){this.fromData(ue.epochTime),this.zone=We.utcTimezone}resetTo(t,a,i,s,l,d,f){this.fromData({year:t,month:a,day:i,hour:s,minute:l,second:d,zone:f})}fromJSDate(t,a){return t?a?(this.zone=We.utcTimezone,this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()):(this.zone=We.localTimezone,this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate(),this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds()):this.reset(),this._cachedUnixTime=null,this}fromData(t,a){if(t)for(let[i,s]of Object.entries(t))i!=="icaltype"&&(this[i]=s);if(a&&(this.zone=a),t&&!("isDate"in t)?this.isDate=!("hour"in t):t&&"isDate"in t&&(this.isDate=t.isDate),t&&"timezone"in t){let i=Vd.get(t.timezone);this.zone=i||We.localTimezone}return t&&"zone"in t&&(this.zone=t.zone),this.zone||(this.zone=We.localTimezone),this._cachedUnixTime=null,this}dayOfWeek(t){let a=t||ue.SUNDAY,i=(this.year<<12)+(this.month<<8)+(this.day<<3)+a;if(i in ue._dowCache)return ue._dowCache[i];let s=this.day,l=this.month+(this.month<3?12:0),d=this.year-(this.month<3?1:0),f=s+d+Pn((l+1)*26/10)+Pn(d/4);return f+=Pn(d/100)*6+Pn(d/400),f=(f+7-a)%7+1,ue._dowCache[i]=f,f}dayOfYear(){let t=ue.isLeapYear(this.year)?1:0;return ue.daysInYearPassedMonth[t][this.month-1]+this.day}startOfWeek(t){let a=t||ue.SUNDAY,i=this.clone();return i.day-=(this.dayOfWeek()+7-a)%7,i.isDate=!0,i.hour=0,i.minute=0,i.second=0,i}endOfWeek(t){let a=t||ue.SUNDAY,i=this.clone();return i.day+=(7-this.dayOfWeek()+a-ue.SUNDAY)%7,i.isDate=!0,i.hour=0,i.minute=0,i.second=0,i}startOfMonth(){let t=this.clone();return t.day=1,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}endOfMonth(){let t=this.clone();return t.day=ue.daysInMonth(t.month,t.year),t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}startOfYear(){let t=this.clone();return t.day=1,t.month=1,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}endOfYear(){let t=this.clone();return t.day=31,t.month=12,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}startDoyWeek(t){let a=t||ue.SUNDAY,i=this.dayOfWeek()-a;return i<0&&(i+=7),this.dayOfYear()-i}getDominicalLetter(){return ue.getDominicalLetter(this.year)}nthWeekDay(t,a){let i=ue.daysInMonth(this.month,this.year),s,l=a,d=0,f=this.clone();if(l>=0){f.day=1,l!=0&&l--,d=f.day;let p=f.dayOfWeek(),m=t-p;m<0&&(m+=7),d+=m,d-=t,s=t}else{f.day=i;let p=f.dayOfWeek();l++,s=p-t,s<0&&(s+=7),s=i-s}return s+=l*7,d+s}isNthWeekDay(t,a){let i=this.dayOfWeek();return a===0&&i===t||this.nthWeekDay(t,a)===this.day}weekNumber(t){let a=(this.year<<12)+(this.month<<8)+(this.day<<3)+t;if(a in ue._wnCache)return ue._wnCache[a];let i,s=this.clone();s.isDate=!0;let l=this.year;s.month==12&&s.day>25?(i=ue.weekOneStarts(l+1,t),s.compare(i)<0?i=ue.weekOneStarts(l,t):l++):(i=ue.weekOneStarts(l,t),s.compare(i)<0&&(i=ue.weekOneStarts(--l,t)));let d=s.subtractDate(i).toSeconds()/86400,f=Pn(d/7)+1;return ue._wnCache[a]=f,f}addDuration(t){let a=t.isNegative?-1:1,i=this.second,s=this.minute,l=this.hour,d=this.day;i+=a*t.seconds,s+=a*t.minutes,l+=a*t.hours,d+=a*t.days,d+=a*7*t.weeks,this.second=i,this.minute=s,this.hour=l,this.day=d,this._cachedUnixTime=null}subtractDate(t){let a=this.toUnixTime()+this.utcOffset(),i=t.toUnixTime()+t.utcOffset();return tr.fromSeconds(a-i)}subtractDateTz(t){let a=this.toUnixTime(),i=t.toUnixTime();return tr.fromSeconds(a-i)}compare(t){if(t instanceof ei)return-1*t.compare(this);{let a=this.toUnixTime(),i=t.toUnixTime();return a>i?1:i>a?-1:0}}compareDateOnlyTz(t,a){let i=this.convertToZone(a),s=t.convertToZone(a),l=0;return(l=ue._cmp_attr(i,s,"year"))!=0||(l=ue._cmp_attr(i,s,"month"))!=0||(l=ue._cmp_attr(i,s,"day"))!=0,l}convertToZone(t){let a=this.clone(),i=this.zone.tzid==t.tzid;return!this.isDate&&!i&&We.convert_time(a,this.zone,t),a.zone=t,a}utcOffset(){return this.zone==We.localTimezone||this.zone==We.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let t=this.toString();return t.length>10?pn.icalendar.value["date-time"].toICAL(t):pn.icalendar.value.date.toICAL(t)}toString(){let t=this.year+"-"+br(this.month)+"-"+br(this.day);return this.isDate||(t+="T"+br(this.hour)+":"+br(this.minute)+":"+br(this.second),this.zone===We.utcTimezone&&(t+="Z")),t}toJSDate(){return this.zone==We.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(this.toUnixTime()*1e3)}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(t,a,i,s,l){let d,f,p=0,m=0,y,v,w,b,C,E=l||this._time;if(E.isDate||(y=E.second+s,E.second=y%60,d=Pn(y/60),E.second<0&&(E.second+=60,d--),v=E.minute+i+d,E.minute=v%60,f=Pn(v/60),E.minute<0&&(E.minute+=60,f--),w=E.hour+a+f,E.hour=w%24,p=Pn(w/24),E.hour<0&&(E.hour+=24,p--)),E.month>12?m=Pn((E.month-1)/12):E.month<1&&(m=Pn(E.month/12)-1),E.year+=m,E.month-=12*m,b=E.day+t+p,b>0)for(;C=ue.daysInMonth(E.month,E.year),!(b<=C);)E.month++,E.month>12&&(E.year++,E.month=1),b-=C;else for(;b<=0;)E.month==1?(E.year--,E.month=12):E.month--,b+=ue.daysInMonth(E.month,E.year);return E.day=b,this._cachedUnixTime=null,this}fromUnixTime(t){this.zone=We.utcTimezone;let a=new Date(t*1e3);this.year=a.getUTCFullYear(),this.month=a.getUTCMonth()+1,this.day=a.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=a.getUTCHours(),this.minute=a.getUTCMinutes(),this.second=a.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(this._cachedUnixTime!==null)return this._cachedUnixTime;let t=this.utcOffset(),a=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-t);return this._cachedUnixTime=a/1e3,this._cachedUnixTime}toJSON(){let t=["year","month","day","hour","minute","second","isDate"],a=Object.create(null),i=0,s=t.length,l;for(;i<s;i++)l=t[i],a[l]=this[l];return this.zone&&(a.timezone=this.zone.tzid),a}}const DI=/[^ \t]/,Hd=":",Hp=";",OI="=",jI="unknown",MI="text",_I={"^'":'"',"^n":`
|
|
57
|
+
`,"^^":"^"};function kt(e){let t={},a=t.component=[];if(t.stack=[a],kt._eachLine(e,function(i,s){kt._handleContentLine(s,t)}),t.stack.length>1)throw new Do("invalid ical body. component began but did not end");return t=null,a.length==1?a[0]:a}kt.property=function(e,t){let a={component:[[],[]],designSet:t||pn.defaultSet};return kt._handleContentLine(e,a),a.component[1][0]};kt.component=function(e){return kt(e)};class Do extends Error{name=this.constructor.name}kt.ParserError=Do;kt._handleContentLine=function(e,t){let a=e.indexOf(Hd),i=e.indexOf(Hp),s,l,d,f,p={};i!==-1&&a!==-1&&i>a&&(i=-1);let m;if(i!==-1){if(d=e.slice(0,Math.max(0,i)).toLowerCase(),m=kt._parseParameters(e.slice(Math.max(0,i)),0,t.designSet),m[2]==-1)throw new Do("Invalid parameters in '"+e+"'");p=m[0];let N;if(typeof m[1]=="string"?N=m[1].length:N=m[1].reduce((R,O)=>R+O.length,0),s=N+m[2]+i,(l=e.slice(Math.max(0,s)).indexOf(Hd))!==-1)f=e.slice(Math.max(0,s+l+1));else throw new Do("Missing parameter value in '"+e+"'")}else if(a!==-1){if(d=e.slice(0,Math.max(0,a)).toLowerCase(),f=e.slice(Math.max(0,a+1)),d==="begin"){let N=[f.toLowerCase(),[],[]];t.stack.length===1?t.component.push(N):t.component[2].push(N),t.stack.push(t.component),t.component=N,t.designSet||(t.designSet=pn.getDesignSet(t.component[0]));return}else if(d==="end"){t.component=t.stack.pop();return}}else throw new Do('invalid line (no token ";" or ":") "'+e+'"');let y,v=!1,w=!1,b,C,E;t.designSet.propertyGroups&&d.indexOf(".")!==-1?(C=d.split("."),p.group=C[0],E=C[1]):E=d,E in t.designSet.property&&(b=t.designSet.property[E],"multiValue"in b&&(v=b.multiValue),"structuredValue"in b&&(w=b.structuredValue),f&&"detectType"in b&&(y=b.detectType(f))),y||("value"in p?y=p.value.toLowerCase():b?y=b.defaultType:y=jI),delete p.value;let T;v&&w?(f=kt._parseMultiValue(f,w,y,[],v,t.designSet,w),T=[E,p,y,f]):v?(T=[E,p,y],kt._parseMultiValue(f,v,y,T,null,t.designSet,!1)):w?(f=kt._parseMultiValue(f,w,y,[],null,t.designSet,w),T=[E,p,y,f]):(f=kt._parseValue(f,y,t.designSet,!1),T=[E,p,y,f]),t.component[0]==="vcard"&&t.component[1].length===0&&!(d==="version"&&f==="4.0")&&(t.designSet=pn.getDesignSet("vcard3")),t.component[1].push(T)};kt._parseValue=function(e,t,a,i){return t in a.value&&"fromICAL"in a.value[t]?a.value[t].fromICAL(e,i):e};kt._parseParameters=function(e,t,a){let i=t,s=0,l=OI,d={},f,p,m,y=-1,v,w,b;for(;s!==!1&&(s=e.indexOf(l,s+1))!==-1;){if(f=e.slice(i+1,s),f.length==0)throw new Do("Empty parameter name in '"+e+"'");if(p=f.toLowerCase(),b=!1,w=!1,p in a.param&&a.param[p].valueType?v=a.param[p].valueType:v=MI,p in a.param&&(w=a.param[p].multiValue,a.param[p].multiValueSeparateDQuote&&(b=kt._rfc6868Escape('"'+w+'"'))),e[s+1]==='"'){if(y=s+2,s=e.indexOf('"',y),w&&s!=-1){let N=!0;for(;N;)e[s+1]==w&&e[s+2]=='"'?s=e.indexOf('"',s+3):N=!1}if(s===-1)throw new Do('invalid line (no matching double quote) "'+e+'"');m=e.slice(y,s),i=e.indexOf(Hp,s);let T=e.indexOf(Hd,s);(i===-1||T!==-1&&i>T)&&(s=!1)}else{y=s+1;let T=e.indexOf(Hp,y),N=e.indexOf(Hd,y);N!==-1&&T>N?(T=N,s=!1):T===-1?(N===-1?T=e.length:T=N,s=!1):(i=T,s=T),m=e.slice(y,T)}const E=m.length;if(m=kt._rfc6868Escape(m),y+=E-m.length,w){let T=b||w;m=kt._parseMultiValue(m,T,v,[],null,a)}else m=kt._parseValue(m,v,a);w&&p in d?Array.isArray(d[p])?d[p].push(m):d[p]=[d[p],m]:d[p]=m}return[d,m,y]};kt._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,function(t){return _I[t]})};kt._parseMultiValue=function(e,t,a,i,s,l,d){let f=0,p=0,m;if(t.length===0)return e;for(;(f=xC(e,t,p))!==-1;)m=e.slice(p,f),s?m=kt._parseMultiValue(m,s,a,[],null,l,d):m=kt._parseValue(m,a,l,d),i.push(m),p=f+t.length;return m=e.slice(p),s?m=kt._parseMultiValue(m,s,a,[],null,l,d):m=kt._parseValue(m,a,l,d),i.push(m),i.length==1?i[0]:i};kt._eachLine=function(e,t){let a=e.length,i=e.search(DI),s=i,l,d,f;do s=e.indexOf(`
|
|
58
|
+
`,i)+1,s>1&&e[s-2]==="\r"?f=2:f=1,s===0&&(s=a,f=0),d=e[i],d===" "||d===" "?l+=e.slice(i+1,s-f):(l&&t(null,l),l=e.slice(i,s-f)),i=s;while(s!==a);l=l.trim(),l.length&&t(null,l)};const kI=["tzid","location","tznames","latitude","longitude"];class We{static _compare_change_fn(t,a){return t.year<a.year?-1:t.year>a.year?1:t.month<a.month?-1:t.month>a.month?1:t.day<a.day?-1:t.day>a.day?1:t.hour<a.hour?-1:t.hour>a.hour?1:t.minute<a.minute?-1:t.minute>a.minute?1:t.second<a.second?-1:t.second>a.second?1:0}static convert_time(t,a,i){if(t.isDate||a.tzid==i.tzid||a==We.localTimezone||i==We.localTimezone)return t.zone=i,t;let s=a.utcOffset(t);return t.adjust(0,0,0,-s),s=i.utcOffset(t),t.adjust(0,0,0,s),null}static fromData(t){return new We().fromData(t)}static#e=null;static get utcTimezone(){return this.#e||(this.#e=We.fromData({tzid:"UTC"})),this.#e}static#t=null;static get localTimezone(){return this.#t||(this.#t=We.fromData({tzid:"floating"})),this.#t}static adjust_change(t,a,i,s,l){return ue.prototype.adjust.call(t,a,i,s,l,t)}static _minimumExpansionYear=-1;static EXTRA_COVERAGE=5;constructor(t){this.wrappedJSObject=this,this.fromData(t)}tzid="";location="";tznames="";latitude=0;longitude=0;component=null;expandedUntilYear=0;icalclass="icaltimezone";fromData(t){if(this.expandedUntilYear=0,this.changes=[],t instanceof _r)this.component=t;else{if(t&&"component"in t)if(typeof t.component=="string"){let a=kt(t.component);this.component=new _r(a)}else t.component instanceof _r?this.component=t.component:this.component=null;for(let a of kI)t&&a in t&&(this[a]=t[a])}return this.component instanceof _r&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue("tzid")),this}utcOffset(t){if(this==We.utcTimezone||this==We.localTimezone||(this._ensureCoverage(t.year),!this.changes.length))return 0;let a={year:t.year,month:t.month,day:t.day,hour:t.hour,minute:t.minute,second:t.second},i=this._findNearbyChange(a),s=-1,l=1;for(;;){let p=ko(this.changes[i],!0);if(p.utcOffset<p.prevUtcOffset?We.adjust_change(p,0,0,0,p.utcOffset):We.adjust_change(p,0,0,0,p.prevUtcOffset),We._compare_change_fn(a,p)>=0?s=i:l=-1,l==-1&&s!=-1)break;if(i+=l,i<0)return 0;if(i>=this.changes.length)break}let d=this.changes[s];if(d.utcOffset-d.prevUtcOffset<0&&s>0){let p=ko(d,!0);if(We.adjust_change(p,0,0,0,p.prevUtcOffset),We._compare_change_fn(a,p)<0){let m=this.changes[s-1],y=!1;d.is_daylight!=y&&m.is_daylight==y&&(d=m)}}return d.utcOffset}_findNearbyChange(t){let a=Oo(this.changes,t,We._compare_change_fn);return a>=this.changes.length?this.changes.length-1:a}_ensureCoverage(t){if(We._minimumExpansionYear==-1){let i=ue.now();We._minimumExpansionYear=i.year}let a=t;if(a<We._minimumExpansionYear&&(a=We._minimumExpansionYear),a+=We.EXTRA_COVERAGE,!this.changes.length||this.expandedUntilYear<t){let i=this.component.getAllSubcomponents(),s=i.length,l=0;for(;l<s;l++)this._expandComponent(i[l],a,this.changes);this.changes.sort(We._compare_change_fn),this.expandedUntilYear=a}}_expandComponent(t,a,i){if(!t.hasProperty("dtstart")||!t.hasProperty("tzoffsetto")||!t.hasProperty("tzoffsetfrom"))return null;let s=t.getFirstProperty("dtstart").getFirstValue(),l;function d(p){return p.factor*(p.hours*3600+p.minutes*60)}function f(){let p={};return p.is_daylight=t.name=="daylight",p.utcOffset=d(t.getFirstProperty("tzoffsetto").getFirstValue()),p.prevUtcOffset=d(t.getFirstProperty("tzoffsetfrom").getFirstValue()),p}if(!t.hasProperty("rrule")&&!t.hasProperty("rdate"))l=f(),l.year=s.year,l.month=s.month,l.day=s.day,l.hour=s.hour,l.minute=s.minute,l.second=s.second,We.adjust_change(l,0,0,0,-l.prevUtcOffset),i.push(l);else{let p=t.getAllProperties("rdate");for(let y of p){let v=y.getFirstValue();l=f(),l.year=v.year,l.month=v.month,l.day=v.day,v.isDate?(l.hour=s.hour,l.minute=s.minute,l.second=s.second,s.zone!=We.utcTimezone&&We.adjust_change(l,0,0,0,-l.prevUtcOffset)):(l.hour=v.hour,l.minute=v.minute,l.second=v.second,v.zone!=We.utcTimezone&&We.adjust_change(l,0,0,0,-l.prevUtcOffset)),i.push(l)}let m=t.getFirstProperty("rrule");if(m){m=m.getFirstValue(),l=f(),m.until&&m.until.zone==We.utcTimezone&&(m.until.adjust(0,0,0,l.prevUtcOffset),m.until.zone=We.localTimezone);let y=m.iterator(s),v;for(;(v=y.next())&&(l=f(),!(v.year>a||!v));)l.year=v.year,l.month=v.month,l.day=v.day,l.hour=v.hour,l.minute=v.minute,l.second=v.second,l.isDate=v.isDate,We.adjust_change(l,0,0,0,-l.prevUtcOffset),i.push(l)}}return i}toString(){return this.tznames?this.tznames:this.tzid}}let ir=null;const Vd={get count(){return ir===null?0:Object.keys(ir).length},reset:function(){ir=Object.create(null);let e=We.utcTimezone;ir.Z=e,ir.UTC=e,ir.GMT=e},_hard_reset:function(){ir=null},has:function(e){return ir===null?!1:!!ir[e]},get:function(e){return ir===null&&this.reset(),ir[e]},register:function(e,t){if(ir===null&&this.reset(),typeof e=="string"&&t instanceof We&&([e,t]=[t,e]),t||(e instanceof We?t=e.tzid:e.name==="vtimezone"&&(e=new We(e),t=e.tzid)),!t)throw new TypeError("Neither a timezone nor a name was passed");if(e instanceof We)ir[t]=e;else throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component")},remove:function(e){return ir===null?null:delete ir[e]}};function LI(e){let t,a,i,s,l;if(!e||e.name!=="vcalendar")return e;for(t=e.getAllSubcomponents(),a=[],i={},l=0;l<t.length;l++)if(t[l].name==="vtimezone"){let d=t[l].getFirstProperty("tzid").getFirstValue();i[d]=t[l]}else a=a.concat(t[l].getAllProperties());for(s={},l=0;l<a.length;l++){let d=a[l].getParameter("tzid");d&&(s[d]=!0)}for(let[d,f]of Object.entries(i))s[d]||e.removeSubcomponent(f);for(let d of Object.keys(s))!i[d]&&Vd.has(d)&&e.addSubcomponent(Vd.get(d).component);return e}function mc(e){return typeof e=="number"&&isNaN(e)}function Zn(e){let t=parseInt(e,10);if(mc(t))throw new Error('Could not extract integer from "'+e+'"');return t}function ti(e,t){if(!(typeof e>"u"))return e instanceof t?e:new t(e)}function xC(e,t,a){for(;(a=e.indexOf(t,a))!==-1;)if(a>0&&e[a-1]==="\\")a+=1;else return a;return-1}function Oo(e,t,a){if(!e.length)return 0;let i=0,s=e.length-1,l,d;for(;i<=s;)if(l=i+Math.floor((s-i)/2),d=a(t,e[l]),d<0)s=l-1;else if(d>0)i=l+1;else break;return d<0?l:d>0?l+1:l}function ko(e,t){if(!e||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){let a=[];for(let i=0;i<e.length;i++)a.push(t?ko(e[i],!0):e[i]);return a}else{let a={};for(let[i,s]of Object.entries(e))t?a[i]=ko(s,!0):a[i]=s;return a}}function bC(e){let t="",a=e||"",i=0,s=0;for(;a.length;){let l=a.codePointAt(i);l<128?++s:l<2048?s+=2:l<65536?s+=3:s+=4,s<No.foldLength+1?i+=l>65535?2:1:(t+=No.newLineChar+" "+a.slice(0,Math.max(0,i)),a=a.slice(Math.max(0,i)),i=s=0)}return t.slice(No.newLineChar.length+1)}function br(e){switch(typeof e!="string"&&(typeof e=="number"&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}}function Pn(e){return e<0?Math.ceil(e):Math.floor(e)}function Yo(e,t){for(let a in e){let i=Object.getOwnPropertyDescriptor(e,a);i&&!Object.getOwnPropertyDescriptor(t,a)&&Object.defineProperty(t,a,i)}return t}var II=Object.freeze({__proto__:null,binsearchInsert:Oo,clone:ko,extend:Yo,foldline:bC,formatClassType:ti,isStrictlyNaN:mc,pad2:br,strictParseInt:Zn,trunc:Pn,unescapedIndexOf:xC,updateTimezones:LI});class ca{static fromString(t){let a={};return a.factor=t[0]==="+"?1:-1,a.hours=Zn(t.slice(1,3)),a.minutes=Zn(t.slice(4,6)),new ca(a)}static fromSeconds(t){let a=new ca;return a.fromSeconds(t),a}constructor(t){this.fromData(t)}hours=0;minutes=0;factor=1;icaltype="utc-offset";clone(){return ca.fromSeconds(this.toSeconds())}fromData(t){if(t)for(let[a,i]of Object.entries(t))this[a]=i;this._normalize()}fromSeconds(t){let a=Math.abs(t);return this.factor=t<0?-1:1,this.hours=Pn(a/3600),a-=this.hours*3600,this.minutes=Pn(a/60),this}toSeconds(){return this.factor*(60*this.minutes+3600*this.hours)}compare(t){let a=this.toSeconds(),i=t.toSeconds();return(a>i)-(i>a)}_normalize(){let t=this.toSeconds(),a=this.factor;for(;t<-43200;)t+=97200;for(;t>50400;)t-=97200;this.fromSeconds(t),t==0&&(this.factor=a)}toICALString(){return pn.icalendar.value["utc-offset"].toICAL(this.toString())}toString(){return(this.factor==1?"+":"-")+br(this.hours)+":"+br(this.minutes)}}class qi extends ue{static fromDateAndOrTimeString(t,a){function i(E,T,N){return E?Zn(E.slice(T,T+N)):null}let s=t.split("T"),l=s[0],d=s[1],f=d?pn.vcard.value.time._splitZone(d):[],p=f[0],m=f[1],y=l?l.length:0,v=m?m.length:0,w=l&&l[0]=="-"&&l[1]=="-",b=m&&m[0]=="-",C={year:w?null:i(l,0,4),month:w&&(y==4||y==7)?i(l,2,2):y==7||y==10?i(l,5,2):null,day:y==5?i(l,3,2):y==7&&w?i(l,5,2):y==10?i(l,8,2):null,hour:b?null:i(m,0,2),minute:b&&v==3?i(m,1,2):v>4?b?i(m,1,2):i(m,3,2):null,second:v==4?i(m,2,2):v==6?i(m,4,2):v==8?i(m,6,2):null};return p=="Z"?p=We.utcTimezone:p&&p[3]==":"?p=ca.fromString(p):p=null,new qi(C,p,a)}constructor(t,a,i){super(t,a),this.icaltype=i||"date-and-or-time"}icalclass="vcardtime";icaltype="date-and-or-time";clone(){return new qi(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof ca?this.zone.toSeconds():ue.prototype.utcOffset.apply(this,arguments)}toICALString(){return pn.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let t=this.year,a=this.month,i=this.day,s=this.hour,l=this.minute,d=this.second,f=t!==null,p=a!==null,m=i!==null,y=s!==null,v=l!==null,w=d!==null,b=(f?br(t)+(p||m?"-":""):p||m?"--":"")+(p?br(a):"")+(m?"-"+br(i):""),C=(y?br(s):"-")+(y&&v?":":"")+(v?br(l):"")+(!y&&!v?"-":"")+(v&&w?":":"")+(w?br(d):""),E;switch(this.zone===We.utcTimezone?E="Z":this.zone instanceof ca?E=this.zone.toString():this.zone===We.localTimezone?E="":this.zone instanceof We?E=ca.fromSeconds(this.zone.utcOffset(this)).toString():E="",this.icaltype){case"time":return C+E;case"date-and-or-time":case"date-time":return b+(C=="--"?"":"T"+C+E);case"date":return b}return null}}class ba{static _indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8};static _expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]};static UNKNOWN=0;static CONTRACT=1;static EXPAND=2;static ILLEGAL=3;constructor(t){this.fromData(t)}completed=!1;rule=null;dtstart=null;last=null;occurrence_number=0;by_indices=null;initialized=!1;by_data=null;days=null;days_index=0;fromData(t){if(this.rule=ti(t.rule,er),!this.rule)throw new Error("iterator requires a (ICAL.Recur) rule");if(this.dtstart=ti(t.dtstart,ue),!this.dtstart)throw new Error("iterator requires a (ICAL.Time) dtstart");if(t.by_data?this.by_data=t.by_data:this.by_data=ko(this.rule.parts,!0),t.occurrence_number&&(this.occurrence_number=t.occurrence_number),this.days=t.days||[],t.last&&(this.last=ti(t.last,ue)),this.by_indices=t.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=t.initialized||!1,!this.initialized)try{this.init()}catch(a){if(a instanceof Zu)this.completed=!0;else throw a}}init(){this.initialized=!0,this.last=this.dtstart.clone();let t=this.by_data;if("BYDAY"in t&&this.sort_byday_rules(t.BYDAY),"BYYEARDAY"in t&&("BYMONTH"in t||"BYWEEKNO"in t||"BYMONTHDAY"in t))throw new Error("Invalid BYYEARDAY rule");if("BYWEEKNO"in t&&"BYMONTHDAY"in t)throw new Error("BYWEEKNO does not fit to BYMONTHDAY");if(this.rule.freq=="MONTHLY"&&("BYYEARDAY"in t||"BYWEEKNO"in t))throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear");if(this.rule.freq=="WEEKLY"&&("BYYEARDAY"in t||"BYMONTHDAY"in t))throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear");if(this.rule.freq!="YEARLY"&&"BYYEARDAY"in t)throw new Error("BYYEARDAY may only appear in YEARLY rules");if(this.last.second=this.setup_defaults("BYSECOND","SECONDLY",this.dtstart.second),this.last.minute=this.setup_defaults("BYMINUTE","MINUTELY",this.dtstart.minute),this.last.hour=this.setup_defaults("BYHOUR","HOURLY",this.dtstart.hour),this.last.day=this.setup_defaults("BYMONTHDAY","DAILY",this.dtstart.day),this.last.month=this.setup_defaults("BYMONTH","MONTHLY",this.dtstart.month),this.rule.freq=="WEEKLY")if("BYDAY"in t){let[,a]=this.ruleDayOfWeek(t.BYDAY[0],this.rule.wkst),i=a-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)<a&&i>=0||i<0)&&(this.last.day+=i)}else{let a=er.numericDayToIcalDay(this.dtstart.dayOfWeek());t.BYDAY=[a]}if(this.rule.freq=="YEARLY"){const a=this.rule.until?this.rule.until.year:2e4;for(;this.last.year<=a&&(this.expand_year_days(this.last.year),!(this.days.length>0));)this.increment_year(this.rule.interval);if(this.days.length==0)throw new Zu;if(!this._nextByYearDay()&&!this.next_year()&&!this.next_year()&&!this.next_year())throw new Zu}if(this.rule.freq=="MONTHLY"){if(this.has_by_data("BYDAY")){let a=null,i=this.last.clone(),s=ue.daysInMonth(this.last.month,this.last.year);for(let l of this.by_data.BYDAY){this.last=i.clone();let[d,f]=this.ruleDayOfWeek(l),p=this.last.nthWeekDay(f,d);if(d>=6||d<=-6)throw new Error("Malformed values in BYDAY part");if(p>s||p<=0){if(a&&a.month==i.month)continue;for(;p>s||p<=0;)this.increment_month(),s=ue.daysInMonth(this.last.month,this.last.year),p=this.last.nthWeekDay(f,d)}this.last.day=p,(!a||this.last.compare(a)<0)&&(a=this.last.clone())}if(this.last=a.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>s||this.last.day==0)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")){this.last.day=1;let a=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY).filter(i=>i>=this.last.day);if(a.length)this.last.day=a[0],this.by_data.BYMONTHDAY=a;else if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new Zu}}}next(t=!1){let a=this.last?this.last.clone():null;if((this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)&&(this.completed=!0),this.completed)return null;if(this.occurrence_number==0&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;let i,s=0;do switch(i=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":if(i=this.next_month(),i)s=0;else if(++s==336)return this.completed=!0,null;break;case"YEARLY":if(i=this.next_year(),i)s=0;else if(++s==28)return this.completed=!0,null;break;default:return null}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!i);if(this.last.compare(a)==0){if(t)throw new Error("Same occurrence found twice, protecting you from death by recursion");this.next(!0)}return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic("BYSECOND","SECONDLY","second","minute")}increment_second(t){return this.increment_generic(t,"second",60,"minute")}next_minute(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")}increment_minute(t){return this.increment_generic(t,"minute",60,"hour")}next_hour(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")}increment_hour(t){this.increment_generic(t,"hour",24,"monthday")}next_day(){let t=this.rule.freq=="DAILY";return this.next_hour()==0||(t?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let t=0;if(this.next_weekday_by_week()==0)return t;if(this.has_by_data("BYWEEKNO")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,t=1),this.last.month=1,this.last.day=1;let a=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*a,t&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return t}normalizeByMonthDayRules(t,a,i){let s=ue.daysInMonth(a,t),l=[],d=0,f=i.length,p;for(;d<f;d++){if(p=parseInt(i[d],10),isNaN(p))throw new Error("Invalid BYMONTHDAY value");if(!(Math.abs(p)>s)){if(p<0)p=s+(p+1);else if(p===0)continue;l.indexOf(p)===-1&&l.push(p)}}return l.sort(function(m,y){return m-y})}_byDayAndMonthDay(t){let a,i=this.by_data.BYDAY,s,l=0,d,f=i.length,p=0,m,y=this,v=this.last.day;function w(){for(m=ue.daysInMonth(y.last.month,y.last.year),a=y.normalizeByMonthDayRules(y.last.year,y.last.month,y.by_data.BYMONTHDAY),d=a.length;a[l]<=v&&!(t&&a[l]==v)&&l<d-1;)l++}function b(){v=0,y.increment_month(),l=0,w()}w(),t&&(v-=1);let C=48;for(;!p&&C;){if(C--,s=v+1,s>m){b();continue}let E=a[l++];if(E>=s)v=E;else{b();continue}for(let T=0;T<f;T++){let N=this.ruleDayOfWeek(i[T]),R=N[0],O=N[1];if(this.last.day=v,this.last.isNthWeekDay(O,R)){p=1;break}}if(!p&&l===d){b();continue}}if(C<=0)throw new Error("Malformed values in BYDAY combined with BYMONTHDAY parts");return p}next_month(){let t=1;if(this.next_hour()==0)return t;if(this.has_by_data("BYDAY")&&this.has_by_data("BYMONTHDAY"))t=this._byDayAndMonthDay();else if(this.has_by_data("BYDAY")){let a=ue.daysInMonth(this.last.month,this.last.year),i=0,s=0;if(this.has_by_data("BYSETPOS")){let d=this.last.day;for(let f=1;f<=a;f++)this.last.day=f,this.is_day_in_byday(this.last)&&(s++,f<=d&&i++);this.last.day=d}t=0;let l;for(l=this.last.day+1;l<=a;l++)if(this.last.day=l,this.is_day_in_byday(this.last)&&(!this.has_by_data("BYSETPOS")||this.check_set_position(++i)||this.check_set_position(i-s-1))){t=1;break}l>a&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?(!this.has_by_data("BYSETPOS")||this.check_set_position(1))&&(t=1):t=0)}else if(this.has_by_data("BYMONTHDAY")){if(this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month(),this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length))return 0;let a=ue.daysInMonth(this.last.month,this.last.year),i=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];i<0&&(i=a+i+1),i>a?(this.last.day=1,t=this.is_day_in_byday(this.last)):this.last.day=i}else{this.increment_month();let a=ue.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>a?t=0:this.last.day=this.by_data.BYMONTHDAY[0]}return t}next_weekday_by_week(){let t=0;if(this.next_hour()==0)return t;if(!this.has_by_data("BYDAY"))return 1;for(;;){let a=new ue;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,t=1);let i=this.by_data.BYDAY[this.by_indices.BYDAY],l=this.ruleDayOfWeek(i)[1];l-=this.rule.wkst,l<0&&(l+=7),a.year=this.last.year,a.month=this.last.month,a.day=this.last.day;let d=a.startDoyWeek(this.rule.wkst);if(l+d<1&&!t)continue;let f=ue.fromDayOfYear(d+l,this.last.year);return this.last.year=f.year,this.last.month=f.month,this.last.day=f.day,t}}next_year(){return this.next_hour()==0||(this.days.length==0||++this.days_index==this.days.length)&&(this.days_index=0,this.increment_year(this.rule.interval),this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY)),this.expand_year_days(this.last.year),this.days.length==0)?0:this._nextByYearDay()}_nextByYearDay(){let t=this.days[this.days_index],a=this.last.year;if(Math.abs(t)==366&&!ue.isLeapYear(this.last.year))return 0;t<1&&(t+=1,a+=1);let i=ue.fromDayOfYear(t,a);return this.last.day=i.day,this.last.month=i.month,1}ruleDayOfWeek(t,a){let i=t.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);if(i){let s=parseInt(i[1]||0,10);return t=er.icalDayToNumericDay(i[2],a),[s,t]}else return[0,0]}next_generic(t,a,i,s,l){let d=t in this.by_data,f=this.rule.freq==a,p=0;if(l&&this[l]()==0)return p;if(d){this.by_indices[t]++;let m=this.by_data[t];this.by_indices[t]==m.length&&(this.by_indices[t]=0,p=1),this.last[i]=m[this.by_indices[t]]}else f&&this["increment_"+i](this.rule.interval);return d&&p&&f&&this["increment_"+s](1),p}increment_monthday(t){for(let a=0;a<t;a++){let i=ue.daysInMonth(this.last.month,this.last.year);this.last.day++,this.last.day>i&&(this.last.day-=i,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{this.rule.freq=="MONTHLY"?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let t=Pn(this.last.month/12);this.last.month%=12,this.last.month++,t!=0&&this.increment_year(t)}this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY))}increment_year(t){this.last.day=1,this.last.year+=t}increment_generic(t,a,i,s){this.last[a]+=t;let l=Pn(this.last[a]/i);this.last[a]%=i,l!=0&&this["increment_"+s](l)}has_by_data(t){return t in this.rule.parts}expand_year_days(t){let a=new ue;this.days=[];let i={},s=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(let f of s)f in this.rule.parts&&(i[f]=this.rule.parts[f]);if("BYMONTH"in i&&"BYWEEKNO"in i){let f=1,p={};a.year=t,a.isDate=!0;for(let m=0;m<this.by_data.BYMONTH.length;m++){let y=this.by_data.BYMONTH[m];a.month=y,a.day=1;let v=a.weekNumber(this.rule.wkst);a.day=ue.daysInMonth(y,t);let w=a.weekNumber(this.rule.wkst);for(m=v;m<w;m++)p[m]=1}for(let m=0;m<this.by_data.BYWEEKNO.length&&f;m++)this.by_data.BYWEEKNO[m]<52?f&=p[m]:f=0;f?delete i.BYMONTH:delete i.BYWEEKNO}let l=Object.keys(i).length;if(l==0){let f=this.dtstart.clone();f.year=this.last.year,this.days.push(f.dayOfYear())}else if(l==1&&"BYMONTH"in i)for(let f of this.by_data.BYMONTH){let p=this.dtstart.clone();p.year=t,p.month=f,p.isDate=!0,this.days.push(p.dayOfYear())}else if(l==1&&"BYMONTHDAY"in i)for(let f of this.by_data.BYMONTHDAY){let p=this.dtstart.clone();if(f<0){let m=ue.daysInMonth(p.month,t);f=f+m+1}p.day=f,p.year=t,p.isDate=!0,this.days.push(p.dayOfYear())}else if(l==2&&"BYMONTHDAY"in i&&"BYMONTH"in i)for(let f of this.by_data.BYMONTH){let p=ue.daysInMonth(f,t);for(let m of this.by_data.BYMONTHDAY)m<0&&(m=m+p+1),a.day=m,a.month=f,a.year=t,a.isDate=!0,this.days.push(a.dayOfYear())}else if(!(l==1&&"BYWEEKNO"in i)){if(!(l==2&&"BYWEEKNO"in i&&"BYMONTHDAY"in i)){if(l==1&&"BYDAY"in i)this.days=this.days.concat(this.expand_by_day(t));else if(l==2&&"BYDAY"in i&&"BYMONTH"in i){for(let f of this.by_data.BYMONTH){let p=ue.daysInMonth(f,t);a.year=t,a.month=f,a.day=1,a.isDate=!0;let m=a.dayOfWeek(),y=a.dayOfYear()-1;a.day=p;let v=a.dayOfWeek();if(this.has_by_data("BYSETPOS")){let w=[];for(let b=1;b<=p;b++)a.day=b,this.is_day_in_byday(a)&&w.push(b);for(let b=0;b<w.length;b++)(this.check_set_position(b+1)||this.check_set_position(b-w.length))&&this.days.push(y+w[b])}else for(let w of this.by_data.BYDAY){let b=this.ruleDayOfWeek(w),C=b[0],E=b[1],T,N=(E+7-m)%7+1,R=p-(v+7-E)%7;if(C==0)for(let O=N;O<=p;O+=7)this.days.push(y+O);else C>0?(T=N+(C-1)*7,T<=p&&this.days.push(y+T)):(T=R+(C+1)*7,T>0&&this.days.push(y+T))}}this.days.sort(function(f,p){return f-p})}else if(l==2&&"BYDAY"in i&&"BYMONTHDAY"in i){let f=this.expand_by_day(t);for(let p of f){let m=ue.fromDayOfYear(p,t);this.by_data.BYMONTHDAY.indexOf(m.day)>=0&&this.days.push(p)}}else if(l==3&&"BYDAY"in i&&"BYMONTHDAY"in i&&"BYMONTH"in i){let f=this.expand_by_day(t);for(let p of f){let m=ue.fromDayOfYear(p,t);this.by_data.BYMONTH.indexOf(m.month)>=0&&this.by_data.BYMONTHDAY.indexOf(m.day)>=0&&this.days.push(p)}}else if(l==2&&"BYDAY"in i&&"BYWEEKNO"in i){let f=this.expand_by_day(t);for(let p of f){let y=ue.fromDayOfYear(p,t).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(y)&&this.days.push(p)}}else if(!(l==3&&"BYDAY"in i&&"BYWEEKNO"in i&&"BYMONTHDAY"in i))if(l==1&&"BYYEARDAY"in i)this.days=this.days.concat(this.by_data.BYYEARDAY);else if(l==2&&"BYYEARDAY"in i&&"BYDAY"in i){let f=ue.isLeapYear(t)?366:365,p=new Set(this.expand_by_day(t));for(let m of this.by_data.BYYEARDAY)m<0&&(m+=f+1),p.has(m)&&this.days.push(m)}else this.days=[]}}let d=ue.isLeapYear(t)?366:365;return this.days.sort((f,p)=>(f<0&&(f+=d+1),p<0&&(p+=d+1),f-p)),0}expand_by_day(t){let a=[],i=this.last.clone();i.year=t,i.month=1,i.day=1,i.isDate=!0;let s=i.dayOfWeek();i.month=12,i.day=31,i.isDate=!0;let l=i.dayOfWeek(),d=i.dayOfYear();for(let f of this.by_data.BYDAY){let p=this.ruleDayOfWeek(f),m=p[0],y=p[1];if(m==0){let v=(y+7-s)%7+1;for(let w=v;w<=d;w+=7)a.push(w)}else if(m>0){let v;y>=s?v=y-s+1:v=y-s+8,a.push(v+(m-1)*7)}else{let v;m=-m,y<=l?v=d-l+y:v=d-l+y-7,a.push(v-(m-1)*7)}}return a}is_day_in_byday(t){if(this.by_data.BYDAY)for(let a of this.by_data.BYDAY){let i=this.ruleDayOfWeek(a),s=i[0],l=i[1],d=t.dayOfWeek();if(s==0&&l==d||t.nthWeekDay(l,s)==t.day)return 1}return 0}check_set_position(t){return this.has_by_data("BYSETPOS")?this.by_data.BYSETPOS.indexOf(t)!==-1:!1}sort_byday_rules(t){for(let a=0;a<t.length;a++)for(let i=0;i<a;i++){let s=this.ruleDayOfWeek(t[i],this.rule.wkst)[1],l=this.ruleDayOfWeek(t[a],this.rule.wkst)[1];if(s>l){let d=t[a];t[a]=t[i],t[i]=d}}}check_contract_restriction(t,a){let i=ba._indexMap[t],s=ba._expandMap[this.rule.freq][i],l=!1;if(t in this.by_data&&s==ba.CONTRACT){let d=this.by_data[t];for(let f of d)if(f==a){l=!0;break}}else l=!0;return l}check_contracting_rules(){let t=this.last.dayOfWeek(),a=this.last.weekNumber(this.rule.wkst),i=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",er.numericDayToIcalDay(t))&&this.check_contract_restriction("BYWEEKNO",a)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",i)}setup_defaults(t,a,i){let s=ba._indexMap[t];return ba._expandMap[this.rule.freq][s]!=ba.CONTRACT&&(t in this.by_data||(this.by_data[t]=[i]),this.rule.freq!=a)?this.by_data[t][0]:i}toJSON(){let t=Object.create(null);return t.initialized=this.initialized,t.rule=this.rule.toJSON(),t.dtstart=this.dtstart.toJSON(),t.by_data=this.by_data,t.days=this.days,t.last=this.last.toJSON(),t.by_indices=this.by_indices,t.occurrence_number=this.occurrence_number,t}}class Zu extends Error{constructor(){super("Recurrence rule has no valid occurrences")}}const zI=/^(SU|MO|TU|WE|TH|FR|SA)$/,UI=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,wC={SU:ue.SUNDAY,MO:ue.MONDAY,TU:ue.TUESDAY,WE:ue.WEDNESDAY,TH:ue.THURSDAY,FR:ue.FRIDAY,SA:ue.SATURDAY},PI=Object.fromEntries(Object.entries(wC).map(e=>e.reverse())),vw=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"];class er{static fromString(t){let a=this._stringToData(t,!1);return new er(a)}static fromData(t){return new er(t)}static _stringToData(t,a){let i=Object.create(null),s=t.split(";"),l=s.length;for(let d=0;d<l;d++){let f=s[d].split("="),p=f[0].toUpperCase(),m=f[0].toLowerCase(),y=a?m:p,v=f[1];if(p in mp){let w=v.split(","),b=new Set;for(let C of w)b.add(mp[p](C));w=[...b],i[y]=w.length==1?w[0]:w}else p in hp?hp[p](v,i,a):i[m]=v}return i}static icalDayToNumericDay(t,a){let i=a||ue.SUNDAY;return(wC[t]-i+7)%7+1}static numericDayToIcalDay(t,a){let i=a||ue.SUNDAY,s=t+i-ue.SUNDAY;return s>7&&(s-=7),PI[s]}constructor(t){this.wrappedJSObject=this,this.parts={},t&&typeof t=="object"&&this.fromData(t)}parts=null;interval=1;wkst=ue.MONDAY;until=null;count=null;freq=null;icalclass="icalrecur";icaltype="recur";iterator(t){return new ba({rule:this,dtstart:t})}clone(){return new er(this.toJSON())}isFinite(){return!!(this.count||this.until)}isByCount(){return!!(this.count&&!this.until)}addComponent(t,a){let i=t.toUpperCase();i in this.parts?this.parts[i].push(a):this.parts[i]=[a]}setComponent(t,a){this.parts[t.toUpperCase()]=a.slice()}getComponent(t){let a=t.toUpperCase();return a in this.parts?this.parts[a].slice():[]}getNextOccurrence(t,a){let i=this.iterator(t),s;do s=i.next();while(s&&s.compare(a)<=0);return s&&a.zone&&(s.zone=a.zone),s}fromData(t){for(let a in t){let i=a.toUpperCase();i in mp?Array.isArray(t[a])?this.parts[i]=t[a]:this.parts[i]=[t[a]]:this[a]=t[a]}this.interval&&typeof this.interval!="number"&&hp.INTERVAL(this.interval,this),this.wkst&&typeof this.wkst!="number"&&(this.wkst=er.icalDayToNumericDay(this.wkst)),this.until&&!(this.until instanceof ue)&&(this.until=ue.fromString(this.until))}toJSON(){let t=Object.create(null);t.freq=this.freq,this.count&&(t.count=this.count),this.interval>1&&(t.interval=this.interval);for(let[a,i]of Object.entries(this.parts))Array.isArray(i)&&i.length==1?t[a.toLowerCase()]=i[0]:t[a.toLowerCase()]=ko(i);return this.until&&(t.until=this.until.toString()),"wkst"in this&&this.wkst!==ue.DEFAULT_WEEK_START&&(t.wkst=er.numericDayToIcalDay(this.wkst)),t}toString(){let t="FREQ="+this.freq;this.count&&(t+=";COUNT="+this.count),this.interval>1&&(t+=";INTERVAL="+this.interval);for(let[a,i]of Object.entries(this.parts))t+=";"+a+"="+i;return this.until&&(t+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==ue.DEFAULT_WEEK_START&&(t+=";WKST="+er.numericDayToIcalDay(this.wkst)),t}}function Li(e,t,a,i){let s=i;if(i[0]==="+"&&(s=i.slice(1)),s=Zn(s),t!==void 0&&i<t)throw new Error(e+': invalid value "'+i+'" must be > '+t);if(a!==void 0&&i>a)throw new Error(e+': invalid value "'+i+'" must be < '+t);return s}const hp={FREQ:function(e,t,a){if(vw.indexOf(e)!==-1)t.freq=e;else throw new Error('invalid frequency "'+e+'" expected: "'+vw.join(", ")+'"')},COUNT:function(e,t,a){t.count=Zn(e)},INTERVAL:function(e,t,a){t.interval=Zn(e),t.interval<1&&(t.interval=1)},UNTIL:function(e,t,a){e.length>10?t.until=pn.icalendar.value["date-time"].fromICAL(e):t.until=pn.icalendar.value.date.fromICAL(e),a||(t.until=ue.fromString(t.until))},WKST:function(e,t,a){if(zI.test(e))t.wkst=er.icalDayToNumericDay(e);else throw new Error('invalid WKST value "'+e+'"')}},mp={BYSECOND:Li.bind(void 0,"BYSECOND",0,60),BYMINUTE:Li.bind(void 0,"BYMINUTE",0,59),BYHOUR:Li.bind(void 0,"BYHOUR",0,23),BYDAY:function(e){if(UI.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:Li.bind(void 0,"BYMONTHDAY",-31,31),BYYEARDAY:Li.bind(void 0,"BYYEARDAY",-366,366),BYWEEKNO:Li.bind(void 0,"BYWEEKNO",-53,53),BYMONTH:Li.bind(void 0,"BYMONTH",1,12),BYSETPOS:Li.bind(void 0,"BYSETPOS",-366,366)},YI=/\\\\|\\;|\\,|\\[Nn]/g,BI=/\\|;|,|\n/g,xw=/\\\\|\\,|\\[Nn]/g,bw=/\\|,|\n/g;function Vp(e,t){return{matches:/.*/,fromICAL:function(i,s){return VI(i,e,s)},toICAL:function(i,s){let l=t;return s&&(l=new RegExp(l.source+"|"+s,l.flags)),i.replace(l,function(d){switch(d){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case`
|
|
59
|
+
`:return"\\n";default:return d}})}}}const Nt={defaultType:"text"},pc={defaultType:"text",multiValue:","},Fd={defaultType:"text",structuredValue:";"},Ju={defaultType:"integer"},ed={defaultType:"date-time",allowedTypes:["date-time","date"]},td={defaultType:"date-time"},vr={defaultType:"uri"},ww={defaultType:"utc-offset"},Sw={defaultType:"recur"},Ew={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function HI(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return`
|
|
60
|
+
`;default:return e}}function VI(e,t,a){return e.indexOf("\\")===-1?e:(a&&(t=new RegExp(t.source+"|\\\\"+a,t.flags)),e.replace(t,HI))}let Wg={categories:pc,url:vr,version:Nt,uid:Nt},Kg={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){switch(e){case"TRUE":return!0;case"FALSE":return!1;default:return!1}},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){let t=parseFloat(e);return mc(t)?0:t},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){let t=parseInt(e);return mc(t)?0:t},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.slice(0,3)+e.slice(4,6):e.slice(0,3)+e.slice(4,6)+e.slice(7,9)},fromICAL:function(e){return e.length<6?e.slice(0,3)+":"+e.slice(3,5):e.slice(0,3)+":"+e.slice(3,5)+":"+e.slice(5,7)},decorate:function(e){return ca.fromString(e)},undecorate:function(e){return e.toString()}}},FI={cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}};const sr=Yo(Kg,{text:Vp(YI,BI),uri:{},binary:{decorate:function(e){return Of.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,t){return ue.fromDateString(e,t)},undecorate:function(e){return e.toString()},fromICAL:function(e){return e.slice(0,4)+"-"+e.slice(4,6)+"-"+e.slice(6,8)},toICAL:function(e){let t=e.length;return t==10?e.slice(0,4)+e.slice(5,7)+e.slice(8,10):t>=19?sr["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){{let t=e.slice(0,4)+"-"+e.slice(4,6)+"-"+e.slice(6,8)+"T"+e.slice(9,11)+":"+e.slice(11,13)+":"+e.slice(13,15);return e[15]&&e[15]==="Z"&&(t+="Z"),t}},toICAL:function(e){if(e.length>=19){let a=e.slice(0,4)+e.slice(5,7)+e.slice(8,13)+e.slice(14,16)+e.slice(17,19);return e[19]&&e[19]==="Z"&&(a+="Z"),a}else return e},decorate:function(e,t){return ue.fromDateTimeString(e,t)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return tr.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){let t=e.split("/");return t[0]=sr["date-time"].fromICAL(t[0]),tr.isValueString(t[1])||(t[1]=sr["date-time"].fromICAL(t[1])),t},toICAL:function(e){return e=e.slice(),e[0]=sr["date-time"].toICAL(e[0]),tr.isValueString(e[1])||(e[1]=sr["date-time"].toICAL(e[1])),e.join("/")},decorate:function(e,t){return ei.fromJSON(e,t,!1)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return er._stringToData(e,!0)},toICAL:function(e){let t="";for(let[a,i]of Object.entries(e))a=="until"?i.length>10?i=sr["date-time"].toICAL(i):i=sr.date.toICAL(i):a=="wkst"?typeof i=="number"&&(i=er.numericDayToIcalDay(i)):Array.isArray(i)&&(i=i.join(",")),t+=a.toUpperCase()+"="+i+";";return t.slice(0,Math.max(0,t.length-1))},decorate:function(t){return er.fromData(t)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;let t=e.slice(0,2)+":"+e.slice(2,4)+":"+e.slice(4,6);return e[6]==="Z"&&(t+="Z"),t},toICAL:function(e){if(e.length<8)return e;let t=e.slice(0,2)+e.slice(3,5)+e.slice(6,8);return e[8]==="Z"&&(t+="Z"),t}}});let GI=Yo(Wg,{action:Nt,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:Nt,class:Nt,comment:Nt,completed:td,contact:Nt,created:td,description:Nt,dtend:ed,dtstamp:td,dtstart:ed,due:ed,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:Sw,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":td,location:Nt,method:Nt,organizer:{defaultType:"cal-address"},"percent-complete":Ju,priority:Ju,prodid:Nt,"related-to":Nt,repeat:Ju,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return e.indexOf("/")!==-1?"period":e.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":ed,resources:pc,"request-status":Fd,rrule:Sw,sequence:Ju,status:Nt,summary:Nt,transp:Nt,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:ww,tzoffsetto:ww,tzurl:vr,tzid:Nt,tzname:Nt});const Or=Yo(Kg,{text:Vp(xw,bw),uri:Vp(xw,bw),date:{decorate:function(e){return qi.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return e.length==8?sr.date.fromICAL(e):e[0]=="-"&&e.length==6?e.slice(0,4)+"-"+e.slice(4):e},toICAL:function(e){return e.length==10?sr.date.toICAL(e):e[0]=="-"&&e.length==7?e.slice(0,4)+e.slice(5):e}},time:{decorate:function(e){return qi.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){let t=Or.time._splitZone(e,!0),a=t[0],i=t[1];return i.length==6?i=i.slice(0,2)+":"+i.slice(2,4)+":"+i.slice(4,6):i.length==4&&i[0]!="-"?i=i.slice(0,2)+":"+i.slice(2,4):i.length==5&&(i=i.slice(0,3)+":"+i.slice(3,5)),a.length==5&&(a[0]=="-"||a[0]=="+")&&(a=a.slice(0,3)+":"+a.slice(3)),i+a},toICAL:function(e){let t=Or.time._splitZone(e),a=t[0],i=t[1];return i.length==8?i=i.slice(0,2)+i.slice(3,5)+i.slice(6,8):i.length==5&&i[0]!="-"?i=i.slice(0,2)+i.slice(3,5):i.length==6&&(i=i.slice(0,3)+i.slice(4,6)),a.length==6&&(a[0]=="-"||a[0]=="+")&&(a=a.slice(0,3)+a.slice(4)),i+a},_splitZone:function(e,t){let a=e.length-1,i=e.length-(t?5:6),s=e[i],l,d;return e[a]=="Z"?(l=e[a],d=e.slice(0,Math.max(0,a))):e.length>6&&(s=="-"||s=="+")?(l=e.slice(i),d=e.slice(0,Math.max(0,i))):(l="",d=e),[l,d]}},"date-time":{decorate:function(e){return qi.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return Or["date-and-or-time"].fromICAL(e)},toICAL:function(e){return Or["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return qi.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){let t=e.split("T");return(t[0]?Or.date.fromICAL(t[0]):"")+(t[1]?"T"+Or.time.fromICAL(t[1]):"")},toICAL:function(e){let t=e.split("T");return Or.date.toICAL(t[0])+(t[1]?"T"+Or.time.toICAL(t[1]):"")}},timestamp:sr["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(e){return Array.from(e).filter(function(t){return t==="\\"?void 0:t}).join("")},toICAL:function(e){return Array.from(e).map(function(t){return t===","||t===";"?"\\"+t:t}).join("")}}});let qI={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},WI=Yo(Wg,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:Ew,bday:Ew,caladruri:vr,caluri:vr,clientpidmap:Fd,email:Nt,fburl:vr,fn:Nt,gender:Fd,geo:vr,impp:vr,key:vr,kind:Nt,lang:{defaultType:"language-tag"},logo:vr,member:vr,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:pc,note:Nt,org:{defaultType:"text",structuredValue:";"},photo:vr,related:vr,rev:{defaultType:"timestamp"},role:Nt,sound:vr,source:vr,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:Nt,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:Nt}),KI=Yo(Kg,{binary:sr.binary,date:Or.date,"date-time":Or["date-time"],"phone-number":Or["phone-number"],uri:sr.uri,text:Or.text,time:sr.time,vcard:sr.text,"utc-offset":{toICAL:function(e){return e.slice(0,7)},fromICAL:function(e){return e.slice(0,7)},decorate:function(e){return ca.fromString(e)},undecorate:function(e){return e.toString()}}}),$I={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},XI=Yo(Wg,{fn:Nt,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:pc,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return e.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:Nt,tel:{defaultType:"phone-number"},email:Nt,mailer:Nt,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:Nt,role:Nt,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:Fd,note:pc,prodid:Nt,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return e.indexOf("T")===-1?"date":"date-time"}},"sort-string":Nt,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:Nt,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),Za={name:"ical",value:sr,param:FI,property:GI,propertyGroups:!1},Cw={name:"vcard4",value:Or,param:qI,property:WI,propertyGroups:!0},Tw={name:"vcard3",value:KI,param:$I,property:XI,propertyGroups:!0};const pn={strict:!0,defaultSet:Za,defaultType:"unknown",components:{vcard:Cw,vcard3:Tw,vevent:Za,vtodo:Za,vjournal:Za,valarm:Za,vtimezone:Za,daylight:Za,standard:Za},icalendar:Za,vcard:Cw,vcard3:Tw,getDesignSet:function(e){return e&&e in pn.components?pn.components[e]:pn.defaultSet}},Sd=`\r
|
|
61
|
+
`,Rw="unknown",QI={'"':"^'","\n":"^n","^":"^^"};function cn(e){typeof e[0]=="string"&&(e=[e]);let t=0,a=e.length,i="";for(;t<a;t++)i+=cn.component(e[t])+Sd;return i}cn.component=function(e,t){let a=e[0].toUpperCase(),i="BEGIN:"+a+Sd,s=e[1],l=0,d=s.length,f=e[0];for(f==="vcard"&&e[1].length>0&&!(e[1][0][0]==="version"&&e[1][0][3]==="4.0")&&(f="vcard3"),t=t||pn.getDesignSet(f);l<d;l++)i+=cn.property(s[l],t)+Sd;let p=e[2]||[],m=0,y=p.length;for(;m<y;m++)i+=cn.component(p[m],t)+Sd;return i+="END:"+a,i};cn.property=function(e,t,a){let i=e[0].toUpperCase(),s=e[0],l=e[1];t||(t=pn.defaultSet);let d=l.group,f;t.propertyGroups&&d?f=d.toUpperCase()+"."+i:f=i;for(let[b,C]of Object.entries(l)){if(t.propertyGroups&&b=="group")continue;let E=t.param[b],T=E&&E.multiValue;T&&Array.isArray(C)?(C=C.map(function(N){return N=cn._rfc6868Unescape(N),N=cn.paramPropertyValue(N,E.multiValueSeparateDQuote),N}),C=cn.multiValue(C,T,"unknown",null,t)):(C=cn._rfc6868Unescape(C),C=cn.paramPropertyValue(C)),f+=";"+b.toUpperCase()+"="+C}if(e.length===3)return f+":";let p=e[2],m,y=!1,v=!1,w=!1;return s in t.property?(m=t.property[s],"multiValue"in m&&(y=m.multiValue),"structuredValue"in m&&Array.isArray(e[3])&&(v=m.structuredValue),"defaultType"in m?p===m.defaultType&&(w=!0):p===Rw&&(w=!0)):p===Rw&&(w=!0),w||(f+=";VALUE="+p.toUpperCase()),f+=":",y&&v?f+=cn.multiValue(e[3],v,p,y,t,v):y?f+=cn.multiValue(e.slice(3),y,p,null,t,!1):v?f+=cn.multiValue(e[3],v,p,null,t,v):f+=cn.value(e[3],p,t,!1),a?f:bC(f)};cn.paramPropertyValue=function(e,t){return!t&&e.indexOf(",")===-1&&e.indexOf(":")===-1&&e.indexOf(";")===-1?e:'"'+e+'"'};cn.multiValue=function(e,t,a,i,s,l){let d="",f=e.length,p=0;for(;p<f;p++)i&&Array.isArray(e[p])?d+=cn.multiValue(e[p],i,a,null,s,l):d+=cn.value(e[p],a,s,l),p!==f-1&&(d+=t);return d};cn.value=function(e,t,a,i){return t in a.value&&"toICAL"in a.value[t]?a.value[t].toICAL(e,i):e};cn._rfc6868Unescape=function(e){return e.replace(/[\n^"]/g,function(t){return QI[t]})};const Nw=0,nd=1,rd=2,Ii=3;class jo{static fromString(t,a){return new jo(kt.property(t,a))}constructor(t,a){this._parent=a||null,typeof t=="string"?(this.jCal=[t,{},pn.defaultType],this.jCal[rd]=this.getDefaultType()):this.jCal=t,this._updateType()}get type(){return this.jCal[rd]}get name(){return this.jCal[Nw]}get parent(){return this._parent}set parent(t){let a=!this._parent||t&&t._designSet!=this._parent._designSet;this._parent=t,this.type==pn.defaultType&&a&&(this.jCal[rd]=this.getDefaultType(),this._updateType())}get _designSet(){return this.parent?this.parent._designSet:pn.defaultSet}_updateType(){let t=this._designSet;this.type in t.value&&("decorate"in t.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in t.property&&(this.isMultiValue="multiValue"in t.property[this.name],this.isStructuredValue="structuredValue"in t.property[this.name]))}_hydrateValue(t){return this._values&&this._values[t]?this._values[t]:this.jCal.length<=Ii+t?null:this.isDecorated?(this._values||(this._values=[]),this._values[t]=this._decorate(this.jCal[Ii+t])):this.jCal[Ii+t]}_decorate(t){return this._designSet.value[this.type].decorate(t,this)}_undecorate(t){return this._designSet.value[this.type].undecorate(t,this)}_setDecoratedValue(t,a){this._values||(this._values=[]),typeof t=="object"&&"icaltype"in t?(this.jCal[Ii+a]=this._undecorate(t),this._values[a]=t):(this.jCal[Ii+a]=t,this._values[a]=this._decorate(t))}getParameter(t){if(t in this.jCal[nd])return this.jCal[nd][t]}getFirstParameter(t){let a=this.getParameter(t);return Array.isArray(a)?a[0]:a}setParameter(t,a){let i=t.toLowerCase();typeof a=="string"&&i in this._designSet.param&&"multiValue"in this._designSet.param[i]&&(a=[a]),this.jCal[nd][t]=a}removeParameter(t){delete this.jCal[nd][t]}getDefaultType(){let t=this.jCal[Nw],a=this._designSet;if(t in a.property){let i=a.property[t];if("defaultType"in i)return i.defaultType}return pn.defaultType}resetType(t){this.removeAllValues(),this.jCal[rd]=t,this._updateType()}getFirstValue(){return this._hydrateValue(0)}getValues(){let t=this.jCal.length-Ii;if(t<1)return[];let a=0,i=[];for(;a<t;a++)i[a]=this._hydrateValue(a);return i}removeAllValues(){this._values&&(this._values.length=0),this.jCal.length=3}setValues(t){if(!this.isMultiValue)throw new Error(this.name+`: does not not support mulitValue.
|
|
62
|
+
override isMultiValue`);let a=t.length,i=0;if(this.removeAllValues(),a>0&&typeof t[0]=="object"&&"icaltype"in t[0]&&this.resetType(t[0].icaltype),this.isDecorated)for(;i<a;i++)this._setDecoratedValue(t[i],i);else for(;i<a;i++)this.jCal[Ii+i]=t[i]}setValue(t){this.removeAllValues(),typeof t=="object"&&"icaltype"in t&&this.resetType(t.icaltype),this.isDecorated?this._setDecoratedValue(t,0):this.jCal[Ii]=t}toJSON(){return this.jCal}toICALString(){return cn.property(this.jCal,this._designSet,!0)}}const zi=0,xa=1,Ui=2,ZI=0,JI=3;class _r{static fromString(t){return new _r(kt.component(t))}constructor(t,a){typeof t=="string"&&(t=[t,[],[]]),this.jCal=t,this.parent=a||null,!this.parent&&this.name==="vcalendar"&&(this._timezoneCache=new Map)}_hydratedPropertyCount=0;_hydratedComponentCount=0;_timezoneCache=null;_components=null;_properties=null;get name(){return this.jCal[zi]}get _designSet(){let t=this.parent&&this.parent._designSet;if(!t&&this.name=="vcard"){let a=this.jCal[xa]?.[0];if(a&&a[ZI]=="version"&&a[JI]=="3.0")return pn.getDesignSet("vcard3")}return t||pn.getDesignSet(this.name)}_hydrateComponent(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];let a=new _r(this.jCal[Ui][t],this);return this._hydratedComponentCount++,this._components[t]=a}_hydrateProperty(t){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[t])return this._properties[t];let a=new jo(this.jCal[xa][t],this);return this._hydratedPropertyCount++,this._properties[t]=a}getFirstSubcomponent(t){if(t){let a=0,i=this.jCal[Ui],s=i.length;for(;a<s;a++)if(i[a][zi]===t)return this._hydrateComponent(a)}else if(this.jCal[Ui].length)return this._hydrateComponent(0);return null}getAllSubcomponents(t){let a=this.jCal[Ui].length,i=0;if(t){let s=this.jCal[Ui],l=[];for(;i<a;i++)t===s[i][zi]&&l.push(this._hydrateComponent(i));return l}else{if(!this._components||this._hydratedComponentCount!==a)for(;i<a;i++)this._hydrateComponent(i);return this._components||[]}}hasProperty(t){let a=this.jCal[xa],i=a.length,s=0;for(;s<i;s++)if(a[s][zi]===t)return!0;return!1}getFirstProperty(t){if(t){let a=0,i=this.jCal[xa],s=i.length;for(;a<s;a++)if(i[a][zi]===t)return this._hydrateProperty(a)}else if(this.jCal[xa].length)return this._hydrateProperty(0);return null}getFirstPropertyValue(t){let a=this.getFirstProperty(t);return a?a.getFirstValue():null}getAllProperties(t){let a=this.jCal[xa].length,i=0;if(t){let s=this.jCal[xa],l=[];for(;i<a;i++)t===s[i][zi]&&l.push(this._hydrateProperty(i));return l}else{if(!this._properties||this._hydratedPropertyCount!==a)for(;i<a;i++)this._hydrateProperty(i);return this._properties||[]}}_removeObjectByIndex(t,a,i){if(a=a||[],a[i]){let s=a[i];"parent"in s&&(s.parent=null)}a.splice(i,1),this.jCal[t].splice(i,1)}_removeObject(t,a,i){let s=0,l=this.jCal[t],d=l.length,f=this[a];if(typeof i=="string"){for(;s<d;s++)if(l[s][zi]===i)return this._removeObjectByIndex(t,f,s),!0}else if(f){for(;s<d;s++)if(f[s]&&f[s]===i)return this._removeObjectByIndex(t,f,s),!0}return!1}_removeAllObjects(t,a,i){let s=this[a],l=this.jCal[t],d=l.length-1;for(;d>=0;d--)(!i||l[d][zi]===i)&&this._removeObjectByIndex(t,s,d)}addSubcomponent(t){this._components||(this._components=[],this._hydratedComponentCount=0),t.parent&&t.parent.removeSubcomponent(t);let a=this.jCal[Ui].push(t.jCal);return this._components[a-1]=t,this._hydratedComponentCount++,t.parent=this,t}removeSubcomponent(t){let a=this._removeObject(Ui,"_components",t);return a&&this._hydratedComponentCount--,a}removeAllSubcomponents(t){let a=this._removeAllObjects(Ui,"_components",t);return this._hydratedComponentCount=0,a}addProperty(t){if(!(t instanceof jo))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),t.parent&&t.parent.removeProperty(t);let a=this.jCal[xa].push(t.jCal);return this._properties[a-1]=t,this._hydratedPropertyCount++,t.parent=this,t}addPropertyWithValue(t,a){let i=new jo(t);return i.setValue(a),this.addProperty(i),i}updatePropertyWithValue(t,a){let i=this.getFirstProperty(t);return i?i.setValue(a):i=this.addPropertyWithValue(t,a),i}removeProperty(t){let a=this._removeObject(xa,"_properties",t);return a&&this._hydratedPropertyCount--,a}removeAllProperties(t){let a=this._removeAllObjects(xa,"_properties",t);return this._hydratedPropertyCount=0,a}toJSON(){return this.jCal}toString(){return cn.component(this.jCal,this._designSet)}getTimeZoneByID(t){if(this.parent)return this.parent.getTimeZoneByID(t);if(!this._timezoneCache)return null;if(this._timezoneCache.has(t))return this._timezoneCache.get(t);const a=this.getAllSubcomponents("vtimezone");for(const i of a)if(i.getFirstProperty("tzid").getFirstValue()===t){const s=new We({component:i,tzid:t});return this._timezoneCache.set(t,s),s}return null}}class SC{constructor(t){this.ruleDates=[],this.exDates=[],this.fromData(t)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(t){let a=ti(t.dtstart,ue);if(a)this.dtstart=a;else throw new Error(".dtstart (ICAL.Time) must be given");if(t.component)this._init(t.component);else{if(this.last=ti(t.last,ue)||a.clone(),!t.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=t.ruleIterators.map(function(i){return ti(i,ba)}),this.ruleDateInc=t.ruleDateInc,this.exDateInc=t.exDateInc,t.ruleDates&&(this.ruleDates=t.ruleDates.map(i=>ti(i,ue)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.exDates&&(this.exDates=t.exDates.map(i=>ti(i,ue)),this.exDate=this.exDates[this.exDateInc]),typeof t.complete<"u"&&(this.complete=t.complete)}}_compare_special(t,a){return!t.isDate&&a.isDate?new ue({year:t.year,month:t.month,day:t.day}).compare(a):t.compare(a)}next(){let t,a,i,s=500,l=0;for(;;){if(l++>s)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(a=this.ruleDate,t=this._nextRecurrenceIter(this.last),!a&&!t){this.complete=!0;break}if((!a||t&&a.compare(t.last)>0)&&(a=t.last.clone(),t.next()),this.ruleDate===a&&this._nextRuleDay(),this.last=a,this.exDate&&(i=this._compare_special(this.last,this.exDate),i>0&&this._nextExDay(),i===0)){this._nextExDay();continue}return this.last}}toJSON(){function t(i){return i.toJSON()}let a=Object.create(null);return a.ruleIterators=this.ruleIterators.map(t),this.ruleDates&&(a.ruleDates=this.ruleDates.map(t)),this.exDates&&(a.exDates=this.exDates.map(t)),a.ruleDateInc=this.ruleDateInc,a.exDateInc=this.exDateInc,a.last=this.last.toJSON(),a.dtstart=this.dtstart.toJSON(),a.complete=this.complete,a}_extractDates(t,a){let i=[],s=t.getAllProperties(a);for(let l=0,d=s.length;l<d;l++)for(let f of s[l].getValues()){let p=Oo(i,f,(m,y)=>m.compare(y));i.splice(p,0,f)}return i}_init(t){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!t.hasProperty("rdate")&&!t.hasProperty("rrule")&&!t.hasProperty("recurrence-id")){this.ruleDate=this.last.clone(),this.complete=!0;return}if(t.hasProperty("rdate")&&(this.ruleDates=this._extractDates(t,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=Oo(this.ruleDates,this.last,(a,i)=>a.compare(i)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.hasProperty("rrule")){let a=t.getAllProperties("rrule"),i=0,s=a.length,l,d;for(;i<s;i++)l=a[i].getFirstValue(),d=l.iterator(this.dtstart),this.ruleIterators.push(d),d.next()}t.hasProperty("exdate")&&(this.exDates=this._extractDates(t,"exdate"),this.exDateInc=Oo(this.exDates,this.last,this._compare_special),this.exDate=this.exDates[this.exDateInc])}_nextExDay(){this.exDate=this.exDates[++this.exDateInc]}_nextRuleDay(){this.ruleDate=this.ruleDates[++this.ruleDateInc]}_nextRecurrenceIter(){let t=this.ruleIterators;if(t.length===0)return null;let a=t.length,i,s,l=0,d;for(;l<a;l++){if(i=t[l],s=i.last,i.completed){a--,l!==0&&l--,t.splice(l,1);continue}(!d||d.last.compare(s)>0)&&(d=i)}return d}}let EC=class Fp{constructor(t,a){t instanceof _r||(a=t,t=null),t?this.component=t:this.component=new _r("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],a&&a.strictExceptions&&(this.strictExceptions=a.strictExceptions),a&&a.exceptions?a.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(i){i.hasProperty("recurrence-id")&&this.relateException(i)},this)}static THISANDFUTURE="THISANDFUTURE";exceptions=null;strictExceptions=!1;relateException(t){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(t instanceof _r&&(t=new Fp(t)),this.strictExceptions&&t.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let a=t.recurrenceId.toString();if(this.exceptions[a]=t,t.modifiesFuture()){let i=[t.recurrenceId.toUnixTime(),a],s=Oo(this.rangeExceptions,i,Aw);this.rangeExceptions.splice(s,0,i)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===Fp.THISANDFUTURE:!1}findRangeException(t){if(!this.rangeExceptions.length)return null;let a=t.toUnixTime(),i=Oo(this.rangeExceptions,[a],Aw);if(i-=1,i<0)return null;let s=this.rangeExceptions[i];return a<s[0]?null:s[1]}getOccurrenceDetails(t){let a=t.toString(),i=t.convertToZone(We.utcTimezone).toString(),s,l={recurrenceId:t};if(a in this.exceptions)s=l.item=this.exceptions[a],l.startDate=s.startDate,l.endDate=s.endDate,l.item=s;else if(i in this.exceptions)s=this.exceptions[i],l.startDate=s.startDate,l.endDate=s.endDate,l.item=s;else{let d=this.findRangeException(t),f;if(d){let p=this.exceptions[d];l.item=p;let m=this._rangeExceptionCache[d];if(!m){let v=p.recurrenceId.clone(),w=p.startDate.clone();v.zone=w.zone,m=w.subtractDate(v),this._rangeExceptionCache[d]=m}let y=t.clone();y.zone=p.startDate.zone,y.addDuration(m),f=y.clone(),f.addDuration(p.duration),l.startDate=y,l.endDate=f}else f=t.clone(),f.addDuration(this.duration),l.endDate=f,l.startDate=t,l.item=this}return l}iterator(t){return new SC({component:this.component,dtstart:t||this.startDate})}isRecurring(){let t=this.component;return t.hasProperty("rrule")||t.hasProperty("rdate")}isRecurrenceException(){return this.component.hasProperty("recurrence-id")}getRecurrenceTypes(){let t=this.component.getAllProperties("rrule"),a=0,i=t.length,s=Object.create(null);for(;a<i;a++){let l=t[a].getFirstValue();s[l.freq]=!0}return s}get uid(){return this._firstProp("uid")}set uid(t){this._setProp("uid",t)}get startDate(){return this._firstProp("dtstart")}set startDate(t){this._setTime("dtstart",t)}get endDate(){let t=this._firstProp("dtend");if(!t){let a=this._firstProp("duration");t=this.startDate.clone(),a?t.addDuration(a):t.isDate&&(t.day+=1)}return t}set endDate(t){this.component.hasProperty("duration")&&this.component.removeProperty("duration"),this._setTime("dtend",t)}get duration(){let t=this._firstProp("duration");return t||this.endDate.subtractDateTz(this.startDate)}set duration(t){this.component.hasProperty("dtend")&&this.component.removeProperty("dtend"),this._setProp("duration",t)}get location(){return this._firstProp("location")}set location(t){this._setProp("location",t)}get attendees(){return this.component.getAllProperties("attendee")}get summary(){return this._firstProp("summary")}set summary(t){this._setProp("summary",t)}get description(){return this._firstProp("description")}set description(t){this._setProp("description",t)}get color(){return this._firstProp("color")}set color(t){this._setProp("color",t)}get organizer(){return this._firstProp("organizer")}set organizer(t){this._setProp("organizer",t)}get sequence(){return this._firstProp("sequence")}set sequence(t){this._setProp("sequence",t)}get recurrenceId(){return this._firstProp("recurrence-id")}set recurrenceId(t){this._setTime("recurrence-id",t)}_setTime(t,a){let i=this.component.getFirstProperty(t);i||(i=new jo(t),this.component.addProperty(i)),a.zone===We.localTimezone||a.zone===We.utcTimezone?i.removeParameter("tzid"):i.setParameter("tzid",a.zone.tzid),i.setValue(a)}_setProp(t,a){this.component.updatePropertyWithValue(t,a)}_firstProp(t){return this.component.getFirstPropertyValue(t)}toString(){return this.component.toString()}};function Aw(e,t){return e[0]>t[0]?1:t[0]>e[0]?-1:0}class e3{constructor(t){typeof t>"u"&&(t={});for(let[a,i]of Object.entries(t))this[a]=i}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(t){};ontimezone=function(t){};onevent=function(t){};process(t){typeof t=="string"&&(t=kt(t)),t instanceof _r||(t=new _r(t));let a=t.getAllSubcomponents(),i=0,s=a.length,l;for(;i<s;i++)switch(l=a[i],l.name){case"vtimezone":if(this.parseTimezone){let d=l.getFirstPropertyValue("tzid");d&&this.ontimezone(new We({tzid:d,component:l}))}break;case"vevent":this.parseEvent&&this.onevent(new EC(l));break;default:continue}this.oncomplete()}}var No={foldLength:75,debug:!1,newLineChar:`\r
|
|
63
|
+
`,Binary:Of,Component:_r,ComponentParser:e3,Duration:tr,Event:EC,Period:ei,Property:jo,Recur:er,RecurExpansion:SC,RecurIterator:ba,Time:ue,Timezone:We,TimezoneService:Vd,UtcOffset:ca,VCardTime:qi,parse:kt,stringify:cn,design:pn,helpers:II};function t3(){return"/proxy"}async function n3(e){try{const a=`${t3()}?url=${encodeURIComponent(e)}`,i=await fetch(a,{method:"GET",headers:{Accept:"application/json"}});if(!i.ok)throw new Error(`Proxy returned status ${i.status}`);const s=await i.json();if(!s.success){const l=s.error||"Failed to fetch ICS data",d=s.details?` (${s.details})`:"",f=s.upstreamStatus?` [Upstream: ${s.upstreamStatus} ${s.upstreamStatusText}]`:"";throw new Error(`${l}${d}${f}`)}if(!s.data)throw new Error("Proxy returned success but no data");return s.data}catch(t){throw t instanceof Error?new Error(`Failed to fetch ICS: ${t.message}`):new Error("Failed to fetch ICS file")}}function r3(e){try{const t=No.parse(e),i=new No.Component(t).getAllSubcomponents("vevent");let s=null;const l=i.map(d=>{const f=new No.Event(d);try{const E=d.getFirstProperty("dtstamp");if(E){const T=E.getFirstValue();if(T&&T instanceof No.Time){const N=T.toJSDate().getTime();(!s||N>s)&&(s=N)}}}catch(E){console.warn("Failed to extract DTSTAMP from event:",E)}const p=f.summary||"Untitled Event",m=f.description||"",y=f.location||"",v=f.startDate.toJSDate(),w=f.endDate.toJSDate(),b=f.startDate.isDate||!1;return{id:f.uid||`${v.getTime()}-${p}`,title:p,description:m,location:y,startDate:v,endDate:w,isAllDay:b}});return l.sort((d,f)=>d.startDate.getTime()-f.startDate.getTime()),{events:l,calendarLastUpdated:s}}catch(t){throw t instanceof Error?new Error(`Failed to parse ICS: ${t.message}`):new Error("Failed to parse ICS data")}}function CC(e){try{const t=new URL(e);if(!["http:","https:"].includes(t.protocol))return!1;const a=t.pathname.toLowerCase(),i=a.endsWith(".ics"),s=a.includes("ical")||a.includes("calendar");return i||s}catch{return!1}}function a3(e){return e.startsWith("webcal://")?e.replace("webcal://","https://"):e}async function i3(e){const t=a3(e);if(!CC(t))throw new Error("Invalid ICS URL format");const a=await n3(t);return r3(a)}const TC=6048e5,o3=864e5,s3=6e4,ad=43200,Dw=1440,Ow=Symbol.for("constructDateFrom");function ua(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ow in e?e[Ow](t):e instanceof Date?new e.constructor(t):new Date(t)}function dn(e,t){return ua(t||e,e)}function RC(e,t,a){const i=dn(e,a?.in);return isNaN(t)?ua(e,NaN):(t&&i.setDate(i.getDate()+t),i)}let l3={};function Rc(){return l3}function Us(e,t){const a=Rc(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=dn(e,t?.in),l=s.getDay(),d=(l<i?7:0)+l-i;return s.setDate(s.getDate()-d),s.setHours(0,0,0,0),s}function Gd(e,t){return Us(e,{...t,weekStartsOn:1})}function NC(e,t){const a=dn(e,t?.in),i=a.getFullYear(),s=ua(a,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const l=Gd(s),d=ua(a,0);d.setFullYear(i,0,4),d.setHours(0,0,0,0);const f=Gd(d);return a.getTime()>=l.getTime()?i+1:a.getTime()>=f.getTime()?i:i-1}function qd(e){const t=dn(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Nc(e,...t){const a=ua.bind(null,e||t.find(i=>typeof i=="object"));return t.map(a)}function Wd(e,t){const a=dn(e,t?.in);return a.setHours(0,0,0,0),a}function c3(e,t,a){const[i,s]=Nc(a?.in,e,t),l=Wd(i),d=Wd(s),f=+l-qd(l),p=+d-qd(d);return Math.round((f-p)/o3)}function u3(e,t){const a=NC(e,t),i=ua(e,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),Gd(i)}function d3(e,t,a){return RC(e,t*7,a)}function Ed(e,t){const a=+dn(e)-+dn(t);return a<0?-1:a>0?1:a}function $g(e){return ua(e,Date.now())}function AC(e,t,a){const[i,s]=Nc(a?.in,e,t);return+Wd(i)==+Wd(s)}function f3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function h3(e){return!(!f3(e)&&typeof e!="number"||isNaN(+dn(e)))}function m3(e,t,a){const[i,s]=Nc(a?.in,e,t),l=i.getFullYear()-s.getFullYear(),d=i.getMonth()-s.getMonth();return l*12+d}function DC(e){return t=>{const i=(e?Math[e]:Math.trunc)(t);return i===0?0:i}}function OC(e,t){return+dn(e)-+dn(t)}function p3(e,t,a){const i=OC(e,t)/s3;return DC(a?.roundingMethod)(i)}function g3(e,t){const a=dn(e,t?.in);return a.setHours(23,59,59,999),a}function y3(e,t){const a=dn(e,t?.in),i=a.getMonth();return a.setFullYear(a.getFullYear(),i+1,0),a.setHours(23,59,59,999),a}function v3(e,t){const a=dn(e,t?.in);return+g3(a,t)==+y3(a,t)}function x3(e,t,a){const[i,s,l]=Nc(a?.in,e,e,t),d=Ed(s,l),f=Math.abs(m3(s,l));if(f<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-d*f);let p=Ed(s,l)===-d;v3(i)&&f===1&&Ed(i,l)===1&&(p=!1);const m=d*(f-+p);return m===0?0:m}function b3(e,t,a){const i=OC(e,t)/1e3;return DC(a?.roundingMethod)(i)}function w3(e,t){const a=dn(e,t?.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}function S3(e,t){const a=t?.weekStartsOn,i=dn(e,t?.in),s=i.getDay(),l=(s<a?-7:0)+6-(s-a);return i.setDate(i.getDate()+l),i.setHours(23,59,59,999),i}const E3={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"}},C3=(e,t,a)=>{let i;const s=E3[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+i:i+" ago":i};function pp(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const T3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},R3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},N3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A3={date:pp({formats:T3,defaultWidth:"full"}),time:pp({formats:R3,defaultWidth:"full"}),dateTime:pp({formats:N3,defaultWidth:"full"})},D3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},O3=(e,t,a,i)=>D3[e];function Vl(e){return(t,a)=>{const i=a?.context?String(a.context):"standalone";let s;if(i==="formatting"&&e.formattingValues){const d=e.defaultFormattingWidth||e.defaultWidth,f=a?.width?String(a.width):d;s=e.formattingValues[f]||e.formattingValues[d]}else{const d=e.defaultWidth,f=a?.width?String(a.width):e.defaultWidth;s=e.values[f]||e.values[d]}const l=e.argumentCallback?e.argumentCallback(t):t;return s[l]}}const j3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},M3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_3={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"]},k3={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"]},L3={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"}},I3={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"}},z3=(e,t)=>{const a=Number(e),i=a%100;if(i>20||i<10)switch(i%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},U3={ordinalNumber:z3,era:Vl({values:j3,defaultWidth:"wide"}),quarter:Vl({values:M3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vl({values:_3,defaultWidth:"wide"}),day:Vl({values:k3,defaultWidth:"wide"}),dayPeriod:Vl({values:L3,defaultWidth:"wide",formattingValues:I3,defaultFormattingWidth:"wide"})};function Fl(e){return(t,a={})=>{const i=a.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],l=t.match(s);if(!l)return null;const d=l[0],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],p=Array.isArray(f)?Y3(f,v=>v.test(d)):P3(f,v=>v.test(d));let m;m=e.valueCallback?e.valueCallback(p):p,m=a.valueCallback?a.valueCallback(m):m;const y=t.slice(d.length);return{value:m,rest:y}}}function P3(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function Y3(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function B3(e){return(t,a={})=>{const i=t.match(e.matchPattern);if(!i)return null;const s=i[0],l=t.match(e.parsePattern);if(!l)return null;let d=e.valueCallback?e.valueCallback(l[0]):l[0];d=a.valueCallback?a.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}const H3=/^(\d+)(th|st|nd|rd)?/i,V3=/\d+/i,F3={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},G3={any:[/^b/i,/^(a|c)/i]},q3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},W3={any:[/1/i,/2/i,/3/i,/4/i]},K3={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},$3={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]},X3={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},Q3={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]},Z3={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},J3={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}},ez={ordinalNumber:B3({matchPattern:H3,parsePattern:V3,valueCallback:e=>parseInt(e,10)}),era:Fl({matchPatterns:F3,defaultMatchWidth:"wide",parsePatterns:G3,defaultParseWidth:"any"}),quarter:Fl({matchPatterns:q3,defaultMatchWidth:"wide",parsePatterns:W3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fl({matchPatterns:K3,defaultMatchWidth:"wide",parsePatterns:$3,defaultParseWidth:"any"}),day:Fl({matchPatterns:X3,defaultMatchWidth:"wide",parsePatterns:Q3,defaultParseWidth:"any"}),dayPeriod:Fl({matchPatterns:Z3,defaultMatchWidth:"any",parsePatterns:J3,defaultParseWidth:"any"})},jC={code:"en-US",formatDistance:C3,formatLong:A3,formatRelative:O3,localize:U3,match:ez,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tz(e,t){const a=dn(e,t?.in);return c3(a,w3(a))+1}function nz(e,t){const a=dn(e,t?.in),i=+Gd(a)-+u3(a);return Math.round(i/TC)+1}function MC(e,t){const a=dn(e,t?.in),i=a.getFullYear(),s=Rc(),l=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,d=ua(t?.in||e,0);d.setFullYear(i+1,0,l),d.setHours(0,0,0,0);const f=Us(d,t),p=ua(t?.in||e,0);p.setFullYear(i,0,l),p.setHours(0,0,0,0);const m=Us(p,t);return+a>=+f?i+1:+a>=+m?i:i-1}function rz(e,t){const a=Rc(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=MC(e,t),l=ua(t?.in||e,0);return l.setFullYear(s,0,i),l.setHours(0,0,0,0),Us(l,t)}function az(e,t){const a=dn(e,t?.in),i=+Us(a,t)-+rz(a,t);return Math.round(i/TC)+1}function Ut(e,t){const a=e<0?"-":"",i=Math.abs(e).toString().padStart(t,"0");return a+i}const Pi={y(e,t){const a=e.getFullYear(),i=a>0?a:1-a;return Ut(t==="yy"?i%100:i,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):Ut(a+1,2)},d(e,t){return Ut(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return a==="am"?"a.m.":"p.m."}},h(e,t){return Ut(e.getHours()%12||12,t.length)},H(e,t){return Ut(e.getHours(),t.length)},m(e,t){return Ut(e.getMinutes(),t.length)},s(e,t){return Ut(e.getSeconds(),t.length)},S(e,t){const a=t.length,i=e.getMilliseconds(),s=Math.trunc(i*Math.pow(10,a-3));return Ut(s,t.length)}},Rs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jw={G:function(e,t,a){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"});case"GGGGG":return a.era(i,{width:"narrow"});default:return a.era(i,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const i=e.getFullYear(),s=i>0?i:1-i;return a.ordinalNumber(s,{unit:"year"})}return Pi.y(e,t)},Y:function(e,t,a,i){const s=MC(e,i),l=s>0?s:1-s;if(t==="YY"){const d=l%100;return Ut(d,2)}return t==="Yo"?a.ordinalNumber(l,{unit:"year"}):Ut(l,t.length)},R:function(e,t){const a=NC(e);return Ut(a,t.length)},u:function(e,t){const a=e.getFullYear();return Ut(a,t.length)},Q:function(e,t,a){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return Ut(i,2);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});default:return a.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,a){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return Ut(i,2);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});default:return a.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,a){const i=e.getMonth();switch(t){case"M":case"MM":return Pi.M(e,t);case"Mo":return a.ordinalNumber(i+1,{unit:"month"});case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});default:return a.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,a){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return Ut(i+1,2);case"Lo":return a.ordinalNumber(i+1,{unit:"month"});case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});default:return a.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,a,i){const s=az(e,i);return t==="wo"?a.ordinalNumber(s,{unit:"week"}):Ut(s,t.length)},I:function(e,t,a){const i=nz(e);return t==="Io"?a.ordinalNumber(i,{unit:"week"}):Ut(i,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Pi.d(e,t)},D:function(e,t,a){const i=tz(e);return t==="Do"?a.ordinalNumber(i,{unit:"dayOfYear"}):Ut(i,t.length)},E:function(e,t,a){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"});default:return a.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,a,i){const s=e.getDay(),l=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return Ut(l,2);case"eo":return a.ordinalNumber(l,{unit:"day"});case"eee":return a.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(s,{width:"short",context:"formatting"});default:return a.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,a,i){const s=e.getDay(),l=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return Ut(l,t.length);case"co":return a.ordinalNumber(l,{unit:"day"});case"ccc":return a.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(s,{width:"narrow",context:"standalone"});case"cccccc":return a.day(s,{width:"short",context:"standalone"});default:return a.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,a){const i=e.getDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return Ut(s,t.length);case"io":return a.ordinalNumber(s,{unit:"day"});case"iii":return a.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(i,{width:"short",context:"formatting"});default:return a.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,a){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(s,{width:"narrow",context:"formatting"});default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,a){const i=e.getHours();let s;switch(i===12?s=Rs.noon:i===0?s=Rs.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(s,{width:"narrow",context:"formatting"});default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,a){const i=e.getHours();let s;switch(i>=17?s=Rs.evening:i>=12?s=Rs.afternoon:i>=4?s=Rs.morning:s=Rs.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(s,{width:"narrow",context:"formatting"});default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let i=e.getHours()%12;return i===0&&(i=12),a.ordinalNumber(i,{unit:"hour"})}return Pi.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Pi.H(e,t)},K:function(e,t,a){const i=e.getHours()%12;return t==="Ko"?a.ordinalNumber(i,{unit:"hour"}):Ut(i,t.length)},k:function(e,t,a){let i=e.getHours();return i===0&&(i=24),t==="ko"?a.ordinalNumber(i,{unit:"hour"}):Ut(i,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Pi.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Pi.s(e,t)},S:function(e,t){return Pi.S(e,t)},X:function(e,t,a){const i=e.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return _w(i);case"XXXX":case"XX":return Co(i);default:return Co(i,":")}},x:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"x":return _w(i);case"xxxx":case"xx":return Co(i);default:return Co(i,":")}},O:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mw(i,":");default:return"GMT"+Co(i,":")}},z:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mw(i,":");default:return"GMT"+Co(i,":")}},t:function(e,t,a){const i=Math.trunc(+e/1e3);return Ut(i,t.length)},T:function(e,t,a){return Ut(+e,t.length)}};function Mw(e,t=""){const a=e>0?"-":"+",i=Math.abs(e),s=Math.trunc(i/60),l=i%60;return l===0?a+String(s):a+String(s)+t+Ut(l,2)}function _w(e,t){return e%60===0?(e>0?"-":"+")+Ut(Math.abs(e)/60,2):Co(e,t)}function Co(e,t=""){const a=e>0?"-":"+",i=Math.abs(e),s=Ut(Math.trunc(i/60),2),l=Ut(i%60,2);return a+s+t+l}const kw=(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"});default:return t.date({width:"full"})}},_C=(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"});default:return t.time({width:"full"})}},iz=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],i=a[1],s=a[2];if(!s)return kw(e,t);let l;switch(i){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",kw(i,t)).replace("{{time}}",_C(s,t))},oz={p:_C,P:iz},sz=/^D+$/,lz=/^Y+$/,cz=["D","DD","YY","YYYY"];function uz(e){return sz.test(e)}function dz(e){return lz.test(e)}function fz(e,t,a){const i=hz(e,t,a);if(console.warn(i),cz.includes(e))throw new RangeError(i)}function hz(e,t,a){const i=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pz=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gz=/^'([^]*?)'?$/,yz=/''/g,vz=/[a-zA-Z]/;function kr(e,t,a){const i=Rc(),s=i.locale??jC,l=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,d=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,f=dn(e,a?.in);if(!h3(f))throw new RangeError("Invalid time value");let p=t.match(pz).map(y=>{const v=y[0];if(v==="p"||v==="P"){const w=oz[v];return w(y,s.formatLong)}return y}).join("").match(mz).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:xz(y)};if(jw[v])return{isToken:!0,value:y};if(v.match(vz))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});s.localize.preprocessor&&(p=s.localize.preprocessor(f,p));const m={firstWeekContainsDate:l,weekStartsOn:d,locale:s};return p.map(y=>{if(!y.isToken)return y.value;const v=y.value;(dz(v)||uz(v))&&fz(v,t,String(e));const w=jw[v[0]];return w(f,v,s.localize,m)}).join("")}function xz(e){const t=e.match(gz);return t?t[1].replace(yz,"'"):e}function bz(e,t,a){const i=Rc(),s=a?.locale??i.locale??jC,l=2520,d=Ed(e,t);if(isNaN(d))throw new RangeError("Invalid time value");const f=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:d}),[p,m]=Nc(a?.in,...d>0?[t,e]:[e,t]),y=b3(m,p),v=(qd(m)-qd(p))/1e3,w=Math.round((y-v)/60);let b;if(w<2)return a?.includeSeconds?y<5?s.formatDistance("lessThanXSeconds",5,f):y<10?s.formatDistance("lessThanXSeconds",10,f):y<20?s.formatDistance("lessThanXSeconds",20,f):y<40?s.formatDistance("halfAMinute",0,f):y<60?s.formatDistance("lessThanXMinutes",1,f):s.formatDistance("xMinutes",1,f):w===0?s.formatDistance("lessThanXMinutes",1,f):s.formatDistance("xMinutes",w,f);if(w<45)return s.formatDistance("xMinutes",w,f);if(w<90)return s.formatDistance("aboutXHours",1,f);if(w<Dw){const C=Math.round(w/60);return s.formatDistance("aboutXHours",C,f)}else{if(w<l)return s.formatDistance("xDays",1,f);if(w<ad){const C=Math.round(w/Dw);return s.formatDistance("xDays",C,f)}else if(w<ad*2)return b=Math.round(w/ad),s.formatDistance("aboutXMonths",b,f)}if(b=x3(m,p),b<12){const C=Math.round(w/ad);return s.formatDistance("xMonths",C,f)}else{const C=b%12,E=Math.trunc(b/12);return C<3?s.formatDistance("aboutXYears",E,f):C<9?s.formatDistance("overXYears",E,f):s.formatDistance("almostXYears",E+1,f)}}function Lw(e,t){return bz(e,$g(e),t)}function wz(e,t){return AC(ua(e,e),$g(e))}function Sz(e,t){return AC(e,RC($g(e),1),t)}function Ez(e,t,a){const i=+dn(e,a?.in),[s,l]=[+dn(t.start,a?.in),+dn(t.end,a?.in)].sort((d,f)=>d-f);return i>=s&&i<=l}function kC(e){const a=d3(new Date,e);return{start:Us(a,{weekStartsOn:0}),end:S3(a,{weekStartsOn:0})}}function Cz(e){const{start:t,end:a}=kC(e);return t.getMonth()===a.getMonth()?`${kr(t,"MMM d")} - ${kr(a,"d")}`:`${kr(t,"MMM d")} - ${kr(a,"MMM d")}`}function Tz(e,t){const{start:a,end:i}=kC(t);return e.filter(s=>Ez(s.startDate,{start:a,end:i}))}function LC(e,t,a){if(a)return"All Day";const i=kr(e,"h:mm a"),s=kr(t,"h:mm a");return`${i} - ${s}`}function Rz(e){return kr(e,"EEEE, MMMM d, yyyy")}function Nz(e,t){const a=p3(t,e);if(a<60)return`${a} minute${a!==1?"s":""}`;const i=Math.floor(a/60),s=a%60;return s===0?`${i} hour${i!==1?"s":""}`:`${i} hour${i!==1?"s":""} ${s} minute${s!==1?"s":""}`}function Az(e){const t=new Map;return e.forEach(a=>{const i=kr(a.startDate,"yyyy-MM-dd"),s=t.get(i)||[];t.set(i,[...s,a])}),t.forEach((a,i)=>{t.set(i,a.sort((s,l)=>s.startDate.getTime()-l.startDate.getTime()))}),t}function Dz(e){return wz(e)?`Today - ${kr(e,"EEEE, MMM d")}`:Sz(e)?`Tomorrow - ${kr(e,"EEEE, MMM d")}`:kr(e,"EEEE, MMM d")}const Oz=1e5,Iw="busical_encryption_salt";function jf(){return!!(window.crypto&&window.crypto.subtle)}function IC(){return[navigator.userAgent,navigator.language,screen.width.toString(),screen.height.toString(),screen.colorDepth.toString(),new Date().getTimezoneOffset().toString(),Intl.DateTimeFormat().resolvedOptions().timeZone||""].join("|")}function jz(){let e=localStorage.getItem(Iw);if(!e){const t=new Uint8Array(16);crypto.getRandomValues(t),e=Array.from(t,a=>a.toString(16).padStart(2,"0")).join(""),localStorage.setItem(Iw,e),console.log("[BusiCal] Generated new encryption salt")}return e}function Gp(e){const t=new Uint8Array(e.length/2);for(let a=0;a<e.length;a+=2)t[a/2]=parseInt(e.substring(a,a+2),16);return t}function zw(e){return Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}async function zC(e,t){const i=new TextEncoder().encode(e),s=Gp(t),l=await crypto.subtle.importKey("raw",i,"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:s.buffer,iterations:Oz,hash:"SHA-256"},l,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Mz(e){if(!jf())throw new Error("Web Crypto API not supported");const t=IC(),a=jz(),i=await zC(t,a),s=crypto.getRandomValues(new Uint8Array(12)),d=new TextEncoder().encode(e),f=await crypto.subtle.encrypt({name:"AES-GCM",iv:s.buffer},i,d);return console.log("[BusiCal] URL encrypted successfully"),{encrypted:zw(new Uint8Array(f)),iv:zw(s),salt:a}}async function _z(e){if(!jf())throw new Error("Web Crypto API not supported");try{const t=IC(),a=await zC(t,e.salt),i=Gp(e.encrypted),s=Gp(e.iv),l=await crypto.subtle.decrypt({name:"AES-GCM",iv:s.buffer},a,i.buffer),f=new TextDecoder().decode(l);return console.log("[BusiCal] URL decrypted successfully"),f}catch(t){return console.error("[BusiCal] Decryption failed:",t),null}}function kz(e){try{const t=JSON.parse(e);return!!(t.encrypted&&t.iv&&t.salt)}catch{return!1}}const Lz=5,Zr={ICS_URL:"busical_ics_url",CACHED_EVENTS:"busical_cached_events",LAST_FETCH:"busical_last_fetch",CALENDAR_LAST_UPDATED:"busical_calendar_last_updated",GOOGLE_EMAILS:"busical_google_emails",OUTLOOK_EMAILS:"busical_outlook_emails"};async function Iz(e){try{if(!jf())throw new Error("Your browser does not support the encryption features required by BusiCal. Please use a modern browser like Chrome, Firefox, Safari, or Edge.");const t=await Mz(e);localStorage.setItem(Zr.ICS_URL,JSON.stringify(t))}catch(t){throw console.error("Failed to save ICS URL to localStorage:",t),t}}async function zz(){try{if(!jf())throw new Error("Your browser does not support the encryption features required by BusiCal. Please use a modern browser like Chrome, Firefox, Safari, or Edge.");const e=localStorage.getItem(Zr.ICS_URL);if(!e)return null;if(kz(e)){const t=JSON.parse(e),a=await _z(t);return a||(localStorage.removeItem(Zr.ICS_URL),null)}else return console.log("[BusiCal] Found plain text URL, will encrypt on next save"),e}catch(e){return console.error("Failed to get ICS URL from localStorage:",e),null}}function Uz(e){try{const t=e.map(a=>({...a,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString()}));localStorage.setItem(Zr.CACHED_EVENTS,JSON.stringify(t)),localStorage.setItem(Zr.LAST_FETCH,Date.now().toString())}catch(t){console.error("Failed to save cached events to localStorage:",t)}}function Pz(){try{const e=localStorage.getItem(Zr.CACHED_EVENTS);return e?JSON.parse(e).map(a=>({...a,startDate:new Date(a.startDate),endDate:new Date(a.endDate)})):null}catch(e){return console.error("Failed to get cached events from localStorage:",e),null}}function Yz(){try{const e=localStorage.getItem(Zr.LAST_FETCH);return e?parseInt(e,10):null}catch(e){return console.error("Failed to get last fetch timestamp:",e),null}}function Bz(e){try{e===null?localStorage.removeItem(Zr.CALENDAR_LAST_UPDATED):localStorage.setItem(Zr.CALENDAR_LAST_UPDATED,e.toString())}catch(t){console.error("Failed to save calendar last updated timestamp:",t)}}function Hz(){try{const e=localStorage.getItem(Zr.CALENDAR_LAST_UPDATED);return e?parseInt(e,10):null}catch(e){return console.error("Failed to get calendar last updated timestamp:",e),null}}function Vz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Xg(e){return e==="google"?Zr.GOOGLE_EMAILS:Zr.OUTLOOK_EMAILS}function Qg(e){try{const t=Xg(e),a=localStorage.getItem(t);return a?JSON.parse(a):[]}catch(t){return console.error("Failed to get email history:",t),[]}}function Fz(e,t){try{if(!Vz(t)){console.warn("Invalid email format, not saving to history:",t);return}const a=t.toLowerCase().trim(),s=Qg(e).filter(p=>p.toLowerCase()!==a),d=[a,...s].slice(0,Lz),f=Xg(e);localStorage.setItem(f,JSON.stringify(d))}catch(a){console.error("Failed to save email to history:",a)}}function Gz(e,t){try{const a=t.toLowerCase().trim(),s=Qg(e).filter(d=>d.toLowerCase()!==a),l=Xg(e);localStorage.setItem(l,JSON.stringify(s))}catch(a){console.error("Failed to remove email from history:",a)}}function qz(){const[e,t]=x.useState([]),[a,i]=x.useState(!1),[s,l]=x.useState(null),[d,f]=x.useState(""),[p,m]=x.useState(null),[y,v]=x.useState(null),[w,b]=x.useState(0),[C,E]=x.useState(!1),[T,N]=x.useState(!1);x.useEffect(()=>{(async()=>{try{const ne=await zz(),ae=Pz(),fe=Yz(),pe=Hz();ne&&f(ne),ae&&ae.length>0&&t(ae),fe&&m(fe),pe&&v(pe)}catch(ne){console.error("Failed to load stored data:",ne),ne instanceof Error&&ne.message.includes("encryption features")&&l(ne.message)}finally{N(!0)}})()},[]);const R=x.useCallback(async Z=>{i(!0),l(null);try{const ne=await i3(Z);t(ne.events),v(ne.calendarLastUpdated),Uz(ne.events),Bz(ne.calendarLastUpdated);const ae=Date.now();m(ae)}catch(ne){const ae=ne instanceof Error?ne.message:"Failed to load calendar";l(ae),console.error("Error fetching ICS:",ne)}finally{i(!1)}},[]),O=x.useCallback(async Z=>{try{f(Z),await Iz(Z),E(!1),await R(Z)}catch(ne){const ae=ne instanceof Error?ne.message:"Failed to save URL";l(ae),console.error("Error saving ICS URL:",ne)}},[R]),j=x.useCallback(async()=>{if(!d){l("No ICS URL configured");return}await R(d)},[d,R]),I=x.useCallback(()=>{f(""),t([]),l(null),m(null),v(null)},[]),P=x.useCallback(()=>{f(""),E(!1)},[]),A=x.useCallback(()=>{E(!0)},[]),_=Tz(e,w);return{events:e,filteredEvents:_,loading:a,error:s,icsUrl:d,lastFetch:p,calendarLastUpdated:y,weekView:w,isEditingUrl:C,isInitialized:T,setWeekView:b,setIcsUrl:O,refresh:j,clearData:I,editUrl:P,editUrlWithPreservation:A}}const UC=x.createContext(null);function Mf(){const e=x.useContext(UC);if(!e)throw new Error("useIcsDataContext must be used within an IcsDataProvider");return e}function Wz({children:e}){const t=qz();return u.jsx(UC.Provider,{value:t,children:e})}function Kz(){const{loading:e,refresh:t}=Mf();return u.jsx(EI,{onRefresh:t,loading:e})}function $z(){return u.jsx(bI,{children:u.jsx(Wz,{children:u.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[u.jsx(Kz,{}),u.jsx(TI,{}),u.jsx("main",{className:"flex-1 container mx-auto px-4 py-8 max-w-4xl",children:u.jsx(VD,{})}),u.jsx(CI,{})]})})})}function Xz({url:e,lastFetch:t,calendarLastUpdated:a,onEdit:i}){const s=w=>{try{return`${new URL(w).hostname} (••••••)`}catch{return"Protected Calendar URL (••••••)"}},l=t?Lw(t,{addSuffix:!0}):"Never",d=t?kr(t,"PPpp"):"Never synced",f=a?Lw(a,{addSuffix:!0}):null,p=a?kr(a,"PPpp"):null,m=a?Date.now()-a>1440*60*1e3:!1,y="Calendar hasn't been updated in 24+ hours. Changes may take time to appear.",v=p?`Calendar last modified: ${p}
|
|
64
|
+
App last synced: ${d}`:`App last synced: ${d}`;return u.jsx(la,{className:"p-4",children:u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx(XS,{className:"h-4 w-4 text-muted-foreground shrink-0"}),u.jsx("h3",{className:"text-sm font-medium",children:"Calendar Source"})]}),u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(gg,{className:"h-3 w-3 text-green-600 shrink-0"}),u.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s(e)})]}),u.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx(tc,{className:"h-3 w-3 shrink-0"}),f?u.jsxs("div",{className:"flex items-center gap-2",title:v,children:[m&&u.jsx("span",{title:y,children:u.jsx(jp,{className:"h-3 w-3 text-amber-500"})}),u.jsxs("span",{children:["Calendar updated ",f]}),u.jsx("span",{className:"text-muted-foreground/50",children:"•"}),u.jsxs("span",{children:["Synced ",l]})]}):u.jsxs("span",{title:v,children:["Synced ",l]})]}),u.jsxs("div",{className:"flex flex-col gap-1 sm:hidden text-xs text-muted-foreground",children:[f&&u.jsxs("div",{className:"flex items-center gap-2",title:p||void 0,children:[u.jsx(tc,{className:"h-3 w-3 shrink-0"}),m&&u.jsx("span",{title:y,children:u.jsx(jp,{className:"h-3 w-3 text-amber-500 shrink-0"})}),u.jsxs("span",{children:["Calendar updated ",f]})]}),u.jsxs("div",{className:"flex items-center gap-2",title:d,children:[!f&&u.jsx(tc,{className:"h-3 w-3 shrink-0"}),f&&u.jsx("span",{className:"w-3"}),u.jsxs("span",{children:["Synced ",l]})]})]})]}),u.jsxs(un,{variant:"outline",size:"sm",onClick:i,className:"shrink-0",children:[u.jsx(Ej,{className:"h-4 w-4 mr-2"}),"Change"]})]})})}function Qz({value:e,onChange:t}){const a=e===0,i=Cz(e);return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[u.jsxs("div",{className:"flex gap-1 shrink-0",children:[!a&&u.jsxs(un,{variant:"ghost",size:"sm",onClick:()=>t(0),className:"flex items-center gap-1.5","aria-label":"Jump to current week",children:[u.jsx(uc,{className:"h-4 w-4"}),u.jsx("span",{className:"text-xs",children:"Today"})]}),u.jsx(un,{variant:"ghost",size:"sm",onClick:()=>t(e-1),disabled:a,"aria-label":"Previous week",children:u.jsx(M0,{className:"h-4 w-4"})})]}),u.jsx("div",{className:"flex-1 text-center text-sm font-medium px-4",children:i}),u.jsx(un,{variant:"ghost",size:"sm",onClick:()=>t(e+1),"aria-label":"Next week",className:"shrink-0",children:u.jsx(_0,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"md:hidden space-y-2",children:[u.jsxs("div",{className:"flex gap-1",children:[u.jsx(un,{variant:"ghost",size:"sm",onClick:()=>t(e-1),disabled:a,"aria-label":"Previous week",children:u.jsx(M0,{className:"h-4 w-4"})}),u.jsx("div",{className:"flex-1 flex items-center justify-center px-2 text-sm font-medium",children:i}),u.jsx(un,{variant:"ghost",size:"sm",onClick:()=>t(e+1),"aria-label":"Next week",children:u.jsx(_0,{className:"h-4 w-4"})})]}),!a&&u.jsxs(un,{variant:"outline",size:"sm",onClick:()=>t(0),className:"w-full flex items-center justify-center gap-2",children:[u.jsx(uc,{className:"h-4 w-4"}),u.jsx("span",{children:"Today"})]})]})]})}function Zz({event:e,onClick:t}){const a=LC(e.startDate,e.endDate,e.isAllDay);return u.jsx(la,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:t,children:u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"flex-1 space-y-1",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[u.jsx(tc,{className:"h-4 w-4"}),u.jsx("span",{children:a})]}),u.jsx("h3",{className:"font-medium leading-snug",children:e.title||"Untitled Event"}),e.location&&u.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[u.jsx(ZS,{className:"h-4 w-4"}),u.jsx("span",{className:"truncate",children:e.location})]})]}),u.jsx(un,{variant:"ghost",size:"icon",className:"shrink-0",onClick:i=>{i.stopPropagation(),t()},children:u.jsx(XO,{className:"h-4 w-4"})})]})})}function Jz({events:e,onEventClick:t}){if(e.length===0)return u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-muted-foreground",children:"No events found for this week"})});const a=Az(e),i=Array.from(a.keys()).sort();return u.jsx("div",{className:"space-y-6",children:i.map(s=>{const l=a.get(s)||[],d=l[0],f=Dz(d.startDate);return u.jsxs("div",{children:[u.jsx("h2",{className:"text-sm font-semibold text-muted-foreground mb-3",children:f}),u.jsx("div",{className:"space-y-2",children:l.map(p=>u.jsx(Zz,{event:p,onClick:()=>t(p)},p.id))})]},s)})})}function Zg({...e}){return u.jsx(E_,{"data-slot":"dialog",...e})}function e4({...e}){return u.jsx(C_,{"data-slot":"dialog-trigger",...e})}function t4({...e}){return u.jsx(T_,{"data-slot":"dialog-portal",...e})}function n4({className:e,...t}){return u.jsx(R_,{"data-slot":"dialog-overlay",className:At("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function Jg({className:e,children:t,showCloseButton:a=!0,...i}){return u.jsxs(t4,{children:[u.jsx(n4,{}),u.jsxs(N_,{"data-slot":"dialog-content",className:At("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-6 rounded-xl p-6 text-sm ring-1 duration-100 sm:max-w-md fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2",e),...i,children:[t,a&&u.jsx(O_,{"data-slot":"dialog-close",asChild:!0,children:u.jsxs(un,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm",children:[u.jsx(ff,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Kd({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:At("gap-2 flex flex-col",e),...t})}function $d({className:e,...t}){return u.jsx(A_,{"data-slot":"dialog-title",className:At("leading-none font-medium",e),...t})}function qp({className:e,...t}){return u.jsx(D_,{"data-slot":"dialog-description",className:At("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",e),...t})}function r4({event:e,open:t,onOpenChange:a,onSync:i}){if(!e)return null;const s=LC(e.startDate,e.endDate,e.isAllDay),l=Nz(e.startDate,e.endDate);return u.jsx(Zg,{open:t,onOpenChange:a,children:u.jsxs(Jg,{className:"max-w-lg",children:[u.jsxs(Kd,{children:[u.jsx($d,{className:"text-xl",children:e.title||"Untitled Event"}),u.jsx(qp,{children:"Event details"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(uc,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),u.jsx("div",{children:u.jsx("p",{className:"font-medium",children:Rz(e.startDate)})})]}),u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(tc,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-medium",children:s}),!e.isAllDay&&u.jsxs("p",{className:"text-sm text-muted-foreground",children:["(",l,")"]})]})]}),e.location&&u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(ZS,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),u.jsx("p",{className:"font-medium",children:e.location})]}),e.description&&u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx($S,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),u.jsx("div",{className:"flex-1",children:u.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:e.description})})]})]}),u.jsx("div",{className:"pt-4 border-t",children:u.jsx(un,{onClick:i,className:"w-full",children:"Sync to Calendar"})})]})]})})}function PC({className:e,...t}){return u.jsx(TL,{"data-slot":"label",className:At("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function Uw(e){const t=e.getUTCFullYear(),a=String(e.getUTCMonth()+1).padStart(2,"0"),i=String(e.getUTCDate()).padStart(2,"0"),s=String(e.getUTCHours()).padStart(2,"0"),l=String(e.getUTCMinutes()).padStart(2,"0"),d=String(e.getUTCSeconds()).padStart(2,"0");return`${t}${a}${i}T${s}${l}${d}Z`}function Pw(e){const t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0"),s=String(e.getHours()).padStart(2,"0"),l=String(e.getMinutes()).padStart(2,"0"),d=String(e.getSeconds()).padStart(2,"0"),f=-e.getTimezoneOffset(),p=Math.floor(Math.abs(f)/60),m=Math.abs(f)%60,v=`${f>=0?"+":"-"}${String(p).padStart(2,"0")}:${String(m).padStart(2,"0")}`;return`${t}-${a}-${i}T${s}:${l}:${d}${v}`}function YC(e,t){const a=new URL(e);return Object.entries(t).forEach(([i,s])=>{s!==void 0&&s!==""&&a.searchParams.append(i,s)}),a.toString()}function Yw(e){return{title:"Synced Event",startDate:e.startDate,endDate:e.endDate,busyStatus:"busy",description:"",location:""}}function a4(e,t){const a="https://calendar.google.com/calendar/render",i=Uw(e.startDate),s=Uw(e.endDate),l=`${i}/${s}`,d={action:"TEMPLATE",text:e.title,dates:l,details:void 0,location:void 0,crm:"BUSY",trp:"true"},f=YC(a,d);if(t){const p=new URL("https://accounts.google.com/AccountChooser");return p.searchParams.append("Email",t),p.searchParams.append("continue",f),p.toString()}return f}function i4(e,t){const a="https://outlook.live.com/calendar/0/deeplink/compose",i={path:"/calendar/action/compose",rru:"addevent",subject:e.title,body:void 0,location:void 0,startdt:Pw(e.startDate),enddt:Pw(e.endDate),allday:"false"};return t&&(i.login_hint=t),YC(a,i)}function o4(e){const t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noopener noreferrer",document.body.appendChild(t),t.click(),document.body.removeChild(t)}function Wp(e){const t=e.getUTCFullYear(),a=String(e.getUTCMonth()+1).padStart(2,"0"),i=String(e.getUTCDate()).padStart(2,"0"),s=String(e.getUTCHours()).padStart(2,"0"),l=String(e.getUTCMinutes()).padStart(2,"0"),d=String(e.getUTCSeconds()).padStart(2,"0");return`${t}${a}${i}T${s}${l}${d}Z`}function s4(){return Wp(new Date)}function l4(){const e=Date.now(),t=Math.random().toString(36).substring(2,15);return`${e}-${t}@busical.app`}function c4(e){if(e.length<=75)return e;const t=[];let a=e;for(t.push(a.substring(0,75)),a=a.substring(75);a.length>74;)t.push(" "+a.substring(0,74)),a=a.substring(74);return a.length>0&&t.push(" "+a),t.join(`\r
|
|
65
|
+
`)}function u4(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n")}function d4(e){const t=l4(),a=s4(),i=Wp(e.startDate),s=Wp(e.endDate),l=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//BusiCal//EN","CALSCALE:GREGORIAN","METHOD:PUBLISH","BEGIN:VEVENT",`UID:${t}`,`DTSTAMP:${a}`,`DTSTART:${i}`,`DTEND:${s}`,c4(`SUMMARY:${u4(e.title)}`),"TRANSP:OPAQUE","STATUS:CONFIRMED","SEQUENCE:0"];return l.push("END:VEVENT"),l.push("END:VCALENDAR"),l.join(`\r
|
|
66
|
+
`)}function f4(e){const t=d4(e);return new Blob([t],{type:"text/calendar;charset=utf-8"})}function h4(e,t="event.ics"){t.endsWith(".ics")||(t+=".ics");const a=URL.createObjectURL(e),i=document.createElement("a");i.href=a,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),setTimeout(()=>{document.body.removeChild(i),URL.revokeObjectURL(a)},100)}function m4(e,t){const a=f4(e),i=`synced-event-${Date.now()}.ics`;h4(a,i)}function gp({controlled:e,default:t,name:a,state:i="value"}){const{current:s}=x.useRef(e!==void 0),[l,d]=x.useState(t),f=s?e:l,p=x.useCallback(m=>{s||d(m)},[]);return[f,p]}const Bw={};function da(e,t){const a=x.useRef(Bw);return a.current===Bw&&(a.current=e(t)),a}const yp=vc[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],p4=yp&&yp!==x.useLayoutEffect?yp:e=>e();function Xe(e){const t=da(g4).current;return t.next=e,p4(t.effect),t.trampoline}function g4(){const e={next:void 0,callback:y4,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function y4(){}const v4=()=>{},Qe=typeof document<"u"?x.useLayoutEffect:v4,BC=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function x4(){return x.useContext(BC)}function b4(e){const{children:t,elementsRef:a,labelsRef:i,onMapChange:s}=e,l=Xe(s),d=x.useRef(0),f=da(S4).current,p=da(w4).current,[m,y]=x.useState(0),v=x.useRef(m),w=Xe((N,R)=>{p.set(N,R??null),v.current+=1,y(v.current)}),b=Xe(N=>{p.delete(N),v.current+=1,y(v.current)}),C=x.useMemo(()=>{const N=new Map;return Array.from(p.keys()).filter(O=>O.isConnected).sort(E4).forEach((O,j)=>{const I=p.get(O)??{};N.set(O,{...I,index:j})}),N},[p,m]);Qe(()=>{if(typeof MutationObserver!="function"||C.size===0)return;const N=new MutationObserver(R=>{const O=new Set,j=I=>O.has(I)?O.delete(I):O.add(I);R.forEach(I=>{I.removedNodes.forEach(j),I.addedNodes.forEach(j)}),O.size===0&&(v.current+=1,y(v.current))});return C.forEach((R,O)=>{O.parentElement&&N.observe(O.parentElement,{childList:!0})}),()=>{N.disconnect()}},[C]),Qe(()=>{v.current===m&&(a.current.length!==C.size&&(a.current.length=C.size),i&&i.current.length!==C.size&&(i.current.length=C.size),d.current=C.size),l(C)},[l,C,a,i,m]),Qe(()=>()=>{a.current=[]},[a]),Qe(()=>()=>{i&&(i.current=[])},[i]);const E=Xe(N=>(f.add(N),()=>{f.delete(N)}));Qe(()=>{f.forEach(N=>N(C))},[f,C]);const T=x.useMemo(()=>({register:w,unregister:b,subscribeMapChange:E,elementsRef:a,labelsRef:i,nextIndexRef:d}),[w,b,E,a,i,d]);return u.jsx(BC.Provider,{value:T,children:t})}function w4(){return new Map}function S4(){return new Set}function E4(e,t){const a=e.compareDocumentPosition(t);return a&Node.DOCUMENT_POSITION_FOLLOWING||a&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:a&Node.DOCUMENT_POSITION_PRECEDING||a&Node.DOCUMENT_POSITION_CONTAINS?1:0}const C4=x.createContext(void 0);function HC(){return x.useContext(C4)?.direction??"ltr"}function Da(e,...t){const a=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(i=>a.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${a} for the full message.`}function gc(e,t,a,i){const s=da(VC).current;return R4(s,e,t,a,i)&&FC(s,[e,t,a,i]),s.callback}function T4(e){const t=da(VC).current;return N4(t,e)&&FC(t,e),t.callback}function VC(){return{callback:null,cleanup:null,refs:[]}}function R4(e,t,a,i,s){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==i||e.refs[3]!==s}function N4(e,t){return e.refs.length!==t.length||e.refs.some((a,i)=>a!==t[i])}function FC(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const i=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const d=l(a);typeof d=="function"&&(i[s]=d);break}case"object":{l.current=a;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const d=i[s];typeof d=="function"?d():l(null);break}case"object":{l.current=null;break}}}}}}}const A4=parseInt(x.version,10);function ey(e){return A4>=e}function Hw(e){if(!x.isValidElement(e))return null;const t=e,a=t.props;return(ey(19)?a?.ref:t.ref)??null}function Kp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function D4(e,t){const a={};for(const i in e){const s=e[i];if(t?.hasOwnProperty(i)){const l=t[i](s);l!=null&&Object.assign(a,l);continue}s===!0?a[`data-${i.toLowerCase()}`]="":s&&(a[`data-${i.toLowerCase()}`]=s.toString())}return a}function O4(e,t){return typeof e=="function"?e(t):e}function j4(e,t){return typeof e=="function"?e(t):e}const nc={};function GC(e,t,a,i,s){let l={...$p(e,nc)};return t&&(l=Cd(l,t)),a&&(l=Cd(l,a)),i&&(l=Cd(l,i)),l}function M4(e){if(e.length===0)return nc;if(e.length===1)return $p(e[0],nc);let t={...$p(e[0],nc)};for(let a=1;a<e.length;a+=1)t=Cd(t,e[a]);return t}function Cd(e,t){return qC(t)?t(e):_4(e,t)}function _4(e,t){if(!t)return e;for(const a in t){const i=t[a];switch(a){case"style":{e[a]=Kp(e.style,i);break}case"className":{e[a]=WC(e.className,i);break}default:k4(a,i)?e[a]=L4(e[a],i):e[a]=i}}return e}function k4(e,t){const a=e.charCodeAt(0),i=e.charCodeAt(1),s=e.charCodeAt(2);return a===111&&i===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function qC(e){return typeof e=="function"}function $p(e,t){return qC(e)?e(t):e??nc}function L4(e,t){return t?e?a=>{if(I4(a)){const s=a;Xp(s);const l=t(s);return s.baseUIHandlerPrevented||e?.(s),l}const i=t(a);return e?.(a),i}:t:e}function Xp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function WC(e,t){return t?e?t+" "+e:t:e}function I4(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function mn(){}const As=Object.freeze([]),wr=Object.freeze({}),z4={style:{transition:"none"}},U4="data-base-ui-click-trigger",P4={fallbackAxisSide:"none"},Y4={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Oa(e,t,a={}){const i=t.render,s=B4(t,a);if(a.enabled===!1)return null;const l=a.state??wr;return H4(e,i,s,l)}function B4(e,t={}){const{className:a,style:i,render:s}=e,{state:l=wr,ref:d,props:f,stateAttributesMapping:p,enabled:m=!0}=t,y=m?O4(a,l):void 0,v=m?j4(i,l):void 0,w=m?D4(l,p):wr,b=m?Kp(w,Array.isArray(f)?M4(f):f)??wr:wr;return typeof document<"u"&&(m?Array.isArray(d)?b.ref=T4([b.ref,Hw(s),...d]):b.ref=gc(b.ref,Hw(s),d):gc(null,null)),m?(y!==void 0&&(b.className=WC(b.className,y)),v!==void 0&&(b.style=Kp(b.style,v)),b):wr}function H4(e,t,a,i){if(t){if(typeof t=="function")return t(a,i);const s=GC(a,t.props);return s.ref=a.ref,x.cloneElement(t,s)}if(e&&typeof e=="string")return V4(e,a);throw new Error(Da(8))}function V4(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const sa="none",rc="trigger-press",F4="trigger-hover",KC="outside-press",G4="item-press",Vw="clear-press",Ao="input-change",Bi="input-clear",ty="focus-out",$C="escape-key",Td="list-navigation";function ft(e,t,a,i){let s=!1,l=!1;const d=wr;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){l=!0},get isCanceled(){return s},get isPropagationAllowed(){return l},trigger:a,...d}}function Gl(e,t,a){const i=a??wr;return{reason:e,event:t??new Event("base-ui"),...i}}const q4={...vc};let Fw=0;function W4(e,t="mui"){const[a,i]=x.useState(e),s=e||a;return x.useEffect(()=>{a==null&&(Fw+=1,i(`${t}-${Fw}`))},[a,t]),s}const Gw=q4.useId;function ny(e,t){if(Gw!==void 0){const a=Gw();return e??(t?`${t}-${a}`:a)}return W4(e,t)}function XC(e){return ny(e,"base-ui")}const K4=[];function QC(e){x.useEffect(e,K4)}const id=null;class $4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const a=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s<a.length;s+=1)a[s]?.(t)};request(t){const a=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(t){const a=t-this.startId;a<0||a>=this.callbacks.length||(this.callbacks[a]=null,this.callbacksCount-=1)}}const od=new $4;class wa{static create(){return new wa}static request(t){return od.request(t)}static cancel(t){return od.cancel(t)}currentId=id;request(t){this.cancel(),this.currentId=od.request(()=>{this.currentId=id,t()})}cancel=()=>{this.currentId!==id&&(od.cancel(this.currentId),this.currentId=id)};disposeEffect=()=>this.cancel}function ry(){const e=da(wa.create).current;return QC(e.disposeEffect),e}function To(e){return e==null?e:"current"in e?e.current:e}function X4(e,t=!1,a=!0){const i=ry();return Xe((s,l=null)=>{i.cancel();const d=To(e);d!=null&&(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?s():i.request(()=>{function f(){d&&Promise.all(d.getAnimations().map(p=>p.finished)).then(()=>{l!=null&&l.aborted||Ra.flushSync(s)}).catch(()=>{if(a){if(l!=null&&l.aborted)return;Ra.flushSync(s)}else d.getAnimations().length>0&&d.getAnimations().some(p=>p.pending||p.playState!=="finished")&&f()})}t?i.request(f):f()}))})}function ay(e,t=!1,a=!1){const[i,s]=x.useState(e&&t?"idle":void 0),[l,d]=x.useState(e);return e&&!l&&(d(!0),s("starting")),!e&&l&&i!=="ending"&&!a&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),Qe(()=>{if(!e&&l&&i!=="ending"&&a){const f=wa.request(()=>{s("ending")});return()=>{wa.cancel(f)}}},[e,l,i,a]),Qe(()=>{if(!e||t)return;const f=wa.request(()=>{s(void 0)});return()=>{wa.cancel(f)}},[t,e]),Qe(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const f=wa.request(()=>{s("idle")});return()=>{wa.cancel(f)}},[t,e,l,s,i]),x.useMemo(()=>({mounted:l,setMounted:d,transitionStatus:i}),[l,i])}let ZC=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Q4(e={}){const{label:t,metadata:a,textRef:i,indexGuessBehavior:s,index:l}=e,{register:d,unregister:f,subscribeMapChange:p,elementsRef:m,labelsRef:y,nextIndexRef:v}=x4(),w=x.useRef(-1),[b,C]=x.useState(l??(s===ZC.GuessFromOrder?()=>{if(w.current===-1){const N=v.current;v.current+=1,w.current=N}return w.current}:-1)),E=x.useRef(null),T=x.useCallback(N=>{if(E.current=N,b!==-1&&N!==null&&(m.current[b]=N,y)){const R=t!==void 0;y.current[b]=R?t:i?.current?.textContent??N.textContent}},[b,m,y,t,i]);return Qe(()=>{if(l!=null)return;const N=E.current;if(N)return d(N,a),()=>{f(N)}},[l,d,f,a]),Qe(()=>{if(l==null)return p(N=>{const R=E.current?N.get(E.current)?.index:null;R!=null&&C(R)})},[l,p,C]),x.useMemo(()=>({ref:T,index:b}),[b,T])}let Xd=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Z4={[Xd.startingStyle]:""},J4={[Xd.endingStyle]:""},iy={transitionStatus(e){return e==="starting"?Z4:e==="ending"?J4:null}},eU=x.createContext(void 0);function tU(e=!1){const t=x.useContext(eU);if(t===void 0&&!e)throw new Error(Da(16));return t}function nU(e){const{focusableWhenDisabled:t,disabled:a,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,d=i&&t!==!1,f=i&&t===!1;return{props:x.useMemo(()=>{const m={onKeyDown(y){a&&t&&y.key!=="Tab"&&y.preventDefault()}};return i||(m.tabIndex=s,!l&&a&&(m.tabIndex=t?s:-1)),(l&&(t||d)||!l&&a)&&(m["aria-disabled"]=a),l&&(!t||f)&&(m.disabled=a),m},[i,a,t,d,f,l,s])}}function oy(e={}){const{disabled:t=!1,focusableWhenDisabled:a,tabIndex:i=0,native:s=!0}=e,l=x.useRef(null),d=tU(!0)!==void 0,f=Xe(()=>{const w=l.current;return!!(w?.tagName==="A"&&w?.href)}),{props:p}=nU({focusableWhenDisabled:a,disabled:t,composite:d,tabIndex:i,isNativeButton:s}),m=x.useCallback(()=>{const w=l.current;rU(w)&&d&&t&&p.disabled===void 0&&w.disabled&&(w.disabled=!1)},[t,p.disabled,d]);Qe(m,[m]);const y=x.useCallback((w={})=>{const{onClick:b,onMouseDown:C,onKeyUp:E,onKeyDown:T,onPointerDown:N,...R}=w;return GC({type:s?"button":void 0,onClick(j){if(t){j.preventDefault();return}b?.(j)},onMouseDown(j){t||C?.(j)},onKeyDown(j){if(t||(Xp(j),T?.(j)),j.baseUIHandlerPrevented)return;const I=j.target===j.currentTarget&&!s&&!f()&&!t,P=j.key==="Enter",A=j.key===" ";I&&((A||P)&&j.preventDefault(),P&&b?.(j))},onKeyUp(j){t||(Xp(j),E?.(j)),!j.baseUIHandlerPrevented&&j.target===j.currentTarget&&!s&&!t&&j.key===" "&&b?.(j)},onPointerDown(j){if(t){j.preventDefault();return}N?.(j)}},s?void 0:{role:"button"},p,R)},[t,p,s,f]),v=Xe(w=>{l.current=w,m()});return{getButtonProps:y,buttonRef:v}}function rU(e){return On(e)&&e.tagName==="BUTTON"}const Bo=typeof navigator<"u",vp=lU(),JC=uU(),sy=cU(),aU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),iU=vp.platform==="MacIntel"&&vp.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(vp.platform),qw=Bo&&/firefox/i.test(sy),oU=Bo&&/apple/i.test(navigator.vendor),Qd=Bo&&/android/i.test(JC)||/android/i.test(sy);Bo&&JC.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const sU=sy.includes("jsdom/");function lU(){if(!Bo)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function cU(){if(!Bo)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:a})=>`${t}/${a}`).join(" "):navigator.userAgent}function uU(){if(!Bo)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Qp="data-base-ui-focusable",eT="active",tT="selected",dU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Qi="ArrowLeft",Zi="ArrowRight",ly="ArrowUp",Ac="ArrowDown";function Fi(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Vt(e,t){if(!e||!t)return!1;const a=t.getRootNode?.();if(e.contains(t))return!0;if(a&&Ip(a)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function oa(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const a=e;return a.target!=null&&t.contains(a.target)}function fU(e){return e.matches("html,body")}function or(e){return e?.ownerDocument||document}function nT(e){return On(e)&&e.matches(dU)}function Zp(e){return e?e.getAttribute("role")==="combobox"&&nT(e):!1}function Jp(e){return e?e.hasAttribute(Qp)?e:e.querySelector(`[${Qp}]`)||e:null}function ks(e,t,a=!0){return e.filter(s=>s.parentId===t&&(!a||s.context?.open)).flatMap(s=>[s,...ks(e,s.id,a)])}function Ww(e,t){let a=[],i=e.find(s=>s.id===t)?.parentId;for(;i;){const s=e.find(l=>l.id===i);i=s?.parentId,s&&(a=a.concat(s))}return a}function En(e){e.preventDefault(),e.stopPropagation()}function hU(e){return"nativeEvent"in e}function rT(e){return e.mozInputSource===0&&e.isTrusted?!0:Qd&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function aT(e){return sU?!1:!Qd&&e.width===0&&e.height===0||Qd&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Kw(e,t){return["mouse","pen"].includes(e)}function iT(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function sd(e,t,a){return Math.floor(e/t)!==a}function ac(e,t){return t<0||t>=e.current.length}function xp(e,t){return Qn(e,{disabledIndices:t})}function $w(e,t){return Qn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Qn(e,{startingIndex:t=-1,decrement:a=!1,disabledIndices:i,amount:s=1}={}){let l=t;do l+=a?-s:s;while(l>=0&&l<=e.current.length-1&&ic(e,l,i));return l}function mU(e,{event:t,orientation:a,loopFocus:i,rtl:s,cols:l,disabledIndices:d,minIndex:f,maxIndex:p,prevIndex:m,stopEvent:y=!1}){let v=m;const w=[],b={};let C=!1;{let N=null,R=-1;e.current.forEach((O,j)=>{if(O==null)return;const I=O.closest('[role="row"]');I&&(C=!0),(I!==N||R===-1)&&(N=I,R+=1,w[R]=[]),w[R].push(j),b[j]=R})}const E=C&&w.length>0&&w.some(N=>N.length!==l);function T(N){if(!E||m===-1)return;const R=b[m];if(R==null)return;const O=w[R].indexOf(m);let j=N==="up"?R-1:R+1;i&&(j<0?j=w.length-1:j>=w.length&&(j=0));const I=new Set;for(;j>=0&&j<w.length&&!I.has(j);){I.add(j);const P=w[j];if(P.length===0){j=N==="up"?j-1:j+1;continue}const A=Math.min(O,P.length-1);for(let _=A;_>=0;_-=1){const Z=P[_];if(!ic(e,Z,d))return Z}j=N==="up"?j-1:j+1,i&&(j<0?j=w.length-1:j>=w.length&&(j=0))}}if(t.key===ly){const N=T("up");if(N!==void 0)y&&En(t),v=N;else{if(y&&En(t),m===-1)v=p;else if(v=Qn(e,{startingIndex:v,amount:l,decrement:!0,disabledIndices:d}),i&&(m-l<f||v<0)){const R=m%l,O=p%l,j=p-(O-R);O===R?v=p:v=O>R?j:j-l}ac(e,v)&&(v=m)}}if(t.key===Ac){const N=T("down");N!==void 0?(y&&En(t),v=N):(y&&En(t),m===-1?v=f:(v=Qn(e,{startingIndex:m,amount:l,disabledIndices:d}),i&&m+l>p&&(v=Qn(e,{startingIndex:m%l-l,amount:l,disabledIndices:d}))),ac(e,v)&&(v=m))}if(a==="both"){const N=Os(m/l);t.key===(s?Qi:Zi)&&(y&&En(t),m%l!==l-1?(v=Qn(e,{startingIndex:m,disabledIndices:d}),i&&sd(v,l,N)&&(v=Qn(e,{startingIndex:m-m%l-1,disabledIndices:d}))):i&&(v=Qn(e,{startingIndex:m-m%l-1,disabledIndices:d})),sd(v,l,N)&&(v=m)),t.key===(s?Zi:Qi)&&(y&&En(t),m%l!==0?(v=Qn(e,{startingIndex:m,decrement:!0,disabledIndices:d}),i&&sd(v,l,N)&&(v=Qn(e,{startingIndex:m+(l-m%l),decrement:!0,disabledIndices:d}))):i&&(v=Qn(e,{startingIndex:m+(l-m%l),decrement:!0,disabledIndices:d})),sd(v,l,N)&&(v=m));const R=Os(p/l)===N;ac(e,v)&&(i&&R?v=t.key===(s?Zi:Qi)?p:Qn(e,{startingIndex:m-m%l-1,disabledIndices:d}):v=m)}return v}function pU(e,t,a){const i=[];let s=0;return e.forEach(({width:l,height:d},f)=>{let p=!1;for(a&&(s=0);!p;){const m=[];for(let y=0;y<l;y+=1)for(let v=0;v<d;v+=1)m.push(s+y+v*t);s%t+l<=t&&m.every(y=>i[y]==null)?(m.forEach(y=>{i[y]=f}),p=!0):s+=1}}),[...i]}function gU(e,t,a,i,s){if(e===-1)return-1;const l=a.indexOf(e),d=t[e];switch(s){case"tl":return l;case"tr":return d?l+d.width-1:l;case"bl":return d?l+(d.height-1)*i:l;case"br":return a.lastIndexOf(e);default:return-1}}function yU(e,t){return t.flatMap((a,i)=>e.includes(a)?[i]:[])}function ic(e,t,a){if(typeof a=="function")return a(t);if(a)return a.includes(t);const i=e.current[t];return i?i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true":!1}var vU=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Zd=vU.join(","),oT=typeof Element>"u",Ps=oT?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Jd=!oT&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ef=function(t,a){var i;a===void 0&&(a=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),l=s===""||s==="true",d=l||a&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ef(t.parentNode));return d},xU=function(t){var a,i=t==null||(a=t.getAttribute)===null||a===void 0?void 0:a.call(t,"contenteditable");return i===""||i==="true"},sT=function(t,a,i){if(ef(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Zd));return a&&Ps.call(t,Zd)&&s.unshift(t),s=s.filter(i),s},tf=function(t,a,i){for(var s=[],l=Array.from(t);l.length;){var d=l.shift();if(!ef(d,!1))if(d.tagName==="SLOT"){var f=d.assignedElements(),p=f.length?f:d.children,m=tf(p,!0,i);i.flatten?s.push.apply(s,m):s.push({scopeParent:d,candidates:m})}else{var y=Ps.call(d,Zd);y&&i.filter(d)&&(a||!t.includes(d))&&s.push(d);var v=d.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(d),w=!ef(v,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(d));if(v&&w){var b=tf(v===!0?d.children:v.children,!0,i);i.flatten?s.push.apply(s,b):s.push({scopeParent:d,candidates:b})}else l.unshift.apply(l,d.children)}}return s},lT=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},cT=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||xU(t))&&!lT(t)?0:t.tabIndex},bU=function(t,a){var i=cT(t);return i<0&&a&&!lT(t)?0:i},wU=function(t,a){return t.tabIndex===a.tabIndex?t.documentOrder-a.documentOrder:t.tabIndex-a.tabIndex},uT=function(t){return t.tagName==="INPUT"},SU=function(t){return uT(t)&&t.type==="hidden"},EU=function(t){var a=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return a},CU=function(t,a){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===a)return t[i]},TU=function(t){if(!t.name)return!0;var a=t.form||Jd(t),i=function(f){return a.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(d){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",d.message),!1}var l=CU(s,t.form);return!l||l===t},RU=function(t){return uT(t)&&t.type==="radio"},NU=function(t){return RU(t)&&!TU(t)},AU=function(t){var a,i=t&&Jd(t),s=(a=i)===null||a===void 0?void 0:a.host,l=!1;if(i&&i!==t){var d,f,p;for(l=!!((d=s)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(s)||t!=null&&(p=t.ownerDocument)!==null&&p!==void 0&&p.contains(t));!l&&s;){var m,y,v;i=Jd(s),s=(m=i)===null||m===void 0?void 0:m.host,l=!!((y=s)!==null&&y!==void 0&&(v=y.ownerDocument)!==null&&v!==void 0&&v.contains(s))}}return l},Xw=function(t){var a=t.getBoundingClientRect(),i=a.width,s=a.height;return i===0&&s===0},DU=function(t,a){var i=a.displayCheck,s=a.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var d=Ps.call(t,"details>summary:first-of-type"),f=d?t.parentElement:t;if(Ps.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var p=t;t;){var m=t.parentElement,y=Jd(t);if(m&&!m.shadowRoot&&s(m)===!0)return Xw(t);t.assignedSlot?t=t.assignedSlot:!m&&y!==t.ownerDocument?t=y.host:t=m}t=p}if(AU(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Xw(t);return!1},OU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var a=t.parentElement;a;){if(a.tagName==="FIELDSET"&&a.disabled){for(var i=0;i<a.children.length;i++){var s=a.children.item(i);if(s.tagName==="LEGEND")return Ps.call(a,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}a=a.parentElement}return!1},eg=function(t,a){return!(a.disabled||SU(a)||DU(a,t)||EU(a)||OU(a))},tg=function(t,a){return!(NU(a)||cT(a)<0||!eg(t,a))},jU=function(t){var a=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(a)||a>=0)},dT=function(t){var a=[],i=[];return t.forEach(function(s,l){var d=!!s.scopeParent,f=d?s.scopeParent:s,p=bU(f,d),m=d?dT(s.candidates):f;p===0?d?a.push.apply(a,m):a.push(f):i.push({documentOrder:l,tabIndex:p,item:s,isScope:d,content:m})}),i.sort(wU).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(a)},_f=function(t,a){a=a||{};var i;return a.getShadowRoot?i=tf([t],a.includeContainer,{filter:tg.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:jU}):i=sT(t,a.includeContainer,tg.bind(null,a)),dT(i)},MU=function(t,a){a=a||{};var i;return a.getShadowRoot?i=tf([t],a.includeContainer,{filter:eg.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):i=sT(t,a.includeContainer,eg.bind(null,a)),i},fT=function(t,a){if(a=a||{},!t)throw new Error("No node provided");return Ps.call(t,Zd)===!1?!1:tg(a,t)};const Dc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hT(e,t){const a=_f(e,Dc()),i=a.length;if(i===0)return;const s=Fi(or(e)),l=a.indexOf(s),d=l===-1?t===1?0:i-1:l+t;return a[d]}function mT(e){return hT(or(e).body,1)||e}function pT(e){return hT(or(e).body,-1)||e}function oc(e,t){const a=t||e.currentTarget,i=e.relatedTarget;return!i||!Vt(a,i)}function _U(e){_f(e,Dc()).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function Qw(e){e.querySelectorAll("[data-tabindex]").forEach(a=>{const i=a.dataset.tabindex;delete a.dataset.tabindex,i?a.setAttribute("tabindex",i):a.removeAttribute("tabindex")})}function cr(e){const t=da(kU,e).current;return t.next=e,Qe(t.effect),t}function kU(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function kf(e){const{enabled:t=!0,open:a,ref:i,onComplete:s}=e,l=cr(a),d=Xe(s),f=X4(i,a);x.useEffect(()=>{t&&f(()=>{a===l.current&&d()})},[t,a,d,f,l])}function qs(e){return e?.ownerDocument||document}const ql=0;class Ys{static create(){return new Ys}currentId=ql;start(t,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ql,a()},t)}isStarted(){return this.currentId!==ql}clear=()=>{this.currentId!==ql&&(clearTimeout(this.currentId),this.currentId=ql)};disposeEffect=()=>this.clear}function Lo(){const e=da(Ys.create).current;return QC(e.disposeEffect),e}let Zw={},Jw={},eS="";function LU(e){if(typeof document>"u")return!1;const t=qs(e);return Wn(t).innerWidth-t.documentElement.clientWidth>0}function IU(e){const t=qs(e),a=t.documentElement,i=t.body,s=zo(a)?a:i,l=s.style.overflow;return s.style.overflow="hidden",()=>{s.style.overflow=l}}function zU(e){const t=qs(e),a=t.documentElement,i=t.body,s=Wn(a);let l=0,d=0;const f=wa.create(),p=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(aU&&(s.visualViewport?.scale??1)!==1)return()=>{};function m(){const w=s.getComputedStyle(a),b=s.getComputedStyle(i),T=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=a.scrollTop,d=a.scrollLeft,Zw={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},eS=a.style.scrollBehavior,Jw={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const N=a.scrollHeight>a.clientHeight,R=a.scrollWidth>a.clientWidth,O=w.overflowY==="scroll"||b.overflowY==="scroll",j=w.overflowX==="scroll"||b.overflowX==="scroll",I=Math.max(0,s.innerWidth-a.clientWidth),P=Math.max(0,s.innerHeight-a.clientHeight),A=parseFloat(b.marginTop)+parseFloat(b.marginBottom),_=parseFloat(b.marginLeft)+parseFloat(b.marginRight),Z=zo(a)?a:i;if(p){a.style.scrollbarGutter=T,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(N||O)&&(a.style.overflowY="scroll"),(R||j)&&(a.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:A||P?`calc(100dvh - ${A+P}px)`:"100dvh",width:_||I?`calc(100vw - ${_+I}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=d,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Zw),Object.assign(i.style,Jw),p||(a.scrollTop=l,a.scrollLeft=d,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=eS)}function v(){y(),f.request(m)}return m(),s.addEventListener("resize",v),()=>{f.cancel(),y(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",v)}}class UU{lockCount=0;restore=null;timeoutLock=Ys.create();timeoutUnlock=Ys.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const i=qs(t).documentElement,s=Wn(i).getComputedStyle(i).overflowY;if(s==="hidden"||s==="clip"){this.restore=mn;return}const l=iU||!LU(t);this.restore=l?IU(t):zU(t)}}const PU=new UU;function YU(e=!0,t=null){Qe(()=>{if(e)return PU.acquire(t)},[e,t])}function BU(){const e=new Map;return{emit(t,a){e.get(t)?.forEach(i=>i(a))},on(t,a){e.has(t)||e.set(t,new Set),e.get(t).add(a)},off(t,a){e.get(t)?.delete(a)}}}const HU=x.createContext(null),VU=x.createContext(null),gT=()=>x.useContext(HU)?.id||null,Lf=e=>{const t=x.useContext(VU);return e??t};function nf(e){return`data-base-ui-${e}`}const cy={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},rf=x.forwardRef(function(t,a){const[i,s]=x.useState();Qe(()=>{oU&&s("button")},[]);const l={tabIndex:0,role:i};return u.jsx("span",{...t,ref:a,style:cy,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})});let tS=0;function Rd(e,t={}){const{preventScroll:a=!1,cancelPrevious:i=!0,sync:s=!1}=t;i&&cancelAnimationFrame(tS);const l=()=>e?.focus({preventScroll:a});s?l():tS=requestAnimationFrame(l)}const Ls={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function nS(e){return e==="inert"?Ls.inert:e==="aria-hidden"?Ls["aria-hidden"]:Ls.none}let ld=new WeakSet,cd={},bp=0;const yT=e=>e&&(e.host||yT(e.parentNode)),FU=(e,t)=>t.map(a=>{if(e.contains(a))return a;const i=yT(a);return e.contains(i)?i:null}).filter(a=>a!=null);function GU(e,t,a,i){const s="data-base-ui-inert",l=i?"inert":a?"aria-hidden":null,d=FU(t,e),f=new Set,p=new Set(d),m=[];cd[s]||(cd[s]=new WeakMap);const y=cd[s];d.forEach(v),w(t),f.clear();function v(b){!b||f.has(b)||(f.add(b),b.parentNode&&v(b.parentNode))}function w(b){!b||p.has(b)||[].forEach.call(b.children,C=>{if(ro(C)!=="script")if(f.has(C))w(C);else{const E=l?C.getAttribute(l):null,T=E!==null&&E!=="false",N=nS(l),R=(N.get(C)||0)+1,O=(y.get(C)||0)+1;N.set(C,R),y.set(C,O),m.push(C),R===1&&T&&ld.add(C),O===1&&C.setAttribute(s,""),!T&&l&&C.setAttribute(l,l==="inert"?"":"true")}})}return bp+=1,()=>{m.forEach(b=>{const C=nS(l),T=(C.get(b)||0)-1,N=(y.get(b)||0)-1;C.set(b,T),y.set(b,N),T||(!ld.has(b)&&l&&b.removeAttribute(l),ld.delete(b)),N||b.removeAttribute(s)}),bp-=1,bp||(Ls.inert=new WeakMap,Ls["aria-hidden"]=new WeakMap,Ls.none=new WeakMap,ld=new WeakSet,cd={})}}function qU(e,t=!1,a=!1){const i=or(e[0]).body;return GU(e.concat(Array.from(i.querySelectorAll("[aria-live]"))),i,t,a)}const vT=x.createContext(null),xT=()=>x.useContext(vT),WU=nf("portal");function KU(e={}){const{ref:t,container:a,componentProps:i=wr,elementProps:s,elementState:l}=e,d=ny(),p=xT()?.portalNode,[m,y]=x.useState(null),[v,w]=x.useState(null),b=x.useRef(null);Qe(()=>{if(a===null){b.current&&(b.current=null,w(null),y(null));return}if(d==null)return;const T=(a&&(kg(a)?a:a.current))??p??document.body;if(T==null){b.current&&(b.current=null,w(null),y(null));return}b.current!==T&&(b.current=T,w(null),y(T))},[a,p,d]);const C=Oa("div",i,{ref:[t,w],state:l,props:[{id:d,[WU]:""},s]});return{portalNode:v,portalSubtree:m&&C?Ra.createPortal(C,m):null}}const $U=x.forwardRef(function(t,a){const{children:i,container:s,className:l,render:d,renderGuards:f,...p}=t,{portalNode:m,portalSubtree:y}=KU({container:s,ref:a,componentProps:t,elementProps:p}),v=x.useRef(null),w=x.useRef(null),b=x.useRef(null),C=x.useRef(null),[E,T]=x.useState(null),N=E?.modal,R=E?.open,O=typeof f=="boolean"?f:!!E&&!E.modal&&E.open&&!!m;x.useEffect(()=>{if(!m||N)return;function I(P){m&&oc(P)&&(P.type==="focusin"?Qw:_U)(m)}return m.addEventListener("focusin",I,!0),m.addEventListener("focusout",I,!0),()=>{m.removeEventListener("focusin",I,!0),m.removeEventListener("focusout",I,!0)}},[m,N]),x.useEffect(()=>{!m||R||Qw(m)},[R,m]);const j=x.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:w,beforeInsideRef:b,afterInsideRef:C,portalNode:m,setFocusManagerState:T}),[m]);return u.jsxs(x.Fragment,{children:[y,u.jsxs(vT.Provider,{value:j,children:[O&&m&&u.jsx(rf,{"data-type":"outside",ref:v,onFocus:I=>{if(oc(I,m))b.current?.focus();else{const P=E?E.domReference:null;pT(P)?.focus()}}}),O&&m&&u.jsx("span",{"aria-owns":m.id,style:Y4}),m&&Ra.createPortal(i,m),O&&m&&u.jsx(rf,{"data-type":"outside",ref:w,onFocus:I=>{if(oc(I,m))C.current?.focus();else{const P=E?E.domReference:null;mT(P)?.focus(),E?.closeOnFocusOut&&E?.onOpenChange(!1,ft(ty,I.nativeEvent))}}})]})]})});function XU(e,t){const a=Wn(e.target);return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof a.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const rS=20;let Wi=[];function uy(){Wi=Wi.filter(e=>e.isConnected)}function QU(e){uy(),e&&ro(e)!=="body"&&(Wi.push(e),Wi.length>rS&&(Wi=Wi.slice(-rS)))}function wp(){return uy(),Wi[Wi.length-1]}function ZU(e){if(!e)return null;const t=Dc();return fT(e,t)?e:_f(e,t)[0]||e}function JU(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ir(e).display!=="none"}function aS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const a=Dc(),s=MU(e,a).filter(d=>{const f=d.getAttribute("data-tabindex")||"";return fT(d,a)||d.hasAttribute("data-tabindex")&&!f.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function eP(e){const{context:t,children:a,disabled:i=!1,order:s=["content"],initialFocus:l=!0,returnFocus:d=!0,restoreFocus:f=!1,modal:p=!0,closeOnFocusOut:m=!0,openInteractionType:y="",getInsideElements:v=()=>[],nextFocusableElement:w,previousFocusableElement:b,beforeContentFocusGuardRef:C,externalTree:E}=e,T="rootStore"in t?t.rootStore:t,N=T.useState("open"),R=T.useState("domReferenceElement"),O=T.useState("floatingElement"),{events:j,dataRef:I}=T.context,P=Xe(()=>I.current.floatingContext?.nodeId),A=Xe(v),_=l===!1,Z=Zp(R)&&_,ne=cr(s),ae=cr(l),fe=cr(d),pe=cr(y),ce=Lf(E),F=xT(),k=x.useRef(null),X=x.useRef(null),z=x.useRef(!1),K=x.useRef(!1),oe=x.useRef(!1),M=x.useRef(-1),V=x.useRef(""),Q=x.useRef(""),ee=Lo(),re=Lo(),we=ry(),de=F!=null,ye=Jp(O),Fe=Xe((xe=ye)=>xe?_f(xe,Dc()):[]),ve=Xe(xe=>{const _e=Fe(xe);return ne.current.map(()=>_e).filter(Boolean).flat()});x.useEffect(()=>{if(i||!p)return;function xe(dt){dt.key==="Tab"&&Vt(ye,Fi(or(ye)))&&Fe().length===0&&!Z&&En(dt)}const _e=or(ye);return _e.addEventListener("keydown",xe),()=>{_e.removeEventListener("keydown",xe)}},[i,R,ye,p,ne,Z,Fe,ve]),x.useEffect(()=>{if(i||!O)return;function xe(_e){const dt=lr(_e),ot=Fe().indexOf(dt);ot!==-1&&(M.current=ot)}return O.addEventListener("focusin",xe),()=>{O.removeEventListener("focusin",xe)}},[i,O,Fe]),x.useEffect(()=>{if(i||!N)return;const xe=or(ye);function _e(){oe.current=!1}function dt(ot){const Re=lr(ot),qe=Vt(O,Re)||Vt(R,Re)||Vt(F?.portalNode,Re);oe.current=!qe,Q.current=ot.pointerType||"keyboard"}function tt(){Q.current="keyboard"}return xe.addEventListener("pointerdown",dt,!0),xe.addEventListener("pointerup",_e,!0),xe.addEventListener("pointercancel",_e,!0),xe.addEventListener("keydown",tt,!0),()=>{xe.removeEventListener("pointerdown",dt,!0),xe.removeEventListener("pointerup",_e,!0),xe.removeEventListener("pointercancel",_e,!0),xe.removeEventListener("keydown",tt,!0)}},[i,O,R,ye,N,F]),x.useEffect(()=>{if(i||!m)return;function xe(){K.current=!0,re.start(0,()=>{K.current=!1})}function _e(Re){const qe=Re.relatedTarget,Oe=Re.currentTarget,Ne=lr(Re);queueMicrotask(()=>{const ke=P(),rt=T.context.triggerElements,at=!(Vt(R,qe)||Vt(O,qe)||Vt(qe,O)||Vt(F?.portalNode,qe)||qe!=null&&rt.hasElement(qe)||rt.hasMatchingElement(Be=>Vt(Be,qe))||qe?.hasAttribute(nf("focus-guard"))||ce&&(ks(ce.nodesRef.current,ke).find(Be=>Vt(Be.context?.elements.floating,qe)||Vt(Be.context?.elements.domReference,qe))||Ww(ce.nodesRef.current,ke).find(Be=>[Be.context?.elements.floating,Jp(Be.context?.elements.floating)].includes(qe)||Be.context?.elements.domReference===qe)));if(Oe===R&&ye&&aS(ye,ne),f&&Oe!==R&&!JU(Ne)&&Fi(or(ye))===or(ye).body){if(On(ye)&&(ye.focus(),f==="popup")){we.request(()=>{ye.focus()});return}const Be=M.current,gt=Fe(),Gt=gt[Be]||gt[gt.length-1]||ye;On(Gt)&&Gt.focus()}if(I.current.insideReactTree){I.current.insideReactTree=!1;return}(Z||!p)&&qe&&at&&!K.current&&(Z||qe!==wp())&&(z.current=!0,T.setOpen(!1,ft(ty,Re)))})}function dt(){oe.current||(I.current.insideReactTree=!0,ee.start(0,()=>{I.current.insideReactTree=!1}))}const tt=On(R)?R:null,ot=[];if(!(!O&&!tt))return tt&&(tt.addEventListener("focusout",_e),tt.addEventListener("pointerdown",xe),ot.push(()=>{tt.removeEventListener("focusout",_e),tt.removeEventListener("pointerdown",xe)})),O&&(O.addEventListener("focusout",_e),F&&(O.addEventListener("focusout",dt,!0),ot.push(()=>{O.removeEventListener("focusout",dt,!0)})),ot.push(()=>{O.removeEventListener("focusout",_e)})),()=>{ot.forEach(Re=>{Re()})}},[i,R,O,ye,p,ce,F,T,m,f,Fe,Z,P,ne,I,ee,re,we]);const te=x.useRef(null),me=x.useRef(null),be=gc(te,C,F?.beforeInsideRef),et=gc(me,F?.afterInsideRef);x.useEffect(()=>{if(i||!O||!N)return;const xe=Array.from(F?.portalNode?.querySelectorAll(`[${nf("portal")}]`)||[]),dt=(ce?Ww(ce.nodesRef.current,P()):[]).find(Re=>Zp(Re.context?.elements.domReference||null))?.context?.elements.domReference,tt=[O,dt,...xe,...A(),k.current,X.current,te.current,me.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,To(b),To(w),Z?R:null].filter(Re=>Re!=null),ot=qU(tt,p||Z);return()=>{ot()}},[N,i,R,O,p,ne,F,Z,ce,P,A,w,b]),Qe(()=>{if(!N||i||!On(ye))return;const xe=or(ye),_e=Fi(xe);queueMicrotask(()=>{const dt=ve(ye),tt=ae.current,ot=typeof tt=="function"?tt(pe.current||""):tt;if(ot===void 0||ot===!1)return;let Re;ot===!0||ot===null?Re=dt[0]||ye:Re=To(ot),Re=Re||dt[0]||ye,!Vt(ye,_e)&&Rd(Re,{preventScroll:Re===ye})})},[i,N,ye,_,ve,ae,pe]),Qe(()=>{if(i||!ye)return;const xe=or(ye),_e=Fi(xe);QU(_e);function dt(Re){if(Re.open||(V.current=XU(Re.nativeEvent,Q.current)),Re.reason===F4&&Re.nativeEvent.type==="mouseleave"&&(z.current=!0),Re.reason===KC)if(Re.nested)z.current=!1;else if(rT(Re.nativeEvent)||aT(Re.nativeEvent))z.current=!1;else{let qe=!1;document.createElement("div").focus({get preventScroll(){return qe=!0,!1}}),qe?z.current=!1:z.current=!0}}j.on("openchange",dt);const tt=xe.createElement("span");tt.setAttribute("tabindex","-1"),tt.setAttribute("aria-hidden","true"),Object.assign(tt.style,cy),de&&R&&R.insertAdjacentElement("afterend",tt);function ot(){const Re=fe.current;let qe=typeof Re=="function"?Re(V.current):Re;if(qe===void 0||qe===!1)return null;if(qe===null&&(qe=!0),typeof qe=="boolean"){const Ne=R||wp();return Ne&&Ne.isConnected?Ne:tt}const Oe=R||wp()||tt;return To(qe)||Oe}return()=>{j.off("openchange",dt);const Re=Fi(xe),qe=Vt(O,Re)||ce&&ks(ce.nodesRef.current,P(),!1).some(Ne=>Vt(Ne.context?.elements.floating,Re)),Oe=ot();queueMicrotask(()=>{const Ne=ZU(Oe),ke=typeof fe.current!="boolean";fe.current&&!z.current&&On(Ne)&&(!(!ke&&Ne!==Re&&Re!==xe.body)||qe)&&Ne.focus({preventScroll:!0}),tt.remove()})}},[i,O,ye,fe,I,j,ce,de,R,P]),x.useEffect(()=>{queueMicrotask(()=>{z.current=!1})},[i]),x.useEffect(()=>{if(i||!N)return;function xe(dt){lr(dt)?.closest(`[${U4}]`)&&(K.current=!0)}const _e=or(ye);return _e.addEventListener("pointerdown",xe,!0),()=>{_e.removeEventListener("pointerdown",xe,!0)}},[i,N,ye]),Qe(()=>{if(!i&&F)return F.setFocusManagerState({modal:p,closeOnFocusOut:m,open:N,onOpenChange:T.setOpen,domReference:R}),()=>{F.setFocusManagerState(null)}},[i,F,p,N,T,m,R]),Qe(()=>{if(!(i||!ye))return aS(ye,ne),()=>{queueMicrotask(uy)}},[i,ye,ne]);const Te=!i&&(p?!Z:!0)&&(de||p);return u.jsxs(x.Fragment,{children:[Te&&u.jsx(rf,{"data-type":"inside",ref:be,onFocus:xe=>{if(p){const _e=ve();Rd(_e[_e.length-1])}else F?.portalNode&&(z.current=!1,oc(xe,F.portalNode)?mT(R)?.focus():To(b??F.beforeOutsideRef)?.focus())}}),a,Te&&u.jsx(rf,{"data-type":"inside",ref:et,onFocus:xe=>{p?Rd(ve()[0]):F?.portalNode&&(m&&(z.current=!0),oc(xe,F.portalNode)?pT(R)?.focus():To(w??F.afterOutsideRef)?.focus())}})]})}function bT(e,t={}){const a="rootStore"in e?e.rootStore:e,i=a.context.dataRef,{enabled:s=!0,event:l="click",toggle:d=!0,ignoreMouse:f=!1,stickIfOpen:p=!0,touchOpenDelay:m=0}=t,y=x.useRef(void 0),v=ry(),w=Lo(),b=x.useMemo(()=>({onPointerDown(C){y.current=C.pointerType},onMouseDown(C){const E=y.current,T=C.nativeEvent,N=a.select("open");if(C.button!==0||l==="click"||Kw(E)&&f)return;const R=i.current.openEvent,O=R?.type,j=a.select("domReferenceElement")!==C.currentTarget,I=N&&j||!(N&&d&&(!(R&&p)||O==="click"||O==="mousedown"));if(nT(T.target)){const A=ft(rc,T,T.target);I&&E==="touch"&&m>0?w.start(m,()=>{a.setOpen(!0,A)}):a.setOpen(I,A);return}const P=C.currentTarget;v.request(()=>{const A=ft(rc,T,P);I&&E==="touch"&&m>0?w.start(m,()=>{a.setOpen(!0,A)}):a.setOpen(I,A)})},onClick(C){if(l==="mousedown-only")return;const E=y.current;if(l==="mousedown"&&E){y.current=void 0;return}if(Kw(E)&&f)return;const T=a.select("open"),N=i.current.openEvent,R=a.select("domReferenceElement")!==C.currentTarget,O=T&&R||!(T&&d&&(!(N&&p)||iT(N))),j=ft(rc,C.nativeEvent,C.currentTarget);O&&E==="touch"&&m>0?w.start(m,()=>{a.setOpen(!0,j)}):a.setOpen(O,j)},onKeyDown(){y.current=void 0}}),[i,l,f,a,p,d,v,w,m]);return x.useMemo(()=>s?{reference:b}:wr,[s,b])}const tP={intentional:"onClick",sloppy:"onPointerDown"};function nP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function rP(e,t={}){const a="rootStore"in e?e.rootStore:e,i=a.useState("open"),s=a.useState("floatingElement"),l=a.useState("referenceElement"),d=a.useState("domReferenceElement"),{onOpenChange:f,dataRef:p}=a.context,{enabled:m=!0,escapeKey:y=!0,outsidePress:v=!0,outsidePressEvent:w="sloppy",referencePress:b=!1,referencePressEvent:C="sloppy",ancestorScroll:E=!1,bubbles:T,externalTree:N}=t,R=Lf(N),O=Xe(typeof v=="function"?v:()=>!1),j=typeof v=="function"?O:v,I=x.useRef(!1),{escapeKey:P,outsidePress:A}=nP(T),_=x.useRef(null),Z=Lo(),ne=Lo(),ae=Xe(()=>{ne.clear(),p.current.insideReactTree=!1}),fe=x.useRef(!1),pe=x.useRef(""),ce=Xe(te=>{pe.current=te.pointerType}),F=Xe(()=>{const te=pe.current,me=te==="pen"||!te?"mouse":te,be=typeof w=="function"?w():w;return typeof be=="string"?be:be[me]}),k=Xe(te=>{if(!i||!m||!y||te.key!=="Escape"||fe.current)return;const me=p.current.floatingContext?.nodeId,be=R?ks(R.nodesRef.current,me):[];if(!P&&be.length>0){let xe=!0;if(be.forEach(_e=>{_e.context?.open&&!_e.context.dataRef.current.__escapeKeyBubbles&&(xe=!1)}),!xe)return}const et=hU(te)?te.nativeEvent:te,Te=ft($C,et);a.setOpen(!1,Te),!P&&!Te.isPropagationAllowed&&te.stopPropagation()}),X=Xe(te=>{const me=F();return me==="intentional"&&te.type!=="click"||me==="sloppy"&&te.type==="click"}),z=Xe(()=>{p.current.insideReactTree=!0,ne.start(0,ae)}),K=Xe((te,me=!1)=>{if(X(te)){ae();return}if(p.current.insideReactTree){ae();return}if(F()==="intentional"&&me||typeof j=="function"&&!j(te))return;const be=lr(te),et=`[${nf("inert")}]`,Te=or(a.select("floatingElement")).querySelectorAll(et),xe=a.context.triggerElements;if(be&&(xe.hasElement(be)||xe.hasMatchingElement(Re=>Vt(Re,be))))return;let _e=sn(be)?be:null;for(;_e&&!ni(_e);){const Re=ii(_e);if(ni(Re)||!sn(Re))break;_e=Re}if(Te.length&&sn(be)&&!fU(be)&&!Vt(be,a.select("floatingElement"))&&Array.from(Te).every(Re=>!Vt(_e,Re)))return;if(On(be)&&!("touches"in te)){const Re=ni(be),qe=Ir(be),Oe=/auto|scroll/,Ne=Re||Oe.test(qe.overflowX),ke=Re||Oe.test(qe.overflowY),rt=Ne&&be.clientWidth>0&&be.scrollWidth>be.clientWidth,at=ke&&be.clientHeight>0&&be.scrollHeight>be.clientHeight,Be=qe.direction==="rtl",gt=at&&(Be?te.offsetX<=be.offsetWidth-be.clientWidth:te.offsetX>be.clientWidth),Gt=rt&&te.offsetY>be.clientHeight;if(gt||Gt)return}const dt=p.current.floatingContext?.nodeId,tt=R&&ks(R.nodesRef.current,dt).some(Re=>oa(te,Re.context?.elements.floating));if(oa(te,a.select("floatingElement"))||oa(te,a.select("domReferenceElement"))||tt)return;const ot=R?ks(R.nodesRef.current,dt):[];if(ot.length>0){let Re=!0;if(ot.forEach(qe=>{qe.context?.open&&!qe.context.dataRef.current.__outsidePressBubbles&&(Re=!1)}),!Re)return}a.setOpen(!1,ft(KC,te)),ae()}),oe=Xe(te=>{F()!=="sloppy"||te.pointerType==="touch"||!a.select("open")||!m||oa(te,a.select("floatingElement"))||oa(te,a.select("domReferenceElement"))||K(te)}),M=Xe(te=>{if(F()!=="sloppy"||!a.select("open")||!m||oa(te,a.select("floatingElement"))||oa(te,a.select("domReferenceElement")))return;const me=te.touches[0];me&&(_.current={startTime:Date.now(),startX:me.clientX,startY:me.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{_.current&&(_.current.dismissOnTouchEnd=!1,_.current.dismissOnMouseDown=!1)}))}),V=Xe(te=>{const me=lr(te);function be(){M(te),me?.removeEventListener(te.type,be)}me?.addEventListener(te.type,be)}),Q=Xe(te=>{const me=I.current;if(I.current=!1,Z.clear(),te.type==="mousedown"&&_.current&&!_.current.dismissOnMouseDown)return;const be=lr(te);function et(){te.type==="pointerdown"?oe(te):K(te,me),be?.removeEventListener(te.type,et)}be?.addEventListener(te.type,et)}),ee=Xe(te=>{if(F()!=="sloppy"||!_.current||oa(te,a.select("floatingElement"))||oa(te,a.select("domReferenceElement")))return;const me=te.touches[0];if(!me)return;const be=Math.abs(me.clientX-_.current.startX),et=Math.abs(me.clientY-_.current.startY),Te=Math.sqrt(be*be+et*et);Te>5&&(_.current.dismissOnTouchEnd=!0),Te>10&&(K(te),Z.clear(),_.current=null)}),re=Xe(te=>{const me=lr(te);function be(){ee(te),me?.removeEventListener(te.type,be)}me?.addEventListener(te.type,be)}),we=Xe(te=>{F()!=="sloppy"||!_.current||oa(te,a.select("floatingElement"))||oa(te,a.select("domReferenceElement"))||(_.current.dismissOnTouchEnd&&K(te),Z.clear(),_.current=null)}),de=Xe(te=>{const me=lr(te);function be(){we(te),me?.removeEventListener(te.type,be)}me?.addEventListener(te.type,be)});x.useEffect(()=>{if(!i||!m)return;p.current.__escapeKeyBubbles=P,p.current.__outsidePressBubbles=A;const te=new Ys;function me(_e){a.setOpen(!1,ft(sa,_e))}function be(){te.clear(),fe.current=!0}function et(){te.start(Cf()?5:0,()=>{fe.current=!1})}const Te=or(s);Te.addEventListener("pointerdown",ce,!0),y&&(Te.addEventListener("keydown",k),Te.addEventListener("compositionstart",be),Te.addEventListener("compositionend",et)),j&&(Te.addEventListener("click",Q,!0),Te.addEventListener("pointerdown",Q,!0),Te.addEventListener("touchstart",V,!0),Te.addEventListener("touchmove",re,!0),Te.addEventListener("touchend",de,!0),Te.addEventListener("mousedown",Q,!0));let xe=[];return E&&(sn(d)&&(xe=Xi(d)),sn(s)&&(xe=xe.concat(Xi(s))),!sn(l)&&l&&l.contextElement&&(xe=xe.concat(Xi(l.contextElement)))),xe=xe.filter(_e=>_e!==Te.defaultView?.visualViewport),xe.forEach(_e=>{_e.addEventListener("scroll",me,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",ce,!0),y&&(Te.removeEventListener("keydown",k),Te.removeEventListener("compositionstart",be),Te.removeEventListener("compositionend",et)),j&&(Te.removeEventListener("click",Q,!0),Te.removeEventListener("pointerdown",Q,!0),Te.removeEventListener("touchstart",V,!0),Te.removeEventListener("touchmove",re,!0),Te.removeEventListener("touchend",de,!0),Te.removeEventListener("mousedown",Q,!0)),xe.forEach(_e=>{_e.removeEventListener("scroll",me)}),te.clear()}},[p,s,l,d,y,j,i,f,E,m,P,A,k,K,Q,oe,V,re,de,ce,a]),x.useEffect(ae,[j,ae]);const ye=x.useMemo(()=>({onKeyDown:k,...b&&{[tP[C]]:te=>{a.setOpen(!1,ft(rc,te.nativeEvent))},...C!=="intentional"&&{onClick(te){a.setOpen(!1,ft(rc,te.nativeEvent))}}}}),[k,a,b,C]),Fe=Xe(te=>{const me=lr(te.nativeEvent);!Vt(a.select("floatingElement"),me)||te.button!==0||(I.current=!0)}),ve=x.useMemo(()=>({onKeyDown:k,onPointerDown:Fe,onMouseDown:Fe,onMouseUp:Fe,onClickCapture:z,onMouseDownCapture:z,onPointerDownCapture:z,onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[k,Fe,z]);return x.useMemo(()=>m?{reference:ye,floating:ve,trigger:ye}:{},[m,ye,ve])}var af=Symbol("NOT_FOUND");function aP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function iP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function oP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(a=>typeof a=="function")){const a=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${a}]`)}}var iS=e=>Array.isArray(e)?e:[e];function sP(e){const t=Array.isArray(e[0])?e[0]:e;return oP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function lP(e,t){const a=[],{length:i}=e;for(let s=0;s<i;s++)a.push(e[s].apply(null,t));return a}function cP(e){let t;return{get(a){return t&&e(t.key,a)?t.value:af},put(a,i){t={key:a,value:i}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function uP(e,t){let a=[];function i(f){const p=a.findIndex(m=>t(f,m.key));if(p>-1){const m=a[p];return p>0&&(a.splice(p,1),a.unshift(m)),m.value}return af}function s(f,p){i(f)===af&&(a.unshift({key:f,value:p}),a.length>e&&a.pop())}function l(){return a}function d(){a=[]}return{get:i,put:s,getEntries:l,clear:d}}var dP=(e,t)=>e===t;function fP(e){return function(a,i){if(a===null||i===null||a.length!==i.length)return!1;const{length:s}=a;for(let l=0;l<s;l++)if(!e(a[l],i[l]))return!1;return!0}}function hP(e,t){const a=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:i=dP,maxSize:s=1,resultEqualityCheck:l}=a,d=fP(i);let f=0;const p=s<=1?cP(d):uP(s,d);function m(){let y=p.get(arguments);if(y===af){if(y=e.apply(null,arguments),f++,l){const w=p.getEntries().find(b=>l(b.value,y));w&&(y=w.value,f!==0&&f--)}p.put(arguments,y)}return y}return m.clearCache=()=>{p.clear(),m.resetResultsCount()},m.resultsCount=()=>f,m.resetResultsCount=()=>{f=0},m}var mP=class{constructor(e){this.value=e}deref(){return this.value}},pP=typeof WeakRef<"u"?WeakRef:mP,gP=0,oS=1;function ud(){return{s:gP,v:void 0,o:null,p:null}}function wT(e,t={}){let a=ud();const{resultEqualityCheck:i}=t;let s,l=0;function d(){let f=a;const{length:p}=arguments;for(let v=0,w=p;v<w;v++){const b=arguments[v];if(typeof b=="function"||typeof b=="object"&&b!==null){let C=f.o;C===null&&(f.o=C=new WeakMap);const E=C.get(b);E===void 0?(f=ud(),C.set(b,f)):f=E}else{let C=f.p;C===null&&(f.p=C=new Map);const E=C.get(b);E===void 0?(f=ud(),C.set(b,f)):f=E}}const m=f;let y;if(f.s===oS)y=f.v;else if(y=e.apply(null,arguments),l++,i){const v=s?.deref?.()??s;v!=null&&i(v,y)&&(y=v,l!==0&&l--),s=typeof y=="object"&&y!==null||typeof y=="function"?new pP(y):y}return m.s=oS,m.v=y,y}return d.clearCache=()=>{a=ud(),d.resetResultsCount()},d.resultsCount=()=>l,d.resetResultsCount=()=>{l=0},d}function ST(e,...t){const a=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let l=0,d=0,f,p={},m=s.pop();typeof m=="object"&&(p=m,m=s.pop()),aP(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);const y={...a,...p},{memoize:v,memoizeOptions:w=[],argsMemoize:b=wT,argsMemoizeOptions:C=[]}=y,E=iS(w),T=iS(C),N=sP(s),R=v(function(){return l++,m.apply(null,arguments)},...E),O=b(function(){d++;const I=lP(N,arguments);return f=R.apply(null,I),f},...T);return Object.assign(O,{resultFunc:m,memoizedResultFunc:R,dependencies:N,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:v,argsMemoize:b})};return Object.assign(i,{withTypes:()=>i}),i}var yP=ST(wT),vP=Object.assign((e,t=yP)=>{iP(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const a=Object.keys(e),i=a.map(l=>e[l]);return t(i,(...l)=>l.reduce((d,f,p)=>(d[a[p]]=f,d),{}))},{withTypes:()=>vP});ST({memoize:hP,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const $e=(e,t,a,i,s,l,...d)=>{if(d.length>0)throw new Error(Da(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Sp={exports:{}},Ep={};var sS;function xP(){if(sS)return Ep;sS=1;var e=yc(),t=W1();function a(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var i=typeof Object.is=="function"?Object.is:a,s=t.useSyncExternalStore,l=e.useRef,d=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Ep.useSyncExternalStoreWithSelector=function(m,y,v,w,b){var C=l(null);if(C.current===null){var E={hasValue:!1,value:null};C.current=E}else E=C.current;C=f(function(){function N(P){if(!R){if(R=!0,O=P,P=w(P),b!==void 0&&E.hasValue){var A=E.value;if(b(A,P))return j=A}return j=P}if(A=j,i(O,P))return A;var _=w(P);return b!==void 0&&b(A,_)?(O=P,A):(O=P,j=_)}var R=!1,O,j,I=v===void 0?null:v;return[function(){return N(y())},I===null?void 0:function(){return N(I())}]},[y,v,w,b]);var T=s(m,C[0],C[1]);return d(function(){E.hasValue=!0,E.value=T},[T]),p(T),T},Ep}var lS;function bP(){return lS||(lS=1,Sp.exports=xP()),Sp.exports}var wP=bP();const SP=ey(19),EP=SP?CP:TP;function je(e,t,a,i,s){return EP(e,t,a,i,s)}function CP(e,t,a,i,s){const l=x.useCallback(()=>t(e.getSnapshot(),a,i,s),[e,t,a,i,s]);return M_.useSyncExternalStore(e.subscribe,l,l)}function TP(e,t,a,i,s){return wP.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,a,i,s))}class Is{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const a=this.updateTick;for(const i of this.listeners){if(a!==this.updateTick)return;i(t)}}update(t){for(const a in t)if(!Object.is(this.state[a],t[a])){Is.prototype.setState.call(this,{...this.state,...t});return}}set(t,a){Object.is(this.state[t],a)||Is.prototype.setState.call(this,{...this.state,[t]:a})}notifyAll(){const t={...this.state};Is.prototype.setState.call(this,t)}}class RP extends Is{constructor(t,a={},i){super(t),this.context=a,this.selectors=i}controlledValues=new Map;useSyncedValue(t,a){x.useDebugValue(t),Qe(()=>{this.state[t]!==a&&this.set(t,a)},[t,a])}useSyncedValueWithCleanup(t,a){Qe(()=>(this.state[t]!==a&&this.set(t,a),()=>{this.set(t,void 0)}),[t,a])}useSyncedValues(t){const a=Object.values(t);Qe(()=>{this.update(t)},a)}useControlledProp(t,a,i){x.useDebugValue(t);const s=a!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,s),!s&&!Object.is(this.state[t],i)&&super.setState({...this.state,[t]:i})),Qe(()=>{s&&!Object.is(this.state[t],a)&&super.setState({...this.state,[t]:a})},[t,a,i,s])}set(t,a){this.controlledValues.get(t)!==!0&&super.set(t,a)}update(t){const a={...t};for(const i in a)if(Object.hasOwn(a,i)&&this.controlledValues.get(i)===!0){delete a[i];continue}super.update(a)}setState(t){const a={...t};for(const i in a)if(Object.hasOwn(a,i)&&this.controlledValues.get(i)===!0){delete a[i];continue}super.setState({...this.state,...a})}select=(t,a,i,s)=>{const l=this.selectors[t];return l(this.state,a,i,s)};useState=(t,a,i,s)=>{x.useDebugValue(t);const l=this.selectors[t];return je(this,l,a,i,s)};useContextCallback(t,a){x.useDebugValue(t);const i=Xe(a??mn);this.context[t]=i}useStateSetter(t){const a=x.useRef(void 0);return a.current===void 0&&(a.current=i=>{this.set(t,i)}),a.current}observe(t,a){let i;typeof t=="function"?i=t:i=this.selectors[t];let s=i(this.state);return a(s,s,this),this.subscribe(l=>{const d=i(l);if(!Object.is(s,d)){const f=s;s=d,a(d,f,this)}})}}const NP={open:$e(e=>e.open),domReferenceElement:$e(e=>e.domReferenceElement),referenceElement:$e(e=>e.positionReference??e.referenceElement),floatingElement:$e(e=>e.floatingElement),floatingId:$e(e=>e.floatingId)};class AP extends RP{constructor(t){const{nested:a,noEmit:i,onOpenChange:s,triggerElements:l,...d}=t;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:BU(),nested:a,noEmit:i,triggerElements:l},NP)}setOpen=(t,a)=>{if((!t||!this.state.open||iT(a.event))&&(this.context.dataRef.current.openEvent=t?a.event:void 0),!this.context.noEmit){const i={open:t,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",i)}this.context.onOpenChange?.(t,a)}}class DP{constructor(){this.elements=new Set,this.idMap=new Map}add(t,a){const i=this.idMap.get(t);i!==a&&(i!==void 0&&this.elements.delete(i),this.elements.add(a),this.idMap.set(t,a))}delete(t){const a=this.idMap.get(t);a&&(this.elements.delete(a),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const a of this.elements)if(t(a))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function ET(e){const{open:t=!1,onOpenChange:a,elements:i={}}=e,s=ny(),l=gT()!=null,d=da(()=>new AP({open:t,onOpenChange:a,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:i.triggers??new DP,floatingId:s,nested:l,noEmit:e.noEmit||!1})).current;return Qe(()=>{const f={open:t,floatingId:s};i.reference!==void 0&&(f.referenceElement=i.reference,f.domReferenceElement=sn(i.reference)?i.reference:null),i.floating!==void 0&&(f.floatingElement=i.floating),d.update(f)},[t,s,i.reference,i.floating,d]),d.context.onOpenChange=a,d.context.nested=l,d.context.noEmit=e.noEmit||!1,d}function OP(e={}){const{nodeId:t,externalTree:a}=e,i=ET(e),s=e.rootContext||i,l={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[d,f]=x.useState(null),p=x.useRef(null),m=Lf(a);Qe(()=>{l.domReference&&(p.current=l.domReference)},[l.domReference]);const y=rE({...e,elements:{...l,...d&&{reference:d}}}),v=x.useCallback(A=>{const _=sn(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;f(_),y.refs.setReference(_)},[y.refs]),[w,b]=x.useState(null),[C,E]=x.useState(null);s.useSyncedValue("referenceElement",w),s.useSyncedValue("domReferenceElement",sn(w)?w:null),s.useSyncedValue("floatingElement",C);const T=x.useCallback(A=>{(sn(A)||A===null)&&(p.current=A,b(A)),(sn(y.refs.reference.current)||y.refs.reference.current===null||A!==null&&!sn(A))&&y.refs.setReference(A)},[y.refs,b]),N=x.useCallback(A=>{E(A),y.refs.setFloating(A)},[y.refs]),R=x.useMemo(()=>({...y.refs,setReference:T,setFloating:N,setPositionReference:v,domReference:p}),[y.refs,T,N,v]),O=x.useMemo(()=>({...y.elements,domReference:l.domReference}),[y.elements,l.domReference]),j=s.useState("open"),I=s.useState("floatingId"),P=x.useMemo(()=>({...y,dataRef:s.context.dataRef,open:j,onOpenChange:s.setOpen,events:s.context.events,floatingId:I,refs:R,elements:O,nodeId:t,rootStore:s}),[y,R,O,t,s,j,I]);return Qe(()=>{s.context.dataRef.current.floatingContext=P;const A=m?.nodesRef.current.find(_=>_.id===t);A&&(A.context=P)}),x.useMemo(()=>({...y,context:P,refs:R,elements:O,rootStore:s}),[y,R,O,P,s])}function jP(e=[]){const t=e.map(m=>m?.reference),a=e.map(m=>m?.floating),i=e.map(m=>m?.item),s=e.map(m=>m?.trigger),l=x.useCallback(m=>dd(m,e,"reference"),t),d=x.useCallback(m=>dd(m,e,"floating"),a),f=x.useCallback(m=>dd(m,e,"item"),i),p=x.useCallback(m=>dd(m,e,"trigger"),s);return x.useMemo(()=>({getReferenceProps:l,getFloatingProps:d,getItemProps:f,getTriggerProps:p}),[l,d,f,p])}function dd(e,t,a){const i=new Map,s=a==="item",l={};a==="floating"&&(l.tabIndex=-1,l[Qp]="");for(const d in e)s&&e&&(d===eT||d===tT)||(l[d]=e[d]);for(let d=0;d<t.length;d+=1){let f;const p=t[d]?.[a];typeof p=="function"?f=e?p(e):null:f=p,f&&cS(l,f,s,i)}return cS(l,e,s,i),l}function cS(e,t,a,i){for(const s in t){const l=t[s];a&&(s===eT||s===tT)||(s.startsWith("on")?(i.has(s)||i.set(s,[]),typeof l=="function"&&(i.get(s)?.push(l),e[s]=(...d)=>i.get(s)?.map(f=>f(...d)).find(f=>f!==void 0))):e[s]=l)}}const MP="Escape";function If(e,t,a){switch(e){case"vertical":return t;case"horizontal":return a;default:return t||a}}function fd(e,t){return If(t,e===ly||e===Ac,e===Qi||e===Zi)}function Cp(e,t,a){return If(t,e===Ac,a?e===Qi:e===Zi)||e==="Enter"||e===" "||e===""}function _P(e,t,a){return If(t,a?e===Qi:e===Zi,e===Ac)}function kP(e,t,a,i){const s=a?e===Zi:e===Qi,l=e===ly;return t==="both"||t==="horizontal"&&i&&i>1?e===MP:If(t,s,l)}function LP(e,t){const a="rootStore"in e?e.rootStore:e,i=a.useState("open"),s=a.useState("floatingElement"),l=a.useState("domReferenceElement"),d=a.context.dataRef,{listRef:f,activeIndex:p,onNavigate:m=()=>{},enabled:y=!0,selectedIndex:v=null,allowEscape:w=!1,loopFocus:b=!1,nested:C=!1,rtl:E=!1,virtual:T=!1,focusItemOnOpen:N="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:O=!0,disabledIndices:j=void 0,orientation:I="vertical",parentOrientation:P,cols:A=1,scrollItemIntoView:_=!0,itemSizes:Z,dense:ne=!1,id:ae,resetOnPointerLeave:fe=!0,externalTree:pe}=t,ce=Jp(s),F=cr(ce),k=gT(),X=Lf(pe);Qe(()=>{d.current.orientation=I},[d,I]);const z=Zp(l),K=x.useRef(N),oe=x.useRef(v??-1),M=x.useRef(null),V=x.useRef(!0),Q=Xe(Oe=>{m(oe.current===-1?null:oe.current,Oe)}),ee=x.useRef(Q),re=x.useRef(!!s),we=x.useRef(i),de=x.useRef(!1),ye=x.useRef(!1),Fe=cr(j),ve=cr(i),te=cr(_),me=cr(v),be=cr(fe),et=Xe(()=>{function Oe(at){T?X?.events.emit("virtualfocus",at):Rd(at,{sync:de.current,preventScroll:!0})}const Ne=f.current[oe.current],ke=ye.current;Ne&&Oe(Ne),(de.current?at=>at():requestAnimationFrame)(()=>{const at=f.current[oe.current]||Ne;if(!at)return;Ne||Oe(at);const Be=te.current;Be&&xe&&(ke||!V.current)&&at.scrollIntoView?.(typeof Be=="boolean"?{block:"nearest",inline:"nearest"}:Be)})});Qe(()=>{y&&(i&&s?(oe.current=v??-1,K.current&&v!=null&&(ye.current=!0,Q())):re.current&&(oe.current=-1,ee.current()))},[y,i,s,v,Q]),Qe(()=>{if(y){if(!i){de.current=!1;return}if(s)if(p==null){if(de.current=!1,me.current!=null)return;if(re.current&&(oe.current=-1,et()),(!we.current||!re.current)&&K.current&&(M.current!=null||K.current===!0&&M.current==null)){let Oe=0;const Ne=()=>{f.current[0]==null?(Oe<2&&(Oe?requestAnimationFrame:queueMicrotask)(Ne),Oe+=1):(oe.current=M.current==null||Cp(M.current,I,E)||C?xp(f):$w(f),M.current=null,Q())};Ne()}}else ac(f,p)||(oe.current=p,et(),ye.current=!1)}},[y,i,s,p,me,C,f,I,E,Q,et,Fe]),Qe(()=>{if(!y||s||!X||T||!re.current)return;const Oe=X.nodesRef.current,Ne=Oe.find(at=>at.id===k)?.context?.elements.floating,ke=Fi(or(s)),rt=Oe.some(at=>at.context&&Vt(at.context.elements.floating,ke));Ne&&!rt&&V.current&&Ne.focus({preventScroll:!0})},[y,s,X,k,T]),Qe(()=>{ee.current=Q,we.current=i,re.current=!!s}),Qe(()=>{i||(M.current=null,K.current=N)},[i,N]);const Te=p!=null,xe=x.useMemo(()=>{function Oe(ke){if(!ve.current)return;const rt=f.current.indexOf(ke.currentTarget);rt!==-1&&oe.current!==rt&&(oe.current=rt,Q(ke))}return{onFocus(ke){de.current=!0,Oe(ke)},onClick:({currentTarget:ke})=>ke.focus({preventScroll:!0}),onMouseMove(ke){de.current=!0,ye.current=!1,R&&Oe(ke)},onPointerLeave(ke){if(!ve.current||!V.current||ke.pointerType==="touch")return;de.current=!0;const rt=ke.relatedTarget;!R||f.current.includes(rt)||be.current&&(oe.current=-1,Q(ke),T||F.current?.focus({preventScroll:!0}))}}},[ve,F,R,f,Q,be,T]),_e=x.useCallback(()=>P??X?.nodesRef.current.find(Oe=>Oe.id===k)?.context?.dataRef?.current.orientation,[k,X,P]),dt=Xe(Oe=>{if(V.current=!1,de.current=!0,Oe.which===229||!ve.current&&Oe.currentTarget===F.current)return;if(C&&kP(Oe.key,I,E,A)){fd(Oe.key,_e())||En(Oe),a.setOpen(!1,ft(Td,Oe.nativeEvent)),On(l)&&(T?X?.events.emit("virtualfocus",l):l.focus());return}const Ne=oe.current,ke=xp(f,j),rt=$w(f,j);if(z||(Oe.key==="Home"&&(En(Oe),oe.current=ke,Q(Oe)),Oe.key==="End"&&(En(Oe),oe.current=rt,Q(Oe))),A>1){const at=Z||Array.from({length:f.current.length},()=>({width:1,height:1})),Be=pU(at,A,ne),gt=Be.findIndex(vn=>vn!=null&&!ic(f,vn,j)),Gt=Be.reduce((vn,jt,De)=>jt!=null&&!ic(f,jt,j)?De:vn,-1),yn=Be[mU({current:Be.map(vn=>vn!=null?f.current[vn]:null)},{event:Oe,orientation:I,loopFocus:b,rtl:E,cols:A,disabledIndices:yU([...(typeof j!="function"?j:null)||f.current.map((vn,jt)=>ic(f,jt,j)?jt:void 0),void 0],Be),minIndex:gt,maxIndex:Gt,prevIndex:gU(oe.current>rt?ke:oe.current,at,Be,A,Oe.key===Ac?"bl":Oe.key===(E?Qi:Zi)?"tr":"tl"),stopEvent:!0})];if(yn!=null&&(oe.current=yn,Q(Oe)),I==="both")return}if(fd(Oe.key,I)){if(En(Oe),i&&!T&&Fi(Oe.currentTarget.ownerDocument)===Oe.currentTarget){oe.current=Cp(Oe.key,I,E)?ke:rt,Q(Oe);return}Cp(Oe.key,I,E)?b?Ne>=rt?w&&Ne!==f.current.length?oe.current=-1:(de.current=!1,oe.current=ke):oe.current=Qn(f,{startingIndex:Ne,disabledIndices:j}):oe.current=Math.min(rt,Qn(f,{startingIndex:Ne,disabledIndices:j})):b?Ne<=ke?w&&Ne!==-1?oe.current=f.current.length:(de.current=!1,oe.current=rt):oe.current=Qn(f,{startingIndex:Ne,decrement:!0,disabledIndices:j}):oe.current=Math.max(ke,Qn(f,{startingIndex:Ne,decrement:!0,disabledIndices:j})),ac(f,oe.current)&&(oe.current=-1),Q(Oe)}}),tt=x.useMemo(()=>T&&i&&Te&&{"aria-activedescendant":`${ae}-${p}`},[T,i,Te,ae,p]),ot=x.useMemo(()=>({"aria-orientation":I==="both"?void 0:I,...z?{}:tt,onKeyDown(Oe){if(Oe.key==="Tab"&&Oe.shiftKey&&i&&!T){const Ne=lr(Oe.nativeEvent);if(Ne&&!Vt(F.current,Ne))return;En(Oe),a.setOpen(!1,ft(ty,Oe.nativeEvent)),On(l)&&l.focus();return}dt(Oe)},onPointerMove(){V.current=!0}}),[tt,dt,F,I,z,a,i,T,l]),Re=x.useMemo(()=>{function Oe(ke){N==="auto"&&rT(ke.nativeEvent)&&(K.current=!T)}function Ne(ke){K.current=N,N==="auto"&&aT(ke.nativeEvent)&&(K.current=!0)}return{onKeyDown(ke){const rt=a.select("open");V.current=!1;const at=ke.key.startsWith("Arrow"),Be=_P(ke.key,_e(),E),gt=fd(ke.key,I),Gt=(C?Be:gt)||ke.key==="Enter"||ke.key.trim()==="";if(T&&rt)return dt(ke);if(!(!rt&&!O&&at)){if(Gt){const yn=fd(ke.key,_e());M.current=C&&yn?null:ke.key}if(C){Be&&(En(ke),rt?(oe.current=xp(f,Fe.current),Q(ke)):a.setOpen(!0,ft(Td,ke.nativeEvent,ke.currentTarget)));return}gt&&(me.current!=null&&(oe.current=me.current),En(ke),!rt&&O?a.setOpen(!0,ft(Td,ke.nativeEvent,ke.currentTarget)):dt(ke),rt&&Q(ke))}},onFocus(ke){a.select("open")&&!T&&(oe.current=-1,Q(ke))},onPointerDown:Ne,onPointerEnter:Ne,onMouseDown:Oe,onClick:Oe}},[dt,Fe,N,f,C,Q,a,O,I,_e,E,me,T]),qe=x.useMemo(()=>({...tt,...Re}),[tt,Re]);return x.useMemo(()=>y?{reference:qe,floating:ot,item:xe,trigger:Re}:{},[y,qe,ot,Re,xe])}function IP(e,t){const a="rootStore"in e?e.rootStore:e,i=a.useState("open"),s=a.context.dataRef,{listRef:l,activeIndex:d,onMatch:f,onTypingChange:p,enabled:m=!0,findMatch:y=null,resetMs:v=750,ignoreKeys:w=As,selectedIndex:b=null}=t,C=Lo(),E=x.useRef(""),T=x.useRef(b??d??-1),N=x.useRef(null);Qe(()=>{i&&(C.clear(),N.current=null,E.current="")},[i,C]),Qe(()=>{i&&E.current===""&&(T.current=b??d??-1)},[i,b,d]);const R=Xe(P=>{P?s.current.typing||(s.current.typing=P,p?.(P)):s.current.typing&&(s.current.typing=P,p?.(P))}),O=Xe(P=>{function A(fe,pe,ce){const F=y?y(pe,ce):pe.find(k=>k?.toLocaleLowerCase().indexOf(ce.toLocaleLowerCase())===0);return F?fe.indexOf(F):-1}const _=l.current;if(E.current.length>0&&E.current[0]!==" "&&(A(_,_,E.current)===-1?R(!1):P.key===" "&&En(P)),_==null||w.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;i&&P.key!==" "&&(En(P),R(!0)),_.every(fe=>fe?fe[0]?.toLocaleLowerCase()!==fe[1]?.toLocaleLowerCase():!0)&&E.current===P.key&&(E.current="",T.current=N.current),E.current+=P.key,C.start(v,()=>{E.current="",T.current=N.current,R(!1)});const ne=T.current,ae=A(_,[..._.slice((ne||0)+1),..._.slice(0,(ne||0)+1)],E.current);ae!==-1?(f?.(ae),N.current=ae):P.key!==" "&&(E.current="",R(!1))}),j=x.useMemo(()=>({onKeyDown:O}),[O]),I=x.useMemo(()=>({onKeyDown:O,onKeyUp(P){P.key===" "&&R(!1)}}),[O,R]);return x.useMemo(()=>m?{reference:j,floating:I}:{},[m,j,I])}function zP(e){const t=x.useRef(""),a=x.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:x.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s&&e(s,s.pointerType),e(s,t.current),t.current=""},[e]),onPointerDown:a}}function UP(e){const[t,a]=x.useState(null),i=Xe((f,p)=>{e||a(p)}),s=x.useCallback(()=>{a(null)},[]),{onClick:l,onPointerDown:d}=zP(i);return x.useMemo(()=>({openMethod:t,reset:s,triggerProps:{onClick:l,onPointerDown:d}}),[t,s,l,d])}let dy=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xd.startingStyle]="startingStyle",e[e.endingStyle=Xd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),ng=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const PP={[ng.popupOpen]:""},YP={[ng.popupOpen]:"",[ng.pressed]:""},BP={[dy.open]:""},HP={[dy.closed]:""},VP={[dy.anchorHidden]:""},FP={open(e){return e?PP:null}},CT={open(e){return e?YP:null}},TT={open(e){return e?BP:HP},anchorHidden(e){return e?VP:null}};function GP(e){return ey(19)?e:e?"true":void 0}const qP=x.forwardRef(function(t,a){const{cutout:i,...s}=t;let l;if(i){const d=i?.getBoundingClientRect();l=`polygon(
|
|
67
|
+
0% 0%,
|
|
68
|
+
100% 0%,
|
|
69
|
+
100% 100%,
|
|
70
|
+
0% 100%,
|
|
71
|
+
0% 0%,
|
|
72
|
+
${d.left}px ${d.top}px,
|
|
73
|
+
${d.left}px ${d.bottom}px,
|
|
74
|
+
${d.right}px ${d.bottom}px,
|
|
75
|
+
${d.right}px ${d.top}px,
|
|
76
|
+
${d.left}px ${d.top}px
|
|
77
|
+
)`}return u.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})});function WP(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const RT=x.createContext(void 0),NT=x.createContext(void 0),AT=x.createContext(void 0),DT=x.createContext("");function li(){const e=x.useContext(RT);if(!e)throw new Error(Da(22));return e}function zf(){const e=x.useContext(NT);if(!e)throw new Error(Da(23));return e}function Ho(){const e=x.useContext(AT);if(!e)throw new Error(Da(24));return e}function fy(){return x.useContext(DT)}const KP=(e,t)=>Object.is(e,t);function Bs(e,t,a){return e==null||t==null?Object.is(e,t):a(e,t)}function hd(e,t,a){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:Bs(i,t,a))}function rg(e,t,a){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:Bs(i,t,a))}function $P(e,t,a){return e.filter(i=>!Bs(i,t,a))}const Me={id:$e(e=>e.id),query:$e(e=>e.query),items:$e(e=>e.items),selectedValue:$e(e=>e.selectedValue),open:$e(e=>e.open),mounted:$e(e=>e.mounted),forceMounted:$e(e=>e.forceMounted),inline:$e(e=>e.inline),activeIndex:$e(e=>e.activeIndex),selectedIndex:$e(e=>e.selectedIndex),isActive:$e((e,t)=>e.activeIndex===t),isSelected:$e((e,t)=>{const a=e.isItemEqualToValue,i=e.selectedValue;return Array.isArray(i)?i.some(s=>Bs(s,t,a)):Bs(i,t,a)}),transitionStatus:$e(e=>e.transitionStatus),popupProps:$e(e=>e.popupProps),inputProps:$e(e=>e.inputProps),triggerProps:$e(e=>e.triggerProps),getItemProps:$e(e=>e.getItemProps),positionerElement:$e(e=>e.positionerElement),listElement:$e(e=>e.listElement),triggerElement:$e(e=>e.triggerElement),inputElement:$e(e=>e.inputElement),popupSide:$e(e=>e.popupSide),openMethod:$e(e=>e.openMethod),inputInsidePopup:$e(e=>e.inputInsidePopup),selectionMode:$e(e=>e.selectionMode),listRef:$e(e=>e.listRef),labelsRef:$e(e=>e.labelsRef),popupRef:$e(e=>e.popupRef),emptyRef:$e(e=>e.emptyRef),inputRef:$e(e=>e.inputRef),keyboardActiveRef:$e(e=>e.keyboardActiveRef),chipsContainerRef:$e(e=>e.chipsContainerRef),clearRef:$e(e=>e.clearRef),valuesRef:$e(e=>e.valuesRef),allValuesRef:$e(e=>e.allValuesRef),name:$e(e=>e.name),disabled:$e(e=>e.disabled),readOnly:$e(e=>e.readOnly),required:$e(e=>e.required),grid:$e(e=>e.grid),isGrouped:$e(e=>e.isGrouped),virtualized:$e(e=>e.virtualized),onOpenChangeComplete:$e(e=>e.onOpenChangeComplete),openOnInputClick:$e(e=>e.openOnInputClick),itemToStringLabel:$e(e=>e.itemToStringLabel),isItemEqualToValue:$e(e=>e.isItemEqualToValue),modal:$e(e=>e.modal),autoHighlight:$e(e=>e.autoHighlight),submitOnItemClick:$e(e=>e.submitOnItemClick)};let uS=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const XP={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},OT={valid(e){return e===null?null:e?{[uS.valid]:""}:{[uS.invalid]:""}}},QP=x.createContext({invalid:void 0,name:void 0,validityData:{state:XP,errors:[],error:"",value:"",initialValue:null},setValidityData:mn,disabled:void 0,touched:!1,setTouched:mn,dirty:!1,setDirty:mn,filled:!1,setFilled:mn,focused:!1,setFocused:mn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=wr)=>e,getInputValidationProps:(e=wr)=>e,inputRef:{current:null},commit:async()=>{}}});function Oc(e=!0){const t=x.useContext(QP);if(t.setValidityData===mn&&!e)throw new Error(Da(28));return t}function ZP(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const JP=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:mn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function jT(){return x.useContext(JP)}function eY(e){const{enabled:t=!0,value:a,id:i,name:s,controlRef:l,commit:d}=e,{formRef:f}=jT(),{invalid:p,markedDirtyRef:m,validityData:y,setValidityData:v}=Oc(),w=Xe(e.getValue);Qe(()=>{if(!t)return;let b=a;b===void 0&&(b=w()),y.initialValue===null&&b!==null&&v(C=>({...C,initialValue:b}))},[t,v,a,y.initialValue,w]),Qe(()=>{!t||!i||f.current.fields.set(i,{getValue:w,name:s,controlRef:l,validityData:ZP(y,p),validate(){let b=a;b===void 0&&(b=w()),m.current=!0,Ra.flushSync(()=>d(b))}})},[d,l,t,f,w,i,p,m,s,y,a]),Qe(()=>{const b=f.current.fields;return()=>{i&&b.delete(i)}},[f,i])}const tY=x.createContext({controlId:void 0,setControlId:mn,labelId:void 0,setLabelId:mn,messageIds:[],setMessageIds:mn,getDescriptionProps:e=>e});function hy(){return x.useContext(tY)}function nY(e={}){const{id:t,implicit:a=!1,controlRef:i}=e,{controlId:s,setControlId:l}=hy(),d=XC(t);return Qe(()=>{if(!(!a&&!t||l===mn)){if(a){const f=i?.current;sn(f)&&f.closest("label")!=null?l(t??null):l(s??d)}else t&&l(t);return()=>{t&&l(void 0)}}},[t,i,s,l,a,d]),s??d}function ag(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function rY(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function xr(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return ag(e)}function Wl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?ag(e.value):ag(e)}function aY(e,t){return(a,i)=>{if(a==null)return!1;const s=xr(a,t);return e.contains(s,i)}}function iY(e,t,a){return(i,s)=>{if(i==null)return!1;if(!s)return!0;const l=xr(i,t),d=a!=null?xr(a,t):"";return d&&e.contains(d,s)&&d.length===s.length?!0:e.contains(l,s)}}const dS=new Map;function MT(e){return Array.isArray(e)?e.map(t=>MT(t)).join(","):e==null?"":String(e)}function oY(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},a=`${MT(e.locale)}|${JSON.stringify(t)}`,i=dS.get(a);if(i)return i;const s=new Intl.Collator(e.locale,t),l={contains(d,f,p){if(!f)return!0;const m=xr(d,p);for(let y=0;y<=m.length-f.length;y+=1)if(s.compare(m.slice(y,y+f.length),f)===0)return!0;return!1},startsWith(d,f,p){if(!f)return!0;const m=xr(d,p);return s.compare(m.slice(0,f.length),f)===0},endsWith(d,f,p){if(!f)return!0;const m=xr(d,p),y=f.length;return m.length>=y&&s.compare(m.slice(m.length-y),f)===0}};return dS.set(a,l),l}const sY=oY;function md(e,t){const a=x.useRef(e),i=Xe(t);Qe(()=>{a.current!==e&&i(a.current)},[e,i]),Qe(()=>{a.current=e},[e])}const _T=Symbol("none"),Eo={value:_T,index:-1};function lY(e){const{id:t,onOpenChangeComplete:a,defaultSelectedValue:i=null,selectedValue:s,onSelectedValueChange:l,defaultInputValue:d,inputValue:f,selectionMode:p="none",onItemHighlighted:m,name:y,disabled:v=!1,readOnly:w=!1,required:b=!1,inputRef:C,grid:E=!1,items:T,filteredItems:N,filter:R,openOnInputClick:O=!0,autoHighlight:j=!1,keepHighlight:I=!1,highlightItemOnHover:P=!0,itemToStringLabel:A,itemToStringValue:_,isItemEqualToValue:Z=KP,virtualized:ne=!1,inline:ae=!1,fillInputOnItemPress:fe=!0,modal:pe=!1,limit:ce=-1,autoComplete:F="list",locale:k,submitOnItemClick:X=!1}=e,{clearErrors:z}=jT(),{setDirty:K,validityData:oe,shouldValidateOnChange:M,setFilled:V,name:Q,disabled:ee,validation:re}=Oc(),we=nY({id:t}),de=sY({locale:k}),[ye,Fe]=x.useState(!1),[ve,te]=x.useState(null),me=x.useRef([]),be=x.useRef([]),et=x.useRef(null),Te=x.useRef(null),xe=x.useRef(null),_e=x.useRef(!0),dt=x.useRef(!1),tt=x.useRef(null),ot=x.useRef(null),Re=x.useRef(null),qe=x.useRef(Eo),Oe=x.useRef(null),Ne=x.useRef([]),ke=x.useRef([]),rt=ee||v,at=Q??y,Be=p==="multiple",gt=p==="single",Gt=f!==void 0||d!==void 0,yn=T!==void 0,vn=N!==void 0;let jt;j==="always"?jt="always":jt=j?"input-change":!1;const[De,jn]=gp({controlled:s,default:Be?i??As:i,name:"Combobox",state:"selectedValue"}),rn=x.useMemo(()=>R===null?()=>!0:R!==void 0?R:gt&&!ye?iY(de,A,De):aY(de,A),[R,gt,De,ye,de,A]),Pt=da(()=>Gt?d??"":gt?xr(De,A):"").current,[Mt,Yn]=gp({controlled:f,default:Pt,name:"Combobox",state:"inputValue"}),[st,Kn]=gp({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),Zt=rY(T),Lt=ve??(Mt===""?"":String(Mt).trim()),nr=gt?xr(De,A):"",Sr=gt&&!ye&&Lt!==""&&nr!==""&&nr.length===Lt.length&&de.contains(nr,Lt),Ur=Sr?"":Lt,Pr=yn&&vn&&Sr,Mn=x.useMemo(()=>T?Zt?T.flatMap(Ae=>Ae.items):T:As,[T,Zt]),$n=x.useMemo(()=>{if(N&&!Pr)return N;if(!T)return As;if(Zt){const Ge=T,it=[];let Xt=0;for(const ln of Ge){if(ce>-1&&Xt>=ce)break;const Tn=Ur===""?ln.items:ln.items.filter(ka=>rn(ka,Ur,A));if(Tn.length===0)continue;const Ma=ce>-1?ce-Xt:1/0,_a=Tn.slice(0,Ma);if(_a.length>0){const ka={...ln,items:_a};it.push(ka),Xt+=_a.length}}return it}if(Ur==="")return ce>-1?Mn.slice(0,ce):Mn;const Ae=[];for(const Ge of Mn){if(ce>-1&&Ae.length>=ce)break;rn(Ge,Ur,A)&&Ae.push(Ge)}return Ae},[N,Pr,T,Zt,Ur,ce,rn,A,Mn]),_n=x.useMemo(()=>Zt?$n.flatMap(Ge=>Ge.items):$n,[$n,Zt]),Je=da(()=>new Is({id:we,selectedValue:De,open:st,filter:rn,query:Lt,items:T,selectionMode:p,listRef:me,labelsRef:be,popupRef:et,emptyRef:xe,inputRef:Te,keyboardActiveRef:_e,chipsContainerRef:tt,clearRef:ot,valuesRef:Ne,allValuesRef:ke,selectionEventRef:Re,name:at,disabled:rt,readOnly:w,required:b,grid:E,isGrouped:Zt,virtualized:ne,openOnInputClick:O,itemToStringLabel:A,isItemEqualToValue:Z,modal:pe,autoHighlight:jt,submitOnItemClick:X,hasInputValue:Gt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:ae,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:a||mn,setOpen:mn,setInputValue:mn,setSelectedValue:mn,setIndices:mn,onItemHighlighted:mn,handleSelection:mn,getItemProps:()=>wr,forceMount:mn,requestSubmit:mn})).current,L=p==="none"?Mt:De,B=x.useMemo(()=>p==="none"?L:Array.isArray(De)?De.map(Ae=>Wl(Ae,_)):Wl(De,_),[L,_,p,De]),q=Xe(m),he=Xe(a),ge=je(Je,Me.activeIndex),Ye=je(Je,Me.selectedIndex),Ee=je(Je,Me.positionerElement),Se=je(Je,Me.listElement),Ce=je(Je,Me.triggerElement),ze=je(Je,Me.inputElement),He=je(Je,Me.inline),Le=je(Je,Me.inputInsidePopup),St=cr(Ce),{mounted:yt,setMounted:Jt,transitionStatus:qt}=ay(st),{openMethod:en,triggerProps:ht,reset:Cn}=UP(st);eY({id:we,name:at,commit:re.commit,value:L,controlRef:Le?St:Te,getValue:()=>B});const kn=Xe(()=>{T?be.current=_n.map(Ae=>xr(Ae,A)):Je.set("forceMounted",!0)}),Wt=x.useRef(De);Qe(()=>{De!==Wt.current&&kn()},[kn,De]);const an=Xe(Ae=>{Je.update(Ae);const Ge=Ae.type||"none";if(Ae.activeIndex!==void 0)if(Ae.activeIndex===null)qe.current!==Eo&&(qe.current=Eo,q(void 0,Gl(Ge,void 0,{index:-1})));else{const it=Ne.current[Ae.activeIndex];qe.current={value:it,index:Ae.activeIndex},q(it,Gl(Ge,void 0,{index:Ae.activeIndex}))}}),Kt=Xe((Ae,Ge)=>{if(dt.current=Ge.reason===Bi,e.onInputValueChange?.(Ae,Ge),!Ge.isCanceled){if(Ge.reason===Ao){const it=Ae.trim()!=="";it&&Fe(!0),Oe.current={hasQuery:it},it&&jt&&Je.state.activeIndex==null&&Je.set("activeIndex",0)}Yn(Ae)}}),Bn=Xe((Ae,Ge)=>{st!==Ae&&(Ge.reason==="escape-key"&&yn&&_n.length===0&&!Je.state.emptyRef.current&&Ge.allowPropagation(),e.onOpenChange?.(Ae,Ge),!Ge.isCanceled&&(!Ae&&ye&&(gt?(te(Lt),Lt===""&&Fe(!1)):Be&&(He||Le?an({activeIndex:null}):te(Lt),Kt("",ft(Bi,Ge.event)))),Kn(Ae)))}),Hn=Xe((Ae,Ge)=>{if(l?.(Ae,Ge),Ge.isCanceled)return;jn(Ae),(p==="none"&&et.current&&fe||gt&&!Je.state.inputInsidePopup)&&Kt(xr(Ae,A),ft(Ge.reason,Ge.event)),gt&&Ae!=null&&Ge.reason!==Ao&&ye&&te(Lt)}),Jr=Xe((Ae,Ge)=>{let it=Ge;if(it===void 0){if(ge===null)return;it=Ne.current[ge]}const Xt=lr(Ae),ln=Re.current??Ae;Re.current=null;const Tn=ft(G4,ln),Ma=Xt?.closest("a")?.getAttribute("href");if(Ma){Ma.startsWith("#")&&Bn(!1,Tn);return}if(Be){const _a=Array.isArray(De)?De:[],na=hd(_a,it,Je.state.isItemEqualToValue)?$P(_a,it,Je.state.isItemEqualToValue):[..._a,it];if(Hn(na,Tn),!(Te.current?Te.current.value.trim()!=="":!1))return;Je.state.inputInsidePopup?Kt("",ft(Bi,Tn.event)):Bn(!1,Tn)}else Hn(it,Tn),Bn(!1,Tn)}),ea=Xe(()=>{if(!Je.state.submitOnItemClick)return;const Ae=Je.state.inputElement?.form;Ae&&typeof Ae.requestSubmit=="function"&&Ae.requestSubmit()}),ta=Xe(()=>{if(Jt(!1),he?.(!1),Fe(!1),Cn(),te(null),an(p==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Be&&Te.current&&Te.current.value!==""&&!dt.current&&Kt("",ft(Bi)),gt)if(Je.state.inputInsidePopup)Te.current&&Te.current.value!==""&&Kt("",ft(Bi));else{const Ae=xr(De,A);Te.current&&Te.current.value!==Ae&&Kt(Ae,ft(Ae===""?Bi:sa))}}),vt=x.useMemo(()=>He&&Ee?{current:Ee.closest('[role="dialog"]')}:et,[He,Ee]);kf({enabled:!e.actionsRef,open:st,ref:vt,onComplete(){st||ta()}}),x.useImperativeHandle(e.actionsRef,()=>({unmount:ta}),[ta]),Qe(function(){if(st||p==="none")return;const Ge=T?Mn:ke.current;if(Be){const it=Array.isArray(De)?De:[],Xt=it[it.length-1],ln=rg(Ge,Xt,Z);an({selectedIndex:ln===-1?null:ln})}else{const it=rg(Ge,De,Z);an({selectedIndex:it===-1?null:it})}},[st,De,T,p,Mn,Be,Z,an]),Qe(()=>{T&&(Ne.current=_n,me.current.length=_n.length)},[T,_n]),Qe(()=>{const Ae=Oe.current;if(Ae&&(Ae.hasQuery?jt&&Je.set("activeIndex",0):jt==="always"&&Je.set("activeIndex",0),Oe.current=null),!st&&!He)return;const it=yn||vn?_n:Ne.current,Xt=Je.state.activeIndex;if(Xt==null){if(jt==="always"&&it.length>0){Je.set("activeIndex",0);return}qe.current!==Eo&&(qe.current=Eo,Je.state.onItemHighlighted(void 0,Gl(sa,void 0,{index:-1})));return}if(Xt>=it.length){qe.current!==Eo&&(qe.current=Eo,Je.state.onItemHighlighted(void 0,Gl(sa,void 0,{index:-1}))),Je.set("activeIndex",null);return}const ln=it[Xt],Tn=qe.current.value,Ma=Tn!==_T&&Je.state.isItemEqualToValue(ln,Tn);(qe.current.index!==Xt||!Ma)&&(qe.current={value:ln,index:Xt},Je.state.onItemHighlighted(ln,Gl(sa,void 0,{index:Xt})))},[ge,jt,vn,yn,_n,He,st,Je]),Qe(()=>{if(!T||p==="none")return;const Ae=Mn;if(Be){const Xt=Array.isArray(De)?De:As,ln=Xt.filter(Tn=>hd(Ae,Tn,Je.state.isItemEqualToValue));ln.length!==Xt.length&&jn(ln);return}if(De==null?!0:hd(Ae,De,Je.state.isItemEqualToValue))return;let it=null;if(i!=null&&hd(Ae,i,Je.state.isItemEqualToValue)&&(it=i),jn(it),!Je.state.inputInsidePopup){const Xt=xr(it,A);Te.current&&Te.current.value!==Xt&&Kt(Xt,ft(sa))}},[T,Mn,Be,p,De,i,jn,A,Je,Kt]),Qe(()=>{if(p==="none"){V(String(Mt)!=="");return}V(Be?Array.isArray(De)&&De.length>0:De!=null)},[V,p,Mt,De,Be]),x.useEffect(()=>{yn&&jt&&_n.length===0&&an({activeIndex:null})},[yn,jt,_n.length,an]),md(Lt,()=>{!st||Lt===""||Lt===String(Pt)||Fe(!0)}),md(De,()=>{if(p!=="none"&&(z(at),K(De!==oe.initialValue),M()?re.commit(De):re.commit(De,!0),Be&&Je.state.selectedIndex!==null&&(!Array.isArray(De)||De.length===0)&&an({activeIndex:null,selectedIndex:null}),gt&&!Gt&&!Le)){const Ae=xr(De,A);Mt!==Ae&&Kt(Ae,ft(sa))}}),md(Mt,()=>{p==="none"&&(z(at),K(Mt!==oe.initialValue),M()?re.commit(Mt):re.commit(Mt,!0))}),md(T,()=>{if(!gt||Gt||Le||ye)return;const Ae=xr(De,A);Mt!==Ae&&Kt(Ae,ft(sa))});const $t=ET({open:He?!0:st,onOpenChange:Bn,elements:{reference:Le?Ce:ze,floating:Ee}});let rr,xn;He||(rr=E?"grid":"listbox",xn=st?"true":"false");const xt=x.useMemo(()=>{const Ae=ze?.tagName==="INPUT",Ge=Ae||st,it=Ae?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Ge&&(it.role="combobox",it["aria-expanded"]=xn,it["aria-haspopup"]=rr,it["aria-controls"]=st?Se?.id:void 0,it["aria-autocomplete"]=F),{reference:it,floating:{role:"presentation"}}},[ze,st,xn,rr,Se?.id,F]),ja=bT($t,{enabled:!w&&!rt&&O,event:"mousedown-only",toggle:!1,touchOpenDelay:Le?0:50}),Vo=rP($t,{enabled:!w&&!rt&&!He,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:He?!0:void 0,outsidePress(Ae){const Ge=lr(Ae);return!Vt(Ce,Ge)&&!Vt(ot.current,Ge)&&!Vt(tt.current,Ge)}}),ao=LP($t,{enabled:!w&&!rt,id:we,listRef:me,activeIndex:ge,selectedIndex:Ye,virtual:!0,loopFocus:!0,allowEscape:!jt,focusItemOnOpen:ye||p==="none"&&!jt?!1:"auto",focusItemOnHover:P,resetOnPointerLeave:!I,cols:E?2:1,orientation:E?"horizontal":void 0,disabledIndices:As,onNavigate(Ae,Ge){!Ge&&!st||qt==="ending"||an(Ge?{activeIndex:Ae,type:_e.current?"keyboard":"pointer"}:{activeIndex:Ae})}}),{getReferenceProps:Fo,getFloatingProps:ci,getItemProps:Ws}=jP([xt,ja,Vo,ao]);WP(()=>{Je.update({inline:ae,popupProps:ci(),inputProps:Fo(),triggerProps:ht,getItemProps:Ws,setOpen:Bn,setInputValue:Kt,setSelectedValue:Hn,setIndices:an,onItemHighlighted:q,handleSelection:Jr,forceMount:kn,requestSubmit:ea})}),Qe(()=>{Je.update({id:we,selectedValue:De,open:st,mounted:yt,transitionStatus:qt,items:T,inline:ae,popupProps:ci(),inputProps:Fo(),triggerProps:ht,openMethod:en,getItemProps:Ws,selectionMode:p,name:at,disabled:rt,readOnly:w,required:b,grid:E,isGrouped:Zt,virtualized:ne,onOpenChangeComplete:he,openOnInputClick:O,itemToStringLabel:A,modal:pe,autoHighlight:jt,isItemEqualToValue:Z,submitOnItemClick:X,hasInputValue:Gt,requestSubmit:ea})},[Je,we,De,st,yt,qt,T,ci,Fo,Ws,en,ht,p,at,rt,w,b,re,E,Zt,ne,he,O,A,pe,Z,X,Gt,ae,ea,jt]);const dr=gc(C,re.inputRef),Ks=x.useMemo(()=>({query:Lt,filteredItems:$n,flatFilteredItems:_n}),[Lt,$n,_n]),jc=x.useMemo(()=>Array.isArray(L)?"":Wl(L,_),[L,_]),$s=Be&&Array.isArray(De)&&De.length>0,ui=x.useMemo(()=>!Be||!Array.isArray(De)||!at?null:De.map(Ae=>{const Ge=Wl(Ae,_);return u.jsx("input",{type:"hidden",name:at,value:Ge},Ge)}),[Be,De,at,_]),Mc=u.jsxs(x.Fragment,{children:[e.children,u.jsx("input",{...re.getInputValidationProps({onFocus(){if(Le){Ce?.focus();return}(Te.current||Ce)?.focus()},onChange(Ae){if(Ae.nativeEvent.defaultPrevented)return;const Ge=Ae.target.value,it=ft(Ao,Ae.nativeEvent);function Xt(){if(Be)return;if(p==="none"){K(Ge!==oe.initialValue),Kt(Ge,it),M()&&re.commit(Ge);return}const ln=Ne.current.find(Tn=>Wl(Tn,_).toLowerCase()===Ge.toLowerCase());ln!=null&&(K(ln!==oe.initialValue),Hn?.(ln,it),M()&&re.commit(ln))}T?Xt():(kn(),queueMicrotask(Xt))}}),id:we,name:Be||p==="none"?void 0:at,disabled:rt,required:b&&!$s,readOnly:w,value:jc,ref:dr,style:cy,tabIndex:-1,"aria-hidden":!0}),ui]});return u.jsx(RT.Provider,{value:Je,children:u.jsx(NT.Provider,{value:$t,children:u.jsx(AT.Provider,{value:Ks,children:u.jsx(DT.Provider,{value:Mt,children:Mc})})})})}function cY(e){const t=e.getBoundingClientRect(),a=window.getComputedStyle(e,"::before"),i=window.getComputedStyle(e,"::after");if(!(a.content!=="none"||i.content!=="none"))return t;const l=parseFloat(a.width)||0,d=parseFloat(a.height)||0,f=parseFloat(i.width)||0,p=parseFloat(i.height)||0,m=Math.max(t.width,l,f),y=Math.max(t.height,d,p),v=m-t.width,w=y-t.height;return{left:t.left-v/2,right:t.right+v/2,top:t.top-w/2,bottom:t.bottom+w/2}}const pd=2,uY={...CT,...OT},dY=x.forwardRef(function(t,a){const{render:i,className:s,nativeButton:l=!0,disabled:d=!1,...f}=t,{state:p,disabled:m,setTouched:y,setFocused:v,validationMode:w,validation:b}=Oc(),{labelId:C}=hy(),E=li(),T=je(E,Me.selectionMode),N=je(E,Me.disabled),R=je(E,Me.readOnly),O=je(E,Me.listElement),j=je(E,Me.triggerProps),I=je(E,Me.triggerElement),P=je(E,Me.inputInsidePopup),A=je(E,Me.open),_=je(E,Me.selectedValue),Z=je(E,Me.activeIndex),ne=je(E,Me.selectedIndex),ae=zf(),fe=fy(),pe=Lo(),ce=m||N||d,F=x.useRef("");function k(re){F.current=re.pointerType}const X=ae.select("domReferenceElement");x.useEffect(()=>{P&&I&&I!==X&&ae.set("domReferenceElement",I)},[I,X,ae,P]);const{reference:z}=IP(ae,{enabled:!A&&!R&&!N&&T==="single",listRef:E.state.labelsRef,activeIndex:Z,selectedIndex:ne,onMatch(re){const we=E.state.valuesRef.current[re];we!==void 0&&E.state.setSelectedValue(we,ft("none"))}}),{reference:K}=bT(ae,{enabled:!R&&!N,event:"mousedown"}),{buttonRef:oe,getButtonProps:M}=oy({native:l,disabled:ce}),V=x.useMemo(()=>({...p,open:A,disabled:ce}),[p,A,ce]),Q=Xe(re=>{E.set("triggerElement",re)});return Oa("button",t,{ref:[a,oe,Q],state:V,props:[j,K,z,{tabIndex:P?0:-1,disabled:ce,role:P?"combobox":void 0,"aria-expanded":A?"true":"false","aria-haspopup":P?"dialog":"listbox","aria-controls":A?O?.id:void 0,"aria-readonly":R||void 0,"aria-labelledby":C,onPointerDown:k,onPointerEnter:k,onFocus(){v(!0),!(ce||R)&&pe.start(0,E.state.forceMount)},onBlur(){if(y(!0),v(!1),w==="onBlur"){const re=T==="none"?fe:_;b.commit(re)}},onMouseDown(re){if(ce||R||(P||ae.set("domReferenceElement",re.currentTarget),E.state.forceMount(),F.current!=="touch"&&(E.state.inputRef.current?.focus(),P||re.preventDefault()),A))return;const we=qs(re.currentTarget);function de(ye){if(!I)return;const Fe=lr(ye),ve=E.state.positionerElement,te=E.state.listElement;if(Vt(I,Fe)||Vt(ve,Fe)||Vt(te,Fe)||Fe===I)return;const me=cY(I),be=ye.clientX>=me.left-pd&&ye.clientX<=me.right+pd,et=ye.clientY>=me.top-pd&&ye.clientY<=me.bottom+pd;be&&et||E.state.setOpen(!1,ft("cancel-open",ye))}P&&we.addEventListener("mouseup",de,{once:!0})},onKeyDown(re){ce||R||(re.key==="ArrowDown"||re.key==="ArrowUp")&&(En(re),E.state.setOpen(!0,ft(Td,re.nativeEvent)),E.state.inputRef.current?.focus())}},b?b.getValidationProps(f):f,M],stateAttributesMapping:uY})}),fY=x.createContext(void 0);function hY(){return x.useContext(fY)}const kT=x.createContext(void 0);function my(e){const t=x.useContext(kT);if(t===void 0&&!e)throw new Error(Da(21));return t}const mY={...CT,...OT,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},pY=x.forwardRef(function(t,a){const{render:i,className:s,disabled:l=!1,id:d,...f}=t,{state:p,disabled:m,setTouched:y,setFocused:v,validationMode:w,validation:b}=Oc(),{labelId:C}=hy(),E=hY(),N=!!my(!0),R=li(),{filteredItems:O}=Ho(),j=fy(),I=XC(d),P=HC(),A=je(R,Me.disabled),_=je(R,Me.readOnly),Z=je(R,Me.name),ne=je(R,Me.selectionMode),ae=je(R,Me.autoHighlight),fe=je(R,Me.inputProps),pe=je(R,Me.triggerProps),ce=je(R,Me.open),F=je(R,Me.mounted),k=je(R,Me.selectedValue),X=je(R,Me.popupSide),z=je(R,Me.positionerElement),K=!!ae,oe=F&&z?X:null,M=m||A||l,V=O.length===0,[Q,ee]=x.useState(null),re=x.useRef(!1),we=Xe(ve=>{const te=N||R.state.inline;te&&!R.state.hasInputValue&&R.state.setInputValue("",ft(sa)),R.update({inputElement:ve,inputInsidePopup:te})}),de=x.useMemo(()=>({...p,open:ce,disabled:M,readOnly:_,popupSide:oe,listEmpty:V}),[p,ce,M,_,oe,V]);function ye(ve){if(!E)return;let te;const{highlightedChipIndex:me}=E;if(me!==void 0){if(ve.key==="ArrowLeft")ve.preventDefault(),me>0?te=me-1:te=void 0;else if(ve.key==="ArrowRight")ve.preventDefault(),me<k.length-1?te=me+1:te=void 0;else if(ve.key==="Backspace"||ve.key==="Delete"){ve.preventDefault();const be=me>=k.length-1?k.length-2:me;te=be>=0?be:void 0,R.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return te}return ve.key==="ArrowLeft"&&(ve.currentTarget.selectionStart??0)===0&&k.length>0?(ve.preventDefault(),te=Math.max(k.length-1,0)):ve.key==="Backspace"&&ve.currentTarget.value===""&&k.length>0&&(R.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),ve.preventDefault()),te}return Oa("input",t,{state:de,ref:[a,R.state.inputRef,we],props:[fe,pe,{type:"text",value:t.value??Q??j,"aria-readonly":_||void 0,"aria-labelledby":C,disabled:M,readOnly:_,...ne==="none"&&Z&&{name:Z},id:I,onFocus(){v(!0)},onBlur(){if(y(!0),v(!1),w==="onBlur"){const ve=ne==="none"?j:k;b.commit(ve)}},onCompositionStart(ve){Qd||(re.current=!0,ee(ve.currentTarget.value))},onCompositionEnd(ve){re.current=!1;const te=ve.currentTarget.value;ee(null),R.state.setInputValue(te,ft(Ao,ve.nativeEvent))},onChange(ve){if(re.current){const et=ve.currentTarget.value;ee(et),et===""&&!R.state.openOnInputClick&&!R.state.inputInsidePopup&&R.state.setOpen(!1,ft(Bi,ve.nativeEvent));const Te=et.trim(),xe=K&&Te!=="";!_&&!M&&Te!==""&&(R.state.setOpen(!0,ft(Ao,ve.nativeEvent)),K||R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?"keyboard":"pointer"})),ce&&R.state.activeIndex!==null&&!xe&&R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?"keyboard":"pointer"});return}R.state.setInputValue(ve.currentTarget.value,ft(Ao,ve.nativeEvent));const te=ve.currentTarget.value==="",me=ft(Bi,ve.nativeEvent);te&&!R.state.inputInsidePopup&&(ne==="single"&&R.state.setSelectedValue(null,me),R.state.openOnInputClick||R.state.setOpen(!1,me));const be=ve.currentTarget.value.trim();!_&&!M&&be!==""&&(R.state.setOpen(!0,ft(Ao,ve.nativeEvent)),K||R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?"keyboard":"pointer"})),ce&&R.state.activeIndex!==null&&!K&&R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(ve){if(M||_||ve.ctrlKey||ve.shiftKey||ve.altKey||ve.metaKey)return;R.state.keyboardActiveRef.current=!0;const te=ve.currentTarget,me=te.scrollWidth-te.clientWidth,be=P==="rtl";if(ve.key==="Home"){En(ve);const Te=qw&&be?te.value.length:0;te.setSelectionRange(Te,Te),te.scrollLeft=0;return}if(ve.key==="End"){En(ve);const Te=qw&&be?0:te.value.length;te.setSelectionRange(Te,Te),te.scrollLeft=be?-me:me;return}if(!F&&ve.key==="Escape"){const Te=ne==="multiple"&&Array.isArray(k)?k.length===0:k===null,xe=ft($C,ve.nativeEvent),_e=ne==="multiple"?[]:null;R.state.setInputValue("",xe),R.state.setSelectedValue(_e,xe),!Te&&!R.state.inline&&!xe.isPropagationAllowed&&ve.stopPropagation();return}if(E&&ve.key==="Backspace"&&te.value===""&&E.highlightedChipIndex===void 0&&Array.isArray(k)&&k.length>0){const Te=k.slice(0,-1);R.state.setIndices({activeIndex:null,selectedIndex:null,type:R.state.keyboardActiveRef.current?"keyboard":"pointer"}),R.state.setSelectedValue(Te,ft(sa,ve.nativeEvent));return}const et=ye(ve);if(E?.setHighlightedChipIndex(et),et!==void 0?E?.chipsRef.current[et]?.focus():R.state.inputRef.current?.focus(),ve.which!==229&&ve.key==="Enter"&&ce){const Te=R.state.activeIndex,xe=ve.nativeEvent;if(Te===null){R.state.setOpen(!1,ft(sa,xe));return}En(ve);const _e=R.state.listRef.current[Te];_e&&(R.state.selectionEventRef.current=xe,_e.click(),R.state.selectionEventRef.current=null)}},onPointerMove(){R.state.keyboardActiveRef.current=!1},onPointerDown(){R.state.keyboardActiveRef.current=!1}},b?b.getValidationProps(f):f],stateAttributesMapping:mY})}),gY={...iy,...FP},yY=x.forwardRef(function(t,a){const{render:i,className:s,disabled:l=!1,nativeButton:d=!0,keepMounted:f=!1,...p}=t,{disabled:m}=Oc(),y=li(),v=je(y,Me.selectionMode),w=je(y,Me.disabled),b=je(y,Me.readOnly),C=je(y,Me.open),E=je(y,Me.selectedValue),T=fy();let N=!1;v==="none"?N=T!=="":v==="single"?N=E!=null:N=Array.isArray(E)&&E.length>0;const R=m||w||l,{buttonRef:O,getButtonProps:j}=oy({native:d,disabled:R}),{mounted:I,transitionStatus:P,setMounted:A}=ay(N),_=x.useMemo(()=>({disabled:R,open:C,transitionStatus:P}),[R,C,P]);kf({open:N,ref:y.state.clearRef,onComplete(){N||A(!1)}});const Z=Oa("button",t,{state:_,ref:[a,O,y.state.clearRef],props:[{tabIndex:-1,children:"x",disabled:R,"aria-readonly":b||void 0,onMouseDown(ae){ae.preventDefault()},onClick(ae){if(R||b)return;const fe=y.state.keyboardActiveRef;y.state.setInputValue("",ft(Vw,ae.nativeEvent)),v!=="none"?(y.state.setSelectedValue(Array.isArray(E)?[]:null,ft(Vw,ae.nativeEvent)),y.state.setIndices({activeIndex:null,selectedIndex:null,type:fe.current?"keyboard":"pointer"})):y.state.setIndices({activeIndex:null,type:fe.current?"keyboard":"pointer"}),y.state.inputRef.current?.focus()}},p,j],stateAttributesMapping:gY});return f||I?Z:null}),vY=x.createContext(null);function xY(){return x.useContext(vY)}function bY(e){const{children:t}=e,{filteredItems:a}=Ho(),i=xY(),s=i?i.items:a;return s?u.jsx(x.Fragment,{children:s.map(t)}):null}const wY=x.forwardRef(function(t,a){var i;const{render:s,className:l,children:d,...f}=t,p=li(),m=zf(),y=!!my(!0),{filteredItems:v}=Ho(),w=je(p,Me.items),b=je(p,Me.labelsRef),C=je(p,Me.listRef),E=je(p,Me.selectionMode),T=je(p,Me.grid),N=je(p,Me.popupProps),R=je(p,Me.disabled),O=je(p,Me.readOnly),j=je(p,Me.virtualized),I=E==="multiple",P=v.length===0,A=Xe(pe=>{p.set("positionerElement",pe)}),_=Xe(pe=>{p.set("listElement",pe)}),Z=x.useMemo(()=>typeof d=="function"?i||(i=u.jsx(bY,{children:d})):d,[d]),ne=x.useMemo(()=>({empty:P}),[P]),ae=m.useState("floatingId"),fe=Oa("div",t,{state:ne,ref:[a,_,y?null:A],props:[N,{children:Z,tabIndex:-1,id:ae,role:T?"grid":"listbox","aria-multiselectable":I?"true":void 0,onKeyDown(pe){if(!(R||O)&&pe.key==="Enter"){const ce=p.state.activeIndex;if(ce==null)return;En(pe);const F=pe.nativeEvent,k=p.state.listRef.current[ce];k&&(p.state.selectionEventRef.current=F,k.click(),p.state.selectionEventRef.current=null)}},onKeyDownCapture(){p.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){p.state.keyboardActiveRef.current=!1}},f]});return j?fe:u.jsx(b4,{elementsRef:C,labelsRef:w?void 0:b,children:fe})}),LT=x.createContext(void 0);function SY(){const e=x.useContext(LT);if(e===void 0)throw new Error(Da(20));return e}const EY=x.forwardRef(function(t,a){const{keepMounted:i=!1,...s}=t,l=li(),d=je(l,Me.mounted),f=je(l,Me.forceMounted);return d||i||f?u.jsx(LT.Provider,{value:i,children:u.jsx($U,{ref:a,...s})}):null}),CY=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:i,placement:s,rects:l,platform:d,elements:f,middlewareData:p}=t,{element:m,padding:y=0,offsetParent:v="real"}=Na(e,t)||{};if(m==null)return{};const w=_g(y),b={x:a,y:i},C=wf(s),E=bf(C),T=await d.getDimensions(m),N=C==="y",R=N?"top":"left",O=N?"bottom":"right",j=N?"clientHeight":"clientWidth",I=l.reference[E]+l.reference[C]-b[C]-l.floating[E],P=b[C]-l.reference[C],A=v==="real"?await d.getOffsetParent?.(m):f.floating;let _=f.floating[j]||l.floating[E];(!_||!await d.isElement?.(A))&&(_=f.floating[j]||l.floating[E]);const Z=I/2-P/2,ne=_/2-T[E]/2-1,ae=Math.min(w[R],ne),fe=Math.min(w[O],ne),pe=ae,ce=_-T[E]-fe,F=_/2-T[E]/2+Z,k=Ld(pe,F,ce),X=!p.arrow&&si(s)!=null&&F!==k&&l.reference[E]/2-(F<pe?ae:fe)-T[E]/2<0,z=X?F<pe?F-pe:F-ce:0;return{[C]:b[C]+z,data:{[C]:k,centerOffset:F-k-z,...X&&{alignmentOffset:z}},reset:X}}}),TY=(e,t)=>({...CY(e),options:[e,t]}),RY={name:"hide",async fn(e){const{width:t,height:a,x:i,y:s}=e.rects.reference,l=t===0&&a===0&&i===0&&s===0;return{data:{referenceHidden:(await cE().fn(e)).data?.referenceHidden||l}}}},NY={sideX:"left",sideY:"top"};function IT(e,t,a){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?a?"inline-start":"inline-end":"right",bottom:"bottom",left:i?a?"inline-end":"inline-start":"left"}[t]}function fS(e,t,a){const{rects:i,placement:s}=e;return{side:IT(t,Lr(s),a),align:si(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function AY(e){const{anchor:t,positionMethod:a="absolute",side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:p=5,sticky:m=!1,arrowPadding:y=5,disableAnchorTracking:v=!1,keepMounted:w=!1,floatingRootContext:b,mounted:C,collisionAvoidance:E,shiftCrossAxis:T=!1,nodeId:N,adaptiveOrigin:R,lazyFlip:O=!1,externalTree:j}=e,[I,P]=x.useState(null);!C&&I!==null&&P(null);const A=E.side||"flip",_=E.align||"flip",Z=E.fallbackAxisSide||"end",ne=typeof t=="function"?t:void 0,ae=Xe(ne),fe=ne?ae:t,pe=cr(t),F=HC()==="rtl",k=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[i],X=l==="center"?k:`${k}-${l}`;let z=p;const K=1,oe=i==="bottom"?K:0,M=i==="top"?K:0,V=i==="right"?K:0,Q=i==="left"?K:0;typeof z=="number"?z={top:z+oe,right:z+Q,bottom:z+M,left:z+V}:z&&(z={top:(z.top||0)+oe,right:(z.right||0)+Q,bottom:(z.bottom||0)+M,left:(z.left||0)+V});const ee={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:z},re=x.useRef(null),we=cr(s),de=cr(d),ve=[aE(Pt=>{const Mt=fS(Pt,i,F),Yn=typeof we.current=="function"?we.current(Mt):we.current,st=typeof de.current=="function"?de.current(Mt):de.current;return{mainAxis:Yn,crossAxis:st,alignmentAxis:st}},[typeof s!="function"?s:0,typeof d!="function"?d:0,F,i])],te=_==="none"&&A!=="shift",me=!te&&(m||T||A==="shift"),be=A==="none"?null:sE({...ee,padding:{top:z.top+K,right:z.right+K,bottom:z.bottom+K,left:z.left+K},mainAxis:!T&&A==="flip",crossAxis:_==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),et=te?null:iE(Pt=>{const Mt=qs(Pt.elements.floating).documentElement;return{...ee,rootBoundary:T?{x:0,y:0,width:Mt.clientWidth,height:Mt.clientHeight}:void 0,mainAxis:_!=="none",crossAxis:me,limiter:m||T?void 0:oE(Yn=>{if(!re.current)return{};const{width:st,height:Kn}=re.current.getBoundingClientRect(),Zt=$r(Lr(Yn.placement)),Lt=Zt==="y"?st:Kn,nr=Zt==="y"?z.left+z.right:z.top+z.bottom;return{offset:Lt/2+nr/2}})}},[ee,m,T,z,_]);A==="shift"||_==="shift"||l==="center"?ve.push(et,be):ve.push(be,et),ve.push(lE({...ee,apply({elements:{floating:Pt},rects:{reference:Mt},availableWidth:Yn,availableHeight:st}){Object.entries({"--available-width":`${Yn}px`,"--available-height":`${st}px`,"--anchor-width":`${Mt.width}px`,"--anchor-height":`${Mt.height}px`}).forEach(([Kn,Zt])=>{Pt.style.setProperty(Kn,Zt)})}}),TY(()=>({element:re.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Pt){const{elements:Mt,middlewareData:Yn,placement:st,rects:Kn,y:Zt}=Pt,Lt=Lr(st),nr=$r(Lt),Sr=re.current,Ur=Yn.arrow?.x||0,Pr=Yn.arrow?.y||0,Mn=Sr?.clientWidth||0,$n=Sr?.clientHeight||0,_n=Ur+Mn/2,Je=Pr+$n/2,L=Math.abs(Yn.shift?.y||0),B=Kn.reference.height/2,q=typeof s=="function"?s(fS(Pt,i,F)):s,he=L>q,ge={top:`${_n}px calc(100% + ${q}px)`,bottom:`${_n}px ${-q}px`,left:`calc(100% + ${q}px) ${Je}px`,right:`${-q}px ${Je}px`}[Lt],Ye=`${_n}px ${Kn.reference.y+B-Zt}px`;return Mt.floating.style.setProperty("--transform-origin",me&&nr==="y"&&he?Ye:ge),{}}},RY,R),Qe(()=>{!C&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[C,b]);const Te=x.useMemo(()=>({elementResize:!v&&typeof ResizeObserver<"u",layoutShift:!v&&typeof IntersectionObserver<"u"}),[v]),{refs:xe,elements:_e,x:dt,y:tt,middlewareData:ot,update:Re,placement:qe,context:Oe,isPositioned:Ne,floatingStyles:ke}=OP({rootContext:b,placement:X,middleware:ve,strategy:a,whileElementsMounted:w?void 0:(...Pt)=>Up(...Pt,Te),nodeId:N,externalTree:j}),{sideX:rt,sideY:at}=ot.adaptiveOrigin||NY,Be=Ne?a:"fixed",gt=x.useMemo(()=>R?{position:Be,[rt]:dt,[at]:tt}:{position:Be,...ke},[R,Be,rt,dt,at,tt,ke]),Gt=x.useRef(null);Qe(()=>{if(!C)return;const Pt=pe.current,Mt=typeof Pt=="function"?Pt():Pt,st=(hS(Mt)?Mt.current:Mt)||null||null;st!==Gt.current&&(xe.setPositionReference(st),Gt.current=st)},[C,xe,fe,pe]),x.useEffect(()=>{if(!C)return;const Pt=pe.current;typeof Pt!="function"&&hS(Pt)&&Pt.current!==Gt.current&&(xe.setPositionReference(Pt.current),Gt.current=Pt.current)},[C,xe,fe,pe]),x.useEffect(()=>{if(w&&C&&_e.domReference&&_e.floating)return Up(_e.domReference,_e.floating,Re,Te)},[w,C,_e,Re,Te]);const yn=Lr(qe),vn=IT(i,yn,F),jt=si(qe)||"center",De=!!ot.hide?.referenceHidden;Qe(()=>{O&&C&&Ne&&P(yn)},[O,C,Ne,yn]);const jn=x.useMemo(()=>({position:"absolute",top:ot.arrow?.y,left:ot.arrow?.x}),[ot.arrow]),rn=ot.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:gt,arrowStyles:jn,arrowRef:re,arrowUncentered:rn,side:vn,align:jt,physicalSide:yn,anchorHidden:De,refs:xe,context:Oe,isPositioned:Ne,update:Re}),[gt,jn,re,rn,vn,jt,yn,De,xe,Oe,Ne,Re])}function hS(e){return e!=null&&"current"in e}const DY=x.forwardRef(function(t,a){const{render:i,className:s,anchor:l,positionMethod:d="absolute",side:f="bottom",align:p="center",sideOffset:m=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:w=5,arrowPadding:b=5,sticky:C=!1,disableAnchorTracking:E=!1,collisionAvoidance:T=P4,...N}=t,R=li(),{filteredItems:O}=Ho(),j=zf(),I=SY(),P=je(R,Me.modal),A=je(R,Me.open),_=je(R,Me.mounted),Z=je(R,Me.openMethod),ne=je(R,Me.triggerElement),ae=je(R,Me.inputElement),fe=je(R,Me.inputInsidePopup),pe=O.length===0,F=AY({anchor:l??(fe?ne:ae),floatingRootContext:j,positionMethod:d,mounted:_,side:f,sideOffset:m,align:p,alignOffset:y,arrowPadding:b,collisionBoundary:v,collisionPadding:w,sticky:C,disableAnchorTracking:E,keepMounted:I,collisionAvoidance:T,lazyFlip:!0});YU(A&&P&&Z!=="touch",ne);const k=x.useMemo(()=>{const M={...F.positionerStyles};return A||(M.pointerEvents="none"),{role:"presentation",hidden:!_,style:M}},[A,_,F.positionerStyles]),X=x.useMemo(()=>({open:A,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:pe}),[A,F.side,F.align,F.anchorHidden,pe]);Qe(()=>{R.set("popupSide",F.side)},[R,F.side]);const z=x.useMemo(()=>({side:F.side,align:F.align,arrowRef:F.arrowRef,arrowUncentered:F.arrowUncentered,arrowStyles:F.arrowStyles,anchorHidden:F.anchorHidden,isPositioned:F.isPositioned}),[F.side,F.align,F.arrowRef,F.arrowUncentered,F.arrowStyles,F.anchorHidden,F.isPositioned]),K=Xe(M=>{R.set("positionerElement",M)}),oe=Oa("div",t,{state:X,ref:[a,K],props:[k,N],stateAttributesMapping:TT});return u.jsxs(kT.Provider,{value:z,children:[_&&P&&u.jsx(qP,{inert:GP(!A),cutout:ae??ne}),oe]})});function OY(e){return e==="starting"?z4:wr}const jY={...TT,...iy},MY=x.forwardRef(function(t,a){const{render:i,className:s,initialFocus:l,finalFocus:d,...f}=t,p=li(),m=my(),y=zf(),{filteredItems:v}=Ho(),w=je(p,Me.mounted),b=je(p,Me.open),C=je(p,Me.openMethod),E=je(p,Me.transitionStatus),T=je(p,Me.inputInsidePopup),N=je(p,Me.inputElement),R=v.length===0;kf({open:b,ref:p.state.popupRef,onComplete(){b&&p.state.onOpenChangeComplete(!0)}});const O=x.useMemo(()=>({open:b,side:m.side,align:m.align,anchorHidden:m.anchorHidden,transitionStatus:E,empty:R}),[b,m.side,m.align,m.anchorHidden,E,R]),j=Oa("div",t,{state:O,ref:[a,p.state.popupRef],props:[{role:T?"dialog":"presentation",tabIndex:-1,onFocus(_){const Z=lr(_.nativeEvent);C!=="touch"&&(Vt(p.state.listElement,Z)||Z===_.currentTarget)&&p.state.inputRef.current?.focus()}},OY(E),f],stateAttributesMapping:jY}),P=l===void 0?T?_=>_==="touch"?p.state.popupRef.current:N:!1:l;let A;return d!=null?A=d:A=T?void 0:!1,u.jsx(eP,{context:y,disabled:!w,modal:!T,openInteractionType:C,initialFocus:P,returnFocus:A,children:j})}),zT=x.createContext(void 0);function UT(){const e=x.useContext(zT);if(!e)throw new Error(Da(19));return e}const _Y=x.createContext(!1);function kY(){return x.useContext(_Y)}const LY=x.memo(x.forwardRef(function(t,a){const{render:i,className:s,value:l=null,index:d,disabled:f=!1,nativeButton:p=!1,...m}=t,y=x.useRef(!1),v=x.useRef(null),w=Q4({index:d,textRef:v,indexGuessBehavior:ZC.GuessFromOrder}),b=li(),C=kY(),{flatFilteredItems:E}=Ho(),T=je(b,Me.open),N=je(b,Me.selectionMode),R=je(b,Me.readOnly),O=je(b,Me.virtualized),j=je(b,Me.isItemEqualToValue),I=N!=="none",P=d??(O?rg(E,l,j):w.index),A=w.index!==-1,_=je(b,Me.id),Z=je(b,Me.isActive,P),ne=je(b,Me.isSelected,l),ae=je(b,Me.items),fe=je(b,Me.getItemProps),pe=x.useRef(null),ce=_!=null&&A?`${_}-${P}`:void 0,F=ne&&I;Qe(()=>{if(!(A&&(O||d!=null)))return;const re=b.state.listRef.current;return re[P]=pe.current,()=>{delete re[P]}},[A,O,P,d,b]),Qe(()=>{if(!A||ae)return;const ee=b.state.valuesRef.current;return ee[P]=l,N!=="none"&&b.state.allValuesRef.current.push(l),()=>{delete ee[P]}},[A,ae,P,l,b,N]),Qe(()=>{if(!T){y.current=!1;return}if(!A||ae)return;const ee=b.state.selectedValue,re=Array.isArray(ee)?ee[ee.length-1]:ee;Bs(re,l,j)&&b.set("selectedIndex",P)},[A,ae,T,b,P,l,j]);const k=x.useMemo(()=>({disabled:f,selected:F,highlighted:Z}),[f,F,Z]),X=fe({active:Z,selected:F});X.id=void 0,X.onFocus=void 0;const{getButtonProps:z,buttonRef:K}=oy({disabled:f,focusableWhenDisabled:!0,native:p});function oe(ee){function re(){b.state.handleSelection(ee,l)}b.state.submitOnItemClick?(Ra.flushSync(re),b.state.requestSubmit()):re()}const M={id:ce,role:C?"gridcell":"option","aria-disabled":f||void 0,"aria-selected":I?F:void 0,tabIndex:void 0,onPointerDownCapture(ee){y.current=!0,ee.preventDefault()},onClick(ee){f||R||oe(ee.nativeEvent)},onMouseUp(ee){const re=y.current;y.current=!1,!(f||R||ee.button!==0||re||!Z)&&oe(ee.nativeEvent)}},V=Oa("div",t,{ref:[K,a,w.ref,pe],state:k,props:[X,M,m,z]}),Q=x.useMemo(()=>({selected:F,textRef:v}),[F,v]);return u.jsx(zT.Provider,{value:Q,children:V})})),IY=x.forwardRef(function(t,a){const{render:i,className:s,children:l,...d}=t,{filteredItems:f}=Ho(),p=li(),m=f.length===0?l:null;return Oa("div",t,{ref:[a,p.state.emptyRef],props:[{children:m,role:"status","aria-live":"polite","aria-atomic":!0},d]})});function zY(e){const{multiple:t=!1,defaultValue:a,value:i,onValueChange:s,...l}=e;return u.jsx(lY,{...l,selectionMode:t?"multiple":"single",selectedValue:i,defaultSelectedValue:a,onSelectedValueChange:s})}const UY=x.forwardRef(function(t,a){const i=t.keepMounted??!1,{selected:s}=UT();return i||s?u.jsx(PY,{...t,ref:a}):null}),PY=x.memo(x.forwardRef((e,t)=>{const{render:a,className:i,keepMounted:s,...l}=e,{selected:d}=UT(),f=x.useRef(null),{transitionStatus:p,setMounted:m}=ay(d),y=x.useMemo(()=>({selected:d,transitionStatus:p}),[d,p]),v=Oa("span",e,{ref:[t,f],state:y,props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:iy});return kf({open:d,ref:f,onComplete(){d||m(!1)}}),v}));function PT({className:e,type:t,...a}){return u.jsx("input",{type:t,"data-slot":"input",className:At("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...a})}function YY({className:e,...t}){return u.jsx("div",{"data-slot":"input-group",role:"group",className:At("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const BY=hf("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.25rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.25rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function HY({className:e,align:t="inline-start",...a}){return u.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:At(BY({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const VY=hf("gap-2 text-sm shadow-none flex items-center",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function YT({className:e,type:t="button",variant:a="ghost",size:i="xs",...s}){return u.jsx(un,{type:t,"data-size":i,variant:a,className:At(VY({size:i}),e),...s})}function FY({className:e,...t}){return u.jsx(PT,{"data-slot":"input-group-control",className:At("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1",e),...t})}const GY=zY;function qY({className:e,children:t,...a}){return u.jsxs(dY,{"data-slot":"combobox-trigger",className:At("[&_svg:not([class*='size-'])]:size-4",e),...a,children:[t,u.jsx(WS,{className:"text-muted-foreground size-4 pointer-events-none"})]})}function WY({className:e,...t}){return u.jsx(yY,{"data-slot":"combobox-clear",render:u.jsx(YT,{variant:"ghost",size:"icon-xs"}),className:At(e),...t,children:u.jsx(ff,{className:"pointer-events-none"})})}function KY({className:e,children:t,disabled:a=!1,showTrigger:i=!0,showClear:s=!1,...l}){return u.jsxs(YY,{className:At("w-auto",e),children:[u.jsx(pY,{render:u.jsx(FY,{disabled:a}),...l}),u.jsxs(HY,{align:"inline-end",children:[i&&u.jsx(YT,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:a,children:u.jsx(qY,{})}),s&&u.jsx(WY,{disabled:a})]}),t]})}function $Y({className:e,side:t="bottom",sideOffset:a=6,align:i="start",alignOffset:s=0,anchor:l,...d}){return u.jsx(EY,{children:u.jsx(DY,{side:t,sideOffset:a,align:i,alignOffset:s,anchor:l,className:"isolate z-50",children:u.jsx(MY,{"data-slot":"combobox-content","data-chips":!!l,className:At("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-md shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)",e),...d})})})}function XY({className:e,...t}){return u.jsx(wY,{"data-slot":"combobox-list",className:At("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overflow-y-auto overscroll-contain",e),...t})}function QY({className:e,children:t,...a}){return u.jsxs(LY,{"data-slot":"combobox-item",className:At("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a,children:[t,u.jsx(UY,{render:u.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:u.jsx(zO,{className:"pointer-events-none"})})]})}function ZY({className:e,...t}){return u.jsx(IY,{"data-slot":"combobox-empty",className:At("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex",e),...t})}function JY({platform:e,value:t,onChange:a,placeholder:i="your@email.com"}){const[s,l]=x.useState([]);x.useEffect(()=>{const f=Qg(e);l(f)},[e]);const d=(f,p)=>{p.stopPropagation(),Gz(e,f);const m=s.filter(y=>y.toLowerCase()!==f.toLowerCase());l(m)};return u.jsxs(GY,{items:s,children:[u.jsx(KY,{showClear:!0,showTrigger:!0,placeholder:i,value:t,onChange:f=>a(f.target.value)}),u.jsxs($Y,{children:[u.jsx(ZY,{children:"No saved emails yet"}),u.jsx(XY,{children:f=>u.jsx(QY,{value:f,children:u.jsxs("div",{className:"flex items-center justify-between w-full gap-2",children:[u.jsx("span",{className:"flex-1 truncate",children:f}),u.jsx(un,{variant:"ghost",size:"icon-xs",onClick:p=>d(f,p),className:"shrink-0 opacity-50 hover:opacity-100","aria-label":`Remove ${f} from history`,children:u.jsx(ff,{className:"h-3 w-3"})})]})},f)})]})]})}function e5({event:e,open:t,onOpenChange:a}){const[i,s]=x.useState(null),[l,d]=x.useState(""),f=y=>{if(y==="system"){if(e){const v=Yw(e);m4(v),a(!1),s(null)}}else s(y)},p=()=>{if(!e||!i)return;const y=Yw(e);let v="";i==="google"?v=a4(y,l||void 0):i==="outlook"&&(v=i4(y,l||void 0)),v&&(l&&l.trim()&&Fz(i==="system"?"google":i,l),o4(v),a(!1),s(null),d(""))},m=()=>{s(null),d("")};return e?u.jsx(Zg,{open:t,onOpenChange:a,children:u.jsx(Jg,{className:"max-w-md",children:i===null?u.jsxs(u.Fragment,{children:[u.jsxs(Kd,{children:[u.jsx($d,{children:"Sync to Calendar"}),u.jsx(qp,{children:"Choose your calendar platform"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx(la,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>f("google"),children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(QS,{className:"h-5 w-5 text-muted-foreground"}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium",children:"Google Calendar"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Sync to your Google Calendar"})]})]})}),u.jsx(la,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>f("outlook"),children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(uc,{className:"h-5 w-5 text-muted-foreground"}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium",children:"Outlook Calendar"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Sync to Outlook.com or Office 365"})]})]})}),u.jsx(la,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>f("system"),children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(KS,{className:"h-5 w-5 text-muted-foreground"}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium",children:"System Calendar (.ics)"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Download ICS file for any calendar app"})]})]})})]}),u.jsxs("div",{className:"rounded-md bg-muted p-3 flex gap-2",children:[u.jsx(cj,{className:"h-5 w-5 text-muted-foreground shrink-0 mt-0.5"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:'Event will sync as "Synced Event" marked as busy to protect your privacy'})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs(Kd,{children:[u.jsx($d,{children:i==="google"?"Google Calendar":"Outlook Calendar"}),u.jsx(qp,{children:"Enter your email (optional)"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(PC,{htmlFor:"email",children:"Email Address"}),u.jsx(JY,{platform:i==="system"?"google":i,value:l,onChange:d,placeholder:i==="google"?"user@gmail.com":"user@outlook.com"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:i==="google"?"Optional: Switch to the correct Google account":"Optional: Pre-select your Outlook account"})]}),u.jsx("div",{className:"rounded-md bg-muted p-3",children:u.jsxs("p",{className:"text-sm text-muted-foreground",children:["You'll be redirected to ",i==="google"?"Google":"Outlook"," Calendar.",l&&` Account: ${l}`]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(un,{variant:"outline",onClick:m,className:"flex-1",children:"Back"}),u.jsx(un,{onClick:p,className:"flex-1",children:"Open Calendar"})]})]})]})})}):null}function t5(){const e=uf(),{filteredEvents:t,loading:a,error:i,icsUrl:s,lastFetch:l,calendarLastUpdated:d,weekView:f,setWeekView:p,editUrlWithPreservation:m}=Mf(),[y,v]=x.useState(null),[w,b]=x.useState(!1),[C,E]=x.useState(!1),T=()=>{m(),e("/setup")},N=I=>{v(I),b(!0)},R=()=>{b(!1),E(!0)},O=I=>{b(I),I||v(null)},j=I=>{E(I),I||v(null)};return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Xz,{url:s,lastFetch:l,calendarLastUpdated:d,onEdit:T}),u.jsx(Qz,{value:f,onChange:p}),i&&u.jsxs("div",{className:"rounded-md bg-destructive/10 p-4 text-destructive",children:[u.jsx("p",{className:"text-sm font-medium",children:i}),u.jsx("p",{className:"text-xs mt-1",children:"Check your ICS URL or try refreshing. If the issue persists, try changing your calendar URL."})]}),a&&u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-muted-foreground",children:"Loading events..."})}),!a&&!i&&u.jsx(Jz,{events:t,onEventClick:N}),u.jsx(r4,{event:y,open:w,onOpenChange:O,onSync:R}),u.jsx(e5,{event:y,open:C,onOpenChange:j})]})}function BT({className:e,...t}){return u.jsx(lM,{"data-slot":"accordion",className:At("flex w-full flex-col",e),...t})}function Nd({className:e,...t}){return u.jsx(cM,{"data-slot":"accordion-item",className:At("not-last:border-b",e),...t})}function Ad({className:e,children:t,...a}){return u.jsx(uM,{className:"flex",children:u.jsxs(dM,{"data-slot":"accordion-trigger",className:At("focus-visible:ring-ring/50 focus-visible:border-ring focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground rounded-md py-4 text-left text-sm font-medium hover:underline focus-visible:ring-[3px] **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 group/accordion-trigger relative flex flex-1 items-start justify-between border border-transparent transition-all outline-none disabled:pointer-events-none disabled:opacity-50",e),...a,children:[t,u.jsx(WS,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),u.jsx(HO,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function Dd({className:e,children:t,...a}){return u.jsx(fM,{"data-slot":"accordion-content",className:"data-open:animate-accordion-down data-closed:animate-accordion-up text-sm overflow-hidden",...a,children:u.jsx("div",{className:At("pt-0 pb-4 [&_a]:hover:text-foreground h-(--radix-accordion-content-height) [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",e),children:t})})}function n5({onSubmit:e,loading:t=!1,initialUrl:a}){const[i,s]=x.useState(""),[l,d]=x.useState(!1),[f,p]=x.useState(""),m=y=>{if(y.preventDefault(),!i.trim()){p("Please enter an ICS URL");return}if(!CC(i)){p("Invalid ICS URL format");return}p(""),e(i)};return u.jsxs(la,{className:"w-full max-w-2xl mx-auto",children:[u.jsxs(Ql,{children:[u.jsx(Zl,{children:a?"Edit Your Calendar ICS URL":"Enter Your Calendar ICS URL"}),u.jsx(vC,{children:a?"Enter a new calendar URL, or reveal your current URL to view it":"Add your source calendar to start syncing events"})]}),u.jsx(Jl,{children:u.jsxs("form",{onSubmit:m,className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(PC,{htmlFor:"ics-url",children:"ICS URL"}),u.jsx(PT,{id:"ics-url",type:"url",placeholder:"https://calendar.google.com/calendar/ical/...",value:i,onChange:y=>s(y.target.value),disabled:t}),f&&u.jsx("p",{className:"text-sm text-destructive",children:f})]}),u.jsxs("div",{className:"flex items-center gap-4",children:[a&&!l&&u.jsxs(un,{type:"button",variant:"outline",size:"sm",onClick:()=>{s(a),d(!0)},children:[u.jsx(tj,{className:"mr-2 h-4 w-4"}),"Reveal Current URL"]}),u.jsx(un,{type:"submit",disabled:t||!i.trim(),children:t?"Loading...":a?"Update Events":"Load Events"}),u.jsxs(Zg,{children:[u.jsx(e4,{asChild:!0,children:u.jsxs(un,{type:"button",variant:"outline",size:"sm",children:[u.jsx(mg,{className:"mr-2 h-4 w-4"}),"How to get ICS URL"]})}),u.jsxs(Jg,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[u.jsx(Kd,{children:u.jsx($d,{children:"How to Get Your ICS URL"})}),u.jsx("div",{className:"rounded-md bg-muted p-4",children:u.jsxs("p",{className:"text-sm text-muted-foreground",children:[u.jsx("strong",{children:"Note:"})," Your calendar data stays on your device. We only fetch events when you refresh."]})}),u.jsxs(BT,{type:"single",collapsible:!0,className:"w-full",children:[u.jsxs(Nd,{value:"google",children:[u.jsx(Ad,{children:"📧 Google Calendar"}),u.jsx(Dd,{children:u.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-sm",children:[u.jsx("li",{children:"Open Google Calendar on the web"}),u.jsx("li",{children:"Click Settings (gear icon) → Settings"}),u.jsx("li",{children:"Select your calendar from the left sidebar"}),u.jsx("li",{children:'Scroll to "Integrate calendar" section'}),u.jsx("li",{children:'Copy the "Secret address in iCalendar format" URL'})]})})]}),u.jsxs(Nd,{value:"outlook",children:[u.jsx(Ad,{children:"📧 Outlook.com"}),u.jsx(Dd,{children:u.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-sm",children:[u.jsx("li",{children:"Open Outlook Calendar on the web"}),u.jsx("li",{children:"Click Settings → View all Outlook settings"}),u.jsx("li",{children:"Go to Calendar → Shared calendars"}),u.jsx("li",{children:'Under "Publish a calendar", select your calendar'}),u.jsx("li",{children:'Click "Publish" and copy the ICS link'})]})})]}),u.jsxs(Nd,{value:"apple",children:[u.jsx(Ad,{children:"🍎 Apple Calendar (iCloud)"}),u.jsx(Dd,{children:u.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-sm",children:[u.jsx("li",{children:"Open iCloud.com and go to Calendar"}),u.jsx("li",{children:"Click the share icon next to your calendar"}),u.jsx("li",{children:'Enable "Public Calendar"'}),u.jsx("li",{children:"Copy the URL"}),u.jsx("li",{children:'Replace "webcal://" with "https://" in the URL'})]})})]})]})]})]})]})]})})]})}function r5(){return u.jsxs("div",{className:"space-y-3 py-4 border-t border-border",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-base",children:"📖"}),u.jsx("h3",{className:"text-sm font-medium",children:"How BusiCal Works"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(XS,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Add URL"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Paste your personal calendar URL"})]})]}),u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(uc,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Select Events"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Browse & pick events to sync"})]})]}),u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(QS,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Sync"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Export to work calendar"})]})]})]})]})}function a5(){return u.jsxs("div",{className:"space-y-3 py-4 border-t border-border",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-base",children:"🎯"}),u.jsx("h3",{className:"text-sm font-medium",children:"Whether you're a recruiter, in sales, or juggling multiple calendars"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(Nj,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Recruiters"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Juggling candidate interviews without exposing your full schedule"})]})]}),u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(sj,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Sales Teams"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Syncing client meetings while keeping personal events private"})]})]}),u.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(kO,{className:"h-5 w-5 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium",children:"Busy Professionals"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Managing work, personal, and side projects seamlessly"})]})]})]})]})}const i5=hf("grid gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function o5({className:e,variant:t,...a}){return u.jsx("div",{"data-slot":"alert",role:"alert",className:At(i5({variant:t}),e),...a})}function s5({className:e,...t}){return u.jsx("div",{"data-slot":"alert-title",className:At("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function l5({className:e,...t}){return u.jsx("div",{"data-slot":"alert-description",className:At("text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function c5(){return u.jsxs(o5,{variant:"default",className:"border-primary/50 bg-primary/5",children:[u.jsx(gg,{className:"h-4 w-4 text-primary"}),u.jsx(s5,{className:"text-sm font-semibold",children:"Your Privacy is Protected"}),u.jsxs(l5,{className:"text-xs space-y-2",children:[u.jsxs("p",{children:["BusiCal uses a CORS proxy to fetch your calendar data.",u.jsx("strong",{children:" No data is stored, logged, or saved on our servers"})," – everything stays in your browser."]}),u.jsx("p",{children:u.jsx(Ki,{to:"/faq",className:"text-primary hover:underline font-medium",children:"Learn more about how it works →"})})]})]})}function u5(){const e=uf(),{setIcsUrl:t,loading:a,icsUrl:i,isEditingUrl:s}=Mf(),l=async f=>{await t(f),e("/",{replace:!0})},d=s&&i?i:void 0;return u.jsxs("div",{className:"w-full max-w-2xl mx-auto space-y-6",children:[u.jsx(n5,{onSubmit:l,loading:a,initialUrl:d}),u.jsx(a5,{}),u.jsx(r5,{}),u.jsx(c5,{})]})}const d5=[{id:"what-is-cors-proxy",question:"Why do I need to use a CORS proxy?",answer:u.jsx("p",{children:"Browsers block direct requests to calendar URLs due to CORS (Cross-Origin Resource Sharing) security restrictions. The CORS proxy acts as a secure bridge, fetching your calendar data on your behalf so the app can display your events."})},{id:"data-storage",question:"Is my calendar data stored on the server?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"No, absolutely not."})," The proxy only passes your calendar data through to your browser. Nothing is stored, logged, or saved on the server."]}),u.jsx("p",{children:"The data flow is: Calendar Provider → Proxy (pass-through) → Your Browser. The proxy immediately returns the data without any persistence."})]})},{id:"event-sync-privacy",question:"How does event syncing protect my privacy?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:["When you sync an event from a calendar to the destination calendar, BusiCal protects your privacy by ",u.jsx("strong",{children:"not revealing the original event details"}),"."]}),u.jsx("p",{children:u.jsx("strong",{children:"What gets synced:"})}),u.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[u.jsx("li",{children:'Event title: "Synced Event" (generic title)'}),u.jsx("li",{children:"Time slot: Same start and end time as your personal event"}),u.jsx("li",{children:'Status: Marked as "Busy" to block the time'})]}),u.jsx("p",{children:u.jsx("strong",{children:"What does NOT get synced:"})}),u.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[u.jsx("li",{children:`Original event title (e.g., "Doctor's appointment")`}),u.jsx("li",{children:"Description or notes"}),u.jsx("li",{children:"Location details"}),u.jsx("li",{children:"Attendees or participants"})]}),u.jsx("p",{children:"This way, your destination calendar shows you're busy during that time, but can't see what you're actually doing. Your event stays private!"})]})},{id:"what-data-proxy-sees",question:"What data does the proxy see?",answer:u.jsx("p",{children:"The proxy temporarily processes your calendar URL and ICS file content while fetching it. However, it immediately returns this data to your browser without storing, logging, or retaining any information. Think of it as a transparent tunnel."})},{id:"security",question:"Is this secure?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:"Yes. The proxy includes multiple security measures:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[u.jsx("li",{children:"URL validation to prevent malicious requests"}),u.jsx("li",{children:"Protocol restriction (only http/https allowed)"}),u.jsx("li",{children:"SSRF attack prevention"}),u.jsx("li",{children:"File size limits (max 5MB)"}),u.jsx("li",{children:"Content validation (must be valid ICS format)"}),u.jsx("li",{children:"Security headers (X-Frame-Options, CSP, etc.)"}),u.jsx("li",{children:"No logging policy (zero data retention)"})]}),u.jsx("p",{children:"Additionally, all calendar data stays in your browser after fetching - nothing is sent to external servers."})]})},{id:"self-host",question:"Can I self-host the proxy?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"Yes!"})," BusiCal is fully open source. You can deploy your own Cloudflare Worker to have complete control over the proxy."]}),u.jsxs("p",{children:["Check the"," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/DEPLOYMENT.md",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"deployment documentation"})," ","for step-by-step instructions."]})]})},{id:"url-encryption",question:"How is my calendar URL protected?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:["Your ICS URL is automatically ",u.jsx("strong",{children:"encrypted using AES-256-GCM"})," before being stored in your browser. Even if someone gains access to your browser's storage, they cannot read your calendar URL without your device's unique encryption key."]}),u.jsx("p",{children:"The encryption key is derived from your device's unique characteristics and never leaves your browser. This provides strong protection against:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[u.jsx("li",{children:"Malicious browser extensions reading localStorage"}),u.jsx("li",{children:"Physical access to your device by unauthorized users"}),u.jsx("li",{children:"Data theft from browser storage"}),u.jsx("li",{children:"Shared computer scenarios"})]}),u.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[u.jsx("strong",{children:"Note:"})," If you switch to a different device or browser, you'll need to re-enter your calendar URL, as the encryption is device-specific for maximum security."]})]})},{id:"calendar-url-safety",question:"Is my calendar URL safe?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:"Your calendar URL typically contains a secret token that grants read-only access to your calendar. Keep this URL private, just like a password."}),u.jsxs("p",{children:[u.jsx("strong",{children:"BusiCal stores your URL only in your browser's localStorage"})," - it never leaves your device except when fetching calendar updates through the proxy."]}),u.jsx("p",{children:"You can regenerate your calendar URL at any time from your calendar provider's settings if you're concerned it was exposed."})]})},{id:"rate-limiting",question:"Are there rate limits?",answer:u.jsx("p",{children:"Rate limiting is configured via Cloudflare's dashboard to prevent abuse. For self-hosted deployments, we recommend setting up rate limiting rules appropriate for your usage. Check the deployment documentation for guidance."})},{id:"trust-verification",question:"How can I verify these privacy claims?",answer:u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:"BusiCal is fully open source! You can inspect the code yourself:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[u.jsxs("li",{children:[u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/worker/app.ts",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Proxy implementation"})," ","- See exactly what the proxy does"]}),u.jsxs("li",{children:[u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/src/lib/icsParser.ts",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Client-side parsing"})," ","- See how data is processed in your browser"]}),u.jsxs("li",{children:[u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/PRIVACY.md",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Privacy policy"})," ","- Full transparency about data handling"]})]}),u.jsx("p",{children:"Or, self-host the entire application to have complete control!"})]})}];function f5({className:e}){return u.jsx(BT,{type:"single",collapsible:!0,className:e,children:d5.map(t=>u.jsxs(Nd,{value:t.id,children:[u.jsx(Ad,{className:"text-left",children:t.question}),u.jsx(Dd,{className:"text-sm text-muted-foreground",children:t.answer})]},t.id))})}function h5(){return u.jsxs("div",{className:"w-full max-w-4xl mx-auto space-y-8",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(mg,{className:"h-6 w-6 text-primary"}),u.jsx("h1",{className:"text-3xl font-bold",children:"Frequently Asked Questions"})]}),u.jsx("p",{className:"text-muted-foreground",children:"Learn about BusiCal's privacy, security, and how the CORS proxy works."})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(gg,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Privacy First"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"No data stored or logged on servers. Everything stays in your browser."})]}),u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(jd,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Secure by Design"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"URL validation, SSRF prevention, and security headers protect your data."})]}),u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(pg,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Open Source"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Fully transparent code. Verify our privacy claims or self-host."})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-xl font-semibold",children:"Common Questions"}),u.jsx(f5,{})]}),u.jsxs("div",{className:"border-t pt-6 space-y-4",children:[u.jsx("h2",{className:"text-lg font-semibold",children:"Additional Resources"}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/README.md",target:"_blank",rel:"noopener noreferrer",className:"border rounded-lg p-4 hover:bg-muted/50 transition-colors",children:[u.jsx("h3",{className:"font-medium text-sm mb-1",children:"Documentation"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Full technical documentation and setup guide"})]}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/PRIVACY.md",target:"_blank",rel:"noopener noreferrer",className:"border rounded-lg p-4 hover:bg-muted/50 transition-colors",children:[u.jsx("h3",{className:"font-medium text-sm mb-1",children:"Privacy Policy"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Detailed privacy and data handling policy"})]}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/DEPLOYMENT.md",target:"_blank",rel:"noopener noreferrer",className:"border rounded-lg p-4 hover:bg-muted/50 transition-colors",children:[u.jsx("h3",{className:"font-medium text-sm mb-1",children:"Self-Hosting Guide"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Deploy your own instance with complete control"})]}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp",target:"_blank",rel:"noopener noreferrer",className:"border rounded-lg p-4 hover:bg-muted/50 transition-colors",children:[u.jsx("h3",{className:"font-medium text-sm mb-1",children:"Source Code"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Review the code on GitHub"})]})]})]})]})}function m5(){return u.jsxs("div",{className:"w-full max-w-3xl mx-auto space-y-8",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"About BusiCal"}),u.jsx("p",{className:"text-lg text-muted-foreground",children:"Sync your personal calendar events to your work calendar — with privacy."})]}),u.jsxs(la,{className:"border-2 border-primary/20 bg-primary/5",children:[u.jsxs(Ql,{children:[u.jsx(Zl,{className:"text-xl",children:"Why I Built This"}),u.jsx(vC,{children:"A personal story about privacy, complexity, and finding a better way"})]}),u.jsxs(Jl,{className:"prose prose-sm dark:prose-invert max-w-none [&>p]:mb-5",children:[u.jsx("p",{children:"I tried to build a proper calendar sync app, but it became prohibitively complex. Providers like Google Calendar and Outlook require extensive user agreements because once authorized, an app has access to ALL calendar events. This creates significant privacy risk — you're trusting the app with your most personal information."}),u.jsx("p",{children:"The breakthrough came when I realized the solution was simpler: don't store any data, period. Through brainstorming with AI, I discovered a safer and even better alternative: utilizing PWA features to generate and trigger native calendar events using ICS files. This approach avoids the OAuth complexity entirely while delivering the same functionality with better privacy."}),u.jsx("p",{children:"The only remaining challenge was CORS — a technical limitation that prevents browsers from fetching calendar URLs directly. I designed the CORS proxy with complete transparency, with clear documentation that users can verify themselves or self-host if they want complete control."}),u.jsxs("p",{children:["This project was inspired by the PWA calendar capabilities demo at"," ",u.jsx("a",{href:"https://progressier.com/pwa-capabilities/calendar-events-pwa-demo",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"progressier.com"}),"."]}),u.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"— dirathea"})]})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"The OAuth Challenge"}),u.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[u.jsx("p",{children:"When you authorize a calendar app through OAuth, you're granting it access to read and sometimes write events on your calendar. This permission is all-or-nothing — the app can see every event, including sensitive ones like medical appointments, personal meetings, or family events."}),u.jsx("p",{children:"Calendar providers require extensive agreements because they understand the sensitivity of this access. It's a legitimate concern: once an app has your calendar data, there's no way to limit what it can see or track."})]})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"The Data-Less Solution"}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsxs(la,{children:[u.jsxs(Ql,{className:"pb-2",children:[u.jsx(jd,{className:"h-5 w-5 text-primary mb-2"}),u.jsx(Zl,{className:"text-base",children:"No Storage"})]}),u.jsx(Jl,{children:u.jsx("p",{className:"text-sm text-muted-foreground",children:"BusiCal stores nothing on any server. Your calendar data stays on your device."})})]}),u.jsxs(la,{children:[u.jsxs(Ql,{className:"pb-2",children:[u.jsx(JO,{className:"h-5 w-5 text-primary mb-2"}),u.jsx(Zl,{className:"text-base",children:"Privacy Sync"})]}),u.jsx(Jl,{children:u.jsx("p",{className:"text-sm text-muted-foreground",children:'Events sync as "Synced Event" marked as busy — no sensitive details exposed.'})})]}),u.jsxs(la,{children:[u.jsxs(Ql,{className:"pb-2",children:[u.jsx(Op,{className:"h-5 w-5 text-primary mb-2"}),u.jsx(Zl,{className:"text-base",children:"Local Processing"})]}),u.jsx(Jl,{children:u.jsx("p",{className:"text-sm text-muted-foreground",children:"All calendar parsing and processing happens in your browser's localStorage."})})]})]})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Transparency on CORS"}),u.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[u.jsx("p",{children:"BusiCal uses a Cloudflare Worker as a CORS proxy to fetch your calendar data. This is necessary because browsers block direct requests to calendar URLs due to Cross-Origin Resource Sharing (CORS) security restrictions."}),u.jsxs("p",{children:[u.jsx("strong",{children:"What this means:"})," The proxy receives your calendar URL, fetches the ICS file, and returns it directly to your browser. It does not store, log, or retain any data. Think of it as a transparent tunnel — data flows through but nothing sticks."]}),u.jsx("p",{children:"You can verify this yourself by reading the proxy code on GitHub, or deploy your own instance for complete control. The proxy includes security measures like URL validation, SSRF prevention, and content validation to ensure safe operation."})]})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Core Values"}),u.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:u.jsxs("ul",{className:"list-disc list-inside space-y-2",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Privacy-first"})," — Your calendar data should never leave your device unless necessary for syncing"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Minimal trust"})," — Verify the code yourself or self-host for complete control"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Transparency"})," — Clear documentation on how everything works, including the CORS proxy"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"User control"})," — Regenerate your ICS URL anytime to revoke access"]})]})})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Chrome Extension Available"}),u.jsxs("div",{className:"border-2 border-primary/20 rounded-lg p-6 bg-primary/5",children:[u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("div",{className:"h-12 w-12 rounded-lg bg-primary/10 flex items-center justify-center",children:u.jsx("svg",{className:"h-8 w-8 text-primary",viewBox:"0 0 24 24",fill:"currentColor",children:u.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 2.182c.855 0 1.682.11 2.473.315L9.745 9.09a4.364 4.364 0 1 0 4.47 6.204l4.778 2.759A9.818 9.818 0 0 1 2.182 12c0-5.423 4.395-9.818 9.818-9.818zm6.982 4.437c1.516 1.694 2.445 3.925 2.445 6.381a9.757 9.757 0 0 1-.315 2.473l-6.857-3.96a4.363 4.363 0 0 0-2.164-5.894l2.891-5.007z"})})})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"text-lg font-semibold mb-2",children:"One-Click Sharing from Google Calendar"}),u.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Install our Chrome extension to add share buttons directly to Google Calendar. Share events with one click without leaving your calendar."}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsxs("a",{href:"https://chrome.google.com/webstore",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium",children:["Coming Soon to Chrome Web Store",u.jsx(k0,{className:"h-4 w-4"})]}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp/tree/main/extension",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 border rounded-lg hover:bg-muted/50 transition-colors text-sm",children:[u.jsx(L0,{className:"h-4 w-4"}),"View Extension Code"]})]})]})]}),u.jsxs("div",{className:"mt-4 pt-4 border-t grid grid-cols-1 md:grid-cols-3 gap-4 text-sm",children:[u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(Op,{className:"h-4 w-4 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("div",{children:[u.jsx("strong",{className:"block",children:"Zero Network Requests"}),u.jsx("span",{className:"text-muted-foreground text-xs",children:"All processing happens locally"})]})]}),u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(jd,{className:"h-4 w-4 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("div",{children:[u.jsx("strong",{className:"block",children:"Minimal Permissions"}),u.jsx("span",{className:"text-muted-foreground text-xs",children:"Only calendar.google.com access"})]})]}),u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(pg,{className:"h-4 w-4 text-primary mt-0.5 flex-shrink-0"}),u.jsxs("div",{children:[u.jsx("strong",{className:"block",children:"Open Source"}),u.jsx("span",{className:"text-muted-foreground text-xs",children:"Verify the code yourself"})]})]})]})]})]}),u.jsxs("section",{className:"space-y-4",children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Learn More"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx("a",{href:"/faq",className:"flex items-center gap-3 p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-medium",children:"FAQ"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Common questions about privacy, security, and how BusiCal works"})]})}),u.jsx("a",{href:"/privacy",className:"flex items-center gap-3 p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-medium",children:"Privacy Policy"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Detailed information on data handling and privacy guarantees"})]})}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-medium",children:"Source Code"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Review the code on GitHub and verify the privacy claims"})]}),u.jsx(L0,{className:"h-4 w-4 text-muted-foreground"})]}),u.jsxs("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/DEPLOYMENT.md",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"font-medium",children:"Self-Hosting"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Deploy your own instance for complete control over the proxy"})]}),u.jsx(k0,{className:"h-4 w-4 text-muted-foreground"})]})]})]})]})}function p5(){return u.jsxs("div",{className:"w-full max-w-4xl mx-auto space-y-8",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Op,{className:"h-6 w-6 text-primary"}),u.jsx("h1",{className:"text-3xl font-bold",children:"Privacy Policy"})]}),u.jsx("p",{className:"text-muted-foreground",children:"Last Updated: January 12, 2025"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(jd,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"No Data Collection"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"We don't collect, store, or transmit your calendar data."})]}),u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(ij,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Local Processing"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"All data stays in your browser. No external servers involved."})]}),u.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[u.jsx(pg,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"font-semibold text-sm",children:"Open Source"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Fully transparent code. Verify our claims yourself."})]})]}),u.jsxs("div",{className:"border rounded-lg p-6 bg-muted/30",children:[u.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Table of Contents"}),u.jsxs("nav",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[u.jsx("a",{href:"#commitment",className:"text-primary hover:underline",children:"Our Commitment"}),u.jsx("a",{href:"#web-app",className:"text-primary hover:underline",children:"Web App Privacy"}),u.jsx("a",{href:"#extension",className:"text-primary hover:underline",children:"Chrome Extension Privacy"}),u.jsx("a",{href:"#no-collect",className:"text-primary hover:underline",children:"Data We Don't Collect"}),u.jsx("a",{href:"#cors-proxy",className:"text-primary hover:underline",children:"CORS Proxy"}),u.jsx("a",{href:"#encryption",className:"text-primary hover:underline",children:"URL Encryption"}),u.jsx("a",{href:"#browser-data",className:"text-primary hover:underline",children:"Browser Data"}),u.jsx("a",{href:"#security",className:"text-primary hover:underline",children:"Security Measures"}),u.jsx("a",{href:"#open-source",className:"text-primary hover:underline",children:"Open Source"}),u.jsx("a",{href:"#contact",className:"text-primary hover:underline",children:"Contact"})]})]}),u.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none space-y-8",children:[u.jsxs("section",{id:"commitment",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Our Commitment"}),u.jsx("p",{children:"BusiCal is built with privacy as the foundation. We believe your calendar data is personal and should remain under your control. Whether you use our web app or Chrome extension, privacy comes first."})]}),u.jsxs("section",{id:"extension",className:"border-l-4 border-primary pl-6 bg-primary/5 p-6 rounded-r-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(FO,{className:"h-6 w-6 text-primary"}),u.jsx("h2",{className:"text-2xl font-semibold m-0",children:"Chrome Extension Privacy"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"What the Extension Accesses"}),u.jsx("p",{children:"The BusiCal Chrome extension integrates directly with Google Calendar to provide one-click event sharing. Here's exactly what it accesses and why:"}),u.jsx("h4",{className:"text-base font-semibold mt-3",children:"Permissions Explained"}),u.jsxs("ul",{className:"list-disc list-inside space-y-2",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"storage"})," - Saves your email preferences locally in your browser's storage (up to 5 recent email addresses for quick access). This data never leaves your device."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"activeTab"})," - Allows the extension to interact with the Google Calendar page you're viewing. Only works when you're on calendar.google.com."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"calendar.google.com"})," - Restricts the extension to only work on Google Calendar. Cannot access any other websites or tabs."]})]}),u.jsx("h4",{className:"text-base font-semibold mt-3",children:"What the Extension Does"}),u.jsxs("ul",{className:"list-disc list-inside space-y-2",children:[u.jsx("li",{children:"Reads event details from the Google Calendar page (title, date, time, location)"}),u.jsx("li",{children:'Injects "Share to Calendar" buttons into the calendar interface'}),u.jsx("li",{children:"Stores your recent email addresses locally for autofill convenience"}),u.jsx("li",{children:"Generates calendar links and .ics files locally in your browser"})]}),u.jsx("h4",{className:"text-base font-semibold mt-3",children:"What the Extension Does NOT Do"}),u.jsxs("ul",{className:"list-disc list-inside space-y-2",children:[u.jsx("li",{children:"❌ Does NOT send your calendar data to any external servers"}),u.jsx("li",{children:"❌ Does NOT track your browsing or calendar activity"}),u.jsx("li",{children:"❌ Does NOT modify, delete, or create events in your calendar"}),u.jsx("li",{children:"❌ Does NOT access calendars other than the one you're viewing"}),u.jsx("li",{children:"❌ Does NOT work on any website except calendar.google.com"}),u.jsx("li",{children:"❌ Does NOT use analytics or telemetry"})]}),u.jsxs("p",{className:"mt-4 p-4 bg-background border rounded-lg",children:[u.jsx("strong",{children:"Privacy Guarantee:"})," All event processing happens entirely in your browser. The extension is a client-side tool with zero network requests. Your calendar data never leaves your device."]})]}),u.jsxs("section",{id:"web-app",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Web App Privacy"}),u.jsx("p",{children:"The BusiCal web app (https://getbusical.app) operates with the same privacy-first principles:"})]}),u.jsxs("section",{id:"no-collect",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Data We DO NOT Collect or Store"}),u.jsxs("ul",{className:"list-none space-y-1",children:[u.jsx("li",{children:"❌ Calendar URLs (encrypted locally, never transmitted)"}),u.jsx("li",{children:"❌ Calendar event data (titles, descriptions, dates, locations)"}),u.jsx("li",{children:"❌ Personal information"}),u.jsx("li",{children:"❌ Analytics or tracking data"}),u.jsx("li",{children:"❌ Cookies (except essential browser localStorage)"}),u.jsx("li",{children:"❌ Server-side logs of your requests"}),u.jsx("li",{children:"❌ IP addresses"}),u.jsx("li",{children:"❌ Usage patterns"})]})]}),u.jsxs("section",{id:"local-storage",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"How BusiCal Works"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"1. Local Storage Only"}),u.jsx("p",{children:"All your data is stored exclusively in your browser's localStorage:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Calendar URL (encrypted with AES-256-GCM)"}),u.jsx("li",{children:"Cached events (for offline viewing)"}),u.jsx("li",{children:"App preferences"}),u.jsx("li",{children:"Recent email addresses (Chrome extension only)"})]}),u.jsxs("p",{children:["This data ",u.jsx("strong",{children:"never leaves your device"})," except when fetching calendar updates (web app only, via CORS proxy)."]})]}),u.jsxs("section",{id:"cors-proxy",children:[u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"2. CORS Proxy (Web App Only, Pass-Through)"}),u.jsx("p",{children:u.jsx("em",{children:"Note: The Chrome extension does NOT use the CORS proxy. This section applies only to the web app."})}),u.jsx("p",{children:"Because browsers block direct requests to calendar URLs (CORS restrictions), the web app uses a Cloudflare Worker as a proxy."}),u.jsx("h4",{className:"text-base font-semibold mt-3",children:"What the proxy does:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Receives your calendar URL from your browser"}),u.jsx("li",{children:"Fetches the ICS file from your calendar provider"}),u.jsx("li",{children:"Immediately returns the data to your browser"}),u.jsx("li",{children:u.jsx("strong",{children:"Does nothing else"})})]}),u.jsx("h4",{className:"text-base font-semibold mt-3",children:"What the proxy does NOT do:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Store your calendar URL"}),u.jsx("li",{children:"Save ICS file content"}),u.jsx("li",{children:"Log requests or responses"}),u.jsx("li",{children:"Retain any data whatsoever"}),u.jsx("li",{children:"Share data with third parties"})]}),u.jsxs("p",{children:["The proxy is a ",u.jsx("strong",{children:"stateless pass-through"})," - like a transparent tunnel. Data flows through it but nothing sticks."]})]}),u.jsxs("section",{id:"syncing",children:[u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"3. Calendar Syncing"}),u.jsx("p",{children:"When you sync an event to your work calendar:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Uses deeplinks (URL schemes) that open your calendar app"}),u.jsx("li",{children:"No backend server involved"}),u.jsx("li",{children:"No authentication tokens"}),u.jsx("li",{children:"Calendar providers (Google, Outlook) handle the actual event creation"}),u.jsx("li",{children:"BusiCal never sees if you saved the event or not"})]})]}),u.jsxs("section",{id:"third-party",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Third-Party Services"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"Cloudflare Workers (Web App Proxy)"}),u.jsx("p",{children:"Our web app proxy runs on Cloudflare Workers infrastructure. Cloudflare may collect:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Request metadata (timestamp, region, status codes)"}),u.jsx("li",{children:"Performance metrics"})]}),u.jsx("p",{children:"However, BusiCal's proxy implementation:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Does not log calendar URLs or content"}),u.jsx("li",{children:"Does not enable Cloudflare's logging features"}),u.jsx("li",{children:"Processes requests in memory only"})]}),u.jsxs("p",{children:[u.jsx("strong",{children:"Cloudflare's Privacy Policy:"})," ",u.jsx("a",{href:"https://www.cloudflare.com/privacypolicy/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.cloudflare.com/privacypolicy/"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"Calendar Providers (Google, Outlook, etc.)"}),u.jsx("p",{children:"When you generate your ICS URL from Google Calendar, Outlook, or other providers, and when you sync events back:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"You're subject to their privacy policies"}),u.jsx("li",{children:"BusiCal has no control over their data handling"}),u.jsx("li",{children:"They may log your access to calendar URLs"}),u.jsx("li",{children:"They process calendar event creation when you sync"})]}),u.jsxs("p",{children:[u.jsx("strong",{children:"You control this:"})," Regenerate your ICS URL at any time to revoke access."]})]}),u.jsxs("section",{id:"open-source",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Open Source Transparency"}),u.jsx("p",{children:"BusiCal is fully open source. You can:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:["Review the code:"," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://github.com/dirathea/getbusicalapp"})]}),u.jsx("li",{children:"Verify there's no data collection"}),u.jsxs("li",{children:["See exactly what the proxy does: ",u.jsx("code",{children:"worker/app.ts"})]}),u.jsxs("li",{children:["Check client-side storage: ",u.jsx("code",{children:"src/lib/storage.ts"})]}),u.jsxs("li",{children:["Review extension code: ",u.jsx("code",{children:"extension/src/"})]})]})]}),u.jsxs("section",{id:"self-hosting",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Self-Hosting"}),u.jsx("p",{children:"Want complete control? Self-host BusiCal:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Deploy your own Cloudflare Worker"}),u.jsx("li",{children:"No data ever touches third-party infrastructure"}),u.jsx("li",{children:"Full transparency and control"})]}),u.jsxs("p",{children:["See"," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/blob/main/DEPLOYMENT.md",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"DEPLOYMENT.md"})," ","for instructions."]})]}),u.jsxs("section",{id:"encryption",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Calendar URL Encryption"}),u.jsx("p",{children:"As of version 0.1.0, the web app automatically encrypts all ICS URLs before storing them in your browser:"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"Encryption Details"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Algorithm:"})," AES-256-GCM (Advanced Encryption Standard, 256-bit, Galois/Counter Mode)"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Key Derivation:"})," PBKDF2 with SHA-256, 100,000 iterations"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Key Source:"})," Device-specific fingerprint (browser characteristics + random salt)"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Storage:"})," Only encrypted data is stored in localStorage"]})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"What This Protects Against"}),u.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Browser Extension Snooping:"})," Malicious extensions cannot read your URL from storage"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Local Storage Inspection:"})," Viewing localStorage in DevTools shows only encrypted data"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Physical Device Access:"})," Unauthorized users cannot retrieve your URL"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Data Export/Theft:"})," Stolen browser data is useless without the device-specific decryption key"]})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"Device-Specific Security"}),u.jsx("p",{children:"The encryption key is unique to your device and browser. This means:"}),u.jsxs("ul",{className:"list-none space-y-1",children:[u.jsxs("li",{children:["✅ ",u.jsx("strong",{children:"Better security:"})," Your URL cannot be decrypted on another device"]}),u.jsxs("li",{children:["⚠️ ",u.jsx("strong",{children:"Device-specific:"})," Switching browsers/devices requires re-entering your URL"]}),u.jsxs("li",{children:["ℹ️ ",u.jsx("strong",{children:"No cloud sync:"})," Encrypted URLs cannot be synced across devices"]})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"Browser Compatibility"}),u.jsx("p",{children:"BusiCal requires the Web Crypto API for encryption. Supported browsers:"}),u.jsxs("ul",{className:"list-none space-y-1",children:[u.jsx("li",{children:"✅ Chrome 37+ (2014)"}),u.jsx("li",{children:"✅ Firefox 34+ (2014)"}),u.jsx("li",{children:"✅ Safari 11+ (2017)"}),u.jsx("li",{children:"✅ Edge 79+ (2020)"})]})]}),u.jsxs("section",{id:"browser-data",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Browser Data"}),u.jsx("p",{children:"Data stored in your browser's localStorage:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Calendar URL and cached events"})," - For offline viewing and quick access"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Email history"})," - Up to 5 recent email addresses per calendar platform (Google/Outlook) - Chrome extension only",u.jsxs("ul",{className:"list-disc list-inside ml-6 mt-1 space-y-1 text-sm",children:[u.jsx("li",{children:"Used to pre-fill email when syncing events"}),u.jsx("li",{children:u.jsx("strong",{children:"Stored locally only in your browser, never transmitted to any server"})}),u.jsx("li",{children:"Can be removed individually (X button in dropdown) or cleared via browser settings"}),u.jsx("li",{children:"Google and Outlook email histories are stored separately"})]})]})]}),u.jsxs("p",{children:[u.jsx("strong",{children:"Control:"})," You can clear this data anytime via browser settings. Individual emails can be removed from history using the X button in the email dropdown (extension)."]}),u.jsxs("p",{children:[u.jsx("strong",{children:"Scope:"})," Only accessible to BusiCal running on the same domain."]}),u.jsxs("p",{children:[u.jsx("strong",{children:"Persistence:"})," Survives browser restarts but can be cleared by you at any time."]})]}),u.jsxs("section",{id:"security",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Security Measures"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"HTTPS only (encrypted connections)"}),u.jsx("li",{children:"URL validation (prevents malicious requests)"}),u.jsx("li",{children:"SSRF attack prevention"}),u.jsx("li",{children:"Content validation (must be valid ICS format)"}),u.jsx("li",{children:"File size limits (max 5MB)"}),u.jsx("li",{children:"Security headers (X-Frame-Options, CSP, etc.)"}),u.jsx("li",{children:"No authentication tokens stored"}),u.jsx("li",{children:"Rate limiting (Cloudflare configuration)"}),u.jsx("li",{children:"Minimal extension permissions (only what's necessary)"}),u.jsx("li",{children:"No background scripts or network requests in extension"})]})]}),u.jsxs("section",{id:"changes",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Changes to This Policy"}),u.jsx("p",{children:"If we ever need to change this policy, we'll:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:'Update this document with a new "Last Updated" date'}),u.jsx("li",{children:"Notify users via GitHub release notes"}),u.jsx("li",{children:"Maintain previous versions for transparency"})]})]}),u.jsxs("section",{id:"contact",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Contact"}),u.jsx("p",{children:"Questions or concerns?"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:["GitHub Issues:"," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/issues",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://github.com/dirathea/getbusicalapp/issues"})]}),u.jsxs("li",{children:["Open a discussion:"," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/discussions",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://github.com/dirathea/getbusicalapp/discussions"})]})]})]}),u.jsxs("section",{id:"summary",className:"border-t pt-6",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Summary (TL;DR)"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Your data stays in your browser (both web app and extension)"}),u.jsx("li",{children:"Extension processes everything locally - zero network requests"}),u.jsx("li",{children:"Web app proxy is a pass-through, stores nothing"}),u.jsx("li",{children:"No tracking, no analytics, no logs"}),u.jsx("li",{children:"Open source - verify yourself"}),u.jsx("li",{children:"Self-host for complete control"})]})]})]})]})}function g5(){return u.jsxs("div",{className:"w-full max-w-4xl mx-auto space-y-8",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($S,{className:"h-6 w-6 text-primary"}),u.jsx("h1",{className:"text-3xl font-bold",children:"Terms of Service"})]}),u.jsx("p",{className:"text-muted-foreground",children:"Last Updated: January 18, 2026"})]}),u.jsx("div",{className:"border-l-4 border-yellow-500 bg-yellow-50 dark:bg-yellow-950/20 p-4 rounded-r-lg",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(jp,{className:"h-5 w-5 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5"}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("h3",{className:"font-semibold text-yellow-900 dark:text-yellow-100",children:"Important Notice"}),u.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:"By using BusiCal (web app or Chrome extension), you agree to these terms. If you do not agree, please do not use our services."})]})]})}),u.jsxs("div",{className:"border rounded-lg p-6 bg-muted/30",children:[u.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Table of Contents"}),u.jsxs("nav",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[u.jsx("a",{href:"#acceptance",className:"text-primary hover:underline",children:"1. Acceptance of Terms"}),u.jsx("a",{href:"#description",className:"text-primary hover:underline",children:"2. Description of Service"}),u.jsx("a",{href:"#user-responsibilities",className:"text-primary hover:underline",children:"3. User Responsibilities"}),u.jsx("a",{href:"#privacy",className:"text-primary hover:underline",children:"4. Privacy and Data"}),u.jsx("a",{href:"#disclaimers",className:"text-primary hover:underline",children:"5. Disclaimers"}),u.jsx("a",{href:"#limitation",className:"text-primary hover:underline",children:"6. Limitation of Liability"}),u.jsx("a",{href:"#intellectual-property",className:"text-primary hover:underline",children:"7. Intellectual Property"}),u.jsx("a",{href:"#termination",className:"text-primary hover:underline",children:"8. Termination"}),u.jsx("a",{href:"#changes",className:"text-primary hover:underline",children:"9. Changes to Terms"}),u.jsx("a",{href:"#governing-law",className:"text-primary hover:underline",children:"10. Governing Law"}),u.jsx("a",{href:"#contact",className:"text-primary hover:underline",children:"11. Contact Information"})]})]}),u.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none space-y-8",children:[u.jsxs("section",{id:"acceptance",children:[u.jsxs("h2",{className:"text-2xl font-semibold flex items-center gap-2",children:[u.jsx(xj,{className:"h-5 w-5 text-primary"}),"1. Acceptance of Terms"]}),u.jsx("p",{children:'These Terms of Service ("Terms") govern your access to and use of BusiCal, including our web application available at https://getbusical.app and our Chrome extension (collectively, the "Service").'}),u.jsx("p",{children:"By accessing or using the Service, you agree to be bound by these Terms and our Privacy Policy. If you do not agree to these Terms, you must not use the Service."})]}),u.jsxs("section",{id:"description",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"2. Description of Service"}),u.jsx("p",{children:"BusiCal provides tools to help you share calendar events between different calendar platforms while maintaining privacy:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Web Application:"})," A Progressive Web App (PWA) that allows you to view your calendar events from an ICS URL and share them to other calendars (Google Calendar, Outlook, or download .ics files)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Chrome Extension:"})," A browser extension that integrates with Google Calendar to provide one-click sharing of calendar events to other platforms."]})]}),u.jsx("p",{children:"The Service is designed to protect your privacy by processing all calendar data locally in your browser without storing or transmitting sensitive information to external servers (except for the web app's CORS proxy pass-through)."})]}),u.jsxs("section",{id:"user-responsibilities",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"3. User Responsibilities"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"3.1. Acceptable Use"}),u.jsx("p",{children:"You agree to use the Service only for lawful purposes and in accordance with these Terms. You agree NOT to:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Use the Service in any way that violates applicable laws or regulations"}),u.jsx("li",{children:"Attempt to gain unauthorized access to any part of the Service"}),u.jsx("li",{children:"Interfere with or disrupt the Service or servers/networks connected to the Service"}),u.jsx("li",{children:"Use the Service to transmit malicious code, viruses, or harmful content"}),u.jsx("li",{children:"Attempt to reverse engineer, decompile, or discover the source code (note: the Service is open source, so source code is already publicly available)"}),u.jsx("li",{children:"Use the Service to violate the privacy rights of others"}),u.jsx("li",{children:"Abuse or overload the CORS proxy with excessive requests"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"3.2. Calendar Provider Terms"}),u.jsx("p",{children:"When using BusiCal to access calendars from third-party providers (Google Calendar, Outlook, iCloud, etc.), you must comply with their respective terms of service. BusiCal is not responsible for your compliance with third-party terms."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"3.3. Security of Your Data"}),u.jsx("p",{children:"You are responsible for:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Keeping your calendar ICS URLs confidential"}),u.jsx("li",{children:"Ensuring your browser and device are secure"}),u.jsx("li",{children:"Managing access to your device and browser where BusiCal data is stored locally"}),u.jsx("li",{children:"Regenerating your ICS URLs if you believe they have been compromised"})]})]}),u.jsxs("section",{id:"privacy",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"4. Privacy and Data"}),u.jsxs("p",{children:["Your privacy is important to us. Please review our"," ",u.jsx("a",{href:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"})," ","to understand how we handle your data."]}),u.jsx("p",{children:"Key points:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"All calendar data is processed locally in your browser"}),u.jsx("li",{children:"The Chrome extension makes zero network requests - all processing is client-side"}),u.jsx("li",{children:"The web app uses a stateless CORS proxy that does not store or log your data"}),u.jsx("li",{children:"We do not collect personal information, analytics, or tracking data"}),u.jsx("li",{children:"You can delete all local data at any time via browser settings"})]})]}),u.jsxs("section",{id:"disclaimers",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"5. Disclaimers"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:'5.1. "AS IS" Basis'}),u.jsx("p",{children:'THE SERVICE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO:'}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Warranties of merchantability or fitness for a particular purpose"}),u.jsx("li",{children:"Warranties of non-infringement"}),u.jsx("li",{children:"Warranties that the Service will be uninterrupted, secure, or error-free"}),u.jsx("li",{children:"Warranties regarding the accuracy, reliability, or completeness of calendar data"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"5.2. No Guarantee of Availability"}),u.jsx("p",{children:"We do not guarantee that the Service will always be available, uninterrupted, or free from errors. The Service may be temporarily unavailable due to maintenance, updates, or technical issues."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"5.3. Third-Party Services"}),u.jsx("p",{children:"BusiCal integrates with third-party calendar providers (Google Calendar, Outlook, iCloud, etc.). We are not responsible for:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Changes to third-party APIs or services that may affect BusiCal functionality"}),u.jsx("li",{children:"Downtime or issues with third-party calendar providers"}),u.jsx("li",{children:"Data handling practices of third-party providers"}),u.jsx("li",{children:"Compatibility issues with future browser or calendar provider updates"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"5.4. Calendar Synchronization"}),u.jsx("p",{children:"BusiCal facilitates sharing calendar events but does not guarantee:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"That events will be successfully created in your target calendar (this depends on the calendar provider)"}),u.jsx("li",{children:"That event details will be accurately preserved during sharing"}),u.jsx("li",{children:"That recurring events will be handled correctly by all calendar providers"}),u.jsx("li",{children:"Real-time synchronization between calendars"})]})]}),u.jsxs("section",{id:"limitation",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"6. Limitation of Liability"}),u.jsx("p",{children:"TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BUSICAL, ITS DEVELOPERS, OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Loss of data or calendar events"}),u.jsx("li",{children:"Loss of profits or business opportunities"}),u.jsx("li",{children:"Service interruptions or downtime"}),u.jsx("li",{children:"Errors in calendar synchronization"}),u.jsx("li",{children:"Unauthorized access to your calendar data"}),u.jsx("li",{children:"Damages arising from use or inability to use the Service"})]}),u.jsx("p",{children:"THIS LIMITATION APPLIES WHETHER THE ALLEGED LIABILITY IS BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, OR ANY OTHER BASIS, EVEN IF BUSICAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."}),u.jsx("p",{children:"IN JURISDICTIONS THAT DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, OUR LIABILITY IS LIMITED TO THE MAXIMUM EXTENT PERMITTED BY LAW."}),u.jsx("p",{children:"Because the Service is provided free of charge, in no event shall our total liability to you exceed $0.00 USD."})]}),u.jsxs("section",{id:"intellectual-property",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"7. Intellectual Property"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"7.1. Open Source License"}),u.jsx("p",{children:"BusiCal is open source software licensed under the MIT License. You are free to:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Use the software for any purpose (personal or commercial)"}),u.jsx("li",{children:"Modify the source code"}),u.jsx("li",{children:"Distribute the software"}),u.jsx("li",{children:"Create derivative works"})]}),u.jsx("p",{children:"Subject to the conditions of the MIT License, including providing attribution and including the license notice."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"7.2. Trademarks"}),u.jsx("p",{children:'"BusiCal" and the BusiCal logo are trademarks of the project maintainers. Use of these trademarks requires permission except as allowed under fair use.'}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"7.3. Third-Party Content"}),u.jsx("p",{children:"BusiCal uses third-party libraries and services. Please refer to the project repository for a complete list of dependencies and their respective licenses."})]}),u.jsxs("section",{id:"termination",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"8. Termination"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"8.1. By You"}),u.jsx("p",{children:"You may stop using the Service at any time. To fully terminate:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Clear your browser's localStorage to remove all BusiCal data"}),u.jsx("li",{children:"Uninstall the Chrome extension (if installed)"}),u.jsx("li",{children:"Regenerate your calendar ICS URLs to revoke access"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"8.2. By Us"}),u.jsx("p",{children:"We reserve the right to suspend or terminate access to the Service at any time, with or without notice, for any reason, including but not limited to:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Violation of these Terms"}),u.jsx("li",{children:"Abusive or excessive use of the CORS proxy"}),u.jsx("li",{children:"Legal or regulatory requirements"}),u.jsx("li",{children:"Discontinuation of the Service"})]}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"8.3. Effect of Termination"}),u.jsx("p",{children:"Upon termination:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"Your right to use the Service immediately ceases"}),u.jsx("li",{children:"All data stored locally in your browser will remain until you manually clear it"}),u.jsx("li",{children:"Provisions of these Terms that by their nature should survive termination (including disclaimers and limitations of liability) will continue to apply"})]})]}),u.jsxs("section",{id:"changes",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"9. Changes to Terms"}),u.jsx("p",{children:'We reserve the right to modify these Terms at any time. Changes will be effective immediately upon posting the updated Terms on this page with a new "Last Updated" date.'}),u.jsx("p",{children:"Your continued use of the Service after changes are posted constitutes your acceptance of the modified Terms. We encourage you to review these Terms periodically."}),u.jsx("p",{children:"For significant changes, we will notify users via:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsx("li",{children:"GitHub release notes"}),u.jsx("li",{children:"Notice on the website homepage"}),u.jsx("li",{children:"Chrome Web Store update description (for extension users)"})]})]}),u.jsxs("section",{id:"governing-law",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"10. Governing Law and Dispute Resolution"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"10.1. Governing Law"}),u.jsx("p",{children:"These Terms shall be governed by and construed in accordance with the laws of Germany, without regard to its conflict of law provisions."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"10.2. Dispute Resolution"}),u.jsx("p",{children:"Before pursuing any formal legal action, we encourage you to contact us via GitHub Issues to attempt to resolve any disputes informally."}),u.jsx("p",{children:"Any disputes arising out of or relating to these Terms or the Service shall be subject to the exclusive jurisdiction of the courts in Berlin, Germany."})]}),u.jsxs("section",{id:"miscellaneous",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"11. Miscellaneous"}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"11.1. Entire Agreement"}),u.jsx("p",{children:"These Terms, together with our Privacy Policy, constitute the entire agreement between you and BusiCal regarding the Service."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"11.2. Severability"}),u.jsx("p",{children:"If any provision of these Terms is found to be invalid or unenforceable, the remaining provisions shall continue in full force and effect."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"11.3. Waiver"}),u.jsx("p",{children:"No waiver of any term of these Terms shall be deemed a further or continuing waiver of such term or any other term."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"11.4. Assignment"}),u.jsx("p",{children:"You may not assign or transfer these Terms or your rights under these Terms without our prior written consent. We may assign these Terms without restriction."}),u.jsx("h3",{className:"text-lg font-semibold mt-4",children:"11.5. No Professional Advice"}),u.jsx("p",{children:"The Service is not intended to provide professional advice of any kind. You should consult with appropriate professionals for specific advice tailored to your situation."})]}),u.jsxs("section",{id:"contact",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"12. Contact Information"}),u.jsx("p",{children:"If you have questions about these Terms, please contact us:"}),u.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"GitHub Issues:"})," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/issues",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://github.com/dirathea/getbusicalapp/issues"})]}),u.jsxs("li",{children:[u.jsx("strong",{children:"GitHub Discussions:"})," ",u.jsx("a",{href:"https://github.com/dirathea/getbusicalapp/discussions",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://github.com/dirathea/getbusicalapp/discussions"})]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Website:"})," ",u.jsx("a",{href:"https://getbusical.app",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://getbusical.app"})]})]})]}),u.jsxs("section",{id:"acknowledgment",className:"border-t pt-6",children:[u.jsx("h2",{className:"text-2xl font-semibold",children:"Acknowledgment"}),u.jsx("p",{children:"BY USING BUSICAL, YOU ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS OF SERVICE, UNDERSTAND THEM, AND AGREE TO BE BOUND BY THEM."}),u.jsx("p",{className:"text-sm text-muted-foreground italic",children:"For those who had a busy day ✨"})]})]})]})}function y5({children:e}){const{icsUrl:t,isInitialized:a}=Mf();return a?t?u.jsx(u.Fragment,{children:e}):u.jsx(HD,{to:"/setup",replace:!0}):null}const v5=mO([{path:"/",element:u.jsx($z,{}),children:[{index:!0,element:u.jsx(y5,{children:u.jsx(t5,{})})},{path:"setup",element:u.jsx(u5,{})},{path:"faq",element:u.jsx(h5,{})},{path:"about",element:u.jsx(m5,{})},{path:"privacy",element:u.jsx(p5,{})},{path:"terms",element:u.jsx(g5,{})}]}]);function x5(){return u.jsx(NO,{router:v5})}if(!window.crypto||!window.crypto.subtle)throw document.body.innerHTML=`
|
|
78
|
+
<div style="
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
height: 100vh;
|
|
83
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
84
|
+
padding: 20px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
">
|
|
87
|
+
<div style="max-width: 500px;">
|
|
88
|
+
<h1 style="font-size: 24px; margin-bottom: 16px; color: #dc2626;">
|
|
89
|
+
Browser Not Supported
|
|
90
|
+
</h1>
|
|
91
|
+
<p style="color: #6b7280; margin-bottom: 20px;">
|
|
92
|
+
BusiCal requires modern encryption features that are not available in your browser.
|
|
93
|
+
</p>
|
|
94
|
+
<p style="color: #6b7280; font-size: 14px;">
|
|
95
|
+
Please use a modern browser like <strong>Chrome</strong>, <strong>Firefox</strong>,
|
|
96
|
+
<strong>Safari</strong>, or <strong>Edge</strong>.
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
`,new Error("Web Crypto API not supported");JN.createRoot(document.getElementById("root")).render(u.jsx(x.StrictMode,{children:u.jsx(x5,{})}));
|