@pg-boss/dashboard 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +1 -1
  2. package/build/client/assets/MenuTrigger-BNvpjhsQ.js +1 -0
  3. package/build/client/assets/_index-DqpFaaQw.js +1 -0
  4. package/build/client/assets/{badge-DFReduIj.js → badge-CMnQO7Lq.js} +1 -1
  5. package/build/client/assets/button-9NpSS9Ow.js +1 -0
  6. package/build/client/assets/check-7jwc5sb1.js +1 -0
  7. package/build/client/assets/{chevron-down-C8oENez_.js → chevron-down-BFFjfYD4.js} +1 -1
  8. package/build/client/assets/chevron-right-DGk5QFJF.js +1 -0
  9. package/build/client/assets/createLucideIcon-C-LI4enx.js +1 -0
  10. package/build/client/assets/db-link-BajQ1v8I.js +1 -0
  11. package/build/client/assets/dialog-D-oczDM2.js +1 -0
  12. package/build/client/assets/entry.client-CqyjuPDB.js +9 -0
  13. package/build/client/assets/{error-card-2aexlkmv.js → error-card-BH7i86fH.js} +1 -1
  14. package/build/client/assets/{filter-select-Dln9CAM3.js → filter-select-Bn_oSiip.js} +1 -1
  15. package/build/client/assets/jobs-CAd_qqLH.js +1 -0
  16. package/build/client/assets/jsx-runtime-RQyiN6Nr.js +16 -0
  17. package/build/client/assets/manifest-27e8e133.js +1 -0
  18. package/build/client/assets/migrations-D5l0n4Jn.js +1 -0
  19. package/build/client/assets/{pagination-5gEldBFM.js → pagination-C-ohiBmY.js} +1 -1
  20. package/build/client/assets/queues._index-8YriSqbQ.js +1 -0
  21. package/build/client/assets/queues._name-Cb17IB2u.js +1 -0
  22. package/build/client/assets/queues._name.jobs._jobId-Bkv8POBj.js +1 -0
  23. package/build/client/assets/queues.create-DsY0Sc19.js +1 -0
  24. package/build/client/assets/react-dom-D_m_Zgd3.js +1 -0
  25. package/build/client/assets/root-B0MB8jZH.css +2 -0
  26. package/build/client/assets/root-qxoeL6W3.js +40 -0
  27. package/build/client/assets/{schedules-CE-hWC9e.js → schedules-iYfIJxOD.js} +1 -1
  28. package/build/client/assets/schedules._name._key-CJVu73XY.js +1 -0
  29. package/build/client/assets/schedules.new-Cq0Mxa7G.js +1 -0
  30. package/build/client/assets/send-8X9ZisG-.js +1 -0
  31. package/build/client/assets/{stat-card-y2feeHt0.js → stat-card-dyg1wY5p.js} +1 -1
  32. package/build/client/assets/{table-B5BEGV9S.js → table-Cz7ujmH_.js} +1 -1
  33. package/build/client/assets/useOpenInteractionType-BQ1arb0B.js +1 -0
  34. package/build/client/assets/warnings-C1R_RzIe.js +1 -0
  35. package/build/client/assets/x-AhXI_F1j.js +1 -0
  36. package/build/server/index.js +2569 -943
  37. package/package.json +19 -16
  38. package/build/client/assets/MenuTrigger-CkqlwCsV.js +0 -1
  39. package/build/client/assets/_index-CNX0dPQi.js +0 -1
  40. package/build/client/assets/button-CafwM-5D.js +0 -1
  41. package/build/client/assets/check-BePyOaOM.js +0 -1
  42. package/build/client/assets/chevron-right-B0sTJmdc.js +0 -1
  43. package/build/client/assets/createLucideIcon-oZ0wXCaF.js +0 -1
  44. package/build/client/assets/db-link-DISwKBYZ.js +0 -1
  45. package/build/client/assets/dialog-IBPuwpas.js +0 -1
  46. package/build/client/assets/entry.client-6KjasuHH.js +0 -9
  47. package/build/client/assets/jobs-BjoGjnb0.js +0 -1
  48. package/build/client/assets/jsx-runtime-DcdjQ3vN.js +0 -26
  49. package/build/client/assets/manifest-e6a94de0.js +0 -1
  50. package/build/client/assets/queues._index-BM3eKnSr.js +0 -1
  51. package/build/client/assets/queues._name-DSOGXBen.js +0 -1
  52. package/build/client/assets/queues._name.jobs._jobId-DKGu8NkE.js +0 -1
  53. package/build/client/assets/queues.create-BVR72i85.js +0 -1
  54. package/build/client/assets/react-dom-DQHA9Ik4.js +0 -1
  55. package/build/client/assets/root-Cvarn0sH.js +0 -40
  56. package/build/client/assets/root-D24FtLBP.css +0 -2
  57. package/build/client/assets/schedules._name._key-DT8Kg4jU.js +0 -1
  58. package/build/client/assets/schedules.new-bKRusXXO.js +0 -1
  59. package/build/client/assets/send-BaWw8x7J.js +0 -1
  60. package/build/client/assets/useOpenInteractionType-BGObzouY.js +0 -1
  61. package/build/client/assets/warnings-lzi34PdC.js +0 -1
  62. package/build/client/assets/x-EA6eZ1AP.js +0 -1
@@ -0,0 +1,16 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,f=/^[\\/]{2}/;function p(e,t){return t+e.replace(/\\/g,`/`)}var m=`popstate`;function h(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function g(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return x(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:S(t)}return w(t,n,null,e)}function _(e,t){if(e===!1||e==null)throw Error(t)}function v(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function y(){return Math.random().toString(36).substring(2,10)}function b(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function x(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?C(t):t,state:n,key:t&&t.key||r||y(),mask:i}}function S({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function C(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function w(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=h(e)?e:x(_.location,e,t);n&&n(r,e),l=u()+1;let d=b(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=h(e)?e:x(_.location,e,t);n&&n(r,e),l=u();let i=b(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function g(e){return T(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(m,d),c=e,()=>{i.removeEventListener(m,d),c=null}},createHref(e){return t(i,e)},createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return _}function T(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),_(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:S(t);return i=i.replace(/ $/,`%20`),!n&&f.test(i)&&(i=r+i),new URL(i,r)}var E=c(u(),1),D=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},O=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function k(e){return O.has(e)}var A=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function j(e){return A.has(e)}function M(e){return e.index===!0}function N(e){let t={};return e.Component&&Object.assign(t,{element:E.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function P(e,t=N,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(_(e.index!==!0||!e.children,`Cannot specify children on an index route`),_(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),M(e)){let n={...e,id:s};return r[s]=F(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=F(n,t(n)),e.children&&(n.children=P(e.children,t,o,r,i)),n}})}function F(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function I(e,t,n=`/`){return L(e,t,n,!1)}function L(e,t,n,r,i){let a=pe((typeof t==`string`?C(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=fe(a);for(let e=0;s==null&&e<o.length;++e)s=U(o[e],c,r);return s}function ee(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function R(e){let t=te(e);return re(t),t}function te(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;_(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=G([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(_(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),te(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:V(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=de(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ne(e.path))a(e,t,!0,n)}),t}function ne(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ne(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function re(e){e.sort((e,t)=>e.score===t.score?H(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ie=/^:[\w-]+$/,z=3,ae=2,oe=1,se=10,B=-2,ce=e=>e===`*`;function V(e,t){let n=e.split(`/`),r=n.length;return n.some(ce)&&(r+=B),t&&(r+=ae),n.filter(e=>!ce(e)).reduce((e,t)=>e+(ie.test(t)?z:t===``?oe:se),r)}function H(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function U(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ue(u,l,s.matcher,s.compiledParams):le(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=le({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:G([a,d.pathname]),pathnameBase:Ce(G([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=G([a,d.pathnameBase]))}return o}function le(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end);return ue(e,t,n,r)}function ue(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){v(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return v(!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 pe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function me({basename:e,pathname:t}){return t===`/`?e:G([e,t])}var he=e=>d.test(e);function W(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?C(e):e,a;return n?(n=xe(n),a=n.startsWith(`/`)?ge(n.substring(1),`/`):ge(n,t)):a=t,{pathname:a,search:we(r),hash:Te(i)}}function ge(e,t){let n=Se(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function _e(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ye(e){let t=ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function be(e,t,n,r=!1){let i;typeof e==`string`?i=C(e):(i={...e},_(!i.pathname||!i.pathname.includes(`?`),_e(`?`,`pathname`,`search`,i)),_(!i.pathname||!i.pathname.includes(`#`),_e(`#`,`pathname`,`hash`,i)),_(!i.search||!i.search.includes(`#`),_e(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=W(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var xe=e=>e.replace(/[\\/]{2,}/g,`/`),G=e=>xe(e.join(`/`)),Se=e=>e.replace(/\/+$/,``),Ce=e=>Se(e).replace(/^\/*/,`/`),we=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Te=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ee=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function De(e,t){return new Ee(e,typeof t==`number`?{status:t}:t)}var Oe=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},ke=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],K=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ae(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function q(e){return G(e.map(e=>e.route.path).filter(Boolean))||`/`}var je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Me(e,t){let n=e;if(typeof n!=`string`||!d.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(je)try{let e=new URL(window.location.href),r=f.test(n)?new URL(p(n,e.protocol)):new URL(n),a=pe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{v(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ne=E.createContext(null);Ne.displayName=`DataRouter`;var Pe=E.createContext(null);Pe.displayName=`DataRouterState`;var J=E.createContext(!1);function Fe(){return E.useContext(J)}var Ie=E.createContext({isTransitioning:!1});Ie.displayName=`ViewTransition`;var Le=E.createContext(new Map);Le.displayName=`Fetchers`;var Re=E.createContext(null);Re.displayName=`Await`;var ze=E.createContext(null);ze.displayName=`Navigation`;var Be=E.createContext(null);Be.displayName=`Location`;var Y=E.createContext({outlet:null,matches:[],isDataRoute:!1});Y.displayName=`Route`;var Ve=E.createContext(null);Ve.displayName=`RouteError`;var He=Symbol(`Uninstrumented`);function Ue(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Ge(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Ge(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[He]??i,a=Ge(n[e],t,(...e)=>qe(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[He]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[He]??e,r=Ge(n.middleware,t,(...e)=>qe(e[0]));return r?(r[He]=t,r):e})),r}function We(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[He]??e.navigate,r=Ge(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?S(n):`.`,...Je(e,r??{})}});r&&(r[He]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[He]??e.fetch,r=Ge(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Je(e,i??{})}});r&&(r[He]=t,e.fetch=r)}return e}function Ge(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ke(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ke(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Ke(e,t,n,r-1),a=await o,_(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function qe(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Ye(t),params:{...r},pattern:i,context:Xe(n)}}function Je(e,t){return{currentUrl:S(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 Ye(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Xe(e){return{get:t=>e.get(t)}}var Ze=[`POST`,`PUT`,`PATCH`,`DELETE`],Qe=new Set(Ze),$e=[`GET`,...Ze],et=new Set($e),tt=new Set([301,302,303,307,308]),nt=new Set([307,308]),rt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},it={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},at={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ot=`remix-router-transitions`,st=Symbol(`ResetLoaderData`),ct=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=R(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=R(e)}setHmrRoutes(e){this.#n=e,this.#r=R(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function lt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;_(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Ue(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new ct(P(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Et,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,y=e.hydrationData!=null,b=L(s.activeRoutes,e.history.location,c,!1,s.branches),S=!1,w=null,E,O;if(b==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Xt(s.activeRoutes);E=!0,O=!E,b=n,w={[r.id]:t}}else if(b&&!e.hydrationData&&Je(b,s.activeRoutes,e.history.location.pathname).active&&(b=null),!b){E=!1,O=!E,b=[];let t=Je(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(S=!0,b=t.matches)}else if(b.some(e=>e.route.lazy))E=!1,O=!E;else if(!b.some(e=>mt(e.route)))E=!0,O=!E;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=b;if(n){let e=b.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}O=!1,E=!0,r.forEach(e=>{let r=ht(e.route,t,n);O||=r.renderFallback,E&&=!r.shouldLoad})}let k,A={historyAction:e.history.action,location:e.history.location,matches:b,initialized:E,renderFallback:O,navigation:rt,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},j=`POP`,M=null,N=!1,F,I=!1,R=new Map,te=null,ne=!1,re=!1,ie=new Set,z=new Map,ae=0,oe=-1,se=new Map,B=new Set,ce=new Map,V=new Map,H=new Set,U=new Map,le,ue=null;function de(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(le){le(),le=void 0;return}v(U.size===0||r!=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 i=Y({currentLocation:A.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{le=e});e.history.go(r*-1),Be(i,{state:`blocked`,location:n,proceed(){Be(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(A.blockers);e.set(i,at),W({blockers:e})}}),M?.resolve(),M=null;return}return ye(t,n)}),n){yn(t,R);let e=()=>bn(t,R);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return A.initialized||ye(`POP`,A.location,{initialHydration:!0}),k}function fe(){d&&d(),te&&te(),f.clear(),F&&F.abort(),A.fetchers.forEach((e,t)=>Ne(A.fetchers,t)),A.blockers.forEach((e,t)=>ze(t))}function me(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(A,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function W(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),A={...A,...e};let n=[],r=[];A.fetchers.forEach((e,t)=>{e.state===`idle`&&(H.has(t)?n.push(t):r.push(t))}),H.forEach(e=>{!A.fetchers.has(e)&&!z.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(A,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ne(A.fetchers,e)),r.forEach(e=>A.fetchers.delete(e))}function ge(t,n,{flushSync:r}={}){let i=A.actionData!=null&&A.navigation.formMethod!=null&&Q(A.navigation.formMethod)&&A.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?A.actionData:null;let o=n.loaderData?qt(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,c=A.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,at)));let l=ne?!1:qe(t,n.matches||A.matches),u=N===!0||A.navigation.formMethod!=null&&Q(A.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||j===`POP`||(j===`PUSH`?e.history.push(t,t.state):j===`REPLACE`&&e.history.replace(t,t.state));let d;if(j===`POP`){let e=R.get(A.location.pathname);e&&e.has(t.pathname)?d={currentLocation:A.location,nextLocation:t}:R.has(t.pathname)&&(d={currentLocation:t,nextLocation:A.location})}else if(I){let e=R.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),R.set(A.location.pathname,e)),d={currentLocation:A.location,nextLocation:t}}W({...n,actionData:a,loaderData:o,historyAction:j,location:t,initialized:!0,renderFallback:!1,navigation:rt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),j=`POP`,N=!1,I=!1,ne=!1,re=!1,M?.resolve(),M=null,ue?.resolve(),ue=null}async function _e(t,n){if(M?.resolve(),M=null,typeof t==`number`){M||=xn();let n=M.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=ft(!1,dt(A.location,A.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?C(n.mask):{...A.location.mask,...n.mask}});let s=A.location,l=x(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Q(i.formMethod)&&i.formAction===A.location.pathname+A.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Y({currentLocation:s,nextLocation:l,historyAction:d});if(m){Be(m,{state:`blocked`,location:l,proceed(){Be(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),_e(t,n)},reset(){let e=new Map(A.blockers);e.set(m,at),W({blockers:e})}});return}await ye(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function ve(){ue||=xn(),ke(),W({revalidation:`loading`});let e=ue.promise;return A.navigation.state===`submitting`?e:A.navigation.state===`idle`?(ye(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),e):(ye(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:I===!0}),e)}async function ye(t,n,r){F&&F.abort(),F=null,j=t,ne=(r&&r.startUninterruptedRevalidation)===!0,Ke(A.location,A.matches),N=(r&&r.preventScrollReset)===!0,I=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&A.matches&&A.matches.length>0&&!S?A.matches:L(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&A.initialized&&!re&&$t(A.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){ge(n,{matches:a},{flushSync:o});return}let l=Je(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ve(n.pathname);ge(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;F=new AbortController;let d=Vt(e.history,n,F.signal,r&&r.submission),f=e.getContext?await e.getContext():new D,p;if(r&&r.pendingError)p=[Yt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(r.submission.formMethod)){let i=await be(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Z(t)&&Ae(t.error)&&t.error.status===404){F=null,ge(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=mn(n,a,t,r.submission),o=!1,l.active=!1,d=Vt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await xe(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(F=null,ge(n,{matches:h||a,...Jt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function be(t,n,i,l,u,d,f,p,m={}){if(ke(),W({navigation:hn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Ye(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ve(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=fn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:X(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await De(t,n,Mt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(an(h)){let n;return n=m&&m.replace!=null?m.replace:Bt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===A.location.pathname+A.location.search,await Ee(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=Yt(l,g.route.id);return(m&&m.replace)!==!0&&(j=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function xe(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||mn(n,i,l,p),x=p||m||pn(b),S=!ne&&!g;if(d){if(S){let e=G(v);W({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ye(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ve(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=pt(t,u,a,o,e.history,A,i,x,n,g?[]:r,g===!0,re,ie,H,ce,B,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(oe=++ae,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(A.fetchers),t=Ie(e);return ge(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...Jt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=G(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Se(T)),W(e,{flushSync:_})}T.forEach(e=>{J(e.key),e.controller&&z.set(e.key,e.controller)});let E=()=>T.forEach(e=>J(e.key));F&&F.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await Oe(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener(`abort`,E),T.forEach(e=>z.delete(e.key));let k=Zt(D);if(k)return await Ee(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=Zt(O),k)return B.add(k.key),await Ee(t,k.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(A.fetchers),{loaderData:M,errors:N}=Kt(A,i,D,v,T,O,j);g&&A.errors&&(N={...A.errors,...N});let P=Ie(j),I=Le(oe,j),L=P||I||T.length>0;return{matches:i,loaderData:M,errors:N,...L?{workingFetchers:j}:{}}}function G(e){if(e&&!Z(e[1]))return{[e[0]]:e[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Se(e){let t=new Map(A.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=gn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ce(t,n,r,i){J(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=dt(A.location,A.matches,c,r,n,i?.relative),u=L(o,l,c,!1,s.branches),d=Je(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){q(t,n,X(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=ft(!0,l,i);if(m){q(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new D,g=(i&&i.preventScrollReset)===!0;if(p&&Q(p.formMethod)){await we(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ce.set(t,{routeId:n,path:f}),await Te(t,n,f,u,h,d.active,a,g,p)}async function we(t,n,i,l,u,d,f,p,m,h){ke(),ce.delete(t),K(t,_n(m,A.fetchers.get(t)),{flushSync:f});let g=new AbortController,v=Vt(e.history,i,g.signal,m);if(d){let e=await Ye(l,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{q(t,n,X(404,{pathname:i}),{flushSync:f});return}}let y=fn(l,i);if(!y.route.action&&!y.route.lazy){q(t,n,X(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}z.set(t,g);let b=ae,x=Mt(a,o,v,i,l,y,r,u),S=await De(v,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){z.get(t)===g&&z.delete(t);return}if(H.has(t)){if(an(C)||Z(C)){K(t,vn(void 0));return}}else{if(an(C))if(z.delete(t),oe>b){K(t,vn(void 0));return}else return B.add(t),K(t,gn(m)),Ee(v,C,!1,{fetcherSubmission:m,preventScrollReset:p});if(Z(C)){q(t,n,C.error);return}}let w=A.navigation.location||A.location,T=Vt(e.history,w,g.signal),E=s.activeRoutes,D=A.navigation.state===`idle`?A.matches:L(E,A.navigation.location,c,!1,s.branches);_(D,`Didn't find any matches after fetcher action`);let O=++ae;se.set(t,O);let{dsMatches:k,revalidatingFetchers:M}=pt(T,u,a,o,e.history,A,D,m,w,r,!1,re,ie,H,ce,B,E,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],h),N=gn(m,C.data),P=new Map(A.fetchers);P.set(t,N),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=gn(void 0,n?n.data:void 0);P.set(t,r),J(t),e.controller&&z.set(t,e.controller)}),W({fetchers:P});let I=()=>M.forEach(e=>J(e.key));g.signal.addEventListener(`abort`,I);let{loaderResults:ee,fetcherResults:R}=await Oe(k,M,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,I),se.delete(t),z.delete(t),M.forEach(e=>z.delete(e.key));let te=A.fetchers.has(t),ne=e=>{if(!te)return e;let n=new Map(e.fetchers);return n.set(t,vn(C.data)),{...e,fetchers:n}},V=Zt(ee);if(V)return A=ne(A),Ee(T,V.result,!1,{preventScrollReset:p});if(V=Zt(R),V)return B.add(V.key),A=ne(A),Ee(T,V.result,!1,{preventScrollReset:p});let U=new Map(A.fetchers);te&&U.set(t,vn(C.data));let{loaderData:le,errors:ue}=Kt(A,D,ee,void 0,M,R,U);Le(O,U),A.navigation.state===`loading`&&O>oe?(_(j,`Expected pending action`),F&&F.abort(),ge(A.navigation.location,{matches:D,loaderData:le,errors:ue,fetchers:U})):(W({errors:ue,loaderData:qt(A.loaderData,le,D,ue),fetchers:U}),re=!1)}async function Te(t,n,i,s,c,l,u,d,f){let p=A.fetchers.get(t);K(t,gn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Vt(e.history,i,m.signal);if(l){let e=await Ye(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{q(t,n,X(404,{pathname:i}),{flushSync:u});return}}let g=fn(s,i);z.set(t,m);let _=ae,v=await De(h,i,Mt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(z.get(t)===m&&z.delete(t),!h.signal.aborted){if(H.has(t)){K(t,vn(void 0));return}if(an(y))if(oe>_){K(t,vn(void 0));return}else{B.add(t),await Ee(h,y,!1,{preventScrollReset:d});return}if(Z(y)){q(t,n,y.error);return}K(t,vn(y.data))}}async function Ee(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(M?.resolve(),M=null),i.response.headers.has(`X-Remix-Revalidate`)&&(re=!0);let d=i.response.headers.get(`Location`);_(d,`Expected a Location header on the redirect Response`),d=Bt(d,new URL(r.url),c,e.history);let f=x(A.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(he(d)){let n=T(t,d,!0);e=n.origin!==t.location.origin||pe(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}F=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=A.navigation;!o&&!s&&m&&h&&g&&(o=pn(A.navigation));let v=o||s;nt.has(i.response.status)&&v&&Q(v.formMethod)?await ye(p,f,{submission:{...v,formAction:d},preventScrollReset:l||N,enableViewTransition:a?I:void 0}):await ye(p,f,{overrideNavigation:mn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||N,enableViewTransition:a?I:void 0})}async function De(e,t,n,r,i){let a,o={};try{a=await Nt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Q(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!A.loaderData.hasOwnProperty(e.route.id)&&(!A.errors||!A.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(rn(r)){let i=r.result;o[t]={type:`redirect`,response:Lt(i,e,t,n,c)}}else o[t]=await It(r);return o}async function Oe(e,t,n,r,i){let a=De(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await De(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:X(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function ke(){re=!0,ce.forEach((e,t)=>{z.has(t)&&ie.add(t),J(t)})}function K(e,t,n={}){let r=new Map(A.fetchers);r.set(e,t),W({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function q(e,t,n,r={}){let i=Yt(A.matches,t),a=new Map(A.fetchers);Ne(a,e),W({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function je(e){return V.set(e,(V.get(e)||0)+1),H.has(e)&&H.delete(e),A.fetchers.get(e)||it}function Me(e,t){J(e,t?.reason),K(e,vn(null))}function Ne(e,t){let n=A.fetchers.get(t);z.has(t)&&!(n&&n.state===`loading`&&se.has(t))&&J(t),ce.delete(t),se.delete(t),B.delete(t),H.delete(t),ie.delete(t),e.delete(t)}function Pe(e){let t=(V.get(e)||0)-1;t<=0?(V.delete(e),H.add(e)):V.set(e,t),W({fetchers:new Map(A.fetchers)})}function J(e,t){let n=z.get(e);n&&(n.abort(t),z.delete(e))}function Fe(e,t){for(let n of e){let e=t.get(n);_(e,`Expected fetcher: ${n}`);let r=vn(e.data);t.set(n,r)}}function Ie(e){let t=[],n=!1;for(let r of B){let i=e.get(r);_(i,`Expected fetcher: ${r}`),i.state===`loading`&&(B.delete(r),t.push(r),n=!0)}return Fe(t,e),n}function Le(e,t){let n=[];for(let[r,i]of se)if(i<e){let e=t.get(r);_(e,`Expected fetcher: ${r}`),e.state===`loading`&&(J(r),se.delete(r),n.push(r))}return Fe(n,t),n.length>0}function Re(e,t){let n=A.blockers.get(e)||at;return U.get(e)!==t&&U.set(e,t),n}function ze(e){A.blockers.delete(e),U.delete(e)}function Be(e,t){let n=A.blockers.get(e)||at;_(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(A.blockers);r.set(e,t),W({blockers:r})}function Y({currentLocation:e,nextLocation:t,historyAction:n}){if(U.size===0)return;U.size>1&&v(!1,`A router only supports one blocker at a time`);let r=Array.from(U.entries()),[i,a]=r[r.length-1],o=A.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ve(e){let t=X(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Xt(n);return{notFoundMatches:r,route:i,error:t}}function He(e,t,n){if(m=e,g=t,h=n||null,!y&&A.navigation===rt){y=!0;let e=qe(A.location,A.matches);e!=null&&W({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ge(e,t){return h&&h(e,t.map(e=>ee(e,A.loaderData)))||e.key}function Ke(e,t){if(m&&g){let n=Ge(e,t);m[n]=g()}}function qe(e,t){if(m){let n=Ge(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Je(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:L(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:L(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Ye(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||yt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=L(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=L(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&Xe(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=L(s.activeRoutes,n,c,!0,u),!f||Xe(l,f))return{type:`success`,matches:null};l=f}}function Xe(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ze(e){o={},s.setHmrRoutes(P(e,a,void 0,o))}function Qe(e,t,n=!1){yt(e,t,s,o,a,n),s.hasHMRRoutes||W({})}return k={get basename(){return c},get future(){return u},get state(){return A},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:de,subscribe:me,enableScrollRestoration:He,navigate:_e,fetch:Ce,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:je,resetFetcher:Me,deleteFetcher:Pe,dispose:fe,getBlocker:Re,deleteBlocker:ze,patchRoutes:Qe,_internalFetchControllers:z,_internalSetRoutes:Ze,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){W(e)}},e.instrumentations&&(k=We(k,e.instrumentations.map(e=>e.router).filter(Boolean))),k}function ut(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function dt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=be(r||`.`,ye(o),pe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=dn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=me({basename:n,pathname:c.pathname})),S(c)}function ft(e,t,n){if(!n||!ut(n))return{path:t};if(n.formMethod&&!un(n.formMethod))return{path:t,error:X(405,{method:n.formMethod})};let r=()=>({path:t,error:X(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Qt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Q(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Q(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}_(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Ut(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Ut(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Wt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Wt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Q(c.formMethod))return{path:t,submission:c};let l=C(t);return e&&l.search&&dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:S(l),submission:c}}function pt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Z(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Z(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=q(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!mt(s))f=!1;else if(u){let{shouldLoad:e}=ht(s,a.loaderData,a.errors);f=e}else gt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return jt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?_t(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return jt(n,r,e,c,k,i,l,t,vt(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=L(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=fn(b,e.path),C=new AbortController,w=Vt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Mt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Mt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:D?!1:d;let a={...O,defaultShouldRevalidate:i};vt(S,a)&&(T=Mt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function mt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ht(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!mt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function gt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function _t(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function vt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function yt(e,t,n,r,i,a){let o;if(e){let t=r[e];_(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>bt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=P(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=P([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function bt(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((e,n)=>t.children?.some(t=>bt(e,t)))??!1:!1}var xt=new WeakMap,St=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(_(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=xt.get(i);o||(o={},xt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=k(e),n=i[e]!==void 0;if(t)v(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)v(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Ct=new WeakMap;function wt(e,t,n,r,i){let a=n[e.id];if(_(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ct.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{_(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=j(e),o=a[e]!==void 0;i?v(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?v(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Ct.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=St({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Tt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Et(e){return e.matches.some(e=>e.route.middleware)?Dt(e,()=>Tt(e)):Tt(e)}function Dt(e,t){return Ot(e,t,e=>{if(ln(e))throw e;return e},tn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[Yt(r,a).route.id]:{type:`error`,result:t}}}}}async function Ot(e,t,n,r,i){let{matches:a,...o}=e;return await kt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function kt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await kt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function At(e,t,n,r,i){let a=St({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=wt(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function jt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=At(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?vt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?vt(a,{...l,defaultShouldRevalidate:e}):vt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Q(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Q(n.method)||!p)?Pt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Mt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?jt(e,t,n,r,q(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:At(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Nt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Ht(t,n),pattern:q(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Dt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Pt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Q(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Ht(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw X(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw X(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ft(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 It(e){let{result:t,type:n}=e;if(sn(t)){let e;try{e=await Ft(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new K(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?on(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:en(t),statusCode:Ae(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ae(t)?t.status:void 0}:on(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 Lt(e,t,n,r,i){let a=e.headers.get(`Location`);if(_(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!he(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=dt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Rt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function zt(e){try{return Rt.includes(new URL(e).protocol)}catch{return!1}}function Bt(e,t,n,r){if(he(e)){let r=e,i=f.test(r)?new URL(p(r,t.protocol)):new URL(r);if(zt(i.toString()))throw Error(`Invalid redirect location`);let a=pe(i.pathname,n)!=null;if(i.origin===t.origin&&a)return xe(i.pathname)+i.search+i.hash}try{if(zt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Vt(e,t,n,r){let i=e.createURL(Qt(t)).toString(),a={signal:n};if(r&&Q(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Ut(r.formData):a.body=r.formData}return new Request(i,a)}function Ht(e,t){let n=new URL(e.url),r=typeof t==`string`?C(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}function Ut(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Wt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Gt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Z(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(_(!an(f),`Cannot handle redirect results in processLoaderData`),Z(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Yt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=st),c||(c=!0,s=Ae(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Kt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Gt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(_(s,`Did not find corresponding fetcher result`),Z(s)){let t=Yt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(an(s))_(!1,`Unhandled fetcher revalidation redirect`);else{let e=vn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==st).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Jt(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Yt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Xt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function X(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new K(e||500,o,Error(s),!0)}function Zt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(an(r))return{key:n,result:r}}}function Qt(e){return S({...typeof e==`string`?C(e):e,hash:``})}function $t(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function en(e){return new K(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function tn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&nn(t))}function nn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function rn(e){return sn(e.result)&&tt.has(e.result.status)}function Z(e){return e.type===`error`}function an(e){return(e&&e.type)===`redirect`}function on(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function cn(e){return tt.has(e)}function ln(e){return sn(e)&&cn(e.status)&&e.headers.has(`Location`)}function un(e){return et.has(e.toUpperCase())}function Q(e){return Qe.has(e.toUpperCase())}function dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function fn(e,t){let n=typeof t==`string`?C(t).search:t.search;if(e[e.length-1].route.index&&dn(n||``))return e[e.length-1];let r=ve(e);return r[r.length-1]}function pn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function mn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function gn(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 _n(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 vn(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 yn(e,t){try{let n=e.sessionStorage.getItem(ot);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function bn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ot,JSON.stringify(n))}catch(e){v(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function xn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Sn=`REACT_ROUTER_ERROR`,Cn=`REDIRECT`,wn=`ROUTE_ERROR_RESPONSE`;function Tn(e){if(e.startsWith(`${Sn}:${Cn}:{`))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 En(e){if(e.startsWith(`${Sn}:${wn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new K(t.status,t.statusText,t.data)}catch{}}function Dn(e,{relative:t}={}){_(On(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=E.useContext(ze),{hash:i,pathname:a,search:o}=In(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:G([n,a])),r.createHref({pathname:s,search:o,hash:i})}function On(){return E.useContext(Be)!=null}function kn(){return _(On(),`useLocation() may be used only in the context of a <Router> component.`),E.useContext(Be).location}var An=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function jn(){let{isDataRoute:e}=E.useContext(Y);return e?ar():Mn()}function Mn(){_(On(),`useNavigate() may be used only in the context of a <Router> component.`);let e=E.useContext(Ne),{basename:t,navigator:n}=E.useContext(ze),{matches:r}=E.useContext(Y),{pathname:i}=kn(),a=JSON.stringify(ye(r)),o=E.useRef(!1);return E.useLayoutEffect(()=>{o.current=!0}),E.useCallback((r,s={})=>{if(v(o.current,An),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=be(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:G([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Nn=E.createContext(null);function Pn(e){let t=E.useContext(Y).outlet;return E.useMemo(()=>t&&E.createElement(Nn.Provider,{value:e},t),[t,e])}function Fn(){let{matches:e}=E.useContext(Y);return e[e.length-1]?.params??{}}function In(e,{relative:t}={}){let{matches:n}=E.useContext(Y),{pathname:r}=kn(),i=JSON.stringify(ye(n));return E.useMemo(()=>be(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Ln(e,t,n){_(On(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=E.useContext(ze),{matches:i}=E.useContext(Y),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=kn(),l;if(t){let e=typeof t==`string`?C(t):t;_(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):I(e,{pathname:d}),p=Wn(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:G([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:G([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?E.createElement(Be.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Rn(){let e=nr(),t=Ae(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return E.createElement(E.Fragment,null,E.createElement(`h2`,null,`Unexpected Application Error!`),E.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?E.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var zn=E.createElement(Rn,null),Bn=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=J;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?t.error:e.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`){let t=En(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:E.createElement(Y.Provider,{value:this.props.routeContext},E.createElement(Ve.Provider,{value:e,children:this.props.component}));return this.context?E.createElement(Hn,{error:e},t):t}},Vn=new WeakMap;function Hn({children:e,error:t}){let{basename:n}=E.useContext(ze);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Tn(t.digest);if(e){let r=Vn.get(t);if(r)throw r;let i=Me(e.location,n),a=i.absoluteURL||i.to;if(zt(a))throw Error(`Invalid redirect location`);if(je&&!Vn.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Vn.set(t,n),n}return E.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Un({routeContext:e,match:t,children:n}){let r=E.useContext(Ne);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Y.Provider,{value:e},n)}function Wn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);_(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:q(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||zn,o&&(s<0&&c===0?(sr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?E.createElement(n.route.Component,null):n.route.element?n.route.element:e,E.createElement(Un,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?E.createElement(Bn,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Gn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kn(e){let t=E.useContext(Ne);return _(t,Gn(e)),t}function qn(e){let t=E.useContext(Pe);return _(t,Gn(e)),t}function Jn(e){let t=E.useContext(Y);return _(t,Gn(e)),t}function Yn(e){let t=Jn(e),n=t.matches[t.matches.length-1];return _(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xn(){return Yn(`useRouteId`)}function Zn(){let e=qn(`useNavigation`);return E.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Qn(){let{matches:e,loaderData:t}=qn(`useMatches`);return E.useMemo(()=>e.map(e=>ee(e,t)),[e,t])}function $n(){let e=qn(`useLoaderData`),t=Yn(`useLoaderData`);return e.loaderData[t]}function er(e){return qn(`useRouteLoaderData`).loaderData[e]}function tr(){let e=qn(`useActionData`),t=Yn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function nr(){let e=E.useContext(Ve),t=qn(`useRouteError`),n=Yn(`useRouteError`);return e===void 0?t.errors?.[n]:e}var rr=0;function ir(e){let{router:t,basename:n}=Kn(`useBlocker`),r=qn(`useBlocker`),[i,a]=E.useState(``),o=E.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:pe(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:pe(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return E.useEffect(()=>{let e=String(++rr);return a(e),()=>t.deleteBlocker(e)},[t]),E.useEffect(()=>{i!==``&&t.getBlocker(i,o)},[t,i,o]),i&&r.blockers.has(i)?r.blockers.get(i):at}function ar(){let{router:e}=Kn(`useNavigate`),t=Yn(`useNavigate`),n=E.useRef(!1);return E.useLayoutEffect(()=>{n.current=!0}),E.useCallback(async(r,i={})=>{v(n.current,An),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var or={};function sr(e,t,n){!t&&!or[e]&&(or[e]=!0,v(!1,n))}var cr={};function lr(e,t){!e&&!cr[t]&&(cr[t]=!0,console.warn(t))}function $(e,t){if(e===!1||e==null)throw Error(t)}var ur=`modulepreload`,dr=function(e){return`/`+e},fr={},pr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=dr(t,n),t=s(t),t in fr)return;fr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ur,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function mr(e,t){if(e.id in t)return t[e.id];try{let n=await pr(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hr(e,t,n){return Dr(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),wr(e,n))}function gr(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function _r(e){if(!e.css)return;let t=gr(e);await Promise.all(t.map(yr))}async function vr(e,t){if(!e.css&&!t.links||!kr())return;let n=[];if(e.css&&n.push(...gr(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!br(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(yr))}async function yr(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function br(e){return e!=null&&typeof e.page==`string`}function xr(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 Sr(e,t,n){return Dr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await mr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(xr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Cr(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function wr(e,t,{includeHydrateFallback:n}={}){return Tr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Tr(e){return[...new Set(e)]}function Er(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Dr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!br(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Er(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var Or;function kr(){if(Or!==void 0)return Or;let e=document.createElement(`link`);return Or=e.relList.supports(`preload`),e=null,Or}var Ar={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},jr=/[&><\u2028\u2029]/g;function Mr(e){return e.replace(jr,e=>Ar[e])}var Nr=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Pr(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(`
2
+ `);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}var Fr=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function Ir(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return Lr.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,Lr.call(this,r)}function Lr(e){let{hydrated:t,values:n,deferred:r,plugins:i}=this,a,o=[[e,e=>{a=e}]],s=[];for(;o.length>0;){let[e,a]=o.pop();switch(e){case-7:a(void 0);continue;case-5:a(null);continue;case-2:a(NaN);continue;case-6:a(1/0);continue;case-3:a(-1/0);continue;case-4:a(-0);continue}if(t[e]){a(t[e]);continue}let c=n[e];if(!c||typeof c!=`object`){t[e]=c,a(c);continue}if(Array.isArray(c))if(typeof c[0]==`string`){let[n,l,u]=c;switch(n){case`D`:a(t[e]=new Date(l));continue;case`U`:a(t[e]=new URL(l));continue;case`B`:a(t[e]=BigInt(l));continue;case`R`:a(t[e]=new RegExp(l,u));continue;case`Y`:a(t[e]=Symbol.for(l));continue;case`S`:let n=new Set;t[e]=n;for(let e=c.length-1;e>0;e--)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case`M`:let d=new Map;t[e]=d;for(let e=c.length-2;e>0;e-=2){let t=[];o.push([c[e+1],e=>{t[1]=e}]),o.push([c[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}a(d);continue;case`N`:let f=Object.create(null);t[e]=f;for(let e of Object.keys(l).reverse()){let t=[];o.push([l[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}a(f);continue;case`P`:if(t[l])a(t[e]=t[l]);else{let n=new Nr;r[l]=n,a(t[e]=n.promise)}continue;case`E`:let[,p,m]=c,h=m&&Fr&&ke.includes(m)&&m in Fr&&typeof Fr[m]==`function`?new Fr[m](p):Error(p);t[e]=h,a(h);continue;case`Z`:a(t[e]=t[l]);continue;default:if(Array.isArray(i)){let n=[],r=c.slice(1);for(let e=0;e<r.length;e++){let t=r[e];o.push([t,t=>{n[e]=t}])}s.push(()=>{for(let r of i){let i=r(c[0],...n);if(i){a(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<c.length;e++){let t=c[e];t!==-1&&o.push([t,t=>{n[e]=t}])}a(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(c).reverse()){let t=[];o.push([c[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{n[t[0]]=t[1]})}a(n);continue}}for(;s.length>0;)s.pop()();return a}async function Rr(e,t){let{plugins:n}=t??{},r=new Nr,i=e.pipeThrough(Pr()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await zr.call(a,i),s=r.promise;return o.done?r.resolve():s=Br.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function zr(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:Ir.call(this,n)}}async function Br(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case`P`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Ir.call(this,a);r.resolve(o);break}case`E`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Ir.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function Vr(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Hr=Symbol(`SingleFetchRedirect`),Ur=class extends Error{},Wr=new Set([100,101,204,205]);function Gr(e,t,n,r){let i=Kr(e,e=>{let n=t.routes[e.route.id];return $(n,`Route not found in manifest`),{hasLoader:n.hasLoader,hasClientLoader:n.hasClientLoader}},ei,r);return async e=>e.runClientMiddleware(i)}function Kr(e,t,n,r,i=()=>!0){return async a=>{let{request:o,matches:s,fetcherKey:c}=a,l=e();if(o.method!==`GET`)return qr(a,n);let u=s.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.shouldCallHandler()&&n&&!r});return!r&&!u?Jr(a,t,n):c?Zr(a,n):Yr(a,l,t,n,r,i)}}async function qr(e,t){let n=e.matches.find(e=>e.shouldCallHandler());$(n,`No action match found`);let r,i=await n.resolve(async i=>await i(async()=>{let{data:i,status:a}=await t(e,[n.route.id]);return r=a,ni(i,n.route.id)}));return sn(i.result)||Ae(i.result)||on(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:De(i.result,r)}}}async function Jr(e,t,n){let r=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(r.map(r=>r.resolve(async a=>{try{let{hasClientLoader:o}=t(r),s=r.route.id,c=o?await a(async()=>{let{data:t}=await n(e,[s]);return ni(t,s)}):await a();i[r.route.id]={type:`data`,result:c}}catch(e){i[r.route.id]={type:`error`,result:e}}}))),i}async function Yr(e,t,n,r,i,a=()=>!0){let o=new Set,s=!1,c=e.matches.map(()=>ri()),l=ri(),u={},d=Promise.all(e.matches.map(async(t,i)=>t.resolve(async d=>{c[i].resolve();let f=t.route.id,{hasLoader:p,hasClientLoader:m}=n(t),h=!t.shouldRevalidateArgs||t.shouldRevalidateArgs.actionStatus==null||t.shouldRevalidateArgs.actionStatus<400;if(!t.shouldCallHandler(h)){s||=t.shouldRevalidateArgs!=null&&p;return}if(a(t)&&m){p&&(s=!0);try{u[f]={type:`data`,result:await d(async()=>{let{data:t}=await r(e,[f]);return ni(t,f)})}}catch(e){u[f]={type:`error`,result:e}}return}p&&o.add(f);try{u[f]={type:`data`,result:await d(async()=>ni(await l.promise,f))}}catch(e){u[f]={type:`error`,result:e}}})));if(await Promise.all(c.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||o.size===0)&&!window.__reactRouterHdrActive)l.resolve({routes:{}});else{let t=i&&s&&o.size>0?[...o.keys()]:void 0;try{let n=await r(e,t);l.resolve(n.data)}catch(e){l.reject(e)}}return await d,await Xr(l.promise,e.matches,o,u),u}async function Xr(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof Ur&&(r[e].result=i)})}catch{}}async function Zr(e,t){let n=e.matches.find(e=>e.shouldCallHandler());$(n,`No fetcher match found`);let r=n.route.id,i=await n.resolve(async n=>n(async()=>{let{data:n}=await t(e,[r]);return ni(n,r)}));return{[n.route.id]:i}}function Qr(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function $r(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function ei(e,t){let{request:n}=e,r=$r(n.url,`data`);n.method===`GET`&&(r=Qr(r),t&&r.searchParams.set(`_routes`,t.join(`,`)));let i=await fetch(r,await Vr(n));if(i.status>=400&&!i.headers.has(`X-Remix-Response`))throw new K(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has(`X-Remix-Redirect`))return{status:202,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(Wr.has(i.status)){let e={};return t&&n.method!==`GET`&&(e[t[0]]={data:void 0}),{status:i.status,data:{routes:e}}}$(i.body,`No response body to decode`);try{let e=await ti(i.body,window),r;if(n.method===`GET`){let t=e.value;r=Hr in t?{redirect:t[Hr]}:{routes:t}}else{let n=e.value,i=t?.[0];$(i,`No routeId found for single fetch call decoding`),r=`redirect`in n?{redirect:n}:{routes:{[i]:n}}}return{status:i.status,data:r}}catch{throw Error(`Unable to decode turbo-stream response`)}}function ti(e,t){return Rr(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,i]=n,a=Error;e&&ke.includes(e)&&e in t&&typeof t[e]==`function`&&(a=t[e]);let o=new a(r);return o.stack=i,{value:o}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new K(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[Hr]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function ni(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:a}=e.redirect;throw Oe(t,{status:a,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new Ur(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function ri(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ii=class extends E.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||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?E.createElement(ai,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function ai({error:e,isOutsideRemixApp:t}){let{nonce:n}=Fi();console.error(e);let r=E.createElement(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:`
3
+ console.log(
4
+ "💿 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."
5
+ );
6
+ `}});if(Ae(e))return E.createElement(oi,{title:`Unhandled Thrown Response!`},E.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),null);let i;if(e instanceof Error)i=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);i=Error(t)}return E.createElement(oi,{title:`Application Error!`,isOutsideRemixApp:t},E.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),E.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},i.stack),r)}function oi({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=Fi();return i.root?.Layout&&!n?r:E.createElement(`html`,{lang:`en`},E.createElement(`head`,null,E.createElement(`meta`,{charSet:`utf-8`}),E.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),E.createElement(`title`,null,e)),E.createElement(`body`,null,E.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?E.createElement(Yi,null):null)))}function si(){let{nonce:e}=Fi();return E.createElement(oi,{title:`Loading...`,renderScripts:!0},null)}function ci(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function li(e,t,n){let r=_i(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?si:void 0,a=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>E.createElement(ai,{error:nr()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:E.createElement(t.Layout,null,E.createElement(r,null))}:{Component:r},...a?{errorElement:E.createElement(t.Layout,null,E.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:E.createElement(t.Layout,null,E.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function ui(e,t,n,r,i,a){return pi(t,n,r,i,a,``,ci(t),e)}function di(e,t){if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction){let n=`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(n),new K(400,`Bad Request`,Error(n),!0)}}function fi(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new K(405,`Method Not Allowed`,Error(r),!0)}function pi(e,t,n,r,i,a=``,o=ci(e),s){return(o[a]||[]).map(a=>{let c=t[a.id];function l(e){return $(typeof e==`function`,`No single fetch function available for route handler`),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function d(e){if(!a.hasAction)throw fi(`action`,a.id);return l(e)}function f(e){pr(()=>import(e),[])}function p(e){e.clientActionModule&&f(e.clientActionModule),e.clientLoaderModule&&f(e.clientLoaderModule)}async function m(e){let n=t[a.id],r=n?vr(a,n):Promise.resolve();try{return e()}finally{await r}}let h={id:a.id,index:a.index,path:a.path};if(c){Object.assign(h,{...h,...li(a,c,i),middleware:c.clientMiddleware,handle:c.handle,shouldRevalidate:mi(h.path,c,a,r,s)});let e=n&&n.loaderData&&a.id in n.loaderData,t=e?n?.loaderData?.[a.id]:void 0,o=n&&n.errors&&a.id in n.errors,l=o?n?.errors?.[a.id]:void 0,f=s==null&&(c.clientLoader?.hydrate===!0||!a.hasLoader);h.loader=async({request:n,params:r,context:i,pattern:s,url:d},p)=>{let h=f;return f=!1,await m(async()=>($(c,"No `routeModule` available for critical-route loader"),c.clientLoader?c.clientLoader({request:n,params:r,context:i,pattern:s,url:d,async serverLoader(){if(di(`loader`,a),h){if(e)return t;if(o)throw l}return u(p)}}):u(p)))},h.loader.hydrate=vi(a.id,c.clientLoader,a.hasLoader,i),h.action=({request:e,params:t,context:n,pattern:r,url:o},s)=>m(async()=>{if($(c,"No `routeModule` available for critical-route action"),!c.clientAction){if(i)throw fi(`clientAction`,a.id);return d(s)}return c.clientAction({request:e,params:t,context:n,pattern:r,url:o,async serverAction(){return di(`action`,a),d(s)}})})}else{a.hasClientLoader||(h.loader=(e,t)=>m(()=>u(t))),a.hasClientAction||(h.action=(e,t)=>m(()=>{if(i)throw fi(`clientAction`,a.id);return d(t)}));let e;async function n(){return e||=(async()=>{(a.clientLoaderModule||a.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=gi(a,t);return p(a),await e})(),await e}h.lazy={loader:a.hasClientLoader?async()=>{let{clientLoader:e}=a.clientLoaderModule?await pr(()=>import(a.clientLoaderModule),[]):await n();return $(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return di(`loader`,a),u(n)}})}:void 0,action:a.hasClientAction?async()=>{let e=a.clientActionModule?pr(()=>import(a.clientActionModule),[]):n();p(a);let{clientAction:t}=await e;return $(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return di(`action`,a),d(n)}})}:void 0,middleware:a.hasClientMiddleware?async()=>{let{clientMiddleware:e}=a.clientMiddlewareModule?await pr(()=>import(a.clientMiddlewareModule),[]):await n();return $(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await n();return mi(h.path,e,a,r,s)},handle:async()=>(await n()).handle,Component:async()=>(await n()).Component,ErrorBoundary:a.hasErrorBoundary?async()=>(await n()).ErrorBoundary:void 0}}let g=pi(e,t,n,r,i,a.id,o,s);return g.length>0&&(h.children=g),h})}function mi(e,t,n,r,i){if(i)return hi(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?de(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}return t.shouldRevalidate}function hi(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function gi(e,t){let n=mr(e,t),r=_r(e),i=await n;return await Promise.all([r,vr(e,i)]),{Component:_i(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function _i(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function vi(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var yi=new Set,bi=1e3,xi=new Set;function Si(e){let t=new Set;return e.forEach(e=>{e.startsWith(`/`)||(e=`/${e}`);for(let n=1;n<e.length;n++)e[n]===`/`&&t.add(e.slice(0,n));t.add(e)}),Array.from(t)}function Ci(e,t){return e.mode===`lazy`&&t===!0}function wi({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=L(n.routes,e,n.basename||`/`,!1,n.branches);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function Ti(e,t,n,r,i,a,o){if(Ci(i,r))return async({path:s,patch:c,signal:l,fetcherKey:u})=>{if(xi.has(s))return;let{state:d}=e();await ki([s],u?window.location.href:S(d.navigation.location||d.location),t,n,r,a,o,i.manifestPath,c,l)}}function Ei(e,t,n,r,i,a){E.useEffect(()=>{if(!Ci(i,r)||window.navigator?.connection?.saveData===!0)return;function o(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;xi.has(n)||yi.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(o);let s=Array.from(yi.keys()).filter(e=>xi.has(e)?(yi.delete(e),!1):!0);if(s.length!==0)try{await ki(s,null,t,n,r,a,e.basename,i.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}let c=ji(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,a,t,n,e,i])}function Di(e,t){let n=e||`/__manifest`;return t==null?n:G([t,n])}var Oi=`react-router-manifest-version`;async function ki(e,t,n,r,i,a,o,s,c,l){e=Si(e);let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(Di(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>7680){yi.clear();return}let f;try{let e=await fetch(d,{signal:l});if(!e.ok)throw Error(`${e.status} ${e.statusText}`);if(e.status===204&&e.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(Oi)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}sessionStorage.setItem(Oi,n.version)}catch{}window.location.href=t,console.warn(`Detected manifest version mismatch, reloading...`),await new Promise(()=>{})}else if(e.status>=400)throw Error(await e.text());try{sessionStorage.removeItem(Oi)}catch{}f=await e.json()}catch(e){if(l?.aborted)return;throw e}let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>Ai(e,xi));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,pi(m,r,null,i,a,e)))}function Ai(e,t){if(t.size>=bi){let e=t.values().next().value;e!==void 0&&t.delete(e)}t.add(e)}function ji(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Mi(){let e=E.useContext(Ne);return $(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ni(){let e=E.useContext(Pe);return $(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Pi=E.createContext(void 0);Pi.displayName=`FrameworkContext`;function Fi(){let e=E.useContext(Pi);return $(e,`You must render this element inside a <HydratedRouter> element`),e}function Ii(e,t){let n=E.useContext(Pi),[r,i]=E.useState(!1),[a,o]=E.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=E.useRef(null);E.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),E.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Li(s,p),onBlur:Li(c,m),onMouseEnter:Li(l,p),onMouseLeave:Li(u,m),onTouchStart:Li(d,p)}]:[a,f,{}]:[!1,f,{}]}function Li(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ri(e,t,n){if(n&&!qi)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var zi=`data-react-router-critical-css`;function Bi({nonce:e,crossOrigin:t}){let{isSpaMode:n,manifest:r,routeModules:i,criticalCss:a,nonce:o}=Fi(),{errors:s,matches:c}=Ni(),l=Ri(c,s,n),u=E.useMemo(()=>hr(l,i,r),[l,i,r]);return e==null&&o&&(e=o),E.createElement(E.Fragment,null,typeof a==`string`?E.createElement(`style`,{[zi]:``,nonce:e,dangerouslySetInnerHTML:{__html:a}}):null,typeof a==`object`?E.createElement(`link`,{[zi]:``,rel:`stylesheet`,href:a.href,nonce:e,crossOrigin:t}):null,u.map(({key:n,link:r})=>br(r)?E.createElement(Vi,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t}):E.createElement(`link`,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t})))}function Vi({page:e,...t}){let n=Fe(),{nonce:r}=Fi(),{router:i}=Mi(),a=E.useMemo(()=>I(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?E.createElement(Ui,{page:e,matches:a,...t}):E.createElement(Wi,{page:e,matches:a,...t})):null}function Hi(e){let{manifest:t,routeModules:n}=Fi(),[r,i]=E.useState([]);return E.useEffect(()=>{let r=!1;return Sr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ui({page:e,matches:t,...n}){let r=kn(),i=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=$r(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return E.createElement(E.Fragment,null,i.map(e=>E.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Wi({page:e,matches:t,...n}){let r=kn(),{manifest:i,routeModules:a}=Fi(),{loaderData:o,matches:s}=Ni(),c=E.useMemo(()=>Cr(e,t,s,i,r,`data`),[e,t,s,i,r]),l=E.useMemo(()=>Cr(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=$r(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=E.useMemo(()=>wr(l,i),[l,i]),f=Hi(l);return E.createElement(E.Fragment,null,u.map(e=>E.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>E.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>E.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Gi(){let{isSpaMode:e,routeModules:t}=Fi(),{errors:n,matches:r,loaderData:i}=Ni(),a=kn(),o=Ri(r,n,e),s=null;n&&(s=n[o[o.length-1].route.id]);let c=[],l=null,u=[];for(let e=0;e<o.length;e++){let n=o[e],r=n.route.id,d=i[r],f=n.params,p=t[r],m=[],h={id:r,loaderData:d,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:s};if(u[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({loaderData:d,params:f,location:a,matches:u,error:s}):Array.isArray(p.meta)?[...p.meta]:p.meta:l&&(m=[...l]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
7
+
8
+ To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);h.meta=m,u[e]=h,c=[...m],l=c}return E.createElement(E.Fragment,null,c.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!Ki(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return E.createElement(r,{key:JSON.stringify(n),...n})}if(`title`in e)return E.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?E.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return E.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:Mr(t)}})}catch{return null}return E.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function Ki(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var qi=!1;function Ji(){qi=!0}function Yi(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:o,nonce:s}=Fi(),{router:c,static:l,staticContext:u}=Mi(),{matches:d}=Ni(),f=Fe(),p=Ci(a,o);e.nonce==null&&s&&(e={...e,nonce:s}),i&&(i.didRenderScripts=!0);let m=Ri(d,null,r);E.useEffect(()=>{Ji()},[]);let h=E.useMemo(()=>{if(f)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,i=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${p?``:`import ${JSON.stringify(t.url)}`};
9
+ ${m.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];$(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(`
10
+ `),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(`
11
+ `)}).join(`
12
+ `)}
13
+ ${p?`window.__reactRouterManifest = ${JSON.stringify(wi(t,c),null,2)};`:``}
14
+ window.__reactRouterRouteModules = {${m.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
15
+
16
+ import(${JSON.stringify(t.entry.module)});`:` `;return E.createElement(E.Fragment,null,E.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),E.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),g=qi||f?[]:[...new Set(t.entry.imports.concat(wr(m,t,{includeHydrateFallback:!0})))],_=typeof t.sri==`object`?t.sri:{};return lr(!f,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),qi||f?null:E.createElement(E.Fragment,null,typeof t.sri==`object`?E.createElement(`script`,{...e,"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:_})}}):null,p?null:E.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:_[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),E.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:_[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),g.map(t=>E.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:_[t],nonce:e.nonce,suppressHydrationWarning:!0})),h)}function Xi(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Zi=[`HydrateFallback`,`hydrateFallbackElement`],Qi=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function $i({router:e,flushSync:t,onError:n,useTransitions:r}){r=Fe()||r;let[i,a]=E.useState(e.state),[o,s]=(0,E.useOptimistic)(i),[c,l]=E.useState(),[u,d]=E.useState({isTransitioning:!1}),[f,p]=E.useState(),[m,h]=E.useState(),[g,_]=E.useState(),v=E.useRef(new Map),y=E.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:q(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),lr(u===!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 y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(lr(g==null||y,"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."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):E.startTransition(()=>{r===!0&&s(e=>ea(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);E.useLayoutEffect(()=>e.subscribe(y),[e,y]),E.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Qi)},[u]),E.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):E.startTransition(()=>{r===!0&&s(e=>ea(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),E.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),E.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=E.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return E.createElement(E.Fragment,null,E.createElement(Ne.Provider,{value:S},E.createElement(Pe.Provider,{value:o},E.createElement(Le.Provider,{value:v.current},E.createElement(Ie.Provider,{value:u},E.createElement(ia,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},E.createElement(ta,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function ea(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var ta=E.memo(na);function na({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ln(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ra(e){return Pn(e.context)}function ia({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){_(!On(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=E.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=C(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=E.useMemo(()=>{let e=pe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return v(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:E.createElement(ze.Provider,{value:c},E.createElement(Be.Provider,{children:t,value:h}))}E.Component;function aa(){return{params:Fn(),loaderData:$n(),actionData:tr(),matches:Qn()}}function oa(e){return function(){let t=aa();return E.createElement(e,t)}}function sa(){return{params:Fn(),loaderData:$n(),actionData:tr(),error:nr()}}function ca(e){return function(){let t=sa();return E.createElement(e,t)}}var la=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ua=o(((e,t)=>{t.exports=la()}));export{v as $,Zn as A,Y as B,Mr as C,kn as D,Dn as E,lt as F,le as G,N as H,Ne as I,be as J,I as K,Pe as L,Xn as M,er as N,Qn as O,it as P,_ as Q,Le as R,Gr as S,ir as T,Ae as U,Ie as V,G as W,g as X,pe as Y,S as Z,pi as _,Zi as a,ii as b,Pi as c,Vi as d,d as et,Yi as f,Ei as g,Ti as h,$i as i,In as j,jn as k,Bi as l,Ii as m,ra as n,o as nt,oa as o,Xi as p,Me as q,ia as r,c as rt,ca as s,ua as t,u as tt,Gi as u,ui as v,tr as w,ti as x,vi as y,ze as z};
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-CqyjuPDB.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-qxoeL6W3.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js"],"css":["/assets/root-B0MB8jZH.css"]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/_index-DqpFaaQw.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/jobs":{"id":"routes/jobs","parentId":"root","path":"jobs","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/jobs-CAd_qqLH.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/check-7jwc5sb1.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/x-AhXI_F1j.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/queues._index":{"id":"routes/queues._index","parentId":"root","path":"queues","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._index-8YriSqbQ.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/filter-select-Bn_oSiip.js"],"css":[]},"routes/queues.create":{"id":"routes/queues.create","parentId":"root","path":"queues/create","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues.create-DsY0Sc19.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/chevron-down-BFFjfYD4.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js","/assets/createLucideIcon-C-LI4enx.js"],"css":[]},"routes/queues.$name":{"id":"routes/queues.$name","parentId":"root","path":"queues/:name","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name-Cb17IB2u.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/dialog-D-oczDM2.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/x-AhXI_F1j.js"],"css":[]},"routes/queues.$name.jobs.$jobId":{"id":"routes/queues.$name.jobs.$jobId","parentId":"root","path":"queues/:name/jobs/:jobId","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name.jobs._jobId-Bkv8POBj.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/check-7jwc5sb1.js","/assets/dialog-D-oczDM2.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/error-card-BH7i86fH.js","/assets/x-AhXI_F1j.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/schedules":{"id":"routes/schedules","parentId":"root","path":"schedules","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules-iYfIJxOD.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js"],"css":[]},"routes/schedules.$name.$key":{"id":"routes/schedules.$name.$key","parentId":"root","path":"schedules/:name/:key","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules._name._key-CJVu73XY.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/dialog-D-oczDM2.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js","/assets/x-AhXI_F1j.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/createLucideIcon-C-LI4enx.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/schedules.new":{"id":"routes/schedules.new","parentId":"root","path":"schedules/new","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules.new-Cq0Mxa7G.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/send":{"id":"routes/send","parentId":"root","path":"send","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/send-8X9ZisG-.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/migrations":{"id":"routes/migrations","parentId":"root","path":"migrations","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/migrations-D5l0n4Jn.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js"],"css":[]},"routes/warnings":{"id":"routes/warnings","parentId":"root","path":"warnings","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/warnings-C1R_RzIe.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js"],"css":[]}},"url":"/assets/manifest-27e8e133.js","version":"27e8e133"};
@@ -0,0 +1 @@
1
+ import{o as e,s as t,t as n}from"./jsx-runtime-RQyiN6Nr.js";import{M as r,a as i,g as a,i as o,o as s,s as c}from"./db-link-BajQ1v8I.js";import{t as l}from"./stat-card-dyg1wY5p.js";import{a as u,i as d,n as f,r as p}from"./button-9NpSS9Ow.js";import{n as m,t as h}from"./badge-CMnQO7Lq.js";import{a as g,i as _,n as v,o as y,r as b,t as x}from"./table-Cz7ujmH_.js";import{t as S}from"./error-card-BH7i86fH.js";import{t as C}from"./pagination-C-ohiBmY.js";import{t as w}from"./filter-select-Bn_oSiip.js";var T=n(),E={pending:`warning`,in_progress:`primary`,completed:`success`,failed:`error`},D=t(function(){return(0,T.jsx)(S,{title:`Failed to load migrations`,backTo:{href:`/`,label:`Back to Dashboard`}})}),O=e(function({loaderData:e}){let{entries:t,summary:n,statusFilter:a,page:S,totalPages:D}=e,[O,j]=r(),M=A(n),N=(e,t)=>{let n=new URLSearchParams(O);t?n.set(e,t):n.delete(e),n.delete(`page`),j(n)};return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsx)(m,{title:`Migrations`,subtitle:`Background async migrations (BAM) — schema changes such as concurrent index builds that run outside the install transaction`}),(0,T.jsx)(`div`,{className:`grid grid-cols-2 gap-4 lg:grid-cols-4`,children:o.map(e=>(0,T.jsx)(l,{label:i[e],value:M[e].toLocaleString(),accent:M[e]>0?E[e]:`neutral`},e))}),(0,T.jsxs)(f,{children:[(0,T.jsxs)(d,{children:[(0,T.jsx)(u,{children:`Migration commands`}),(0,T.jsx)(w,{value:a,options:s,onChange:e=>N(`status`,e)})]}),(0,T.jsx)(p,{className:`p-0`,children:(0,T.jsxs)(x,{children:[(0,T.jsx)(g,{children:(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:`Name`}),(0,T.jsx)(_,{className:`text-right`,children:`Ver`}),(0,T.jsx)(_,{children:`Status`}),(0,T.jsx)(_,{children:`Table`}),(0,T.jsx)(_,{children:`Created`}),(0,T.jsx)(_,{children:`Started`}),(0,T.jsx)(_,{children:`Completed`}),(0,T.jsx)(_,{children:`Command / Error`})]})}),(0,T.jsx)(v,{children:t.length===0?(0,T.jsx)(y,{children:(0,T.jsx)(b,{className:`text-center text-[var(--text-tertiary)] py-8`,colSpan:8,children:a?`No ${i[a].toLowerCase()} migrations found`:`No async migrations recorded.`})}):t.map(e=>(0,T.jsxs)(y,{children:[(0,T.jsx)(b,{className:`text-[var(--text-primary)] font-medium`,children:e.name}),(0,T.jsx)(b,{className:`text-right pgb-num text-[var(--text-tertiary)]`,children:e.version}),(0,T.jsx)(b,{children:(0,T.jsx)(h,{variant:c[e.status],size:`sm`,dot:!0,children:i[e.status]})}),(0,T.jsxs)(b,{className:`font-mono text-xs text-[var(--text-secondary)] whitespace-nowrap`,children:[e.table,e.queue?(0,T.jsxs)(`span`,{className:`text-[var(--text-tertiary)]`,children:[` · `,e.queue]}):null]}),(0,T.jsx)(b,{className:`pgb-num text-[var(--text-tertiary)] whitespace-nowrap`,children:k(e.createdOn)}),(0,T.jsx)(b,{className:`pgb-num text-[var(--text-tertiary)] whitespace-nowrap`,children:k(e.startedOn)}),(0,T.jsx)(b,{className:`pgb-num text-[var(--text-tertiary)] whitespace-nowrap`,children:k(e.completedOn)}),(0,T.jsxs)(b,{className:`max-w-md`,children:[e.error?(0,T.jsx)(`p`,{className:`mb-1 font-mono text-xs text-[var(--error-600)] break-words whitespace-pre-wrap`,children:e.error}):null,(0,T.jsxs)(`details`,{children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-xs text-[var(--text-tertiary)] select-none`,children:`View command`}),(0,T.jsx)(`pre`,{className:`mt-1 overflow-x-auto rounded bg-[var(--surface-sunken)] p-2 font-mono text-xs text-[var(--text-secondary)] whitespace-pre-wrap`,children:e.command})]})]})]},e.id))})]})}),(0,T.jsx)(C,{page:S,totalPages:D,hasNextPage:S<D,hasPrevPage:S>1,onPageChange:e=>{let t=new URLSearchParams(O);t.set(`page`,e.toString()),j(t)}})]})]})});function k(e){return e?a(new Date(e)):`—`}function A(e){let t={pending:0,in_progress:0,completed:0,failed:0};for(let n of e)n.status in t&&(t[n.status]+=n.count);return t}export{D as ErrorBoundary,O as default};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-DcdjQ3vN.js";import{u as t}from"./db-link-DISwKBYZ.js";import{t as n}from"./button-CafwM-5D.js";var r=e();function i({page:e,totalPages:i,hasNextPage:a,hasPrevPage:o,onPageChange:s}){return!o&&!a?null:(0,r.jsxs)(`div`,{className:t(`flex items-center justify-between px-6 py-4 border-t`,`border-gray-200 dark:border-gray-800`),children:[(0,r.jsxs)(`div`,{className:`text-sm text-gray-500 dark:text-gray-400`,children:[`Page `,e,i!=null&&` of ${i}`]}),(0,r.jsxs)(`div`,{className:`flex gap-2`,children:[(0,r.jsx)(n,{variant:`outline`,size:`sm`,onClick:()=>s(e-1),disabled:!o,children:`Previous`}),(0,r.jsx)(n,{variant:`outline`,size:`sm`,onClick:()=>s(e+1),disabled:!a,children:`Next`})]})]})}export{i as t};
1
+ import{t as e}from"./jsx-runtime-RQyiN6Nr.js";import{m as t}from"./db-link-BajQ1v8I.js";import{t as n}from"./button-9NpSS9Ow.js";var r=e();function i({page:e,totalPages:i,hasNextPage:a,hasPrevPage:o,onPageChange:s}){return!o&&!a?null:(0,r.jsxs)(`div`,{className:t(`flex items-center justify-between px-6 py-4 border-t`,`border-gray-200 dark:border-gray-800`),children:[(0,r.jsxs)(`div`,{className:`text-sm text-gray-500 dark:text-gray-400`,children:[`Page `,e,i!=null&&` of ${i}`]}),(0,r.jsxs)(`div`,{className:`flex gap-2`,children:[(0,r.jsx)(n,{variant:`outline`,size:`sm`,onClick:()=>s(e-1),disabled:!o,children:`Previous`}),(0,r.jsx)(n,{variant:`outline`,size:`sm`,onClick:()=>s(e+1),disabled:!a,children:`Next`})]})]})}export{i as t};
@@ -0,0 +1 @@
1
+ import{o as e,rt as t,s as n,t as r,tt as i}from"./jsx-runtime-RQyiN6Nr.js";import{M as a,m as o,t as s}from"./db-link-BajQ1v8I.js";import{n as c,r as l,t as u}from"./button-9NpSS9Ow.js";import{n as d,t as f}from"./badge-CMnQO7Lq.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./table-Cz7ujmH_.js";import{t as y}from"./filter-select-Bn_oSiip.js";var b=t(i(),1),x=r(),S=n(function(){return(0,x.jsx)(`div`,{className:`p-6`,children:(0,x.jsx)(c,{children:(0,x.jsxs)(l,{className:`py-8 text-center`,children:[(0,x.jsx)(`p`,{className:`text-red-600 dark:text-red-400 font-medium`,children:`Failed to load queues`}),(0,x.jsx)(`p`,{className:`text-gray-500 dark:text-gray-400 text-sm mt-1`,children:`Please check your database connection and try again.`}),(0,x.jsx)(s,{to:`/`,className:`inline-block mt-4 text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:`Back to Dashboard`})]})})})}),C=e(function({loaderData:e}){let{queues:t,totalCount:n,page:r,totalPages:i,hasNextPage:S,hasPrevPage:C,filter:E,search:D}=e,[O,k]=a(),[A,j]=(0,b.useState)(D);(0,b.useEffect)(()=>{j(D)},[D]);let M=e=>{let t=new URLSearchParams(O);t.set(`page`,e.toString()),k(t)},N=e=>{let t=new URLSearchParams(O);e.trim()?t.set(`search`,e.trim()):t.delete(`search`),t.delete(`page`),k(t)},P=e=>{let t=new URLSearchParams(O);e===`all`?t.delete(`filter`):t.set(`filter`,e),t.delete(`page`),k(t)},F=()=>{k({}),j(``)},I=E!==`all`||D;return(0,x.jsxs)(`div`,{className:`space-y-4`,children:[(0,x.jsx)(d,{title:`Queues`,subtitle:`${n.toLocaleString()} queue${n===1?``:`s`} ${I?`found`:`configured`}`,action:(0,x.jsx)(s,{to:`/queues/create`,children:(0,x.jsx)(u,{variant:`primary`,size:`md`,children:`Create Queue`})})}),(0,x.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3`,children:[(0,x.jsx)(`div`,{className:`flex-1`,children:(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`input`,{type:`text`,placeholder:`Search queues by name...`,value:A,onChange:e=>j(e.target.value),onKeyDown:e=>{e.key===`Enter`&&N(A)},className:o(`w-full h-[38px] px-3 py-2 pl-10 rounded-lg border shadow-sm text-sm`,`bg-[var(--surface-card)] border-[var(--border-strong)] text-[var(--text-primary)] placeholder-[var(--text-tertiary)]`,`focus:outline-none focus:border-[var(--border-focus)] focus:shadow-[var(--shadow-focus)]`)}),(0,x.jsx)(w,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-[18px] w-[18px] text-[var(--text-tertiary)]`}),A&&(0,x.jsx)(`button`,{onClick:()=>{j(``),N(``)},className:`absolute right-3 top-1/2 -translate-y-1/2 text-[var(--text-tertiary)] hover:text-[var(--text-secondary)] cursor-pointer`,children:(0,x.jsx)(T,{className:`h-[18px] w-[18px]`})})]})}),(0,x.jsx)(y,{value:E,options:[{value:`all`,label:`All Queues`},{value:`attention`,label:`Needing Attention`},{value:`partitioned`,label:`Partitioned`}],onChange:e=>P(e)})]}),I&&(0,x.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,x.jsx)(`span`,{className:`text-sm text-gray-500 dark:text-gray-400`,children:`Active filters:`}),E!==`all`&&(0,x.jsxs)(f,{variant:`primary`,size:`sm`,children:[{all:`All Queues`,attention:`Needing Attention`,partitioned:`Partitioned`}[E],(0,x.jsx)(`button`,{onClick:()=>P(`all`),className:`ml-1 hover:text-primary-700 cursor-pointer`,children:`×`})]}),D&&(0,x.jsxs)(f,{variant:`primary`,size:`sm`,children:[`Search: `,D,(0,x.jsx)(`button`,{onClick:()=>N(``),className:`ml-1 hover:text-primary-700 cursor-pointer`,children:`×`})]}),(0,x.jsx)(`button`,{onClick:F,className:`text-sm text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 cursor-pointer`,children:`Clear all`})]}),(0,x.jsxs)(c,{children:[(0,x.jsx)(l,{className:`p-0`,children:(0,x.jsxs)(v,{children:[(0,x.jsx)(p,{children:(0,x.jsxs)(g,{children:[(0,x.jsx)(m,{children:`Name`}),(0,x.jsx)(m,{children:`Policy`}),(0,x.jsx)(m,{children:`Storage`}),(0,x.jsx)(m,{className:`text-right`,children:`Queued`}),(0,x.jsx)(m,{className:`text-right`,children:`Deferred`}),(0,x.jsx)(m,{className:`text-right`,children:`Ready`}),(0,x.jsx)(m,{className:`text-right`,children:`Active`}),(0,x.jsx)(m,{className:`text-right`,children:`Failed`}),(0,x.jsx)(m,{className:`text-right`,children:`Total`}),(0,x.jsx)(m,{children:`Dead Letter`}),(0,x.jsx)(m,{children:`Status`})]})}),(0,x.jsx)(h,{children:t.length===0?(0,x.jsx)(g,{children:(0,x.jsx)(_,{className:`text-center text-[var(--text-tertiary)] py-8`,colSpan:11,children:`No queues found`})}):t.map(e=>{let t=(e.warningQueueSize??0)>0&&e.queuedCount>(e.warningQueueSize??0);return(0,x.jsxs)(g,{children:[(0,x.jsx)(_,{children:(0,x.jsx)(s,{to:`/queues/${encodeURIComponent(e.name)}`,className:`font-medium text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:e.name})}),(0,x.jsx)(_,{children:(0,x.jsx)(f,{variant:`gray`,size:`sm`,children:e.policy})}),(0,x.jsx)(_,{className:`text-[var(--text-secondary)]`,children:e.partition?`Partitioned`:`Shared`}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.queuedCount.toLocaleString()}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.deferredCount.toLocaleString()}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.readyCount.toLocaleString()}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.activeCount.toLocaleString()}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.failedCount.toLocaleString()}),(0,x.jsx)(_,{className:`text-right pgb-num text-[var(--text-primary)]`,children:e.totalCount.toLocaleString()}),(0,x.jsx)(_,{children:e.deadLetter?(0,x.jsx)(s,{to:`/queues/${encodeURIComponent(e.deadLetter)}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:e.deadLetter}):(0,x.jsx)(`span`,{className:`text-[var(--border-strong)]`,children:`—`})}),(0,x.jsx)(_,{children:t?(0,x.jsx)(f,{variant:`error`,size:`sm`,dot:!0,children:`Backlogged`}):e.activeCount>0?(0,x.jsx)(f,{variant:`success`,size:`sm`,dot:!0,children:`Processing`}):(0,x.jsx)(f,{variant:`gray`,size:`sm`,dot:!0,children:`Idle`})})]},e.name)})})]})}),i>1&&(0,x.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3 border-t border-[var(--border-subtle)]`,children:[(0,x.jsxs)(`div`,{className:`text-sm text-[var(--text-tertiary)]`,children:[`Page `,(0,x.jsx)(`b`,{className:`pgb-num text-[var(--text-secondary)] font-medium`,children:r}),` of `,(0,x.jsx)(`b`,{className:`pgb-num text-[var(--text-secondary)] font-medium`,children:i})]}),(0,x.jsxs)(`div`,{className:`flex gap-2`,children:[(0,x.jsx)(u,{variant:`outline`,size:`sm`,onClick:()=>M(r-1),disabled:!C,children:`Previous`}),(0,x.jsx)(u,{variant:`outline`,size:`sm`,onClick:()=>M(r+1),disabled:!S,children:`Next`})]})]})]})]})});function w({className:e}){return(0,x.jsx)(`svg`,{className:e,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,children:(0,x.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z`})})}function T({className:e}){return(0,x.jsx)(`svg`,{className:e,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,children:(0,x.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18 18 6M6 6l12 12`})})}export{S as ErrorBoundary,C as default};
@@ -0,0 +1 @@
1
+ import{o as e,rt as t,s as n,t as r,tt as i}from"./jsx-runtime-RQyiN6Nr.js";import{M as a,h as o,j as s,l as c,m as l,t as u,u as d}from"./db-link-BajQ1v8I.js";import{t as f}from"./createLucideIcon-C-LI4enx.js";import{t as p}from"./chevron-down-BFFjfYD4.js";import{t as m}from"./chevron-right-DGk5QFJF.js";import{a as h,i as g,l as _,n as v,o as y,t as b}from"./MenuTrigger-BNvpjhsQ.js";import{a as x,i as S,n as C,o as w,r as T,t as E}from"./dialog-D-oczDM2.js";import{t as D}from"./stat-card-dyg1wY5p.js";import{a as O,i as k,n as A,r as j,t as M}from"./button-9NpSS9Ow.js";import{n as N,t as P}from"./badge-CMnQO7Lq.js";import{a as F,i as I,n as L,o as R,r as z,t as B}from"./table-Cz7ujmH_.js";import{t as V}from"./error-card-BH7i86fH.js";import{t as H}from"./pagination-C-ohiBmY.js";import{t as U}from"./filter-select-Bn_oSiip.js";var W=f(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),G=t(i(),1),K=r(),q=n(function(){return(0,K.jsx)(V,{title:`Failed to load queue`,backTo:{href:`/queues`,label:`Back to Queues`}})}),J=e(function({loaderData:e}){let{queue:t,jobs:n,totalCount:r,page:i,totalPages:s,stateFilter:d,hasNextPage:f,hasPrevPage:h}=e,[g,_]=a(),[v,y]=(0,G.useState)(!1),b=(e,t)=>{let n=new URLSearchParams(g);t?n.set(e,t):n.delete(e),n.delete(`page`),_(n)},x=e=>{let t=new URLSearchParams(g);t.set(`page`,e.toString()),_(t)},S=(t.warningQueueSize??0)>0&&t.queuedCount>(t.warningQueueSize??0);return(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsx)(N,{title:t.name,subtitle:`${t.partition?`Partitioned`:`Shared`} storage`,action:(0,K.jsx)(u,{to:`/send?queue=${encodeURIComponent(t.name)}`,children:(0,K.jsx)(M,{variant:`primary`,size:`md`,children:`Send Job`})})}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 -mt-2`,children:[(0,K.jsxs)(P,{variant:`primary`,children:[t.policy,` policy`]}),t.deadLetter&&(0,K.jsxs)(P,{variant:`gray`,children:[`dead letter → `,t.deadLetter]}),(t.retryLimit??0)>0&&(0,K.jsxs)(P,{variant:`gray`,children:[`retry limit `,t.retryLimit]})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4`,children:[(0,K.jsx)(D,{label:`Queued`,value:t.queuedCount.toLocaleString(),accent:S?`error`:`neutral`,hint:S?`over threshold`:`incl. deferred`}),(0,K.jsx)(D,{label:`Deferred`,value:t.deferredCount.toLocaleString()}),(0,K.jsx)(D,{label:`Ready`,value:t.readyCount.toLocaleString(),accent:`primary`,hint:`ready to process`}),(0,K.jsx)(D,{label:`Active`,value:t.activeCount.toLocaleString(),accent:`primary`}),(0,K.jsx)(D,{label:`Failed`,value:t.failedCount.toLocaleString(),hint:`recent failures`}),(0,K.jsx)(D,{label:`Total`,value:t.totalCount.toLocaleString()})]}),(0,K.jsxs)(A,{children:[(0,K.jsxs)(`button`,{onClick:()=>y(!v),className:l(`w-full flex items-center justify-between px-5 py-4`,`text-left hover:bg-[var(--surface-hover)]`,`transition-colors cursor-pointer`),children:[(0,K.jsx)(`h3`,{className:`text-base font-semibold tracking-[-0.01em] text-[var(--text-primary)]`,children:`Configuration`}),v?(0,K.jsx)(p,{className:`h-5 w-5 text-[var(--text-tertiary)]`}):(0,K.jsx)(m,{className:`h-5 w-5 text-[var(--text-tertiary)]`})]}),v&&(0,K.jsx)(j,{className:`border-t border-[var(--border-subtle)]`,children:(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[(0,K.jsx)(Z,{label:`Policy`,value:t.policy||`—`}),(0,K.jsx)(Z,{label:`Storage`,value:t.partition?`Partitioned`:`Shared`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`pgb-eyebrow`,children:`Dead Letter`}),(0,K.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:t.deadLetter?(0,K.jsx)(u,{to:`/queues/${t.deadLetter}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:t.deadLetter}):`—`})]}),(0,K.jsx)(Z,{label:`Warning Threshold`,value:t.warningQueueSize||`—`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[(0,K.jsx)(Z,{label:`Retry Limit`,value:t.retryLimit??0}),(0,K.jsx)(Z,{label:`Retry Delay`,value:t.retryDelay?`${t.retryDelay}ms`:`—`}),(0,K.jsx)(Z,{label:`Retry Delay Max`,value:t.retryDelayMax?`${t.retryDelayMax}ms`:`—`}),(0,K.jsx)(Z,{label:`Retry Backoff`,value:t.retryBackoff?`Enabled`:`Disabled`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-4`,children:[(0,K.jsx)(Z,{label:`Expiration`,value:Q(t.expireInSeconds)}),(0,K.jsx)(Z,{label:`Retention`,value:Q(t.retentionSeconds)}),(0,K.jsx)(Z,{label:`Deletion`,value:Q(t.deleteAfterSeconds)})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-4`,children:[(0,K.jsx)(Z,{label:`Created`,value:t.createdOn?o(new Date(t.createdOn)):`—`}),(0,K.jsx)(Z,{label:`Last monitored`,value:t.monitorOn?o(new Date(t.monitorOn)):`—`}),(0,K.jsx)(Z,{label:`Last maintained`,value:t.maintainOn?o(new Date(t.maintainOn)):`—`})]})]})})]}),(0,K.jsxs)(A,{children:[(0,K.jsxs)(k,{className:`flex flex-row items-center justify-between`,children:[(0,K.jsxs)(O,{children:[`Jobs`,r!==null&&` (${r.toLocaleString()})`]}),(0,K.jsx)(U,{value:d,options:c,onChange:e=>b(`state`,e)})]}),(0,K.jsx)(j,{className:`p-0`,children:(0,K.jsxs)(B,{children:[(0,K.jsx)(F,{children:(0,K.jsxs)(R,{children:[(0,K.jsx)(I,{children:`ID`}),(0,K.jsx)(I,{children:`State`}),(0,K.jsx)(I,{children:`Priority`}),(0,K.jsx)(I,{children:`Retries`}),(0,K.jsx)(I,{children:`Created`}),(0,K.jsx)(I,{children:`Actions`})]})}),(0,K.jsx)(L,{children:n.length===0?(0,K.jsx)(R,{children:(0,K.jsx)(z,{className:`text-center text-[var(--text-tertiary)] py-8`,colSpan:6,children:`No jobs found`})}):n.map(e=>(0,K.jsx)(Y,{job:e,queueName:t.name},e.id))})]})}),(0,K.jsx)(H,{page:i,totalPages:s,hasNextPage:f,hasPrevPage:h,onPageChange:x})]})]})});function Y({job:e,queueName:t}){let n=s(),r=n.state!==`idle`,[i,a]=(0,G.useState)(null),c=n.data,d=c&&!c.success&&c.affected===0,f=t=>{n.submit({jobId:e.id,intent:t},{method:`post`})},p=(e,t,n,r)=>{a({open:!0,title:t,description:n,confirmLabel:r,intent:e})},m=()=>{i&&(f(i.intent),a(null))},D=e.state===`created`||e.state===`retry`||e.state===`active`,O=e.state===`failed`,k=e.state===`cancelled`,A=e.state!==`active`,j=l(`flex w-full items-center px-3 py-2 text-sm cursor-pointer`,`outline-none transition-colors rounded-sm`,`text-gray-700 data-highlighted:bg-gray-100 data-highlighted:text-gray-900`,`dark:text-gray-300 dark:data-highlighted:bg-gray-800 dark:data-highlighted:text-gray-100`),N=l(`flex w-full items-center px-3 py-2 text-sm cursor-pointer`,`outline-none transition-colors rounded-sm`,`text-red-600 data-highlighted:bg-red-50 data-highlighted:text-red-700`,`dark:text-red-400 dark:data-highlighted:bg-red-950 dark:data-highlighted:text-red-300`);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(R,{children:[(0,K.jsx)(z,{children:(0,K.jsxs)(u,{to:`/queues/${t}/jobs/${e.id}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:[e.id.slice(0,8),`...`]})}),(0,K.jsx)(z,{children:(0,K.jsx)(X,{state:e.state})}),(0,K.jsx)(z,{className:`pgb-num text-[var(--text-primary)]`,children:e.priority}),(0,K.jsxs)(z,{className:`pgb-num text-[var(--text-primary)]`,children:[e.retryCount,` / `,e.retryLimit]}),(0,K.jsx)(z,{className:`pgb-num text-[var(--text-tertiary)]`,children:o(new Date(e.createdOn))}),(0,K.jsx)(z,{children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d&&(0,K.jsx)(`span`,{className:`text-xs text-amber-600 dark:text-amber-400`,title:c.message,children:`Failed`}),(0,K.jsxs)(v,{children:[(0,K.jsx)(b,{className:l(`inline-flex items-center justify-center rounded-md p-1.5`,`text-gray-500 hover:text-gray-900 hover:bg-gray-100`,`dark:text-gray-400 dark:hover:text-gray-100 dark:hover:bg-gray-800`,`focus:outline-none focus:ring-2 focus:ring-primary-500`,`transition-colors disabled:opacity-50`),disabled:r,"aria-label":`Job actions`,children:(0,K.jsx)(W,{className:`h-4 w-4`})}),(0,K.jsx)(h,{children:(0,K.jsx)(g,{children:(0,K.jsxs)(y,{className:l(`min-w-[10rem] rounded-md border p-1 shadow-md z-50`,`bg-white border-gray-200`,`dark:bg-gray-900 dark:border-gray-800`,`animate-in fade-in-0 zoom-in-95`),children:[O&&(0,K.jsx)(_,{className:j,onClick:()=>f(`retry`),children:`Retry`}),k&&(0,K.jsx)(_,{className:j,onClick:()=>f(`resume`),children:`Resume`}),D&&(0,K.jsx)(_,{className:N,onClick:()=>p(`cancel`,`Cancel Job`,`Are you sure you want to cancel job ${e.id.slice(0,8)}...? This will stop the job from being processed.`,`Cancel Job`),children:`Cancel`}),A&&(0,K.jsx)(_,{className:N,onClick:()=>p(`delete`,`Delete Job`,`Are you sure you want to delete job ${e.id.slice(0,8)}...? This action cannot be undone.`,`Delete`),children:`Delete`})]})})})]})]})})]}),(0,K.jsx)(x,{open:i?.open??!1,onOpenChange:e=>!e&&a(null),children:(0,K.jsxs)(E,{hideCloseButton:!0,className:`w-[28rem] max-w-[calc(100vw-2rem)]`,children:[(0,K.jsxs)(S,{children:[(0,K.jsx)(w,{children:i?.title}),(0,K.jsx)(C,{className:`mt-2`,children:i?.description})]}),(0,K.jsxs)(T,{className:`mt-6 flex justify-end gap-3`,children:[(0,K.jsx)(M,{variant:`outline`,size:`sm`,className:`cursor-pointer`,onClick:()=>a(null),children:`Cancel`}),(0,K.jsx)(M,{variant:`danger`,size:`sm`,className:`cursor-pointer`,onClick:m,children:i?.confirmLabel})]})]})})]})}function X({state:e}){return(0,K.jsx)(P,{variant:d[e],size:`sm`,dot:!0,children:e})}function Z({label:e,value:t}){return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{className:`pgb-eyebrow`,children:e}),(0,K.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:t?.toString()||`—`})]})}function Q(e){if(!e)return`—`;if(e<60)return`${e} seconds`;if(e<3600){let t=Math.floor(e/60);return`${t} ${t===1?`minute`:`minutes`}`}if(e<86400){let t=Math.floor(e/3600),n=Math.floor(e%3600/60);return n===0?`${t} ${t===1?`hour`:`hours`}`:`${t} ${t===1?`hour`:`hours`} ${n} ${n===1?`minute`:`minutes`}`}let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);return n===0?`${t} ${t===1?`day`:`days`}`:`${t} ${t===1?`day`:`days`} ${n} ${n===1?`hour`:`hours`}`}export{q as ErrorBoundary,J as default};
@@ -0,0 +1 @@
1
+ import{o as e,rt as t,s as n,t as r,tt as i}from"./jsx-runtime-RQyiN6Nr.js";import{h as a,j as o,m as s,t as c,u as l}from"./db-link-BajQ1v8I.js";import{t as u}from"./createLucideIcon-C-LI4enx.js";import{t as d}from"./check-7jwc5sb1.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./dialog-D-oczDM2.js";import{a as v,i as y,n as b,r as x,t as S}from"./button-9NpSS9Ow.js";import{n as C,t as w}from"./badge-CMnQO7Lq.js";import{t as T}from"./error-card-BH7i86fH.js";var E=u(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),D=t(i(),1),O=r();function k({title:e,description:t,confirmLabel:n,confirmVariant:r=`primary`,triggerVariant:i=`ghost`,trigger:a,onConfirm:o,disabled:s}){let[c,l]=(0,D.useState)(!1);return(0,O.jsxs)(f,{open:c,onOpenChange:l,children:[(0,O.jsx)(S,{variant:i,size:`sm`,disabled:s,onClick:()=>l(!0),className:`cursor-pointer`,children:a}),(0,O.jsxs)(_,{hideCloseButton:!0,className:`w-[28rem] max-w-[calc(100vw-2rem)]`,children:[(0,O.jsxs)(p,{children:[(0,O.jsx)(h,{children:e}),(0,O.jsx)(m,{className:`mt-2`,children:t})]}),(0,O.jsxs)(g,{className:`mt-6 flex justify-end gap-3`,children:[(0,O.jsx)(S,{variant:`outline`,size:`sm`,className:`cursor-pointer`,onClick:()=>l(!1),children:`Cancel`}),(0,O.jsx)(S,{variant:r===`danger`?`danger`:`primary`,size:`sm`,className:`cursor-pointer`,onClick:()=>{o(),l(!1)},children:n})]})]})]})}var A=n(function(){return(0,O.jsx)(T,{title:`Failed to load job`,backTo:{href:`/queues`,label:`Back to Queues`}})}),j=e(function({loaderData:e}){let{job:t,queueName:n}=e,r=o(),i=r.state!==`idle`,[u,f]=(0,D.useState)(!1),p=r.data,m=p&&!p.success&&p.affected===0,h=e=>{r.submit({intent:e},{method:`post`})},g=async()=>{await navigator.clipboard.writeText(t.id),f(!0),setTimeout(()=>f(!1),2e3)},_=t.state===`failed`;return(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsx)(C,{title:(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-3`,children:[`Job detail`,(0,O.jsx)(w,{variant:l[t.state],size:`lg`,dot:!0,children:t.state})]}),action:(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&(0,O.jsx)(`span`,{className:`text-xs text-[var(--warning-600)]`,title:p.message,children:`Action failed`}),t.state===`failed`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`retry`),children:`Retry`}),t.state===`cancelled`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`resume`),children:`Resume`}),(t.state===`created`||t.state===`retry`||t.state===`active`)&&(0,O.jsx)(k,{title:`Cancel Job`,description:`Are you sure you want to cancel job ${t.id.slice(0,8)}...? This will prevent the job from being processed.`,confirmLabel:`Cancel Job`,confirmVariant:`danger`,triggerVariant:`outline`,trigger:`Cancel`,onConfirm:()=>h(`cancel`),disabled:i}),t.state!==`active`&&(0,O.jsx)(k,{title:`Delete Job`,description:`Are you sure you want to delete job ${t.id.slice(0,8)}...? This action cannot be undone.`,confirmLabel:`Delete`,confirmVariant:`danger`,triggerVariant:`danger`,trigger:`Delete`,onConfirm:()=>h(`delete`),disabled:i})]})}),(0,O.jsxs)(b,{children:[(0,O.jsxs)(y,{children:[(0,O.jsx)(v,{children:`Details`}),(0,O.jsxs)(`span`,{className:`text-xs text-[var(--text-tertiary)]`,children:[`in queue`,` `,(0,O.jsx)(c,{to:`/queues/${encodeURIComponent(n)}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:n})]})]}),(0,O.jsxs)(x,{className:`space-y-6`,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[2fr_1fr_1fr] gap-6`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1`,children:`Job ID`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`code`,{className:`text-sm font-mono break-all text-[var(--text-primary)]`,children:t.id}),(0,O.jsx)(`button`,{onClick:g,className:s(`p-1 rounded-md transition-colors cursor-pointer flex-shrink-0`,`text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-hover)]`),title:u?`Copied!`:`Copy to clipboard`,children:u?(0,O.jsx)(d,{className:`h-4 w-4 text-[var(--success-600)]`}):(0,O.jsx)(E,{className:`h-4 w-4`})})]})]}),(0,O.jsx)(M,{label:`Policy`,value:t.policy||`—`}),(0,O.jsx)(M,{label:`Priority`,value:t.priority,mono:!0})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Data`}),(0,O.jsx)(`pre`,{className:`text-xs px-3.5 py-3 rounded-lg border border-[var(--border-default)] bg-[var(--surface-sunken)] font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,children:t.data?JSON.stringify(t.data,null,2):`null`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Output`}),(0,O.jsx)(`pre`,{className:s(`text-xs px-3.5 py-3 rounded-lg border font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,_?`border-[var(--error-100)] bg-[var(--error-50)]`:`border-[var(--border-default)] bg-[var(--surface-sunken)]`),children:t.output!==void 0&&t.output!==null?JSON.stringify(t.output,null,2):`—`})]})]}),(0,O.jsx)(`div`,{children:(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:(0,O.jsx)(M,{label:`Priority`,value:t.priority})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Retry Count`,value:t.retryCount,mono:!0}),(0,O.jsx)(M,{label:`Retry Limit`,value:t.retryLimit,mono:!0}),(0,O.jsx)(M,{label:`Retry Delay`,value:t.retryDelay?`${t.retryDelay}ms`:`—`,mono:!0}),(0,O.jsx)(M,{label:`Retry Backoff`,value:t.retryBackoff?`Enabled`:`Disabled`})]}),(t.singletonKey||t.groupId||t.groupTier||t.deadLetter)&&(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[t.singletonKey&&(0,O.jsx)(M,{label:`Singleton Key`,value:t.singletonKey,mono:!0}),t.groupId&&(0,O.jsx)(M,{label:`Group ID`,value:t.groupId,mono:!0}),t.groupTier&&(0,O.jsx)(M,{label:`Group Tier`,value:t.groupTier,mono:!0}),t.deadLetter&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:`Dead Letter`}),(0,O.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:(0,O.jsx)(c,{to:`/queues/${t.deadLetter}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:t.deadLetter})})]})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Created`,value:a(new Date(t.createdOn)),mono:!0}),(0,O.jsx)(M,{label:`Start After`,value:t.startAfter?a(new Date(t.startAfter)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Started`,value:t.startedOn?a(new Date(t.startedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Completed`,value:t.completedOn?a(new Date(t.completedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Keep Until`,value:t.keepUntil?a(new Date(t.keepUntil)):`—`,mono:!0})]})]})})]})]})]})});function M({label:e,value:t,mono:n=!1}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:e}),(0,O.jsx)(`dd`,{className:s(`mt-1 text-sm text-[var(--text-primary)]`,n&&`pgb-num`),children:t?.toString()||`—`})]})}export{A as ErrorBoundary,j as default};
@@ -0,0 +1 @@
1
+ import{A as e,T as t,o as n,rt as r,s as i,t as a,tt as o,w as s}from"./jsx-runtime-RQyiN6Nr.js";import{m as c,t as l}from"./db-link-BajQ1v8I.js";import{t as u}from"./chevron-down-BFFjfYD4.js";import{a as d,i as f,n as p,r as m,t as h}from"./button-9NpSS9Ow.js";import{t as g}from"./error-card-BH7i86fH.js";var _=r(o(),1),v=a(),y=(0,_.forwardRef)(({className:e,label:t,id:n,...r},i)=>{let a=n||`checkbox-${Math.random().toString(36).substr(2,9)}`;return(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{type:`checkbox`,id:a,ref:i,className:c(`h-4 w-4 rounded border-gray-300 text-primary-600`,`focus:ring-2 focus:ring-primary-600 focus:ring-offset-0`,`dark:border-gray-700 dark:bg-gray-900`,`dark:checked:bg-primary-600 dark:checked:border-primary-600`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-50`,e),...r}),t&&(0,v.jsx)(`label`,{htmlFor:a,className:`text-sm text-gray-700 dark:text-gray-300 cursor-pointer select-none`,children:t})]})});y.displayName=`Checkbox`;function b({value:e,onValueChange:t,children:n,className:r}){let[i,a]=(0,_.useState)(!1),o=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return i&&document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[i]);let s=[],l=e=>{if(Array.isArray(e))e.forEach(l);else if(e&&typeof e==`object`&&`props`in e){let t=e;t.type===x?s.push({value:t.props.value,label:t.props.children}):t.props?.children&&l(t.props.children)}};l(n);let d=s.find(t=>t.value===e);return(0,v.jsxs)(`div`,{ref:o,className:c(`relative`,r),children:[(0,v.jsxs)(`button`,{type:`button`,onClick:()=>a(!i),className:c(`flex items-center justify-between w-full px-3 py-2 text-sm rounded-lg shadow-sm`,`bg-white border border-gray-300 text-gray-900`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100`,`hover:bg-gray-50 dark:hover:bg-gray-800`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`,`cursor-pointer`),children:[(0,v.jsx)(`span`,{className:`truncate text-left`,children:d?.label||`Select...`}),(0,v.jsx)(u,{className:`h-4 w-4 opacity-50 ml-2 shrink-0`})]}),i&&s.length>0&&(0,v.jsx)(`div`,{className:`absolute z-10 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-auto`,children:s.map(n=>(0,v.jsx)(`button`,{type:`button`,onClick:()=>{t(n.value),a(!1)},className:c(`w-full text-left px-3 py-2 text-sm`,`hover:bg-gray-100 dark:hover:bg-gray-800`,`text-gray-900 dark:text-gray-100`,`cursor-pointer`,n.value===e&&`bg-gray-50 dark:bg-gray-800`),children:n.label},n.value))})]})}function x({value:e,children:t}){return null}var S=({children:e})=>null,C=({children:e}={})=>null,w=({children:e})=>(0,v.jsx)(v.Fragment,{children:e}),T=i(function(){return(0,v.jsx)(g,{title:`Failed to load queue creation page`,backTo:{href:`/queues`,label:`Back to Queues`}})}),E=n(function({loaderData:n}){let{queues:r}=n,i=s(),a=e().state===`submitting`,[o,u]=(0,_.useState)(!1),[g,T]=(0,_.useState)(`standard`),[E,D]=(0,_.useState)(`shared`),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(``),[M,N]=(0,_.useState)(``),[P,F]=(0,_.useState)(!1),I=r.filter(e=>e.name.toLowerCase().includes(A.toLowerCase())),L=e=>{N(e),j(e),F(!1),u(!0)},R=t(({currentLocation:e,nextLocation:t})=>o&&!a&&e.pathname!==t.pathname);return(0,_.useEffect)(()=>{let e=e=>{o&&!a&&(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[o,a]),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[R.state===`blocked`&&(0,v.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,children:(0,v.jsxs)(`div`,{className:`bg-white dark:bg-gray-900 rounded-lg shadow-lg p-6 max-w-md mx-4`,children:[(0,v.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900 dark:text-gray-100 mb-2`,children:`Unsaved Changes`}),(0,v.jsx)(`p`,{className:`text-sm text-gray-600 dark:text-gray-400 mb-6`,children:`You have unsaved changes. Are you sure you want to leave this page?`}),(0,v.jsxs)(`div`,{className:`flex gap-3 justify-end`,children:[(0,v.jsx)(h,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>R.reset(),children:`Stay`}),(0,v.jsx)(h,{type:`button`,variant:`danger`,size:`sm`,onClick:()=>R.proceed(),children:`Leave`})]})]})}),(0,v.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900 dark:text-gray-100`,children:`Create Queue`}),(0,v.jsxs)(p,{children:[(0,v.jsx)(f,{children:(0,v.jsx)(d,{children:`Queue Configuration`})}),(0,v.jsx)(m,{children:(0,v.jsxs)(`form`,{method:`post`,className:`space-y-5`,onChange:()=>u(!0),onSubmit:()=>u(!1),children:[i&&`error`in i&&(0,v.jsx)(`div`,{className:c(`rounded-lg border px-4 py-3 text-sm`,`bg-red-50 border-red-200 text-red-700`,`dark:bg-red-950 dark:border-red-800 dark:text-red-400`),children:i.error}),(0,v.jsxs)(`div`,{children:[(0,v.jsxs)(`label`,{htmlFor:`queueName`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:[`Queue Name `,(0,v.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,v.jsx)(`input`,{type:`text`,id:`queueName`,name:`queueName`,required:!0,placeholder:`my-queue`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)})]}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`policy`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Policy`}),(0,v.jsxs)(b,{value:g,onValueChange:e=>{T(e),u(!0)},children:[(0,v.jsx)(S,{children:(0,v.jsx)(C,{})}),(0,v.jsxs)(w,{children:[(0,v.jsx)(x,{value:`standard`,children:`Standard`}),(0,v.jsx)(x,{value:`short`,children:`Short`}),(0,v.jsx)(x,{value:`singleton`,children:`Singleton`}),(0,v.jsx)(x,{value:`stately`,children:`Stately`}),(0,v.jsx)(x,{value:`exclusive`,children:`Exclusive`}),(0,v.jsx)(x,{value:`key_strict_fifo`,children:`Key Strict FIFO`})]})]}),(0,v.jsx)(`input`,{type:`hidden`,name:`policy`,value:g}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Standard supports all features. Other policies restrict job queuing behavior.`})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`storage`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Storage`}),(0,v.jsxs)(b,{value:E,onValueChange:e=>{D(e),u(!0)},children:[(0,v.jsx)(S,{children:(0,v.jsx)(C,{})}),(0,v.jsxs)(w,{children:[(0,v.jsx)(x,{value:`shared`,children:`Shared`}),(0,v.jsx)(x,{value:`partitioned`,children:`Partitioned`})]})]}),(0,v.jsx)(`input`,{type:`hidden`,name:`partition`,value:E===`partitioned`?`true`:`false`}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Partitioned creates a dedicated table for this queue`})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`deadLetterSearch`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Dead Letter Queue`}),(0,v.jsxs)(`div`,{className:`relative`,children:[(0,v.jsx)(`input`,{type:`text`,id:`deadLetterSearch`,value:A,onChange:e=>{j(e.target.value),F(!0)},onFocus:()=>F(!0),onBlur:()=>setTimeout(()=>F(!1),200),placeholder:`Search for a queue...`,autoComplete:`off`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)}),(0,v.jsx)(`input`,{type:`hidden`,name:`deadLetter`,value:M}),P&&I.length>0&&(0,v.jsx)(`div`,{className:`absolute z-10 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-auto`,children:I.map(e=>(0,v.jsx)(`button`,{type:`button`,onClick:()=>L(e.name),className:`w-full text-left px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-gray-100 cursor-pointer text-sm`,children:e.name},e.name))})]}),M&&(0,v.jsxs)(`p`,{className:`mt-1 text-xs text-green-600 dark:text-green-400`,children:[`Selected: `,M]}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Failed jobs will be moved to this queue after all retries`})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`warningQueueSize`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Warning Queue Size`}),(0,v.jsx)(`input`,{type:`number`,id:`warningQueueSize`,name:`warningQueueSize`,min:`1`,placeholder:`Optional`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Emit warning when queue size exceeds this value`})]})]}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`retryLimit`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Retry Limit`}),(0,v.jsx)(`input`,{type:`number`,id:`retryLimit`,name:`retryLimit`,min:`0`,placeholder:`2`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`retryDelay`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Retry Delay (seconds)`}),(0,v.jsx)(`input`,{type:`number`,id:`retryDelay`,name:`retryDelay`,min:`0`,placeholder:`0`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Retry Backoff`}),(0,v.jsx)(`div`,{className:`py-2 pb-6`,children:(0,v.jsx)(y,{id:`retryBackoff`,name:`retryBackoff`,value:`true`,checked:O,onChange:e=>{k(e.target.checked),u(!0)},label:`Enable Exponential Backoff`})})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`retryDelayMax`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Max Retry Delay (seconds)`}),(0,v.jsx)(`input`,{type:`number`,id:`retryDelayMax`,name:`retryDelayMax`,min:`1`,placeholder:`No limit`,disabled:!O,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`,`disabled:opacity-50 disabled:cursor-not-allowed`)}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Only used with exponential backoff`})]})]}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`expireInSeconds`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Expire In Seconds`}),(0,v.jsx)(`input`,{type:`number`,id:`expireInSeconds`,name:`expireInSeconds`,min:`1`,placeholder:`900`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Default: 15 minutes (900 seconds)`})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`retentionSeconds`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Retention Seconds`}),(0,v.jsx)(`input`,{type:`number`,id:`retentionSeconds`,name:`retentionSeconds`,min:`1`,placeholder:`1209600`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Default: 14 days (1209600 seconds)`})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`label`,{htmlFor:`deleteAfterSeconds`,className:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:`Delete After Seconds`}),(0,v.jsx)(`input`,{type:`number`,id:`deleteAfterSeconds`,name:`deleteAfterSeconds`,min:`0`,placeholder:`604800`,className:c(`w-full rounded-lg border px-3 py-2 text-sm`,`bg-white border-gray-300 text-gray-900 placeholder-gray-400`,`dark:bg-gray-900 dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-500`,`focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-transparent`)}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-gray-500 dark:text-gray-400`,children:`Default: 7 days (604800 seconds). Set to 0 to never delete.`})]})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-3 pt-2`,children:[(0,v.jsx)(h,{type:`submit`,disabled:a,children:a?`Creating...`:`Create Queue`}),(0,v.jsx)(l,{to:`/queues`,className:`text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300`,children:`Cancel`})]})]})})]})]})});export{T as ErrorBoundary,E as default};
@@ -0,0 +1 @@
1
+ import{nt as e,tt as t}from"./jsx-runtime-RQyiN6Nr.js";var n=e((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),r=e(((e,t)=>{function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),t.exports=n()}));export{r as t};