Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@tanstack/react-router

Package Overview
Dependencies
Maintainers
1
Versions
620
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/react-router - npm Package Compare versions

Comparing version 0.0.1-beta.49 to 0.0.1-beta.50

96

build/stats-react.json

@@ -10,3 +10,3 @@ {

{
"uid": "59bc-81",
"uid": "4de6-81",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -19,7 +19,7 @@ },

"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"uid": "59bc-83"
"uid": "4de6-83"
},
{
"name": "immer@9.0.16/node_modules/immer/dist/immer.esm.mjs",
"uid": "59bc-85"
"uid": "4de6-85"
}

@@ -33,3 +33,3 @@ ]

"name": "router-core/build/esm/index.js",
"uid": "59bc-87"
"uid": "4de6-87"
},

@@ -40,7 +40,7 @@ {

{
"uid": "59bc-89",
"uid": "4de6-89",
"name": "useStore.ts"
},
{
"uid": "59bc-91",
"uid": "4de6-91",
"name": "index.tsx"

@@ -58,44 +58,44 @@ }

"nodeParts": {
"59bc-81": {
"4de6-81": {
"renderedLength": 429,
"gzipLength": 238,
"brotliLength": 0,
"mainUid": "59bc-80"
"mainUid": "4de6-80"
},
"59bc-83": {
"4de6-83": {
"renderedLength": 181,
"gzipLength": 129,
"brotliLength": 0,
"mainUid": "59bc-82"
"mainUid": "4de6-82"
},
"59bc-85": {
"4de6-85": {
"renderedLength": 8203,
"gzipLength": 3238,
"brotliLength": 0,
"mainUid": "59bc-84"
"mainUid": "4de6-84"
},
"59bc-87": {
"renderedLength": 56925,
"gzipLength": 13448,
"4de6-87": {
"renderedLength": 56576,
"gzipLength": 13412,
"brotliLength": 0,
"mainUid": "59bc-86"
"mainUid": "4de6-86"
},
"59bc-89": {
"4de6-89": {
"renderedLength": 1347,
"gzipLength": 484,
"brotliLength": 0,
"mainUid": "59bc-88"
"mainUid": "4de6-88"
},
"59bc-91": {
"4de6-91": {
"renderedLength": 12620,
"gzipLength": 3340,
"brotliLength": 0,
"mainUid": "59bc-90"
"mainUid": "4de6-90"
}
},
"nodeMetas": {
"59bc-80": {
"4de6-80": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "59bc-81"
"index.production.js": "4de6-81"
},

@@ -105,10 +105,10 @@ "imported": [],

{
"uid": "59bc-90"
"uid": "4de6-90"
}
]
},
"59bc-82": {
"4de6-82": {
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"moduleParts": {
"index.production.js": "59bc-83"
"index.production.js": "4de6-83"
},

@@ -118,10 +118,10 @@ "imported": [],

{
"uid": "59bc-86"
"uid": "4de6-86"
}
]
},
"59bc-84": {
"4de6-84": {
"id": "/node_modules/.pnpm/immer@9.0.16/node_modules/immer/dist/immer.esm.mjs",
"moduleParts": {
"index.production.js": "59bc-85"
"index.production.js": "4de6-85"
},

@@ -131,17 +131,17 @@ "imported": [],

{
"uid": "59bc-86"
"uid": "4de6-86"
}
]
},
"59bc-86": {
"4de6-86": {
"id": "/packages/router-core/build/esm/index.js",
"moduleParts": {
"index.production.js": "59bc-87"
"index.production.js": "4de6-87"
},
"imported": [
{
"uid": "59bc-82"
"uid": "4de6-82"
},
{
"uid": "59bc-84"
"uid": "4de6-84"
}

@@ -151,14 +151,14 @@ ],

{
"uid": "59bc-90"
"uid": "4de6-90"
}
]
},
"59bc-88": {
"4de6-88": {
"id": "/packages/react-router/src/useStore.ts",
"moduleParts": {
"index.production.js": "59bc-89"
"index.production.js": "4de6-89"
},
"imported": [
{
"uid": "59bc-93"
"uid": "4de6-93"
}

@@ -168,23 +168,23 @@ ],

{
"uid": "59bc-90"
"uid": "4de6-90"
}
]
},
"59bc-90": {
"4de6-90": {
"id": "/packages/react-router/src/index.tsx",
"moduleParts": {
"index.production.js": "59bc-91"
"index.production.js": "4de6-91"
},
"imported": [
{
"uid": "59bc-80"
"uid": "4de6-80"
},
{
"uid": "59bc-92"
"uid": "4de6-92"
},
{
"uid": "59bc-86"
"uid": "4de6-86"
},
{
"uid": "59bc-88"
"uid": "4de6-88"
}

@@ -195,3 +195,3 @@ ],

},
"59bc-92": {
"4de6-92": {
"id": "react",

@@ -202,3 +202,3 @@ "moduleParts": {},

{
"uid": "59bc-90"
"uid": "4de6-90"
}

@@ -208,3 +208,3 @@ ],

},
"59bc-93": {
"4de6-93": {
"id": "use-sync-external-store/shim/with-selector",

@@ -215,3 +215,3 @@ "moduleParts": {},

{
"uid": "59bc-88"
"uid": "4de6-88"
}

@@ -218,0 +218,0 @@ ],

@@ -11,3 +11,3 @@ /**

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("use-sync-external-store/shim/with-selector")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim/with-selector"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ReactRouter={},t.React,t.withSelector)}(this,(function(t,e,r){"use strict";function a(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var o=a(e);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},s.apply(this,arguments)}function n(t,e){if(!t)throw new Error("Invariant failed")}function i(t){for(var e=arguments.length,r=Array(e>1?e-1:0),a=1;a<e;a++)r[a-1]=arguments[a];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function c(t){return!!t&&!!t[J]}function u(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===q}(t)||Array.isArray(t)||!!t[G]||!!(null===(e=t.constructor)||void 0===e?void 0:e[G])||p(t)||m(t))}function h(t,e,r){void 0===r&&(r=!1),0===l(t)?(r?Object.keys:X)(t).forEach((function(a){r&&"symbol"==typeof a||e(a,t[a],t)})):t.forEach((function(r,a){return e(a,r,t)}))}function l(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:p(t)?2:m(t)?3:0}function d(t,e){return 2===l(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function f(t,e,r){var a=l(t);2===a?t.set(e,r):3===a?(t.delete(e),t.add(r)):t[e]=r}function p(t){return U&&t instanceof Map}function m(t){return H&&t instanceof Set}function g(t){return t.o||t.t}function v(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=V(t);delete e[J];for(var r=X(e),a=0;a<r.length;a++){var o=r[a],s=e[o];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function y(t,e){return void 0===e&&(e=!1),w(t)||c(t)||!u(t)||(l(t)>1&&(t.set=t.add=t.clear=t.delete=b),Object.freeze(t),e&&h(t,(function(t,e){return y(e,!0)}),!0)),t}function b(){i(2)}function w(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function S(t){var e=Q[t];return e||i(18,t),e}function P(){return z}function L(t,e){e&&(S("Patches"),t.u=[],t.s=[],t.v=e)}function E(t){M(t),t.p.forEach(_),t.p=null}function M(t){t===z&&(z=t.l)}function A(t){return z={p:[],l:z,h:t,m:!0,_:0}}function _(t){var e=t[J];0===e.i||1===e.i?e.j():e.O=!0}function x(t,e){e._=e.p.length;var r=e.p[0],a=void 0!==t&&t!==r;return e.h.g||S("ES5").S(e,t,a),a?(r[J].P&&(E(e),i(4)),u(t)&&(t=O(e,t),e.l||D(e,t)),e.u&&S("Patches").M(r[J].t,t,e.u,e.s)):t=O(e,r,[]),E(e),e.u&&e.v(e.u,e.s),t!==W?t:void 0}function O(t,e,r){if(w(e))return e;var a=e[J];if(!a)return h(e,(function(o,s){return R(t,a,e,o,s,r)}),!0),e;if(a.A!==t)return e;if(!a.P)return D(t,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var o=4===a.i||5===a.i?a.o=v(a.k):a.o;h(3===a.i?new Set(o):o,(function(e,s){return R(t,a,o,e,s,r)})),D(t,o,!1),r&&t.u&&S("Patches").R(a,r,t.u,t.s)}return a.o}function R(t,e,r,a,o,s){if(c(o)){var n=O(t,o,s&&e&&3!==e.i&&!d(e.D,a)?s.concat(a):void 0);if(f(r,a,n),!c(n))return;t.m=!1}if(u(o)&&!w(o)){if(!t.h.F&&t._<1)return;O(t,o),e&&e.A.l||D(t,o)}}function D(t,e,r){void 0===r&&(r=!1),t.h.F&&t.m&&y(e,r)}function j(t,e){var r=t[J];return(r?g(r):t)[e]}function C(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var a=Object.getOwnPropertyDescriptor(r,e);if(a)return a;r=Object.getPrototypeOf(r)}}function k(t){t.P||(t.P=!0,t.l&&k(t.l))}function F(t){t.o||(t.o=v(t.t))}function I(t,e,r){var a=p(e)?S("MapSet").N(e,r):m(e)?S("MapSet").T(e,r):t.g?function(t,e){var r=Array.isArray(t),a={i:r?1:0,A:e?e.A:P(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=a,s=Y;r&&(o=[a],s=Z);var n=Proxy.revocable(o,s),i=n.revoke,c=n.proxy;return a.k=c,a.j=i,c}(e,r):S("ES5").J(e,r);return(r?r.A:P()).p.push(a),a}function $(t){return c(t)||i(22,t),function t(e){if(!u(e))return e;var r,a=e[J],o=l(e);if(a){if(!a.P&&(a.i<4||!S("ES5").K(a)))return a.t;a.I=!0,r=N(e,o),a.I=!1}else r=N(e,o);return h(r,(function(e,o){a&&function(t,e){return 2===l(t)?t.get(e):t[e]}(a.t,e)===o||f(r,e,t(o))})),3===o?new Set(r):r}(t)}function N(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v(t)}var T,z,B="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),U="undefined"!=typeof Map,H="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=B?Symbol.for("immer-nothing"):((T={})["immer-nothing"]=!0,T),G=B?Symbol.for("immer-draftable"):"__$immer_draftable",J=B?Symbol.for("immer-state"):"__$immer_state",q=""+Object.prototype.constructor,X="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,V=Object.getOwnPropertyDescriptors||function(t){var e={};return X(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Q={},Y={get:function(t,e){if(e===J)return t;var r=g(t);if(!d(r,e))return function(t,e,r){var a,o=C(e,r);return o?"value"in o?o.value:null===(a=o.get)||void 0===a?void 0:a.call(t.k):void 0}(t,r,e);var a=r[e];return t.I||!u(a)?a:a===j(t.t,e)?(F(t),t.o[e]=I(t.A.h,a,t)):a},has:function(t,e){return e in g(t)},ownKeys:function(t){return Reflect.ownKeys(g(t))},set:function(t,e,r){var a=C(g(t),e);if(null==a?void 0:a.set)return a.set.call(t.k,r),!0;if(!t.P){var o=j(g(t),e),s=null==o?void 0:o[J];if(s&&s.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}(r,o)&&(void 0!==r||d(t.t,e)))return!0;F(t),k(t)}return t.o[e]===r&&"number"!=typeof r&&(void 0!==r||e in t.o)||(t.o[e]=r,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==j(t.t,e)||e in t.t?(t.D[e]=!1,F(t),k(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=g(t),a=Reflect.getOwnPropertyDescriptor(r,e);return a?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:a.enumerable,value:r[e]}:a},defineProperty:function(){i(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){i(12)}},Z={};h(Y,(function(t,e){Z[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Z.deleteProperty=function(t,e){return Z.set.call(this,t,e,void 0)},Z.set=function(t,e,r){return Y.set.call(this,t[0],e,r,t[0])};var tt=function(){function t(t){var e=this;this.g=K,this.F=!0,this.produce=function(t,r,a){if("function"==typeof t&&"function"!=typeof r){var o=r;r=t;var s=e;return function(t){var e=this;void 0===t&&(t=o);for(var a=arguments.length,n=Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];return s.produce(t,(function(t){var a;return(a=r).call.apply(a,[e,t].concat(n))}))}}var n;if("function"!=typeof r&&i(6),void 0!==a&&"function"!=typeof a&&i(7),u(t)){var c=A(e),h=I(e,t,void 0),l=!0;try{n=r(h),l=!1}finally{l?E(c):M(c)}return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return L(c,a),x(t,c)}),(function(t){throw E(c),t})):(L(c,a),x(n,c))}if(!t||"object"!=typeof t){if(void 0===(n=r(t))&&(n=t),n===W&&(n=void 0),e.F&&y(n,!0),a){var d=[],f=[];S("Patches").M(t,n,d,f),a(d,f)}return n}i(21,t)},this.produceWithPatches=function(t,r){if("function"==typeof t)return function(r){for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];return e.produceWithPatches(r,(function(e){return t.apply(void 0,[e].concat(o))}))};var a,o,s=e.produce(t,r,(function(t,e){a=t,o=e}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return[t,a,o]})):[s,a,o]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){u(t)||i(8),c(t)&&(t=$(t));var e=A(this),r=I(this,t,void 0);return r[J].C=!0,M(e),r},e.finishDraft=function(t,e){var r=(t&&t[J]).A;return L(r,e),x(void 0,r)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!K&&i(20),this.g=t},e.applyPatches=function(t,e){var r;for(r=e.length-1;r>=0;r--){var a=e[r];if(0===a.path.length&&"replace"===a.op){t=a.value;break}}r>-1&&(e=e.slice(r+1));var o=S("Patches").$;return c(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),et=new tt,rt=et.produce;et.produceWithPatches.bind(et);var at=et.setAutoFreeze.bind(et);et.setUseProxies.bind(et),et.applyPatches.bind(et),et.createDraft.bind(et),et.finishDraft.bind(et);
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("use-sync-external-store/shim/with-selector")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim/with-selector"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ReactRouter={},t.React,t.withSelector)}(this,(function(t,e,r){"use strict";function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var a=o(e);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},s.apply(this,arguments)}function n(t,e){if(!t)throw new Error("Invariant failed")}function i(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function c(t){return!!t&&!!t[J]}function u(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===q}(t)||Array.isArray(t)||!!t[G]||!!(null===(e=t.constructor)||void 0===e?void 0:e[G])||p(t)||m(t))}function h(t,e,r){void 0===r&&(r=!1),0===l(t)?(r?Object.keys:X)(t).forEach((function(o){r&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(r,o){return e(o,r,t)}))}function l(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:p(t)?2:m(t)?3:0}function d(t,e){return 2===l(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function f(t,e,r){var o=l(t);2===o?t.set(e,r):3===o?(t.delete(e),t.add(r)):t[e]=r}function p(t){return U&&t instanceof Map}function m(t){return H&&t instanceof Set}function g(t){return t.o||t.t}function v(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=V(t);delete e[J];for(var r=X(e),o=0;o<r.length;o++){var a=r[o],s=e[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function y(t,e){return void 0===e&&(e=!1),w(t)||c(t)||!u(t)||(l(t)>1&&(t.set=t.add=t.clear=t.delete=b),Object.freeze(t),e&&h(t,(function(t,e){return y(e,!0)}),!0)),t}function b(){i(2)}function w(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function S(t){var e=Q[t];return e||i(18,t),e}function P(){return z}function L(t,e){e&&(S("Patches"),t.u=[],t.s=[],t.v=e)}function E(t){M(t),t.p.forEach(x),t.p=null}function M(t){t===z&&(z=t.l)}function A(t){return z={p:[],l:z,h:t,m:!0,_:0}}function x(t){var e=t[J];0===e.i||1===e.i?e.j():e.O=!0}function _(t,e){e._=e.p.length;var r=e.p[0],o=void 0!==t&&t!==r;return e.h.g||S("ES5").S(e,t,o),o?(r[J].P&&(E(e),i(4)),u(t)&&(t=O(e,t),e.l||D(e,t)),e.u&&S("Patches").M(r[J].t,t,e.u,e.s)):t=O(e,r,[]),E(e),e.u&&e.v(e.u,e.s),t!==W?t:void 0}function O(t,e,r){if(w(e))return e;var o=e[J];if(!o)return h(e,(function(a,s){return R(t,o,e,a,s,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return D(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=4===o.i||5===o.i?o.o=v(o.k):o.o;h(3===o.i?new Set(a):a,(function(e,s){return R(t,o,a,e,s,r)})),D(t,a,!1),r&&t.u&&S("Patches").R(o,r,t.u,t.s)}return o.o}function R(t,e,r,o,a,s){if(c(a)){var n=O(t,a,s&&e&&3!==e.i&&!d(e.D,o)?s.concat(o):void 0);if(f(r,o,n),!c(n))return;t.m=!1}if(u(a)&&!w(a)){if(!t.h.F&&t._<1)return;O(t,a),e&&e.A.l||D(t,a)}}function D(t,e,r){void 0===r&&(r=!1),t.h.F&&t.m&&y(e,r)}function j(t,e){var r=t[J];return(r?g(r):t)[e]}function C(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function k(t){t.P||(t.P=!0,t.l&&k(t.l))}function F(t){t.o||(t.o=v(t.t))}function I(t,e,r){var o=p(e)?S("MapSet").N(e,r):m(e)?S("MapSet").T(e,r):t.g?function(t,e){var r=Array.isArray(t),o={i:r?1:0,A:e?e.A:P(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},a=o,s=Y;r&&(a=[o],s=Z);var n=Proxy.revocable(a,s),i=n.revoke,c=n.proxy;return o.k=c,o.j=i,c}(e,r):S("ES5").J(e,r);return(r?r.A:P()).p.push(o),o}function $(t){return c(t)||i(22,t),function t(e){if(!u(e))return e;var r,o=e[J],a=l(e);if(o){if(!o.P&&(o.i<4||!S("ES5").K(o)))return o.t;o.I=!0,r=N(e,a),o.I=!1}else r=N(e,a);return h(r,(function(e,a){o&&function(t,e){return 2===l(t)?t.get(e):t[e]}(o.t,e)===a||f(r,e,t(a))})),3===a?new Set(r):r}(t)}function N(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v(t)}var T,z,B="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),U="undefined"!=typeof Map,H="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=B?Symbol.for("immer-nothing"):((T={})["immer-nothing"]=!0,T),G=B?Symbol.for("immer-draftable"):"__$immer_draftable",J=B?Symbol.for("immer-state"):"__$immer_state",q=""+Object.prototype.constructor,X="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,V=Object.getOwnPropertyDescriptors||function(t){var e={};return X(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Q={},Y={get:function(t,e){if(e===J)return t;var r=g(t);if(!d(r,e))return function(t,e,r){var o,a=C(e,r);return a?"value"in a?a.value:null===(o=a.get)||void 0===o?void 0:o.call(t.k):void 0}(t,r,e);var o=r[e];return t.I||!u(o)?o:o===j(t.t,e)?(F(t),t.o[e]=I(t.A.h,o,t)):o},has:function(t,e){return e in g(t)},ownKeys:function(t){return Reflect.ownKeys(g(t))},set:function(t,e,r){var o=C(g(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,r),!0;if(!t.P){var a=j(g(t),e),s=null==a?void 0:a[J];if(s&&s.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}(r,a)&&(void 0!==r||d(t.t,e)))return!0;F(t),k(t)}return t.o[e]===r&&"number"!=typeof r&&(void 0!==r||e in t.o)||(t.o[e]=r,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==j(t.t,e)||e in t.t?(t.D[e]=!1,F(t),k(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=g(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:r[e]}:o},defineProperty:function(){i(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){i(12)}},Z={};h(Y,(function(t,e){Z[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Z.deleteProperty=function(t,e){return Z.set.call(this,t,e,void 0)},Z.set=function(t,e,r){return Y.set.call(this,t[0],e,r,t[0])};var tt=function(){function t(t){var e=this;this.g=K,this.F=!0,this.produce=function(t,r,o){if("function"==typeof t&&"function"!=typeof r){var a=r;r=t;var s=e;return function(t){var e=this;void 0===t&&(t=a);for(var o=arguments.length,n=Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];return s.produce(t,(function(t){var o;return(o=r).call.apply(o,[e,t].concat(n))}))}}var n;if("function"!=typeof r&&i(6),void 0!==o&&"function"!=typeof o&&i(7),u(t)){var c=A(e),h=I(e,t,void 0),l=!0;try{n=r(h),l=!1}finally{l?E(c):M(c)}return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return L(c,o),_(t,c)}),(function(t){throw E(c),t})):(L(c,o),_(n,c))}if(!t||"object"!=typeof t){if(void 0===(n=r(t))&&(n=t),n===W&&(n=void 0),e.F&&y(n,!0),o){var d=[],f=[];S("Patches").M(t,n,d,f),o(d,f)}return n}i(21,t)},this.produceWithPatches=function(t,r){if("function"==typeof t)return function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return e.produceWithPatches(r,(function(e){return t.apply(void 0,[e].concat(a))}))};var o,a,s=e.produce(t,r,(function(t,e){o=t,a=e}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return[t,o,a]})):[s,o,a]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){u(t)||i(8),c(t)&&(t=$(t));var e=A(this),r=I(this,t,void 0);return r[J].C=!0,M(e),r},e.finishDraft=function(t,e){var r=(t&&t[J]).A;return L(r,e),_(void 0,r)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!K&&i(20),this.g=t},e.applyPatches=function(t,e){var r;for(r=e.length-1;r>=0;r--){var o=e[r];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}r>-1&&(e=e.slice(r+1));var a=S("Patches").$;return c(t)?a(t,e):this.produce(t,(function(t){return a(t,e)}))},t}(),et=new tt,rt=et.produce;et.produceWithPatches.bind(et);var ot=et.setAutoFreeze.bind(et);et.setUseProxies.bind(et),et.applyPatches.bind(et),et.createDraft.bind(et),et.finishDraft.bind(et);
/**

@@ -23,3 +23,3 @@ * router-core

*/
const ot="popstate";function st(t){let e=t.getLocation(),r=()=>{},a=new Set;const o=()=>{e=t.getLocation(),a.forEach((t=>t()))};return{get location(){return e},listen:e=>(0===a.size&&(r=t.listener(o)),a.add(e),()=>{a.delete(e),0===a.size&&r()}),push:(e,r)=>{t.pushState(e,r),o()},replace:(e,r)=>{t.replaceState(e,r),o()},go:e=>{t.go(e),o()},back:()=>{t.back(),o()},forward:()=>{t.forward(),o()}}}function nt(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.hash}${window.location.search}`),r=t?.createHref??(t=>t);return st({getLocation:()=>ct(e(),history.state),listener:t=>(window.addEventListener(ot,t),()=>{window.removeEventListener(ot,t)}),pushState:(t,e)=>{window.history.pushState({...e,key:ut()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:ut()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t)})}function it(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,a={};return st({getLocation:()=>ct(e[r],a),listener:t=>(window.addEventListener(ot,t),()=>{window.removeEventListener(ot,t)}),pushState:(t,o)=>{a={...o,key:ut()},e.push(t),r++},replaceState:(t,o)=>{a={...o,key:ut()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t)})}function ct(t,e){let r=t.indexOf("#"),a=t.indexOf("?");const o=Math.min(r,a);return{href:t,pathname:o>-1?t.substring(0,o):t,hash:r>-1?t.substring(r,a):"",search:a>-1?t.substring(a):"",state:e}}function ut(){return(Math.random()+1).toString(36).substring(7)}function ht(t){return t[t.length-1]}function lt(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch{}}return!0}function dt(t,e){return function(t){return"function"==typeof t}(t)?t(e):t}function ft(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function pt(t){return mt(t.filter(Boolean).join("/"))}function mt(t){return t.replace(/\/{2,}/g,"/")}function gt(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function vt(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function yt(t){return vt(gt(t))}function bt(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let a=wt(e);const o=wt(r);o.forEach(((t,e)=>{if("/"===t.value)e?e===o.length-1&&a.push(t):a=[t];else if(".."===t.value)a.length>1&&"/"===ht(a)?.value&&a.pop(),a.pop();else{if("."===t.value)return;a.push(t)}}));const s=pt([t,...a.map((t=>t.value))]);return mt(s)}function wt(t){if(!t)return[];const e=[];if("/"===(t=mt(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>t.startsWith("*")?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function St(t,e,r){return pt(wt(t).map((t=>"*"!==t.value||r?"param"===t.type?e[t.value.substring(1)]??"":t.value:"")))}function Pt(t,e,r){const a=Lt(t,e,r);if(!r.to||a)return a??{}}function Lt(t,e,r){if(!e.startsWith(t))return;const a=wt(e="/"!=t?e.substring(t.length):e),o=wt(`${r.to??"*"}`),s={};let n=(()=>{for(let t=0;t<Math.max(a.length,o.length);t++){const e=a[t],n=o[t],i=t===o.length-1,c=t===a.length-1;if(n){if("wildcard"===n.type)return!!e?.value&&(s["*"]=pt(a.slice(t).map((t=>t.value))),!0);if("pathname"===n.type){if("/"===n.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(n.value!==e.value)return!1}else if(n.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===n.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(s[n.value.substring(1)]=e.value)}}if(i&&!c)return!!r.fuzzy}return!0})();return n?s:void 0}function Et(t,e){var r,a,o,s="";for(r in t)if(void 0!==(o=t[r]))if(Array.isArray(o))for(a=0;a<o.length;a++)s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(o[a]);else s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(o);return(e||"")+s}function Mt(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||("0"===e.charAt(0)?e:0*+e==0?+e:e))}function At(t){for(var e,r,a={},o=t.split("&");e=o.shift();)void 0!==a[r=(e=e.split("=")).shift()]?a[r]=[].concat(a[r],Mt(e.shift())):a[r]=Mt(e.shift());return a}class _t{constructor(t,e,r,a,o){Object.assign(this,{...t,originalIndex:r,options:e,getRouter:()=>o,childRoutes:void 0,getParentRoute:()=>a}),o.options.createRoute?.({router:o,route:this})}}const xt="__root__",Ot=(t={},e=[],r=!0,a,o)=>{r&&(t.path=xt),a===xt&&(a="");let s=r?xt:t.path;s&&"/"!==s&&(s=yt(s));const i=s||t.id;let c=pt([a,i]);s===xt&&(s="/"),c!==xt&&(c=pt(["/",c]));const u=c===xt?"/":vt(pt([o,s]));return{id:c,routeId:i,path:s,fullPath:u,options:t,children:e,addChildren:e=>Ot(t,e,!1,a,o),createRoute:t=>Ot(t,void 0,!1,c,u),generate:()=>{n(!1)}}};at(!1);let Rt=[],Dt=!1;function jt(){Dt||(Rt.forEach((t=>t())),Rt=[])}function Ct(t,e){const r=new Set,a={state:t,subscribe:t=>(r.add(t),()=>r.delete(t)),setState:t=>{const o=a.state;a.state=rt((e=>{t(e)}))(o),e&&console.log(a.state),Rt.push((()=>r.forEach((t=>t(a.state,o))))),jt()}};return a}function kt(t){Dt=!0,t(),Dt=!1,jt()}function Ft(t,e){if(t===e)return t;const r=e,a=Array.isArray(t)&&Array.isArray(r);if(a||It(t)&&It(r)){const e=a?t.length:Object.keys(t).length,o=a?r:Object.keys(r),s=o.length,n=a?[]:{};let i=0;for(let e=0;e<s;e++){const s=a?e:o[e];n[s]=Ft(t[s],r[s]),n[s]===t[s]&&i++}return e===s&&i===e?t:n}return r}function It(t){if(!$t(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!$t(r)&&!!r.hasOwnProperty("isPrototypeOf")}function $t(t){return"[object Object]"===Object.prototype.toString.call(t)}const Nt=["component","errorComponent","pendingComponent"];class Tt{abortController=new AbortController;#t="";#e=()=>{};onLoaderDataListeners=new Set;constructor(t,e,r){Object.assign(this,{route:e,router:t,matchId:r.matchId,pathname:r.pathname,params:r.params,store:Ct({routeSearch:{},search:{},status:"idle",routeLoaderData:{},loaderData:{},isFetching:!1,invalid:!1,invalidAt:1/0})}),this.__hasLoaders()||this.store.setState((t=>t.status="success"))}#r=t=>{kt((()=>{this.store.setState((e=>{e.routeLoaderData=t})),this.#a()}))};cancel=()=>{this.abortController?.abort()};load=async t=>{const e=Date.now(),r=t?.preload?Math.max(t?.maxAge,t?.gcMaxAge):0;if(t?.preload&&r>0){if(this.router.store.state.currentMatches.find((t=>t.id===this.id)))return;this.router.store.setState((r=>{r.matchCache[this.id]={gc:e+t.gcMaxAge,match:this}}))}if("success"===this.store.state.status&&this.getIsInvalid()||"error"===this.store.state.status||"idle"===this.store.state.status){const e=t?.preload?t?.maxAge:void 0;await this.fetch({maxAge:e})}};fetch=async t=>(this.__loadPromise=new Promise((async e=>{const r=""+Date.now()+Math.random();this.#t=r;const a=()=>r!==this.#t?this.__loadPromise?.then((()=>e())):void 0;let o;kt((()=>{"idle"===this.store.state.status&&this.store.setState((t=>t.status="loading")),this.store.setState((t=>t.invalid=!1))})),this.store.setState((t=>t.isFetching=!0)),this.#e=e;const s=(async()=>{await Promise.all(Nt.map((async t=>{const e=this.route.options[t];this[t]?.preload&&(this[t]=await this.router.options.loadComponent(e))})))})(),n=Promise.resolve().then((async()=>{try{if(this.route.options.loader){const t=await this.router.loadMatchData(this);if(o=a())return o;this.#r(t)}return this.store.setState((e=>{e.error=void 0,e.status="success",e.updatedAt=Date.now(),e.invalidAt=e.updatedAt+(t?.maxAge??this.route.options.loaderMaxAge??this.router.options.defaultLoaderMaxAge??0)})),this.store.state.routeLoaderData}catch(t){if(o=a())return o;throw this.store.setState((e=>{e.error=t,e.status="error",e.updatedAt=Date.now()})),t}})),i=async()=>{if(o=a())return o;this.store.setState((t=>t.isFetching=!1)),this.#e(),delete this.__loadPromise};try{await Promise.all([s,n.catch((()=>{}))]),i()}catch{i()}})),this.__loadPromise);invalidate=async()=>{this.store.setState((t=>t.invalid=!0)),this.router.store.state.currentMatches.find((t=>t.id===this.id))&&await this.load()};__hasLoaders=()=>!(!this.route.options.loader&&!Nt.some((t=>this.route.options[t]?.preload)));getIsInvalid=()=>{const t=Date.now();return this.store.state.invalid||this.store.state.invalidAt<t};#a=()=>{this.store.setState((t=>{t.loaderData=Ft(t.loaderData,{...this.parentMatch?.store.state.loaderData,...t.routeLoaderData})})),this.onLoaderDataListeners.forEach((t=>t()))};__setParentMatch=t=>{!this.parentMatch&&t&&(this.parentMatch=t,this.parentMatch.__onLoaderData((()=>{this.#a()})))};__onLoaderData=t=>{this.onLoaderDataListeners.add(t)};__validate=()=>{const t=this.parentMatch?.store.state.search??this.router.store.state.latestLocation.search;try{const e=this.store.state.routeSearch;let r=("object"==typeof this.route.options.validateSearch?this.route.options.validateSearch.parse:this.route.options.validateSearch)?.(t)??{};kt((()=>{e!==r&&this.store.setState((t=>t.invalid=!0)),this.store.setState((e=>{e.routeSearch=r,e.search={...t,...r}}))})),Nt.map((async t=>{const e=this.route.options[t];"function"!=typeof this[t]&&(this[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",void this.store.setState((t=>{t.status="error",t.error=e}))}}}const zt=Ut(JSON.parse),Bt=Ht(JSON.stringify);function Ut(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=At(e);for(let e in r){const a=r[e];if("string"==typeof a)try{r[e]=t(a)}catch(t){}}return r}}function Ht(t){return e=>{(e={...e})&&Object.keys(e).forEach((r=>{const a=e[r];if(void 0===a||void 0===a)delete e[r];else if(a&&"object"==typeof a&&null!==a)try{e[r]=t(a)}catch(t){}}));const r=Et(e).toString();return r?`?${r}`:""}}const Kt=async({router:t,routeMatch:e})=>{const r=t.buildNext({to:".",search:t=>({...t??{},__data:{matchId:e.id}})}),a=await fetch(r.href,{method:"GET",signal:e.abortController.signal});if(a.ok)return a.json();throw new Error("Failed to fetch match data")};class Wt{startedLoadingAt=Date.now();resolveNavigation=()=>{};constructor(t){this.options={defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??Bt,parseSearch:t?.parseSearch??zt,fetchServerDataFn:t?.fetchServerDataFn??Kt},this.history=this.options?.history??Gt?it():nt(),this.store=Ct(Jt()),this.basepath="",this.update(t),this.options.createRouter?.(this)}reset=()=>{this.store.setState((t=>Object.assign(t,Jt())))};mount=()=>{if(!Gt){this.store.state.currentMatches.length||this.load();const t=this.history.listen((()=>{this.load(this.#o(this.store.state.latestLocation))})),e="visibilitychange",r="focus";return window.addEventListener&&(window.addEventListener(e,this.#s,!1),window.addEventListener(r,this.#s,!1)),()=>{t(),window.removeEventListener&&(window.removeEventListener(e,this.#s),window.removeEventListener(r,this.#s))}}return()=>{}};update=t=>{this.store.state.latestLocation||this.store.setState((t=>{t.latestLocation=this.#o(),t.currentLocation=t.latestLocation})),Object.assign(this.options,t);const{basepath:e,routeConfig:r}=this.options;return this.basepath=`/${yt(e??"")??""}`,r&&(this.routesById={},this.routeTree=this.#n(r)),this};buildNext=t=>{const e=this.#i(t),r=this.matchRoutes(e.pathname),a=r.map((t=>t.route.options.preSearchFilters??[])).flat().filter(Boolean),o=r.map((t=>t.route.options.postSearchFilters??[])).flat().filter(Boolean);return this.#i({...t,__preSearchFilters:a,__postSearchFilters:o})};cancelMatches=()=>{[...this.store.state.currentMatches,...this.store.state.pendingMatches||[]].forEach((t=>{t.cancel()}))};load=async t=>{let e=Date.now();const r=e;let a;this.startedLoadingAt=r,this.cancelMatches(),kt((()=>{t&&this.store.setState((e=>{e.latestLocation=t})),a=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),this.store.setState((t=>{t.status="loading",t.pendingMatches=a,t.pendingLocation=this.store.state.latestLocation}))}));try{await this.loadMatches(a)}catch(t){console.warn(t),n(!1)}if(this.startedLoadingAt!==r)return this.navigationPromise;const o=this.store.state.currentMatches,s=[],i=[];o.forEach((t=>{a.find((e=>e.id===t.id))?i.push(t):s.push(t)}));const c=a.filter((t=>!o.find((e=>e.id===t.id))));e=Date.now(),s.forEach((t=>{t.__onExit?.({params:t.params,search:t.store.state.routeSearch}),"error"!==t.store.state.status||t.store.state.isFetching||t.store.setState((t=>{t.status="idle",t.error=void 0}));const r=Math.max(t.route.options.loaderGcMaxAge??this.options.defaultLoaderGcMaxAge??0,t.route.options.loaderMaxAge??this.options.defaultLoaderMaxAge??0);r>0&&this.store.setState((a=>{a.matchCache[t.id]={gc:r==1/0?Number.MAX_SAFE_INTEGER:e+r,match:t}}))})),i.forEach((t=>{t.route.options.onTransition?.({params:t.params,search:t.store.state.routeSearch})})),c.forEach((t=>{t.__onExit=t.route.options.onLoaded?.({params:t.params,search:t.store.state.search}),delete this.store.state.matchCache[t.id]})),this.store.setState((t=>{Object.assign(t,{status:"idle",currentLocation:this.store.state.latestLocation,currentMatches:a,pendingLocation:void 0,pendingMatches:void 0})})),this.options.onRouteChange?.(),this.resolveNavigation()};cleanMatchCache=()=>{const t=Date.now();this.store.setState((e=>{Object.keys(e.matchCache).forEach((r=>{const a=e.matchCache[r];"loading"!==a.match.store.state.status&&(a.gc>0&&a.gc>t||delete e.matchCache[r])}))}))};getRoute=t=>{const e=this.routesById[t];return n(e),e};loadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(r),r};preloadRoute=async(t=this.store.state.latestLocation,e)=>{const r=this.buildNext(t),a=this.matchRoutes(r.pathname,{strictParseParams:!0});return await this.loadMatches(a,{preload:!0,maxAge:e.maxAge??this.options.defaultPreloadMaxAge??this.options.defaultLoaderMaxAge??0,gcMaxAge:e.gcMaxAge??this.options.defaultPreloadGcMaxAge??this.options.defaultLoaderGcMaxAge??0}),a};matchRoutes=(t,e)=>{const r=[];if(!this.routeTree)return r;const a=[...this.store.state.currentMatches,...this.store.state.pendingMatches??[]],o=async s=>{let n=ht(r)?.params??{};const i=this.options.filterRoutes?.(s)??s;let c=[];const u=(r,a)=>(a.some((a=>{if(!a.path&&a.childRoutes?.length)return u([...c,a],a.childRoutes);const o=!("/"===a.path&&!a.childRoutes?.length),s=Pt(this.basepath,t,{to:a.fullPath,fuzzy:o,caseSensitive:a.options.caseSensitive??this.options.caseSensitive});if(s){let t;try{t=a.options.parseParams?.(s)??s}catch(t){if(e?.strictParseParams)throw t}n={...n,...t}}return s&&(c=[...r,a]),!!c.length})),!!c.length);if(u([],i),!c.length)return;c.forEach((t=>{const e=St(t.path,n),o=St(t.id,n,!0),s=a.find((t=>t.id===o))||this.store.state.matchCache[o]?.match||new Tt(this,t,{matchId:o,params:n,pathname:pt([this.basepath,e])});r.push(s)}));const h=ht(c);h.childRoutes?.length&&o(h.childRoutes)};return o([this.routeTree]),function(t){t.forEach(((e,r)=>{const a=t[r-1];a&&e.__setParentMatch(a)}))}(r),r};loadMatches=async(t,e)=>{this.cleanMatchCache(),t.forEach((async t=>{t.__validate()})),await Promise.all(t.map((async t=>{try{await(t.route.options.beforeLoad?.({router:this,match:t}))}catch(r){throw e?.preload||t.route.options.onLoadError?.(r),r}})));const r=t.map((async(r,a)=>{const o=t[1],s=r.store.state.search;s.__data?.matchId&&s.__data.matchId!==r.id||(r.load(e),"success"!==r.store.state.status&&r.__loadPromise&&await r.__loadPromise,o&&await o.__loadPromise)}));await Promise.all(r)};loadMatchData=async t=>Gt||!this.options.useServerData?await(t.route.options.loader?.({params:t.params,search:t.store.state.routeSearch,signal:t.abortController.signal}))||{}:this.options.fetchServerDataFn({router:this,routeMatch:t});invalidateRoute=async t=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname).map((t=>t.id));await Promise.allSettled([...this.store.state.currentMatches,...this.store.state.pendingMatches??[]].map((async t=>{if(r.includes(t.id))return t.invalidate()})))};reload=()=>{this.navigate({fromCurrent:!0,replace:!0,search:!0})};resolvePath=(t,e)=>bt(this.basepath,t,mt(e));navigate=async({from:t,to:e=".",search:r,hash:a,replace:o,params:s})=>{const i=String(e),c=String(t);let u;try{new URL(`${i}`),u=!0}catch(t){}return n(!u),this.#c({from:c,to:i,search:r,hash:a,replace:o,params:s})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);return e?.pending?!!this.store.state.pendingLocation&&Pt(this.basepath,this.store.state.pendingLocation.pathname,{...e,to:r.pathname}):Pt(this.basepath,this.store.state.currentLocation.pathname,{...e,to:r.pathname})};buildLink=({from:t,to:e=".",search:r,params:a,hash:o,target:s,replace:n,activeOptions:i,preload:c,preloadMaxAge:u,preloadGcMaxAge:h,preloadDelay:l,disabled:d})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const f={from:t,to:e,search:r,params:a,hash:o,replace:n},p=this.buildNext(f);c=c??this.options.defaultPreload;const m=l??this.options.defaultPreloadDelay??0,g=this.store.state.currentLocation.pathname===p.pathname,v=this.store.state.currentLocation.pathname.split("/"),y=p.pathname.split("/").every(((t,e)=>t===v[e])),b=this.store.state.currentLocation.hash===p.hash;return{type:"internal",next:p,handleFocus:t=>{c&&this.preloadRoute(f,{maxAge:u,gcMaxAge:h}).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{d||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||s&&"_self"!==s||0!==t.button||(t.preventDefault(),!g||r||o||this.invalidateRoute(f),this.#c(f))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(f,{maxAge:u,gcMaxAge:h}).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:(i?.exact?g:y)&&(!i?.includeHash||b),disabled:d}};dehydrate=()=>({state:{...ft(this.store.state,["latestLocation","currentLocation","status","lastUpdated"]),currentMatches:this.store.state.currentMatches.map((t=>({matchId:t.id,state:{...ft(t.store.state,["status","routeLoaderData","invalidAt","invalid"])}})))},context:this.options.context});hydrate=t=>{this.store.setState((e=>{this.options.context=t.context;const r=this.matchRoutes(t.state.latestLocation.pathname,{strictParseParams:!0});r.forEach(((e,r)=>{const a=t.state.currentMatches[r];n(a&&a.matchId===e.id),Object.assign(e,a)})),r.forEach((t=>t.__validate())),Object.assign(e,{...t.state,currentMatches:r})}))};getLoader=t=>{const e=t.from||"/",r=this.getRoute(e);if(!r)return;let a=this.store.state.loaders[e]||(()=>(this.store.setState((t=>{t.loaders[e]={pending:[],fetch:async t=>{if(!r)return;const a={loadedAt:Date.now(),loaderContext:t};this.store.setState((t=>{t.loaders[e].current=a,t.loaders[e].latest=a,t.loaders[e].pending.push(a)}));try{return await(r.options.loader?.(t))}finally{this.store.setState((t=>{t.loaders[e].pending=t.loaders[e].pending.filter((t=>t!==a))}))}}}})),this.store.state.loaders[e]))();return a};#n=t=>{const e=(t,r)=>t.map(((t,a)=>{const o=t.options,s=new _t(t,o,a,r,this);if(this.routesById[s.id])throw new Error;this.routesById[s.id]=s;const n=t.children;return s.childRoutes=n.length?e(n,s):void 0,s}));return e([t])[0]};#o=t=>{let{pathname:e,search:r,hash:a,state:o}=this.history.location;const s=this.options.parseSearch(r);return console.log({pathname:e,searchStr:r,search:Ft(t?.search,s),hash:a.split("#").reverse()[0]??"",href:`${e}${r}${a}`,state:o,key:o?.key||"__init__"}),{pathname:e,searchStr:r,search:Ft(t?.search,s),hash:a.split("#").reverse()[0]??"",href:`${e}${r}${a}`,state:o,key:o?.key||"__init__"}};#s=()=>{this.load()};#i=(t={})=>{const e=t.fromCurrent?this.store.state.latestLocation.pathname:t.from??this.store.state.latestLocation.pathname;let r=bt(this.basepath??"/",e,`${t.to??"."}`);const a=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),o=this.matchRoutes(r),s={...ht(a)?.params};let n=!0===(t.params??!0)?s:dt(t.params,s);n&&o.map((t=>t.route.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},n,t(n))})),r=St(r,n??{});const i=t.__preSearchFilters?.length?t.__preSearchFilters?.reduce(((t,e)=>e(t)),this.store.state.latestLocation.search):this.store.state.latestLocation.search,c=!0===t.search?i:t.search?dt(t.search,i)??{}:t.__preSearchFilters?.length?i:{},u=t.__postSearchFilters?.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),c):c,h=Ft(this.store.state.latestLocation.search,u),l=this.options.stringifySearch(h);let d=!0===t.hash?this.store.state.latestLocation.hash:dt(t.hash,this.store.state.latestLocation.hash);return d=d?`#${d}`:"",{pathname:r,search:h,searchStr:l,state:this.store.state.latestLocation.state,hash:d,href:`${r}${l}${d}`,key:t.key}};#c=t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let a="replace";t.replace||(a="push");this.store.state.latestLocation.href===e.href&&!e.key&&(a="replace");const o=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===a?"push":"replace"](o,{id:r,...e.state}),this.load(this.#o(this.store.state.latestLocation)),this.navigationPromise=new Promise((t=>{const e=this.resolveNavigation;this.resolveNavigation=()=>{e(),t()}}))}}const Gt="undefined"==typeof window||!window.document.createElement;function Jt(){return{status:"idle",latestLocation:null,currentLocation:null,currentMatches:[],loaders:{},lastUpdated:Date.now(),matchCache:{},get isFetching(){return"loading"===this.status||this.currentMatches.some((t=>t.store.state.isFetching))},get isPreloading(){return Object.values(this.matchCache).some((t=>t.match.store.state.isFetching&&!this.currentMatches.find((e=>e.id===t.match.id))))}}}function qt(t,e=(t=>t),a){return r.useSyncExternalStoreWithSelector(t.subscribe,(()=>t.state),(()=>t.state),e,a?Xt:void 0)}function Xt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(e,r[a])||!Object.is(t[r[a]],e[r[a]]))return!1;return!0}function Vt(t){const e=te(),{type:r,children:a,target:s,activeProps:n=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:u,hash:h,search:l,params:d,to:f=".",preload:p,preloadDelay:m,preloadMaxAge:g,replace:v,style:y,className:b,onClick:w,onFocus:S,onMouseEnter:P,onMouseLeave:L,onTouchStart:E,onTouchEnd:M,...A}=t,_=e.buildLink(t);if("external"===_.type){const{href:t}=_;return{href:t}}const{handleClick:x,handleFocus:O,handleEnter:R,handleLeave:D,isActive:j,next:C}=_,k=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},F=j?dt(n,{})??{}:{},I=j?{}:dt(i,{})??{};return{...F,...I,...A,href:u?void 0:C.href,onClick:k([w,t=>{o.startTransition?o.startTransition((()=>{x(t)})):x(t)}]),onFocus:k([S,O]),onMouseEnter:k([P,R]),onMouseLeave:k([L,D]),target:s,style:{...y,...F.style,...I.style},className:[b,F.className,I.className].filter(Boolean).join(" ")||void 0,...u?{role:"link","aria-disabled":!0}:void 0,"data-status":j?"active":void 0}}const Qt=o.forwardRef(((t,e)=>{const r=Vt(t);return o.createElement("a",s({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))})),Yt=o.createContext(null),Zt=o.createContext(null);function te(){const t=o.useContext(Zt);return lt(!t,"useRouter must be used inside a <Router> component!"),t.router}function ee(){return o.useContext(Yt)}function re(t){const e=te(),r=ee()[0],a=t?.from?e.store.state.currentMatches.find((e=>e.route.id===t?.from)):r;return n(a,t?.from&&t.from),(t?.strict??1)&&n(r.route.id==a?.route.id,(a?.route.id,r.route.id,a?.route.id,a?.route.id)),qt(a.store,(e=>t?.track?.(a)??a),t?.shallow),a}function ae(){const t=te();return e=>{const{pending:r,caseSensitive:a,...o}=e;return t.matchRoute(o,{pending:r,caseSensitive:a})}}function oe(){const t=ee().slice(1),e=t[0];return e?o.createElement(se,{matches:t,match:e}):null}function se({matches:t,match:e}){const r=te();qt(e.store);const a=o.useCallback((()=>null),[]),s=o.useCallback((t=>{if("error"===t.match.store.state.status)throw t.match.store.state.error;if("success"===t.match.store.state.status)return o.createElement(t.match.component??r.options.defaultComponent??oe);if("loading"===t.match.store.state.status)throw t.match.__loadPromise;n(!1)}),[]),i=e.pendingComponent??r.options.defaultPendingComponent??a,c=e.errorComponent??r.options.defaultErrorComponent;return o.createElement(Yt.Provider,{value:t},o.createElement(o.Suspense,{fallback:o.createElement(i,null)},o.createElement(ne,{key:e.route.id,errorComponent:c,match:e},o.createElement(s,{match:e}))))}class ne extends o.Component{state={error:!1,info:void 0};componentDidCatch(t,e){console.error(`Error in route match: ${this.props.match.id}`),console.error(t),this.setState({error:t,info:e})}render(){return o.createElement(ie,s({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function ie(t){const[e,r]=o.useState(t.errorState);te();const a=t.errorComponent??ce;return o.useEffect((()=>{t.errorState.error&&r(t.errorState),t.reset()}),[t.errorState.error]),t.errorState.error?o.createElement(a,e):t.children}function ce({error:t}){return o.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},o.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),o.createElement("div",{style:{height:".5rem"}}),o.createElement("div",null,o.createElement("pre",null,t.message?o.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)))}t.DefaultErrorBoundary=ce,t.Link=Qt,t.MatchRoute=function(t){const e=ae()(t);return e?"function"==typeof t.children?t.children(e):e?t.children:null:null},t.Outlet=oe,t.ReactRouter=class extends Wt{constructor(t){super({...t,loadComponent:async t=>(t.preload&&await t.preload(),t)})}},t.Route=_t,t.RouteMatch=Tt,t.Router=Wt,t.RouterProvider=function({router:t,...e}){t.update(e);const[,,r]=qt(t.store,(t=>[t.status,t.pendingMatches,t.currentMatches]),!0);return o.useEffect(t.mount,[t]),o.createElement(o.Fragment,null,o.createElement(Zt.Provider,{value:{router:t}},o.createElement(Yt.Provider,{value:[void 0,...r]},o.createElement(oe,null))))},t.batch=kt,t.cleanPath=mt,t.createAction=function(t){const e=Ct({submissions:[]},t.debug);return{options:t,store:e,reset:()=>{e.setState((t=>{t.submissions=[]}))},submit:async r=>{const a={submittedAt:Date.now(),status:"pending",payload:r,invalidate:()=>{o((t=>{t.isInvalid=!0}))},getIsLatest:()=>e.state.submissions[e.state.submissions.length-1]?.submittedAt===a.submittedAt},o=t=>{e.setState((e=>{const r=e.submissions.find((t=>t.submittedAt===a.submittedAt));n(r),t(r)}))};e.setState((e=>{e.submissions.push(a),e.submissions.reverse(),e.submissions=e.submissions.slice(0,t.maxSubmissions??10),e.submissions.reverse()}));const s=async()=>{t.onEachSettled?.(a),a.getIsLatest()&&await(t.onLatestSettled?.(a))};try{const e=await(t.action?.(a.payload));return o((t=>{t.response=e})),await(t.onEachSuccess?.(a)),a.getIsLatest()&&await(t.onLatestSuccess?.(a)),await s(),o((t=>{t.status="success"})),e}catch(e){throw console.error(e),o((t=>{t.error=e})),await(t.onEachError?.(a)),a.getIsLatest()&&await(t.onLatestError?.(a)),await s(),o((t=>{t.status="error"})),e}}}},t.createBrowserHistory=nt,t.createHashHistory=function(){return nt({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=it,t.createRouteConfig=Ot,t.createStore=Ct,t.decode=At,t.defaultFetchServerDataFn=Kt,t.defaultParseSearch=zt,t.defaultStringifySearch=Bt,t.encode=Et,t.functionalUpdate=dt,t.interpolatePath=St,t.invariant=n,t.joinPaths=pt,t.last=ht,t.lazy=function(t){const e=o.lazy(t);return e.preload=async()=>{await t()},e},t.matchByPath=Lt,t.matchPathname=Pt,t.matchesContext=Yt,t.parsePathname=wt,t.parseSearchWith=Ut,t.pick=ft,t.replaceEqualDeep=Ft,t.resolvePath=bt,t.rootRouteId=xt,t.routerContext=Zt,t.stringifySearchWith=Ht,t.trackDeep=function(t){const e=new Set;return JSON.stringify(t,((t,r)=>{if("function"!=typeof r){if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}})),t},t.trimPath=yt,t.trimPathLeft=gt,t.trimPathRight=vt,t.useAction=function(t,e){qt(t.store,(t=>e?.track?.(t)??t),!0);const[r]=o.useState({});return Object.assign(r,{...t,latestSubmission:t.store.state.submissions[t.store.state.submissions.length-1],pendingSubmissions:o.useMemo((()=>t.store.state.submissions.filter((t=>"pending"===t.status))),[t.store.state.submissions])}),r},t.useLinkProps=Vt,t.useLoaderData=function(t){const e=re(t);return n(e,t?.from&&t.from),qt(e.store,(e=>t?.track?.(e.loaderData)??e.loaderData)),e.store.state.loaderData},t.useMatch=re,t.useMatchRoute=ae,t.useMatches=ee,t.useNavigate=function(t){const e=te();return r=>e.navigate({...t,...r})},t.useParams=function(t){const e=te();return qt(e.store,(e=>{const r=ht(e.currentMatches)?.params;return t?.track?.(r)??r})),ht(e.store.state.currentMatches)?.params},t.useRoute=function(t){const e=te().getRoute(t);return n(e),e},t.useRouter=te,t.useRouterStore=function(t,e){return qt(te().store,t,e)},t.useSearch=function(t){const e=re(t);return qt(e.store,(e=>t?.track?.(e.search)??e.search)),e.store.state.search},t.useStore=qt,t.warning=lt,Object.defineProperty(t,"__esModule",{value:!0})}));
const at="popstate";function st(t){let e=t.getLocation(),r=()=>{},o=new Set;const a=()=>{e=t.getLocation(),o.forEach((t=>t()))};return{get location(){return e},listen:e=>(0===o.size&&(r=t.listener(a)),o.add(e),()=>{o.delete(e),0===o.size&&r()}),push:(e,r)=>{t.pushState(e,r),a()},replace:(e,r)=>{t.replaceState(e,r),a()},go:e=>{t.go(e),a()},back:()=>{t.back(),a()},forward:()=>{t.forward(),a()}}}function nt(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.hash}${window.location.search}`),r=t?.createHref??(t=>t);return st({getLocation:()=>it(e(),history.state),listener:t=>(window.addEventListener(at,t),()=>{window.removeEventListener(at,t)}),pushState:(t,e)=>{window.history.pushState({...e,key:ct()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:ct()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t)})}function it(t,e){let r=t.indexOf("#"),o=t.indexOf("?");const a=Math.min(r,o);return{href:t,pathname:a>-1?t.substring(0,a):t,hash:r>-1?t.substring(r,o):"",search:o>-1?t.substring(o):"",state:e}}function ct(){return(Math.random()+1).toString(36).substring(7)}function ut(t){return t[t.length-1]}function ht(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch{}}return!0}function lt(t,e){return function(t){return"function"==typeof t}(t)?t(e):t}function dt(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function ft(t){return pt(t.filter(Boolean).join("/"))}function pt(t){return t.replace(/\/{2,}/g,"/")}function mt(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function gt(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function vt(t){return gt(mt(t))}function yt(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let o=bt(e);const a=bt(r);a.forEach(((t,e)=>{if("/"===t.value)e?e===a.length-1&&o.push(t):o=[t];else if(".."===t.value)o.length>1&&"/"===ut(o)?.value&&o.pop(),o.pop();else{if("."===t.value)return;o.push(t)}}));const s=ft([t,...o.map((t=>t.value))]);return pt(s)}function bt(t){if(!t)return[];const e=[];if("/"===(t=pt(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>t.startsWith("*")?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function wt(t,e,r){return ft(bt(t).map((t=>"*"!==t.value||r?"param"===t.type?e[t.value.substring(1)]??"":t.value:"")))}function St(t,e,r){const o=Pt(t,e,r);if(!r.to||o)return o??{}}function Pt(t,e,r){if(!e.startsWith(t))return;const o=bt(e="/"!=t?e.substring(t.length):e),a=bt(`${r.to??"*"}`),s={};let n=(()=>{for(let t=0;t<Math.max(o.length,a.length);t++){const e=o[t],n=a[t],i=t===a.length-1,c=t===o.length-1;if(n){if("wildcard"===n.type)return!!e?.value&&(s["*"]=ft(o.slice(t).map((t=>t.value))),!0);if("pathname"===n.type){if("/"===n.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(n.value!==e.value)return!1}else if(n.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===n.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(s[n.value.substring(1)]=e.value)}}if(i&&!c)return!!r.fuzzy}return!0})();return n?s:void 0}function Lt(t,e){var r,o,a,s="";for(r in t)if(void 0!==(a=t[r]))if(Array.isArray(a))for(o=0;o<a.length;o++)s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(a[o]);else s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(a);return(e||"")+s}function Et(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||("0"===e.charAt(0)?e:0*+e==0?+e:e))}function Mt(t){for(var e,r,o={},a=t.split("&");e=a.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],Et(e.shift())):o[r]=Et(e.shift());return o}class At{constructor(t,e,r,o,a){Object.assign(this,{...t,originalIndex:r,options:e,getRouter:()=>a,childRoutes:void 0,getParentRoute:()=>o}),a.options.createRoute?.({router:a,route:this})}}const xt="__root__",_t=(t={},e=[],r=!0,o,a)=>{r&&(t.path=xt),o===xt&&(o="");let s=r?xt:t.path;s&&"/"!==s&&(s=vt(s));const i=s||t.id;let c=ft([o,i]);s===xt&&(s="/"),c!==xt&&(c=ft(["/",c]));const u=c===xt?"/":gt(ft([a,s]));return{id:c,routeId:i,path:s,fullPath:u,options:t,children:e,addChildren:e=>_t(t,e,!1,o,a),createRoute:t=>_t(t,void 0,!1,c,u),generate:()=>{n(!1)}}};ot(!1);let Ot=[],Rt=!1;function Dt(){Rt||(Ot.forEach((t=>t())),Ot=[])}function jt(t,e){const r=new Set,o={state:t,subscribe:t=>(r.add(t),()=>r.delete(t)),setState:t=>{const a=o.state;o.state=rt((e=>{t(e)}))(a),e&&console.log(o.state),Ot.push((()=>r.forEach((t=>t(o.state,a))))),Dt()}};return o}function Ct(t){Rt=!0,t(),Rt=!1,Dt()}function kt(t,e){if(t===e)return t;const r=e,o=Array.isArray(t)&&Array.isArray(r);if(o||Ft(t)&&Ft(r)){const e=o?t.length:Object.keys(t).length,a=o?r:Object.keys(r),s=a.length,n=o?[]:{};let i=0;for(let e=0;e<s;e++){const s=o?e:a[e];n[s]=kt(t[s],r[s]),n[s]===t[s]&&i++}return e===s&&i===e?t:n}return r}function Ft(t){if(!It(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!It(r)&&!!r.hasOwnProperty("isPrototypeOf")}function It(t){return"[object Object]"===Object.prototype.toString.call(t)}const $t=["component","errorComponent","pendingComponent"];class Nt{abortController=new AbortController;#t="";#e=()=>{};onLoaderDataListeners=new Set;constructor(t,e,r){Object.assign(this,{route:e,router:t,matchId:r.matchId,pathname:r.pathname,params:r.params,store:jt({routeSearch:{},search:{},status:"idle",routeLoaderData:{},loaderData:{},isFetching:!1,invalid:!1,invalidAt:1/0})}),this.__hasLoaders()||this.store.setState((t=>t.status="success"))}#r=t=>{Ct((()=>{this.store.setState((e=>{e.routeLoaderData=t})),this.#o()}))};cancel=()=>{this.abortController?.abort()};load=async t=>{const e=Date.now(),r=t?.preload?Math.max(t?.maxAge,t?.gcMaxAge):0;if(t?.preload&&r>0){if(this.router.store.state.currentMatches.find((t=>t.id===this.id)))return;this.router.store.setState((r=>{r.matchCache[this.id]={gc:e+t.gcMaxAge,match:this}}))}if("success"===this.store.state.status&&this.getIsInvalid()||"error"===this.store.state.status||"idle"===this.store.state.status){const e=t?.preload?t?.maxAge:void 0;await this.fetch({maxAge:e})}};fetch=async t=>(this.__loadPromise=new Promise((async e=>{const r=""+Date.now()+Math.random();this.#t=r;const o=()=>r!==this.#t?this.__loadPromise?.then((()=>e())):void 0;let a;Ct((()=>{"idle"===this.store.state.status&&this.store.setState((t=>t.status="loading")),this.store.setState((t=>t.invalid=!1))})),this.store.setState((t=>t.isFetching=!0)),this.#e=e;const s=(async()=>{await Promise.all($t.map((async t=>{const e=this.route.options[t];this[t]?.preload&&(this[t]=await this.router.options.loadComponent(e))})))})(),n=Promise.resolve().then((async()=>{try{if(this.route.options.loader){const t=await this.router.loadMatchData(this);if(a=o())return a;this.#r(t)}return this.store.setState((e=>{e.error=void 0,e.status="success",e.updatedAt=Date.now(),e.invalidAt=e.updatedAt+(t?.maxAge??this.route.options.loaderMaxAge??this.router.options.defaultLoaderMaxAge??0)})),this.store.state.routeLoaderData}catch(t){if(a=o())return a;throw this.store.setState((e=>{e.error=t,e.status="error",e.updatedAt=Date.now()})),t}})),i=async()=>{if(a=o())return a;this.store.setState((t=>t.isFetching=!1)),this.#e(),delete this.__loadPromise};try{await Promise.all([s,n.catch((()=>{}))]),i()}catch{i()}})),this.__loadPromise);invalidate=async()=>{this.store.setState((t=>t.invalid=!0)),this.router.store.state.currentMatches.find((t=>t.id===this.id))&&await this.load()};__hasLoaders=()=>!(!this.route.options.loader&&!$t.some((t=>this.route.options[t]?.preload)));getIsInvalid=()=>{const t=Date.now();return this.store.state.invalid||this.store.state.invalidAt<t};#o=()=>{this.store.setState((t=>{t.loaderData=kt(t.loaderData,{...this.parentMatch?.store.state.loaderData,...t.routeLoaderData})})),this.onLoaderDataListeners.forEach((t=>t()))};__setParentMatch=t=>{!this.parentMatch&&t&&(this.parentMatch=t,this.parentMatch.__onLoaderData((()=>{this.#o()})))};__onLoaderData=t=>{this.onLoaderDataListeners.add(t)};__validate=()=>{const t=this.parentMatch?.store.state.search??this.router.store.state.latestLocation.search;try{const e=this.store.state.routeSearch;let r=("object"==typeof this.route.options.validateSearch?this.route.options.validateSearch.parse:this.route.options.validateSearch)?.(t)??{};Ct((()=>{e!==r&&this.store.setState((t=>t.invalid=!0)),this.store.setState((e=>{e.routeSearch=r,e.search={...t,...r}}))})),$t.map((async t=>{const e=this.route.options[t];"function"!=typeof this[t]&&(this[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",void this.store.setState((t=>{t.status="error",t.error=e}))}}}const Tt=Bt(JSON.parse),zt=Ut(JSON.stringify);function Bt(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=Mt(e);for(let e in r){const o=r[e];if("string"==typeof o)try{r[e]=t(o)}catch(t){}}return r}}function Ut(t){return e=>{(e={...e})&&Object.keys(e).forEach((r=>{const o=e[r];if(void 0===o||void 0===o)delete e[r];else if(o&&"object"==typeof o&&null!==o)try{e[r]=t(o)}catch(t){}}));const r=Lt(e).toString();return r?`?${r}`:""}}const Ht=async({router:t,routeMatch:e})=>{const r=t.buildNext({to:".",search:t=>({...t??{},__data:{matchId:e.id}})}),o=await fetch(r.href,{method:"GET",signal:e.abortController.signal});if(o.ok)return o.json();throw new Error("Failed to fetch match data")};class Kt{startedLoadingAt=Date.now();resolveNavigation=()=>{};constructor(t){this.options={defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??zt,parseSearch:t?.parseSearch??Tt,fetchServerDataFn:t?.fetchServerDataFn??Ht},this.history=this.options?.history??nt(),this.store=jt(Gt()),this.basepath="",this.update(t),this.options.createRouter?.(this)}reset=()=>{this.store.setState((t=>Object.assign(t,Gt())))};mount=()=>{if(!Wt){this.store.state.currentMatches.length||this.load();const t=this.history.listen((()=>{this.load(this.#a(this.store.state.latestLocation))})),e="visibilitychange",r="focus";return window.addEventListener&&(window.addEventListener(e,this.#s,!1),window.addEventListener(r,this.#s,!1)),()=>{t(),window.removeEventListener&&(window.removeEventListener(e,this.#s),window.removeEventListener(r,this.#s))}}return()=>{}};update=t=>{this.store.state.latestLocation||this.store.setState((t=>{t.latestLocation=this.#a(),t.currentLocation=t.latestLocation})),Object.assign(this.options,t);const{basepath:e,routeConfig:r}=this.options;return this.basepath=`/${vt(e??"")??""}`,r&&(this.routesById={},this.routeTree=this.#n(r)),this};buildNext=t=>{const e=this.#i(t),r=this.matchRoutes(e.pathname),o=r.map((t=>t.route.options.preSearchFilters??[])).flat().filter(Boolean),a=r.map((t=>t.route.options.postSearchFilters??[])).flat().filter(Boolean);return this.#i({...t,__preSearchFilters:o,__postSearchFilters:a})};cancelMatches=()=>{[...this.store.state.currentMatches,...this.store.state.pendingMatches||[]].forEach((t=>{t.cancel()}))};load=async t=>{let e=Date.now();const r=e;let o;this.startedLoadingAt=r,this.cancelMatches(),Ct((()=>{t&&this.store.setState((e=>{e.latestLocation=t})),o=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),this.store.setState((t=>{t.status="loading",t.pendingMatches=o,t.pendingLocation=this.store.state.latestLocation}))}));try{await this.loadMatches(o)}catch(t){console.warn(t),n(!1)}if(this.startedLoadingAt!==r)return this.navigationPromise;const a=this.store.state.currentMatches,s=[],i=[];a.forEach((t=>{o.find((e=>e.id===t.id))?i.push(t):s.push(t)}));const c=o.filter((t=>!a.find((e=>e.id===t.id))));e=Date.now(),s.forEach((t=>{t.__onExit?.({params:t.params,search:t.store.state.routeSearch}),"error"!==t.store.state.status||t.store.state.isFetching||t.store.setState((t=>{t.status="idle",t.error=void 0}));const r=Math.max(t.route.options.loaderGcMaxAge??this.options.defaultLoaderGcMaxAge??0,t.route.options.loaderMaxAge??this.options.defaultLoaderMaxAge??0);r>0&&this.store.setState((o=>{o.matchCache[t.id]={gc:r==1/0?Number.MAX_SAFE_INTEGER:e+r,match:t}}))})),i.forEach((t=>{t.route.options.onTransition?.({params:t.params,search:t.store.state.routeSearch})})),c.forEach((t=>{t.__onExit=t.route.options.onLoaded?.({params:t.params,search:t.store.state.search}),delete this.store.state.matchCache[t.id]})),this.store.setState((t=>{Object.assign(t,{status:"idle",currentLocation:this.store.state.latestLocation,currentMatches:o,pendingLocation:void 0,pendingMatches:void 0})})),this.options.onRouteChange?.(),this.resolveNavigation()};cleanMatchCache=()=>{const t=Date.now();this.store.setState((e=>{Object.keys(e.matchCache).forEach((r=>{const o=e.matchCache[r];"loading"!==o.match.store.state.status&&(o.gc>0&&o.gc>t||delete e.matchCache[r])}))}))};getRoute=t=>{const e=this.routesById[t];return n(e),e};loadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(r),r};preloadRoute=async(t=this.store.state.latestLocation,e)=>{const r=this.buildNext(t),o=this.matchRoutes(r.pathname,{strictParseParams:!0});return await this.loadMatches(o,{preload:!0,maxAge:e.maxAge??this.options.defaultPreloadMaxAge??this.options.defaultLoaderMaxAge??0,gcMaxAge:e.gcMaxAge??this.options.defaultPreloadGcMaxAge??this.options.defaultLoaderGcMaxAge??0}),o};matchRoutes=(t,e)=>{const r=[];if(!this.routeTree)return r;const o=[...this.store.state.currentMatches,...this.store.state.pendingMatches??[]],a=async s=>{let n=ut(r)?.params??{};const i=this.options.filterRoutes?.(s)??s;let c=[];const u=(r,o)=>(o.some((o=>{if(!o.path&&o.childRoutes?.length)return u([...c,o],o.childRoutes);const a=!("/"===o.path&&!o.childRoutes?.length),s=St(this.basepath,t,{to:o.fullPath,fuzzy:a,caseSensitive:o.options.caseSensitive??this.options.caseSensitive});if(s){let t;try{t=o.options.parseParams?.(s)??s}catch(t){if(e?.strictParseParams)throw t}n={...n,...t}}return s&&(c=[...r,o]),!!c.length})),!!c.length);if(u([],i),!c.length)return;c.forEach((t=>{const e=wt(t.path,n),a=wt(t.id,n,!0),s=o.find((t=>t.id===a))||this.store.state.matchCache[a]?.match||new Nt(this,t,{matchId:a,params:n,pathname:ft([this.basepath,e])});r.push(s)}));const h=ut(c);h.childRoutes?.length&&a(h.childRoutes)};return a([this.routeTree]),function(t){t.forEach(((e,r)=>{const o=t[r-1];o&&e.__setParentMatch(o)}))}(r),r};loadMatches=async(t,e)=>{this.cleanMatchCache(),t.forEach((async t=>{t.__validate()})),await Promise.all(t.map((async t=>{try{await(t.route.options.beforeLoad?.({router:this,match:t}))}catch(r){throw e?.preload||t.route.options.onLoadError?.(r),r}})));const r=t.map((async(r,o)=>{const a=t[1],s=r.store.state.search;s.__data?.matchId&&s.__data.matchId!==r.id||(r.load(e),"success"!==r.store.state.status&&r.__loadPromise&&await r.__loadPromise,a&&await a.__loadPromise)}));await Promise.all(r)};loadMatchData=async t=>Wt||!this.options.useServerData?await(t.route.options.loader?.({params:t.params,search:t.store.state.routeSearch,signal:t.abortController.signal}))||{}:this.options.fetchServerDataFn({router:this,routeMatch:t});invalidateRoute=async t=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname).map((t=>t.id));await Promise.allSettled([...this.store.state.currentMatches,...this.store.state.pendingMatches??[]].map((async t=>{if(r.includes(t.id))return t.invalidate()})))};reload=()=>{this.navigate({fromCurrent:!0,replace:!0,search:!0})};resolvePath=(t,e)=>yt(this.basepath,t,pt(e));navigate=async({from:t,to:e=".",search:r,hash:o,replace:a,params:s})=>{const i=String(e),c=String(t);let u;try{new URL(`${i}`),u=!0}catch(t){}return n(!u),this.#c({from:c,to:i,search:r,hash:o,replace:a,params:s})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);return e?.pending?!!this.store.state.pendingLocation&&St(this.basepath,this.store.state.pendingLocation.pathname,{...e,to:r.pathname}):St(this.basepath,this.store.state.currentLocation.pathname,{...e,to:r.pathname})};buildLink=({from:t,to:e=".",search:r,params:o,hash:a,target:s,replace:n,activeOptions:i,preload:c,preloadMaxAge:u,preloadGcMaxAge:h,preloadDelay:l,disabled:d})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const f={from:t,to:e,search:r,params:o,hash:a,replace:n},p=this.buildNext(f);c=c??this.options.defaultPreload;const m=l??this.options.defaultPreloadDelay??0,g=this.store.state.currentLocation.pathname===p.pathname,v=this.store.state.currentLocation.pathname.split("/"),y=p.pathname.split("/").every(((t,e)=>t===v[e])),b=this.store.state.currentLocation.hash===p.hash;return{type:"internal",next:p,handleFocus:t=>{c&&this.preloadRoute(f,{maxAge:u,gcMaxAge:h}).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{d||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||s&&"_self"!==s||0!==t.button||(t.preventDefault(),!g||r||a||this.invalidateRoute(f),this.#c(f))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(f,{maxAge:u,gcMaxAge:h}).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:(i?.exact?g:y)&&(!i?.includeHash||b),disabled:d}};dehydrate=()=>({state:{...dt(this.store.state,["latestLocation","currentLocation","status","lastUpdated"]),currentMatches:this.store.state.currentMatches.map((t=>({matchId:t.id,state:{...dt(t.store.state,["status","routeLoaderData","invalidAt","invalid"])}})))},context:this.options.context});hydrate=t=>{this.store.setState((e=>{this.options.context=t.context;const r=this.matchRoutes(t.state.latestLocation.pathname,{strictParseParams:!0});r.forEach(((e,r)=>{const o=t.state.currentMatches[r];n(o&&o.matchId===e.id),Object.assign(e,o)})),r.forEach((t=>t.__validate())),Object.assign(e,{...t.state,currentMatches:r})}))};getLoader=t=>{const e=t.from||"/",r=this.getRoute(e);if(!r)return;let o=this.store.state.loaders[e]||(()=>(this.store.setState((t=>{t.loaders[e]={pending:[],fetch:async t=>{if(!r)return;const o={loadedAt:Date.now(),loaderContext:t};this.store.setState((t=>{t.loaders[e].current=o,t.loaders[e].latest=o,t.loaders[e].pending.push(o)}));try{return await(r.options.loader?.(t))}finally{this.store.setState((t=>{t.loaders[e].pending=t.loaders[e].pending.filter((t=>t!==o))}))}}}})),this.store.state.loaders[e]))();return o};#n=t=>{const e=(t,r)=>t.map(((t,o)=>{const a=t.options,s=new At(t,a,o,r,this);if(this.routesById[s.id])throw new Error;this.routesById[s.id]=s;const n=t.children;return s.childRoutes=n.length?e(n,s):void 0,s}));return e([t])[0]};#a=t=>{let{pathname:e,search:r,hash:o,state:a}=this.history.location;const s=this.options.parseSearch(r);return{pathname:e,searchStr:r,search:kt(t?.search,s),hash:o.split("#").reverse()[0]??"",href:`${e}${r}${o}`,state:a,key:a?.key||"__init__"}};#s=()=>{this.load()};#i=(t={})=>{const e=t.fromCurrent?this.store.state.latestLocation.pathname:t.from??this.store.state.latestLocation.pathname;let r=yt(this.basepath??"/",e,`${t.to??"."}`);const o=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),a=this.matchRoutes(r),s={...ut(o)?.params};let n=!0===(t.params??!0)?s:lt(t.params,s);n&&a.map((t=>t.route.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},n,t(n))})),r=wt(r,n??{});const i=t.__preSearchFilters?.length?t.__preSearchFilters?.reduce(((t,e)=>e(t)),this.store.state.latestLocation.search):this.store.state.latestLocation.search,c=!0===t.search?i:t.search?lt(t.search,i)??{}:t.__preSearchFilters?.length?i:{},u=t.__postSearchFilters?.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),c):c,h=kt(this.store.state.latestLocation.search,u),l=this.options.stringifySearch(h);let d=!0===t.hash?this.store.state.latestLocation.hash:lt(t.hash,this.store.state.latestLocation.hash);return d=d?`#${d}`:"",{pathname:r,search:h,searchStr:l,state:this.store.state.latestLocation.state,hash:d,href:`${r}${l}${d}`,key:t.key}};#c=t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let o="replace";t.replace||(o="push");this.store.state.latestLocation.href===e.href&&!e.key&&(o="replace");const a=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===o?"push":"replace"](a,{id:r,...e.state}),this.load(this.#a(this.store.state.latestLocation)),this.navigationPromise=new Promise((t=>{const e=this.resolveNavigation;this.resolveNavigation=()=>{e(),t()}}))}}const Wt="undefined"==typeof window||!window.document.createElement;function Gt(){return{status:"idle",latestLocation:null,currentLocation:null,currentMatches:[],loaders:{},lastUpdated:Date.now(),matchCache:{},get isFetching(){return"loading"===this.status||this.currentMatches.some((t=>t.store.state.isFetching))},get isPreloading(){return Object.values(this.matchCache).some((t=>t.match.store.state.isFetching&&!this.currentMatches.find((e=>e.id===t.match.id))))}}}function Jt(t,e=(t=>t),o){return r.useSyncExternalStoreWithSelector(t.subscribe,(()=>t.state),(()=>t.state),e,o?qt:void 0)}function qt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(e,r[o])||!Object.is(t[r[o]],e[r[o]]))return!1;return!0}function Xt(t){const e=Zt(),{type:r,children:o,target:s,activeProps:n=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:u,hash:h,search:l,params:d,to:f=".",preload:p,preloadDelay:m,preloadMaxAge:g,replace:v,style:y,className:b,onClick:w,onFocus:S,onMouseEnter:P,onMouseLeave:L,onTouchStart:E,onTouchEnd:M,...A}=t,x=e.buildLink(t);if("external"===x.type){const{href:t}=x;return{href:t}}const{handleClick:_,handleFocus:O,handleEnter:R,handleLeave:D,isActive:j,next:C}=x,k=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},F=j?lt(n,{})??{}:{},I=j?{}:lt(i,{})??{};return{...F,...I,...A,href:u?void 0:C.href,onClick:k([w,t=>{a.startTransition?a.startTransition((()=>{_(t)})):_(t)}]),onFocus:k([S,O]),onMouseEnter:k([P,R]),onMouseLeave:k([L,D]),target:s,style:{...y,...F.style,...I.style},className:[b,F.className,I.className].filter(Boolean).join(" ")||void 0,...u?{role:"link","aria-disabled":!0}:void 0,"data-status":j?"active":void 0}}const Vt=a.forwardRef(((t,e)=>{const r=Xt(t);return a.createElement("a",s({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))})),Qt=a.createContext(null),Yt=a.createContext(null);function Zt(){const t=a.useContext(Yt);return ht(!t,"useRouter must be used inside a <Router> component!"),t.router}function te(){return a.useContext(Qt)}function ee(t){const e=Zt(),r=te()[0],o=t?.from?e.store.state.currentMatches.find((e=>e.route.id===t?.from)):r;return n(o,t?.from&&t.from),(t?.strict??1)&&n(r.route.id==o?.route.id,(o?.route.id,r.route.id,o?.route.id,o?.route.id)),Jt(o.store,(e=>t?.track?.(o)??o),t?.shallow),o}function re(){const t=Zt();return e=>{const{pending:r,caseSensitive:o,...a}=e;return t.matchRoute(a,{pending:r,caseSensitive:o})}}function oe(){const t=te().slice(1),e=t[0];return e?a.createElement(ae,{matches:t,match:e}):null}function ae({matches:t,match:e}){const r=Zt();Jt(e.store);const o=a.useCallback((()=>null),[]),s=a.useCallback((t=>{if("error"===t.match.store.state.status)throw t.match.store.state.error;if("success"===t.match.store.state.status)return a.createElement(t.match.component??r.options.defaultComponent??oe);if("loading"===t.match.store.state.status)throw t.match.__loadPromise;n(!1)}),[]),i=e.pendingComponent??r.options.defaultPendingComponent??o,c=e.errorComponent??r.options.defaultErrorComponent;return a.createElement(Qt.Provider,{value:t},a.createElement(a.Suspense,{fallback:a.createElement(i,null)},a.createElement(se,{key:e.route.id,errorComponent:c,match:e},a.createElement(s,{match:e}))))}class se extends a.Component{state={error:!1,info:void 0};componentDidCatch(t,e){console.error(`Error in route match: ${this.props.match.id}`),console.error(t),this.setState({error:t,info:e})}render(){return a.createElement(ne,s({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function ne(t){const[e,r]=a.useState(t.errorState);Zt();const o=t.errorComponent??ie;return a.useEffect((()=>{t.errorState.error&&r(t.errorState),t.reset()}),[t.errorState.error]),t.errorState.error?a.createElement(o,e):t.children}function ie({error:t}){return a.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},a.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),a.createElement("div",{style:{height:".5rem"}}),a.createElement("div",null,a.createElement("pre",null,t.message?a.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)))}t.DefaultErrorBoundary=ie,t.Link=Vt,t.MatchRoute=function(t){const e=re()(t);return e?"function"==typeof t.children?t.children(e):e?t.children:null:null},t.Outlet=oe,t.ReactRouter=class extends Kt{constructor(t){super({...t,loadComponent:async t=>(t.preload&&await t.preload(),t)})}},t.Route=At,t.RouteMatch=Nt,t.Router=Kt,t.RouterProvider=function({router:t,...e}){t.update(e);const[,,r]=Jt(t.store,(t=>[t.status,t.pendingMatches,t.currentMatches]),!0);return a.useEffect(t.mount,[t]),a.createElement(a.Fragment,null,a.createElement(Yt.Provider,{value:{router:t}},a.createElement(Qt.Provider,{value:[void 0,...r]},a.createElement(oe,null))))},t.batch=Ct,t.cleanPath=pt,t.createAction=function(t){const e=jt({submissions:[]},t.debug);return{options:t,store:e,reset:()=>{e.setState((t=>{t.submissions=[]}))},submit:async r=>{const o={submittedAt:Date.now(),status:"pending",payload:r,invalidate:()=>{a((t=>{t.isInvalid=!0}))},getIsLatest:()=>e.state.submissions[e.state.submissions.length-1]?.submittedAt===o.submittedAt},a=t=>{e.setState((e=>{const r=e.submissions.find((t=>t.submittedAt===o.submittedAt));n(r),t(r)}))};e.setState((e=>{e.submissions.push(o),e.submissions.reverse(),e.submissions=e.submissions.slice(0,t.maxSubmissions??10),e.submissions.reverse()}));const s=async()=>{t.onEachSettled?.(o),o.getIsLatest()&&await(t.onLatestSettled?.(o))};try{const e=await(t.action?.(o.payload));return a((t=>{t.response=e})),await(t.onEachSuccess?.(o)),o.getIsLatest()&&await(t.onLatestSuccess?.(o)),await s(),a((t=>{t.status="success"})),e}catch(e){throw console.error(e),a((t=>{t.error=e})),await(t.onEachError?.(o)),o.getIsLatest()&&await(t.onLatestError?.(o)),await s(),a((t=>{t.status="error"})),e}}}},t.createBrowserHistory=nt,t.createHashHistory=function(){return nt({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=function(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,o={};return st({getLocation:()=>it(e[r],o),listener:t=>(window.addEventListener(at,t),()=>{window.removeEventListener(at,t)}),pushState:(t,a)=>{o={...a,key:ct()},e.push(t),r++},replaceState:(t,a)=>{o={...a,key:ct()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t)})},t.createRouteConfig=_t,t.createStore=jt,t.decode=Mt,t.defaultFetchServerDataFn=Ht,t.defaultParseSearch=Tt,t.defaultStringifySearch=zt,t.encode=Lt,t.functionalUpdate=lt,t.interpolatePath=wt,t.invariant=n,t.joinPaths=ft,t.last=ut,t.lazy=function(t){const e=a.lazy(t);return e.preload=async()=>{await t()},e},t.matchByPath=Pt,t.matchPathname=St,t.matchesContext=Qt,t.parsePathname=bt,t.parseSearchWith=Bt,t.pick=dt,t.replaceEqualDeep=kt,t.resolvePath=yt,t.rootRouteId=xt,t.routerContext=Yt,t.stringifySearchWith=Ut,t.trackDeep=function(t){const e=new Set;return JSON.stringify(t,((t,r)=>{if("function"!=typeof r){if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}})),t},t.trimPath=vt,t.trimPathLeft=mt,t.trimPathRight=gt,t.useAction=function(t,e){Jt(t.store,(t=>e?.track?.(t)??t),!0);const[r]=a.useState({});return Object.assign(r,{...t,latestSubmission:t.store.state.submissions[t.store.state.submissions.length-1],pendingSubmissions:a.useMemo((()=>t.store.state.submissions.filter((t=>"pending"===t.status))),[t.store.state.submissions])}),r},t.useLinkProps=Xt,t.useLoaderData=function(t){const e=ee(t);return n(e,t?.from&&t.from),Jt(e.store,(e=>t?.track?.(e.loaderData)??e.loaderData)),e.store.state.loaderData},t.useMatch=ee,t.useMatchRoute=re,t.useMatches=te,t.useNavigate=function(t){const e=Zt();return r=>e.navigate({...t,...r})},t.useParams=function(t){const e=Zt();return Jt(e.store,(e=>{const r=ut(e.currentMatches)?.params;return t?.track?.(r)??r})),ut(e.store.state.currentMatches)?.params},t.useRoute=function(t){const e=Zt().getRoute(t);return n(e),e},t.useRouter=Zt,t.useRouterStore=function(t,e){return Jt(Zt().store,t,e)},t.useSearch=function(t){const e=ee(t);return Jt(e.store,(e=>t?.track?.(e.search)??e.search)),e.store.state.search},t.useStore=Jt,t.warning=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/react-router",
"author": "Tanner Linsley",
"version": "0.0.1-beta.49",
"version": "0.0.1-beta.50",
"license": "MIT",

@@ -46,3 +46,3 @@ "repository": "tanstack/router",

"use-sync-external-store": "^1.2.0",
"@tanstack/router-core": "0.0.1-beta.49"
"@tanstack/router-core": "0.0.1-beta.50"
},

@@ -49,0 +49,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc