@pg-boss/dashboard 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/MenuTrigger-CoRd-BqL.js +1 -0
- package/build/client/assets/{_index-9fLquIe1.js → _index-BTx7NRR8.js} +1 -1
- package/build/client/assets/{badge-B5ZugmiV.js → badge-DBD4CzAv.js} +1 -1
- package/build/client/assets/{button-Djse56Dx.js → button-Ba8FWhqs.js} +1 -1
- package/build/client/assets/{chevron-down-B4tDL9Ah.js → chevron-down-CYa4FYmp.js} +1 -1
- package/build/client/assets/chunk-UVKPFVEO-YfSfkVr_.js +26 -0
- package/build/client/assets/{createLucideIcon-B0YqJFaz.js → createLucideIcon-Bt-yXILq.js} +1 -1
- package/build/client/assets/db-link-CU7IJqbq.js +1 -0
- package/build/client/assets/dialog-Dkx42Rkd.js +1 -0
- package/build/client/assets/{entry.client-Szv-xmaE.js → entry.client-DXZUROTm.js} +4 -4
- package/build/client/assets/{error-card-CXoOCvsg.js → error-card-D-uZRy_l.js} +1 -1
- package/build/client/assets/{filter-select-DXyBBVm8.js → filter-select-Tk_CBvrn.js} +1 -1
- package/build/client/assets/{index-x2yWco1W.js → index-DuhoQwUK.js} +1 -1
- package/build/client/assets/{jobs-CM6xcK-O.js → jobs-ouYjIGAi.js} +1 -1
- package/build/client/assets/manifest-72f6b3e9.js +1 -0
- package/build/client/assets/{pagination-C4yyCmBA.js → pagination-BItl293Q.js} +1 -1
- package/build/client/assets/{queues._index-Dn3ieC5d.js → queues._index-_ID9kaow.js} +1 -1
- package/build/client/assets/{queues._name-GrviLLx2.js → queues._name-DwdbQND-.js} +1 -1
- package/build/client/assets/{queues._name.jobs._jobId-s_wYs79w.js → queues._name.jobs._jobId-DrgG3VBb.js} +1 -1
- package/build/client/assets/{queues.create-Ch3Mqw52.js → queues.create-CmVW5UVm.js} +1 -1
- package/build/client/assets/{root-D0qqtdF7.js → root-DDqOT0vL.js} +1 -1
- package/build/client/assets/{schedules-DwnuuhxF.js → schedules-B6ixYsvz.js} +1 -1
- package/build/client/assets/{schedules._name._key-DJn-u3Cm.js → schedules._name._key-CXTVKoOc.js} +1 -1
- package/build/client/assets/{schedules.new-CQuE2Uhz.js → schedules.new-Dmasri9v.js} +1 -1
- package/build/client/assets/{send-DVfuC6NR.js → send-CqR34Z50.js} +1 -1
- package/build/client/assets/{table-CtSLyG7m.js → table-Au2E5mnP.js} +1 -1
- package/build/client/assets/useOpenInteractionType-mgYMZAa8.js +12 -0
- package/build/client/assets/{warnings-DqRQYomb.js → warnings-Dj3qacgN.js} +1 -1
- package/build/server/assets/server-build.js +115 -43
- package/package.json +14 -14
- package/build/client/assets/MenuTrigger-CEHCnGow.js +0 -1
- package/build/client/assets/chunk-LFPYN7LY-Cj1DJmJR.js +0 -26
- package/build/client/assets/db-link-DmvfwdX4.js +0 -1
- package/build/client/assets/dialog-CQzw3QVH.js +0 -1
- package/build/client/assets/manifest-acaa4b8e.js +0 -1
- package/build/client/assets/useOpenInteractionType-Ss_6xZdw.js +0 -12
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function qn(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in e)){const o=Object.getOwnPropertyDescriptor(a,n);o&&Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt={exports:{}},it={};var Gr;function Zn(){if(Gr)return it;Gr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,n,o){var i=null;if(o!==void 0&&(i=""+o),n.key!==void 0&&(i=""+n.key),"key"in n){o={};for(var l in n)l!=="key"&&(o[l]=n[l])}else o=n;return n=o.ref,{$$typeof:e,type:a,key:i,ref:n!==void 0?n:null,props:o}}return it.Fragment=t,it.jsx=r,it.jsxs=r,it}var Kr;function eo(){return Kr||(Kr=1,Xt.exports=Zn()),Xt.exports}var ps=eo(),qt={exports:{}},z={};var Xr;function to(){if(Xr)return z;Xr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),y=Symbol.iterator;function E(m){return m===null||typeof m!="object"?null:(m=y&&m[y]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,g={};function C(m,x,A){this.props=m,this.context=x,this.refs=g,this.updater=A||R}C.prototype.isReactComponent={},C.prototype.setState=function(m,x){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,x,"setState")},C.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function S(){}S.prototype=C.prototype;function T(m,x,A){this.props=m,this.context=x,this.refs=g,this.updater=A||R}var _=T.prototype=new S;_.constructor=T,b(_,C.prototype),_.isPureReactComponent=!0;var M=Array.isArray;function D(){}var k={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function B(m,x,A){var N=A.ref;return{$$typeof:e,type:m,key:x,ref:N!==void 0?N:null,props:A}}function K(m,x){return B(m.type,x,m.props)}function ne(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function Y(m){var x={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(A){return x[A]})}var le=/\/+/g;function te(m,x){return typeof m=="object"&&m!==null&&m.key!=null?Y(""+m.key):x.toString(36)}function V(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(D,D):(m.status="pending",m.then(function(x){m.status==="pending"&&(m.status="fulfilled",m.value=x)},function(x){m.status==="pending"&&(m.status="rejected",m.reason=x)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function q(m,x,A,N,J){var G=typeof m;(G==="undefined"||G==="boolean")&&(m=null);var Q=!1;if(m===null)Q=!0;else switch(G){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(m.$$typeof){case e:case t:Q=!0;break;case h:return Q=m._init,q(Q(m._payload),x,A,N,J)}}if(Q)return J=J(m),Q=N===""?"."+te(m,0):N,M(J)?(A="",Q!=null&&(A=Q.replace(le,"$&/")+"/"),q(J,x,A,"",function(Yt){return Yt})):J!=null&&(ne(J)&&(J=K(J,A+(J.key==null||m&&m.key===J.key?"":(""+J.key).replace(le,"$&/")+"/")+Q)),x.push(J)),1;Q=0;var ve=N===""?".":N+":";if(M(m))for(var ce=0;ce<m.length;ce++)N=m[ce],G=ve+te(N,ce),Q+=q(N,x,A,G,J);else if(ce=E(m),typeof ce=="function")for(m=ce.call(m),ce=0;!(N=m.next()).done;)N=N.value,G=ve+te(N,ce++),Q+=q(N,x,A,G,J);else if(G==="object"){if(typeof m.then=="function")return q(V(m),x,A,N,J);throw x=String(m),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}return Q}function ue(m,x,A){if(m==null)return m;var N=[],J=0;return q(m,N,"","",function(G){return x.call(A,G,J++)}),N}function fe(m){if(m._status===-1){var x=m._result;x=x(),x.then(function(A){(m._status===0||m._status===-1)&&(m._status=1,m._result=A)},function(A){(m._status===0||m._status===-1)&&(m._status=2,m._result=A)}),m._status===-1&&(m._status=0,m._result=x)}if(m._status===1)return m._result.default;throw m._result}var X=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var x=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(x))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)},ye={map:ue,forEach:function(m,x,A){ue(m,function(){x.apply(this,arguments)},A)},count:function(m){var x=0;return ue(m,function(){x++}),x},toArray:function(m){return ue(m,function(x){return x})||[]},only:function(m){if(!ne(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return z.Activity=c,z.Children=ye,z.Component=C,z.Fragment=r,z.Profiler=n,z.PureComponent=T,z.StrictMode=a,z.Suspense=s,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,z.__COMPILER_RUNTIME={__proto__:null,c:function(m){return k.H.useMemoCache(m)}},z.cache=function(m){return function(){return m.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(m,x,A){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var N=b({},m.props),J=m.key;if(x!=null)for(G in x.key!==void 0&&(J=""+x.key),x)!v.call(x,G)||G==="key"||G==="__self"||G==="__source"||G==="ref"&&x.ref===void 0||(N[G]=x[G]);var G=arguments.length-2;if(G===1)N.children=A;else if(1<G){for(var Q=Array(G),ve=0;ve<G;ve++)Q[ve]=arguments[ve+2];N.children=Q}return B(m.type,J,N)},z.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:o,_context:m},m},z.createElement=function(m,x,A){var N,J={},G=null;if(x!=null)for(N in x.key!==void 0&&(G=""+x.key),x)v.call(x,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(J[N]=x[N]);var Q=arguments.length-2;if(Q===1)J.children=A;else if(1<Q){for(var ve=Array(Q),ce=0;ce<Q;ce++)ve[ce]=arguments[ce+2];J.children=ve}if(m&&m.defaultProps)for(N in Q=m.defaultProps,Q)J[N]===void 0&&(J[N]=Q[N]);return B(m,G,J)},z.createRef=function(){return{current:null}},z.forwardRef=function(m){return{$$typeof:l,render:m}},z.isValidElement=ne,z.lazy=function(m){return{$$typeof:h,_payload:{_status:-1,_result:m},_init:fe}},z.memo=function(m,x){return{$$typeof:u,type:m,compare:x===void 0?null:x}},z.startTransition=function(m){var x=k.T,A={};k.T=A;try{var N=m(),J=k.S;J!==null&&J(A,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(D,X)}catch(G){X(G)}finally{x!==null&&A.types!==null&&(x.types=A.types),k.T=x}},z.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},z.use=function(m){return k.H.use(m)},z.useActionState=function(m,x,A){return k.H.useActionState(m,x,A)},z.useCallback=function(m,x){return k.H.useCallback(m,x)},z.useContext=function(m){return k.H.useContext(m)},z.useDebugValue=function(){},z.useDeferredValue=function(m,x){return k.H.useDeferredValue(m,x)},z.useEffect=function(m,x){return k.H.useEffect(m,x)},z.useEffectEvent=function(m){return k.H.useEffectEvent(m)},z.useId=function(){return k.H.useId()},z.useImperativeHandle=function(m,x,A){return k.H.useImperativeHandle(m,x,A)},z.useInsertionEffect=function(m,x){return k.H.useInsertionEffect(m,x)},z.useLayoutEffect=function(m,x){return k.H.useLayoutEffect(m,x)},z.useMemo=function(m,x){return k.H.useMemo(m,x)},z.useOptimistic=function(m,x){return k.H.useOptimistic(m,x)},z.useReducer=function(m,x,A){return k.H.useReducer(m,x,A)},z.useRef=function(m){return k.H.useRef(m)},z.useState=function(m){return k.H.useState(m)},z.useSyncExternalStore=function(m,x,A){return k.H.useSyncExternalStore(m,x,A)},z.useTransition=function(){return k.H.useTransition()},z.version="19.2.4",z}var qr;function ro(){return qr||(qr=1,qt.exports=to()),qt.exports}var d=ro();const ao=Qn(d),no=qn({__proto__:null,default:ao},[d]);var _a=e=>{throw TypeError(e)},oo=(e,t,r)=>t.has(e)||_a("Cannot "+r),Qt=(e,t,r)=>(oo(e,t,"read from private field"),r?r.call(e):t.get(e)),io=(e,t,r)=>t.has(e)?_a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Qr="popstate";function Zr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ys(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ft("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:Te(n)}return so(t,r,null,e)}function W(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ie(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lo(){return Math.random().toString(36).substring(2,10)}function ea(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ft(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?_e(t):t,state:r,key:t&&t.key||a||lo(),unstable_mask:n}}function Te({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function _e(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function so(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function c(){l="POP";let g=h(),C=g==null?null:g-u;u=g,s&&s({action:l,location:b.location,delta:C})}function y(g,C){l="PUSH";let S=Zr(g)?g:ft(b.location,g,C);u=h()+1;let T=ea(S,u),_=b.createHref(S.unstable_mask||S);try{i.pushState(T,"",_)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;n.location.assign(_)}o&&s&&s({action:l,location:b.location,delta:1})}function E(g,C){l="REPLACE";let S=Zr(g)?g:ft(b.location,g,C);u=h();let T=ea(S,u),_=b.createHref(S.unstable_mask||S);i.replaceState(T,"",_),o&&s&&s({action:l,location:b.location,delta:0})}function R(g){return Da(g)}let b={get action(){return l},get location(){return e(n,i)},listen(g){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Qr,c),s=g,()=>{n.removeEventListener(Qr,c),s=null}},createHref(g){return t(n,g)},createURL:R,encodeLocation(g){let C=R(g);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:y,replace:E,go(g){return i.go(g)}};return b}function Da(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),W(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Te(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var ut,ta=class{constructor(e){if(io(this,ut,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Qt(this,ut).has(e))return Qt(this,ut).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Qt(this,ut).set(e,t)}};ut=new WeakMap;var uo=new Set(["lazy","caseSensitive","path","id","index","children"]);function co(e){return uo.has(e)}var fo=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function ho(e){return fo.has(e)}function mo(e){return e.index===!0}function ht(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(W(o.index!==!0||!o.children,"Cannot specify children on an index route"),W(n||!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),mo(o)){let u={...o,id:s};return a[s]=ra(u,t(u)),u}else{let u={...o,id:s,children:void 0};return a[s]=ra(u,t(u)),o.children&&(u.children=ht(o.children,t,l,a,n)),u}})}function ra(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ae(e,t,r="/"){return ct(e,t,r,!1)}function ct(e,t,r,a){let n=typeof t=="string"?_e(t):t,o=Ee(n.pathname||"/",r);if(o==null)return null;let i=ka(e);po(i);let l=null;for(let s=0;l==null&&s<i.length;++s){let u=Lo(o);l=xo(i[s],u,a)}return l}function Oa(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function ka(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let h={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&s)return;W(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let c=Pe([a,h.relativePath]),y=r.concat(h);i.children&&i.children.length>0&&(W(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ka(i.children,t,y,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:bo(c,i.index),routesMeta:y})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Fa(i.path))o(i,l,!0,s)}),t}function Fa(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Fa(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function po(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:So(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var yo=/^:[\w-]+$/,vo=3,go=2,wo=1,Eo=10,Ro=-2,aa=e=>e==="*";function bo(e,t){let r=e.split("/"),a=r.length;return r.some(aa)&&(a+=Ro),t&&(a+=go),r.filter(n=>!aa(n)).reduce((n,o)=>n+(yo.test(o)?vo:o===""?wo:Eo),a)}function So(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function xo(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",c=At({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},h),y=s.route;if(!c&&u&&r&&!a[a.length-1].route.index&&(c=At({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:Pe([o,c.pathname]),pathnameBase:To(Pe([o,c.pathnameBase])),route:y}),c.pathnameBase!=="/"&&(o=Pe([o,c.pathnameBase]))}return i}function At(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Aa(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:c},y)=>{if(h==="*"){let R=l[y]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const E=l[y];return c&&!E?u[h]=void 0:u[h]=(E||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Aa(e,t=!1,r=!0){ie(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 a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,h)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let c=h.charAt(u+i.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Lo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ie(!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 Ee(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Co({basename:e,pathname:t}){return t==="/"?e:Pe([e,t])}var Ia=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wr=e=>Ia.test(e);function Po(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?_e(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=na(r.substring(1),"/"):o=na(r,t)):o=t,{pathname:o,search:Mo(a),hash:_o(n)}}function na(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Zt(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Na(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Er(e){let t=Na(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function $t(e,t,r,a=!1){let n;typeof e=="string"?n=_e(e):(n={...e},W(!n.pathname||!n.pathname.includes("?"),Zt("?","pathname","search",n)),W(!n.pathname||!n.pathname.includes("#"),Zt("#","pathname","hash",n)),W(!n.search||!n.search.includes("#"),Zt("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let c=t.length-1;if(!a&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),c-=1;n.pathname=y.join("/")}l=c>=0?t[c]:"/"}let s=Po(n,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var Pe=e=>e.join("/").replace(/\/\/+/g,"/"),To=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Mo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_o=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Do=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Oo(e,t){return new Do(e,typeof t=="number"?{status:t}:t)}var ko=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},je=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ve(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function pt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var $a=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ja(e,t){let r=e;if(typeof r!="string"||!Ia.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if($a)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=Ee(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{ie(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var $e=Symbol("Uninstrumented");function Fo(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=Ze(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=Ze(l,i,()=>{});s&&(a.lazy=Object.assign(a.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[$e]??o,l=Ze(r[n],i,(...s)=>oa(s[0]));l&&(n==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[$e]=i,a[n]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[$e]??n,i=Ze(r.middleware,o,(...l)=>oa(l[0]));return i?(i[$e]=o,i):n})),a}function Ao(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[$e]??e.navigate,n=Ze(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Te(i):".",...ia(e,l??{})}});n&&(n[$e]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[$e]??e.fetch,n=Ze(r.fetch,a,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...ia(e,s??{})}});n&&(n[$e]=a,e.fetch=n)}return e}function Ze(e,t,r){return e.length===0?null:async(...a)=>{let n=await Ua(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function Ua(e,t,r,a){let n=e[a],o;if(n){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Ua(e,t,r,a-1),o=await i,W(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function oa(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:Io(t),params:{...a},unstable_pattern:n,context:No(r)}}function ia(e,t){return{currentUrl:Te(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 Io(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function No(e){if(jo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var $o=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function jo(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")===$o}var Ha=["POST","PUT","PATCH","DELETE"],Uo=new Set(Ha),Ho=["GET",...Ha],zo=new Set(Ho),za=new Set([301,302,303,307,308]),Bo=new Set([307,308]),er={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ba={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Wo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Wa="remix-router-transitions",Ya=Symbol("ResetLoaderData");function vs(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";W(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||Wo,o=n;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=p=>({...n(p),...Fo(f.map(w=>w.route).filter(Boolean),p)})}let i={},l=ht(e.routes,o,void 0,i),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Ko,c={unstable_passThroughRequests:!1,...e.future},y=null,E=new Set,R=null,b=null,g=null,C=e.hydrationData!=null,S=Ae(l,e.history.location,u),T=!1,_=null,M,D;if(S==null&&!e.patchRoutesOnNavigation){let f=xe(404,{pathname:e.history.location.pathname}),{matches:p,route:w}=Lt(l);M=!0,D=!M,S=p,_={[w.id]:f}}else if(S&&!e.hydrationData&&Et(S,l,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))M=!1,D=!M;else if(!S.some(f=>Rr(f.route)))M=!0,D=!M;else{let f=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null,w=S;if(p){let L=S.findIndex(P=>p[P.route.id]!==void 0);w=w.slice(0,L+1)}D=!1,M=!0,w.forEach(L=>{let P=Va(L.route,f,p);D=D||P.renderFallback,M=M&&!P.shouldLoad})}else{M=!1,D=!M,S=[];let f=Et(null,l,e.history.location.pathname);f.active&&f.matches&&(T=!0,S=f.matches)}let k,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:M,renderFallback:D,navigation:er,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||_,fetchers:new Map,blockers:new Map},B="POP",K=null,ne=!1,Y,le=!1,te=new Map,V=null,q=!1,ue=!1,fe=new Set,X=new Map,ye=0,m=-1,x=new Map,A=new Set,N=new Map,J=new Map,G=new Set,Q=new Map,ve,ce=null;function Yt(){if(y=e.history.listen(({action:f,location:p,delta:w})=>{if(ve){ve(),ve=void 0;return}ie(Q.size===0||w!=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 L=Br({currentLocation:v.location,nextLocation:p,historyAction:f});if(L&&w!=null){let P=new Promise(j=>{ve=j});e.history.go(w*-1),wt(L,{state:"blocked",location:p,proceed(){wt(L,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),P.then(()=>e.history.go(w))},reset(){let j=new Map(v.blockers);j.set(L,qe),he({blockers:j})}}),K?.resolve(),K=null;return}return Ue(f,p)}),r){hi(t,te);let f=()=>mi(t,te);t.addEventListener("pagehide",f),V=()=>t.removeEventListener("pagehide",f)}return v.initialized||Ue("POP",v.location,{initialHydration:!0}),k}function Fn(){y&&y(),V&&V(),E.clear(),Y&&Y.abort(),v.fetchers.forEach((f,p)=>Jt(p)),v.blockers.forEach((f,p)=>zr(p))}function An(f){return E.add(f),()=>E.delete(f)}function he(f,p={}){f.matches&&(f.matches=f.matches.map(P=>{let j=i[P.route.id],I=P.route;return I.element!==j.element||I.errorElement!==j.errorElement||I.hydrateFallbackElement!==j.hydrateFallbackElement?{...P,route:j}:P})),v={...v,...f};let w=[],L=[];v.fetchers.forEach((P,j)=>{P.state==="idle"&&(G.has(j)?w.push(j):L.push(j))}),G.forEach(P=>{!v.fetchers.has(P)&&!X.has(P)&&w.push(P)}),[...E].forEach(P=>P(v,{deletedFetchers:w,newErrors:f.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),w.forEach(P=>Jt(P)),L.forEach(P=>v.fetchers.delete(P))}function Ke(f,p,{flushSync:w}={}){let L=v.actionData!=null&&v.navigation.formMethod!=null&&pe(v.navigation.formMethod)&&v.navigation.state==="loading"&&f.state?._isRedirect!==!0,P;p.actionData?Object.keys(p.actionData).length>0?P=p.actionData:P=null:L?P=v.actionData:P=null;let j=p.loaderData?va(v.loaderData,p.loaderData,p.matches||[],p.errors):v.loaderData,I=v.blockers;I.size>0&&(I=new Map(I),I.forEach((H,$)=>I.set($,qe)));let F=q?!1:Yr(f,p.matches||v.matches),U=ne===!0||v.navigation.formMethod!=null&&pe(v.navigation.formMethod)&&f.state?._isRedirect!==!0;s&&(l=s,s=void 0),q||B==="POP"||(B==="PUSH"?e.history.push(f,f.state):B==="REPLACE"&&e.history.replace(f,f.state));let O;if(B==="POP"){let H=te.get(v.location.pathname);H&&H.has(f.pathname)?O={currentLocation:v.location,nextLocation:f}:te.has(f.pathname)&&(O={currentLocation:f,nextLocation:v.location})}else if(le){let H=te.get(v.location.pathname);H?H.add(f.pathname):(H=new Set([f.pathname]),te.set(v.location.pathname,H)),O={currentLocation:v.location,nextLocation:f}}he({...p,actionData:P,loaderData:j,historyAction:B,location:f,initialized:!0,renderFallback:!1,navigation:er,revalidation:"idle",restoreScrollPosition:F,preventScrollReset:U,blockers:I},{viewTransitionOpts:O,flushSync:w===!0}),B="POP",ne=!1,le=!1,q=!1,ue=!1,K?.resolve(),K=null,ce?.resolve(),ce=null}async function Ar(f,p){if(K?.resolve(),K=null,typeof f=="number"){K||(K=Ea());let oe=K.promise;return e.history.go(f),oe}let w=lr(v.location,v.matches,u,f,p?.fromRouteId,p?.relative),{path:L,submission:P,error:j}=la(!1,w,p),I;p?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof p.unstable_mask=="string"?_e(p.unstable_mask):{...v.location.unstable_mask,...p.unstable_mask}});let F=v.location,U=ft(F,L,p&&p.state,void 0,I);U={...U,...e.history.encodeLocation(U)};let O=p&&p.replace!=null?p.replace:void 0,H="PUSH";O===!0?H="REPLACE":O===!1||P!=null&&pe(P.formMethod)&&P.formAction===v.location.pathname+v.location.search&&(H="REPLACE");let $=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,re=(p&&p.flushSync)===!0,ee=Br({currentLocation:F,nextLocation:U,historyAction:H});if(ee){wt(ee,{state:"blocked",location:U,proceed(){wt(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),Ar(f,p)},reset(){let oe=new Map(v.blockers);oe.set(ee,qe),he({blockers:oe})}});return}await Ue(H,U,{submission:P,pendingError:j,preventScrollReset:$,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:re,callSiteDefaultShouldRevalidate:p&&p.unstable_defaultShouldRevalidate})}function In(){ce||(ce=Ea()),Vt(),he({revalidation:"loading"});let f=ce.promise;return v.navigation.state==="submitting"?f:v.navigation.state==="idle"?(Ue(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),f):(Ue(B||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:le===!0}),f)}async function Ue(f,p,w){Y&&Y.abort(),Y=null,B=f,q=(w&&w.startUninterruptedRevalidation)===!0,Jn(v.location,v.matches),ne=(w&&w.preventScrollReset)===!0,le=(w&&w.enableViewTransition)===!0;let L=s||l,P=w&&w.overrideNavigation,j=w?.initialHydration&&v.matches&&v.matches.length>0&&!T?v.matches:Ae(L,p,u),I=(w&&w.flushSync)===!0;if(j&&v.initialized&&!ue&&ai(v.location,p)&&!(w&&w.submission&&pe(w.submission.formMethod))){Ke(p,{matches:j},{flushSync:I});return}let F=Et(j,L,p.pathname);if(F.active&&F.matches&&(j=F.matches),!j){let{error:de,notFoundMatches:ge,route:ae}=Gt(p.pathname);Ke(p,{matches:ge,loaderData:{},errors:{[ae.id]:de}},{flushSync:I});return}Y=new AbortController;let U=Qe(e.history,p,Y.signal,w&&w.submission),O=e.getContext?await e.getContext():new ta,H;if(w&&w.pendingError)H=[Ne(j).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&pe(w.submission.formMethod)){let de=await Nn(U,p,w.submission,j,O,F.active,w&&w.initialHydration===!0,{replace:w.replace,flushSync:I});if(de.shortCircuited)return;if(de.pendingActionResult){let[ge,ae]=de.pendingActionResult;if(Se(ae)&&Ve(ae.error)&&ae.error.status===404){Y=null,Ke(p,{matches:de.matches,loaderData:{},errors:{[ge]:ae.error}});return}}j=de.matches||j,H=de.pendingActionResult,P=tr(p,w.submission),I=!1,F.active=!1,U=Qe(e.history,U.url,U.signal)}let{shortCircuited:$,matches:re,loaderData:ee,errors:oe}=await $n(U,p,j,O,F.active,P,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,I,H,w&&w.callSiteDefaultShouldRevalidate);$||(Y=null,Ke(p,{matches:re||j,...ga(H),loaderData:ee,errors:oe}))}async function Nn(f,p,w,L,P,j,I,F={}){Vt();let U=di(p,w);if(he({navigation:U},{flushSync:F.flushSync===!0}),j){let $=await Rt(L,p.pathname,f.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){if($.partialMatches.length===0){let{matches:ee,route:oe}=Lt(l);return{matches:ee,pendingActionResult:[oe.id,{type:"error",error:$.error}]}}let re=Ne($.partialMatches).route.id;return{matches:$.partialMatches,pendingActionResult:[re,{type:"error",error:$.error}]}}else if($.matches)L=$.matches;else{let{notFoundMatches:re,error:ee,route:oe}=Gt(p.pathname);return{matches:re,pendingActionResult:[oe.id,{type:"error",error:ee}]}}}let O,H=Dt(L,p);if(!H.route.action&&!H.route.lazy)O={type:"error",error:xe(405,{method:f.method,pathname:p.pathname,routeId:H.route.id})};else{let $=et(o,i,f,p,L,H,I?[]:a,P),re=await at(f,p,$,P,null);if(O=re[H.route.id],!O){for(let ee of L)if(re[ee.route.id]){O=re[ee.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(Ye(O)){let $;return F&&F.replace!=null?$=F.replace:$=ma(O.response.headers.get("Location"),new URL(f.url),u,e.history)===v.location.pathname+v.location.search,await He(f,O,!0,{submission:w,replace:$}),{shortCircuited:!0}}if(Se(O)){let $=Ne(L,H.route.id);return(F&&F.replace)!==!0&&(B="PUSH"),{matches:L,pendingActionResult:[$.route.id,O,H.route.id]}}return{matches:L,pendingActionResult:[H.route.id,O]}}async function $n(f,p,w,L,P,j,I,F,U,O,H,$,re){let ee=j||tr(p,I),oe=I||F||wa(ee),de=!q&&!O;if(P){if(de){let me=Ir($);he({navigation:ee,...me!==void 0?{actionData:me}:{}},{flushSync:H})}let Z=await Rt(w,p.pathname,f.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){if(Z.partialMatches.length===0){let{matches:Xe,route:We}=Lt(l);return{matches:Xe,loaderData:{},errors:{[We.id]:Z.error}}}let me=Ne(Z.partialMatches).route.id;return{matches:Z.partialMatches,loaderData:{},errors:{[me]:Z.error}}}else if(Z.matches)w=Z.matches;else{let{error:me,notFoundMatches:Xe,route:We}=Gt(p.pathname);return{matches:Xe,loaderData:{},errors:{[We.id]:me}}}}let ge=s||l,{dsMatches:ae,revalidatingFetchers:be}=sa(f,L,o,i,e.history,v,w,oe,p,O?[]:a,O===!0,ue,fe,G,N,A,ge,u,e.patchRoutesOnNavigation!=null,$,re);if(m=++ye,!e.dataStrategy&&!ae.some(Z=>Z.shouldLoad)&&!ae.some(Z=>Z.route.middleware&&Z.route.middleware.length>0)&&be.length===0){let Z=Ur();return Ke(p,{matches:w,loaderData:{},errors:$&&Se($[1])?{[$[0]]:$[1].error}:null,...ga($),...Z?{fetchers:new Map(v.fetchers)}:{}},{flushSync:H}),{shortCircuited:!0}}if(de){let Z={};if(!P){Z.navigation=ee;let me=Ir($);me!==void 0&&(Z.actionData=me)}be.length>0&&(Z.fetchers=jn(be)),he(Z,{flushSync:H})}be.forEach(Z=>{ke(Z.key),Z.controller&&X.set(Z.key,Z.controller)});let ze=()=>be.forEach(Z=>ke(Z.key));Y&&Y.signal.addEventListener("abort",ze);let{loaderResults:nt,fetcherResults:Ie}=await Nr(ae,be,f,p,L);if(f.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",ze),be.forEach(Z=>X.delete(Z.key));let Me=Ct(nt);if(Me)return await He(f,Me.result,!0,{replace:U}),{shortCircuited:!0};if(Me=Ct(Ie),Me)return A.add(Me.key),await He(f,Me.result,!0,{replace:U}),{shortCircuited:!0};let{loaderData:Kt,errors:ot}=ya(v,w,nt,$,be,Ie);O&&v.errors&&(ot={...v.errors,...ot});let Be=Ur(),bt=Hr(m),St=Be||bt||be.length>0;return{matches:w,loaderData:Kt,errors:ot,...St?{fetchers:new Map(v.fetchers)}:{}}}function Ir(f){if(f&&!Se(f[1]))return{[f[0]]:f[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function jn(f){return f.forEach(p=>{let w=v.fetchers.get(p.key),L=lt(void 0,w?w.data:void 0);v.fetchers.set(p.key,L)}),new Map(v.fetchers)}async function Un(f,p,w,L){ke(f);let P=(L&&L.flushSync)===!0,j=s||l,I=lr(v.location,v.matches,u,w,p,L?.relative),F=Ae(j,I,u),U=Et(F,j,I);if(U.active&&U.matches&&(F=U.matches),!F){Oe(f,p,xe(404,{pathname:I}),{flushSync:P});return}let{path:O,submission:H,error:$}=la(!0,I,L);if($){Oe(f,p,$,{flushSync:P});return}let re=e.getContext?await e.getContext():new ta,ee=(L&&L.preventScrollReset)===!0;if(H&&pe(H.formMethod)){await Hn(f,p,O,F,re,U.active,P,ee,H,L&&L.unstable_defaultShouldRevalidate);return}N.set(f,{routeId:p,path:O}),await zn(f,p,O,F,re,U.active,P,ee,H)}async function Hn(f,p,w,L,P,j,I,F,U,O){Vt(),N.delete(f);let H=v.fetchers.get(f);De(f,fi(U,H),{flushSync:I});let $=new AbortController,re=Qe(e.history,w,$.signal,U);if(j){let se=await Rt(L,new URL(re.url).pathname,re.signal,f);if(se.type==="aborted")return;if(se.type==="error"){Oe(f,p,se.error,{flushSync:I});return}else if(se.matches)L=se.matches;else{Oe(f,p,xe(404,{pathname:w}),{flushSync:I});return}}let ee=Dt(L,w);if(!ee.route.action&&!ee.route.lazy){let se=xe(405,{method:U.formMethod,pathname:w,routeId:p});Oe(f,p,se,{flushSync:I});return}X.set(f,$);let oe=ye,de=et(o,i,re,w,L,ee,a,P),ge=await at(re,w,de,P,f),ae=ge[ee.route.id];if(!ae){for(let se of de)if(ge[se.route.id]){ae=ge[se.route.id];break}}if(re.signal.aborted){X.get(f)===$&&X.delete(f);return}if(G.has(f)){if(Ye(ae)||Se(ae)){De(f,Fe(void 0));return}}else{if(Ye(ae))if(X.delete(f),m>oe){De(f,Fe(void 0));return}else return A.add(f),De(f,lt(U)),He(re,ae,!1,{fetcherSubmission:U,preventScrollReset:F});if(Se(ae)){Oe(f,p,ae.error);return}}let be=v.navigation.location||v.location,ze=Qe(e.history,be,$.signal),nt=s||l,Ie=v.navigation.state!=="idle"?Ae(nt,v.navigation.location,u):v.matches;W(Ie,"Didn't find any matches after fetcher action");let Me=++ye;x.set(f,Me);let Kt=lt(U,ae.data);v.fetchers.set(f,Kt);let{dsMatches:ot,revalidatingFetchers:Be}=sa(ze,P,o,i,e.history,v,Ie,U,be,a,!1,ue,fe,G,N,A,nt,u,e.patchRoutesOnNavigation!=null,[ee.route.id,ae],O);Be.filter(se=>se.key!==f).forEach(se=>{let xt=se.key,Jr=v.fetchers.get(xt),Xn=lt(void 0,Jr?Jr.data:void 0);v.fetchers.set(xt,Xn),ke(xt),se.controller&&X.set(xt,se.controller)}),he({fetchers:new Map(v.fetchers)});let bt=()=>Be.forEach(se=>ke(se.key));$.signal.addEventListener("abort",bt);let{loaderResults:St,fetcherResults:Z}=await Nr(ot,Be,ze,be,P);if($.signal.aborted)return;if($.signal.removeEventListener("abort",bt),x.delete(f),X.delete(f),Be.forEach(se=>X.delete(se.key)),v.fetchers.has(f)){let se=Fe(ae.data);v.fetchers.set(f,se)}let me=Ct(St);if(me)return He(ze,me.result,!1,{preventScrollReset:F});if(me=Ct(Z),me)return A.add(me.key),He(ze,me.result,!1,{preventScrollReset:F});let{loaderData:Xe,errors:We}=ya(v,Ie,St,void 0,Be,Z);Hr(Me),v.navigation.state==="loading"&&Me>m?(W(B,"Expected pending action"),Y&&Y.abort(),Ke(v.navigation.location,{matches:Ie,loaderData:Xe,errors:We,fetchers:new Map(v.fetchers)})):(he({errors:We,loaderData:va(v.loaderData,Xe,Ie,We),fetchers:new Map(v.fetchers)}),ue=!1)}async function zn(f,p,w,L,P,j,I,F,U){let O=v.fetchers.get(f);De(f,lt(U,O?O.data:void 0),{flushSync:I});let H=new AbortController,$=Qe(e.history,w,H.signal);if(j){let ae=await Rt(L,new URL($.url).pathname,$.signal,f);if(ae.type==="aborted")return;if(ae.type==="error"){Oe(f,p,ae.error,{flushSync:I});return}else if(ae.matches)L=ae.matches;else{Oe(f,p,xe(404,{pathname:w}),{flushSync:I});return}}let re=Dt(L,w);X.set(f,H);let ee=ye,oe=et(o,i,$,w,L,re,a,P),ge=(await at($,w,oe,P,f))[re.route.id];if(X.get(f)===H&&X.delete(f),!$.signal.aborted){if(G.has(f)){De(f,Fe(void 0));return}if(Ye(ge))if(m>ee){De(f,Fe(void 0));return}else{A.add(f),await He($,ge,!1,{preventScrollReset:F});return}if(Se(ge)){Oe(f,p,ge.error);return}De(f,Fe(ge.data))}}async function He(f,p,w,{submission:L,fetcherSubmission:P,preventScrollReset:j,replace:I}={}){w||(K?.resolve(),K=null),p.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let F=p.response.headers.get("Location");W(F,"Expected a Location header on the redirect Response"),F=ma(F,new URL(f.url),u,e.history);let U=ft(v.location,F,{_isRedirect:!0});if(r){let oe=!1;if(p.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(wr(F)){const de=Da(F,!0);oe=de.origin!==t.location.origin||Ee(de.pathname,u)==null}if(oe){I?t.location.replace(F):t.location.assign(F);return}}Y=null;let O=I===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:H,formAction:$,formEncType:re}=v.navigation;!L&&!P&&H&&$&&re&&(L=wa(v.navigation));let ee=L||P;if(Bo.has(p.response.status)&&ee&&pe(ee.formMethod))await Ue(O,U,{submission:{...ee,formAction:F},preventScrollReset:j||ne,enableViewTransition:w?le:void 0});else{let oe=tr(U,L);await Ue(O,U,{overrideNavigation:oe,fetcherSubmission:P,preventScrollReset:j||ne,enableViewTransition:w?le:void 0})}}async function at(f,p,w,L,P){let j,I={};try{j=await qo(h,f,p,w,P,L,!1)}catch(F){return w.filter(U=>U.shouldLoad).forEach(U=>{I[U.route.id]={type:"error",error:F}}),I}if(f.signal.aborted)return I;if(!pe(f.method))for(let F of w){if(j[F.route.id]?.type==="error")break;!j.hasOwnProperty(F.route.id)&&!v.loaderData.hasOwnProperty(F.route.id)&&(!v.errors||!v.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(j[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,U]of Object.entries(j))if(li(U)){let O=U.result;I[F]={type:"redirect",response:ti(O,f,F,w,u)}}else I[F]=await ei(U);return I}async function Nr(f,p,w,L,P){let j=at(w,L,f,P,null),I=Promise.all(p.map(async O=>{if(O.matches&&O.match&&O.request&&O.controller){let $=(await at(O.request,O.path,O.matches,P,O.key))[O.match.route.id];return{[O.key]:$}}else return Promise.resolve({[O.key]:{type:"error",error:xe(404,{pathname:O.path})}})})),F=await j,U=(await I).reduce((O,H)=>Object.assign(O,H),{});return{loaderResults:F,fetcherResults:U}}function Vt(){ue=!0,N.forEach((f,p)=>{X.has(p)&&fe.add(p),ke(p)})}function De(f,p,w={}){v.fetchers.set(f,p),he({fetchers:new Map(v.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function Oe(f,p,w,L={}){let P=Ne(v.matches,p);Jt(f),he({errors:{[P.route.id]:w},fetchers:new Map(v.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function $r(f){return J.set(f,(J.get(f)||0)+1),G.has(f)&&G.delete(f),v.fetchers.get(f)||Ba}function Bn(f,p){ke(f,p?.reason),De(f,Fe(null))}function Jt(f){let p=v.fetchers.get(f);X.has(f)&&!(p&&p.state==="loading"&&x.has(f))&&ke(f),N.delete(f),x.delete(f),A.delete(f),G.delete(f),fe.delete(f),v.fetchers.delete(f)}function Wn(f){let p=(J.get(f)||0)-1;p<=0?(J.delete(f),G.add(f)):J.set(f,p),he({fetchers:new Map(v.fetchers)})}function ke(f,p){let w=X.get(f);w&&(w.abort(p),X.delete(f))}function jr(f){for(let p of f){let w=$r(p),L=Fe(w.data);v.fetchers.set(p,L)}}function Ur(){let f=[],p=!1;for(let w of A){let L=v.fetchers.get(w);W(L,`Expected fetcher: ${w}`),L.state==="loading"&&(A.delete(w),f.push(w),p=!0)}return jr(f),p}function Hr(f){let p=[];for(let[w,L]of x)if(L<f){let P=v.fetchers.get(w);W(P,`Expected fetcher: ${w}`),P.state==="loading"&&(ke(w),x.delete(w),p.push(w))}return jr(p),p.length>0}function Yn(f,p){let w=v.blockers.get(f)||qe;return Q.get(f)!==p&&Q.set(f,p),w}function zr(f){v.blockers.delete(f),Q.delete(f)}function wt(f,p){let w=v.blockers.get(f)||qe;W(w.state==="unblocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="proceeding"||w.state==="blocked"&&p.state==="unblocked"||w.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${p.state}`);let L=new Map(v.blockers);L.set(f,p),he({blockers:L})}function Br({currentLocation:f,nextLocation:p,historyAction:w}){if(Q.size===0)return;Q.size>1&&ie(!1,"A router only supports one blocker at a time");let L=Array.from(Q.entries()),[P,j]=L[L.length-1],I=v.blockers.get(P);if(!(I&&I.state==="proceeding")&&j({currentLocation:f,nextLocation:p,historyAction:w}))return P}function Gt(f){let p=xe(404,{pathname:f}),w=s||l,{matches:L,route:P}=Lt(w);return{notFoundMatches:L,route:P,error:p}}function Vn(f,p,w){if(R=f,g=p,b=w||null,!C&&v.navigation===er){C=!0;let L=Yr(v.location,v.matches);L!=null&&he({restoreScrollPosition:L})}return()=>{R=null,g=null,b=null}}function Wr(f,p){return b&&b(f,p.map(L=>Oa(L,v.loaderData)))||f.key}function Jn(f,p){if(R&&g){let w=Wr(f,p);R[w]=g()}}function Yr(f,p){if(R){let w=Wr(f,p),L=R[w];if(typeof L=="number")return L}return null}function Et(f,p,w){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:ct(p,w,u,!0)}}else return{active:!0,matches:ct(p,w,u,!0)||[]};return{active:!1,matches:null}}async function Rt(f,p,w,L){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let P=f;for(;;){let j=s==null,I=s||l,F=i;try{await e.patchRoutesOnNavigation({signal:w,path:p,matches:P,fetcherKey:L,patch:(H,$)=>{w.aborted||ua(H,$,I,F,o,!1)}})}catch(H){return{type:"error",error:H,partialMatches:P}}finally{j&&!w.aborted&&(l=[...l])}if(w.aborted)return{type:"aborted"};let U=Ae(I,p,u),O=null;if(U){if(Object.keys(U[0].params).length===0)return{type:"success",matches:U};if(O=ct(I,p,u,!0),!(O&&P.length<O.length&&Vr(P,O.slice(0,P.length))))return{type:"success",matches:U}}if(O||(O=ct(I,p,u,!0)),!O||Vr(P,O))return{type:"success",matches:null};P=O}}function Vr(f,p){return f.length===p.length&&f.every((w,L)=>w.route.id===p[L].route.id)}function Gn(f){i={},s=ht(f,o,void 0,i)}function Kn(f,p,w=!1){let L=s==null;ua(f,p,s||l,i,o,w),L&&(l=[...l],he({}))}return k={get basename(){return u},get future(){return c},get state(){return v},get routes(){return l},get window(){return t},initialize:Yt,subscribe:An,enableScrollRestoration:Vn,navigate:Ar,fetch:Un,revalidate:In,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:$r,resetFetcher:Bn,deleteFetcher:Wn,dispose:Fn,getBlocker:Yn,deleteBlocker:zr,patchRoutes:Kn,_internalFetchControllers:X,_internalSetRoutes:Gn,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){he(f)}},e.unstable_instrumentations&&(k=Ao(k,e.unstable_instrumentations.map(f=>f.router).filter(Boolean))),k}function Yo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lr(e,t,r,a,n,o){let i,l;if(n){i=[];for(let u of t)if(i.push(u),u.route.id===n){l=u;break}}else i=t,l=t[t.length-1];let s=$t(a||".",Er(i),Ee(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&l){let u=br(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(s.search),c=h.getAll("index");h.delete("index"),c.filter(E=>E).forEach(E=>h.append("index",E));let y=h.toString();s.search=y?`?${y}`:""}}return r!=="/"&&(s.pathname=Co({basename:r,pathname:s.pathname})),Te(s)}function la(e,t,r){if(!r||!Yo(r))return{path:t};if(r.formMethod&&!ci(r.formMethod))return{path:t,error:xe(405,{method:r.formMethod})};let a=()=>({path:t,error:xe(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=Za(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pe(o))return a();let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[E,R])=>`${y}${E}=${R}
|
|
2
|
+
`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!pe(o))return a();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return a()}}}W(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=ur(r.formData),s=r.formData;else if(r.body instanceof FormData)l=ur(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=pa(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=pa(l)}catch{return a()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(pe(u.formMethod))return{path:t,submission:u};let h=_e(t);return e&&h.search&&br(h.search)&&l.append("index",""),h.search=`?${l}`,{path:Te(h),submission:u}}function sa(e,t,r,a,n,o,i,l,s,u,h,c,y,E,R,b,g,C,S,T,_){let M=T?Se(T[1])?T[1].error:T[1].data:void 0,D=n.createURL(o.location),k=n.createURL(s),v;if(h&&o.errors){let V=Object.keys(o.errors)[0];v=i.findIndex(q=>q.route.id===V)}else if(T&&Se(T[1])){let V=T[0];v=i.findIndex(q=>q.route.id===V)-1}let B=T?T[1].statusCode:void 0,K=B&&B>=400,ne={currentUrl:D,currentParams:o.matches[0]?.params||{},nextUrl:k,nextParams:i[0].params,...l,actionResult:M,actionStatus:B},Y=pt(i),le=i.map((V,q)=>{let{route:ue}=V,fe=null;if(v!=null&&q>v)fe=!1;else if(ue.lazy)fe=!0;else if(!Rr(ue))fe=!1;else if(h){let{shouldLoad:x}=Va(ue,o.loaderData,o.errors);fe=x}else Vo(o.loaderData,o.matches[q],V)&&(fe=!0);if(fe!==null)return sr(r,a,e,s,Y,V,u,t,fe);let X=!1;typeof _=="boolean"?X=_:K?X=!1:(c||D.pathname+D.search===k.pathname+k.search||D.search!==k.search||Jo(o.matches[q],V))&&(X=!0);let ye={...ne,defaultShouldRevalidate:X},m=dt(V,ye);return sr(r,a,e,s,Y,V,u,t,m,ye,_)}),te=[];return R.forEach((V,q)=>{if(h||!i.some(N=>N.route.id===V.routeId)||E.has(q))return;let ue=o.fetchers.get(q),fe=ue&&ue.state!=="idle"&&ue.data===void 0,X=Ae(g,V.path,C);if(!X){if(S&&fe)return;te.push({key:q,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(b.has(q))return;let ye=Dt(X,V.path),m=new AbortController,x=Qe(n,V.path,m.signal),A=null;if(y.has(q))y.delete(q),A=et(r,a,x,V.path,X,ye,u,t);else if(fe)c&&(A=et(r,a,x,V.path,X,ye,u,t));else{let N;typeof _=="boolean"?N=_:K?N=!1:N=c;let J={...ne,defaultShouldRevalidate:N};dt(ye,J)&&(A=et(r,a,x,V.path,X,ye,u,t,J))}A&&te.push({key:q,routeId:V.routeId,path:V.path,matches:A,match:ye,request:x,controller:m})}),{dsMatches:le,revalidatingFetchers:te}}function Rr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Va(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Rr(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;if(!a&&n)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!n;return{shouldLoad:o,renderFallback:o}}function Vo(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function Jo(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function dt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ua(e,t,r,a,n,o){let i;if(e){let u=a[e];W(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let l=[],s=[];if(t.forEach(u=>{let h=i.find(c=>Ja(u,c));h?s.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=ht(l,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:h,newRoute:c}=s[u],y=h,[E]=ht([c],n,[],{},!0);Object.assign(y,{element:E.element?E.element:y.element,errorElement:E.errorElement?E.errorElement:y.errorElement,hydrateFallbackElement:E.hydrateFallbackElement?E.hydrateFallbackElement:y.hydrateFallbackElement})}}function Ja(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((r,a)=>t.children?.some(n=>Ja(r,n)))??!1:!1}var ca=new WeakMap,Ga=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(W(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=ca.get(n);i||(i={},ca.set(n,i));let l=i[e];if(l)return l;let s=(async()=>{let u=co(e),c=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)ie(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)ie(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(n,{[e]:y}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(y=>y===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},da=new WeakMap;function Go(e,t,r,a,n){let o=r[e.id];if(W(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=da.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let c=(async()=>{W(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),E={};for(let R in y){let b=y[R];if(b===void 0)continue;let g=ho(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";g?ie(!g,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?ie(!S,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):E[R]=b}Object.assign(o,E),Object.assign(o,{...a(o),lazy:void 0})})();return da.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],s;for(let h of i){if(n&&n.includes(h))continue;let c=Ga({key:h,route:e,manifest:r,mapRouteProperties:a});c&&(l.push(c),h===t&&(s=c))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function fa(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function Ko(e){return e.matches.some(t=>t.route.middleware)?Ka(e,()=>fa(e)):fa(e)}function Ka(e,t){return Xo(e,t,a=>{if(ui(a))throw a;return a},oi,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===n),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=Ne(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function Xo(e,t,r,a,n){let{matches:o,...i}=e,l=o.flatMap(u=>u.route.middleware?u.route.middleware.map(h=>[u.route.id,h]):[]);return await Xa(i,l,t,r,a,n)}async function Xa(e,t,r,a,n,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,h]=s,c,y=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await Xa(e,t,r,a,n,o,i+1)},c.value}catch(E){return c={value:await o(E,u,c)},c.value}};try{let E=await h(e,y),R=E!=null?a(E):void 0;return n(R)?R:c?R??c.value:(c={value:await y()},c.value)}catch(E){return await o(E,u,c)}}function qa(e,t,r,a,n){let o=Ga({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=Go(a.route,pe(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function sr(e,t,r,a,n,o,i,l,s,u=null,h){let c=!1,y=qa(e,t,r,o,i);return{...o,_lazyPromises:y,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(E){return c=!0,u?typeof h=="boolean"?dt(o,{...u,defaultShouldRevalidate:h}):typeof E=="boolean"?dt(o,{...u,defaultShouldRevalidate:E}):dt(o,u):s},resolve(E){let{lazy:R,loader:b,middleware:g}=o.route,C=c||s||E&&!pe(r.method)&&(R||b),S=g&&g.length>0&&!b&&!R;return C&&(pe(r.method)||!S)?Qo({request:r,path:a,unstable_pattern:n,match:o,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:E,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function et(e,t,r,a,n,o,i,l,s=null){return n.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:qa(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:sr(e,t,r,a,pt(n),u,i,l,!0,s))}async function qo(e,t,r,a,n,o,i){a.some(h=>h._lazyPromises?.middleware)&&await Promise.all(a.map(h=>h._lazyPromises?.middleware));let l={request:t,unstable_url:Qa(t,r),unstable_pattern:pt(a),params:a[0].params,context:o,matches:a},u=await e({...l,fetcherKey:n,runClientMiddleware:h=>{let c=l;return Ka(c,()=>h({...c,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return u}async function Qo({request:e,path:t,unstable_pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,h=pe(e.method),c=h?"action":"loader",y=E=>{let R,b=new Promise((S,T)=>R=T);u=()=>R(),e.signal.addEventListener("abort",u);let g=S=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${a.route.id}]`)):E({request:e,unstable_url:Qa(e,t),unstable_pattern:r,params:a.params,context:l},...S!==void 0?[S]:[]),C=(async()=>{try{return{type:"data",result:await(i?i(T=>g(T)):g())}}catch(S){return{type:"error",result:S}}})();return Promise.race([C,b])};try{let E=h?a.route.action:a.route.loader;if(n||o)if(E){let R,[b]=await Promise.all([y(E).catch(g=>{R=g}),n,o]);if(R!==void 0)throw R;s=b}else{await n;let R=h?a.route.action:a.route.loader;if(R)[s]=await Promise.all([y(R),o]);else if(c==="action"){let b=new URL(e.url),g=b.pathname+b.search;throw xe(405,{method:e.method,pathname:g,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(E)s=await y(E);else{let R=new URL(e.url),b=R.pathname+R.search;throw xe(404,{pathname:b})}}catch(E){return{type:"error",result:E}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function Zo(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 ei(e){let{result:t,type:r}=e;if(jt(t)){let a;try{a=await Zo(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new je(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?cr(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:ni(t),statusCode:Ve(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ve(t)?t.status:void 0}:cr(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 ti(e,t,r,a,n){let o=e.headers.get("Location");if(W(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!wr(o)){let i=a.slice(0,a.findIndex(l=>l.route.id===r)+1);o=lr(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}var ha=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ma(e,t,r,a){if(wr(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(ha.includes(o.protocol))throw new Error("Invalid redirect location");let i=Ee(o.pathname,r)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}try{let n=a.createURL(e);if(ha.includes(n.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Qe(e,t,r,a){let n=e.createURL(Za(t)).toString(),o={signal:r};if(a&&pe(a.formMethod)){let{formMethod:i,formEncType:l}=a;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(a.json)):l==="text/plain"?o.body=a.text:l==="application/x-www-form-urlencoded"&&a.formData?o.body=ur(a.formData):o.body=a.formData}return new Request(n,o)}function Qa(e,t){let r=new URL(e.url),a=typeof t=="string"?_e(t):t;if(r.pathname=a.pathname||"/",a.search){let n=new URLSearchParams(a.search),o=n.getAll("index");n.delete("index");for(let i of o.filter(Boolean))n.append("index",i);r.search=n.size?`?${n.toString()}`:""}else r.search="";return r.hash=a.hash||"",r}function ur(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function pa(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function ri(e,t,r,a=!1,n=!1){let o={},i=null,l,s=!1,u={},h=r&&Se(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let y=c.route.id,E=t[y];if(W(!Ye(E),"Cannot handle redirect results in processLoaderData"),Se(E)){let R=E.error;if(h!==void 0&&(R=h,h=void 0),i=i||{},n)i[y]=R;else{let b=Ne(e,y);i[b.route.id]==null&&(i[b.route.id]=R)}a||(o[y]=Ya),s||(s=!0,l=Ve(E.error)?E.error.status:500),E.headers&&(u[y]=E.headers)}else o[y]=E.data,E.statusCode&&E.statusCode!==200&&!s&&(l=E.statusCode),E.headers&&(u[y]=E.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function ya(e,t,r,a,n,o){let{loaderData:i,errors:l}=ri(t,r,a);return n.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:h,controller:c}=s;if(c&&c.signal.aborted)return;let y=o[u];if(W(y,"Did not find corresponding fetcher result"),Se(y)){let E=Ne(e.matches,h?.route.id);l&&l[E.route.id]||(l={...l,[E.route.id]:y.error}),e.fetchers.delete(u)}else if(Ye(y))W(!1,"Unhandled fetcher revalidation redirect");else{let E=Fe(y.data);e.fetchers.set(u,E)}}),{loaderData:i,errors:l}}function va(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Ya).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function ga(e){return e?Se(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ne(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Lt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xe(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?l=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?l=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(l=`Invalid request method "${a.toUpperCase()}"`)),new je(e||500,i,new Error(l),!0)}function Ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(Ye(n))return{key:a,result:n}}}function Za(e){let t=typeof e=="string"?_e(e):e;return Te({...t,hash:""})}function ai(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ni(e){return new je(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function oi(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ii(r))}function ii(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function li(e){return jt(e.result)&&za.has(e.result.status)}function Se(e){return e.type==="error"}function Ye(e){return(e&&e.type)==="redirect"}function cr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function si(e){return za.has(e)}function ui(e){return jt(e)&&si(e.status)&&e.headers.has("Location")}function ci(e){return zo.has(e.toUpperCase())}function pe(e){return Uo.has(e.toUpperCase())}function br(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Dt(e,t){let r=typeof t=="string"?_e(t).search:t.search;if(e[e.length-1].route.index&&br(r||""))return e[e.length-1];let a=Na(e);return a[a.length-1]}function wa(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function tr(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 di(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 lt(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 fi(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 Fe(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 hi(e,t){try{let r=e.sessionStorage.getItem(Wa);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function mi(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Wa,JSON.stringify(r))}catch(a){ie(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Ea(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Je=d.createContext(null);Je.displayName="DataRouter";var tt=d.createContext(null);tt.displayName="DataRouterState";var en=d.createContext(!1);function tn(){return d.useContext(en)}var Sr=d.createContext({isTransitioning:!1});Sr.displayName="ViewTransition";var xr=d.createContext(new Map);xr.displayName="Fetchers";var pi=d.createContext(null);pi.displayName="Await";var Re=d.createContext(null);Re.displayName="Navigation";var Ut=d.createContext(null);Ut.displayName="Location";var Le=d.createContext({outlet:null,matches:[],isDataRoute:!1});Le.displayName="Route";var Lr=d.createContext(null);Lr.displayName="RouteError";var rn="REACT_ROUTER_ERROR",yi="REDIRECT",vi="ROUTE_ERROR_RESPONSE";function gi(e){if(e.startsWith(`${rn}:${yi}:{`))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 wi(e){if(e.startsWith(`${rn}:${vi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new je(t.status,t.statusText,t.data)}catch{}}function Ei(e,{relative:t}={}){W(yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=d.useContext(Re),{hash:n,pathname:o,search:i}=vt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Pe([r,o])),a.createHref({pathname:l,search:i,hash:n})}function yt(){return d.useContext(Ut)!=null}function Ce(){return W(yt(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(Ut).location}var an="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nn(e){d.useContext(Re).static||d.useLayoutEffect(e)}function on(){let{isDataRoute:e}=d.useContext(Le);return e?Fi():Ri()}function Ri(){W(yt(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Je),{basename:t,navigator:r}=d.useContext(Re),{matches:a}=d.useContext(Le),{pathname:n}=Ce(),o=JSON.stringify(Er(a)),i=d.useRef(!1);return nn(()=>{i.current=!0}),d.useCallback((s,u={})=>{if(ie(i.current,an),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=$t(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Pe([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,n,e])}var bi=d.createContext(null);function Si(e){let t=d.useContext(Le).outlet;return d.useMemo(()=>t&&d.createElement(bi.Provider,{value:e},t),[t,e])}function ln(){let{matches:e}=d.useContext(Le),t=e[e.length-1];return t?t.params:{}}function vt(e,{relative:t}={}){let{matches:r}=d.useContext(Le),{pathname:a}=Ce(),n=JSON.stringify(Er(r));return d.useMemo(()=>$t(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function xi(e,t,r){W(yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Re),{matches:n}=d.useContext(Le),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let g=u&&u.path||"";fn(l,!u||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${g}">) 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.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let h=Ce(),c;c=h;let y=c.pathname||"/",E=y;if(s!=="/"){let g=s.replace(/^\//,"").split("/");E="/"+y.replace(/^\//,"").split("/").slice(g.length).join("/")}let R=Ae(e,{pathname:E});return ie(u||R!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),ie(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.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.`),Mi(R&&R.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:Pe([s,a.encodeLocation?a.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Pe([s,a.encodeLocation?a.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),n,r)}function Li(){let e=Tr(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:o},"ErrorBoundary")," or"," ",d.createElement("code",{style:o},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:n},r):null,i)}var Ci=d.createElement(Li,null),sn=class extends d.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 r=wi(e.digest);r&&(e=r)}let t=e!==void 0?d.createElement(Le.Provider,{value:this.props.routeContext},d.createElement(Lr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(Pi,{error:e},t):t}};sn.contextType=en;var rr=new WeakMap;function Pi({children:e,error:t}){let{basename:r}=d.useContext(Re);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=gi(t.digest);if(a){let n=rr.get(t);if(n)throw n;let o=ja(a.location,r);if($a&&!rr.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw rr.set(t,i),i}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Ti({routeContext:e,match:t,children:r}){let a=d.useContext(Je);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Le.Provider,{value:e},r)}function Mi(e,t=[],r){let a=r?.state;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 n=e,o=a?.errors;if(o!=null){let h=n.findIndex(c=>c.route.id&&o?.[c.route.id]!==void 0);W(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,h+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let h=0;h<n.length;h++){let c=n[h];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=h),c.route.id){let{loaderData:y,errors:E}=a,R=c.route.loader&&!y.hasOwnProperty(c.route.id)&&(!E||E[c.route.id]===void 0);if(c.route.lazy||R){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(h,c)=>{s(h,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:pt(a.matches),errorInfo:c})}:void 0;return n.reduceRight((h,c,y)=>{let E,R=!1,b=null,g=null;a&&(E=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||Ci,i&&(l<0&&y===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,g=null):l===y&&(R=!0,g=c.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,y+1)),S=()=>{let T;return E?T=b:R?T=g:c.route.Component?T=d.createElement(c.route.Component,null):c.route.element?T=c.route.element:T=h,d.createElement(Ti,{match:c,routeContext:{outlet:h,matches:C,isDataRoute:a!=null},children:T})};return a&&(c.route.ErrorBoundary||c.route.errorElement||y===0)?d.createElement(sn,{location:a.location,revalidation:a.revalidation,component:b,error:E,children:S(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):S()},null)}function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function un(e){let t=d.useContext(Je);return W(t,Cr(e)),t}function Ge(e){let t=d.useContext(tt);return W(t,Cr(e)),t}function _i(e){let t=d.useContext(Le);return W(t,Cr(e)),t}function gt(e){let t=_i(e),r=t.matches[t.matches.length-1];return W(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Di(){return gt("useRouteId")}function Oi(){return Ge("useNavigation").navigation}function Pr(){let{matches:e,loaderData:t}=Ge("useMatches");return d.useMemo(()=>e.map(r=>Oa(r,t)),[e,t])}function cn(){let e=Ge("useLoaderData"),t=gt("useLoaderData");return e.loaderData[t]}function gs(e){return Ge("useRouteLoaderData").loaderData[e]}function dn(){let e=Ge("useActionData"),t=gt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Tr(){let e=d.useContext(Lr),t=Ge("useRouteError"),r=gt("useRouteError");return e!==void 0?e:t.errors?.[r]}var ki=0;function ws(e){let{router:t,basename:r}=un("useBlocker"),a=Ge("useBlocker"),[n,o]=d.useState(""),i=d.useCallback(l=>{if(typeof e!="function")return!!e;if(r==="/")return e(l);let{currentLocation:s,nextLocation:u,historyAction:h}=l;return e({currentLocation:{...s,pathname:Ee(s.pathname,r)||s.pathname},nextLocation:{...u,pathname:Ee(u.pathname,r)||u.pathname},historyAction:h})},[r,e]);return d.useEffect(()=>{let l=String(++ki);return o(l),()=>t.deleteBlocker(l)},[t]),d.useEffect(()=>{n!==""&&t.getBlocker(n,i)},[t,n,i]),n&&a.blockers.has(n)?a.blockers.get(n):qe}function Fi(){let{router:e}=un("useNavigate"),t=gt("useNavigate"),r=d.useRef(!1);return nn(()=>{r.current=!0}),d.useCallback(async(n,o={})=>{ie(r.current,an),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Ra={};function fn(e,t,r){!t&&!Ra[e]&&(Ra[e]=!0,ie(!1,r))}var ba={};function dr(e,t){!e&&!ba[t]&&(ba[t]=!0,console.warn(t))}var Ai="useOptimistic",Sa=no[Ai],Ii=()=>{};function Ni(e){return Sa?Sa(e):[e,Ii]}function Es(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ie(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ie(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ie(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Rs=["HydrateFallback","hydrateFallbackElement"],$i=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function bs({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=tn()||a;let[o,i]=d.useState(e.state),[l,s]=Ni(o),[u,h]=d.useState(),[c,y]=d.useState({isTransitioning:!1}),[E,R]=d.useState(),[b,g]=d.useState(),[C,S]=d.useState(),T=d.useRef(new Map),_=d.useCallback((v,{deletedFetchers:B,newErrors:K,flushSync:ne,viewTransitionOpts:Y})=>{K&&r&&Object.values(K).forEach(te=>r(te,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:pt(v.matches)})),v.fetchers.forEach((te,V)=>{te.data!==void 0&&T.current.set(V,te.data)}),B.forEach(te=>T.current.delete(te)),dr(ne===!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 le=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(dr(Y==null||le,"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."),!Y||!le){t&&ne?t(()=>i(v)):a===!1?i(v):d.startTransition(()=>{a===!0&&s(te=>xa(te,v)),i(v)});return}if(t&&ne){t(()=>{b&&(E?.resolve(),b.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let te=e.window.document.startViewTransition(()=>{t(()=>i(v))});te.finished.finally(()=>{t(()=>{R(void 0),g(void 0),h(void 0),y({isTransitioning:!1})})}),t(()=>g(te));return}b?(E?.resolve(),b.skipTransition(),S({state:v,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(h(v),y({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[e.window,t,b,E,a,s,r]);d.useLayoutEffect(()=>e.subscribe(_),[e,_]),d.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new $i)},[c]),d.useEffect(()=>{if(E&&u&&e.window){let v=u,B=E.promise,K=e.window.document.startViewTransition(async()=>{a===!1?i(v):d.startTransition(()=>{a===!0&&s(ne=>xa(ne,v)),i(v)}),await B});K.finished.finally(()=>{R(void 0),g(void 0),h(void 0),y({isTransitioning:!1})}),g(K)}},[u,E,e.window,a,s]),d.useEffect(()=>{E&&u&&l.location.key===u.location.key&&E.resolve()},[E,b,l.location,u]),d.useEffect(()=>{!c.isTransitioning&&C&&(h(C.state),y({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[c.isTransitioning,C]);let M=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,B,K)=>e.navigate(v,{state:B,preventScrollReset:K?.preventScrollReset}),replace:(v,B,K)=>e.navigate(v,{replace:!0,state:B,preventScrollReset:K?.preventScrollReset})}),[e]),D=e.basename||"/",k=d.useMemo(()=>({router:e,navigator:M,static:!1,basename:D,onError:r}),[e,M,D,r]);return d.createElement(d.Fragment,null,d.createElement(Je.Provider,{value:k},d.createElement(tt.Provider,{value:l},d.createElement(xr.Provider,{value:T.current},d.createElement(Sr.Provider,{value:c},d.createElement(Hi,{basename:D,location:l.location,navigationType:l.historyAction,navigator:M,unstable_useTransitions:a},d.createElement(ji,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function xa(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 ji=d.memo(Ui);function Ui({routes:e,future:t,state:r,isStatic:a,onError:n}){return xi(e,void 0,{state:r,isStatic:a,onError:n})}function Ss(e){return Si(e.context)}function Hi({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,unstable_useTransitions:i}){W(!yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=d.useMemo(()=>({basename:l,navigator:n,static:o,unstable_useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=_e(r));let{pathname:u="/",search:h="",hash:c="",state:y=null,key:E="default",unstable_mask:R}=r,b=d.useMemo(()=>{let g=Ee(u,l);return g==null?null:{location:{pathname:g,search:h,hash:c,state:y,key:E,unstable_mask:R},navigationType:a}},[l,u,h,c,y,E,a,R]);return ie(b!=null,`<Router basename="${l}"> is not able to match the URL "${u}${h}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:d.createElement(Re.Provider,{value:s},d.createElement(Ut.Provider,{children:t,value:b}))}function zi(){return{params:ln(),loaderData:cn(),actionData:dn(),matches:Pr()}}function xs(e){return function(){const r=zi();return d.createElement(e,r)}}function Bi(){return{params:ln(),loaderData:cn(),actionData:dn(),error:Tr()}}function Ls(e){return function(){const r=Bi();return d.createElement(e,r)}}var Ot="get",kt="application/x-www-form-urlencoded";function Ht(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Wi(e){return Ht(e)&&e.tagName.toLowerCase()==="button"}function Yi(e){return Ht(e)&&e.tagName.toLowerCase()==="form"}function Vi(e){return Ht(e)&&e.tagName.toLowerCase()==="input"}function Ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gi(e,t){return e.button===0&&(!t||t==="_self")&&!Ji(e)}function fr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Ki(e,t){let r=fr(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Pt=null;function Xi(){if(Pt===null)try{new FormData(document.createElement("form"),0),Pt=!1}catch{Pt=!0}return Pt}var qi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ar(e){return e!=null&&!qi.has(e)?(ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kt}"`),null):e}function Qi(e,t){let r,a,n,o,i;if(Yi(e)){let l=e.getAttribute("action");a=l?Ee(l,t):null,r=e.getAttribute("method")||Ot,n=ar(e.getAttribute("enctype"))||kt,o=new FormData(e)}else if(Wi(e)||Vi(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?Ee(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Ot,n=ar(e.getAttribute("formenctype"))||ar(l.getAttribute("enctype"))||kt,o=new FormData(l,e),!Xi()){let{name:u,type:h,value:c}=e;if(h==="image"){let y=u?`${u}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else u&&o.append(u,c)}}else{if(Ht(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ot,a=null,n=kt,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var Zi=-1,el=-2,tl=-3,rl=-4,al=-5,nl=-6,ol=-7,il="B",ll="D",hn="E",sl="M",ul="N",mn="P",cl="R",dl="S",fl="Y",hl="U",ml="Z",pn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function pl(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),o=(t+n).split(`
|
|
5
|
+
`);t=o.pop()||"";for(const i of o)a.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var nr=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function hr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return La.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const a=r.length;for(const n of e)r.push(n);return t.length=r.length,La.call(this,a)}function La(e){const{hydrated:t,values:r,deferred:a,plugins:n}=this;let o;const i=[[e,s=>{o=s}]];let l=[];for(;i.length>0;){const[s,u]=i.pop();switch(s){case ol:u(void 0);continue;case al:u(null);continue;case el:u(NaN);continue;case nl:u(1/0);continue;case tl:u(-1/0);continue;case rl:u(-0);continue}if(t[s]){u(t[s]);continue}const h=r[s];if(!h||typeof h!="object"){t[s]=h,u(h);continue}if(Array.isArray(h))if(typeof h[0]=="string"){const[c,y,E]=h;switch(c){case ll:u(t[s]=new Date(y));continue;case hl:u(t[s]=new URL(y));continue;case il:u(t[s]=BigInt(y));continue;case cl:u(t[s]=new RegExp(y,E));continue;case fl:u(t[s]=Symbol.for(y));continue;case dl:const R=new Set;t[s]=R;for(let _=h.length-1;_>0;_--)i.push([h[_],M=>{R.add(M)}]);u(R);continue;case sl:const b=new Map;t[s]=b;for(let _=h.length-2;_>0;_-=2){const M=[];i.push([h[_+1],D=>{M[1]=D}]),i.push([h[_],D=>{M[0]=D}]),l.push(()=>{b.set(M[0],M[1])})}u(b);continue;case ul:const g=Object.create(null);t[s]=g;for(const _ of Object.keys(y).reverse()){const M=[];i.push([y[_],D=>{M[1]=D}]),i.push([Number(_.slice(1)),D=>{M[0]=D}]),l.push(()=>{g[M[0]]=M[1]})}u(g);continue;case mn:if(t[y])u(t[s]=t[y]);else{const _=new pn;a[y]=_,u(t[s]=_.promise)}continue;case hn:const[,C,S]=h;let T=S&&nr&&nr[S]?new nr[S](C):new Error(C);t[s]=T,u(T);continue;case ml:u(t[s]=t[y]);continue;default:if(Array.isArray(n)){const _=[],M=h.slice(1);for(let D=0;D<M.length;D++){const k=M[D];i.push([k,v=>{_[D]=v}])}l.push(()=>{for(const D of n){const k=D(h[0],..._);if(k){u(t[s]=k.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let y=0;y<h.length;y++){const E=h[y];E!==Zi&&i.push([E,R=>{c[y]=R}])}u(c);continue}else{const c={};t[s]=c;for(const y of Object.keys(h).reverse()){const E=[];i.push([h[y],R=>{E[1]=R}]),i.push([Number(y.slice(1)),R=>{E[0]=R}]),l.push(()=>{c[E[0]]=E[1]})}u(c);continue}}for(;l.length>0;)l.pop()();return o}async function yl(e,t){const{plugins:r}=t??{},a=new pn,n=e.pipeThrough(pl()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await vl.call(o,n);let l=a.promise;return i.done?a.resolve():l=gl.call(o,n).then(a.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);a.reject(s)}),{done:l.then(()=>n.closed),value:i.value}}async function vl(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:hr.call(this,r)}}async function gl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case mn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const i=r.slice(a+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,l);o.resolve(s);break}case hn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const i=r.slice(a+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function wl(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var El={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Rl=/[&><\u2028\u2029]/g;function mr(e){return e.replace(Rl,t=>El[t])}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var pr=Symbol("SingleFetchRedirect"),yn=class extends Error{},bl=202,Sl=new Set([100,101,204,205]);function Cs(e,t,r,a,n,o){let i=xl(e,l=>{let s=t.routes[l.route.id];we(s,"Route not found in manifest");let u=r[l.route.id];return{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader,hasShouldRevalidate:!!u?.shouldRevalidate}},Dl,a,n,o);return async l=>l.runClientMiddleware(i)}function xl(e,t,r,a,n,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:h}=l,c=e();if(s.method!=="GET")return Ll(l,r,n,o);let y=u.some(E=>{let{hasLoader:R,hasClientLoader:b}=t(E);return E.shouldCallHandler()&&R&&!b});return!a&&!y?Cl(l,t,r,n,o):h?Ml(l,r,n,o):Pl(l,c,t,r,a,n,o,i)}}async function Ll(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());we(n,"No action match found");let o,i=await n.resolve(async l=>await l(async()=>{let{data:u,status:h}=await t(e,r,a,[n.route.id]);return o=h,mt(u,n.route.id)}));return jt(i.result)||Ve(i.result)||cr(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:Oo(i.result,o)}}}async function Cl(e,t,r,a,n){let o=e.matches.filter(l=>l.shouldCallHandler()),i={};return await Promise.all(o.map(l=>l.resolve(async s=>{try{let{hasClientLoader:u}=t(l),h=l.route.id,c=u?await s(async()=>{let{data:y}=await r(e,a,n,[h]);return mt(y,h)}):await s();i[l.route.id]={type:"data",result:c}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function Pl(e,t,r,a,n,o,i,l=()=>!0){let s=new Set,u=!1,h=e.matches.map(()=>Ca()),c=Ca(),y={},E=Promise.all(e.matches.map(async(b,g)=>b.resolve(async C=>{h[g].resolve();let S=b.route.id,{hasLoader:T,hasClientLoader:_,hasShouldRevalidate:M}=r(b),D=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(D)){u||(u=b.shouldRevalidateArgs!=null&&T&&M===!0);return}if(l(b)&&_){T&&(u=!0);try{let v=await C(async()=>{let{data:B}=await a(e,o,i,[S]);return mt(B,S)});y[S]={type:"data",result:v}}catch(v){y[S]={type:"error",result:v}}return}T&&s.add(S);try{let v=await C(async()=>{let B=await c.promise;return mt(B,S)});y[S]={type:"data",result:v}}catch(v){y[S]={type:"error",result:v}}})));if(await Promise.all(h.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let b=n&&u&&s.size>0?[...s.keys()]:void 0;try{let g=await a(e,o,i,b);c.resolve(g.data)}catch(g){c.reject(g)}}return await E,await Tl(c.promise,e.matches,s,y),y}async function Tl(e,t,r,a){try{let n,o=await e;if("routes"in o){for(let i of t)if(i.route.id in o.routes){let l=o.routes[i.route.id];if("error"in l){n=l.error,a[i.route.id]?.result==null&&(a[i.route.id]={type:"error",result:n});break}}}n!==void 0&&Array.from(r.values()).forEach(i=>{a[i].result instanceof yn&&(a[i].result=n)})}catch{}}async function Ml(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());we(n,"No fetcher match found");let o=n.route.id,i=await n.resolve(async l=>l(async()=>{let{data:s}=await t(e,r,a,[o]);return mt(s,o)}));return{[n.route.id]:i}}function _l(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let a of t)a&&r.push(a);for(let a of r)e.searchParams.append("index",a);return e}function vn(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&Ee(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}async function Dl(e,t,r,a){let{request:n}=e,o=vn(n.url,t,r,"data");n.method==="GET"&&(o=_l(o),a&&o.searchParams.set("_routes",a.join(",")));let i=await fetch(o,await wl(n));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new je(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:bl,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(Sl.has(i.status)){let l={};return a&&n.method!=="GET"&&(l[a[0]]={data:void 0}),{status:i.status,data:{routes:l}}}we(i.body,"No response body to decode");try{let l=await Ol(i.body,window),s;if(n.method==="GET"){let u=l.value;pr in u?s={redirect:u[pr]}:s={routes:u}}else{let u=l.value,h=a?.[0];we(h,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[h]:u}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Ol(e,t){return yl(e,{plugins:[(r,...a)=>{if(r==="SanitizedError"){let[n,o,i]=a,l=Error;n&&n in t&&typeof t[n]=="function"&&(l=t[n]);let s=new l(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[n,o,i]=a;return{value:new je(o,i,n)}}if(r==="SingleFetchRedirect")return{value:{[pr]:a[0]}};if(r==="SingleFetchClassInstance")return{value:a[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function mt(e,t){if("redirect"in e){let{redirect:a,revalidate:n,reload:o,replace:i,status:l}=e.redirect;throw ko(a,{status:l,headers:{...n?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new yn(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Ca(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function gn(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function kl(e,t,r){let a=e.map(o=>{let i=t[o.route.id],l=r.routes[o.route.id];return[l&&l.css?l.css.map(s=>({rel:"stylesheet",href:s})):[],i?.links?.()||[]]}).flat(2),n=_r(e,r);return bn(a,n)}function wn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Fl(e){if(!e.css)return;let t=wn(e);await Promise.all(t.map(Rn))}async function En(e,t){if(!e.css&&!t.links||!jl())return;let r=[];if(e.css&&r.push(...wn(e)),t.links&&r.push(...t.links()),r.length===0)return;let a=[];for(let n of r)!Mr(n)&&n.rel==="stylesheet"&&a.push({...n,rel:"preload",as:"style"});await Promise.all(a.map(Rn))}async function Rn(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function a(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{a(),t()},r.onerror=()=>{a(),t()},document.head.appendChild(r)})}function Mr(e){return e!=null&&typeof e.page=="string"}function Al(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 Il(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await gn(o,r);return i.links?i.links():[]}return[]}));return bn(a.flat(1).filter(Al).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Pa(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let h=a.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let c=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof c=="boolean")return c}return!0}):[]}function _r(e,t,{includeHydrateFallback:r}={}){return Nl(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Nl(e){return[...new Set(e)]}function $l(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function bn(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Mr(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify($l(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}var Tt;function jl(){if(Tt!==void 0)return Tt;let e=document.createElement("link");return Tt=e.relList.supports("preload"),e=null,Tt}function Ul(){return d.createElement(yr,{title:"Loading...",renderScripts:!0},d.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
6
|
+
console.log(
|
|
7
|
+
"💿 Hey developer 👋. You can provide a way better UX than this " +
|
|
8
|
+
"when your app is loading JS modules and/or running \`clientLoader\` " +
|
|
9
|
+
"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
|
|
10
|
+
"for more information."
|
|
11
|
+
);
|
|
12
|
+
`}}))}function Sn(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Hl(e,t,r){let a=xn(t),n=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Ul:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>d.createElement(Pn,{error:Tr()}):void 0;return e.id==="root"&&t.Layout?{...a?{element:d.createElement(t.Layout,null,d.createElement(a,null))}:{Component:a},...o?{errorElement:d.createElement(t.Layout,null,d.createElement(o,null))}:{ErrorBoundary:o},...n?{hydrateFallbackElement:d.createElement(t.Layout,null,d.createElement(n,null))}:{HydrateFallback:n}}:{Component:a,ErrorBoundary:o,HydrateFallback:n}}function Ps(e,t,r,a,n,o){return Dr(t,r,a,n,o,"",Sn(t),e)}function Mt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let a=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(a),new je(400,"Bad Request",new Error(a),!0)}}function or(e,t){let r=e==="clientAction"?"a":"an",a=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(a),new je(405,"Method Not Allowed",new Error(a),!0)}function Dr(e,t,r,a,n,o="",i=Sn(e),l){return(i[o]||[]).map(s=>{let u=t[s.id];function h(S){return we(typeof S=="function","No single fetch function available for route handler"),S()}function c(S){return s.hasLoader?h(S):Promise.resolve(null)}function y(S){if(!s.hasAction)throw or("action",s.id);return h(S)}function E(S){import(S)}function R(S){S.clientActionModule&&E(S.clientActionModule),S.clientLoaderModule&&E(S.clientLoaderModule)}async function b(S){let T=t[s.id],_=T?En(s,T):Promise.resolve();try{return S()}finally{await _}}let g={id:s.id,index:s.index,path:s.path};if(u){Object.assign(g,{...g,...Hl(s,u,n),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Ta(g.path,u,s,a,l)});let S=r&&r.loaderData&&s.id in r.loaderData,T=S?r?.loaderData?.[s.id]:void 0,_=r&&r.errors&&s.id in r.errors,M=_?r?.errors?.[s.id]:void 0,D=l==null&&(u.clientLoader?.hydrate===!0||!s.hasLoader);g.loader=async({request:k,params:v,context:B,unstable_pattern:K,unstable_url:ne},Y)=>{try{return await b(async()=>(we(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:k,params:v,context:B,unstable_pattern:K,unstable_url:ne,async serverLoader(){if(Mt("loader",s),D){if(S)return T;if(_)throw M}return c(Y)}}):c(Y)))}finally{D=!1}},g.loader.hydrate=Wl(s.id,u.clientLoader,s.hasLoader,n),g.action=({request:k,params:v,context:B,unstable_pattern:K,unstable_url:ne},Y)=>b(async()=>{if(we(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(n)throw or("clientAction",s.id);return y(Y)}return u.clientAction({request:k,params:v,context:B,unstable_pattern:K,unstable_url:ne,async serverAction(){return Mt("action",s),y(Y)}})})}else{s.hasClientLoader||(g.loader=(_,M)=>b(()=>c(M))),s.hasClientAction||(g.action=(_,M)=>b(()=>{if(n)throw or("clientAction",s.id);return y(M)}));let S;async function T(){return S?await S:(S=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(M=>setTimeout(M,0));let _=Bl(s,t);return R(s),await _})(),await S)}g.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:_}=s.clientLoaderModule?await import(s.clientLoaderModule):await T();return we(_,"No `clientLoader` export found"),(M,D)=>_({...M,async serverLoader(){return Mt("loader",s),c(D)}})}:void 0,action:s.hasClientAction?async()=>{let _=s.clientActionModule?import(s.clientActionModule):T();R(s);let{clientAction:M}=await _;return we(M,"No `clientAction` export found"),(D,k)=>M({...D,async serverAction(){return Mt("action",s),y(k)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:_}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await T();return we(_,"No `clientMiddleware` export found"),_}:void 0,shouldRevalidate:async()=>{let _=await T();return Ta(g.path,_,s,a,l)},handle:async()=>(await T()).handle,Component:async()=>(await T()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await T()).ErrorBoundary:void 0}}let C=Dr(e,t,r,a,n,s.id,i,l);return C.length>0&&(g.children=C),g})}function Ta(e,t,r,a,n){if(n)return zl(r.id,t.shouldRevalidate,n);if(!a&&r.hasLoader&&!r.hasClientLoader){let o=e?Aa(e)[1].map(l=>l.paramName):[];const i=l=>o.some(s=>l.currentParams[s]!==l.nextParams[s]);if(t.shouldRevalidate){let l=t.shouldRevalidate;return s=>l({...s,defaultShouldRevalidate:i(s)})}else return l=>i(l)}return t.shouldRevalidate}function zl(e,t,r){let a=!1;return n=>a?t?t(n):n.defaultShouldRevalidate:(a=!0,r.has(e))}async function Bl(e,t){let r=gn(e,t),a=Fl(e),n=await r;return await Promise.all([a,En(e,n)]),{Component:xn(n),ErrorBoundary:n.ErrorBoundary,clientMiddleware:n.clientMiddleware,clientAction:n.clientAction,clientLoader:n.clientLoader,handle:n.handle,links:n.links,meta:n.meta,shouldRevalidate:n.shouldRevalidate}}function xn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Wl(e,t,r,a){return a&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Ft=new Set,Yl=1e3,It=new Set,Vl=7680;function Or(e,t){return e.mode==="lazy"&&t===!0}function Jl({sri:e,...t},r){let a=new Set(r.state.matches.map(l=>l.route.id)),n=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(n.pop();n.length>0;)o.push(`/${n.join("/")}`),n.pop();o.forEach(l=>{let s=Ae(r.routes,l,r.basename);s&&s.forEach(u=>a.add(u.route.id))});let i=[...a].reduce((l,s)=>Object.assign(l,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Ts(e,t,r,a,n,o,i){if(Or(n,a))return async({path:l,patch:s,signal:u,fetcherKey:h})=>{if(It.has(l))return;let{state:c}=e();await Ln([l],h?window.location.href:Te(c.navigation.location||c.location),t,r,a,o,i,n.manifestPath,s,u)}}function Ms(e,t,r,a,n,o){d.useEffect(()=>{if(!Or(n,a)||window.navigator?.connection?.saveData===!0)return;function i(h){let c=h.tagName==="FORM"?h.getAttribute("action"):h.getAttribute("href");if(!c)return;let y=h.tagName==="A"?h.pathname:new URL(c,window.location.origin).pathname;It.has(y)||Ft.add(y)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let h=Array.from(Ft.keys()).filter(c=>It.has(c)?(Ft.delete(c),!1):!0);if(h.length!==0)try{await Ln(h,null,t,r,a,o,e.basename,n.manifestPath,e.patchRoutes)}catch(c){console.error("Failed to fetch manifest patches",c)}}let s=Xl(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[a,o,t,r,e,n])}function Gl(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var ir="react-router-manifest-version";async function Ln(e,t,r,a,n,o,i,l,s,u){const h=new URLSearchParams;h.set("paths",e.sort().join(",")),h.set("version",r.version);let c=new URL(Gl(l,i),window.location.origin);if(c.search=h.toString(),c.toString().length>Vl){Ft.clear();return}let y;try{let g=await fetch(c,{signal:u});if(g.ok){if(g.status===204&&g.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(ir)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(ir,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(g.status>=400)throw new Error(await g.text())}else throw new Error(`${g.status} ${g.statusText}`);try{sessionStorage.removeItem(ir)}catch{}y=await g.json()}catch(g){if(u?.aborted)return;throw g}let E=new Set(Object.keys(r.routes)),R=Object.values(y).reduce((g,C)=>(C&&!E.has(C.id)&&(g[C.id]=C),g),{});Object.assign(r.routes,R),e.forEach(g=>Kl(g,It));let b=new Set;Object.values(R).forEach(g=>{g&&(!g.parentId||!R[g.parentId])&&b.add(g.parentId)}),b.forEach(g=>s(g||null,Dr(R,a,null,n,o,g)))}function Kl(e,t){if(t.size>=Yl){let r=t.values().next().value;t.delete(r)}t.add(e)}function Xl(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}function kr(){let e=d.useContext(Je);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zt(){let e=d.useContext(tt);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Bt=d.createContext(void 0);Bt.displayName="FrameworkContext";function rt(){let e=d.useContext(Bt);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function ql(e,t){let r=d.useContext(Bt),[a,n]=d.useState(!1),[o,i]=d.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:h,onTouchStart:c}=t,y=d.useRef(null);d.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=C=>{C.forEach(S=>{i(S.isIntersecting)})},g=new IntersectionObserver(b,{threshold:.5});return y.current&&g.observe(y.current),()=>{g.disconnect()}}},[e]),d.useEffect(()=>{if(a){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[a]);let E=()=>{n(!0)},R=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:st(l,E),onBlur:st(s,R),onMouseEnter:st(u,E),onMouseLeave:st(h,R),onTouchStart:st(c,E)}]:[!1,y,{}]}function st(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Fr(e,t,r){if(r&&!Nt)return[e[0]];if(t){let a=e.findIndex(n=>t[n.route.id]!==void 0);return e.slice(0,a+1)}return e}var Ma="data-react-router-critical-css";function _s({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:a,routeModules:n,criticalCss:o}=rt(),{errors:i,matches:l}=zt(),s=Fr(l,i,r),u=d.useMemo(()=>kl(s,n,a),[s,n,a]);return d.createElement(d.Fragment,null,typeof o=="string"?d.createElement("style",{[Ma]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?d.createElement("link",{[Ma]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:h,link:c})=>Mr(c)?d.createElement(Cn,{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t}):d.createElement("link",{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function Cn({page:e,...t}){let{router:r}=kr(),a=d.useMemo(()=>Ae(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?d.createElement(Zl,{page:e,matches:a,...t}):null}function Ql(e){let{manifest:t,routeModules:r}=rt(),[a,n]=d.useState([]);return d.useEffect(()=>{let o=!1;return Il(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Zl({page:e,matches:t,...r}){let a=Ce(),{future:n,manifest:o,routeModules:i}=rt(),{basename:l}=kr(),{loaderData:s,matches:u}=zt(),h=d.useMemo(()=>Pa(e,t,u,o,a,"data"),[e,t,u,o,a]),c=d.useMemo(()=>Pa(e,t,u,o,a,"assets"),[e,t,u,o,a]),y=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let b=new Set,g=!1;if(t.forEach(S=>{let T=o.routes[S.route.id];!T||!T.hasLoader||(!h.some(_=>_.route.id===S.route.id)&&S.route.id in s&&i[S.route.id]?.shouldRevalidate||T.hasClientLoader?g=!0:b.add(S.route.id))}),b.size===0)return[];let C=vn(e,l,n.unstable_trailingSlashAwareDataRequests,"data");return g&&b.size>0&&C.searchParams.set("_routes",t.filter(S=>b.has(S.route.id)).map(S=>S.route.id).join(",")),[C.pathname+C.search]},[l,n.unstable_trailingSlashAwareDataRequests,s,a,o,h,t,e,i]),E=d.useMemo(()=>_r(c,o),[c,o]),R=Ql(c);return d.createElement(d.Fragment,null,y.map(b=>d.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),E.map(b=>d.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:g})=>d.createElement("link",{key:b,nonce:r.nonce,...g,crossOrigin:g.crossOrigin??r.crossOrigin})))}function Ds(){let{isSpaMode:e,routeModules:t}=rt(),{errors:r,matches:a,loaderData:n}=zt(),o=Ce(),i=Fr(a,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,h=[];for(let c=0;c<i.length;c++){let y=i[c],E=y.route.id,R=n[E],b=y.params,g=t[E],C=[],S={id:E,data:R,loaderData:R,meta:[],params:y.params,pathname:y.pathname,handle:y.route.handle,error:l};if(h[c]=S,g?.meta?C=typeof g.meta=="function"?g.meta({data:R,loaderData:R,params:b,location:o,matches:h,error:l}):Array.isArray(g.meta)?[...g.meta]:g.meta:u&&(C=[...u]),C=C||[],!Array.isArray(C))throw new Error("The route at "+y.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
|
|
13
|
+
|
|
14
|
+
To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);S.meta=C,h[c]=S,s=[...C],u=s}return d.createElement(d.Fragment,null,s.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:y,...E}=c;if(!es(y))return console.warn(`A meta object uses an invalid tagName: ${y}. Expected either 'link' or 'meta'`),null;let R=y;return d.createElement(R,{key:JSON.stringify(E),...E})}if("title"in c)return d.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??(c.charSet=c.charset),delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?d.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let y=JSON.stringify(c["script:ld+json"]);return d.createElement("script",{key:`script:ld+json:${y}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:mr(y)}})}catch{return null}return d.createElement("meta",{key:JSON.stringify(c),...c})}))}function es(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Nt=!1;function ts(){Nt=!0}function rs(e){let{manifest:t,serverHandoffString:r,isSpaMode:a,renderMeta:n,routeDiscovery:o,ssr:i}=rt(),{router:l,static:s,staticContext:u}=kr(),{matches:h}=zt(),c=tn(),y=Or(o,i);n&&(n.didRenderScripts=!0);let E=Fr(h,null,a);d.useEffect(()=>{ts()},[]);let R=d.useMemo(()=>{if(c)return null;let S=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",T=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${y?"":`import ${JSON.stringify(t.url)}`};
|
|
15
|
+
${E.map((_,M)=>{let D=`route${M}`,k=t.routes[_.route.id];we(k,`Route ${_.route.id} not found in manifest`);let{clientActionModule:v,clientLoaderModule:B,clientMiddlewareModule:K,hydrateFallbackModule:ne,module:Y}=k,le=[...v?[{module:v,varName:`${D}_clientAction`}]:[],...B?[{module:B,varName:`${D}_clientLoader`}]:[],...K?[{module:K,varName:`${D}_clientMiddleware`}]:[],...ne?[{module:ne,varName:`${D}_HydrateFallback`}]:[],{module:Y,varName:`${D}_main`}];if(le.length===1)return`import * as ${D} from ${JSON.stringify(Y)};`;let te=le.map(q=>`import * as ${q.varName} from "${q.module}";`).join(`
|
|
16
|
+
`),V=`const ${D} = {${le.map(q=>`...${q.varName}`).join(",")}};`;return[te,V].join(`
|
|
17
|
+
`)}).join(`
|
|
18
|
+
`)}
|
|
19
|
+
${y?`window.__reactRouterManifest = ${JSON.stringify(Jl(t,l),null,2)};`:""}
|
|
20
|
+
window.__reactRouterRouteModules = {${E.map((_,M)=>`${JSON.stringify(_.route.id)}:route${M}`).join(",")}};
|
|
21
|
+
|
|
22
|
+
import(${JSON.stringify(t.entry.module)});`:" ";return d.createElement(d.Fragment,null,d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:S},type:void 0}),d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:T},type:"module",async:!0}))},[]),b=Nt||c?[]:as(t.entry.imports.concat(_r(E,t,{includeHydrateFallback:!0}))),g=typeof t.sri=="object"?t.sri:{};return dr(!c,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Nt||c?null:d.createElement(d.Fragment,null,typeof t.sri=="object"?d.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:g})}}):null,y?null:d.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:g[t.url],suppressHydrationWarning:!0}),d.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:g[t.entry.module],suppressHydrationWarning:!0}),b.map(C=>d.createElement("link",{key:C,rel:"modulepreload",href:C,crossOrigin:e.crossOrigin,integrity:g[C],suppressHydrationWarning:!0})),R)}function as(e){return[...new Set(e)]}function ns(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Os=class extends d.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?d.createElement(Pn,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Pn({error:e,isOutsideRemixApp:t}){console.error(e);let r=d.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
23
|
+
console.log(
|
|
24
|
+
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
25
|
+
);
|
|
26
|
+
`}});if(Ve(e))return d.createElement(yr,{title:"Unhandled Thrown Response!"},d.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return d.createElement(yr,{title:"Application Error!",isOutsideRemixApp:t},d.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),d.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function yr({title:e,renderScripts:t,isOutsideRemixApp:r,children:a}){let{routeModules:n}=rt();return n.root?.Layout&&!r?a:d.createElement("html",{lang:"en"},d.createElement("head",null,d.createElement("meta",{charSet:"utf-8"}),d.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),d.createElement("title",null,e)),d.createElement("body",null,d.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,t?d.createElement(rs,null):null)))}var os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{os&&(window.__reactRouterVersion="7.13.2")}catch{}var Tn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mn=d.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,unstable_mask:l,state:s,target:u,to:h,preventScrollReset:c,viewTransition:y,unstable_defaultShouldRevalidate:E,...R},b){let{basename:g,navigator:C,unstable_useTransitions:S}=d.useContext(Re),T=typeof h=="string"&&Tn.test(h),_=ja(h,g);h=_.to;let M=Ei(h,{relative:n}),D=Ce(),k=null;if(l){let V=$t(l,[],D.unstable_mask?D.unstable_mask.pathname:"/",!0);g!=="/"&&(V.pathname=V.pathname==="/"?g:Pe([g,V.pathname])),k=C.createHref(V)}let[v,B,K]=ql(a,R),ne=ss(h,{replace:i,unstable_mask:l,state:s,target:u,preventScrollReset:c,relative:n,viewTransition:y,unstable_defaultShouldRevalidate:E,unstable_useTransitions:S});function Y(V){t&&t(V),V.defaultPrevented||ne(V)}let le=!(_.isExternal||o),te=d.createElement("a",{...R,...K,href:(le?k:void 0)||_.absoluteURL||M,onClick:le?Y:t,ref:ns(b,B),target:u,"data-discover":!T&&r==="render"?"true":void 0});return v&&!T?d.createElement(d.Fragment,null,te,d.createElement(Cn,{page:M})):te});Mn.displayName="Link";var is=d.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},h){let c=vt(i,{relative:u.relative}),y=Ce(),E=d.useContext(tt),{navigator:R,basename:b}=d.useContext(Re),g=E!=null&&ms(c)&&l===!0,C=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,S=y.pathname,T=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;r||(S=S.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&b&&(T=Ee(T,b)||T);const _=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let M=S===C||!n&&S.startsWith(C)&&S.charAt(_)==="/",D=T!=null&&(T===C||!n&&T.startsWith(C)&&T.charAt(C.length)==="/"),k={isActive:M,isPending:D,isTransitioning:g},v=M?t:void 0,B;typeof a=="function"?B=a(k):B=[a,M?"active":null,D?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let K=typeof o=="function"?o(k):o;return d.createElement(Mn,{...u,"aria-current":v,className:B,ref:h,style:K,to:i,viewTransition:l},typeof s=="function"?s(k):s)});is.displayName="NavLink";var _n=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=Ot,action:l,onSubmit:s,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:y,...E},R)=>{let{unstable_useTransitions:b}=d.useContext(Re),g=kn(),C=ds(l,{relative:u}),S=i.toLowerCase()==="get"?"get":"post",T=typeof l=="string"&&Tn.test(l),_=M=>{if(s&&s(M),M.defaultPrevented)return;M.preventDefault();let D=M.nativeEvent.submitter,k=D?.getAttribute("formmethod")||i,v=()=>g(D||M.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:y});b&&r!==!1?d.startTransition(()=>v()):v()};return d.createElement("form",{ref:R,method:S,action:C,onSubmit:a?s:_,...E,"data-discover":!T&&e==="render"?"true":void 0})});_n.displayName="Form";function ls({getKey:e,storageKey:t,...r}){let a=d.useContext(Bt),{basename:n}=d.useContext(Re),o=Ce(),i=Pr();fs({getKey:e,storageKey:t});let l=d.useMemo(()=>{if(!a||!e)return null;let u=gr(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,h)=>{if(!window.history.state||!window.history.state.key){let c=Math.random().toString(32).slice(2);window.history.replaceState({key:c},"")}try{let y=JSON.parse(sessionStorage.getItem(u)||"{}")[h||window.history.state.key];typeof y=="number"&&window.scrollTo(0,y)}catch(c){console.error(c),sessionStorage.removeItem(u)}}).toString();return d.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${mr(JSON.stringify(t||vr))}, ${mr(JSON.stringify(l))})`}})}ls.displayName="ScrollRestoration";function Dn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wt(e){let t=d.useContext(Je);return W(t,Dn(e)),t}function On(e){let t=d.useContext(tt);return W(t,Dn(e)),t}function ss(e,{target:t,replace:r,unstable_mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let h=on(),c=Ce(),y=vt(e,{relative:i});return d.useCallback(E=>{if(Gi(E,t)){E.preventDefault();let R=r!==void 0?r:Te(c)===Te(y),b=()=>h(e,{replace:R,unstable_mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s});u?d.startTransition(()=>b()):b()}},[c,h,y,r,a,n,t,e,o,i,l,s,u])}function ks(e){ie(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=d.useRef(fr(e)),r=d.useRef(!1),a=Ce(),n=d.useMemo(()=>Ki(a.search,r.current?null:t.current),[a.search]),o=on(),i=d.useCallback((l,s)=>{const u=fr(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var us=0,cs=()=>`__${String(++us)}__`;function kn(){let{router:e}=Wt("useSubmit"),{basename:t}=d.useContext(Re),r=Di(),a=e.fetch,n=e.navigate;return d.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:h,body:c}=Qi(o,t);if(i.navigate===!1){let y=i.fetcherKey||cs();await a(y,r,i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:c,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:c,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function ds(e,{relative:t}={}){let{basename:r}=d.useContext(Re),a=d.useContext(Le);W(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...vt(e||".",{relative:t})},i=Ce();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(h=>h==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let h=l.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Pe([r,o.pathname])),Te(o)}function Fs({key:e}={}){let{router:t}=Wt("useFetcher"),r=On("useFetcher"),a=d.useContext(xr),n=d.useContext(Le),o=n.matches[n.matches.length-1]?.route.id;W(a,"useFetcher must be used inside a FetchersContext"),W(n,"useFetcher must be used inside a RouteContext"),W(o!=null,'useFetcher can only be used on routes that contain a unique "id"');let i=d.useId(),[l,s]=d.useState(e||i);e&&e!==l&&s(e);let{deleteFetcher:u,getFetcher:h,resetFetcher:c,fetch:y}=t;d.useEffect(()=>(h(l),()=>u(l)),[u,h,l]);let E=d.useCallback(async(M,D)=>{W(o,"No routeId available for fetcher.load()"),await y(l,o,M,D)},[l,o,y]),R=kn(),b=d.useCallback(async(M,D)=>{await R(M,{...D,navigate:!1,fetcherKey:l})},[l,R]),g=d.useCallback(M=>c(l,M),[c,l]),C=d.useMemo(()=>{let M=d.forwardRef((D,k)=>d.createElement(_n,{...D,navigate:!1,fetcherKey:l,ref:k}));return M.displayName="fetcher.Form",M},[l]),S=r.fetchers.get(l)||Ba,T=a.get(l);return d.useMemo(()=>({Form:C,submit:b,load:E,reset:g,...S,data:T}),[C,b,E,g,S,T])}var vr="react-router-scroll-positions",_t={};function gr(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:Ee(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function fs({getKey:e,storageKey:t}={}){let{router:r}=Wt("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=On("useScrollRestoration"),{basename:o}=d.useContext(Re),i=Ce(),l=Pr(),s=Oi();d.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),hs(d.useCallback(()=>{if(s.state==="idle"){let u=gr(i,l,o,e);_t[u]=window.scrollY}try{sessionStorage.setItem(t||vr,JSON.stringify(_t))}catch(u){ie(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(d.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||vr);u&&(_t=JSON.parse(u))}catch{}},[t]),d.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(_t,()=>window.scrollY,e?(h,c)=>gr(h,c,o,e):void 0);return()=>u&&u()},[r,o,e]),d.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{ie(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function hs(e,t){let{capture:r}={};d.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function ms(e,{relative:t}={}){let r=d.useContext(Sr);W(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Wt("useViewTransitionState"),n=vt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Ee(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=Ee(r.nextLocation.pathname,a)||r.nextLocation.pathname;return At(n.pathname,i)!=null||At(n.pathname,o)!=null}export{xs as A,Ls as B,rs as C,dn as D,je as E,Bt as F,ws as G,Fs as H,no as I,Mn as J,_s as L,Ds as M,Sl as N,Ss as O,ao as R,ls as S,d as a,W as b,Os as c,bs as d,Ol as e,Dr as f,vs as g,Ts as h,Ve as i,Cs as j,ys as k,Ps as l,Ae as m,Es as n,Rs as o,ps as p,gs as q,ro as r,Wl as s,ks as t,Ms as u,on as v,is as w,Oi as x,Pr as y,Ce as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-UVKPFVEO-YfSfkVr_.js";const l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim();const C=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase());const i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)};var w={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 h=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const g=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:u,...c},p)=>s.createElement("svg",{ref:p,...w,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!h(c)&&{"aria-hidden":"true"},...c},[...u.map(([m,d])=>s.createElement(m,d)),...Array.isArray(a)?a:[a]]));const b=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:e,className:l(`lucide-${C(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};export{b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as T,t as He,p as et,J as tt}from"./chunk-UVKPFVEO-YfSfkVr_.js";function rt(e,t){return function(o,...n){const s=new URL(e);return s.searchParams.set("code",o.toString()),n.forEach(a=>s.searchParams.append("args[]",a)),`${t} error #${o}; visit ${s} for the full message.`}}const ot=rt("https://base-ui.com/production-error","Base UI"),xe={};function Ne(e,t){const r=T.useRef(xe);return r.current===xe&&(r.current=e(t)),r}function ve(e,t,r,o){const n=Ne(Me).current;return st(n,e,t,r,o)&&Oe(n,[e,t,r,o]),n.callback}function nt(e){const t=Ne(Me).current;return at(t,e)&&Oe(t,e),t.callback}function Me(){return{callback:null,cleanup:null,refs:[]}}function st(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function at(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Oe(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){const s=t[n];if(s!=null)switch(typeof s){case"function":{const a=s(r);typeof a=="function"&&(o[n]=a);break}case"object":{s.current=r;break}}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){const s=t[n];if(s!=null)switch(typeof s){case"function":{const a=o[n];typeof a=="function"?a():s(null);break}case"object":{s.current=null;break}}}}}}}const it=parseInt(T.version,10);function lt(e){return it>=e}function Ae(e){if(!T.isValidElement(e))return null;const t=e,r=t.props;return(lt(19)?r?.ref:t.ref)??null}function le(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ct(e,t){const r={};for(const o in e){const n=e[o];if(t?.hasOwnProperty(o)){const s=t[o](n);s!=null&&Object.assign(r,s);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function dt(e,t){return typeof e=="function"?e(t):e}function ut(e,t){return typeof e=="function"?e(t):e}const D={};function mt(e,t,r,o,n){let s={...ce(e,D)};return t&&(s=ee(s,t)),r&&(s=ee(s,r)),o&&(s=ee(s,o)),s}function ft(e){if(e.length===0)return D;if(e.length===1)return ce(e[0],D);let t={...ce(e[0],D)};for(let r=1;r<e.length;r+=1)t=ee(t,e[r]);return t}function ee(e,t){return _e(t)?t(e):bt(e,t)}function bt(e,t){if(!t)return e;for(const r in t){const o=t[r];switch(r){case"style":{e[r]=le(e.style,o);break}case"className":{e[r]=je(e.className,o);break}default:pt(r,o)?e[r]=gt(e[r],o):e[r]=o}}return e}function pt(e,t){const r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function _e(e){return typeof e=="function"}function ce(e,t){return _e(e)?e(t):e??D}function gt(e,t){return t?e?r=>{if(yt(r)){const n=r;ht(n);const s=t(n);return n.baseUIHandlerPrevented||e?.(n),s}const o=t(r);return e?.(r),o}:t:e}function ht(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function je(e,t){return t?e?t+" "+e:t:e}function yt(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wr(){}const xr=Object.freeze([]),$=Object.freeze({});function kt(e,t,r={}){const o=t.render,n=wt(t,r);if(r.enabled===!1)return null;const s=r.state??$;return vt(e,o,n,s)}function wt(e,t={}){const{className:r,style:o,render:n}=e,{state:s=$,ref:a,props:m,stateAttributesMapping:c,enabled:f=!0}=t,p=f?dt(r,s):void 0,g=f?ut(o,s):void 0,h=f?ct(s,c):$,y=f?le(h,Array.isArray(m)?ft(m):m)??$:$;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=nt([y.ref,Ae(n),...a]):y.ref=ve(y.ref,Ae(n),a):ve(null,null)),f?(p!==void 0&&(y.className=je(y.className,p)),g!==void 0&&(y.style=le(y.style,g)),y):$}const xt=Symbol.for("react.lazy");function vt(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);const n=mt(r,t.props);n.ref=r.ref;let s=t;return s?.$$typeof===xt&&(s=T.Children.toArray(t)[0]),T.cloneElement(s,n)}if(e&&typeof e=="string")return At(e,r);throw new Error(ot(8))}function At(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):T.createElement(e,t)}function Le(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Le(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Ge(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Le(e))&&(o&&(o+=" "),o+=t);return o}const St=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},Ct=(e,t)=>({classGroupId:e,validator:t}),Ve=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),te="-",Se=[],zt="arbitrary..",Et=e=>{const t=It(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Pt(a);const m=a.split(te),c=m[0]===""&&m.length>1?1:0;return We(m,c,t)},getConflictingClassGroupIds:(a,m)=>{if(m){const c=o[a],f=r[a];return c?f?St(f,c):c:f||Se}return r[a]||Se}}},We=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const f=We(e,t+1,s);if(f)return f}const a=r.validators;if(a===null)return;const m=t===0?e.join(te):e.slice(t).join(te),c=a.length;for(let f=0;f<c;f++){const p=a[f];if(p.validator(m))return p.classGroupId}},Pt=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?zt+o:void 0})(),It=e=>{const{theme:t,classGroups:r}=e;return Rt(r,t)},Rt=(e,t)=>{const r=Ve();for(const o in e){const n=e[o];ue(n,r,o,t)}return r},ue=(e,t,r,o)=>{const n=e.length;for(let s=0;s<n;s++){const a=e[s];Tt(a,t,r,o)}},Tt=(e,t,r,o)=>{if(typeof e=="string"){Nt(e,t,r);return}if(typeof e=="function"){Mt(e,t,r,o);return}Ot(e,t,r,o)},Nt=(e,t,r)=>{const o=e===""?t:$e(t,e);o.classGroupId=r},Mt=(e,t,r,o)=>{if(_t(e)){ue(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Ct(r,e))},Ot=(e,t,r,o)=>{const n=Object.entries(e),s=n.length;for(let a=0;a<s;a++){const[m,c]=n[a];ue(c,$e(t,m),r,o)}},$e=(e,t)=>{let r=e;const o=t.split(te),n=o.length;for(let s=0;s<n;s++){const a=o[s];let m=r.nextPart.get(a);m||(m=Ve(),r.nextPart.set(a,m)),r=m}return r},_t=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(s,a)=>{r[s]=a,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return n(s,a),a},set(s,a){s in r?r[s]=a:n(s,a)}}},de="!",Ce=":",Lt=[],ze=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),Gt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const s=[];let a=0,m=0,c=0,f;const p=n.length;for(let S=0;S<p;S++){const x=n[S];if(a===0&&m===0){if(x===Ce){s.push(n.slice(c,S)),c=S+1;continue}if(x==="/"){f=S;continue}}x==="["?a++:x==="]"?a--:x==="("?m++:x===")"&&m--}const g=s.length===0?n:n.slice(c);let h=g,y=!1;g.endsWith(de)?(h=g.slice(0,-1),y=!0):g.startsWith(de)&&(h=g.slice(1),y=!0);const E=f&&f>c?f-c:void 0;return ze(s,y,h,E)};if(t){const n=t+Ce,s=o;o=a=>a.startsWith(n)?s(a.slice(n.length)):ze(Lt,!1,a,void 0,!0)}if(r){const n=o;o=s=>r({className:s,parseClassName:n})}return o},Vt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let s=0;s<r.length;s++){const a=r[s],m=a[0]==="[",c=t.has(a);m||c?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(a)):n.push(a)}return n.length>0&&(n.sort(),o.push(...n)),o}},Wt=e=>({cache:jt(e.cacheSize),parseClassName:Gt(e),sortModifiers:Vt(e),...Et(e)}),$t=/\s+/,Ft=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:s}=t,a=[],m=e.trim().split($t);let c="";for(let f=m.length-1;f>=0;f-=1){const p=m[f],{isExternal:g,modifiers:h,hasImportantModifier:y,baseClassName:E,maybePostfixModifierPosition:S}=r(p);if(g){c=p+(c.length>0?" "+c:c);continue}let x=!!S,M=o(x?E.substring(0,S):E);if(!M){if(!x){c=p+(c.length>0?" "+c:c);continue}if(M=o(E),!M){c=p+(c.length>0?" "+c:c);continue}x=!1}const Y=h.length===0?"":h.length===1?h[0]:s(h).join(":"),F=y?Y+de:Y,G=F+M;if(a.indexOf(G)>-1)continue;a.push(G);const V=n(M,x);for(let O=0;O<V.length;++O){const B=V[O];a.push(F+B)}c=p+(c.length>0?" "+c:c)}return c},Bt=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Fe(r))&&(n&&(n+=" "),n+=o);return n},Fe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Fe(e[o]))&&(r&&(r+=" "),r+=t);return r},Ut=(e,...t)=>{let r,o,n,s;const a=c=>{const f=t.reduce((p,g)=>g(p),e());return r=Wt(f),o=r.cache.get,n=r.cache.set,s=m,m(c)},m=c=>{const f=o(c);if(f)return f;const p=Ft(c,r);return n(c,p),p};return s=a,(...c)=>s(Bt(...c))},Dt=[],k=e=>{const t=r=>r[e]||Dt;return t.isThemeGetter=!0,t},Be=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jt=/\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$/,Qt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>Yt.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),R=e=>!!e&&Number.isInteger(Number(e)),ie=e=>e.endsWith("%")&&b(e.slice(0,-1)),P=e=>qt.test(e),De=()=>!0,Kt=e=>Jt.test(e)&&!Qt.test(e),me=()=>!1,Ht=e=>Xt.test(e),er=e=>Zt.test(e),tr=e=>!i(e)&&!l(e),rr=e=>N(e,Je,me),i=e=>Be.test(e),j=e=>N(e,Qe,Kt),Ee=e=>N(e,dr,b),or=e=>N(e,Ze,De),nr=e=>N(e,Xe,me),Pe=e=>N(e,Ye,me),sr=e=>N(e,qe,er),K=e=>N(e,Ke,Ht),l=e=>Ue.test(e),U=e=>L(e,Qe),ar=e=>L(e,Xe),Ie=e=>L(e,Ye),ir=e=>L(e,Je),lr=e=>L(e,qe),H=e=>L(e,Ke,!0),cr=e=>L(e,Ze,!0),N=(e,t,r)=>{const o=Be.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},L=(e,t,r=!1)=>{const o=Ue.exec(e);return o?o[1]?t(o[1]):r:!1},Ye=e=>e==="position"||e==="percentage",qe=e=>e==="image"||e==="url",Je=e=>e==="length"||e==="size"||e==="bg-size",Qe=e=>e==="length",dr=e=>e==="number",Xe=e=>e==="family-name",Ze=e=>e==="number"||e==="weight",Ke=e=>e==="shadow",ur=()=>{const e=k("color"),t=k("font"),r=k("text"),o=k("font-weight"),n=k("tracking"),s=k("leading"),a=k("breakpoint"),m=k("container"),c=k("spacing"),f=k("radius"),p=k("shadow"),g=k("inset-shadow"),h=k("text-shadow"),y=k("drop-shadow"),E=k("blur"),S=k("perspective"),x=k("aspect"),M=k("ease"),Y=k("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...G(),l,i],O=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],d=()=>[l,i,c],C=()=>[I,"full","auto",...d()],fe=()=>[R,"none","subgrid",l,i],be=()=>["auto",{span:["full",R,l,i]},R,l,i],q=()=>[R,"auto",l,i],pe=()=>["auto","min","max","fr",l,i],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...d()],_=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...d()],oe=()=>[I,"screen","full","dvw","lvw","svw","min","max","fit",...d()],ne=()=>[I,"screen","full","lh","dvh","lvh","svh","min","max","fit",...d()],u=()=>[e,l,i],ge=()=>[...G(),Ie,Pe,{position:[l,i]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",ir,rr,{size:[l,i]}],se=()=>[ie,U,j],v=()=>["","none","full",f,l,i],A=()=>["",b,U,j],J=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>[b,ie,Ie,Pe],we=()=>["","none",E,l,i],Q=()=>["none",b,l,i],X=()=>["none",b,l,i],ae=()=>[b,l,i],Z=()=>[I,"full",...d()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[P],breakpoint:[P],color:[De],container:[P],"drop-shadow":[P],ease:["in","out","in-out"],font:[tr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[P],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[P],shadow:[P],spacing:["px",b],text:[P],"text-shadow":[P],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,i,l,x]}],container:["container"],columns:[{columns:[b,i,l,m]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:V()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[R,"auto",l,i]}],basis:[{basis:[I,"full","auto",m,...d()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,I,"auto","initial","none",i]}],grow:[{grow:["",b,l,i]}],shrink:[{shrink:["",b,l,i]}],order:[{order:[R,"first","last","none",l,i]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:d()}],"gap-x":[{"gap-x":d()}],"gap-y":[{"gap-y":d()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:d()}],px:[{px:d()}],py:[{py:d()}],ps:[{ps:d()}],pe:[{pe:d()}],pbs:[{pbs:d()}],pbe:[{pbe:d()}],pt:[{pt:d()}],pr:[{pr:d()}],pb:[{pb:d()}],pl:[{pl:d()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":d()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":d()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],"inline-size":[{inline:["auto",...oe()]}],"min-inline-size":[{"min-inline":["auto",...oe()]}],"max-inline-size":[{"max-inline":["none",...oe()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[m,"screen",..._()]}],"min-w":[{"min-w":[m,"screen","none",..._()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",r,U,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,cr,or]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ie,i]}],"font-family":[{font:[ar,nr,t]}],"font-features":[{"font-features":[i]}],"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:[n,l,i]}],"line-clamp":[{"line-clamp":[b,"none",l,Ee]}],leading:[{leading:[s,...d()]}],"list-image":[{"list-image":["none",l,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",l,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",l,j]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[b,"auto",l,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l,i]}],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",l,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ge()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},R,l,i],radial:["",l,i],conic:[R,l,i]},lr,sr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:v()}],"rounded-s":[{"rounded-s":v()}],"rounded-e":[{"rounded-e":v()}],"rounded-t":[{"rounded-t":v()}],"rounded-r":[{"rounded-r":v()}],"rounded-b":[{"rounded-b":v()}],"rounded-l":[{"rounded-l":v()}],"rounded-ss":[{"rounded-ss":v()}],"rounded-se":[{"rounded-se":v()}],"rounded-ee":[{"rounded-ee":v()}],"rounded-es":[{"rounded-es":v()}],"rounded-tl":[{"rounded-tl":v()}],"rounded-tr":[{"rounded-tr":v()}],"rounded-br":[{"rounded-br":v()}],"rounded-bl":[{"rounded-bl":v()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-bs":[{"border-bs":A()}],"border-w-be":[{"border-be":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-bs":[{"border-bs":u()}],"border-color-be":[{"border-be":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,l,i]}],"outline-w":[{outline:["",b,U,j]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",p,H,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",g,H,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[b,j]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",h,H,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[b,l,i]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":w()}],"mask-image-linear-to-pos":[{"mask-linear-to":w()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":w()}],"mask-image-t-to-pos":[{"mask-t-to":w()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":w()}],"mask-image-r-to-pos":[{"mask-r-to":w()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":w()}],"mask-image-b-to-pos":[{"mask-b-to":w()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":w()}],"mask-image-l-to-pos":[{"mask-l-to":w()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":w()}],"mask-image-x-to-pos":[{"mask-x-to":w()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":w()}],"mask-image-y-to-pos":[{"mask-y-to":w()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[l,i]}],"mask-image-radial-from-pos":[{"mask-radial-from":w()}],"mask-image-radial-to-pos":[{"mask-radial-to":w()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"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":G()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":w()}],"mask-image-conic-to-pos":[{"mask-conic-to":w()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",l,i]}],filter:[{filter:["","none",l,i]}],blur:[{blur:we()}],brightness:[{brightness:[b,l,i]}],contrast:[{contrast:[b,l,i]}],"drop-shadow":[{"drop-shadow":["","none",y,H,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",b,l,i]}],"hue-rotate":[{"hue-rotate":[b,l,i]}],invert:[{invert:["",b,l,i]}],saturate:[{saturate:[b,l,i]}],sepia:[{sepia:["",b,l,i]}],"backdrop-filter":[{"backdrop-filter":["","none",l,i]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[b,l,i]}],"backdrop-contrast":[{"backdrop-contrast":[b,l,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,l,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,l,i]}],"backdrop-invert":[{"backdrop-invert":["",b,l,i]}],"backdrop-opacity":[{"backdrop-opacity":[b,l,i]}],"backdrop-saturate":[{"backdrop-saturate":[b,l,i]}],"backdrop-sepia":[{"backdrop-sepia":["",b,l,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":d()}],"border-spacing-x":[{"border-spacing-x":d()}],"border-spacing-y":[{"border-spacing-y":d()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",l,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",l,i]}],ease:[{ease:["linear","initial",M,l,i]}],delay:[{delay:[b,l,i]}],animate:[{animate:["none",Y,l,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,l,i]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[l,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"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",l,i]}],"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":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mbs":[{"scroll-mbs":d()}],"scroll-mbe":[{"scroll-mbe":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pbs":[{"scroll-pbs":d()}],"scroll-pbe":[{"scroll-pbe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"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",l,i]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[b,U,j,Ee]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},mr=Ut(ur);function fr(...e){return mr(Ge(e))}function vr(e){const t=Math.floor((Date.now()-e.getTime())/1e3);return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function Ar(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Sr(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}const br=["created","retry","active","completed","cancelled","failed"],pr="pending",gr="all",Cr={created:"gray",retry:"warning",active:"primary",completed:"success",cancelled:"gray",failed:"error"},zr=[{value:gr,label:"All States"},{value:pr,label:"Pending"},...br.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)}))],hr=["slow_query","queue_backlog","clock_skew"],Er={slow_query:"warning",queue_backlog:"error",clock_skew:"gray"},yr={slow_query:"Slow Query",queue_backlog:"Queue Backlog",clock_skew:"Clock Skew"},Pr=[{value:null,label:"All Types"},...hr.map(e=>({value:e,label:yr[e]}))];function Ir(e){if(!e)return"-";if(typeof e=="string")return e;try{const t=e,r=[];return t.elapsed&&r.push(`${t.elapsed.toFixed(2)}s`),t.name&&r.push(`queue: ${t.name}`),t.queuedCount&&r.push(`queued: ${t.queuedCount}`),t.seconds&&r.push(`skew: ${t.seconds.toFixed(1)}s`),t.direction&&r.push(`(${t.direction})`),r.length>0?r.join(", "):JSON.stringify(e)}catch{return String(e)}}const Re=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Te=Ge,Rr=(e,t)=>r=>{var o;if(t?.variants==null)return Te(e,r?.class,r?.className);const{variants:n,defaultVariants:s}=t,a=Object.keys(n).map(f=>{const p=r?.[f],g=s?.[f];if(p===null)return null;const h=Re(p)||Re(g);return n[f][h]}),m=r&&Object.entries(r).reduce((f,p)=>{let[g,h]=p;return h===void 0||(f[g]=h),f},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((f,p)=>{let{class:g,className:h,...y}=p;return Object.entries(y).every(E=>{let[S,x]=E;return Array.isArray(x)?x.includes({...s,...m}[S]):{...s,...m}[S]===x})?[...f,g,h]:f},[]);return Te(e,a,c,r?.class,r?.className)};function Tr(e){return kt(e.defaultTagName??"div",e,e)}function Nr({to:e,children:t,className:r,...o}){const[n]=He(),s=n.get("db");let a;if(typeof e=="string"){const m=new URL(e,"http://localhost");s&&!m.searchParams.has("db")&&m.searchParams.set("db",s),a=m.pathname+m.search}else if(typeof e=="object"&&e!==null){const m=e.pathname||"",c=e.search||"",f=e.hash||"",p=new URLSearchParams(c.replace(/^\?/,""));s&&!p.has("db")&&p.set("db",s);const g=p.toString();a=m+(g?`?${g}`:"")+f}else a=String(e);return et.jsx(tt,{to:a,className:fr("cursor-pointer",r),...o,children:t})}export{Nr as D,$ as E,zr as J,wr as N,yr as W,Rr as a,Er as b,fr as c,Cr as d,Ar as e,vr as f,ot as g,ve as h,kt as i,Ne as j,xr as k,ht as l,mt as m,lt as n,Pr as o,Ir as p,Sr as q,Tr as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,p as u}from"./chunk-UVKPFVEO-YfSfkVr_.js";import{g as F,i as v,j as H,c as P}from"./db-link-CU7IJqbq.js";import{c as K}from"./createLucideIcon-Bt-yXILq.js";import{a_ as L,a$ as Y,b0 as G,ad as J,h as B,b2 as X,b3 as q,b5 as Q,b4 as Z,b1 as A,b7 as ee,a5 as te,a2 as oe,aS as ne,_ as se,aT as ae,aV as re,aW as S,aH as U,aI as V,u as ie,bk as le,c as $,bl as N,aE as de,aJ as ce,aG as ue,aK as pe,aO as ge,aP as fe,aY as me}from"./useOpenInteractionType-mgYMZAa8.js";const xe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ce=K("x",xe);function he(t){const{store:e,parentContext:o,actionsRef:c}=t,a=e.useState("open"),r=e.useState("disablePointerDismissal"),d=e.useState("modal"),i=e.useState("popupElement"),{openMethod:n,triggerProps:p}=L(a);Y(e);const{forceUnmount:g}=G(a,e),f=J(x=>{const D=B(x);return D.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},D}),m=s.useCallback(()=>{e.setOpen(!1,f(X))},[e,f]);s.useImperativeHandle(c,()=>({unmount:g,close:m}),[g,m]);const C=q({popupStore:e,onOpenChange:e.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[l,y]=s.useState(0),R=l===0,E=Q(C),w=Z(C,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:d==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(x){if(!e.context.outsidePressEnabledRef.current||"button"in x&&x.button!==0||"touches"in x&&x.touches.length!==1)return!1;const D=te(x);if(R&&!r){const h=D;return d&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===h||e.context.backdropRef.current===h||oe(h,i)&&!h?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:R});A(a&&d===!0,i);const{getReferenceProps:k,getFloatingProps:I,getTriggerProps:O}=ee([E,w]);e.useContextCallback("onNestedDialogOpen",x=>{y(x+1)}),e.useContextCallback("onNestedDialogClose",()=>{y(0)}),s.useEffect(()=>(o?.onNestedDialogOpen&&a&&o.onNestedDialogOpen(l),o?.onNestedDialogClose&&!a&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&a&&o.onNestedDialogClose()}),[a,o,l]);const T=s.useMemo(()=>k(p),[k,p]),M=s.useMemo(()=>O(p),[O,p]),j=s.useMemo(()=>I(),[I]);e.useSyncedValues({openMethod:n,activeTriggerProps:T,inactiveTriggerProps:M,popupProps:j,floatingRootContext:C,nestedOpenDialogCount:l})}const W=s.createContext(void 0);function b(t){const e=s.useContext(W);if(t===!1&&e===void 0)throw new Error(F(27));return e}const Se={...ae,modal:S(t=>t.modal),nested:S(t=>t.nested),nestedOpenDialogCount:S(t=>t.nestedOpenDialogCount),disablePointerDismissal:S(t=>t.disablePointerDismissal),openMethod:S(t=>t.openMethod),descriptionElementId:S(t=>t.descriptionElementId),titleElementId:S(t=>t.titleElementId),viewportElement:S(t=>t.viewportElement),role:S(t=>t.role)};class Re extends ne{constructor(e){super(be(e),{popupRef:s.createRef(),backdropRef:s.createRef(),internalBackdropRef:s.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new se,onOpenChange:void 0,onOpenChangeComplete:void 0},Se)}setOpen=(e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;const c={open:e,nativeEvent:o.event,reason:o.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",c);const a={open:e},r=o.trigger?.id??null;(r||e)&&(a.activeTriggerId=r,a.activeTriggerElement=o.trigger??null),this.update(a)}}function be(t={}){return{...re(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...t}}const ye={...U,...V},De=s.forwardRef(function(e,o){const{render:c,className:a,forceRender:r=!1,...d}=e,{store:i}=b(),n=i.useState("open"),p=i.useState("nested"),g=i.useState("mounted"),f=i.useState("transitionStatus");return v("div",e,{state:{open:n,transitionStatus:f},ref:[i.context.backdropRef,o],stateAttributesMapping:ye,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:r||!p})}),Pe=s.forwardRef(function(e,o){const{render:c,className:a,disabled:r=!1,nativeButton:d=!0,...i}=e,{store:n}=b(),p=n.useState("open");function g(l){p&&n.setOpen(!1,B(le,l.nativeEvent))}const{getButtonProps:f,buttonRef:m}=ie({disabled:r,native:d});return v("button",e,{state:{disabled:r},ref:[o,m],props:[{onClick:g},i,f]})}),Ee=s.forwardRef(function(e,o){const{render:c,className:a,id:r,...d}=e,{store:i}=b(),n=$(r);return i.useSyncedValueWithCleanup("descriptionElementId",n),v("p",e,{ref:o,props:[{id:n},d]})});let ve=(function(t){return t.nestedDialogs="--nested-dialogs",t})({}),ke=(function(t){return t[t.open=N.open]="open",t[t.closed=N.closed]="closed",t[t.startingStyle=N.startingStyle]="startingStyle",t[t.endingStyle=N.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});const _=s.createContext(void 0);function Ie(){const t=s.useContext(_);if(t===void 0)throw new Error(F(26));return t}const Oe={...U,...V,nestedDialogOpen(t){return t?{[ke.nestedDialogOpen]:""}:null}},Ne=s.forwardRef(function(e,o){const{className:c,finalFocus:a,initialFocus:r,render:d,...i}=e,{store:n}=b(),p=n.useState("descriptionElementId"),g=n.useState("disablePointerDismissal"),f=n.useState("floatingRootContext"),m=n.useState("popupProps"),C=n.useState("modal"),l=n.useState("mounted"),y=n.useState("nested"),R=n.useState("nestedOpenDialogCount"),E=n.useState("open"),w=n.useState("openMethod"),k=n.useState("titleElementId"),I=n.useState("transitionStatus"),O=n.useState("role");Ie(),de({open:E,ref:n.context.popupRef,onComplete(){E&&n.context.onOpenChangeComplete?.(!0)}});function T(h){return h==="touch"?n.context.popupRef.current:!0}const M=r===void 0?T:r,j=R>0,D=v("div",e,{state:{open:E,nested:y,transitionStatus:I,nestedDialogOpen:j},props:[m,{"aria-labelledby":k??void 0,"aria-describedby":p??void 0,role:O,tabIndex:-1,hidden:!l,onKeyDown(h){ce.has(h.key)&&h.stopPropagation()},style:{[ve.nestedDialogs]:R}},i],ref:[o,n.context.popupRef,n.useStateSetter("popupElement")],stateAttributesMapping:Oe});return u.jsx(ue,{context:f,openInteractionType:w,disabled:!l,closeOnFocusOut:!g,initialFocus:M,returnFocus:a,modal:C!==!1,restoreFocus:"popup",children:D})}),we=s.forwardRef(function(e,o){const{keepMounted:c=!1,...a}=e,{store:r}=b(),d=r.useState("mounted"),i=r.useState("modal"),n=r.useState("open");return d||c?u.jsx(_.Provider,{value:c,children:u.jsxs(pe,{ref:o,...a,children:[d&&i===!0&&u.jsx(ge,{ref:r.context.internalBackdropRef,inert:fe(!n)}),e.children]})}):null}),Te=s.forwardRef(function(e,o){const{render:c,className:a,id:r,...d}=e,{store:i}=b(),n=$(r);return i.useSyncedValueWithCleanup("titleElementId",n),v("h2",e,{ref:o,props:[{id:n},d]})});function Me(t){const{children:e,open:o,defaultOpen:c=!1,onOpenChange:a,onOpenChangeComplete:r,disablePointerDismissal:d=!1,modal:i=!0,actionsRef:n,handle:p,triggerId:g,defaultTriggerId:f=null}=t,m=b(!0),C=!!m,l=H(()=>p?.store??new Re({open:c,openProp:o,activeTriggerId:f,triggerIdProp:g,modal:i,disablePointerDismissal:d,nested:C})).current;me(()=>{o===void 0&&l.state.open===!1&&c===!0&&l.update({open:!0,activeTriggerId:f})}),l.useControlledProp("openProp",o),l.useControlledProp("triggerIdProp",g),l.useSyncedValues({disablePointerDismissal:d,nested:C,modal:i}),l.useContextCallback("onOpenChange",a),l.useContextCallback("onOpenChangeComplete",r);const y=l.useState("payload");he({store:l,actionsRef:n,parentContext:m?.store.context});const R=s.useMemo(()=>({store:l}),[l]);return u.jsx(W.Provider,{value:R,children:typeof e=="function"?e({payload:y}):e})}const Ke=Me,je=we,z=s.forwardRef(({className:t,...e},o)=>u.jsx(De,{ref:o,className:P("fixed inset-0 z-50 bg-gray-900/50 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0",t),...e}));z.displayName="DialogBackdrop";const Fe=s.forwardRef(({className:t,children:e,hideCloseButton:o=!1,...c},a)=>u.jsxs(je,{children:[u.jsx(z,{}),u.jsxs(Ne,{ref:a,className:P("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","bg-white rounded-lg shadow-xl p-6","dark:bg-gray-900 dark:border dark:border-gray-800","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-closed:slide-out-to-left-1/2 data-closed:slide-out-to-top-[48%]","data-open:slide-in-from-left-1/2 data-open:slide-in-from-top-[48%]",t),...c,children:[e,!o&&u.jsxs(Pe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:pointer-events-none dark:ring-offset-gray-900 dark:text-gray-400 dark:hover:text-gray-100",children:[u.jsx(Ce,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fe.displayName="DialogContent";const Be=({className:t,...e})=>u.jsx("div",{className:P("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Be.displayName="DialogHeader";const Ue=({className:t,...e})=>u.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Ue.displayName="DialogFooter";const Ve=s.forwardRef(({className:t,...e},o)=>u.jsx(Te,{ref:o,className:P("text-lg font-semibold text-gray-900 dark:text-gray-100",t),...e}));Ve.displayName="DialogTitle";const $e=s.forwardRef(({className:t,...e},o)=>u.jsx(Ee,{ref:o,className:P("text-sm text-gray-600 dark:text-gray-400",t),...e}));$e.displayName="DialogDescription";export{Ke as D,Fe as a,Be as b,Ve as c,$e as d,Ue as e};
|