tocco-fdp-bundle 3.13.31 → 3.13.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md
CHANGED
|
@@ -47,4 +47,4 @@ const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescr
|
|
|
47
47
|
* LICENSE.md file in the root directory of this source tree.
|
|
48
48
|
*
|
|
49
49
|
* @license MIT
|
|
50
|
-
*/function u(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>l(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=c(null==r?t.length-1:r),a="POP",s=null;function c(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[i]}function l(e,n=null,r){let o=m(t?u().pathname:"/",e,n,r);return p("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:h(e)}return{get index(){return i},get action(){return a},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?g(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=l(e,n);i+=1,t.splice(i,t.length,r),o&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=l(e,n);t[i]=r,o&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=c(i+e),r=t[n];i=n,s&&s({action:a,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}function l(e={}){return v((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=g(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),m("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:h(t))}),(function(e,t){p("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function d(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?g(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function h({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function g(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function v(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function p(){s="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:s,location:g.location,delta:t})}function h(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let g={get action(){return s},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(c,p),u=e,()=>{o.removeEventListener(c,p),u=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=m(g.location,e,t);n&&n(r,e),l=d()+1;let c=f(r,l),p=g.createHref(r);try{a.pushState(c,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}i&&u&&u({action:s,location:g.location,delta:1})},replace:function(e,t){s="REPLACE";let r=m(g.location,e,t);n&&n(r,e),l=d();let o=f(r,l),c=g.createHref(r);a.replaceState(o,"",c),i&&u&&u({action:s,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),d(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:h(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function b(e){return{defaultValue:e}}var w=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(s(this,o).has(e))return s(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){s(this,o).set(e,t)}};o=new WeakMap;var x=new Set(["lazy","caseSensitive","path","id","index","children"]);var O=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function k(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(o||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=k(e.children,t,a,r,o)),n}}))}function A(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function S(e,t,n="/"){return j(e,t,n,!1)}function j(e,t,n,r){let o=Y(("string"==typeof t?g(t):t).pathname||"/",n);if(null==o)return null;let i=P(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=B(o);a=F(i[e],t,r)}return a}function E(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function P(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;d(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=Q([r,c.relativePath]),l=n.concat(c);e.children&&e.children.length>0&&(d(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,l,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:L(u,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of D(e.path))i(e,t,!0,n);else i(e,t)})),t}function D(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=D(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var _=/^:[\w-]+$/,T=3,C=2,M=1,I=10,R=-2,N=e=>"*"===e;function L(e,t){let n=e.split("/"),r=n.length;return n.some(N)&&(r+=R),t&&(r+=C),n.filter((e=>!N(e))).reduce(((e,t)=>e+(_.test(t)?T:""===t?M:I)),r)}function F(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},u),d=s.route;if(!l&&c&&n&&!r[r.length-1].route.index&&(l=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:Q([i,l.pathname]),pathnameBase:J(Q([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=Q([i,l.pathnameBase]))}return a}function H(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=W(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function W(e,t=!1,n=!0){p("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function B(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Y(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var U=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=e=>U.test(e);function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function q(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function G(e){let t=$(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function K(e,t,n,r=!1){let o;"string"==typeof e?o=g(e):(o={...e},d(!o.pathname||!o.pathname.includes("?"),q("?","pathname","search",o)),d(!o.pathname||!o.pathname.includes("#"),q("#","pathname","hash",o)),d(!o.search||!o.search.includes("#"),q("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?g(e):e;if(r)if(V(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),p(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)}else n=t;return{pathname:n,search:X(o),hash:Z(i)}}(o,i),u=s&&"/"!==s&&s.endsWith("/"),l=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!l||(c.pathname+="/"),c}var Q=e=>e.join("/").replace(/\/\/+/g,"/"),J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ee=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ne(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function oe(e,t){let n=e;if("string"!=typeof n||!U.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(re)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=Y(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var ie=Symbol("Uninstrumented");function ae(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=se(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=se(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[ie]??o,i=se(n[e],t,((...e)=>ue(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[ie]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[ie]??e,r=se(n.middleware,t,((...e)=>ue(e[0])));return r?(r[ie]=t,r):e}))),r}function se(e,t,n){return 0===e.length?null:async(...r)=>{let o=await ce(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function ce(e,t,n,r){let o,i=e[r];if(i){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ce(e,t,n,r-1),o=await a,d(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await s(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ue(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:de(t),params:{...r},unstable_pattern:o,context:pe(n)}}function le(e,t){return{currentUrl:h(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function de(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function pe(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===fe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var fe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var me=["POST","PUT","PATCH","DELETE"],he=new Set(me),ge=["GET",...me],ve=new Set(ge),ye=new Set([301,302,303,307,308]),be=new Set([307,308]),we={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Oe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ke=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ae="remix-router-transitions",Se=Symbol("ResetLoaderData");function je(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;d(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||ke,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ae(t.map((e=>e.route)).filter(Boolean),e)})}let a,s={},c=k(e.routes,i,void 0,s),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let l,f,g=e.dataStrategy||He,v={...e.future},b=null,x=new Set,O=null,A=null,P=null,D=null!=e.hydrationData,_=S(c,e.history.location,u),T=!1,C=null;if(null!=_||e.patchRoutesOnNavigation){if(_&&!e.hydrationData){Ue(_,c,e.history.location.pathname).active&&(_=null)}if(_)if(_.some((e=>e.route.lazy)))l=!1;else if(_.some((e=>_e(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=_.findIndex((e=>void 0!==n[e.route.id]));l=_.slice(0,e+1).every((e=>!Te(e.route,t,n)))}else l=_.every((e=>!Te(e.route,t,n)))}else l=!0;else{l=!1,_=[];let t=Ue(null,c,e.history.location.pathname);t.active&&t.matches&&(T=!0,_=t.matches)}}else{let t=at(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=it(c);l=!0,_=n,C={[r.id]:t}}let M,I,R={historyAction:e.history.action,location:e.history.location,matches:_,initialized:l,navigation:we,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},N="POP",L=null,F=!1,H=!1,W=new Map,B=null,U=!1,z=!1,q=new Set,$=new Map,G=0,K=-1,Q=new Map,J=new Set,X=new Map,Z=new Map,ee=new Set,ne=new Map,re=null;function oe(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=s[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ee.has(t)?n.push(t):r.push(t))})),ee.forEach((e=>{R.fetchers.has(e)||$.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>Se(e))),r.forEach((e=>R.fetchers.delete(e)))}function ce(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&bt(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let s=n.loaderData?nt(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,u=R.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,Oe))));let l,d=!U&&Ye(t,n.matches||R.matches),p=!0===F||null!=R.navigation.formMethod&&bt(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(c=a,a=void 0),U||"POP"===N||("PUSH"===N?e.history.push(t,t.state):"REPLACE"===N&&e.history.replace(t,t.state)),"POP"===N){let e=W.get(R.location.pathname);e&&e.has(t.pathname)?l={currentLocation:R.location,nextLocation:t}:W.has(t.pathname)&&(l={currentLocation:t,nextLocation:R.location})}else if(H){let e=W.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(R.location.pathname,e)),l={currentLocation:R.location,nextLocation:t}}oe({...n,actionData:o,loaderData:s,historyAction:N,location:t,initialized:!0,navigation:we,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),N="POP",F=!1,H=!1,U=!1,z=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function ue(t,n,o){M&&M.abort(),M=null,N=t,U=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(O&&P){let n=Be(e,t);O[n]=P()}}(R.location,R.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||c,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!T?R.matches:S(l,n,u),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!z&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(R.location,n)&&!(o&&o.submission&&bt(o.submission.formMethod)))return void ce(n,{matches:p},{flushSync:f});let m=Ue(p,l,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return void ce(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}M=new AbortController;let h,g=Je(e.history,n,M.signal,o&&o.submission),v=e.getContext?await e.getContext():new w;if(o&&o.pendingError)h=[ot(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&bt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){he();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(oe({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await Ve(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=it(c);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=xt(a,n);if(g.route.action||g.route.lazy){let e=ze(i,s,t,a,g,p?[]:r,l),n=await fe(t,e,l,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:at(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(mt(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Qe(m.response.headers.get("Location"),new URL(t.url),u,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ft(m)){let e=ot(a,g.route.id);return!0!==(f&&f.replace)&&(N="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,v,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ft(r)&&te(r.error)&&404===r.error.status)return M=null,void ce(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=kt(n,o.submission),f=!1,m.active=!1,g=Je(e.history,g.url,g.signal)}let{shortCircuited:y,matches:b,loaderData:x,errors:k}=await async function(t,n,o,l,d,p,f,m,h,g,v,y,b){let w=p||kt(n,f),x=f||m||Ot(w),O=!U&&!g;if(d){if(O){let e=de(y);oe({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await Ve(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=it(c);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let k=a||c,{dsMatches:A,revalidatingFetchers:S}=De(t,l,i,s,e.history,R,o,x,n,g?[]:r,!0===g,z,q,ee,X,J,k,u,null!=e.patchRoutesOnNavigation,y,b);if(K=++G,!e.dataStrategy&&!A.some((e=>e.shouldLoad))&&!A.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===S.length){let e=Ie();return ce(n,{matches:o,loaderData:{},errors:y&&ft(y[1])?{[y[0]]:y[1].error}:null,...rt(y),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:v}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(y);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=At(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(S)),oe(e,{flushSync:v})}S.forEach((e=>{je(e.key),e.controller&&$.set(e.key,e.controller)}));let j=()=>S.forEach((e=>je(e.key)));M&&M.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await me(A,S,t,l);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",j);S.forEach((e=>$.delete(e.key)));let D=st(E);if(D)return await pe(t,D.result,!0,{replace:h}),{shortCircuited:!0};if(D=st(P),D)return J.add(D.key),await pe(t,D.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:_,errors:T}=tt(R,o,E,y,S,P);g&&R.errors&&(T={...R.errors,...T});let C=Ie(),I=Re(K),N=C||I||S.length>0;return{matches:o,loaderData:_,errors:T,...N?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,v,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);y||(M=null,ce(n,{matches:b||p,...rt(h),loaderData:x,errors:k}))}function de(e){return e&&!ft(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:s,preventScrollReset:c,replace:l}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(z=!0);let p=o.response.headers.get("Location");d(p,"Expected a Location header on the redirect Response"),p=Qe(p,new URL(r.url),u,e.history);let f=m(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(V(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==Y(n.pathname,u)}if(e)return void(l?t.location.replace(p):t.location.assign(p))}M=null;let h=!0===l||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!s&&g&&v&&b&&(a=Ot(R.navigation));let w=a||s;if(be.has(o.response.status)&&w&&bt(w.formMethod))await ue(h,f,{submission:{...w,formAction:p},preventScrollReset:c||F,enableViewTransition:i?H:void 0});else{let e=kt(f,a);await ue(h,f,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:c||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await qe(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!bt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(pt(r)){let o=r.result;i[n]={type:"redirect",response:Ke(o,e,n,t,u)}}else i[n]=await Ge(r);return i}async function me(e,t,n,r){let o=fe(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await fe(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:at(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function he(){z=!0,X.forEach(((e,t)=>{$.has(t)&&q.add(t),je(t)}))}function ge(e,t,n={}){R.fetchers.set(e,t),oe({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ve(e,t,n,r={}){let o=ot(R.matches,t);Se(e),oe({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ye(e){return Z.set(e,(Z.get(e)||0)+1),ee.has(e)&&ee.delete(e),R.fetchers.get(e)||xe}function Se(e){let t=R.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&Q.has(e)||je(e),X.delete(e),Q.delete(e),J.delete(e),ee.delete(e),q.delete(e),R.fetchers.delete(e)}function je(e,t){let n=$.get(e);n&&(n.abort(t),$.delete(e))}function Ce(e){for(let t of e){let e=St(ye(t).data);R.fetchers.set(t,e)}}function Ie(){let e=[],t=!1;for(let n of J){let r=R.fetchers.get(n);d(r,`Expected fetcher: ${n}`),"loading"===r.state&&(J.delete(n),e.push(n),t=!0)}return Ce(e),t}function Re(e){let t=[];for(let[n,r]of Q)if(r<e){let e=R.fetchers.get(n);d(e,`Expected fetcher: ${n}`),"loading"===e.state&&(je(n),Q.delete(n),t.push(n))}return Ce(t),t.length>0}function Ne(e){R.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=R.blockers.get(e)||Oe;d("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),oe({blockers:r})}function Fe({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&p(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function We(e){let t=at(404,{pathname:e}),n=a||c,{matches:r,route:o}=it(n);return{notFoundMatches:r,route:o,error:t}}function Be(e,t){if(A){return A(e,t.map((e=>E(e,R.loaderData))))||e.key}return e.key}function Ye(e,t){if(O){let n=Be(e,t),r=O[n];if("number"==typeof r)return r}return null}function Ue(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:j(n,r,u,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:j(n,r,u,!0)}}}return{active:!1,matches:null}}async function Ve(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||c,p=s;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Me(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(c=[...c])}if(r.aborted)return{type:"aborted"};let f=S(d,n,u),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=j(d,n,u,!0),!(m&&l.length<m.length&&$e(l,m.slice(0,l.length))))return{type:"success",matches:f}}if(m||(m=j(d,n,u,!0)),!m||$e(l,m))return{type:"success",matches:null};l=m}}function $e(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return f={get basename(){return u},get future(){return v},get state(){return R},get routes(){return c},get window(){return t},initialize:function(){if(b=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);p(0===ne.size||null!=r,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Fe({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Le(o,{state:"blocked",location:n,proceed(){Le(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,Oe),oe({blockers:e})}}),L?.resolve(),void(L=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ae);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,W);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ae,JSON.stringify(n))}catch(e){p(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,W);t.addEventListener("pagehide",e),B=()=>t.removeEventListener("pagehide",e)}return R.initialized||ue("POP",R.location,{initialHydration:!0}),f},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(O=e,P=t,A=n||null,!D&&R.navigation===we){D=!0;let e=Ye(R.location,R.matches);null!=e&&oe({restoreScrollPosition:e})}return()=>{O=null,P=null,A=null}},navigate:async function t(n,r){if(L?.resolve(),L=null,"number"==typeof n){L||(L=jt());let t=L.promise;return e.history.go(n),t}let o=Ee(R.location,R.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:s}=Pe(!1,o,r),c=R.location,l=m(R.location,i,r&&r.state);l={...l,...e.history.encodeLocation(l)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&bt(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=Fe({currentLocation:c,nextLocation:l,historyAction:p});g?Le(g,{state:"blocked",location:l,proceed(){Le(g,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,Oe),oe({blockers:e})}}):await ue(p,l,{submission:a,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,l){je(t);let p=!0===(l&&l.flushSync),f=a||c,m=Ee(R.location,R.matches,u,o,n,l?.relative),h=S(f,m,u),g=Ue(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void ve(t,n,at(404,{pathname:m}),{flushSync:p});let{path:v,submission:y,error:b}=Pe(!0,m,l);if(b)return void ve(t,n,b,{flushSync:p});let x=e.getContext?await e.getContext():new w,O=!0===(l&&l.preventScrollReset);y&&bt(y.formMethod)?await async function(t,n,o,l,p,f,m,h,g,v){he(),X.delete(t);let y=R.fetchers.get(t);ge(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(g,y),{flushSync:m});let b=new AbortController,w=Je(e.history,o,b.signal,g);if(f){let e=await Ve(l,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ve(t,n,e.error,{flushSync:m});if(!e.matches)return void ve(t,n,at(404,{pathname:o}),{flushSync:m});l=e.matches}let x=xt(l,o);if(!x.route.action&&!x.route.lazy){let e=at(405,{method:g.formMethod,pathname:o,routeId:n});return void ve(t,n,e,{flushSync:m})}$.set(t,b);let O=G,k=ze(i,s,w,l,x,r,p),A=await fe(w,k,p,t),j=A[x.route.id];if(!j)for(let e of k)if(A[e.route.id]){j=A[e.route.id];break}if(w.signal.aborted)return void($.get(t)===b&&$.delete(t));if(ee.has(t)){if(mt(j)||ft(j))return void ge(t,St(void 0))}else{if(mt(j))return $.delete(t),K>O?void ge(t,St(void 0)):(J.add(t),ge(t,At(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(ft(j))return void ve(t,n,j.error)}let E=R.navigation.location||R.location,P=Je(e.history,E,b.signal),D=a||c,_="idle"!==R.navigation.state?S(D,R.navigation.location,u):R.matches;d(_,"Didn't find any matches after fetcher action");let T=++G;Q.set(t,T);let C=At(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:L}=De(P,p,i,s,e.history,R,_,g,E,r,!1,z,q,ee,X,J,D,u,null!=e.patchRoutesOnNavigation,[x.route.id,j],v);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=At(void 0,n?n.data:void 0);R.fetchers.set(t,r),je(t),e.controller&&$.set(t,e.controller)})),oe({fetchers:new Map(R.fetchers)});let F=()=>L.forEach((e=>je(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:W}=await me(I,L,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),Q.delete(t),$.delete(t),L.forEach((e=>$.delete(e.key))),R.fetchers.has(t)){let e=St(j.data);R.fetchers.set(t,e)}let B=st(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=st(W),B)return J.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:Y,errors:U}=tt(R,_,H,void 0,L,W);Re(T),"loading"===R.navigation.state&&T>K?(d(N,"Expected pending action"),M&&M.abort(),ce(R.navigation.location,{matches:_,loaderData:Y,errors:U,fetchers:new Map(R.fetchers)})):(oe({errors:U,loaderData:nt(R.loaderData,Y,_,U),fetchers:new Map(R.fetchers)}),z=!1)}(t,n,v,h,x,g.active,p,O,y,l&&l.unstable_defaultShouldRevalidate):(X.set(t,{routeId:n,path:v}),await async function(t,n,o,a,c,u,l,d,p){let f=R.fetchers.get(t);ge(t,At(p,f?f.data:void 0),{flushSync:l});let m=new AbortController,h=Je(e.history,o,m.signal);if(u){let e=await Ve(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ve(t,n,e.error,{flushSync:l});if(!e.matches)return void ve(t,n,at(404,{pathname:o}),{flushSync:l});a=e.matches}let g=xt(a,o);$.set(t,m);let v=G,y=ze(i,s,h,a,g,r,c),b=await fe(h,y,c,t),w=b[g.route.id];$.get(t)===m&&$.delete(t);if(h.signal.aborted)return;if(ee.has(t))return void ge(t,St(void 0));if(mt(w))return K>v?void ge(t,St(void 0)):(J.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(ft(w))return void ve(t,n,w.error);ge(t,St(w.data))}(t,n,v,h,x,g.active,p,O,y))},revalidate:function(){re||(re=jt()),he(),oe({revalidation:"loading"});let e=re.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(ue(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(ue(N||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ye,resetFetcher:function(e,t){je(e,t?.reason),ge(e,St(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),ee.add(e)):Z.set(e,t),oe({fetchers:new Map(R.fetchers)})},dispose:function(){b&&b(),B&&B(),x.clear(),M&&M.abort(),R.fetchers.forEach(((e,t)=>Se(t))),R.blockers.forEach(((e,t)=>Ne(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||Oe;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ne,patchRoutes:function(e,t,n=!1){let r=null==a;Me(e,t,a||c,s,i,n),r&&(c=[...c],oe({}))},_internalFetchControllers:$,_internalSetRoutes:function(e){s={},a=k(e,i,void 0,s)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){oe(e)}},e.unstable_instrumentations&&(f=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[ie]??e.navigate,r=se(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?h(n):".",...le(e,r??{})}}));r&&(r[ie]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[ie]??e.fetch,r=se(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...le(e,o??{})}}));r&&(r[ie]=t,e.fetch=r)}return e}(f,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),f}function Ee(e,t,n,r,o,i){let a,s;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){s=e;break}}else a=t,s=t[t.length-1];let c=K(r||".",G(a),Y(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(c.search=e.search,c.hash=e.hash),(null==r||""===r||"."===r)&&s){let e=wt(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?`?${n}`:""}}return"/"!==n&&(c.pathname=function({basename:e,pathname:t}){return"/"===t?e:Q([e,t])}({basename:n,pathname:c.pathname})),h(c)}function Pe(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!yt(n.formMethod))return{path:t,error:at(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:at(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),s=ct(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!bt(a))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,[t,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!bt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(d("function"==typeof FormData,"FormData is not available in this environment"),n.formData)r=Xe(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Xe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=Ze(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Ze(r)}catch(e){return i()}let c={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(bt(c.formMethod))return{path:t,submission:c};let u=g(t);return e&&u.search&&wt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:h(u),submission:c}}function De(e,t,n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,v,y,b,w){let x,O=b?ft(b[1])?b[1].error:b[1].data:void 0,k=o.createURL(i.location),A=o.createURL(c);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ft(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:k,currentParams:i.matches[0]?.params||{},nextUrl:A,nextParams:a[0].params,...s,actionResult:O,actionStatus:j},D=ne(a),_=a.map(((o,a)=>{let{route:s}=o,c=null;if(null!=x&&a>x?c=!1:s.lazy?c=!0:_e(s)?l?c=Te(s,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(c=!0):c=!1,null!==c)return Ve(n,r,e,D,o,u,t,c);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=Ce(o,f);return Ve(n,r,e,D,o,u,t,m,f,w)})),T=[];return m.forEach(((e,s)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(s))return;let c=i.fetchers.get(s),m=c&&"idle"!==c.state&&void 0===c.data,b=S(g,e.path,v);if(!b){if(y&&m)return;return void T.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(s))return;let x=xt(b,e.path),O=new AbortController,k=Je(o,e.path,O.signal),A=null;if(p.has(s))p.delete(s),A=ze(n,r,k,b,x,u,t);else if(m)d&&(A=ze(n,r,k,b,x,u,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};Ce(x,o)&&(A=ze(n,r,k,b,x,u,t,o))}A&&T.push({key:s,routeId:e.routeId,path:e.path,matches:A,match:x,request:k,controller:O})})),{dsMatches:_,revalidatingFetchers:T}}function _e(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function Te(e,t,n){if(e.lazy)return!0;if(!_e(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function Ce(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Me(e,t,n,r,o,i){let a;if(e){let t=r[e];d(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let s=[],c=[];if(t.forEach((e=>{let t=a.find((t=>Ie(e,t)));t?c.push({existingRoute:t,newRoute:e}):s.push(e)})),s.length>0){let t=k(s,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[i]=k([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Ie(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Ie(e,t))))))}var Re=new WeakMap,Ne=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(d(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Re.get(o);a||(a={},Re.set(o,a));let s=a[e];if(s)return s;let c=(async()=>{let t=function(e){return x.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)p(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)p(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=c,c},Le=new WeakMap;async function Fe(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function He(e){return e.matches.some((e=>e.route.middleware))?We(e,(()=>Fe(e))):Fe(e)}function We(e,t){return Be(e,t,(e=>{if(vt(e))throw e;return e}),lt,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=ot(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Be(e,t,n,r,o){let{matches:i,request:a,params:s,context:c,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Ye({request:a,params:s,context:c,unstable_pattern:u},l,t,n,r,o)}async function Ye(e,t,n,r,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let c=t[a];if(!c){return await n()}let u,[l,d]=c,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let s=await Ye(e,t,n,r,o,i,a+1);return u={value:s},u.value}catch(e){return u={value:await i(e,l,u)},u.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:u?n??u.value:(u={value:await p()},u.value)}catch(e){return await i(e,l,u)}}function Ue(e,t,n,r,o){let i=Ne({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(d(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Le.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{d("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,O.has(o)),s=void 0!==i[e]&&"hasErrorBoundary"!==e;a?p(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?p(!s,`Route "${i.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return Le.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,s=Object.keys(e.lazy),c=[];for(let i of s){if(o&&o.includes(i))continue;let s=Ne({key:i,route:e,manifest:n,mapRouteProperties:r});s&&(c.push(s),i===t&&(a=s))}let u=c.length>0?Promise.all(c).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,bt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Ve(e,t,n,r,o,i,a,s,c=null,u){let l=!1,d=Ue(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler:e=>(l=!0,c?Ce(o,"boolean"==typeof u?{...c,defaultShouldRevalidate:u}:"boolean"==typeof e?{...c,defaultShouldRevalidate:e}:c):s),resolve(e){let{lazy:t,loader:i,middleware:c}=o.route,u=l||s||e&&!bt(n.method)&&(t||i),p=c&&c.length>0&&!i&&!t;return!u||!bt(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,c,u=bt(e.method),l=u?"action":"loader",d=r=>{let o,s=new Promise(((e,t)=>o=t));c=()=>o(),e.signal.addEventListener("abort",c);let u=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,s])};try{let t=u?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;s=n}else{await r;let t=u?n.route.action:n.route.loader;if(!t){if("action"===l){let t=new URL(e.url),r=t.pathname+t.search;throw at(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw at(404,{pathname:t.pathname+t.search})}s=await d(t)}}catch(e){return{type:"error",result:e}}finally{c&&e.signal.removeEventListener("abort",c)}return s}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function ze(e,t,n,r,o,i,a,s=null){return r.map((c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ue(e,t,n,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ve(e,t,n,ne(r),c,i,a,!0,s)))}async function qe(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:ne(n),params:n[0].params,context:o,matches:n},s=i?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=a;return We(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},c=await e({...a,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return c}async function $e(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ge(e){let{result:t,type:n}=e;if(gt(t)){let e;try{e=await $e(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===n?ht(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:ut(t),statusCode:te(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:te(t)?t.status:void 0}:ht(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ke(e,t,n,r,o){let i=e.headers.get("Location");if(d(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!V(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=Ee(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function Qe(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(V(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=Y(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function Je(e,t,n,r){let o=e.createURL(ct(t)).toString(),i={signal:n};if(r&&bt(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Xe(r.formData):i.body=r.formData}return new Request(o,i)}function Xe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Ze(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function et(e,t,n,r=!1,o=!1){let i,a={},s=null,c=!1,u={},l=n&&ft(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(d(!mt(f),"Cannot handle redirect results in processLoaderData"),ft(f)){let t=f.error;if(void 0!==l&&(t=l,l=void 0),s=s||{},o)s[p]=t;else{let n=ot(e,p);null==s[n.route.id]&&(s[n.route.id]=t)}r||(a[p]=Se),c||(c=!0,i=te(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!c&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==l&&n&&(s={[n[0]]:l},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:u}}function tt(e,t,n,r,o,i){let{loaderData:a,errors:s}=et(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(d(a,"Did not find corresponding fetcher result"),ft(a)){let t=ot(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(mt(a))d(!1,"Unhandled fetcher revalidation redirect");else{let t=St(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:s}}function nt(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==Se)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function rt(e){return e?ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ot(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function it(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function at(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",s=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new ee(e||500,a,new Error(s),!0)}function st(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(mt(r))return{key:n,result:r}}}function ct(e){return h({..."string"==typeof e?g(e):e,hash:""})}function ut(e){return new ee(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function lt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&dt(t)))}function dt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function pt(e){return gt(e.result)&&ye.has(e.result.status)}function ft(e){return"error"===e.type}function mt(e){return"redirect"===(e&&e.type)}function ht(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function gt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function vt(e){return gt(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ve.has(e.toUpperCase())}function bt(e){return he.has(e.toUpperCase())}function wt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function xt(e,t){let n="string"==typeof t?g(t).search:t.search;if(e[e.length-1].route.index&&wt(n||""))return e[e.length-1];let r=$(e);return r[r.length-1]}function Ot(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function kt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function At(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function St(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jt(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var Et=i.createContext(null);Et.displayName="DataRouter";var Pt=i.createContext(null);Pt.displayName="DataRouterState";var Dt=i.createContext(!1);function _t(){return i.useContext(Dt)}var Tt=i.createContext({isTransitioning:!1});Tt.displayName="ViewTransition";var Ct=i.createContext(new Map);Ct.displayName="Fetchers";var Mt=i.createContext(null);Mt.displayName="Await";var It=i.createContext(null);It.displayName="Navigation";var Rt=i.createContext(null);Rt.displayName="Location";var Nt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Nt.displayName="Route";var Lt=i.createContext(null);Lt.displayName="RouteError";var Ft=!0,Ht="REACT_ROUTER_ERROR",Wt="REDIRECT";function Bt(){return null!=i.useContext(Rt)}function Yt(){return d(Bt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Rt).location}var Ut="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vt(e){i.useContext(It).static||i.useLayoutEffect(e)}function zt(){let{isDataRoute:e}=i.useContext(Nt);return e?function(){let{router:e}=rn("useNavigate"),t=an("useNavigate"),n=i.useRef(!1);return Vt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{p(n.current,Ut),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){d(Bt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(Et),{basename:t,navigator:n}=i.useContext(It),{matches:r}=i.useContext(Nt),{pathname:o}=Yt(),a=JSON.stringify(G(r)),s=i.useRef(!1);return Vt((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(p(s.current,Ut),!s.current)return;if("number"==typeof r)return void n.go(r);let c=K(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:Q([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function qt(){let{matches:e}=i.useContext(Nt),t=e[e.length-1];return t?t.params:{}}function $t(e,{relative:t}={}){let{matches:n}=i.useContext(Nt),{pathname:r}=Yt(),o=JSON.stringify(G(n));return i.useMemo((()=>K(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Gt(e,t,n,r,o){d(Bt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(It),{matches:s}=i.useContext(Nt),c=s[s.length-1],u=c?c.params:{},l=c?c.pathname:"/",f=c?c.pathnameBase:"/",m=c&&c.route;if(Ft){let e=m&&m.path||"";pn(l,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,v=Yt();if(t){let e="string"==typeof t?g(t):t;d("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=v;let y=h.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=S(e,{pathname:b});Ft&&(p(m||null!=w,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),p(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let x=tn(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:Q([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:Q([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),s,n,r,o);return t&&x?i.createElement(Rt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},x):x}function Kt(){let e=cn(),t=te(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return Ft&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route."))),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}var Qt=i.createElement(Kt,null),Jt=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ht}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new ee(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Nt.Provider,{value:this.props.routeContext},i.createElement(Lt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Zt,{error:e},t):t}};Jt.contextType=Dt;var Xt=new WeakMap;function Zt({children:e,error:t}){let{basename:n}=i.useContext(It);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ht}:${Wt}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Xt.get(t);if(r)throw r;let o=oe(e.location,n);if(re&&!Xt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Xt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function en({routeContext:e,match:t,children:n}){let r=i.useContext(Et);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Nt.Provider,{value:e},n)}function tn(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,s=n?.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));d(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ne(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let d,p=!1,f=null,m=null;n&&(d=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||Qt,c&&(u<0&&0===o?(pn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=d?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(en,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Jt,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()}),null)}function nn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rn(e){let t=i.useContext(Et);return d(t,nn(e)),t}function on(e){let t=i.useContext(Pt);return d(t,nn(e)),t}function an(e){let t=function(e){let t=i.useContext(Nt);return d(t,nn(e)),t}(e),n=t.matches[t.matches.length-1];return d(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function sn(){let{matches:e,loaderData:t}=on("useMatches");return i.useMemo((()=>e.map((e=>E(e,t)))),[e,t])}function cn(){let e=i.useContext(Lt),t=on("useRouteError"),n=an("useRouteError");return void 0!==e?e:t.errors?.[n]}var un=0;function ln(e){let{router:t,basename:n}=rn("useBlocker"),r=on("useBlocker"),[o,a]=i.useState(""),s=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:Y(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:Y(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++un);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,s)}),[t,o,s]),o&&r.blockers.has(o)?r.blockers.get(o):Oe}var dn={};function pn(e,t,n){t||dn[e]||(dn[e]=!0,p(!1,n))}var fn={};function mn(e,t){e||fn[t]||(fn[t]=!0,console.warn(t))}var hn=(r||(r=n.t(i,2))).useOptimistic,gn=()=>{};function vn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Ft&&e.element&&p(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(Ft&&e.hydrateFallbackElement&&p(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(Ft&&e.errorElement&&p(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var yn=["HydrateFallback","hydrateFallbackElement"];function bn(e,t){return je({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:yn,mapRouteProperties:vn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}var wn=class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function xn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=_t();r=o||r;let[a,s]=i.useState(e.state),[c,u]=(l=a,hn?hn(l):[l,gn]);var l;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[v,y]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:c,flushSync:l,viewTransitionOpts:d})=>{c&&n&&Object.values(c).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:ne(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),mn(!1===l||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(mn(null==d||f,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),d&&f){if(t&&l){t((()=>{v&&(h?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>s(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),y(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>y(n)))}v?(h?.resolve(),v.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>s(o))):!1===r?s(o):i.startTransition((()=>{!0===r&&u((e=>On(e,o))),s(o)}))}),[e.window,t,v,h,r,u,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new wn)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?s(t):i.startTransition((()=>{!0===r&&u((e=>On(e,t))),s(t)})),await n}));o.finished.finally((()=>{g(void 0),y(void 0),p(void 0),m({isTransitioning:!1})})),y(o)}}),[d,h,e.window,r,u]),i.useEffect((()=>{h&&d&&c.location.key===d.location.key&&h.resolve()}),[h,v,c.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let k=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),A=e.basename||"/",S=i.useMemo((()=>({router:e,navigator:k,static:!1,basename:A,onError:n})),[e,k,A,n]);return i.createElement(i.Fragment,null,i.createElement(Et.Provider,{value:S},i.createElement(Pt.Provider,{value:c},i.createElement(Ct.Provider,{value:x.current},i.createElement(Tt.Provider,{value:f},i.createElement(jn,{basename:A,location:c.location,navigationType:c.historyAction,navigator:k,unstable_useTransitions:r},i.createElement(kn,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function On(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var kn=i.memo((function({routes:e,future:t,state:n,onError:r}){return Gt(e,void 0,n,r,t)}));function An({to:e,replace:t,state:n,relative:r}){d(Bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(It);p(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Nt),{pathname:s}=Yt(),c=zt(),u=K(e,G(a),s,"path"===r),l=JSON.stringify(u);return i.useEffect((()=>{c(JSON.parse(l),{replace:t,state:n,relative:r})}),[c,l,r,t,n]),null}function Sn(e){d(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:s}){d(!Bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:c,navigator:o,static:a,unstable_useTransitions:s,future:{}})),[c,o,a,s]);"string"==typeof n&&(n=g(n));let{pathname:l="/",search:f="",hash:m="",state:h=null,key:v="default"}=n,y=i.useMemo((()=>{let e=Y(l,c);return null==e?null:{location:{pathname:e,search:f,hash:m,state:h,key:v},navigationType:r}}),[c,l,f,m,h,v,r]);return p(null!=y,`<Router basename="${c}"> is not able to match the URL "${l}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:i.createElement(It.Provider,{value:u},i.createElement(Rt.Provider,{children:t,value:y}))}function En({children:e,location:t}){return Gt(Pn(e),t)}i.Component;function Pn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,Pn(e.props.children,o));d(e.type===Sn,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),d(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pn(e.props.children,o)),n.push(a)})),n}var Dn="get",_n="application/x-www-form-urlencoded";function Tn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Cn(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Mn=null;var In=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rn(e){return null==e||In.has(e)?e:(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_n}"`),null)}function Nn(e,t){let n,r,o,i,a;if(function(e){return Tn(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?Y(a,t):null,n=e.getAttribute("method")||Dn,o=Rn(e.getAttribute("enctype"))||_n,i=new FormData(e)}else if(function(e){return Tn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Tn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?Y(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Dn,o=Rn(e.getAttribute("formenctype"))||Rn(a.getAttribute("enctype"))||_n,i=new FormData(a,e),!function(){if(null===Mn)try{new FormData(document.createElement("form"),0),Mn=!1}catch(e){Mn=!0}return Mn}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(Tn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Dn,r=null,o=_n,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;var Ln={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Fn=/[&><\u2028\u2029]/g;function Hn(e){return e.replace(Fn,(e=>Ln[e]))}function Wn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Bn(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===Y(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Yn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Un(e){return null!=e&&"string"==typeof e.page}function Vn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function zn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function qn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function $n(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Un(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function Gn(e,t){return"lazy"===e.mode&&!0===t}function Kn(){let e=i.useContext(Et);return Wn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qn(){let e=i.useContext(Pt);return Wn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Jn=i.createContext(void 0);function Xn(){let e=i.useContext(Jn);return Wn(e,"You must render this element inside a <HydratedRouter> element"),e}function Zn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function er(e,t,n){if(n&&!or)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Jn.displayName="FrameworkContext";function tr({page:e,...t}){let{router:n}=Kn(),r=i.useMemo((()=>S(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(rr,{page:e,matches:r,...t}):null}function nr(e){let{manifest:t,routeModules:n}=Xn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return $n((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Yn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Vn).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function rr({page:e,matches:t,...n}){let r=Yt(),{future:o,manifest:a,routeModules:s}=Xn(),{basename:c}=Kn(),{loaderData:u,matches:l}=Qn(),d=i.useMemo((()=>zn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>zn(e,t,l,a,r,"assets")),[e,t,l,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in u&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=Bn(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&l.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[c,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,s]),m=i.useMemo((()=>qn(p,a)),[p,a]),h=nr(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var or=!1;function ir(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:s}=Xn(),{router:c,static:u,staticContext:l}=Kn(),{matches:d}=Qn(),p=_t(),f=Gn(a,s);o&&(o.didRenderScripts=!0);let m=er(d,null,r);i.useEffect((()=>{!0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=u?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Wn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:c,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:u,varName:`${r}_main`}];return 1===l.length?`import * as ${r} from ${JSON.stringify(u)};`:[l.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${l.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=S(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,c),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=or||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(qn(m,t,{includeHydrateFallback:!0}))),v="object"==typeof t.sri?t.sri:{};return mn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),or||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],suppressHydrationWarning:!0}))),h)}function ar(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function sr({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(te(e))return i.createElement(cr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Ft?r:null);if(e instanceof Error)e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(cr,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function cr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Xn();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(ir,null):null)))}var ur="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ur&&(window.__reactRouterVersion="7.12.0")}catch(e){}function lr(e,t){return je({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||dr(),routes:e,mapRouteProperties:vn,hydrationRouteProperties:yn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function dr(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:pr(e.errors)}),e}function pr(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new ee(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var fr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:c,to:u,preventScrollReset:l,viewTransition:p,unstable_defaultShouldRevalidate:f,...m},g){let{basename:v,unstable_useTransitions:y}=i.useContext(It),b="string"==typeof u&&fr.test(u),w=oe(u,v),x=function(e,{relative:t}={}){d(Bt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(It),{hash:o,pathname:a,search:s}=$t(e,{relative:t}),c=a;return"/"!==n&&(c="/"===a?n:Q([n,a])),r.createHref({pathname:c,search:s,hash:o})}(u=w.to,{relative:r}),[O,k,A]=function(e,t){let n=i.useContext(Jn),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Zn(c,m),onBlur:Zn(u,h),onMouseEnter:Zn(l,m),onMouseLeave:Zn(d,h),onTouchStart:Zn(p,m)}]:[!1,f,{}]}(n,m),S=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let l=zt(),d=Yt(),p=$t(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:h(d)===h(p),m=()=>l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c});u?i.startTransition((()=>m())):m()}}),[d,l,p,n,r,t,e,o,a,s,c,u])}(u,{replace:a,state:s,target:c,preventScrollReset:l,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:y});let j=i.createElement("a",{...m,...A,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||S(t)},ref:ar(g,k),target:c,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement(tr,{page:x})):j}));mr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:c,...u},l){let p=$t(a,{relative:u.relative}),f=Yt(),m=i.useContext(Pt),{navigator:h,basename:g}=i.useContext(It),v=null!=m&&function(e,{relative:t}={}){let n=i.useContext(Tt);d(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=yr("useViewTransitionState"),o=$t(e,{relative:t});if(!n.isTransitioning)return!1;let a=Y(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Y(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=H(o.pathname,s)||null!=H(o.pathname,a)}(p)&&!0===s,y=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=Y(w,g)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let O,k=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(x),A=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),S={isActive:k,isPending:A,isTransitioning:v},j=k?e:void 0;O="function"==typeof n?n(S):[n,k?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(S):o;return i.createElement(mr,{...u,"aria-current":j,className:O,ref:l,style:E,to:a,viewTransition:s},"function"==typeof c?c(S):c)})).displayName="NavLink";var hr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=Dn,action:c,onSubmit:u,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},v)=>{let{unstable_useTransitions:y}=i.useContext(It),b=kr(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(It),r=i.useContext(Nt);d(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...$t(e||".",{relative:t})},s=Yt();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:Q([n,a.pathname]));return h(a)}(c,{relative:l}),x="get"===s.toLowerCase()?"get":"post",O="string"==typeof c&&fr.test(c);return i.createElement("form",{ref:v,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,d=()=>b(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:o,state:a,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:m});y&&!1!==n?i.startTransition((()=>d())):d()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function gr({getKey:e,storageKey:t,...n}){let r=i.useContext(Jn),{basename:o}=i.useContext(It),a=Yt(),s=sn();!function({getKey:e,storageKey:t}={}){let{router:n}=yr("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=br("useScrollRestoration"),{basename:a}=i.useContext(It),s=Yt(),c=sn(),u=on("useNavigation").navigation;i.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:n}=t||{};i.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,n])}(i.useCallback((()=>{if("idle"===u.state){let t=jr(s,c,a,e);Sr[t]=window.scrollY}try{sessionStorage.setItem(t||Ar,JSON.stringify(Sr))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration="auto"}),[u.state,e,a,s,c,t])),"undefined"!=typeof document&&(i.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(t||Ar);e&&(Sr=JSON.parse(e))}catch(e){}}),[t]),i.useLayoutEffect((()=>{let t=n?.enableScrollRestoration(Sr,(()=>window.scrollY),e?(t,n)=>jr(t,n,a,e):void 0);return()=>t&&t()}),[n,a,e]),i.useLayoutEffect((()=>{if(!1!==r)if("number"!=typeof r){try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{p(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,r)}),[s,r,o]))}({getKey:e,storageKey:t});let c=i.useMemo((()=>{if(!r||!e)return null;let t=jr(a,s,o,e);return t!==a.key?t:null}),[]);if(!r||r.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let n=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof n&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return i.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${Hn(JSON.stringify(t||Ar))}, ${Hn(JSON.stringify(c))})`}})}function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=i.useContext(Et);return d(t,vr(e)),t}function br(e){let t=i.useContext(Pt);return d(t,vr(e)),t}function wr(e){p("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Cn(e)),n=i.useRef(!1),r=Yt(),o=i.useMemo((()=>function(e,t){let n=Cn(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=zt(),s=i.useCallback(((e,t)=>{const r=Cn("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,s]}hr.displayName="Form",gr.displayName="ScrollRestoration";var xr=0,Or=()=>`__${String(++xr)}__`;function kr(){let{router:e}=yr("useSubmit"),{basename:t}=i.useContext(It),n=an("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:s,encType:c,formData:u,body:l}=Nn(e,t);if(!1===i.navigate){let e=i.fetcherKey||Or();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}var Ar="react-router-scroll-positions",Sr={};function jr(e,t,n,r){let o=null;return r&&(o=r("/"!==n?{...e,pathname:Y(e.pathname,n)||e.pathname}:e,t)),null==o&&(o=e.key),o}},52600:(e,t,n)=>{"use strict";n.d(t,{pg:()=>a});var r=n(3433),o=n(4883),i=n(81845);function a(e){return o.createElement(r.pg,{flushSync:i.flushSync,...e})}(0,r.q6)()},77987:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6695:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},95065:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e){if(Array.isArray(e))return(0,r.A)(e)}},97991:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},24747:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},27887:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{A:()=>o})},6624:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(37444),o=n(89954),i=n(1560);function a(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var a=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},88097:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},37444:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},49523:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(15216);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},89954:(e,t,n)=>{"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{A:()=>r})},62439:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},21648:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}n.d(t,{A:()=>r})},37820:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},77969:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},47029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},23715:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8609);function o(e,t){if(null==e)return{};var n,o,i=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},8609:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})},1560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65710),o=n(97991);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},15216:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function s(e,t){return(0,r.A)(e)||(0,o.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},47978:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{A:()=>r})},78840:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(95065),o=n(62439),i=n(25134),a=n(77969);function s(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,a.A)()}},65710:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},72367:(e,t,n)=>{"use strict";n.d(t,{B1:()=>r});function r(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}Math.min,Math.max;const o=["top","right","bottom","left"];o.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[])},9725:(e,t,n)=>{"use strict";n.d(t,{ll:()=>w});n(72367);function r(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function o(e){if(null==e)return window;if(!r(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return o(e).getComputedStyle(e)}function a(e){return r(e)?"":e?(e.nodeName||"").toLowerCase():""}function s(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function c(e){return e instanceof o(e).HTMLElement}function u(e){return e instanceof o(e).Element}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function d(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=i(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function p(){return!/^((?!chrome|android).)*safari/i.test(s())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const m=Math.round;function h(e,t,n){var r,i,a,s;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&c(e)&&(d=e.offsetWidth>0&&m(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&m(l.height)/e.offsetHeight||1);const h=u(e)?o(e):window,g=!p()&&n,v=(l.left+(g&&null!=(r=null==(i=h.visualViewport)?void 0:i.offsetLeft)?r:0))/d,y=(l.top+(g&&null!=(a=null==(s=h.visualViewport)?void 0:s.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:y,right:v+b,bottom:y+w,left:v,x:v,y}}function g(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function v(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||g(e);return l(t)?t.host:t}function y(e){const t=v(e);return f(t)?e.ownerDocument.body:c(t)&&d(t)?t:y(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),s=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return i?c:c.concat(b(s))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,c=o&&!s,l=c||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let d,p=null;if(a){let r=!0;p=new ResizeObserver((()=>{r||n(),r=!1})),u(e)&&!s&&p.observe(e),u(e)||!e.contextElement||s||p.observe(e.contextElement),p.observe(t)}let f=s?h(e):null;return s&&function t(){const r=h(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{c&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4883),o=n(81845),i=n(2418);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class c extends r.Component{constructor(...e){super(...e),this._targetNode=r.createRef(),this._elementNode=r.createRef(),this._elementParentNode=null,this._tetherInstance=null}componentDidMount(){this._createContainer(),this.forceUpdate()}componentDidUpdate(e){if(e.renderElementTag===this.props.renderElementTag&&e.renderElementTo===this.props.renderElementTo||this._createContainer(),this._elementParentNode&&e.className!==this.props.className){const t=(e.className||"").split(" ").filter((e=>e.length>0)),n=(this.props.className||"").split(" ").filter((e=>e.length>0));this._elementParentNode.classList.remove(...t),this._elementParentNode.classList.add(...n)}this._update()}componentWillUnmount(){this._destroy()}getTetherInstance(){return this._tetherInstance}disable(){var e;null==(e=this._tetherInstance)||e.disable()}enable(){var e;null==(e=this._tetherInstance)||e.enable()}on(e,t,n){this._tetherInstance.on(e,t,n)}once(e,t,n){this._tetherInstance.once(e,t,n)}off(e,t){this._tetherInstance.off(e,t)}position(){var e;null==(e=this._tetherInstance)||e.position()}_runRenders(){let e="function"==typeof this.props.renderTarget?this.props.renderTarget(this._targetNode):null,t="function"==typeof this.props.renderElement?this.props.renderElement(this._elementNode):null;return(0,r.isValidElement)(e)||(e=null),(0,r.isValidElement)(t)||(t=null),{targetComponent:e,elementComponent:t}}_createTetherInstance(e){this._tetherInstance&&this._destroy(),this._tetherInstance=new i(e),this._registerEventListeners()}_destroyTetherInstance(){this._tetherInstance&&(this._tetherInstance.destroy(),this._tetherInstance=null)}_registerEventListeners(){this.on("update",((...e)=>this.props.onUpdate&&this.props.onUpdate.apply(this,e))),this.on("repositioned",((...e)=>this.props.onRepositioned&&this.props.onRepositioned.apply(this,e)))}get _renderNode(){const{renderElementTo:e}=this.props;return"string"==typeof e?document.querySelector(e):e||document.body}_destroy(){this._destroyTetherInstance(),this._removeContainer()}_createContainer(){this._removeContainer();const{renderElementTag:e="div",className:t}=this.props;this._elementParentNode=document.createElement(e),this._elementParentNode.className=t||""}_addContainerToDOM(){this._elementParentNode&&this._renderNode&&this._elementParentNode.parentNode!==this._renderNode&&this._renderNode.append(this._elementParentNode)}_removeContainer(){this._elementParentNode&&this._elementParentNode.parentNode&&this._elementParentNode.remove()}_update(){this._elementNode.current&&this._targetNode.current?this._updateTether():this._destroy()}_updateTether(){var e;const t=this.props,{id:n,style:r}=t,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(t,s),i=a({target:this._targetNode.current,element:this._elementParentNode},o),c=n||"";if(this._elementParentNode&&this._elementParentNode.id!==c&&(this._elementParentNode.id=c),this._elementParentNode&&r){const e=this._elementParentNode.style;for(const t in r)if(e[t]!==r[t]){let n=r[t];n&&(e[t]=n)}}this._addContainerToDOM(),this._tetherInstance?this._tetherInstance.setOptions(i):this._createTetherInstance(i),null==(e=this._tetherInstance)||e.position()}render(){const{targetComponent:e,elementComponent:t}=this._runRenders();return e?r.createElement(r.Fragment,null,e,t&&this._elementParentNode&&o.createPortal(t,this._elementParentNode)):null}}},27346:(e,t,n)=>{"use strict";function r(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}n.d(t,{P:()=>o,Y:()=>i});var o=r(),i=r},14644:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>u,Qd:()=>s,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>c,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function s(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function c(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(c)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function m(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return u}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),l=null}}}function v(e){if(!s(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,u=i(u,e)}finally{f=!1}return(l=d).forEach((e=>{e()})),e}v({type:a.INIT});return{dispatch:v,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,v({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function u(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const s={};for(let i=0;i<o.length;i++){const c=o[i],u=n[c],l=e[c],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}s[c]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?s:e}}function l(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return l(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=l(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},c=e.map((e=>e(s)));return a=p(...c)(i.dispatch),{...i,dispatch:a}}}function m(e){return s(e)&&"type"in e&&"string"==typeof e.type}}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=a,c.amdD=function(){throw new Error("define cannot be used indirect")},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",236:"actions",262:"html-editor",310:"vendor-fontawesome",556:"docs-actions",672:"phone-formatter",722:"code-editor",916:"vendor-icons"}[e]||e)+"."+{70:"6eb35e116783c5bdc17a",103:"5f3e2e43112557358e16",211:"208fc82f53d7c47efffd",222:"d22493eb8abed64fbc15",236:"9805d20511942db50ad7",262:"be6102835fc6c08d6768",264:"f997db76343655ab8b40",310:"42de47680bccd9d0e22f",389:"5cfcfbf63bc56900ed6e",432:"26c37b871737878e37d0",498:"218a3daec8088f81f59d",556:"1d830f53cd8af7679a3f",651:"be601f65933896c02538",672:"4a53f4b50dad490f6793",722:"498f6ff2b4763e472370",916:"e65ce34248dd13539eae",987:"ecec1b4eeb2cd1cfc432"}[e]+".js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-fdp-bundle:",c.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.p="/",(()=>{var e={471:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)s(c)}for(t&&t(n);u<i.length;u++)o=i[u],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_fdp_bundle=this.webpackChunktocco_fdp_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),c.nc=void 0;var u={};return(()=>{"use strict";c.r(u),c.d(u,{app:()=>it});var e=c(61402),t=c(5556),n=c.n(t),r=c(27772),o=c(52334),i=c(60115),a=c(82682),s=c(38798),l=c(71468),d=c(26396),p=c.n(d),f=c(62193),m=c.n(f),h=c(2404),g=c.n(h),v=c(71086),y=c.n(v),b=c(4883),w=c.n(b),x=c(3433),O=c(52600),k=c(88951),A=c(13128),S=c(59042),j=c(28391),E=c(18601),P=c(72942),D=c(12956),_=c(7311),T=c(66498),C=c(35301),M=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return T.A.getDispatchActions(e,I,t)},I=[{name:"entityName",action:C.Zl,mandatory:!0,argsFactory:function(e){return[e.entityName]}},{name:"entityName",action:C.uO,argsFactory:function(e){return[e.formBase||e.entityName]}},{name:"formBase",action:C.uO,argsFactory:function(e){return[e.formBase]}},{name:"scrollBehaviour",action:C.Zy,argsFactory:function(e){return[e.scrollBehaviour]}},{name:"id",action:C.RH,argsFactory:function(e){return[e.id||(new Date).valueOf()]}}],R=c(44467),N=c(92207),L=c.n(N),F=c(90167),H=c(29056),W=c(71635),B=p()(p()({},W.Bt,H.A.singleTransferReducer("formTouched")),W.wr,H.A.singleTransferReducer("detailParams")),Y={detailParams:void 0,formTouched:!1};var U=c(15890),V=c.n(U),z=c(22056),q=c.n(z),$=c(32742),G=c(57327),K=c(27399);function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var X=function(e){var t={};return e.fields.forEach((function(e){t[e.fieldName]=J({},e)})),e.relations.forEach((function(e){t[e.relationName]=J({type:"relation"},e)})),t};function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X;return L().mark((function n(){var r;return L().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,F.T1)(G.A.requestSaga,"entities/".concat(e,"/model"));case 2:return r=n.sent,n.next=5,(0,F.T1)(t,r.body);case 5:return n.abrupt("return",n.sent);case 6:case"end":return n.stop()}}),n)}))()}var ee={CREATE:"create",UPDATE:"update"};const te={modes:ee,getMode:function(e){return void 0===e?ee.CREATE:ee.UPDATE}};var ne=c(21259),re=c.n(ne);const oe=function(e){var t=e.split("/").filter((function(e){return!!e})),n=t[t.length-1],r=t.filter((function(e,t){return t>1&&t%2==0})).map((function(e){return e.split(".")})).reduce((function(e,t){return[].concat(re()(e),re()(t))}),[]);if(isNaN(n)){return{modelPaths:r,entityId:undefined,parentUrl:"/"+t.slice(0,-1).join("/")}}return{modelPaths:r,entityId:t[t.length-1],parentUrl:"/"+t.slice(0,-2).join("/")}};const ie=function(e,t){return 0!==t.length||(!e||isNaN(e))};var ae=c(74848),se=L().mark(pe),ce=L().mark(fe),ue=L().mark(ge),le=function(e){return e.entityBrowser},de=function(e){return e.input};function pe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.p8)(W.M4,me),(0,F.p8)(W.z3,fe),(0,F.p8)(W.o7,ve)]);case 2:case"end":return e.stop()}}),se)}function fe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.yJ)(W.EJ(void 0));case 2:case"end":return e.stop()}}),ce)}function me(e){var t=e.payload;return L().mark((function e(){var n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,v;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.T1)(oe,t.url);case 2:return n=e.sent,r=n.modelPaths,o=n.entityId,i=n.parentUrl,e.next=8,(0,F.Lt)(le);case 8:return a=e.sent,s=a.entityName,c=a.formBase,e.next=13,(0,F.T1)(te.getMode,o);case 13:return u=e.sent,e.next=16,(0,F.T1)(he,s,r,c);case 16:return l=e.sent,d=q()(l,2),p=d[0],f=d[1],e.next=22,(0,F.Lt)(de);case 22:return m=e.sent,h=m.initialKey,e.next=26,(0,F.T1)(ie,h,r);case 26:return g=e.sent,v={mode:u,entityId:o,entityName:p,formName:f,parentUrl:i,showBackButton:g},e.next=30,(0,F.yJ)(W.EJ(v));case 30:case"end":return e.stop()}}),e)}))()}function he(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return L().mark((function o(){var i,a,s,c,u,l,d;return L().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=V()(t),a=i[0],s=i.slice(1),a){o.next=3;break}return o.abrupt("return",[e,r]);case 3:return o.next=5,(0,F.T1)(Z,e);case 5:if(c=o.sent,u=c[a]){o.next=16;break}return o.next=10,(0,F.T1)(G.A.fetchForm,"".concat(n,"_detail_").concat(a),"list");case 10:return l=o.sent,o.next=13,(0,F.T1)(he,l.modelName,s,"".concat(n,"_").concat(a));case 13:case 19:return o.abrupt("return",o.sent);case 16:return d="".concat(n,"_").concat(u.targetEntity),o.next=19,(0,F.T1)(he,u.targetEntity,s,n,d);case 20:case"end":return o.stop()}}),o)}))()}function ge(e){var t;return L().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,F.T1)($.Ix);case 2:return t=n.sent,n.next=5,(0,F.yJ)(P.A.modal("navigation-pending-changes","client.entity-browser.detail.confirmTouchedFormTitle",e,(function(e){var n=e.close;return(0,ae.jsx)(K.A,{onYes:function(){n(),t.put("yes")},onNo:function(){n(),t.put("no")}})}),!0,(function(){return t.put("no")})));case 5:return n.next=7,(0,F.s)(t);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),ue)}function ve(e){var t=e.payload;return L().mark((function e(){var n,r;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.message,r=t.confirmCallback,e.next=3,(0,F.T1)(ge,n);case 3:if("yes"!==e.sent){e.next=9;break}return e.next=7,(0,F.T1)(r,!0);case 7:e.next=11;break;case 9:return e.next=11,(0,F.T1)(r,!1);case 11:case"end":return e.stop()}}),e)}))()}var ye=L().mark(be);function be(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.Zy)(pe)]);case 2:case"end":return e.stop()}}),ye)}const we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0,n=B[t.type];return n?n(e,t):e};function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke=p()(p()(p()(p()({},C.Rf,H.A.singleTransferReducer("entityName")),C.g0,(function(e,t){var n=t.payload.formBase;return n?Oe(Oe({},e),{},{formBase:n}):Oe({},e)})),C.J6,H.A.singleTransferReducer("scrollBehaviour")),C.PH,H.A.singleTransferReducer("appId")),Ae={entityName:"",formBase:"",scrollBehaviour:"none",appId:""};var Se=L().mark(Pe),je=L().mark(De),Ee=L().mark(_e);function Pe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.T1)(De),(0,F.p8)(C.XA,_e)]);case 2:case"end":return e.stop()}}),Se)}function De(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,F.s)(e.A.INPUT_INITIALIZED);case 2:return t.next=4,(0,F.yJ)(E.A.doSessionCheck());case 4:case"end":return t.stop()}}),je)}function _e(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.yJ)(j.A.fireExternalEvent("onRouteChange"));case 2:case"end":return e.stop()}}),Ee)}var Te=L().mark(Ce);function Ce(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.Zy)(Pe)]);case 2:case"end":return e.stop()}}),Te)}const Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae,t=arguments.length>1?arguments[1]:void 0,n=ke[t.type];return n?n(e,t):e},Ie={detail:we,form:R.A,entityBrowser:Me};var Re,Ne,Le=[Ce,be];function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We="entity-browser",Be=["onVisibilityStatusChange","onRouteChange"],Ye=w().lazy((function(){return Promise.all([c.e(70),c.e(651)]).then(c.bind(c,19651))})),Ue=function(){return Re||(Re=(0,ae.jsx)(b.Suspense,{fallback:"",children:(0,ae.jsx)(Ye,{})}))},Ve=function(e){var t=e.initialKey,n=e.initialAction,r=(0,x.Zp)(),o=(0,x.zy)().pathname;(0,b.useEffect)((function(){if(t&&!isNaN(t)){if(!o.match(/\/detail\/[0-9]*/)){var e="/detail/".concat(t);r(e)}}if(n&&n.name){var i="/action/".concat(n.name,"?").concat(D.A.toQueryString(n.properties));r(i)}}),[])},ze=function(e){var t=e.memoryRouter,n=e.initialKey,r=e.initialAction,o=(t?x.bg:x.Ge)([{path:"*",element:(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(Ve,{initialKey:n,initialAction:r}),Ne||(Ne=(0,ae.jsx)(Ue,{}))]})}]);return(0,ae.jsx)(O.pg,{router:o})},qe=function(t,n,r,o){n=He(He({},n),{},{id:t}),i.A.setInputEnvs(n);var a=e.A.createStore(Ie,Le,n,We);j.A.addToStore(a,(function(t){return e.A.getEvents(Be,t.input)})),k.A.addToStore(a),A.A.dynamicActionsAddToStore(a),S.A.addToStore(a,!0,["console","remote","notification"]),P.A.addToStore(a,!0),E.A.addToStore(a);var s=(0,ae.jsx)(ze,{memoryRouter:n.memoryHistory,initialKey:n.initialKey,initialAction:n.initialAction});return e.A.createApp(We,s,a,{input:n,actions:M(n),publicPath:o,textResourceModules:["component","common","actions","entity-list","entity-detail"]})},$e=function(t){var n=e.A.useApp({initApp:qe,props:t,packageName:We}),r=n.component,o=n.store,i=_.A.usePrevious(t);return _.A.useDidUpdate((function(){var e=y()(t,(function(e,t){return!g()(e,i[t])}));m()(e)||M(e,!1).forEach((function(e){o.dispatch(e)}))}),[t]),(0,ae.jsx)(ae.Fragment,{children:r})};$e.propTypes=He({entityName:n().string.isRequired,searchFormType:o.X,formBase:n().string,limit:n().oneOfType([n().number,n().string]),preselectedSearchFields:n().array,searchFilters:n().arrayOf(n().string),simpleSearchFields:n().string,initialKey:n().string,initialAction:n().shape({name:n().string,properties:n().objectOf(n().object)}),businessUnit:n().string,memoryHistory:n().bool,backendUrl:n().string,scrollBehaviour:n().oneOf(["none","inline"]),appContext:a.A.propTypes,modifyFormDefinition:n().func,modifyEntityPaths:n().func,disableDetailView:n().bool,reportIds:n().arrayOf(n().string),customActionEventHandlers:n().objectOf(n().objectOf(n().func)),isHidden:n().bool},j.A.createPropTypes(Be));const Ge=$e;e.A.createBundleableApp(We,qe,$e);var Ke=c(53727),Qe=c(46836),Je=L().mark(Xe);function Xe(e,t){var n,r;return L().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,G.A.fetchEntity("Membership",t,{paths:["relMembership_type.unique_id"]},{},Qe.A.getFlattenEntity);case 2:if(n=o.sent,r=n["relMembership_type.unique_id"],"haushalt".includes(r)){o.next=8;break}return o.abrupt("return",Ke.A.removeBoxes(e,["relTeam_member"]));case 8:return o.abrupt("return",e);case 9:case"end":return o.stop()}}),Je)}const Ze=function(e){var t=e.formBase,n=e.reportIds,r=e.searchFilters,o=e.limit,i=e.backendUrl,a=e.businessUnit,s=e.appContext,c=e.searchFormType,u=e.locale;return(0,ae.jsx)(Ge,{entityName:"Membership",formBase:t,searchFilters:r,limit:o,modifyFormDefinition:function(e,n){return function(e,t,n){t.parent;var r=t.entityId,o=n.formBase;return L().mark((function t(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.id!=="".concat(o,"_detail")){t.next=6;break}return t.next=3,Xe(e,r);case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)}))()}(e,n,{formBase:t})},backendUrl:i,businessUnit:a,appContext:s,reportIds:n,searchFormType:c,locale:u})};const et=(0,l.Ng)((function(e){return{formBase:e.input.formBase,reportIds:e.input.reportIds,searchFilters:e.input.searchFilters,limit:e.input.limit,backendUrl:e.input.backendUrl,businessUnit:e.input.businessUnit,appContext:e.input.appContext,searchFormType:e.input.searchFormType,locale:e.intl.locale}}),{})((0,s.Ay)(Ze));var tt,nt="fdp-membership-administration",rt=function(t,n,r,o){i.A.setInputEnvs(n);var a=tt||(tt=(0,ae.jsx)(et,{})),s=e.A.createStore({},null,n,nt);return e.A.createApp(nt,a,s,{input:n,events:r,actions:[],publicPath:o,textResourceModules:["component","common",nt]})},ot=function(t){return e.A.useApp({initApp:rt,props:t,packageName:nt}).component};ot.propTypes={appContext:a.A.propTypes.isRequired,selection:r.A.propType.isRequired,reportIds:n().arrayOf(n().string).isRequired,searchFilters:n().arrayOf(n().string),searchFormType:o.X,limit:n().number,backendUrl:n().string,businessUnit:n().string,entityName:n().string,formBase:n().string};var it=e.A.createBundleableApp(nt,rt,ot);e.A.registerAppInRegistry(it.name,it.init)})(),u})()));
|
|
50
|
+
*/function u(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>l(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=c(null==r?t.length-1:r),a="POP",s=null;function c(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[i]}function l(e,n=null,r){let o=m(t?u().pathname:"/",e,n,r);return p("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:h(e)}return{get index(){return i},get action(){return a},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?g(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=l(e,n);i+=1,t.splice(i,t.length,r),o&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=l(e,n);t[i]=r,o&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=c(i+e),r=t[n];i=n,s&&s({action:a,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}function l(e={}){return v((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=g(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),m("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:h(t))}),(function(e,t){p("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function d(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?g(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function h({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function g(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function v(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function p(){s="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:s,location:g.location,delta:t})}function h(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let g={get action(){return s},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(c,p),u=e,()=>{o.removeEventListener(c,p),u=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=m(g.location,e,t);n&&n(r,e),l=d()+1;let c=f(r,l),p=g.createHref(r);try{a.pushState(c,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}i&&u&&u({action:s,location:g.location,delta:1})},replace:function(e,t){s="REPLACE";let r=m(g.location,e,t);n&&n(r,e),l=d();let o=f(r,l),c=g.createHref(r);a.replaceState(o,"",c),i&&u&&u({action:s,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),d(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:h(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function b(e){return{defaultValue:e}}var w=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(s(this,o).has(e))return s(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){s(this,o).set(e,t)}};o=new WeakMap;var x=new Set(["lazy","caseSensitive","path","id","index","children"]);var O=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function k(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(o||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=k(e.children,t,a,r,o)),n}}))}function A(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function S(e,t,n="/"){return j(e,t,n,!1)}function j(e,t,n,r){let o=Y(("string"==typeof t?g(t):t).pathname||"/",n);if(null==o)return null;let i=P(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=B(o);a=F(i[e],t,r)}return a}function E(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function P(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;d(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=Q([r,c.relativePath]),l=n.concat(c);e.children&&e.children.length>0&&(d(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,l,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:L(u,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of D(e.path))i(e,t,!0,n);else i(e,t)})),t}function D(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=D(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var _=/^:[\w-]+$/,T=3,C=2,M=1,I=10,R=-2,N=e=>"*"===e;function L(e,t){let n=e.split("/"),r=n.length;return n.some(N)&&(r+=R),t&&(r+=C),n.filter((e=>!N(e))).reduce(((e,t)=>e+(_.test(t)?T:""===t?M:I)),r)}function F(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},u),d=s.route;if(!l&&c&&n&&!r[r.length-1].route.index&&(l=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:Q([i,l.pathname]),pathnameBase:J(Q([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=Q([i,l.pathnameBase]))}return a}function H(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=W(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function W(e,t=!1,n=!0){p("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function B(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Y(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var U=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=e=>U.test(e);function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function q(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function G(e){let t=$(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function K(e,t,n,r=!1){let o;"string"==typeof e?o=g(e):(o={...e},d(!o.pathname||!o.pathname.includes("?"),q("?","pathname","search",o)),d(!o.pathname||!o.pathname.includes("#"),q("#","pathname","hash",o)),d(!o.search||!o.search.includes("#"),q("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?g(e):e;if(r)if(V(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),p(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)}else n=t;return{pathname:n,search:X(o),hash:Z(i)}}(o,i),u=s&&"/"!==s&&s.endsWith("/"),l=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!l||(c.pathname+="/"),c}var Q=e=>e.join("/").replace(/\/\/+/g,"/"),J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ee=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ne(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function oe(e,t){let n=e;if("string"!=typeof n||!U.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(re)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=Y(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var ie=Symbol("Uninstrumented");function ae(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=se(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=se(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[ie]??o,i=se(n[e],t,((...e)=>ue(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[ie]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[ie]??e,r=se(n.middleware,t,((...e)=>ue(e[0])));return r?(r[ie]=t,r):e}))),r}function se(e,t,n){return 0===e.length?null:async(...r)=>{let o=await ce(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function ce(e,t,n,r){let o,i=e[r];if(i){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ce(e,t,n,r-1),o=await a,d(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await s(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ue(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:de(t),params:{...r},unstable_pattern:o,context:pe(n)}}function le(e,t){return{currentUrl:h(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function de(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function pe(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===fe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var fe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var me=["POST","PUT","PATCH","DELETE"],he=new Set(me),ge=["GET",...me],ve=new Set(ge),ye=new Set([301,302,303,307,308]),be=new Set([307,308]),we={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Oe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ke=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ae="remix-router-transitions",Se=Symbol("ResetLoaderData");function je(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;d(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||ke,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ae(t.map((e=>e.route)).filter(Boolean),e)})}let a,s={},c=k(e.routes,i,void 0,s),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let l,f,g=e.dataStrategy||He,v={...e.future},b=null,x=new Set,O=null,A=null,P=null,D=null!=e.hydrationData,_=S(c,e.history.location,u),T=!1,C=null;if(null!=_||e.patchRoutesOnNavigation){if(_&&!e.hydrationData){Ue(_,c,e.history.location.pathname).active&&(_=null)}if(_)if(_.some((e=>e.route.lazy)))l=!1;else if(_.some((e=>_e(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=_.findIndex((e=>void 0!==n[e.route.id]));l=_.slice(0,e+1).every((e=>!Te(e.route,t,n)))}else l=_.every((e=>!Te(e.route,t,n)))}else l=!0;else{l=!1,_=[];let t=Ue(null,c,e.history.location.pathname);t.active&&t.matches&&(T=!0,_=t.matches)}}else{let t=at(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=it(c);l=!0,_=n,C={[r.id]:t}}let M,I,R={historyAction:e.history.action,location:e.history.location,matches:_,initialized:l,navigation:we,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},N="POP",L=null,F=!1,H=!1,W=new Map,B=null,U=!1,z=!1,q=new Set,$=new Map,G=0,K=-1,Q=new Map,J=new Set,X=new Map,Z=new Map,ee=new Set,ne=new Map,re=null;function oe(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=s[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ee.has(t)?n.push(t):r.push(t))})),ee.forEach((e=>{R.fetchers.has(e)||$.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>Se(e))),r.forEach((e=>R.fetchers.delete(e)))}function ce(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&bt(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let s=n.loaderData?nt(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,u=R.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,Oe))));let l,d=!U&&Ye(t,n.matches||R.matches),p=!0===F||null!=R.navigation.formMethod&&bt(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(c=a,a=void 0),U||"POP"===N||("PUSH"===N?e.history.push(t,t.state):"REPLACE"===N&&e.history.replace(t,t.state)),"POP"===N){let e=W.get(R.location.pathname);e&&e.has(t.pathname)?l={currentLocation:R.location,nextLocation:t}:W.has(t.pathname)&&(l={currentLocation:t,nextLocation:R.location})}else if(H){let e=W.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(R.location.pathname,e)),l={currentLocation:R.location,nextLocation:t}}oe({...n,actionData:o,loaderData:s,historyAction:N,location:t,initialized:!0,navigation:we,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),N="POP",F=!1,H=!1,U=!1,z=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function ue(t,n,o){M&&M.abort(),M=null,N=t,U=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(O&&P){let n=Be(e,t);O[n]=P()}}(R.location,R.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||c,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!T?R.matches:S(l,n,u),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!z&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(R.location,n)&&!(o&&o.submission&&bt(o.submission.formMethod)))return void ce(n,{matches:p},{flushSync:f});let m=Ue(p,l,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return void ce(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}M=new AbortController;let h,g=Je(e.history,n,M.signal,o&&o.submission),v=e.getContext?await e.getContext():new w;if(o&&o.pendingError)h=[ot(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&bt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){he();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(oe({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await Ve(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=it(c);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=xt(a,n);if(g.route.action||g.route.lazy){let e=ze(i,s,t,a,g,p?[]:r,l),n=await fe(t,e,l,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:at(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(mt(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Qe(m.response.headers.get("Location"),new URL(t.url),u,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ft(m)){let e=ot(a,g.route.id);return!0!==(f&&f.replace)&&(N="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,v,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ft(r)&&te(r.error)&&404===r.error.status)return M=null,void ce(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=kt(n,o.submission),f=!1,m.active=!1,g=Je(e.history,g.url,g.signal)}let{shortCircuited:y,matches:b,loaderData:x,errors:k}=await async function(t,n,o,l,d,p,f,m,h,g,v,y,b){let w=p||kt(n,f),x=f||m||Ot(w),O=!U&&!g;if(d){if(O){let e=de(y);oe({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await Ve(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=it(c);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let k=a||c,{dsMatches:A,revalidatingFetchers:S}=De(t,l,i,s,e.history,R,o,x,n,g?[]:r,!0===g,z,q,ee,X,J,k,u,null!=e.patchRoutesOnNavigation,y,b);if(K=++G,!e.dataStrategy&&!A.some((e=>e.shouldLoad))&&!A.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===S.length){let e=Ie();return ce(n,{matches:o,loaderData:{},errors:y&&ft(y[1])?{[y[0]]:y[1].error}:null,...rt(y),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:v}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(y);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=At(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(S)),oe(e,{flushSync:v})}S.forEach((e=>{je(e.key),e.controller&&$.set(e.key,e.controller)}));let j=()=>S.forEach((e=>je(e.key)));M&&M.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await me(A,S,t,l);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",j);S.forEach((e=>$.delete(e.key)));let D=st(E);if(D)return await pe(t,D.result,!0,{replace:h}),{shortCircuited:!0};if(D=st(P),D)return J.add(D.key),await pe(t,D.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:_,errors:T}=tt(R,o,E,y,S,P);g&&R.errors&&(T={...R.errors,...T});let C=Ie(),I=Re(K),N=C||I||S.length>0;return{matches:o,loaderData:_,errors:T,...N?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,v,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);y||(M=null,ce(n,{matches:b||p,...rt(h),loaderData:x,errors:k}))}function de(e){return e&&!ft(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:s,preventScrollReset:c,replace:l}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(z=!0);let p=o.response.headers.get("Location");d(p,"Expected a Location header on the redirect Response"),p=Qe(p,new URL(r.url),u,e.history);let f=m(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(V(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==Y(n.pathname,u)}if(e)return void(l?t.location.replace(p):t.location.assign(p))}M=null;let h=!0===l||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!s&&g&&v&&b&&(a=Ot(R.navigation));let w=a||s;if(be.has(o.response.status)&&w&&bt(w.formMethod))await ue(h,f,{submission:{...w,formAction:p},preventScrollReset:c||F,enableViewTransition:i?H:void 0});else{let e=kt(f,a);await ue(h,f,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:c||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await qe(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!bt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(pt(r)){let o=r.result;i[n]={type:"redirect",response:Ke(o,e,n,t,u)}}else i[n]=await Ge(r);return i}async function me(e,t,n,r){let o=fe(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await fe(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:at(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function he(){z=!0,X.forEach(((e,t)=>{$.has(t)&&q.add(t),je(t)}))}function ge(e,t,n={}){R.fetchers.set(e,t),oe({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ve(e,t,n,r={}){let o=ot(R.matches,t);Se(e),oe({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ye(e){return Z.set(e,(Z.get(e)||0)+1),ee.has(e)&&ee.delete(e),R.fetchers.get(e)||xe}function Se(e){let t=R.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&Q.has(e)||je(e),X.delete(e),Q.delete(e),J.delete(e),ee.delete(e),q.delete(e),R.fetchers.delete(e)}function je(e,t){let n=$.get(e);n&&(n.abort(t),$.delete(e))}function Ce(e){for(let t of e){let e=St(ye(t).data);R.fetchers.set(t,e)}}function Ie(){let e=[],t=!1;for(let n of J){let r=R.fetchers.get(n);d(r,`Expected fetcher: ${n}`),"loading"===r.state&&(J.delete(n),e.push(n),t=!0)}return Ce(e),t}function Re(e){let t=[];for(let[n,r]of Q)if(r<e){let e=R.fetchers.get(n);d(e,`Expected fetcher: ${n}`),"loading"===e.state&&(je(n),Q.delete(n),t.push(n))}return Ce(t),t.length>0}function Ne(e){R.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=R.blockers.get(e)||Oe;d("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),oe({blockers:r})}function Fe({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&p(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function We(e){let t=at(404,{pathname:e}),n=a||c,{matches:r,route:o}=it(n);return{notFoundMatches:r,route:o,error:t}}function Be(e,t){if(A){return A(e,t.map((e=>E(e,R.loaderData))))||e.key}return e.key}function Ye(e,t){if(O){let n=Be(e,t),r=O[n];if("number"==typeof r)return r}return null}function Ue(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:j(n,r,u,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:j(n,r,u,!0)}}}return{active:!1,matches:null}}async function Ve(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||c,p=s;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Me(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(c=[...c])}if(r.aborted)return{type:"aborted"};let f=S(d,n,u),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=j(d,n,u,!0),!(m&&l.length<m.length&&$e(l,m.slice(0,l.length))))return{type:"success",matches:f}}if(m||(m=j(d,n,u,!0)),!m||$e(l,m))return{type:"success",matches:null};l=m}}function $e(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return f={get basename(){return u},get future(){return v},get state(){return R},get routes(){return c},get window(){return t},initialize:function(){if(b=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);p(0===ne.size||null!=r,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Fe({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Le(o,{state:"blocked",location:n,proceed(){Le(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,Oe),oe({blockers:e})}}),L?.resolve(),void(L=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ae);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,W);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ae,JSON.stringify(n))}catch(e){p(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,W);t.addEventListener("pagehide",e),B=()=>t.removeEventListener("pagehide",e)}return R.initialized||ue("POP",R.location,{initialHydration:!0}),f},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(O=e,P=t,A=n||null,!D&&R.navigation===we){D=!0;let e=Ye(R.location,R.matches);null!=e&&oe({restoreScrollPosition:e})}return()=>{O=null,P=null,A=null}},navigate:async function t(n,r){if(L?.resolve(),L=null,"number"==typeof n){L||(L=jt());let t=L.promise;return e.history.go(n),t}let o=Ee(R.location,R.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:s}=Pe(!1,o,r),c=R.location,l=m(R.location,i,r&&r.state);l={...l,...e.history.encodeLocation(l)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&bt(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=Fe({currentLocation:c,nextLocation:l,historyAction:p});g?Le(g,{state:"blocked",location:l,proceed(){Le(g,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,Oe),oe({blockers:e})}}):await ue(p,l,{submission:a,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,l){je(t);let p=!0===(l&&l.flushSync),f=a||c,m=Ee(R.location,R.matches,u,o,n,l?.relative),h=S(f,m,u),g=Ue(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void ve(t,n,at(404,{pathname:m}),{flushSync:p});let{path:v,submission:y,error:b}=Pe(!0,m,l);if(b)return void ve(t,n,b,{flushSync:p});let x=e.getContext?await e.getContext():new w,O=!0===(l&&l.preventScrollReset);y&&bt(y.formMethod)?await async function(t,n,o,l,p,f,m,h,g,v){he(),X.delete(t);let y=R.fetchers.get(t);ge(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(g,y),{flushSync:m});let b=new AbortController,w=Je(e.history,o,b.signal,g);if(f){let e=await Ve(l,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ve(t,n,e.error,{flushSync:m});if(!e.matches)return void ve(t,n,at(404,{pathname:o}),{flushSync:m});l=e.matches}let x=xt(l,o);if(!x.route.action&&!x.route.lazy){let e=at(405,{method:g.formMethod,pathname:o,routeId:n});return void ve(t,n,e,{flushSync:m})}$.set(t,b);let O=G,k=ze(i,s,w,l,x,r,p),A=await fe(w,k,p,t),j=A[x.route.id];if(!j)for(let e of k)if(A[e.route.id]){j=A[e.route.id];break}if(w.signal.aborted)return void($.get(t)===b&&$.delete(t));if(ee.has(t)){if(mt(j)||ft(j))return void ge(t,St(void 0))}else{if(mt(j))return $.delete(t),K>O?void ge(t,St(void 0)):(J.add(t),ge(t,At(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(ft(j))return void ve(t,n,j.error)}let E=R.navigation.location||R.location,P=Je(e.history,E,b.signal),D=a||c,_="idle"!==R.navigation.state?S(D,R.navigation.location,u):R.matches;d(_,"Didn't find any matches after fetcher action");let T=++G;Q.set(t,T);let C=At(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:L}=De(P,p,i,s,e.history,R,_,g,E,r,!1,z,q,ee,X,J,D,u,null!=e.patchRoutesOnNavigation,[x.route.id,j],v);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=At(void 0,n?n.data:void 0);R.fetchers.set(t,r),je(t),e.controller&&$.set(t,e.controller)})),oe({fetchers:new Map(R.fetchers)});let F=()=>L.forEach((e=>je(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:W}=await me(I,L,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),Q.delete(t),$.delete(t),L.forEach((e=>$.delete(e.key))),R.fetchers.has(t)){let e=St(j.data);R.fetchers.set(t,e)}let B=st(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=st(W),B)return J.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:Y,errors:U}=tt(R,_,H,void 0,L,W);Re(T),"loading"===R.navigation.state&&T>K?(d(N,"Expected pending action"),M&&M.abort(),ce(R.navigation.location,{matches:_,loaderData:Y,errors:U,fetchers:new Map(R.fetchers)})):(oe({errors:U,loaderData:nt(R.loaderData,Y,_,U),fetchers:new Map(R.fetchers)}),z=!1)}(t,n,v,h,x,g.active,p,O,y,l&&l.unstable_defaultShouldRevalidate):(X.set(t,{routeId:n,path:v}),await async function(t,n,o,a,c,u,l,d,p){let f=R.fetchers.get(t);ge(t,At(p,f?f.data:void 0),{flushSync:l});let m=new AbortController,h=Je(e.history,o,m.signal);if(u){let e=await Ve(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ve(t,n,e.error,{flushSync:l});if(!e.matches)return void ve(t,n,at(404,{pathname:o}),{flushSync:l});a=e.matches}let g=xt(a,o);$.set(t,m);let v=G,y=ze(i,s,h,a,g,r,c),b=await fe(h,y,c,t),w=b[g.route.id];$.get(t)===m&&$.delete(t);if(h.signal.aborted)return;if(ee.has(t))return void ge(t,St(void 0));if(mt(w))return K>v?void ge(t,St(void 0)):(J.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(ft(w))return void ve(t,n,w.error);ge(t,St(w.data))}(t,n,v,h,x,g.active,p,O,y))},revalidate:function(){re||(re=jt()),he(),oe({revalidation:"loading"});let e=re.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(ue(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(ue(N||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ye,resetFetcher:function(e,t){je(e,t?.reason),ge(e,St(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),ee.add(e)):Z.set(e,t),oe({fetchers:new Map(R.fetchers)})},dispose:function(){b&&b(),B&&B(),x.clear(),M&&M.abort(),R.fetchers.forEach(((e,t)=>Se(t))),R.blockers.forEach(((e,t)=>Ne(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||Oe;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ne,patchRoutes:function(e,t,n=!1){let r=null==a;Me(e,t,a||c,s,i,n),r&&(c=[...c],oe({}))},_internalFetchControllers:$,_internalSetRoutes:function(e){s={},a=k(e,i,void 0,s)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){oe(e)}},e.unstable_instrumentations&&(f=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[ie]??e.navigate,r=se(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?h(n):".",...le(e,r??{})}}));r&&(r[ie]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[ie]??e.fetch,r=se(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...le(e,o??{})}}));r&&(r[ie]=t,e.fetch=r)}return e}(f,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),f}function Ee(e,t,n,r,o,i){let a,s;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){s=e;break}}else a=t,s=t[t.length-1];let c=K(r||".",G(a),Y(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(c.search=e.search,c.hash=e.hash),(null==r||""===r||"."===r)&&s){let e=wt(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?`?${n}`:""}}return"/"!==n&&(c.pathname=function({basename:e,pathname:t}){return"/"===t?e:Q([e,t])}({basename:n,pathname:c.pathname})),h(c)}function Pe(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!yt(n.formMethod))return{path:t,error:at(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:at(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),s=ct(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!bt(a))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,[t,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!bt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(d("function"==typeof FormData,"FormData is not available in this environment"),n.formData)r=Xe(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Xe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=Ze(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Ze(r)}catch(e){return i()}let c={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(bt(c.formMethod))return{path:t,submission:c};let u=g(t);return e&&u.search&&wt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:h(u),submission:c}}function De(e,t,n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,v,y,b,w){let x,O=b?ft(b[1])?b[1].error:b[1].data:void 0,k=o.createURL(i.location),A=o.createURL(c);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ft(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:k,currentParams:i.matches[0]?.params||{},nextUrl:A,nextParams:a[0].params,...s,actionResult:O,actionStatus:j},D=ne(a),_=a.map(((o,a)=>{let{route:s}=o,c=null;if(null!=x&&a>x?c=!1:s.lazy?c=!0:_e(s)?l?c=Te(s,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(c=!0):c=!1,null!==c)return Ve(n,r,e,D,o,u,t,c);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=Ce(o,f);return Ve(n,r,e,D,o,u,t,m,f,w)})),T=[];return m.forEach(((e,s)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(s))return;let c=i.fetchers.get(s),m=c&&"idle"!==c.state&&void 0===c.data,b=S(g,e.path,v);if(!b){if(y&&m)return;return void T.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(s))return;let x=xt(b,e.path),O=new AbortController,k=Je(o,e.path,O.signal),A=null;if(p.has(s))p.delete(s),A=ze(n,r,k,b,x,u,t);else if(m)d&&(A=ze(n,r,k,b,x,u,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};Ce(x,o)&&(A=ze(n,r,k,b,x,u,t,o))}A&&T.push({key:s,routeId:e.routeId,path:e.path,matches:A,match:x,request:k,controller:O})})),{dsMatches:_,revalidatingFetchers:T}}function _e(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function Te(e,t,n){if(e.lazy)return!0;if(!_e(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function Ce(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Me(e,t,n,r,o,i){let a;if(e){let t=r[e];d(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let s=[],c=[];if(t.forEach((e=>{let t=a.find((t=>Ie(e,t)));t?c.push({existingRoute:t,newRoute:e}):s.push(e)})),s.length>0){let t=k(s,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[i]=k([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Ie(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Ie(e,t))))))}var Re=new WeakMap,Ne=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(d(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Re.get(o);a||(a={},Re.set(o,a));let s=a[e];if(s)return s;let c=(async()=>{let t=function(e){return x.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)p(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)p(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=c,c},Le=new WeakMap;async function Fe(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function He(e){return e.matches.some((e=>e.route.middleware))?We(e,(()=>Fe(e))):Fe(e)}function We(e,t){return Be(e,t,(e=>{if(vt(e))throw e;return e}),lt,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=ot(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Be(e,t,n,r,o){let{matches:i,request:a,params:s,context:c,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Ye({request:a,params:s,context:c,unstable_pattern:u},l,t,n,r,o)}async function Ye(e,t,n,r,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let c=t[a];if(!c){return await n()}let u,[l,d]=c,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let s=await Ye(e,t,n,r,o,i,a+1);return u={value:s},u.value}catch(e){return u={value:await i(e,l,u)},u.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:u?n??u.value:(u={value:await p()},u.value)}catch(e){return await i(e,l,u)}}function Ue(e,t,n,r,o){let i=Ne({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(d(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Le.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{d("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,O.has(o)),s=void 0!==i[e]&&"hasErrorBoundary"!==e;a?p(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?p(!s,`Route "${i.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return Le.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,s=Object.keys(e.lazy),c=[];for(let i of s){if(o&&o.includes(i))continue;let s=Ne({key:i,route:e,manifest:n,mapRouteProperties:r});s&&(c.push(s),i===t&&(a=s))}let u=c.length>0?Promise.all(c).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,bt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Ve(e,t,n,r,o,i,a,s,c=null,u){let l=!1,d=Ue(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler:e=>(l=!0,c?Ce(o,"boolean"==typeof u?{...c,defaultShouldRevalidate:u}:"boolean"==typeof e?{...c,defaultShouldRevalidate:e}:c):s),resolve(e){let{lazy:t,loader:i,middleware:c}=o.route,u=l||s||e&&!bt(n.method)&&(t||i),p=c&&c.length>0&&!i&&!t;return!u||!bt(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,c,u=bt(e.method),l=u?"action":"loader",d=r=>{let o,s=new Promise(((e,t)=>o=t));c=()=>o(),e.signal.addEventListener("abort",c);let u=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,s])};try{let t=u?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;s=n}else{await r;let t=u?n.route.action:n.route.loader;if(!t){if("action"===l){let t=new URL(e.url),r=t.pathname+t.search;throw at(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw at(404,{pathname:t.pathname+t.search})}s=await d(t)}}catch(e){return{type:"error",result:e}}finally{c&&e.signal.removeEventListener("abort",c)}return s}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function ze(e,t,n,r,o,i,a,s=null){return r.map((c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ue(e,t,n,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ve(e,t,n,ne(r),c,i,a,!0,s)))}async function qe(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:ne(n),params:n[0].params,context:o,matches:n},s=i?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=a;return We(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},c=await e({...a,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return c}async function $e(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ge(e){let{result:t,type:n}=e;if(gt(t)){let e;try{e=await $e(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===n?ht(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:ut(t),statusCode:te(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:te(t)?t.status:void 0}:ht(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ke(e,t,n,r,o){let i=e.headers.get("Location");if(d(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!V(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=Ee(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function Qe(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(V(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=Y(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function Je(e,t,n,r){let o=e.createURL(ct(t)).toString(),i={signal:n};if(r&&bt(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Xe(r.formData):i.body=r.formData}return new Request(o,i)}function Xe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Ze(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function et(e,t,n,r=!1,o=!1){let i,a={},s=null,c=!1,u={},l=n&&ft(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(d(!mt(f),"Cannot handle redirect results in processLoaderData"),ft(f)){let t=f.error;if(void 0!==l&&(t=l,l=void 0),s=s||{},o)s[p]=t;else{let n=ot(e,p);null==s[n.route.id]&&(s[n.route.id]=t)}r||(a[p]=Se),c||(c=!0,i=te(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!c&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==l&&n&&(s={[n[0]]:l},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:u}}function tt(e,t,n,r,o,i){let{loaderData:a,errors:s}=et(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(d(a,"Did not find corresponding fetcher result"),ft(a)){let t=ot(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(mt(a))d(!1,"Unhandled fetcher revalidation redirect");else{let t=St(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:s}}function nt(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==Se)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function rt(e){return e?ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ot(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function it(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function at(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",s=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new ee(e||500,a,new Error(s),!0)}function st(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(mt(r))return{key:n,result:r}}}function ct(e){return h({..."string"==typeof e?g(e):e,hash:""})}function ut(e){return new ee(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function lt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&dt(t)))}function dt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function pt(e){return gt(e.result)&&ye.has(e.result.status)}function ft(e){return"error"===e.type}function mt(e){return"redirect"===(e&&e.type)}function ht(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function gt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function vt(e){return gt(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ve.has(e.toUpperCase())}function bt(e){return he.has(e.toUpperCase())}function wt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function xt(e,t){let n="string"==typeof t?g(t).search:t.search;if(e[e.length-1].route.index&&wt(n||""))return e[e.length-1];let r=$(e);return r[r.length-1]}function Ot(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function kt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function At(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function St(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jt(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var Et=i.createContext(null);Et.displayName="DataRouter";var Pt=i.createContext(null);Pt.displayName="DataRouterState";var Dt=i.createContext(!1);function _t(){return i.useContext(Dt)}var Tt=i.createContext({isTransitioning:!1});Tt.displayName="ViewTransition";var Ct=i.createContext(new Map);Ct.displayName="Fetchers";var Mt=i.createContext(null);Mt.displayName="Await";var It=i.createContext(null);It.displayName="Navigation";var Rt=i.createContext(null);Rt.displayName="Location";var Nt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Nt.displayName="Route";var Lt=i.createContext(null);Lt.displayName="RouteError";var Ft=!0,Ht="REACT_ROUTER_ERROR",Wt="REDIRECT";function Bt(){return null!=i.useContext(Rt)}function Yt(){return d(Bt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Rt).location}var Ut="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vt(e){i.useContext(It).static||i.useLayoutEffect(e)}function zt(){let{isDataRoute:e}=i.useContext(Nt);return e?function(){let{router:e}=rn("useNavigate"),t=an("useNavigate"),n=i.useRef(!1);return Vt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{p(n.current,Ut),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){d(Bt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(Et),{basename:t,navigator:n}=i.useContext(It),{matches:r}=i.useContext(Nt),{pathname:o}=Yt(),a=JSON.stringify(G(r)),s=i.useRef(!1);return Vt((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(p(s.current,Ut),!s.current)return;if("number"==typeof r)return void n.go(r);let c=K(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:Q([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function qt(){let{matches:e}=i.useContext(Nt),t=e[e.length-1];return t?t.params:{}}function $t(e,{relative:t}={}){let{matches:n}=i.useContext(Nt),{pathname:r}=Yt(),o=JSON.stringify(G(n));return i.useMemo((()=>K(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Gt(e,t,n,r,o){d(Bt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(It),{matches:s}=i.useContext(Nt),c=s[s.length-1],u=c?c.params:{},l=c?c.pathname:"/",f=c?c.pathnameBase:"/",m=c&&c.route;if(Ft){let e=m&&m.path||"";pn(l,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,v=Yt();if(t){let e="string"==typeof t?g(t):t;d("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=v;let y=h.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=S(e,{pathname:b});Ft&&(p(m||null!=w,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),p(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let x=tn(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:Q([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:Q([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),s,n,r,o);return t&&x?i.createElement(Rt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},x):x}function Kt(){let e=cn(),t=te(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return Ft&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route."))),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}var Qt=i.createElement(Kt,null),Jt=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ht}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new ee(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Nt.Provider,{value:this.props.routeContext},i.createElement(Lt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Zt,{error:e},t):t}};Jt.contextType=Dt;var Xt=new WeakMap;function Zt({children:e,error:t}){let{basename:n}=i.useContext(It);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ht}:${Wt}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Xt.get(t);if(r)throw r;let o=oe(e.location,n);if(re&&!Xt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Xt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function en({routeContext:e,match:t,children:n}){let r=i.useContext(Et);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Nt.Provider,{value:e},n)}function tn(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,s=n?.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));d(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ne(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let d,p=!1,f=null,m=null;n&&(d=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||Qt,c&&(u<0&&0===o?(pn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=d?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(en,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Jt,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()}),null)}function nn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rn(e){let t=i.useContext(Et);return d(t,nn(e)),t}function on(e){let t=i.useContext(Pt);return d(t,nn(e)),t}function an(e){let t=function(e){let t=i.useContext(Nt);return d(t,nn(e)),t}(e),n=t.matches[t.matches.length-1];return d(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function sn(){let{matches:e,loaderData:t}=on("useMatches");return i.useMemo((()=>e.map((e=>E(e,t)))),[e,t])}function cn(){let e=i.useContext(Lt),t=on("useRouteError"),n=an("useRouteError");return void 0!==e?e:t.errors?.[n]}var un=0;function ln(e){let{router:t,basename:n}=rn("useBlocker"),r=on("useBlocker"),[o,a]=i.useState(""),s=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:Y(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:Y(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++un);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,s)}),[t,o,s]),o&&r.blockers.has(o)?r.blockers.get(o):Oe}var dn={};function pn(e,t,n){t||dn[e]||(dn[e]=!0,p(!1,n))}var fn={};function mn(e,t){e||fn[t]||(fn[t]=!0,console.warn(t))}var hn=(r||(r=n.t(i,2))).useOptimistic,gn=()=>{};function vn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Ft&&e.element&&p(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(Ft&&e.hydrateFallbackElement&&p(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(Ft&&e.errorElement&&p(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var yn=["HydrateFallback","hydrateFallbackElement"];function bn(e,t){return je({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:yn,mapRouteProperties:vn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}var wn=class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function xn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=_t();r=o||r;let[a,s]=i.useState(e.state),[c,u]=(l=a,hn?hn(l):[l,gn]);var l;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[v,y]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:c,flushSync:l,viewTransitionOpts:d})=>{c&&n&&Object.values(c).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:ne(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),mn(!1===l||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(mn(null==d||f,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),d&&f){if(t&&l){t((()=>{v&&(h?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>s(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),y(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>y(n)))}v?(h?.resolve(),v.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>s(o))):!1===r?s(o):i.startTransition((()=>{!0===r&&u((e=>On(e,o))),s(o)}))}),[e.window,t,v,h,r,u,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new wn)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?s(t):i.startTransition((()=>{!0===r&&u((e=>On(e,t))),s(t)})),await n}));o.finished.finally((()=>{g(void 0),y(void 0),p(void 0),m({isTransitioning:!1})})),y(o)}}),[d,h,e.window,r,u]),i.useEffect((()=>{h&&d&&c.location.key===d.location.key&&h.resolve()}),[h,v,c.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let k=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),A=e.basename||"/",S=i.useMemo((()=>({router:e,navigator:k,static:!1,basename:A,onError:n})),[e,k,A,n]);return i.createElement(i.Fragment,null,i.createElement(Et.Provider,{value:S},i.createElement(Pt.Provider,{value:c},i.createElement(Ct.Provider,{value:x.current},i.createElement(Tt.Provider,{value:f},i.createElement(jn,{basename:A,location:c.location,navigationType:c.historyAction,navigator:k,unstable_useTransitions:r},i.createElement(kn,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function On(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var kn=i.memo((function({routes:e,future:t,state:n,onError:r}){return Gt(e,void 0,n,r,t)}));function An({to:e,replace:t,state:n,relative:r}){d(Bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(It);p(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Nt),{pathname:s}=Yt(),c=zt(),u=K(e,G(a),s,"path"===r),l=JSON.stringify(u);return i.useEffect((()=>{c(JSON.parse(l),{replace:t,state:n,relative:r})}),[c,l,r,t,n]),null}function Sn(e){d(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:s}){d(!Bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:c,navigator:o,static:a,unstable_useTransitions:s,future:{}})),[c,o,a,s]);"string"==typeof n&&(n=g(n));let{pathname:l="/",search:f="",hash:m="",state:h=null,key:v="default"}=n,y=i.useMemo((()=>{let e=Y(l,c);return null==e?null:{location:{pathname:e,search:f,hash:m,state:h,key:v},navigationType:r}}),[c,l,f,m,h,v,r]);return p(null!=y,`<Router basename="${c}"> is not able to match the URL "${l}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:i.createElement(It.Provider,{value:u},i.createElement(Rt.Provider,{children:t,value:y}))}function En({children:e,location:t}){return Gt(Pn(e),t)}i.Component;function Pn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,Pn(e.props.children,o));d(e.type===Sn,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),d(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pn(e.props.children,o)),n.push(a)})),n}var Dn="get",_n="application/x-www-form-urlencoded";function Tn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Cn(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Mn=null;var In=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rn(e){return null==e||In.has(e)?e:(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_n}"`),null)}function Nn(e,t){let n,r,o,i,a;if(function(e){return Tn(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?Y(a,t):null,n=e.getAttribute("method")||Dn,o=Rn(e.getAttribute("enctype"))||_n,i=new FormData(e)}else if(function(e){return Tn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Tn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?Y(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Dn,o=Rn(e.getAttribute("formenctype"))||Rn(a.getAttribute("enctype"))||_n,i=new FormData(a,e),!function(){if(null===Mn)try{new FormData(document.createElement("form"),0),Mn=!1}catch(e){Mn=!0}return Mn}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(Tn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Dn,r=null,o=_n,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;var Ln={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Fn=/[&><\u2028\u2029]/g;function Hn(e){return e.replace(Fn,(e=>Ln[e]))}function Wn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Bn(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===Y(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Yn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Un(e){return null!=e&&"string"==typeof e.page}function Vn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function zn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function qn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function $n(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Un(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function Gn(e,t){return"lazy"===e.mode&&!0===t}function Kn(){let e=i.useContext(Et);return Wn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qn(){let e=i.useContext(Pt);return Wn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Jn=i.createContext(void 0);function Xn(){let e=i.useContext(Jn);return Wn(e,"You must render this element inside a <HydratedRouter> element"),e}function Zn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function er(e,t,n){if(n&&!or)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Jn.displayName="FrameworkContext";function tr({page:e,...t}){let{router:n}=Kn(),r=i.useMemo((()=>S(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(rr,{page:e,matches:r,...t}):null}function nr(e){let{manifest:t,routeModules:n}=Xn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return $n((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Yn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Vn).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function rr({page:e,matches:t,...n}){let r=Yt(),{future:o,manifest:a,routeModules:s}=Xn(),{basename:c}=Kn(),{loaderData:u,matches:l}=Qn(),d=i.useMemo((()=>zn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>zn(e,t,l,a,r,"assets")),[e,t,l,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in u&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=Bn(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&l.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[c,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,s]),m=i.useMemo((()=>qn(p,a)),[p,a]),h=nr(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var or=!1;function ir(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:s}=Xn(),{router:c,static:u,staticContext:l}=Kn(),{matches:d}=Qn(),p=_t(),f=Gn(a,s);o&&(o.didRenderScripts=!0);let m=er(d,null,r);i.useEffect((()=>{!0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=u?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Wn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:c,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:u,varName:`${r}_main`}];return 1===l.length?`import * as ${r} from ${JSON.stringify(u)};`:[l.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${l.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=S(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,c),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=or||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(qn(m,t,{includeHydrateFallback:!0}))),v="object"==typeof t.sri?t.sri:{};return mn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),or||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],suppressHydrationWarning:!0}))),h)}function ar(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function sr({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(te(e))return i.createElement(cr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Ft?r:null);if(e instanceof Error)e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(cr,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function cr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Xn();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(ir,null):null)))}var ur="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ur&&(window.__reactRouterVersion="7.12.0")}catch(e){}function lr(e,t){return je({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||dr(),routes:e,mapRouteProperties:vn,hydrationRouteProperties:yn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function dr(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:pr(e.errors)}),e}function pr(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new ee(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var fr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:c,to:u,preventScrollReset:l,viewTransition:p,unstable_defaultShouldRevalidate:f,...m},g){let{basename:v,unstable_useTransitions:y}=i.useContext(It),b="string"==typeof u&&fr.test(u),w=oe(u,v),x=function(e,{relative:t}={}){d(Bt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(It),{hash:o,pathname:a,search:s}=$t(e,{relative:t}),c=a;return"/"!==n&&(c="/"===a?n:Q([n,a])),r.createHref({pathname:c,search:s,hash:o})}(u=w.to,{relative:r}),[O,k,A]=function(e,t){let n=i.useContext(Jn),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Zn(c,m),onBlur:Zn(u,h),onMouseEnter:Zn(l,m),onMouseLeave:Zn(d,h),onTouchStart:Zn(p,m)}]:[!1,f,{}]}(n,m),S=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let l=zt(),d=Yt(),p=$t(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:h(d)===h(p),m=()=>l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c});u?i.startTransition((()=>m())):m()}}),[d,l,p,n,r,t,e,o,a,s,c,u])}(u,{replace:a,state:s,target:c,preventScrollReset:l,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:y});let j=i.createElement("a",{...m,...A,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||S(t)},ref:ar(g,k),target:c,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement(tr,{page:x})):j}));mr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:c,...u},l){let p=$t(a,{relative:u.relative}),f=Yt(),m=i.useContext(Pt),{navigator:h,basename:g}=i.useContext(It),v=null!=m&&function(e,{relative:t}={}){let n=i.useContext(Tt);d(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=yr("useViewTransitionState"),o=$t(e,{relative:t});if(!n.isTransitioning)return!1;let a=Y(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Y(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=H(o.pathname,s)||null!=H(o.pathname,a)}(p)&&!0===s,y=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=Y(w,g)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let O,k=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(x),A=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),S={isActive:k,isPending:A,isTransitioning:v},j=k?e:void 0;O="function"==typeof n?n(S):[n,k?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(S):o;return i.createElement(mr,{...u,"aria-current":j,className:O,ref:l,style:E,to:a,viewTransition:s},"function"==typeof c?c(S):c)})).displayName="NavLink";var hr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=Dn,action:c,onSubmit:u,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},v)=>{let{unstable_useTransitions:y}=i.useContext(It),b=kr(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(It),r=i.useContext(Nt);d(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...$t(e||".",{relative:t})},s=Yt();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:Q([n,a.pathname]));return h(a)}(c,{relative:l}),x="get"===s.toLowerCase()?"get":"post",O="string"==typeof c&&fr.test(c);return i.createElement("form",{ref:v,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,d=()=>b(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:o,state:a,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:m});y&&!1!==n?i.startTransition((()=>d())):d()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function gr({getKey:e,storageKey:t,...n}){let r=i.useContext(Jn),{basename:o}=i.useContext(It),a=Yt(),s=sn();!function({getKey:e,storageKey:t}={}){let{router:n}=yr("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=br("useScrollRestoration"),{basename:a}=i.useContext(It),s=Yt(),c=sn(),u=on("useNavigation").navigation;i.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:n}=t||{};i.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,n])}(i.useCallback((()=>{if("idle"===u.state){let t=jr(s,c,a,e);Sr[t]=window.scrollY}try{sessionStorage.setItem(t||Ar,JSON.stringify(Sr))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration="auto"}),[u.state,e,a,s,c,t])),"undefined"!=typeof document&&(i.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(t||Ar);e&&(Sr=JSON.parse(e))}catch(e){}}),[t]),i.useLayoutEffect((()=>{let t=n?.enableScrollRestoration(Sr,(()=>window.scrollY),e?(t,n)=>jr(t,n,a,e):void 0);return()=>t&&t()}),[n,a,e]),i.useLayoutEffect((()=>{if(!1!==r)if("number"!=typeof r){try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{p(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,r)}),[s,r,o]))}({getKey:e,storageKey:t});let c=i.useMemo((()=>{if(!r||!e)return null;let t=jr(a,s,o,e);return t!==a.key?t:null}),[]);if(!r||r.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let n=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof n&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return i.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${Hn(JSON.stringify(t||Ar))}, ${Hn(JSON.stringify(c))})`}})}function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=i.useContext(Et);return d(t,vr(e)),t}function br(e){let t=i.useContext(Pt);return d(t,vr(e)),t}function wr(e){p("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Cn(e)),n=i.useRef(!1),r=Yt(),o=i.useMemo((()=>function(e,t){let n=Cn(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=zt(),s=i.useCallback(((e,t)=>{const r=Cn("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,s]}hr.displayName="Form",gr.displayName="ScrollRestoration";var xr=0,Or=()=>`__${String(++xr)}__`;function kr(){let{router:e}=yr("useSubmit"),{basename:t}=i.useContext(It),n=an("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:s,encType:c,formData:u,body:l}=Nn(e,t);if(!1===i.navigate){let e=i.fetcherKey||Or();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}var Ar="react-router-scroll-positions",Sr={};function jr(e,t,n,r){let o=null;return r&&(o=r("/"!==n?{...e,pathname:Y(e.pathname,n)||e.pathname}:e,t)),null==o&&(o=e.key),o}},52600:(e,t,n)=>{"use strict";n.d(t,{pg:()=>a});var r=n(3433),o=n(4883),i=n(81845);function a(e){return o.createElement(r.pg,{flushSync:i.flushSync,...e})}(0,r.q6)()},77987:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6695:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},95065:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e){if(Array.isArray(e))return(0,r.A)(e)}},97991:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},24747:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},27887:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{A:()=>o})},6624:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(37444),o=n(89954),i=n(1560);function a(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var a=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},88097:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},37444:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},49523:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(15216);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},89954:(e,t,n)=>{"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{A:()=>r})},62439:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},21648:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}n.d(t,{A:()=>r})},37820:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},77969:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},47029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},23715:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8609);function o(e,t){if(null==e)return{};var n,o,i=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},8609:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})},1560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65710),o=n(97991);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},15216:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function s(e,t){return(0,r.A)(e)||(0,o.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},47978:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{A:()=>r})},78840:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(95065),o=n(62439),i=n(25134),a=n(77969);function s(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,a.A)()}},65710:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},72367:(e,t,n)=>{"use strict";n.d(t,{B1:()=>r});function r(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}Math.min,Math.max;const o=["top","right","bottom","left"];o.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[])},9725:(e,t,n)=>{"use strict";n.d(t,{ll:()=>w});n(72367);function r(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function o(e){if(null==e)return window;if(!r(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return o(e).getComputedStyle(e)}function a(e){return r(e)?"":e?(e.nodeName||"").toLowerCase():""}function s(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function c(e){return e instanceof o(e).HTMLElement}function u(e){return e instanceof o(e).Element}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function d(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=i(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function p(){return!/^((?!chrome|android).)*safari/i.test(s())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const m=Math.round;function h(e,t,n){var r,i,a,s;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&c(e)&&(d=e.offsetWidth>0&&m(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&m(l.height)/e.offsetHeight||1);const h=u(e)?o(e):window,g=!p()&&n,v=(l.left+(g&&null!=(r=null==(i=h.visualViewport)?void 0:i.offsetLeft)?r:0))/d,y=(l.top+(g&&null!=(a=null==(s=h.visualViewport)?void 0:s.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:y,right:v+b,bottom:y+w,left:v,x:v,y}}function g(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function v(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||g(e);return l(t)?t.host:t}function y(e){const t=v(e);return f(t)?e.ownerDocument.body:c(t)&&d(t)?t:y(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),s=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return i?c:c.concat(b(s))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,c=o&&!s,l=c||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let d,p=null;if(a){let r=!0;p=new ResizeObserver((()=>{r||n(),r=!1})),u(e)&&!s&&p.observe(e),u(e)||!e.contextElement||s||p.observe(e.contextElement),p.observe(t)}let f=s?h(e):null;return s&&function t(){const r=h(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{c&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4883),o=n(81845),i=n(2418);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class c extends r.Component{constructor(...e){super(...e),this._targetNode=r.createRef(),this._elementNode=r.createRef(),this._elementParentNode=null,this._tetherInstance=null}componentDidMount(){this._createContainer(),this.forceUpdate()}componentDidUpdate(e){if(e.renderElementTag===this.props.renderElementTag&&e.renderElementTo===this.props.renderElementTo||this._createContainer(),this._elementParentNode&&e.className!==this.props.className){const t=(e.className||"").split(" ").filter((e=>e.length>0)),n=(this.props.className||"").split(" ").filter((e=>e.length>0));this._elementParentNode.classList.remove(...t),this._elementParentNode.classList.add(...n)}this._update()}componentWillUnmount(){this._destroy()}getTetherInstance(){return this._tetherInstance}disable(){var e;null==(e=this._tetherInstance)||e.disable()}enable(){var e;null==(e=this._tetherInstance)||e.enable()}on(e,t,n){this._tetherInstance.on(e,t,n)}once(e,t,n){this._tetherInstance.once(e,t,n)}off(e,t){this._tetherInstance.off(e,t)}position(){var e;null==(e=this._tetherInstance)||e.position()}_runRenders(){let e="function"==typeof this.props.renderTarget?this.props.renderTarget(this._targetNode):null,t="function"==typeof this.props.renderElement?this.props.renderElement(this._elementNode):null;return(0,r.isValidElement)(e)||(e=null),(0,r.isValidElement)(t)||(t=null),{targetComponent:e,elementComponent:t}}_createTetherInstance(e){this._tetherInstance&&this._destroy(),this._tetherInstance=new i(e),this._registerEventListeners()}_destroyTetherInstance(){this._tetherInstance&&(this._tetherInstance.destroy(),this._tetherInstance=null)}_registerEventListeners(){this.on("update",((...e)=>this.props.onUpdate&&this.props.onUpdate.apply(this,e))),this.on("repositioned",((...e)=>this.props.onRepositioned&&this.props.onRepositioned.apply(this,e)))}get _renderNode(){const{renderElementTo:e}=this.props;return"string"==typeof e?document.querySelector(e):e||document.body}_destroy(){this._destroyTetherInstance(),this._removeContainer()}_createContainer(){this._removeContainer();const{renderElementTag:e="div",className:t}=this.props;this._elementParentNode=document.createElement(e),this._elementParentNode.className=t||""}_addContainerToDOM(){this._elementParentNode&&this._renderNode&&this._elementParentNode.parentNode!==this._renderNode&&this._renderNode.append(this._elementParentNode)}_removeContainer(){this._elementParentNode&&this._elementParentNode.parentNode&&this._elementParentNode.remove()}_update(){this._elementNode.current&&this._targetNode.current?this._updateTether():this._destroy()}_updateTether(){var e;const t=this.props,{id:n,style:r}=t,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(t,s),i=a({target:this._targetNode.current,element:this._elementParentNode},o),c=n||"";if(this._elementParentNode&&this._elementParentNode.id!==c&&(this._elementParentNode.id=c),this._elementParentNode&&r){const e=this._elementParentNode.style;for(const t in r)if(e[t]!==r[t]){let n=r[t];n&&(e[t]=n)}}this._addContainerToDOM(),this._tetherInstance?this._tetherInstance.setOptions(i):this._createTetherInstance(i),null==(e=this._tetherInstance)||e.position()}render(){const{targetComponent:e,elementComponent:t}=this._runRenders();return e?r.createElement(r.Fragment,null,e,t&&this._elementParentNode&&o.createPortal(t,this._elementParentNode)):null}}},27346:(e,t,n)=>{"use strict";function r(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}n.d(t,{P:()=>o,Y:()=>i});var o=r(),i=r},14644:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>u,Qd:()=>s,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>c,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function s(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function c(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(c)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function m(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return u}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),l=null}}}function v(e){if(!s(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,u=i(u,e)}finally{f=!1}return(l=d).forEach((e=>{e()})),e}v({type:a.INIT});return{dispatch:v,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,v({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function u(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const s={};for(let i=0;i<o.length;i++){const c=o[i],u=n[c],l=e[c],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}s[c]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?s:e}}function l(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return l(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=l(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},c=e.map((e=>e(s)));return a=p(...c)(i.dispatch),{...i,dispatch:a}}}function m(e){return s(e)&&"type"in e&&"string"==typeof e.type}}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=a,c.amdD=function(){throw new Error("define cannot be used indirect")},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",236:"actions",262:"html-editor",310:"vendor-fontawesome",556:"docs-actions",672:"phone-formatter",722:"code-editor",916:"vendor-icons"}[e]||e)+"."+{70:"6eb35e116783c5bdc17a",103:"5f3e2e43112557358e16",211:"208fc82f53d7c47efffd",222:"d22493eb8abed64fbc15",236:"9805d20511942db50ad7",262:"be6102835fc6c08d6768",264:"f997db76343655ab8b40",310:"42de47680bccd9d0e22f",389:"5cfcfbf63bc56900ed6e",432:"26c37b871737878e37d0",498:"218a3daec8088f81f59d",556:"1d830f53cd8af7679a3f",651:"be601f65933896c02538",672:"4a53f4b50dad490f6793",722:"498f6ff2b4763e472370",916:"e65ce34248dd13539eae",987:"ecec1b4eeb2cd1cfc432"}[e]+".js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-fdp-bundle:",c.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.p="/",(()=>{var e={471:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)s(c)}for(t&&t(n);u<i.length;u++)o=i[u],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_fdp_bundle=this.webpackChunktocco_fdp_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),c.nc=void 0;var u={};return(()=>{"use strict";c.r(u),c.d(u,{app:()=>it});var e=c(61402),t=c(5556),n=c.n(t),r=c(27772),o=c(52334),i=c(60115),a=c(82682),s=c(38798),l=c(71468),d=c(26396),p=c.n(d),f=c(62193),m=c.n(f),h=c(2404),g=c.n(h),v=c(71086),y=c.n(v),b=c(4883),w=c.n(b),x=c(3433),O=c(52600),k=c(88951),A=c(13128),S=c(59042),j=c(28391),E=c(18601),P=c(72942),D=c(12956),_=c(7311),T=c(66498),C=c(35301),M=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return T.A.getDispatchActions(e,I,t)},I=[{name:"entityName",action:C.Zl,mandatory:!0,argsFactory:function(e){return[e.entityName]}},{name:"entityName",action:C.uO,argsFactory:function(e){return[e.formBase||e.entityName]}},{name:"formBase",action:C.uO,argsFactory:function(e){return[e.formBase]}},{name:"scrollBehaviour",action:C.Zy,argsFactory:function(e){return[e.scrollBehaviour]}},{name:"id",action:C.RH,argsFactory:function(e){return[e.id||(new Date).valueOf()]}}],R=c(44467),N=c(92207),L=c.n(N),F=c(90167),H=c(29056),W=c(71635),B=p()(p()({},W.Bt,H.A.singleTransferReducer("formTouched")),W.wr,H.A.singleTransferReducer("detailParams")),Y={detailParams:void 0,formTouched:!1};var U=c(15890),V=c.n(U),z=c(22056),q=c.n(z),$=c(32742),G=c(57327),K=c(27399);function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var X=function(e){var t={};return e.fields.forEach((function(e){t[e.fieldName]=J({},e)})),e.relations.forEach((function(e){t[e.relationName]=J({type:"relation"},e)})),t};function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X;return L().mark((function n(){var r;return L().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,F.T1)(G.A.requestSaga,"entities/".concat(e,"/model"));case 2:return r=n.sent,n.next=5,(0,F.T1)(t,r.body);case 5:return n.abrupt("return",n.sent);case 6:case"end":return n.stop()}}),n)}))()}var ee={CREATE:"create",UPDATE:"update"};const te={modes:ee,getMode:function(e){return void 0===e?ee.CREATE:ee.UPDATE}};var ne=c(21259),re=c.n(ne);const oe=function(e){var t=e.split("/").filter((function(e){return!!e})),n=t[t.length-1],r=t.filter((function(e,t){return t>1&&t%2==0})).map((function(e){return e.split(".")})).reduce((function(e,t){return[].concat(re()(e),re()(t))}),[]);if(isNaN(n)){return{modelPaths:r,entityId:undefined,parentUrl:"/"+t.slice(0,-1).join("/")}}return{modelPaths:r,entityId:t[t.length-1],parentUrl:"/"+t.slice(0,-2).join("/")}};const ie=function(e,t){return 0!==t.length||(!e||isNaN(e))};var ae=c(74848),se=L().mark(pe),ce=L().mark(fe),ue=L().mark(ge),le=function(e){return e.entityBrowser},de=function(e){return e.input};function pe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.p8)(W.M4,me),(0,F.p8)(W.z3,fe),(0,F.p8)(W.o7,ve)]);case 2:case"end":return e.stop()}}),se)}function fe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.yJ)(W.EJ(void 0));case 2:case"end":return e.stop()}}),ce)}function me(e){var t=e.payload;return L().mark((function e(){var n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,v;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.T1)(oe,t.url);case 2:return n=e.sent,r=n.modelPaths,o=n.entityId,i=n.parentUrl,e.next=8,(0,F.Lt)(le);case 8:return a=e.sent,s=a.entityName,c=a.formBase,e.next=13,(0,F.T1)(te.getMode,o);case 13:return u=e.sent,e.next=16,(0,F.T1)(he,s,r,c);case 16:return l=e.sent,d=q()(l,2),p=d[0],f=d[1],e.next=22,(0,F.Lt)(de);case 22:return m=e.sent,h=m.initialKey,e.next=26,(0,F.T1)(ie,h,r);case 26:return g=e.sent,v={mode:u,entityId:o,entityName:p,formName:f,parentUrl:i,showBackButton:g},e.next=30,(0,F.yJ)(W.EJ(v));case 30:case"end":return e.stop()}}),e)}))()}function he(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return L().mark((function o(){var i,a,s,c,u,l,d;return L().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=V()(t),a=i[0],s=i.slice(1),a){o.next=3;break}return o.abrupt("return",[e,r]);case 3:return o.next=5,(0,F.T1)(Z,e);case 5:if(c=o.sent,u=c[a]){o.next=16;break}return o.next=10,(0,F.T1)(G.A.fetchForm,"".concat(n,"_detail_").concat(a),"list");case 10:return l=o.sent,o.next=13,(0,F.T1)(he,l.modelName,s,"".concat(n,"_").concat(a));case 13:case 19:return o.abrupt("return",o.sent);case 16:return d="".concat(n,"_").concat(u.targetEntity),o.next=19,(0,F.T1)(he,u.targetEntity,s,n,d);case 20:case"end":return o.stop()}}),o)}))()}function ge(e){var t;return L().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,F.T1)($.Ix);case 2:return t=n.sent,n.next=5,(0,F.yJ)(P.A.modal("navigation-pending-changes","client.entity-browser.detail.confirmTouchedFormTitle",e,(function(e){var n=e.close;return(0,ae.jsx)(K.A,{onYes:function(){n(),t.put("yes")},onNo:function(){n(),t.put("no")}})}),!0,(function(){return t.put("no")})));case 5:return n.next=7,(0,F.s)(t);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),ue)}function ve(e){var t=e.payload;return L().mark((function e(){var n,r;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.message,r=t.confirmCallback,e.next=3,(0,F.T1)(ge,n);case 3:if("yes"!==e.sent){e.next=9;break}return e.next=7,(0,F.T1)(r,!0);case 7:e.next=11;break;case 9:return e.next=11,(0,F.T1)(r,!1);case 11:case"end":return e.stop()}}),e)}))()}var ye=L().mark(be);function be(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.Zy)(pe)]);case 2:case"end":return e.stop()}}),ye)}const we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0,n=B[t.type];return n?n(e,t):e};function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke=p()(p()(p()(p()({},C.Rf,H.A.singleTransferReducer("entityName")),C.g0,(function(e,t){var n=t.payload.formBase;return n?Oe(Oe({},e),{},{formBase:n}):Oe({},e)})),C.J6,H.A.singleTransferReducer("scrollBehaviour")),C.PH,H.A.singleTransferReducer("appId")),Ae={entityName:"",formBase:"",scrollBehaviour:"none",appId:""};var Se=L().mark(Pe),je=L().mark(De),Ee=L().mark(_e);function Pe(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.T1)(De),(0,F.p8)(C.XA,_e)]);case 2:case"end":return e.stop()}}),Se)}function De(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,F.s)(e.A.INPUT_INITIALIZED);case 2:return t.next=4,(0,F.yJ)(E.A.doSessionCheck());case 4:case"end":return t.stop()}}),je)}function _e(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.yJ)(j.A.fireExternalEvent("onRouteChange"));case 2:case"end":return e.stop()}}),Ee)}var Te=L().mark(Ce);function Ce(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Q7)([(0,F.Zy)(Pe)]);case 2:case"end":return e.stop()}}),Te)}const Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae,t=arguments.length>1?arguments[1]:void 0,n=ke[t.type];return n?n(e,t):e},Ie={detail:we,form:R.A,entityBrowser:Me};var Re,Ne,Le=[Ce,be];function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We="entity-browser",Be=["onVisibilityStatusChange","onRouteChange"],Ye=w().lazy((function(){return Promise.all([c.e(70),c.e(651)]).then(c.bind(c,19651))})),Ue=function(){return Re||(Re=(0,ae.jsx)(b.Suspense,{fallback:"",children:(0,ae.jsx)(Ye,{})}))},Ve=function(e){var t=e.initialKey,n=e.initialAction,r=(0,x.Zp)(),o=(0,x.zy)().pathname;(0,b.useEffect)((function(){if(t&&!isNaN(t)){if(!o.match(/\/detail\/[0-9]*/)){var e="/detail/".concat(t);r(e)}}if(n&&n.name){var i="/action/".concat(n.name,"?").concat(D.A.toQueryString(n.properties));r(i)}}),[])},ze=function(e){var t=e.memoryRouter,n=e.initialKey,r=e.initialAction,o=(t?x.bg:x.Ge)([{path:"*",element:(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(Ve,{initialKey:n,initialAction:r}),Ne||(Ne=(0,ae.jsx)(Ue,{}))]})}]);return(0,ae.jsx)(O.pg,{router:o})},qe=function(t,n,r,o){n=He(He({},n),{},{id:t}),i.A.setInputEnvs(n);var a=e.A.createStore(Ie,Le,n,We);j.A.addToStore(a,(function(t){return e.A.getEvents(Be,t.input)})),k.A.addToStore(a),A.A.dynamicActionsAddToStore(a),S.A.addToStore(a,!0,["console","remote","notification"]),P.A.addToStore(a,!0),E.A.addToStore(a);var s=(0,ae.jsx)(ze,{memoryRouter:n.memoryHistory,initialKey:n.initialKey,initialAction:n.initialAction});return e.A.createApp(We,s,a,{input:n,actions:M(n),publicPath:o,textResourceModules:["component","common","actions","entity-list","entity-detail"]})},$e=function(t){var n=e.A.useApp({initApp:qe,props:t,packageName:We}),r=n.component,o=n.store,i=_.A.usePrevious(t);return _.A.useDidUpdate((function(){var e=y()(t,(function(e,t){return!g()(e,i[t])}));m()(e)||M(e,!1).forEach((function(e){o.dispatch(e)}))}),[t]),(0,ae.jsx)(ae.Fragment,{children:r})};$e.propTypes=He({entityName:n().string.isRequired,searchFormType:o.X,formBase:n().string,limit:n().oneOfType([n().number,n().string]),preselectedSearchFields:n().array,searchFilters:n().arrayOf(n().string),simpleSearchFields:n().string,initialKey:n().string,initialAction:n().shape({name:n().string,properties:n().objectOf(n().object)}),businessUnit:n().string,memoryHistory:n().bool,backendUrl:n().string,scrollBehaviour:n().oneOf(["none","inline"]),appContext:a.A.propTypes,modifyFormDefinition:n().func,modifyEntityPaths:n().func,disableDetailView:n().bool,reportIds:n().arrayOf(n().string),customActionEventHandlers:n().objectOf(n().objectOf(n().func)),isHidden:n().bool},j.A.createPropTypes(Be));const Ge=$e;e.A.createBundleableApp(We,qe,$e);var Ke=c(53727),Qe=c(46836),Je=L().mark(Xe);function Xe(e,t){var n,r;return L().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,G.A.fetchEntity("Membership",t,{paths:["relMembership_type.unique_id"]},{},Qe.A.getFlattenEntity);case 2:if(n=o.sent,r=n["relMembership_type.unique_id"],["haushalt","haushalt_partner_person_b"].includes(r)){o.next=8;break}return o.abrupt("return",Ke.A.removeBoxes(e,["relTeam_member"]));case 8:return o.abrupt("return",e);case 9:case"end":return o.stop()}}),Je)}const Ze=function(e){var t=e.formBase,n=e.reportIds,r=e.searchFilters,o=e.limit,i=e.backendUrl,a=e.businessUnit,s=e.appContext,c=e.searchFormType,u=e.locale;return(0,ae.jsx)(Ge,{entityName:"Membership",formBase:t,searchFilters:r,limit:o,modifyFormDefinition:function(e,n){return function(e,t,n){t.parent;var r=t.entityId,o=n.formBase;return L().mark((function t(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.id!=="".concat(o,"_detail")){t.next=6;break}return t.next=3,Xe(e,r);case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)}))()}(e,n,{formBase:t})},backendUrl:i,businessUnit:a,appContext:s,reportIds:n,searchFormType:c,locale:u})};const et=(0,l.Ng)((function(e){return{formBase:e.input.formBase,reportIds:e.input.reportIds,searchFilters:e.input.searchFilters,limit:e.input.limit,backendUrl:e.input.backendUrl,businessUnit:e.input.businessUnit,appContext:e.input.appContext,searchFormType:e.input.searchFormType,locale:e.intl.locale}}),{})((0,s.Ay)(Ze));var tt,nt="fdp-membership-administration",rt=function(t,n,r,o){i.A.setInputEnvs(n);var a=tt||(tt=(0,ae.jsx)(et,{})),s=e.A.createStore({},null,n,nt);return e.A.createApp(nt,a,s,{input:n,events:r,actions:[],publicPath:o,textResourceModules:["component","common",nt]})},ot=function(t){return e.A.useApp({initApp:rt,props:t,packageName:nt}).component};ot.propTypes={appContext:a.A.propTypes.isRequired,selection:r.A.propType.isRequired,reportIds:n().arrayOf(n().string).isRequired,searchFilters:n().arrayOf(n().string),searchFormType:o.X,limit:n().number,backendUrl:n().string,businessUnit:n().string,entityName:n().string,formBase:n().string};var it=e.A.createBundleableApp(nt,rt,ot);e.A.registerAppInRegistry(it.name,it.init)})(),u})()));
|