@tanstack/react-router 0.0.1-beta.48 → 0.0.1-beta.49

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("use-sync-external-store/shim")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ReactRouter={},t.React,t.shim)}(this,(function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var o=n(e);function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}var s,i=void 0,c=null,l=0,u=null,h=class{value;fn;observers=null;sources=null;state;effect;cleanups=null;alwaysUpdate=!1;constructor(t,e){0!=e?(this.fn=t,this.value=void 0,this.state=2,s?s.push(this):console.error("Memos and effects must be wrapped in a createRoot"),this.effect=2==e,this.effect&&this.update()):(this.fn=void 0,this.value=t,this.state=0,this.effect=!1)}get(){return i&&(!c&&i.sources&&i.sources[l]==this?l++:c?c.push(this):c=[this]),this.fn&&this.updateIfNecessary(),this.value}set(t){const e=!u,r="function"==typeof t?t(this.value):t;if((this.value!==r||this.alwaysUpdate)&&this.observers)for(let t=0;t<this.observers.length;t++)this.observers[t].stale(2);return this.value=r,e&&d(),r}stale(t){if(this.state<t&&(0===this.state&&this.effect&&(u?u.push(this):u=[this]),this.state=t,this.observers))for(let t=0;t<this.observers.length;t++)this.observers[t].stale(1)}update(){const t=this.value,e=i,r=c,n=l;i=this,c=null,l=0;try{if(this.cleanups&&(this.cleanups.forEach((t=>t())),this.cleanups=null),this.value=this.fn(),c){if(this.removeParentObservers(l),this.sources&&l>0){this.sources.length=l+c.length;for(let t=0;t<c.length;t++)this.sources[l+t]=c[t]}else this.sources=c;for(let t=l;t<this.sources.length;t++){const e=this.sources[t];e.observers?e.observers.push(this):e.observers=[this]}}else this.sources&&l<this.sources.length&&(this.removeParentObservers(l),this.sources.length=l)}finally{c=r,i=e,l=n}if((t!==this.value||this.alwaysUpdate)&&this.observers)for(let t=0;t<this.observers.length;t++)this.observers[t].state=2;this.state=0}updateIfNecessary(){if(1===this.state)for(const t of this.sources)if(t.updateIfNecessary(),2===this.state)break;2===this.state&&this.update(),this.state=0}removeParentObservers(t){if(this.sources)for(let e=t;e<this.sources.length;e++){const t=this.sources[e],r=t.observers.findIndex((t=>t===this));t.observers[r]=t.observers[t.observers.length-1],t.observers.pop()}}destroy(){this.cleanups&&(this.cleanups.forEach((t=>t())),this.cleanups=null),this.removeParentObservers(0)}};function d(){if(u){for(let t=0;t<u.length;t++)u[t].get();u=null}}function f(t){const e=new h(t,2);return e.get.bind(e)}function p(t){let e=[];return s=e,t(),s=null,()=>{e&&(e.forEach((t=>t.destroy())),e=null)}}function m(t){u=[];let e=t();return d(),e}function v(t){const e=i;i=void 0;try{return t()}finally{i=e}}var g=Symbol("store-raw"),y=Symbol("track"),b=Symbol("store-proxy"),w=Symbol("store-node");function P(t){let e=t[b];if(!e&&(Object.defineProperty(t,b,{value:e=new Proxy(t,I)}),!Array.isArray(t))){const r=Object.keys(t),n=Object.getOwnPropertyDescriptors(t);for(let o=0,a=r.length;o<a;o++){const a=r[o];if(n[a].get){const r=n[a].get.bind(e);Object.defineProperty(t,a,{enumerable:n[a].enumerable,get:r})}}}return e}function E(t){let e;return null!=t&&"object"==typeof t&&(t[b]||!(e=Object.getPrototypeOf(t))||e===Object.prototype||Array.isArray(t))}function _(t,e=new Set){let r,n,o,a;if(r=null!=t&&t[g])return r;if(!E(t)||e.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):e.add(t);for(let r=0,a=t.length;r<a;r++)o=t[r],(n=_(o,e))!==o&&(t[r]=n)}else{Object.isFrozen(t)?t=Object.assign({},t):e.add(t);const r=Object.keys(t),s=Object.getOwnPropertyDescriptors(t);for(let i=0,c=r.length;i<c;i++)a=r[i],s[a].get||(o=t[a],(n=_(o,e))!==o&&(t[a]=n))}return t}function M(t){let e=t[w];return e||Object.defineProperty(t,w,{value:e={}}),e}function L(t,e,r){return t[e]||(t[e]=x(r))}function S(t){if(i){const e=M(t);(e._||(e._=x())).get()}}function x(t){const e=new h(t,0);return e.alwaysUpdate=!0,e}var R,A=!1,I={get(t,e,r){if(e===g)return t;if(e===b)return r;if(e===y)return S(t),r;const n=M(t),o=n.hasOwnProperty(e);let a=o?n[e].get():t[e];if(e===w||"__proto__"===e)return a;if(!o){const r=Object.getOwnPropertyDescriptor(t,e);!i||"function"==typeof a&&!t.hasOwnProperty(e)||r&&r.get||(a=L(n,e,a).get())}return E(a)?P(a):a},has(t,e){return e===g||e===b||e===y||e===w||"__proto__"===e||(this.get(t,e,t),e in t)},set:(t,e,r)=>(A&&O(t,e,_(r)),!0),deleteProperty:(t,e)=>(A&&O(t,e,void 0,!0),!0),ownKeys:function(t){return S(t),Reflect.ownKeys(t)},getOwnPropertyDescriptor:function(t,e){const r=Reflect.getOwnPropertyDescriptor(t,e);return r&&!r.get&&r.configurable&&e!==b&&e!==w?(delete r.value,delete r.writable,r.get=()=>t[b][e],r):r}};function O(t,e,r,n=!1){if(!n&&t[e]===r)return;const o=t[e],a=t.length;n?delete t[e]:t[e]=r;const s=M(t);let i;(i=L(s,e,o))&&i.set((()=>r)),Array.isArray(t)&&t.length!==a&&(i=L(s,"length",a))&&i.set(t.length),(i=s._)&&i.set()}function C(t){const e=P(_(t));return[e,t=>{m((()=>{try{A=!0,t(e)}finally{A=!1}}))}]}function k(){return k=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},k.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(R||(R={}));var j="beforeunload",D="popstate";function F(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=r.location,e=t.pathname,o=t.search,a=t.hash,s=n.state||{};return[s.idx,{pathname:e,search:o,hash:a,state:s.usr||null,key:s.key||"default"}]}var a=null;r.addEventListener(D,(function(){if(a)h.call(a),a=null;else{var t=R.Pop,e=o(),r=e[0],n=e[1];if(h.length){if(null!=r){var s=c-r;s&&(a={action:t,location:n,retry:function(){g(-1*s)}},g(s))}}else v(t)}}));var s=R.Pop,i=o(),c=i[0],l=i[1],u=U(),h=U();function d(t){return"string"==typeof t?t:z(t)}function f(t,e){return void 0===e&&(e=null),k({pathname:l.pathname,hash:"",search:""},"string"==typeof t?H(t):t,{state:e,key:B()})}function p(t,e){return[{usr:t.state,key:t.key,idx:e},d(t)]}function m(t,e,r){return!h.length||(h.call({action:t,location:e,retry:r}),!1)}function v(t){s=t;var e=o();c=e[0],l=e[1],u.call({action:s,location:l})}function g(t){n.go(t)}null==c&&(c=0,n.replaceState(k({},n.state,{idx:c}),""));var y={get action(){return s},get location(){return l},createHref:d,push:function t(e,o){var a=R.Push,s=f(e,o);if(m(a,s,(function(){t(e,o)}))){var i=p(s,c+1),l=i[0],u=i[1];try{n.pushState(l,"",u)}catch(t){r.location.assign(u)}v(a)}},replace:function t(e,r){var o=R.Replace,a=f(e,r);if(m(o,a,(function(){t(e,r)}))){var s=p(a,c),i=s[0],l=s[1];n.replaceState(i,"",l),v(o)}},go:g,back:function(){g(-1)},forward:function(){g(1)},listen:function(t){return u.push(t)},block:function(t){var e=h.push(t);return 1===h.length&&r.addEventListener(j,$),function(){e(),h.length||r.removeEventListener(j,$)}}};return y}function N(t){void 0===t&&(t={});var e=t,r=e.initialEntries,n=void 0===r?["/"]:r,o=e.initialIndex,a=n.map((function(t){return k({pathname:"/",search:"",hash:"",state:null,key:B()},"string"==typeof t?H(t):t)})),s=T(null==o?a.length-1:o,0,a.length-1),i=R.Pop,c=a[s],l=U(),u=U();function h(t,e){return void 0===e&&(e=null),k({pathname:c.pathname,search:"",hash:""},"string"==typeof t?H(t):t,{state:e,key:B()})}function d(t,e,r){return!u.length||(u.call({action:t,location:e,retry:r}),!1)}function f(t,e){i=t,c=e,l.call({action:i,location:c})}function p(t){var e=T(s+t,0,a.length-1),r=R.Pop,n=a[e];d(r,n,(function(){p(t)}))&&(s=e,f(r,n))}var m={get index(){return s},get action(){return i},get location(){return c},createHref:function(t){return"string"==typeof t?t:z(t)},push:function t(e,r){var n=R.Push,o=h(e,r);d(n,o,(function(){t(e,r)}))&&(s+=1,a.splice(s,a.length,o),f(n,o))},replace:function t(e,r){var n=R.Replace,o=h(e,r);d(n,o,(function(){t(e,r)}))&&(a[s]=o,f(n,o))},go:p,back:function(){p(-1)},forward:function(){p(1)},listen:function(t){return l.push(t)},block:function(t){return u.push(t)}};return m}function T(t,e,r){return Math.min(Math.max(t,e),r)}function $(t){t.preventDefault(),t.returnValue=""}function U(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter((function(t){return t!==e}))}},call:function(e){t.forEach((function(t){return t&&t(e)}))}}}function B(){return Math.random().toString(36).substr(2,8)}function z(t){var e=t.pathname,r=void 0===e?"/":e,n=t.search,o=void 0===n?"":n,a=t.hash,s=void 0===a?"":a;return o&&"?"!==o&&(r+="?"===o.charAt(0)?o:"?"+o),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r}function H(t){var e={};if(t){var r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));var n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function G(t,e){if(!t)throw new Error("Invariant failed")}
11
+ !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);
12
12
  /**
13
13
  * router-core
14
14
  *
@@ -18,5 +18,6 @@
18
18
  * LICENSE.md file in the root directory of this source tree.
19
19
  *
20
20
  * @license MIT
21
- */function K(t){return t[t.length-1]}function W(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch{}}return!0}function V(t,e){return"function"==typeof t?t(e):t}function q(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function J(t){return X(t.filter(Boolean).join("/"))}function X(t){return t.replace(/\/{2,}/g,"/")}function Q(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function Y(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function Z(t){return Y(Q(t))}function tt(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let n=et(e);const o=et(r);o.forEach(((t,e)=>{if("/"===t.value)e?e===o.length-1&&n.push(t):n=[t];else if(".."===t.value){var r;n.length>1&&"/"===(null==(r=K(n))?void 0:r.value)&&n.pop(),n.pop()}else{if("."===t.value)return;n.push(t)}}));return X(J([t,...n.map((t=>t.value))]))}function et(t){if(!t)return[];const e=[];if("/"===(t=X(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 rt(t,e,r){return J(et(t).map((t=>"*"!==t.value||r?"param"===t.type?e[t.value.substring(1)]??"":t.value:"")))}function nt(t,e,r){const n=ot(t,e,r);if(!r.to||n)return n??{}}function ot(t,e,r){if(!e.startsWith(t))return;const n=et(e="/"!=t?e.substring(t.length):e),o=et(`${r.to??"*"}`),a={};return(()=>{for(let t=0;t<Math.max(n.length,o.length);t++){const e=n[t],s=o[t],i=t===o.length-1,c=t===n.length-1;if(s){if("wildcard"===s.type)return!(null==e||!e.value)&&(a["*"]=J(n.slice(t).map((t=>t.value))),!0);if("pathname"===s.type){if("/"===s.value&&(null==e||!e.value))return!0;if(e)if(r.caseSensitive){if(s.value!==e.value)return!1}else if(s.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===s.type){if("/"===(null==e?void 0:e.value))return!1;"$"!==e.value.charAt(0)&&(a[s.value.substring(1)]=e.value)}}if(i&&!c)return!!r.fuzzy}return!0})()?a:void 0}function at(t,e){var r,n,o,a="";for(r in t)if(void 0!==(o=t[r]))if(Array.isArray(o))for(n=0;n<o.length;n++)a&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(o[n]);else a&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(o);return(e||"")+a}function st(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||("0"===e.charAt(0)?e:0*+e==0?+e:e))}function it(t){for(var e,r,n={},o=t.split("&");e=o.shift();)void 0!==n[r=(e=e.split("=")).shift()]?n[r]=[].concat(n[r],st(e.shift())):n[r]=st(e.shift());return n}function ct(t,e,r,n,o){const{id:a,routeId:s,path:i,fullPath:c}=t;let l={routeInfo:void 0,routeId:a,routeRouteId:s,originalIndex:r,routePath:i,fullPath:c,options:e,router:o,childRoutes:void 0,parentRoute:n,get action(){let t=o.store.actions[a]||(o.setStore((e=>{e.actions[a]={submissions:[],submit:async(e,r)=>{if(!l)return;const n=(null==r?void 0:r.invalidate)??!0,[s,i]=C({submittedAt:Date.now(),status:"pending",submission:e,isMulti:!(null==r||!r.multi)});o.setStore((e=>{null!=r&&r.multi||(e.actions[a].submissions=t.submissions.filter((t=>t.isMulti))),e.actions[a].current=s,e.actions[a].latest=s,e.actions[a].submissions.push(s)}));try{const t=await(null==l.options.action?void 0:l.options.action(e));return i((e=>{e.data=t})),n&&(o.invalidateRoute({to:".",fromCurrent:!0}),await o.reload()),i((t=>{t.status="success"})),t}catch(t){console.error(t),i((e=>{e.error=t,e.status="error"}))}}}})),o.store.actions[a]);return t},get loader(){return o.store.loaders[a]||(o.setStore((t=>{t.loaders[a]={pending:[],fetch:async t=>{if(!l)return;const e={loadedAt:Date.now(),loaderContext:t};o.setStore((t=>{t.loaders[a].current=e,t.loaders[a].latest=e,t.loaders[a].pending.push(e)}));try{return await(null==l.options.loader?void 0:l.options.loader(t))}finally{o.setStore((t=>{t.loaders[a].pending=t.loaders[a].pending.filter((t=>t!==e))}))}}}})),o.store.loaders[a])}};return null==o.options.createRoute||o.options.createRoute({router:o,route:l}),l}const lt="__root__",ut=function(t,e,r,n,o){void 0===t&&(t={}),void 0===r&&(r=!0),r&&(t.path=lt),n===lt&&(n="");let a=r?lt:t.path;a&&"/"!==a&&(a=Z(a));const s=a||t.id;let i=J([n,s]);a===lt&&(a="/"),i!==lt&&(i=J(["/",i]));const c=i===lt?"/":Y(J([o,a]));return{id:i,routeId:s,path:a,fullPath:c,options:t,children:e,addChildren:e=>ut(t,e,!1,n,o),createRoute:t=>ut(t,void 0,!1,i,c),generate:()=>{G(!1)}}};function ht(t,e,r){const n=new Map;return function t(e,r){if(e===r)return e;if(n.has(r))return n.get(r);const o=Array.isArray(e),a=Array.isArray(r),s=dt(e),i=dt(r),c=o&&a;if(c||s&&i){const o=c?e.length:Object.keys(e).length,a=c?r:Object.keys(r),s=a.length,i=c?[]:{};let l=0;for(let t=0;t<s;t++){const r=c?t:a[t];i[r]===e[r]&&l++}if(o===s&&l===o)return n.set(r,e),e;n.set(r,i);for(let n=0;n<s;n++){const o=c?n:a[n];"function"==typeof a[n]?i[o]=e[o]:i[o]=t(e[o],r[o]),i[o]===e[o]&&l++}return i}if(a){const e=[];n.set(r,e);for(let n=0;n<r.length;n++)e[n]=t(void 0,r[n]);return e}if(i){const e={};n.set(r,e);const o=Object.keys(r);for(let n=0;n<o.length;n++){const a=o[n];e[a]=t(void 0,r[a])}return e}return r}(t,e)}function dt(t){if(!ft(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!ft(r)&&!!r.hasOwnProperty("isPrototypeOf")}function ft(t){return"[object Object]"===Object.prototype.toString.call(t)}const pt=["component","errorComponent","pendingComponent"];function mt(t,e,r){let n,o,a="",s=()=>{};function i(){l((t=>{var e;t.loaderData=ht(t.loaderData,{...null==(e=c.parentMatch)?void 0:e.store.loaderData,...t.routeLoaderData})}))}const[c,l]=C({routeSearch:{},search:{},status:"idle",routeLoaderData:{},loaderData:{},isFetching:!1,invalid:!1,invalidAt:1/0,get isInvalid(){const t=Date.now();return this.invalid||this.invalidAt<t}}),u={...e,...r,store:c,router:t,childMatches:[],__:{setParentMatch:t=>{m((()=>{l((e=>{e.parentMatch=t})),i()}))},abortController:new AbortController,validate:()=>{var e;const r=(null==(e=c.parentMatch)?void 0:e.store.search)??t.store.currentLocation.search;try{const t=c.routeSearch,e="object"==typeof u.options.validateSearch?u.options.validateSearch.parse:u.options.validateSearch;let n=ht(t,(null==e?void 0:e(r))??{});m((()=>{t!==n&&l((t=>t.invalid=!0)),l((t=>{t.routeSearch=n,t.search=ht(r,{...r,...n})}))})),pt.map((async t=>{const e=u.options[t];"function"!=typeof u.__[t]&&(u.__[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",void l((t=>{t.status="error",t.error=e}))}}},cancel:()=>{var t;null==(t=u.__.abortController)||t.abort()},invalidate:()=>{l((t=>t.invalid=!0))},hasLoaders:()=>!(!e.options.loader&&!pt.some((t=>{var r;return null==(r=e.options[t])?void 0:r.preload}))),load:async e=>{const r=Date.now(),n=null!=e&&e.preload?Math.max(null==e?void 0:e.maxAge,null==e?void 0:e.gcMaxAge):0;if(null!=e&&e.preload&&n>0){if(t.store.currentMatches.find((t=>t.matchId===u.matchId)))return;t.store.matchCache[u.matchId]={gc:r+e.gcMaxAge,match:u}}if("success"===c.status&&c.isInvalid||"error"===c.status||"idle"===c.status){const t=null!=e&&e.preload?null==e?void 0:e.maxAge:void 0;await u.fetch({maxAge:t})}},fetch:async e=>{const r=""+Date.now()+Math.random();a=r;const h=async()=>{if(r!==a)return new Promise((()=>{}))};m((()=>{"idle"===c.status&&l((t=>t.status="loading")),l((t=>t.invalid=!1))})),u.__.loadPromise=new Promise((async r=>{l((t=>t.isFetching=!0)),s=r,n=(async()=>{await Promise.all(pt.map((async e=>{var r;const n=u.options[e];null!=(r=u.__[e])&&r.preload&&(u.__[e]=await t.options.loadComponent(n))})))})(),o=Promise.resolve().then((async()=>{try{if(u.options.loader){const e=await t.loadMatchData(u);await h(),r=e,m((()=>{l((t=>{t.routeLoaderData=ht(t.routeLoaderData,r)})),i()}))}return l((r=>{r.error=void 0,r.status="success",r.updatedAt=Date.now(),r.invalidAt=r.updatedAt+((null==e?void 0:e.maxAge)??u.options.loaderMaxAge??t.options.defaultLoaderMaxAge??0)})),c.routeLoaderData}catch(t){throw await h(),l((e=>{e.error=t,e.status="error",e.updatedAt=Date.now()})),t}var r}));const a=async()=>{await h(),l((t=>t.isFetching=!1)),delete u.__.loadPromise,s()};try{await Promise.all([n,o.catch((()=>{}))]),a()}catch{a()}})),await u.__.loadPromise,await h()}};return u.hasLoaders()||l((t=>t.status="success")),u}const vt=yt(JSON.parse),gt=bt(JSON.stringify);function yt(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=it(e);for(let e in r){const n=r[e];if("string"==typeof n)try{r[e]=t(n)}catch(t){}}return r}}function bt(t){return e=>{(e={...e})&&Object.keys(e).forEach((r=>{const n=e[r];if(void 0===n||void 0===n)delete e[r];else if(n&&"object"==typeof n&&null!==n)try{e[r]=t(n)}catch(t){}}));const r=at(e).toString();return r?`?${r}`:""}}var wt;const Pt="undefined"==typeof window||!(null!=(wt=window.document)&&wt.createElement);function Et(){return{status:"idle",latestLocation:null,currentLocation:null,currentMatches:[],actions:{},loaders:{},lastUpdated:Date.now(),matchCache:{},get isFetching(){return"loading"===this.status||this.currentMatches.some((t=>t.store.isFetching))},get isPreloading(){return Object.values(this.matchCache).some((t=>t.match.store.isFetching&&!this.currentMatches.find((e=>e.matchId===t.match.matchId))))}}}function _t(t){const e={defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50,context:void 0,...t,stringifySearch:(null==t?void 0:t.stringifySearch)??gt,parseSearch:(null==t?void 0:t.parseSearch)??vt},[r,n]=C(Et());let o,a=Date.now(),s=()=>{};function i(){h.load()}function c(t,e){const r=h.options.parseSearch(t.search);return{pathname:t.pathname,searchStr:t.search,search:ht(null==e?void 0:e.search,r),hash:t.hash.split("#").reverse()[0]??"",href:`${t.pathname}${t.search}${t.hash}`,state:t.state,key:t.key}}function l(t){return function(t,e){const r=""+Date.now()+Math.random();let n="replace";e||(n="push");c(h.history.location).href!==t.href||t.key||(n="replace");return h.history[n]({pathname:t.pathname,hash:t.hash,search:t.searchStr},{id:r,...t.state}),o=new Promise((t=>{const e=s;s=()=>{e(),t()}}))}(h.buildNext(t),t.replace)}function u(t){var e,n,o,a;void 0===t&&(t={});const s=t.fromCurrent?r.latestLocation.pathname:t.from??r.latestLocation.pathname;let i=tt(h.basepath??"/",s,`${t.to??"."}`);const c=h.matchRoutes(r.latestLocation.pathname,{strictParseParams:!0}),l=h.matchRoutes(i),u={...null==(e=K(c))?void 0:e.params};let d=!0===(t.params??!0)?u:V(t.params,u);d&&l.map((t=>t.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},d,t(d))})),i=rt(i,d??{});const f=null!=(n=t.__preSearchFilters)&&n.length?t.__preSearchFilters.reduce(((t,e)=>e(t)),r.latestLocation.search):r.latestLocation.search,p=!0===t.search?f:t.search?V(t.search,f)??{}:null!=(o=t.__preSearchFilters)&&o.length?f:{},m=null!=(a=t.__postSearchFilters)&&a.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),p):p,v=ht(r.latestLocation.search,m),g=h.options.stringifySearch(v);let y=!0===t.hash?r.latestLocation.hash:V(t.hash,r.latestLocation.hash);return y=y?`#${y}`:"",{pathname:i,search:v,searchStr:g,state:r.latestLocation.state,hash:y,href:`${i}${g}${y}`,key:t.key}}const h={types:void 0,history:(null==t?void 0:t.history)||(Pt?N():F()),store:r,setStore:n,options:e,basepath:"",routeTree:void 0,routesById:{},reset:()=>{n((t=>Object.assign(t,Et())))},getRoute:t=>h.routesById[t],dehydrate:()=>({store:{...q(r,["latestLocation","currentLocation","status","lastUpdated"]),currentMatches:r.currentMatches.map((t=>({matchId:t.matchId,store:q(t.store,["status","routeLoaderData","isInvalid","invalidAt"])})))},context:h.options.context}),hydrate:t=>{n((e=>{h.options.context=t.context;const r=h.matchRoutes(t.store.latestLocation.pathname,{strictParseParams:!0});r.forEach(((e,r)=>{const n=t.store.currentMatches[r];G(n&&n.matchId===e.matchId),Object.assign(e,n)})),r.forEach((t=>t.__.validate())),Object.assign(e,{...t.store,currentMatches:r})}))},mount:()=>{if(!Pt){r.currentMatches.length||h.load();const t=h.history.listen((t=>{h.load(c(t.location,r.latestLocation))}));return window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",i,!1)),()=>{t(),window.removeEventListener&&(window.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i))}}return()=>{}},update:t=>{const e=(null==t?void 0:t.history)!==h.history;r.latestLocation&&!e||(null!=t&&t.history&&(h.history=t.history),n((t=>{t.latestLocation=c(h.history.location),t.currentLocation=t.latestLocation}))),Object.assign(h.options,t);const{basepath:o,routeConfig:a}=h.options;return h.basepath=`/${Z(o??"")??""}`,a&&(h.routesById={},h.routeTree=function(t){const e=(t,r)=>t.map(((t,n)=>{const o=ct(t,t.options,n,r,h);if(h.routesById[o.routeId])throw new Error;h.routesById[o.routeId]=o;const a=t.children;return o.childRoutes=null!=a&&a.length?e(a,o):void 0,o}));return e([t])[0]}(a)),h},cancelMatches:()=>{[...r.currentMatches,...r.pendingMatches||[]].forEach((t=>{t.cancel()}))},load:async t=>{let e=Date.now();const i=e;let c;a=i,h.cancelMatches(),m((()=>{t&&n((e=>{e.latestLocation=t})),c=h.matchRoutes(r.latestLocation.pathname,{strictParseParams:!0}),console.log("set loading",c),n((t=>{t.status="loading",t.pendingMatches=c,t.pendingLocation=r.latestLocation}))}));try{await h.loadMatches(c)}catch(t){console.log(t),G(!1)}if(a!==i)return o;const l=r.currentMatches,u=[],d=[];l.forEach((t=>{c.find((e=>e.matchId===t.matchId))?d.push(t):u.push(t)}));const f=c.filter((t=>!l.find((e=>e.matchId===t.matchId))));e=Date.now(),u.forEach((t=>{null==t.__.onExit||t.__.onExit({params:t.params,search:t.store.routeSearch}),"error"!==t.store.status||t.store.isFetching||(t.store.status="idle",t.store.error=void 0);const n=Math.max(t.options.loaderGcMaxAge??h.options.defaultLoaderGcMaxAge??0,t.options.loaderMaxAge??h.options.defaultLoaderMaxAge??0);n>0&&(r.matchCache[t.matchId]={gc:n==1/0?Number.MAX_SAFE_INTEGER:e+n,match:t})})),d.forEach((t=>{null==t.options.onTransition||t.options.onTransition({params:t.params,search:t.store.routeSearch})})),f.forEach((t=>{t.__.onExit=null==t.options.onLoaded?void 0:t.options.onLoaded({params:t.params,search:t.store.search}),delete r.matchCache[t.matchId]})),a===i&&(c.forEach((t=>{t.action&&(t.action.current=void 0,t.action.submissions=[])})),n((t=>{console.log("set",c),Object.assign(t,{status:"idle",currentLocation:r.latestLocation,currentMatches:c,pendingLocation:void 0,pendingMatches:void 0})})),s())},cleanMatchCache:()=>{const t=Date.now();n((e=>{Object.keys(e.matchCache).forEach((r=>{const n=e.matchCache[r];"loading"!==n.match.store.status&&(n.gc>0&&n.gc>t||delete e.matchCache[r])}))}))},loadRoute:async function(t){void 0===t&&(t=r.latestLocation);const e=h.buildNext(t),n=h.matchRoutes(e.pathname,{strictParseParams:!0});return await h.loadMatches(n),n},preloadRoute:async function(t,e){void 0===t&&(t=r.latestLocation);const n=h.buildNext(t),o=h.matchRoutes(n.pathname,{strictParseParams:!0});return await h.loadMatches(o,{preload:!0,maxAge:e.maxAge??h.options.defaultPreloadMaxAge??h.options.defaultLoaderMaxAge??0,gcMaxAge:e.gcMaxAge??h.options.defaultPreloadGcMaxAge??h.options.defaultLoaderGcMaxAge??0}),o},matchRoutes:(t,e)=>{h.cleanMatchCache();const n=[];if(!h.routeTree)return n;const o=[...r.currentMatches,...r.pendingMatches??[]],a=async s=>{var i;const c=K(n);let l=(null==c?void 0:c.params)??{};const u=(null==h.options.filterRoutes?void 0:h.options.filterRoutes(s))??s;let d=[];const f=(r,n)=>(n.some((n=>{var o,a;if(!n.routePath&&null!=(o=n.childRoutes)&&o.length)return f([...d,n],n.childRoutes);const s=!!("/"!==n.routePath||null!=(a=n.childRoutes)&&a.length),i=nt(h.basepath,t,{to:n.fullPath,fuzzy:s,caseSensitive:n.options.caseSensitive??h.options.caseSensitive});if(i){let t;try{t=(null==n.options.parseParams?void 0:n.options.parseParams(i))??i}catch(t){if(null!=e&&e.strictParseParams)throw t}l={...l,...t}}return i&&(d=[...r,n]),!!d.length})),!!d.length);if(f([],u),!d.length)return;d.forEach((t=>{var e;const a=rt(t.routePath,l),s=rt(t.routeId,l,!0),i=o.find((t=>t.matchId===s))||(null==(e=r.matchCache[s])?void 0:e.match)||mt(h,t,{parentMatch:c,matchId:s,params:l,pathname:J([h.basepath,a])});n.push(i)}));const p=K(d);null!=(i=p.childRoutes)&&i.length&&a(p.childRoutes)};return a([h.routeTree]),function(t){t.forEach(((e,r)=>{const n=t[r-1];n?e.__.setParentMatch(n):e.__.setParentMatch(void 0)}))}(n),n},loadMatches:async(t,e)=>{t.forEach((async t=>{t.__.validate()})),await Promise.all(t.map((async t=>{try{await(null==t.options.beforeLoad?void 0:t.options.beforeLoad({router:h,match:t}))}catch(r){throw null!=e&&e.preload||null==t.options.onLoadError||t.options.onLoadError(r),r}})));const r=t.map((async t=>{var r;const n=t.store.search;null!=(r=n.__data)&&r.matchId&&n.__data.matchId!==t.matchId||(t.load(e),"success"!==t.store.status&&t.__.loadPromise&&await t.__.loadPromise)}));await Promise.all(r)},loadMatchData:async t=>{if(Pt||!h.options.useServerData)return await(null==t.options.loader?void 0:t.options.loader({params:t.params,search:t.store.routeSearch,signal:t.__.abortController.signal}))||{};{const e=h.buildNext({to:".",search:e=>({...e??{},__data:{matchId:t.matchId}})}),r=await fetch(e.href,{method:"GET"});if(r.ok)return r.json();throw new Error("Failed to fetch match data")}},invalidateRoute:t=>{const e=h.buildNext(t),n=h.matchRoutes(e.pathname).map((t=>t.matchId));[...r.currentMatches,...r.pendingMatches??[]].forEach((t=>{n.includes(t.matchId)&&t.invalidate()}))},reload:()=>l({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(t,e)=>tt(h.basepath,t,X(e)),matchRoute:(t,e)=>{t={...t,to:t.to?h.resolvePath(t.from??"",t.to):void 0};const n=h.buildNext(t);return null!=e&&e.pending?!!r.pendingLocation&&!!nt(h.basepath,r.pendingLocation.pathname,{...e,to:n.pathname}):nt(h.basepath,r.currentLocation.pathname,{...e,to:n.pathname})},navigate:async t=>{let{from:e,to:r=".",search:n,hash:o,replace:a,params:s}=t;const i=String(r),c=String(e);let u;try{new URL(`${i}`),u=!0}catch(t){}return G(!u),l({from:c,to:i,search:n,hash:o,replace:a,params:s})},buildLink:t=>{let{from:e,to:n=".",search:o,params:a,hash:s,target:i,replace:c,activeOptions:u,preload:d,preloadMaxAge:f,preloadGcMaxAge:p,preloadDelay:m,disabled:v}=t;try{return new URL(`${n}`),{type:"external",href:n}}catch(t){}const g={from:e,to:n,search:o,params:a,hash:s,replace:c},y=h.buildNext(g);d=d??h.options.defaultPreload;const b=m??h.options.defaultPreloadDelay??0,w=r.currentLocation.pathname===y.pathname,P=r.currentLocation.pathname.split("/"),E=y.pathname.split("/").every(((t,e)=>t===P[e])),_=r.currentLocation.hash===y.hash,M=null!=u&&u.exact?w:E,L=null==u||!u.includeHash||_;return{type:"internal",next:y,handleFocus:t=>{d&&h.preloadRoute(g,{maxAge:f,gcMaxAge:p}).catch((t=>{console.log(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{v||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||i&&"_self"!==i||0!==t.button||(t.preventDefault(),!w||o||s||h.invalidateRoute(g),l(g))},handleEnter:t=>{const e=t.target||{};if(d){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,h.preloadRoute(g,{maxAge:f,gcMaxAge:p}).catch((t=>{console.log(t),console.warn("Error preloading route! ☝️")}))}),b)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:M&&L,disabled:v}},buildNext:t=>{const e=u(t),r=h.matchRoutes(e.pathname),n=r.map((t=>t.options.preSearchFilters??[])).flat().filter(Boolean),o=r.map((t=>t.options.postSearchFilters??[])).flat().filter(Boolean);return u({...t,__preSearchFilters:n,__postSearchFilters:o})}};return h.update(t),null==h.options.createRouter||h.options.createRouter(h),h}function Mt(t){const e=Ct(),{type:r,children:n,target:a,activeProps:s=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:l,hash:u,search:h,params:d,to:f,preload:p,preloadDelay:m,preloadMaxAge:v,replace:g,style:y,className:b,onClick:w,onFocus:P,onMouseEnter:E,onMouseLeave:_,onTouchStart:M,onTouchEnd:L,...S}=t,x=e.buildLink(t);if("external"===x.type){const{href:t}=x;return{href:t}}const{handleClick:R,handleFocus:A,handleEnter:I,handleLeave:O,isActive:C,next:k}=x,j=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},D=C?V(s,{})??{}:{},F=C?{}:V(i,{})??{};return{...D,...F,...S,href:l?void 0:k.href,onClick:j([w,t=>{o.startTransition?o.startTransition((()=>{R(t)})):R(t)}]),onFocus:j([P,A]),onMouseEnter:j([E,I]),onMouseLeave:j([_,O]),target:a,style:{...y,...D.style,...F.style},className:[b,D.className,F.className].filter(Boolean).join(" ")||void 0,...l?{role:"link","aria-disabled":!0}:void 0,"data-status":C?"active":void 0}}const Lt=o.forwardRef(((t,e)=>{const r=Mt(t);return o.createElement("a",a({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))})),St=o.createContext(null),xt=o.createContext(null),Rt={},At=(t,e)=>{const n=o.useRef(Rt),a=()=>e?e(v((()=>t()))):t();n.current===Rt&&(n.current=ht(void 0,a()));const s=o.useCallback((()=>n.current),[]),i=o.useCallback((t=>p((()=>{f((()=>{n.current=_(ht(n.current,a())),t()}))}))),[]);return r.useSyncExternalStore(i,s,s)},[It,Ot]=C({foo:"foo",bar:{baz:"baz"}});function Ct(){const t=o.useContext(xt);return W(!t,"useRouter must be used inside a <Router> component!"),t.router}function kt(){return o.useContext(St)}function jt(t){const e=Ct(),r=kt()[0],n=null!=t&&t.from?e.store.currentMatches.find((e=>e.routeId===(null==t?void 0:t.from))):r;return G(n,null!=t&&t.from&&t.from),((null==t?void 0:t.strict)??1)&&G(r.routeId==(null==n?void 0:n.routeId),(null==n||n.routeId,r.routeId,null==n||n.routeId,null==n||n.routeId)),At((()=>n.store)),n}function Dt(t){const e=Ct().getRoute(t);return G(e),e}function Ft(){const t=Ct();return e=>{const{pending:r,caseSensitive:n,...o}=e;return t.matchRoute(o,{pending:r,caseSensitive:n})}}function Nt(){const t=Ct(),e=kt().slice(1),r=e[0],n=o.useCallback((()=>null),[]);At((()=>null==r?void 0:r.store));const a=o.useCallback((e=>{if("error"===e.match.store.status)throw e.match.store.error;if("success"===e.match.store.status)return o.createElement(e.match.__.component??t.options.defaultComponent??Nt);if("loading"===e.match.store.status)throw e.match.__.loadPromise;G(!1)}),[]);if(!r)return null;const s=r.__.pendingComponent??t.options.defaultPendingComponent??n,i=r.__.errorComponent??t.options.defaultErrorComponent;return o.createElement(St.Provider,{value:e},o.createElement(o.Suspense,{fallback:o.createElement(s,null)},o.createElement(Tt,{key:r.routeId,errorComponent:i,match:r},o.createElement(a,{match:r}))))}p((()=>{let t;f((()=>{console.log("effect");const e=ht(t,It);console.log(e),t=v((()=>e))}))})),Ot((t=>{t.foo="1"})),Ot((t=>{t.bar.baz="2"}));class Tt extends o.Component{state={error:!1,info:void 0};componentDidCatch(t,e){console.error(`Error in route match: ${this.props.match.matchId}`),console.error(t),this.setState({error:t,info:e})}render(){return o.createElement($t,a({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function $t(t){const[e,r]=o.useState(t.errorState),n=Ct(),a=t.errorComponent??Ut;return o.useEffect((()=>{if(e){let t=n.store.currentLocation.key;return p((()=>f((()=>{n.store.currentLocation.key!==t&&(t=n.store.currentLocation.key,r({}))}))))}}),[e]),o.useEffect((()=>{t.errorState.error&&r(t.errorState),t.reset()}),[t.errorState.error]),t.errorState.error?o.createElement(a,e):t.children}function Ut(t){let{error:e}=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,e.message?o.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},e.message):null)))}function Bt(t,e){const r=Ct();o.useEffect((()=>{if(!e)return;let n=r.history.block((e=>{window.confirm(t)?(n(),e.retry()):r.store.currentLocation.pathname=window.location.pathname}));return n}),[e,t])}t.DefaultErrorBoundary=Ut,t.Link=Lt,t.MatchRoute=function(t){const e=Ft()(t);return e?o.createElement("function"==typeof t.children?t.children(e):t.children,t):null},t.Outlet=Nt,t.Prompt=function(t){let{message:e,when:r,children:n}=t;return Bt(e,r??!0),n??null},t.RouterProvider=function(t){let{router:e,...r}=t;e.update(r);const[,,n]=At((()=>e.store),(t=>[t.status,t.pendingMatches,t.currentMatches]));return o.useEffect(e.mount,[e]),console.log("current",n),o.createElement(o.Fragment,null,o.createElement(xt.Provider,{value:{router:e}},o.createElement(St.Provider,{value:[void 0,...n]},o.createElement(Nt,null))))},t.__useStoreValue=At,t.batch=m,t.cleanPath=X,t.createBrowserHistory=F,t.createEffect=f,t.createHashHistory=function(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=H(r.location.hash.substr(1)),e=t.pathname,o=void 0===e?"/":e,a=t.search,s=void 0===a?"":a,i=t.hash,c=void 0===i?"":i,l=n.state||{};return[l.idx,{pathname:o,search:s,hash:c,state:l.usr||null,key:l.key||"default"}]}var a=null;function s(){if(a)d.call(a),a=null;else{var t=R.Pop,e=o(),r=e[0],n=e[1];if(d.length){if(null!=r){var s=l-r;s&&(a={action:t,location:n,retry:function(){y(-1*s)}},y(s))}}else g(t)}}r.addEventListener(D,s),r.addEventListener("hashchange",(function(){z(o()[1])!==z(u)&&s()}));var i=R.Pop,c=o(),l=c[0],u=c[1],h=U(),d=U();function f(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var n=r.location.href,o=n.indexOf("#");e=-1===o?n:n.slice(0,o)}return e}()+"#"+("string"==typeof t?t:z(t))}function p(t,e){return void 0===e&&(e=null),k({pathname:u.pathname,hash:"",search:""},"string"==typeof t?H(t):t,{state:e,key:B()})}function m(t,e){return[{usr:t.state,key:t.key,idx:e},f(t)]}function v(t,e,r){return!d.length||(d.call({action:t,location:e,retry:r}),!1)}function g(t){i=t;var e=o();l=e[0],u=e[1],h.call({action:i,location:u})}function y(t){n.go(t)}null==l&&(l=0,n.replaceState(k({},n.state,{idx:l}),""));var b={get action(){return i},get location(){return u},createHref:f,push:function t(e,o){var a=R.Push,s=p(e,o);if(v(a,s,(function(){t(e,o)}))){var i=m(s,l+1),c=i[0],u=i[1];try{n.pushState(c,"",u)}catch(t){r.location.assign(u)}g(a)}},replace:function t(e,r){var o=R.Replace,a=p(e,r);if(v(o,a,(function(){t(e,r)}))){var s=m(a,l),i=s[0],c=s[1];n.replaceState(i,"",c),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(t){return h.push(t)},block:function(t){var e=d.push(t);return 1===d.length&&r.addEventListener(j,$),function(){e(),d.length||r.removeEventListener(j,$)}}};return b},t.createMemo=function(t){const e=new h(t,1);return e.get.bind(e)},t.createMemoryHistory=N,t.createReactRouter=function(t){return _t({...t,loadComponent:async t=>(t.preload&&await t.preload(),t)})},t.createRoot=p,t.createRoute=ct,t.createRouteConfig=ut,t.createRouteMatch=mt,t.createRouter=_t,t.createSignal=function(t,e){const r=new h(t,0);return void 0!==e?.equals&&(r.alwaysUpdate=!0),[r.get.bind(r),r.set.bind(r)]},t.createStore=C,t.decode=it,t.defaultParseSearch=vt,t.defaultStringifySearch=gt,t.encode=at,t.functionalUpdate=V,t.interpolatePath=rt,t.invariant=G,t.isWrappable=E,t.joinPaths=J,t.last=K,t.lazy=function(t){const e=o.lazy(t);return e.preload=async()=>{await t()},e},t.matchByPath=ot,t.matchPathname=nt,t.matchesContext=St,t.onCleanup=function(t){i?i.cleanups?i.cleanups.push(t):i.cleanups=[t]:console.error("onCleanup must be called from within a memo or effect")},t.parsePathname=et,t.parseSearchWith=yt,t.pick=q,t.resolvePath=tt,t.rootRouteId=lt,t.routerContext=xt,t.sharedClone=ht,t.stringifySearchWith=bt,t.trimPath=Z,t.trimPathLeft=Q,t.trimPathRight=Y,t.untrack=v,t.unwrap=_,t.useAction=function(t){const e=Dt(t.from).action;return At((()=>e)),e},t.useLinkProps=Mt,t.useLoaderData=function(t){const e=jt(t);return At((()=>null==e?void 0:e.store.loaderData),null==t?void 0:t.select)},t.useMatch=jt,t.useMatchRoute=Ft,t.useMatches=kt,t.useNavigate=function(t){const e=Ct();return r=>e.navigate({...t,...r})},t.useParams=function(t){const e=Ct();return At((()=>{var t;return null==(t=K(e.store.currentMatches))?void 0:t.params}),null==t?void 0:t.select)},t.usePrompt=Bt,t.useRoute=Dt,t.useRouter=Ct,t.useRouterStore=function(t){const e=Ct();return At((()=>e.store),t)},t.useSearch=function(t){const e=jt(t);return At((()=>null==e?void 0:e.store.search),null==t?void 0:t.select)},t.warning=W,Object.defineProperty(t,"__esModule",{value:!0})}));
21
+ */
22
+ 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})}));
22
23
  //# sourceMappingURL=index.production.js.map