tocco-legacy-bundle 3.13.34 → 3.13.36

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
@@ -1,3 +1,14 @@
1
+ 3.13.36
2
+ - scroll on correct position after page transition
3
+ - fix adress / location browser autofill
4
+ - implement error border inside cell inputs and remove cell focus on bool edit
5
+ - fix focus styling
6
+
7
+ 3.13.35
8
+ - force rerender of ckeditor with auto-complete
9
+ - export idSelector
10
+ - fix ckeditor and initial auto complete
11
+
1
12
  3.13.34
2
13
  - pass rating ids to keyboard navigation
3
14
 
@@ -0,0 +1,40 @@
1
+ (this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[544],{45588:(e,t,r)=>{"use strict";
2
+ /**
3
+ * @remix-run/router v1.20.0
4
+ *
5
+ * Copyright (c) Remix Software Inc.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE.md file in the root directory of this source tree.
9
+ *
10
+ * @license MIT
11
+ */
12
+ function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var o;r.d(t,{AO:()=>h,G3:()=>ee,Gh:()=>U,HS:()=>F,Oi:()=>l,Rr:()=>f,TM:()=>s,VV:()=>V,aE:()=>oe,pX:()=>W,pb:()=>j,rc:()=>o,ro:()=>b,sC:()=>i,tH:()=>$,ue:()=>g,yD:()=>N}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const a="popstate";function i(e){void 0===e&&(e={});let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=u(null==n?t.length-1:n),s=o.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[i]}function m(e,r,n){void 0===r&&(r=null);let o=d(t?p().pathname:"/",e,r,n);return c("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function v(e){return"string"==typeof e?e:h(e)}return{get index(){return i},get action(){return s},get location(){return p()},createHref:v,createURL:e=>new URL(v(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?f(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=o.Push;let n=m(e,r);i+=1,t.splice(i,t.length,n),a&&l&&l({action:s,location:n,delta:1})},replace(e,r){s=o.Replace;let n=m(e,r);t[i]=n,a&&l&&l({action:s,location:n,delta:0})},go(e){s=o.Pop;let r=u(i+e),n=t[r];i=r,l&&l({action:s,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function s(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:r="/",search:n="",hash:o=""}=f(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),d("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:h(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function l(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function d(e,t,r,o){return void 0===r&&(r=null),n({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:r,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function h(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function f(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function p(e,t,r,i){void 0===i&&(i={});let{window:s=document.defaultView,v5Compat:c=!1}=i,f=s.history,p=o.Pop,m=null,v=y();function y(){return(f.state||{idx:null}).idx}function g(){p=o.Pop;let e=y(),t=null==e?null:e-v;v=e,m&&m({action:p,location:b.location,delta:t})}function w(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,r="string"==typeof e?e:h(e);return r=r.replace(/ $/,"%20"),l(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==v&&(v=0,f.replaceState(n({},f.state,{idx:v}),""));let b={get action(){return p},get location(){return e(s,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(a,g),m=e,()=>{s.removeEventListener(a,g),m=null}},createHref:e=>t(s,e),createURL:w,encodeLocation(e){let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=o.Push;let n=d(b.location,e,t);r&&r(n,e),v=y()+1;let a=u(n,v),i=b.createHref(n);try{f.pushState(a,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(i)}c&&m&&m({action:p,location:b.location,delta:1})},replace:function(e,t){p=o.Replace;let n=d(b.location,e,t);r&&r(n,e),v=y();let a=u(n,v),i=b.createHref(n);f.replaceState(a,"",i),c&&m&&m({action:p,location:b.location,delta:0})},go:e=>f.go(e)};return b}var m;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={}));const v=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,r,o){return void 0===r&&(r=[]),void 0===o&&(o={}),e.map(((e,a)=>{let i=[...r,String(a)],s="string"==typeof e.id?e.id:i.join("-");if(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(!o[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 r=n({},e,t(e),{id:s});return o[s]=r,r}{let r=n({},e,t(e),{id:s,children:void 0});return o[s]=r,e.children&&(r.children=y(e.children,t,i,o)),r}}))}function g(e,t,r){return void 0===r&&(r="/"),w(e,t,r,!1)}function w(e,t,r,n){let o=j(("string"==typeof t?f(t):t).pathname||"/",r);if(null==o)return null;let a=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let e=0;null==i&&e<a.length;++e){let t=_(o);i=A(a[e],t,n)}return i}function b(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function E(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(l(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let s=F([n,i.relativePath]),c=r.concat(i);e.children&&e.children.length>0&&(l(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),E(e.children,t,c,s)),(null!=e.path||e.index)&&t.push({path:s,score:P(s,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of R(e.path))o(e,t,r);else o(e,t)})),t}function R(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=R(n.join("/")),s=[];return s.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const S=/^:[\w-]+$/,x=3,C=2,O=1,k=10,M=101==r.j?-2:null,L=e=>"*"===e;function P(e,t){let r=e.split("/"),n=r.length;return r.some(L)&&(n+=M),t&&(n+=C),r.filter((e=>!L(e))).reduce(((e,t)=>e+(S.test(t)?x:""===t?O:k)),n)}function A(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",u=D({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=D({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:F([a,u.pathname]),pathnameBase:z(F([a,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(a=F([a,u.pathnameBase]))}return i}function D(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);c("*"===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 n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce(((e,t,r)=>{let{paramName:n,isOptional:o}=t;if("*"===n){let e=s[r]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[r];return e[n]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function _(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function I(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function T(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function N(e,t){let r=T(e);return t?r.map(((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)):r.map((e=>e.pathnameBase))}function U(e,t,r,o){let a;void 0===o&&(o=!1),"string"==typeof e?a=f(e):(a=n({},e),l(!a.pathname||!a.pathname.includes("?"),I("?","pathname","search",a)),l(!a.pathname||!a.pathname.includes("#"),I("#","pathname","hash",a)),l(!a.search||!a.search.includes("#"),I("#","search","hash",a)));let i,s=""===e||""===a.pathname,c=s?"/":a.pathname;if(null==c)i=r;else{let e=t.length-1;if(!o&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"==typeof e?f(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:B(n),hash:H(o)}}(a,i),d=c&&"/"!==c&&c.endsWith("/"),h=(s||"."===c)&&r.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const F=e=>e.join("/").replace(/\/\/+/g,"/"),z=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",H=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class $ extends(101==r.j?Error:null){}class V{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function W(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const q=["post","put","patch","delete"],Y=new Set(q),Q=["get",...q],G=new Set(Q),K=new Set([301,302,303,307,308]),J=new Set([307,308]),X={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Z={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ee={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},te=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,re=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ne="remix-router-transitions";function oe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,a=!r;let i;if(l(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=re;let s,u,h,f={},p=y(e.routes,i,void 0,f),v=e.basename||"/",E=e.dataStrategy||pe,R=e.patchRoutesOnNavigation,S=n({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),x=null,C=new Set,O=null,k=null,M=null,L=null!=e.hydrationData,P=g(p,e.history.location,v),A=null;if(null==P&&!R){let t=Me(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=ke(p);P=r,A={[n.id]:t}}if(P&&!e.hydrationData){ct(P,p,e.history.location.pathname).active&&(P=null)}if(P)if(P.some((e=>e.route.lazy)))u=!1;else if(P.some((e=>e.route.loader)))if(S.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=P.findIndex((e=>void 0!==r[e.route.id]));u=P.slice(0,e+1).every((e=>!ce(e.route,t,r)))}else u=P.every((e=>!ce(e.route,t,r)))}else u=null!=e.hydrationData;else u=!0;else if(u=!1,P=[],S.v7_partialHydration){let t=ct(null,p,e.history.location.pathname);t.active&&t.matches&&(P=t.matches)}let D,_,I={historyAction:e.history.action,location:e.history.location,matches:P,initialized:u,navigation:X,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||A,fetchers:new Map,blockers:new Map},T=o.Pop,N=!1,U=!1,F=new Map,z=null,B=!1,H=!1,$=[],V=new Set,q=new Map,Y=0,Q=-1,G=new Map,K=new Set,oe=new Map,se=new Map,ue=new Set,de=new Map,fe=new Map;function be(e,t){void 0===t&&(t={}),I=n({},I,e);let r=[],o=[];S.v7_fetcherPersist&&I.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ue.has(t)?o.push(t):r.push(t))})),[...C].forEach((e=>e(I,{deletedFetchers:o,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),S.v7_fetcherPersist&&(r.forEach((e=>I.fetchers.delete(e))),o.forEach((e=>Je(e))))}function Ee(t,r,a){var i,l;let c,{flushSync:u}=void 0===a?{}:a,d=null!=I.actionData&&null!=I.navigation.formMethod&&Ue(I.navigation.formMethod)&&"loading"===I.navigation.state&&!0!==(null==(i=t.state)?void 0:i._isRedirect);c=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:d?I.actionData:null;let h=r.loaderData?xe(I.loaderData,r.loaderData,r.matches||[],r.errors):I.loaderData,f=I.blockers;f.size>0&&(f=new Map(f),f.forEach(((e,t)=>f.set(t,ee))));let m,v=!0===N||null!=I.navigation.formMethod&&Ue(I.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(p=s,s=void 0),B||T===o.Pop||(T===o.Push?e.history.push(t,t.state):T===o.Replace&&e.history.replace(t,t.state)),T===o.Pop){let e=F.get(I.location.pathname);e&&e.has(t.pathname)?m={currentLocation:I.location,nextLocation:t}:F.has(t.pathname)&&(m={currentLocation:t,nextLocation:I.location})}else if(U){let e=F.get(I.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(I.location.pathname,e)),m={currentLocation:I.location,nextLocation:t}}be(n({},r,{actionData:c,loaderData:h,historyAction:T,location:t,initialized:!0,navigation:X,revalidation:"idle",restoreScrollPosition:lt(t,r.matches||I.matches),preventScrollReset:v,blockers:f}),{viewTransitionOpts:m,flushSync:!0===u}),T=o.Pop,N=!1,U=!1,B=!1,H=!1,$=[]}async function Re(t,r,a){D&&D.abort(),D=null,T=t,B=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(O&&M){let r=st(e,t);O[r]=M()}}(I.location,I.matches),N=!0===(a&&a.preventScrollReset),U=!0===(a&&a.enableViewTransition);let i=s||p,l=a&&a.overrideNavigation,c=g(i,r,v),u=!0===(a&&a.flushSync),d=ct(c,i,r.pathname);if(d.active&&d.matches&&(c=d.matches),!c){let{error:e,notFoundMatches:t,route:n}=at(r.pathname);return void Ee(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:u})}if(I.initialized&&!H&&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}(I.location,r)&&!(a&&a.submission&&Ue(a.submission.formMethod)))return void Ee(r,{matches:c},{flushSync:u});D=new AbortController;let h,f=we(e.history,r,D.signal,a&&a.submission);if(a&&a.pendingError)h=[Oe(c).route.id,{type:m.error,error:a.pendingError}];else if(a&&a.submission&&Ue(a.submission.formMethod)){let t=await async function(e,t,r,n,a,i){void 0===i&&(i={});He();let s,l=function(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}(t,r);if(be({navigation:l},{flushSync:!0===i.flushSync}),a){let r=await ut(n,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=Oe(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:m.error,error:r.error}]}}if(!r.matches){let{notFoundMatches:e,error:r,route:n}=at(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:m.error,error:r}]}}n=r.matches}let c=$e(n,t);if(c.route.action||c.route.lazy){if(s=(await Te("action",I,e,[c],n,null))[c.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:m.error,error:Me(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})};if(je(s)){let t;if(i&&null!=i.replace)t=i.replace;else{t=ge(s.response.headers.get("Location"),new URL(e.url),v)===I.location.pathname+I.location.search}return await Ie(e,s,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(De(s))throw Me(400,{type:"defer-action"});if(_e(s)){let e=Oe(n,c.route.id);return!0!==(i&&i.replace)&&(T=o.Push),{matches:n,pendingActionResult:[e.route.id,s]}}return{matches:n,pendingActionResult:[c.route.id,s]}}(f,r,a.submission,c,d.active,{replace:a.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(_e(n)&&W(n.error)&&404===n.error.status)return D=null,void Ee(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}c=t.matches||c,h=t.pendingActionResult,l=We(r,a.submission),u=!1,d.active=!1,f=we(e.history,f.url,f.signal)}let{shortCircuited:y,matches:w,loaderData:b,errors:E}=await async function(t,r,o,a,i,l,c,u,d,h,f){let m=i||We(r,l),y=l||c||Ve(m),g=!(B||S.v7_partialHydration&&d);if(a){if(g){let e=Pe(f);be(n({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:h})}let e=await ut(o,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Oe(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=at(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}o=e.matches}let w=s||p,[b,E]=le(e.history,I,o,y,r,S.v7_partialHydration&&!0===d,S.v7_skipActionErrorRevalidation,H,$,V,ue,oe,K,w,v,f);if(it((e=>!(o&&o.some((t=>t.route.id===e)))||b&&b.some((t=>t.route.id===e)))),Q=++Y,0===b.length&&0===E.length){let e=et();return Ee(r,n({matches:o,loaderData:{},errors:f&&_e(f[1])?{[f[0]]:f[1].error}:null},Ce(f),e?{fetchers:new Map(I.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(g){let e={};if(!a){e.navigation=m;let t=Pe(f);void 0!==t&&(e.actionData=t)}E.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=I.fetchers.get(e.key),r=qe(void 0,t?t.data:void 0);I.fetchers.set(e.key,r)})),new Map(I.fetchers)}(E)),be(e,{flushSync:h})}E.forEach((e=>{Xe(e.key),e.controller&&q.set(e.key,e.controller)}));let R=()=>E.forEach((e=>Xe(e.key)));D&&D.signal.addEventListener("abort",R);let{loaderResults:x,fetcherResults:C}=await Ne(I,o,b,E,t);if(t.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",R);E.forEach((e=>q.delete(e.key)));let O=Le(x);if(O)return await Ie(t,O.result,!0,{replace:u}),{shortCircuited:!0};if(O=Le(C),O)return K.add(O.key),await Ie(t,O.result,!0,{replace:u}),{shortCircuited:!0};let{loaderData:k,errors:M}=Se(I,o,x,f,E,C,de);de.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&de.delete(t)}))})),S.v7_partialHydration&&d&&I.errors&&(M=n({},I.errors,M));let L=et(),P=tt(Q),A=L||P||E.length>0;return n({matches:o,loaderData:k,errors:M},A?{fetchers:new Map(I.fetchers)}:{})}(f,r,c,d.active,l,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,u,h);y||(D=null,Ee(r,n({matches:w||c},Ce(h),{loaderData:b,errors:E})))}function Pe(e){return e&&!_e(e[1])?{[e[0]]:e[1].data}:I.actionData?0===Object.keys(I.actionData).length?null:I.actionData:void 0}async function Ie(a,i,s,c){let{submission:u,fetcherSubmission:h,preventScrollReset:f,replace:p}=void 0===c?{}:c;i.response.headers.has("X-Remix-Revalidate")&&(H=!0);let m=i.response.headers.get("Location");l(m,"Expected a Location header on the redirect Response"),m=ge(m,new URL(a.url),v);let y=d(I.location,m,{_isRedirect:!0});if(r){let r=!1;if(i.response.headers.has("X-Remix-Reload-Document"))r=!0;else if(te.test(m)){const n=e.history.createURL(m);r=n.origin!==t.location.origin||null==j(n.pathname,v)}if(r)return void(p?t.location.replace(m):t.location.assign(m))}D=null;let g=!0===p||i.response.headers.has("X-Remix-Replace")?o.Replace:o.Push,{formMethod:w,formAction:b,formEncType:E}=I.navigation;!u&&!h&&w&&b&&E&&(u=Ve(I.navigation));let R=u||h;if(J.has(i.response.status)&&R&&Ue(R.formMethod))await Re(g,y,{submission:n({},R,{formAction:m}),preventScrollReset:f||N,enableViewTransition:s?U:void 0});else{let e=We(y,u);await Re(g,y,{overrideNavigation:e,fetcherSubmission:h,preventScrollReset:f||N,enableViewTransition:s?U:void 0})}}async function Te(e,t,r,n,o,a){let s,l={};try{s=await me(E,e,t,r,n,o,a,f,i)}catch(e){return n.forEach((t=>{l[t.route.id]={type:m.error,error:e}})),l}for(let[e,t]of Object.entries(s))if(Ae(t)){let n=t.result;l[e]={type:m.redirect,response:ye(n,r,e,o,v,S.v7_relativeSplatPath)}}else l[e]=await ve(t);return l}async function Ne(t,r,n,o,a){let i=t.matches,s=Te("loader",t,a,n,r,null),l=Promise.all(o.map((async r=>{if(r.matches&&r.match&&r.controller){let n=(await Te("loader",t,we(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}return Promise.resolve({[r.key]:{type:m.error,error:Me(404,{pathname:r.path})}})}))),c=await s,u=(await l).reduce(((e,t)=>Object.assign(e,t)),{});return await Promise.all([Fe(r,c,a.signal,i,t.loaderData),ze(r,u,o)]),{loaderResults:c,fetcherResults:u}}function He(){H=!0,$.push(...it()),oe.forEach(((e,t)=>{q.has(t)&&V.add(t),Xe(t)}))}function Qe(e,t,r){void 0===r&&(r={}),I.fetchers.set(e,t),be({fetchers:new Map(I.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Ge(e,t,r,n){void 0===n&&(n={});let o=Oe(I.matches,t);Je(e),be({errors:{[o.route.id]:r},fetchers:new Map(I.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Ke(e){return S.v7_fetcherPersist&&(se.set(e,(se.get(e)||0)+1),ue.has(e)&&ue.delete(e)),I.fetchers.get(e)||Z}function Je(e){let t=I.fetchers.get(e);!q.has(e)||t&&"loading"===t.state&&G.has(e)||Xe(e),oe.delete(e),G.delete(e),K.delete(e),ue.delete(e),V.delete(e),I.fetchers.delete(e)}function Xe(e){let t=q.get(e);t&&(t.abort(),q.delete(e))}function Ze(e){for(let t of e){let e=Ye(Ke(t).data);I.fetchers.set(t,e)}}function et(){let e=[],t=!1;for(let r of K){let n=I.fetchers.get(r);l(n,"Expected fetcher: "+r),"loading"===n.state&&(K.delete(r),e.push(r),t=!0)}return Ze(e),t}function tt(e){let t=[];for(let[r,n]of G)if(n<e){let e=I.fetchers.get(r);l(e,"Expected fetcher: "+r),"loading"===e.state&&(Xe(r),G.delete(r),t.push(r))}return Ze(t),t.length>0}function rt(e){I.blockers.delete(e),fe.delete(e)}function nt(e,t){let r=I.blockers.get(e)||ee;l("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(I.blockers);n.set(e,t),be({blockers:n})}function ot(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===fe.size)return;fe.size>1&&c(!1,"A router only supports one blocker at a time");let o=Array.from(fe.entries()),[a,i]=o[o.length-1],s=I.blockers.get(a);return s&&"proceeding"===s.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?a:void 0}function at(e){let t=Me(404,{pathname:e}),r=s||p,{matches:n,route:o}=ke(r);return it(),{notFoundMatches:n,route:o,error:t}}function it(e){let t=[];return de.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),de.delete(n))})),t}function st(e,t){if(k){return k(e,t.map((e=>b(e,I.loaderData))))||e.key}return e.key}function lt(e,t){if(O){let r=st(e,t),n=O[r];if("number"==typeof n)return n}return null}function ct(e,t,r){if(R){if(!e){return{active:!0,matches:w(t,r,v,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:w(t,r,v,!0)}}}return{active:!1,matches:null}}async function ut(e,t,r){if(!R)return{type:"success",matches:e};let n=e;for(;;){let e=null==s,o=s||p,a=f;try{await R({path:t,matches:n,patch:(e,t)=>{r.aborted||he(e,t,o,a,i)}})}catch(e){return{type:"error",error:e,partialMatches:n}}finally{e&&!r.aborted&&(p=[...p])}if(r.aborted)return{type:"aborted"};let l=g(o,t,v);if(l)return{type:"success",matches:l};let c=w(o,t,v,!0);if(!c||n.length===c.length&&n.every(((e,t)=>e.route.id===c[t].route.id)))return{type:"success",matches:null};n=c}}return h={get basename(){return v},get future(){return S},get state(){return I},get routes(){return p},get window(){return t},initialize:function(){if(x=e.history.listen((t=>{let{action:r,location:n,delta:o}=t;if(_)return _(),void(_=void 0);c(0===fe.size||null!=o,"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 a=ot({currentLocation:I.location,nextLocation:n,historyAction:r});if(a&&null!=o){let t=new Promise((e=>{_=e}));return e.history.go(-1*o),void nt(a,{state:"blocked",location:n,proceed(){nt(a,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(o)))},reset(){let e=new Map(I.blockers);e.set(a,ee),be({blockers:e})}})}return Re(r,n)})),r){!function(e,t){try{let r=e.sessionStorage.getItem(ne);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(e){}}(t,F);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ne,JSON.stringify(r))}catch(e){c(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,F);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return I.initialized||Re(o.Pop,I.location,{initialHydration:!0}),h},subscribe:function(e){return C.add(e),()=>C.delete(e)},enableScrollRestoration:function(e,t,r){if(O=e,M=t,k=r||null,!L&&I.navigation===X){L=!0;let e=lt(I.location,I.matches);null!=e&&be({restoreScrollPosition:e})}return()=>{O=null,M=null,k=null}},navigate:async function t(r,a){if("number"==typeof r)return void e.history.go(r);let i=ae(I.location,I.matches,v,S.v7_prependBasename,r,S.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:s,submission:l,error:c}=ie(S.v7_normalizeFormMethod,!1,i,a),u=I.location,h=d(I.location,s,a&&a.state);h=n({},h,e.history.encodeLocation(h));let f=a&&null!=a.replace?a.replace:void 0,p=o.Push;!0===f?p=o.Replace:!1===f||null!=l&&Ue(l.formMethod)&&l.formAction===I.location.pathname+I.location.search&&(p=o.Replace);let m=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,y=!0===(a&&a.flushSync),g=ot({currentLocation:u,nextLocation:h,historyAction:p});if(!g)return await Re(p,h,{submission:l,pendingError:c,preventScrollReset:m,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:y});nt(g,{state:"blocked",location:h,proceed(){nt(g,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),t(r,a)},reset(){let e=new Map(I.blockers);e.set(g,ee),be({blockers:e})}})},fetch:function(t,r,n,o){if(a)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Xe(t);let i=!0===(o&&o.flushSync),c=s||p,u=ae(I.location,I.matches,v,S.v7_prependBasename,n,S.v7_relativeSplatPath,r,null==o?void 0:o.relative),d=g(c,u,v),h=ct(d,c,u);if(h.active&&h.matches&&(d=h.matches),!d)return void Ge(t,r,Me(404,{pathname:u}),{flushSync:i});let{path:f,submission:m,error:y}=ie(S.v7_normalizeFormMethod,!0,u,o);if(y)return void Ge(t,r,y,{flushSync:i});let w=$e(d,f),b=!0===(o&&o.preventScrollReset);m&&Ue(m.formMethod)?async function(t,r,n,o,a,i,c,u,d){function h(e){if(!e.route.action&&!e.route.lazy){let e=Me(405,{method:d.formMethod,pathname:n,routeId:r});return Ge(t,r,e,{flushSync:c}),!0}return!1}if(He(),oe.delete(t),!i&&h(o))return;let f=I.fetchers.get(t);Qe(t,function(e,t){let r={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 r}(d,f),{flushSync:c});let m=new AbortController,y=we(e.history,n,m.signal,d);if(i){let e=await ut(a,n,y.signal);if("aborted"===e.type)return;if("error"===e.type)return void Ge(t,r,e.error,{flushSync:c});if(!e.matches)return void Ge(t,r,Me(404,{pathname:n}),{flushSync:c});if(h(o=$e(a=e.matches,n)))return}q.set(t,m);let w=Y,b=await Te("action",I,y,[o],a,t),E=b[o.route.id];if(y.signal.aborted)return void(q.get(t)===m&&q.delete(t));if(S.v7_fetcherPersist&&ue.has(t)){if(je(E)||_e(E))return void Qe(t,Ye(void 0))}else{if(je(E))return q.delete(t),Q>w?void Qe(t,Ye(void 0)):(K.add(t),Qe(t,qe(d)),Ie(y,E,!1,{fetcherSubmission:d,preventScrollReset:u}));if(_e(E))return void Ge(t,r,E.error)}if(De(E))throw Me(400,{type:"defer-action"});let R=I.navigation.location||I.location,x=we(e.history,R,m.signal),C=s||p,O="idle"!==I.navigation.state?g(C,I.navigation.location,v):I.matches;l(O,"Didn't find any matches after fetcher action");let k=++Y;G.set(t,k);let M=qe(d,E.data);I.fetchers.set(t,M);let[L,P]=le(e.history,I,O,d,R,!1,S.v7_skipActionErrorRevalidation,H,$,V,ue,oe,K,C,v,[o.route.id,E]);P.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=I.fetchers.get(t),n=qe(void 0,r?r.data:void 0);I.fetchers.set(t,n),Xe(t),e.controller&&q.set(t,e.controller)})),be({fetchers:new Map(I.fetchers)});let A=()=>P.forEach((e=>Xe(e.key)));m.signal.addEventListener("abort",A);let{loaderResults:_,fetcherResults:j}=await Ne(I,O,L,P,x);if(m.signal.aborted)return;m.signal.removeEventListener("abort",A),G.delete(t),q.delete(t),P.forEach((e=>q.delete(e.key)));let N=Le(_);if(N)return Ie(x,N.result,!1,{preventScrollReset:u});if(N=Le(j),N)return K.add(N.key),Ie(x,N.result,!1,{preventScrollReset:u});let{loaderData:U,errors:F}=Se(I,O,_,void 0,P,j,de);if(I.fetchers.has(t)){let e=Ye(E.data);I.fetchers.set(t,e)}tt(k),"loading"===I.navigation.state&&k>Q?(l(T,"Expected pending action"),D&&D.abort(),Ee(I.navigation.location,{matches:O,loaderData:U,errors:F,fetchers:new Map(I.fetchers)})):(be({errors:F,loaderData:xe(I.loaderData,U,O,F),fetchers:new Map(I.fetchers)}),H=!1)}(t,r,f,w,d,h.active,i,b,m):(oe.set(t,{routeId:r,path:f}),async function(t,r,n,o,a,i,s,c,u){let d=I.fetchers.get(t);Qe(t,qe(u,d?d.data:void 0),{flushSync:s});let h=new AbortController,f=we(e.history,n,h.signal);if(i){let e=await ut(a,n,f.signal);if("aborted"===e.type)return;if("error"===e.type)return void Ge(t,r,e.error,{flushSync:s});if(!e.matches)return void Ge(t,r,Me(404,{pathname:n}),{flushSync:s});o=$e(a=e.matches,n)}q.set(t,h);let p=Y,m=await Te("loader",I,f,[o],a,t),v=m[o.route.id];De(v)&&(v=await Be(v,f.signal,!0)||v);q.get(t)===h&&q.delete(t);if(f.signal.aborted)return;if(ue.has(t))return void Qe(t,Ye(void 0));if(je(v))return Q>p?void Qe(t,Ye(void 0)):(K.add(t),void await Ie(f,v,!1,{preventScrollReset:c}));if(_e(v))return void Ge(t,r,v.error);l(!De(v),"Unhandled fetcher deferred data"),Qe(t,Ye(v.data))}(t,r,f,w,d,h.active,i,b,m))},revalidate:function(){He(),be({revalidation:"loading"}),"submitting"!==I.navigation.state&&("idle"!==I.navigation.state?Re(T||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation,enableViewTransition:!0===U}):Re(I.historyAction,I.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ke,deleteFetcher:function(e){if(S.v7_fetcherPersist){let t=(se.get(e)||0)-1;t<=0?(se.delete(e),ue.add(e)):se.set(e,t)}else Je(e);be({fetchers:new Map(I.fetchers)})},dispose:function(){x&&x(),z&&z(),C.clear(),D&&D.abort(),I.fetchers.forEach(((e,t)=>Je(t))),I.blockers.forEach(((e,t)=>rt(t)))},getBlocker:function(e,t){let r=I.blockers.get(e)||ee;return fe.get(e)!==t&&fe.set(e,t),r},deleteBlocker:rt,patchRoutes:function(e,t){let r=null==s;he(e,t,s||p,f,i),r&&(p=[...p],be({}))},_internalFetchControllers:q,_internalActiveDeferreds:de,_internalSetRoutes:function(e){f={},s=y(e,i,void 0,f)}},h}Symbol("deferred");function ae(e,t,r,n,o,a,i,s){let l,c;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){c=e;break}}else l=t,c=t[t.length-1];let u=U(o||".",N(l,a),j(e.pathname,r)||e.pathname,"path"===s);if(null==o&&(u.search=e.search,u.hash=e.hash),(null==o||""===o||"."===o)&&c){let e=He(u.search);if(c.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();u.search=r?"?"+r:""}}return n&&"/"!==r&&(u.pathname="/"===u.pathname?r:F([r,u.pathname])),h(u)}function ie(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&!Ne(n.formMethod))return{path:r,error:Me(405,{method:n.formMethod})};let o,a,i=()=>({path:r,error:Me(400,{type:"invalid-body"})}),s=n.formMethod||"get",c=e?s.toUpperCase():s.toLowerCase(),u=Pe(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!Ue(c))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)=>{let[r,n]=t;return""+e+r+"="+n+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!Ue(c))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(l("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=be(n.formData),a=n.formData;else if(n.body instanceof FormData)o=be(n.body),a=n.body;else if(n.body instanceof URLSearchParams)o=n.body,a=Ee(o);else if(null==n.body)o=new URLSearchParams,a=new FormData;else try{o=new URLSearchParams(n.body),a=Ee(o)}catch(e){return i()}let d={formMethod:c,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(Ue(d.formMethod))return{path:r,submission:d};let p=f(r);return t&&p.search&&He(p.search)&&o.append("index",""),p.search="?"+o,{path:h(p),submission:d}}function se(e,t,r){void 0===r&&(r=!1);let n=e.findIndex((e=>e.route.id===t));return n>=0?e.slice(0,r?n+1:n):e}function le(e,t,r,o,a,i,s,l,c,u,d,h,f,p,m,v){let y=v?_e(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),b=e.createURL(a),E=r;i&&t.errors?E=se(r,Object.keys(t.errors)[0],!0):v&&_e(v[1])&&(E=se(r,v[0]));let R=v?v[1].statusCode:void 0,S=s&&R&&R>=400,x=E.filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(i)return ce(a,t.loaderData,t.errors);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return n||o}(t.loaderData,t.matches[r],e)||c.some((t=>t===e.route.id)))return!0;let s=t.matches[r],u=e;return de(e,n({currentUrl:w,currentParams:s.params,nextUrl:b,nextParams:u.params},o,{actionResult:y,actionStatus:R,defaultShouldRevalidate:!S&&(l||w.pathname+w.search===b.pathname+b.search||w.search!==b.search||ue(s,u))}))})),C=[];return h.forEach(((e,a)=>{if(i||!r.some((t=>t.route.id===e.routeId))||d.has(a))return;let s=g(p,e.path,m);if(!s)return void C.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(a),h=$e(s,e.path),v=!1;f.has(a)?v=!1:u.has(a)?(u.delete(a),v=!0):v=c&&"idle"!==c.state&&void 0===c.data?l:de(h,n({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},o,{actionResult:y,actionStatus:R,defaultShouldRevalidate:!S&&l})),v&&C.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[x,C]}function ce(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],o=null!=r&&void 0!==r[e.id];return!(!n&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!o)}function ue(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function de(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function he(e,t,r,n,o){var a;let i;if(e){let t=n[e];l(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let s=y(t.filter((e=>!i.some((t=>fe(e,t))))),o,[e||"_","patch",String((null==(a=i)?void 0:a.length)||"0")],n);i.push(...s)}function fe(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,r)=>{var n;return null==(n=t.children)?void 0:n.some((t=>fe(e,t)))})))}async function pe(e){let{matches:t}=e,r=t.filter((e=>e.shouldLoad));return(await Promise.all(r.map((e=>e.resolve())))).reduce(((e,t,n)=>Object.assign(e,{[r[n].route.id]:t})),{})}async function me(e,t,r,o,a,i,s,u,d,h){let f=i.map((e=>e.route.lazy?async function(e,t,r){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let a=r[e.id];l(a,"No route found in manifest");let i={};for(let e in o){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;c(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||v.has(e)||(i[e]=o[e])}Object.assign(a,i),Object.assign(a,n({},t(a),{lazy:void 0}))}(e.route,d,u):void 0)),p=i.map(((e,r)=>{let i=f[r],s=a.some((t=>t.route.id===e.route.id));return n({},e,{shouldLoad:s,resolve:async r=>(r&&"GET"===o.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?async function(e,t,r,n,o,a){let i,s,c=n=>{let i,l=new Promise(((e,t)=>i=t));s=()=>i(),t.signal.addEventListener("abort",s);let c=o=>"function"!=typeof n?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):n({request:t,params:r.params,context:a},...void 0!==o?[o]:[]),u=(async()=>{try{return{type:"data",result:await(o?o((e=>c(e))):c())}}catch(e){return{type:"error",result:e}}})();return Promise.race([u,l])};try{let o=r.route[e];if(n)if(o){let e,[t]=await Promise.all([c(o).catch((t=>{e=t})),n]);if(void 0!==e)throw e;i=t}else{if(await n,o=r.route[e],!o){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Me(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:m.data,result:void 0}}i=await c(o)}else{if(!o){let e=new URL(t.url);throw Me(404,{pathname:e.pathname+e.search})}i=await c(o)}l(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:m.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,o,e,i,r,h):Promise.resolve({type:m.data,result:void 0}))})})),y=await e({matches:p,request:o,params:i[0].params,fetcherKey:s,context:h});try{await Promise.all(f)}catch(e){}return y}async function ve(e){let{result:t,type:r}=e;if(Te(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:m.error,error:e}}return r===m.error?{type:m.error,error:new V(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:m.data,data:e,statusCode:t.status,headers:t.headers}}if(r===m.error){if(Ie(t)){var n,o;if(t.data instanceof Error)return{type:m.error,error:t.data,statusCode:null==(o=t.init)?void 0:o.status};t=new V((null==(n=t.init)?void 0:n.status)||500,void 0,t.data)}return{type:m.error,error:t,statusCode:W(t)?t.status:void 0}}var a,i,s,l;return function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:m.deferred,deferredData:t,statusCode:null==(a=t.init)?void 0:a.status,headers:(null==(i=t.init)?void 0:i.headers)&&new Headers(t.init.headers)}:Ie(t)?{type:m.data,data:t.data,statusCode:null==(s=t.init)?void 0:s.status,headers:null!=(l=t.init)&&l.headers?new Headers(t.init.headers):void 0}:{type:m.data,data:t}}function ye(e,t,r,n,o,a){let i=e.headers.get("Location");if(l(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!te.test(i)){let s=n.slice(0,n.findIndex((e=>e.route.id===r))+1);i=ae(new URL(t.url),s,o,!0,i,a),e.headers.set("Location",i)}return e}function ge(e,t,r){if(te.test(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n),a=null!=j(o.pathname,r);if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function we(e,t,r,n){let o=e.createURL(Pe(t)).toString(),a={signal:r};if(n&&Ue(n.formMethod)){let{formMethod:e,formEncType:t}=n;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(n.json)):"text/plain"===t?a.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?a.body=be(n.formData):a.body=n.formData}return new Request(o,a)}function be(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Ee(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Re(e,t,r,n,o){let a,i={},s=null,c=!1,u={},d=r&&_e(r[1])?r[1].error:void 0;return e.forEach((r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(l(!je(f),"Cannot handle redirect results in processLoaderData"),_e(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[h]=t;else{let r=Oe(e,h);null==s[r.route.id]&&(s[r.route.id]=t)}i[h]=void 0,c||(c=!0,a=W(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else De(f)?(n.set(h,f.deferredData),i[h]=f.deferredData.data,null==f.statusCode||200===f.statusCode||c||(a=f.statusCode),f.headers&&(u[h]=f.headers)):(i[h]=f.data,f.statusCode&&200!==f.statusCode&&!c&&(a=f.statusCode),f.headers&&(u[h]=f.headers))})),void 0!==d&&r&&(s={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:a||200,loaderHeaders:u}}function Se(e,t,r,o,a,i,s){let{loaderData:c,errors:u}=Re(t,r,o,s,!1);return a.forEach((t=>{let{key:r,match:o,controller:a}=t,s=i[r];if(l(s,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(_e(s)){let t=Oe(e.matches,null==o?void 0:o.route.id);u&&u[t.route.id]||(u=n({},u,{[t.route.id]:s.error})),e.fetchers.delete(r)}else if(je(s))l(!1,"Unhandled fetcher revalidation redirect");else if(De(s))l(!1,"Unhandled fetcher deferred data");else{let t=Ye(s.data);e.fetchers.set(r,t)}})),{loaderData:c,errors:u}}function xe(e,t,r,o){let a=n({},t);for(let n of r){let r=n.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&n.route.loader&&(a[r]=e[r]),o&&o.hasOwnProperty(r))break}return a}function Ce(e){return e?_e(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oe(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 ke(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 Me(e,t){let{pathname:r,routeId:n,method:o,type:a,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===a?l="defer() is not supported in actions":"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new V(e||500,s,new Error(l),!0)}function Le(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(je(n))return{key:r,result:n}}}function Pe(e){return h(n({},"string"==typeof e?f(e):e,{hash:""}))}function Ae(e){return Te(e.result)&&K.has(e.result.status)}function De(e){return e.type===m.deferred}function _e(e){return e.type===m.error}function je(e){return(e&&e.type)===m.redirect}function Ie(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ne(e){return G.has(e.toLowerCase())}function Ue(e){return Y.has(e.toLowerCase())}async function Fe(e,t,r,n,o){let a=Object.entries(t);for(let i=0;i<a.length;i++){let[s,l]=a[i],c=e.find((e=>(null==e?void 0:e.route.id)===s));if(!c)continue;let u=n.find((e=>e.route.id===c.route.id)),d=null!=u&&!ue(u,c)&&void 0!==(o&&o[c.route.id]);De(l)&&d&&await Be(l,r,!1).then((e=>{e&&(t[s]=e)}))}}async function ze(e,t,r){for(let n=0;n<r.length;n++){let{key:o,routeId:a,controller:i}=r[n],s=t[o];e.find((e=>(null==e?void 0:e.route.id)===a))&&(De(s)&&(l(i,"Expected an AbortController for revalidating fetcher deferred result"),await Be(s,i.signal,!0).then((e=>{e&&(t[o]=e)}))))}}async function Be(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:m.data,data:e.deferredData.unwrappedData}}catch(e){return{type:m.error,error:e}}return{type:m.data,data:e.deferredData.data}}}function He(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function $e(e,t){let r="string"==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&He(r||""))return e[e.length-1];let n=T(e);return n[n.length-1]}function Ve(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(t&&r&&n)return null!=o?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o}:null!=a?{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function We(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 qe(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 Ye(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},30454:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var o=a(r[0]);o!==r[0]&&(t[r[0]]=o)}r=n.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},73055:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),a=0;a<n.length;a++){var i=n[a],s=e[i];(o?-1!==t.indexOf(i):t(i,s,e))&&(r[i]=s)}return r}},61074:e=>{e.exports=function(e){return e.split("")}},27185:(e,t,r)=>{var n=r(38859),o=r(15325),a=r(29905),i=r(34932),s=r(27301),l=r(19219),c=Math.min;e.exports=function(e,t,r){for(var u=r?a:o,d=e[0].length,h=e.length,f=h,p=Array(h),m=1/0,v=[];f--;){var y=e[f];f&&t&&(y=i(y,s(t))),m=c(y.length,m),p[f]=!r&&(t||d>=120&&y.length>=120)?new n(f&&y):void 0}y=e[0];var g=-1,w=p[0];e:for(;++g<d&&v.length<m;){var b=y[g],E=t?t(b):b;if(b=r||0!==b?b:0,!(w?l(w,E):u(v,E,r))){for(f=h;--f;){var R=p[f];if(!(R?l(R,E):u(e[f],E,r)))continue e}w&&w.push(E),v.push(b)}}return v}},80741:(e,t,r)=>{var n=r(83693);e.exports=function(e){return n(e)?e:[]}},28754:(e,t,r)=>{var n=r(25160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},12507:(e,t,r)=>{var n=r(28754),o=r(49698),a=r(63912),i=r(13222);e.exports=function(e){return function(t){t=i(t);var r=o(t)?a(t):void 0,s=r?r[0]:t.charAt(0),l=r?n(r,1).join(""):t.slice(1);return s[e]()+l}}},62006:(e,t,r)=>{var n=r(15389),o=r(64894),a=r(95950);e.exports=function(e){return function(t,r,i){var s=Object(t);if(!o(t)){var l=n(r,3);t=a(t),r=function(e){return l(s[e],e,s)}}var c=e(t,r,i);return c>-1?s[l?t[c]:c]:void 0}}},49698:e=>{e.exports=function(){return!1}},63912:(e,t,r)=>{var n=r(61074),o=r(49698),a=r(42054);e.exports=function(e){return o(e)?a(e):n(e)}},42054:e=>{e.exports=function(e){return e.split("")}},14792:(e,t,r)=>{var n=r(13222),o=r(55808);e.exports=function(e){return o(n(e).toLowerCase())}},7309:(e,t,r)=>{var n=r(62006)(r(24713));e.exports=n},24713:(e,t,r)=>{var n=r(2523),o=r(15389),a=r(61489),i=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var l=null==r?0:a(r);return l<0&&(l=i(s+l,0)),n(e,o(t,3),l)}},5287:(e,t,r)=>{var n=r(34932),o=r(27185),a=r(69302),i=r(80741),s=a((function(e){var t=n(e,i);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=s},99786:(e,t,r)=>{var n=r(83120),o=r(15389),a=r(69302),i=r(55765),s=r(83693),l=r(68090),c=a((function(e){var t=l(e);return s(t)&&(t=void 0),i(n(e,1,s,!0),o(t,2))}));e.exports=c},55808:(e,t,r)=>{var n=r(12507)("toUpperCase");e.exports=n},86663:(e,t,r)=>{"use strict";const n=r(24280),o=r(30454),a=r(528),i=r(73055),s=Symbol("encodeFragmentIdentifier");function l(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?o(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){l((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const o="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!o&&u(r,e).includes(e.arrayFormatSeparator);r=a?u(r,e):r;const i=o||a?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=i};case"bracket-separator":return(t,r,n)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(n[t]=r?u(r,e):r);const a=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],a):n[t]=a};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){if(""===o)continue;let[e,i]=a(t.decode?o.replace(/\+/g," "):o,"=");i=void 0===i?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?i:u(i,t),r(u(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=f,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";l((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const o=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[c(t,e),"[",o,"]"].join("")]:[...r,[c(t,e),"[",c(o,e),"]=",c(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[c(t,e),"[]"].join("")]:[...r,[c(t,e),"[]=",c(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[c(t,e),":list="].join("")]:[...r,[c(t,e),":list=",c(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[c(r,e),t,c(o,e)].join("")]:[[n,c(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,c(t,e)]:[...r,[c(t,e),"=",c(n,e)].join("")]}}(t),o={};for(const t of Object.keys(e))r(t)||(o[t]=e[t]);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map((r=>{const o=e[r];return void 0===o?"":null===o?c(r,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?c(r,t)+"[]":o.reduce(n(r),[]).join("&"):c(r,t)+"="+c(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(f(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=h(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),i=Object.assign(a,e.query);let l=t.stringify(i,r);l&&(l=`?${l}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[s]?c(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${l}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:o,query:a,fragmentIdentifier:l}=t.parseUrl(e,n);return t.stringifyUrl({url:o,query:i(a,r),fragmentIdentifier:l},n)},t.exclude=(e,r,n)=>{const o=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,o,n)}},39335:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(4883),o=r(12238),a=r.n(o),i=r(4146),s=r.n(i);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}var c={},u=0;function d(e,t){return t=t||{},function(r){var o=r.displayName||r.name||"Component",i=function(o){var a,i;function s(e,t){var r;return(r=o.call(this,e,t)||this).state={},r.__scriptURL="",r}i=o,(a=s).prototype=Object.create(i.prototype),a.prototype.constructor=a,a.__proto__=i;var l=s.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+u++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=c[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var r in e.observers)e.observers[r](e);delete window[t.callbackName]},l.componentDidMount=function(){var e=this,r=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),o=t,a=o.globalName,i=o.callbackName,s=o.scriptId;if(a&&void 0!==window[a]&&(c[r]={loaded:!0,observers:{}}),c[r]){var l=c[r];return l&&(l.loaded||l.errored)?void this.asyncScriptLoaderHandleLoad(l):void(l.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var u={};u[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},c[r]={loaded:!1,observers:u};var d=document.createElement("script");for(var h in d.src=r,d.async=!0,t.attributes)d.setAttribute(h,t.attributes[h]);s&&(d.id=s);var f=function(e){if(c[r]){var t=c[r].observers;for(var n in t)e(t[n])&&delete t[n]}};i&&"undefined"!=typeof window&&(window[i]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=c[r];e&&(e.loaded=!0,f((function(t){return!i&&(t(e),!0)})))},d.onerror=function(){var e=c[r];e&&(e.errored=!0,f((function(t){return t(e),!0})))},document.body.appendChild(d)},l.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var r=document.getElementsByTagName("script"),n=0;n<r.length;n+=1)r[n].src.indexOf(e)>-1&&r[n].parentNode&&r[n].parentNode.removeChild(r[n]);var o=c[e];o&&(delete o.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete c[e])},l.render=function(){var e=t.globalName,o=this.props,a=(o.asyncScriptOnLoad,o.forwardedRef),i=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(o,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(i[e]=void 0!==window[e]?window[e]:void 0),i.ref=a,(0,n.createElement)(r,i)},s}(n.Component),d=(0,n.forwardRef)((function(e,t){return(0,n.createElement)(i,l({},e,{forwardedRef:t}))}));return d.displayName="AsyncScriptLoader("+o+")",d.propTypes={asyncScriptOnLoad:a().func},s()(d,r)}}},29336:(e,t,r)=>{"use strict";var n=r(33567);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},12238:(e,t,r)=>{e.exports=r(29336)()},33567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},99651:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(98931);r(32845);const o=101==r.j?n.A:null},98931:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(32845),o=r(39335),a="onloadcallback";function i(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}const s=(0,o.A)((function(){var e=i(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+a+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+a+"&render=explicit"}),{callbackName:a,globalName:"grecaptcha",attributes:i().nonce?{nonce:i().nonce}:{}})(n.A)},32845:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(4883),o=r(49385),a=r.n(o),i=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var u=function(e){var t,r;function o(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(l(t)),t.handleErrored=t.handleErrored.bind(l(t)),t.handleChange=t.handleChange.bind(l(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(l(t)),t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r);var a=o.prototype;return a.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},a.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},a.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},a.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},a.executeAsync=function(){var e=this;return new Promise((function(t,r){e.executionResolve=t,e.executionReject=r,e.execute()}))},a.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},a.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},a.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},a.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},a.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},a.explicitRender=function(){var e=this.getCaptchaFunction("render");if(e&&void 0===this._widgetId){var t=document.createElement("div");this._widgetId=e(t,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(t)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},a.componentDidMount=function(){this.explicitRender()},a.componentDidUpdate=function(){this.explicitRender()},a.handleRecaptchaRef=function(e){this.captcha=e},a.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,e.isolated,function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,i));return n.createElement("div",s({},t,{ref:this.handleRecaptchaRef}))},o}(n.Component);u.displayName="ReCAPTCHA",u.propTypes={sitekey:a().string.isRequired,onChange:a().func,grecaptcha:a().object,theme:a().oneOf(["dark","light"]),type:a().oneOf(["image","audio"]),tabindex:a().number,onExpired:a().func,onErrored:a().func,size:a().oneOf(["compact","normal","invisible"]),stoken:a().string,hl:a().string,badge:a().oneOf(["bottomright","bottomleft","inline"]),isolated:a().bool},u.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"}},22501:(e,t,r)=>{"use strict";var n=r(1846);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},49385:(e,t,r)=>{e.exports=r(22501)()},1846:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},84976:(e,t,r)=>{"use strict";r.d(t,{Ge:()=>d,N_:()=>x,OA:()=>C,ok:()=>P,pg:()=>b});var n=r(4883),o=r(81845);if(101==r.j)var a=r(47767);if(101==r.j)var i=r(45588);
13
+ /**
14
+ * React Router DOM v6.27.0
15
+ *
16
+ * Copyright (c) Remix Software Inc.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE.md file in the root directory of this source tree.
20
+ *
21
+ * @license MIT
22
+ */function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function l(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function c(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const u=101==r.j?["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"]:null;try{window.__reactRouterVersion="6"}catch(e){}function d(e,t){return(0,i.aE)({basename:null==t?void 0:t.basename,future:s({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,i.TM)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||h(),routes:e,mapRouteProperties:a.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function h(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=s({},t,{errors:f(t.errors)})),t}function f(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new i.VV(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let o=new t(n.message);o.stack="",r[e]=o}catch(e){}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}const p=n.createContext({isTransitioning:!1});const m=n.createContext(new Map);const v=n.startTransition,y=o.flushSync;n.useId;function g(e){y?y(e):e()}class w{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 b(e){let{fallbackElement:t,router:r,future:o}=e,[i,s]=n.useState(r.state),[l,c]=n.useState(),[u,d]=n.useState({isTransitioning:!1}),[h,f]=n.useState(),[y,b]=n.useState(),[R,S]=n.useState(),x=n.useRef(new Map),{v7_startTransition:C}=o||{},O=n.useCallback((e=>{C?function(e){v?v(e):e()}(e):e()}),[C]),k=n.useCallback(((e,t)=>{let{deletedFetchers:n,flushSync:o,viewTransitionOpts:a}=t;n.forEach((e=>x.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)}));let i=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(a&&!i){if(o){g((()=>{y&&(h&&h.resolve(),y.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:a.currentLocation,nextLocation:a.nextLocation})}));let t=r.window.document.startViewTransition((()=>{g((()=>s(e)))}));return t.finished.finally((()=>{g((()=>{f(void 0),b(void 0),c(void 0),d({isTransitioning:!1})}))})),void g((()=>b(t)))}y?(h&&h.resolve(),y.skipTransition(),S({state:e,currentLocation:a.currentLocation,nextLocation:a.nextLocation})):(c(e),d({isTransitioning:!0,flushSync:!1,currentLocation:a.currentLocation,nextLocation:a.nextLocation}))}else o?g((()=>s(e))):O((()=>s(e)))}),[r.window,y,h,x,O]);n.useLayoutEffect((()=>r.subscribe(k)),[r,k]),n.useEffect((()=>{u.isTransitioning&&!u.flushSync&&f(new w)}),[u]),n.useEffect((()=>{if(h&&l&&r.window){let e=l,t=h.promise,n=r.window.document.startViewTransition((async()=>{O((()=>s(e))),await t}));n.finished.finally((()=>{f(void 0),b(void 0),c(void 0),d({isTransitioning:!1})})),b(n)}}),[O,l,h,r.window]),n.useEffect((()=>{h&&l&&i.location.key===l.location.key&&h.resolve()}),[h,y,i.location,l]),n.useEffect((()=>{!u.isTransitioning&&R&&(c(R.state),d({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),S(void 0))}),[u.isTransitioning,R]),n.useEffect((()=>{}),[]);let M=n.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),L=r.basename||"/",P=n.useMemo((()=>({router:r,navigator:M,static:!1,basename:L})),[r,M,L]),A=n.useMemo((()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath})),[r.future.v7_relativeSplatPath]);return n.createElement(n.Fragment,null,n.createElement(a.sp.Provider,{value:P},n.createElement(a.Rq.Provider,{value:i},n.createElement(m.Provider,{value:x.current},n.createElement(p.Provider,{value:u},n.createElement(a.Ix,{basename:L,location:i.location,navigationType:i.historyAction,navigator:M,future:A},i.initialized||r.future.v7_partialHydration?n.createElement(E,{routes:r.routes,future:r.future,state:i}):t))))),null)}const E=101==r.j?n.memo((function(e){let{routes:t,future:r,state:n}=e;return(0,a.ph)(t,void 0,n,r)})):null;const R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,S=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x=101==r.j?n.forwardRef((function(e,t){let r,{onClick:o,relative:c,reloadDocument:d,replace:h,state:f,target:p,to:m,preventScrollReset:v,viewTransition:y}=e,g=l(e,u),{basename:w}=n.useContext(a.jb),b=!1;if("string"==typeof m&&S.test(m)&&(r=m,R))try{let e=new URL(window.location.href),t=m.startsWith("//")?new URL(e.protocol+m):new URL(m),r=(0,i.pb)(t.pathname,w);t.origin===e.origin&&null!=r?m=r+t.search+t.hash:b=!0}catch(e){}let E=(0,a.$P)(m,{relative:c}),x=function(e,t){let{target:r,replace:o,state:s,preventScrollReset:l,relative:c,viewTransition:u}=void 0===t?{}:t,d=(0,a.Zp)(),h=(0,a.zy)(),f=(0,a.x$)(e,{relative:c});return n.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,r)){t.preventDefault();let r=void 0!==o?o:(0,i.AO)(h)===(0,i.AO)(f);d(e,{replace:r,state:s,preventScrollReset:l,relative:c,viewTransition:u})}}),[h,d,f,o,s,r,e,l,c,u])}(m,{replace:h,state:f,target:p,preventScrollReset:v,relative:c,viewTransition:y});return n.createElement("a",s({},g,{href:r||E,onClick:b||d?o:function(e){o&&o(e),e.defaultPrevented||x(e)},ref:t,target:p}))})):null;function C(e){let{getKey:t,storageKey:r}=e;return function(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:o}=M(O.UseScrollRestoration),{restoreScrollPosition:l,preventScrollReset:c}=L(k.UseScrollRestoration),{basename:u}=n.useContext(a.jb),d=(0,a.zy)(),h=(0,a.FE)(),f=(0,a.cq)();n.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:r}=t||{};n.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}(n.useCallback((()=>{if("idle"===f.state){let e=(t?t(d,h):null)||d.key;D[e]=window.scrollY}try{sessionStorage.setItem(r||A,JSON.stringify(D))}catch(e){}window.history.scrollRestoration="auto"}),[r,t,f.state,d,h])),"undefined"!=typeof document&&(n.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||A);e&&(D=JSON.parse(e))}catch(e){}}),[r]),n.useLayoutEffect((()=>{let e=t&&"/"!==u?(e,r)=>t(s({},e,{pathname:(0,i.pb)(e.pathname,u)||e.pathname}),r):t,r=null==o?void 0:o.enableScrollRestoration(D,(()=>window.scrollY),e);return()=>r&&r()}),[o,u,t]),n.useLayoutEffect((()=>{if(!1!==l)if("number"!=typeof l){if(d.hash){let e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==c&&window.scrollTo(0,0)}else window.scrollTo(0,l)}),[d,l,c]))}({getKey:t,storageKey:r}),null}var O,k;function M(e){let t=n.useContext(a.sp);return t||(0,i.Oi)(!1),t}function L(e){let t=n.useContext(a.Rq);return t||(0,i.Oi)(!1),t}function P(e){let t=n.useRef(c(e)),r=n.useRef(!1),o=(0,a.zy)(),i=n.useMemo((()=>function(e,t){let r=c(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(o.search,r.current?null:t.current)),[o.search]),s=(0,a.Zp)(),l=n.useCallback(((e,t)=>{const n=c("function"==typeof e?e(i):e);r.current=!0,s("?"+n,t)}),[s,i]);return[i,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(O||(O={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(k||(k={}));const A="react-router-scroll-positions";let D={}},47767:(e,t,r)=>{"use strict";r.d(t,{$P:()=>h,BV:()=>N,C5:()=>j,FE:()=>P,Ix:()=>T,KP:()=>D,Rq:()=>s,Zp:()=>v,bg:()=>z,cq:()=>L,g:()=>y,jb:()=>l,ph:()=>w,qh:()=>I,sp:()=>i,wE:()=>F,x$:()=>g,zy:()=>p});var n=r(4883),o=r(45588);
23
+ /**
24
+ * React Router v6.27.0
25
+ *
26
+ * Copyright (c) Remix Software Inc.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE.md file in the root directory of this source tree.
30
+ *
31
+ * @license MIT
32
+ */
33
+ function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}const i=101==r.j?n.createContext(null):null;const s=101==r.j?n.createContext(null):null;const l=101==r.j?n.createContext(null):null;const c=101==r.j?n.createContext(null):null;const u=n.createContext({outlet:null,matches:[],isDataRoute:!1});const d=n.createContext(null);function h(e,t){let{relative:r}=void 0===t?{}:t;f()||(0,o.Oi)(!1);let{basename:a,navigator:i}=n.useContext(l),{hash:s,pathname:c,search:u}=g(e,{relative:r}),d=c;return"/"!==a&&(d="/"===c?a:(0,o.HS)([a,c])),i.createHref({pathname:d,search:u,hash:s})}function f(){return null!=n.useContext(c)}function p(){return f()||(0,o.Oi)(!1),n.useContext(c).location}function m(e){n.useContext(l).static||n.useLayoutEffect(e)}function v(){let{isDataRoute:e}=n.useContext(u);return e?function(){let{router:e}=O(x.UseNavigateStable),t=M(C.UseNavigateStable),r=n.useRef(!1);return m((()=>{r.current=!0})),n.useCallback((function(n,o){void 0===o&&(o={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,a({fromRouteId:t},o)))}),[e,t])}():function(){f()||(0,o.Oi)(!1);let e=n.useContext(i),{basename:t,future:r,navigator:a}=n.useContext(l),{matches:s}=n.useContext(u),{pathname:c}=p(),d=JSON.stringify((0,o.yD)(s,r.v7_relativeSplatPath)),h=n.useRef(!1);return m((()=>{h.current=!0})),n.useCallback((function(r,n){if(void 0===n&&(n={}),!h.current)return;if("number"==typeof r)return void a.go(r);let i=(0,o.Gh)(r,JSON.parse(d),c,"path"===n.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,o.HS)([t,i.pathname])),(n.replace?a.replace:a.push)(i,n.state,n)}),[t,a,d,c,e])}()}function y(){let{matches:e}=n.useContext(u),t=e[e.length-1];return t?t.params:{}}function g(e,t){let{relative:r}=void 0===t?{}:t,{future:a}=n.useContext(l),{matches:i}=n.useContext(u),{pathname:s}=p(),c=JSON.stringify((0,o.yD)(i,a.v7_relativeSplatPath));return n.useMemo((()=>(0,o.Gh)(e,JSON.parse(c),s,"path"===r)),[e,c,s,r])}function w(e,t,r,i){f()||(0,o.Oi)(!1);let{navigator:s}=n.useContext(l),{matches:d}=n.useContext(u),h=d[d.length-1],m=h?h.params:{},v=(h&&h.pathname,h?h.pathnameBase:"/");h&&h.route;let y,g=p();if(t){var w;let e="string"==typeof t?(0,o.Rr)(t):t;"/"===v||(null==(w=e.pathname)?void 0:w.startsWith(v))||(0,o.Oi)(!1),y=e}else y=g;let b=y.pathname||"/",E=b;if("/"!==v){let e=v.replace(/^\//,"").split("/");E="/"+b.replace(/^\//,"").split("/").slice(e.length).join("/")}let R=(0,o.ue)(e,{pathname:E});let x=S(R&&R.map((e=>Object.assign({},e,{params:Object.assign({},m,e.params),pathname:(0,o.HS)([v,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?v:(0,o.HS)([v,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),d,r,i);return t&&x?n.createElement(c.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:o.rc.Pop}},x):x}const b=101==r.j?n.createElement((function(){let e=function(){var e;let t=n.useContext(d),r=k(C.UseRouteError),o=M(C.UseRouteError);if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[o]}(),t=(0,o.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a};return n.createElement(n.Fragment,null,n.createElement("h2",null,"Unexpected Application Error!"),n.createElement("h3",{style:{fontStyle:"italic"}},t),r?n.createElement("pre",{style:i},r):null,null)}),null):null;class E extends n.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){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?n.createElement(u.Provider,{value:this.props.routeContext},n.createElement(d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function R(e){let{routeContext:t,match:r,children:o}=e,a=n.useContext(i);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),n.createElement(u.Provider,{value:t},o)}function S(e,t,r,a){var i;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===a&&(a=null),null==e){var s;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(s=a)&&s.v7_partialHydration&&0===t.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,c=null==(i=r)?void 0:i.errors;if(null!=c){let e=l.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||(0,o.Oi)(!1),l=l.slice(0,Math.min(l.length,e+1))}let u=!1,d=-1;if(r&&a&&a.v7_partialHydration)for(let e=0;e<l.length;e++){let t=l[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(d=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){u=!0,l=d>=0?l.slice(0,d+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,s=!1,h=null,f=null;var p;r&&(i=c&&o.route.id?c[o.route.id]:void 0,h=o.route.errorElement||b,u&&(d<0&&0===a?(p="route-fallback",!1||_[p]||(_[p]=!0),s=!0,f=null):d===a&&(s=!0,f=o.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,a+1)),v=()=>{let t;return t=i?h:s?f:o.route.Component?n.createElement(o.route.Component,null):o.route.element?o.route.element:e,n.createElement(R,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?n.createElement(E,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()}),null)}var x=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(x||{}),C=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(C||{});function O(e){let t=n.useContext(i);return t||(0,o.Oi)(!1),t}function k(e){let t=n.useContext(s);return t||(0,o.Oi)(!1),t}function M(e){let t=function(e){let t=n.useContext(u);return t||(0,o.Oi)(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||(0,o.Oi)(!1),r.route.id}function L(){return k(C.UseNavigation).navigation}function P(){let{matches:e,loaderData:t}=k(C.UseMatches);return n.useMemo((()=>e.map((e=>(0,o.ro)(e,t)))),[e,t])}let A=0;function D(e){let{router:t,basename:r}=O(x.UseBlocker),i=k(C.UseBlocker),[s,l]=n.useState(""),c=n.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:i,historyAction:s}=t;return e({currentLocation:a({},n,{pathname:(0,o.pb)(n.pathname,r)||n.pathname}),nextLocation:a({},i,{pathname:(0,o.pb)(i.pathname,r)||i.pathname}),historyAction:s})}),[r,e]);return n.useEffect((()=>{let e=String(++A);return l(e),()=>t.deleteBlocker(e)}),[t]),n.useEffect((()=>{""!==s&&t.getBlocker(s,c)}),[t,s,c]),s&&i.blockers.has(s)?i.blockers.get(s):o.G3}const _={};n.startTransition;function j(e){let{to:t,replace:r,state:a,relative:i}=e;f()||(0,o.Oi)(!1);let{future:s,static:c}=n.useContext(l),{matches:d}=n.useContext(u),{pathname:h}=p(),m=v(),y=(0,o.Gh)(t,(0,o.yD)(d,s.v7_relativeSplatPath),h,"path"===i),g=JSON.stringify(y);return n.useEffect((()=>m(JSON.parse(g),{replace:r,state:a,relative:i})),[m,g,i,r,a]),null}function I(e){(0,o.Oi)(!1)}function T(e){let{basename:t="/",children:r=null,location:i,navigationType:s=o.rc.Pop,navigator:u,static:d=!1,future:h}=e;f()&&(0,o.Oi)(!1);let p=t.replace(/^\/*/,"/"),m=n.useMemo((()=>({basename:p,navigator:u,static:d,future:a({v7_relativeSplatPath:!1},h)})),[p,h,u,d]);"string"==typeof i&&(i=(0,o.Rr)(i));let{pathname:v="/",search:y="",hash:g="",state:w=null,key:b="default"}=i,E=n.useMemo((()=>{let e=(0,o.pb)(v,p);return null==e?null:{location:{pathname:e,search:y,hash:g,state:w,key:b},navigationType:s}}),[p,v,y,g,w,b,s]);return null==E?null:n.createElement(l.Provider,{value:m},n.createElement(c.Provider,{children:r,value:E}))}function N(e){let{children:t,location:r}=e;return w(U(t),r)}new Promise((()=>{}));n.Component;function U(e,t){void 0===t&&(t=[]);let r=[];return n.Children.forEach(e,((e,a)=>{if(!n.isValidElement(e))return;let i=[...t,a];if(e.type===n.Fragment)return void r.push.apply(r,U(e.props.children,i));e.type!==I&&(0,o.Oi)(!1),e.props.index&&e.props.children&&(0,o.Oi)(!1);let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=U(e.props.children,i)),r.push(s)})),r}function F(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:n.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:n.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:n.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function z(e,t){return(0,o.aE)({basename:null==t?void 0:t.basename,future:a({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,o.sC)({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:F,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}},6414:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(25406);const o=(a=n.A,i=a.getIn,function(e,t){return function(r){var n=t||function(e){return i(e,"form")};return!!i(n(r),e+".submitting")}});var a,i},528:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},24280:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},18987:(e,t,r)=>{"use strict";
34
+ /*! js-cookie v3.0.5 | MIT */
35
+ function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}r.d(t,{A:()=>o});var o=function e(t,r){function o(e,o,a){if("undefined"!=typeof document){"number"==typeof(a=n({},r,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in a)a[s]&&(i+="; "+s,!0!==a[s]&&(i+="="+a[s].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+i}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var a=r[o].split("="),i=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(n[s]=t.read(i,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},36459:(e,t,r)=>{"use strict";r.d(t,{h:()=>k});var n,o=r(4883),a=Object.defineProperty,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(i)for(var r of i(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&i)for(var n of i(e))t.indexOf(n)<0&&l.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class t{constructor(e,r,n,a){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let i=[];for(let e=0;e<this.size;e++)i.push(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),-1==a){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(a=t,e=r),this.applyMask(t)}}o(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,n,a=1,s=40,l=-1,c=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,d;for(u=a;;u++){const r=8*t.getNumDataCodewords(u,n),o=i.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const f=8*t.getNumDataCodewords(u,n);o(h.length<=f),r(0,Math.min(4,f-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<f;e^=253)r(e,8,h);let p=[];for(;8*p.length<h.length;)p.push(0);return h.forEach(((e,t)=>p[t>>>3]|=e<<7-(7&t))),new t(u,n,p,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const a=21522^(t<<10|r);o(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(a,e));this.setFunctionModule(8,7,n(a,6)),this.setFunctionModule(8,8,n(a,7)),this.setFunctionModule(7,8,n(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const r=n(t,e),o=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(o,a,r),this.setFunctionModule(a,o,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),a=e+n,i=t+r;0<=a&&a<this.size&&0<=i&&i<this.size&&this.setFunctionModule(a,i,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const a=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],i=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(t.getNumRawDataModules(r)/8),l=a-s%a,c=Math.floor(s/a);let u=[];const d=t.reedSolomonComputeDivisor(i);for(let r=0,n=0;r<a;r++){let o=e.slice(n,n+c-i+(r<l?0:1));n+=o.length;const a=t.reedSolomonComputeRemainder(o,d);r<l&&o.push(0),u.push(o.concat(a))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=c-i||r>=l)&&h.push(t[e])}));return o(h.length==s),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let o=0;o<this.size;o++)for(let a=0;a<2;a++){const i=t-a,s=0==(t+1&2)?this.size-1-o:o;!this.isFunction[s][i]&&r<8*e.length&&(this.modules[s][i]=n(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[r][i]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[r][i],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,a)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[i][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,a)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,a=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=a&&a<=9),e+=a*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}e.QrCode=t;const a=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(const e of t)r(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+o),10),3*o+1,n),e+=o}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,o=[];for(n=0;n+2<=t.length;n+=2){let a=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),r(a,11,o)}return n<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,o),new e(e.Mode.ALPHANUMERIC,t.length,o)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,n),r(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let i=a;e.QrSegment=a})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2);e.Ecc=t})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]);e.Mode=t})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var h=n,f={L:h.QrCode.Ecc.LOW,M:h.QrCode.Ecc.MEDIUM,Q:h.QrCode.Ecc.QUARTILE,H:h.QrCode.Ecc.HIGH},p=128,m="L",v="#FFFFFF",y="#000000",g=!1,w=1,b=4,E=0,R=.1;
36
+ /**
37
+ * @license qrcode.react
38
+ * Copyright (c) Paul O'Shannessy
39
+ * SPDX-License-Identifier: ISC
40
+ */function S(e,t=0){const r=[];return e.forEach((function(e,n){let o=null;e.forEach((function(a,i){if(!a&&null!==o)return r.push(`M${o+t} ${n+t}h${i-o}v1H${o+t}z`),void(o=null);if(i!==e.length-1)a&&null===o&&(o=i);else{if(!a)return;null===o?r.push(`M${i+t},${n+t} h1v1H${i+t}z`):r.push(`M${o+t},${n+t} h${i+1-o}v1H${o+t}z`)}}))})),r.join("")}function x(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function C({value:e,level:t,minVersion:r,includeMargin:n,marginSize:a,imageSettings:i,size:s,boostLevel:l}){let c=o.useMemo((()=>{const n=(Array.isArray(e)?e:[e]).reduce(((e,t)=>(e.push(...h.QrSegment.makeSegments(t)),e)),[]);return h.QrCode.encodeSegments(n,f[t],r,void 0,void 0,l)}),[e,t,r,l]);const{cells:u,margin:d,numCells:p,calculatedImageSettings:m}=o.useMemo((()=>{let e=c.getModules();const t=function(e,t){return null!=t?Math.max(Math.floor(t),0):e?b:E}(n,a),r=e.length+2*t,o=function(e,t,r,n){if(null==n)return null;const o=e.length+2*r,a=Math.floor(t*R),i=o/t,s=(n.width||a)*i,l=(n.height||a)*i,c=null==n.x?e.length/2-s/2:n.x*i,u=null==n.y?e.length/2-l/2:n.y*i,d=null==n.opacity?1:n.opacity;let h=null;if(n.excavate){let e=Math.floor(c),t=Math.floor(u);h={x:e,y:t,w:Math.ceil(s+c-e),h:Math.ceil(l+u-t)}}return{x:c,y:u,h:l,w:s,excavation:h,opacity:d,crossOrigin:n.crossOrigin}}(e,s,t,i);return{cells:e,margin:t,numCells:r,calculatedImageSettings:o}}),[c,s,i,n,a]);return{qrcode:c,margin:d,cells:u,numCells:p,calculatedImageSettings:m}}var O=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();o.forwardRef((function(e,t){const r=e,{value:n,size:a=p,level:i=m,bgColor:s=v,fgColor:l=y,includeMargin:c=g,minVersion:h=w,boostLevel:f,marginSize:b,imageSettings:E}=r,R=d(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:k}=R,M=d(R,["style"]),L=null==E?void 0:E.src,P=o.useRef(null),A=o.useRef(null),D=o.useCallback((e=>{P.current=e,"function"==typeof t?t(e):t&&(t.current=e)}),[t]),[_,j]=o.useState(!1),{margin:I,cells:T,numCells:N,calculatedImageSettings:U}=C({value:n,level:i,minVersion:h,boostLevel:f,includeMargin:c,marginSize:b,imageSettings:E,size:a});o.useEffect((()=>{if(null!=P.current){const e=P.current,t=e.getContext("2d");if(!t)return;let r=T;const n=A.current,o=null!=U&&null!==n&&n.complete&&0!==n.naturalHeight&&0!==n.naturalWidth;o&&null!=U.excavation&&(r=x(T,U.excavation));const i=window.devicePixelRatio||1;e.height=e.width=a*i;const c=a/N*i;t.scale(c,c),t.fillStyle=s,t.fillRect(0,0,N,N),t.fillStyle=l,O?t.fill(new Path2D(S(r,I))):T.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+I,r+I,1,1)}))})),U&&(t.globalAlpha=U.opacity),o&&t.drawImage(n,U.x+I,U.y+I,U.w,U.h)}})),o.useEffect((()=>{j(!1)}),[L]);const F=u({height:a,width:a},k);let z=null;return null!=L&&(z=o.createElement("img",{src:L,key:L,style:{display:"none"},onLoad:()=>{j(!0)},ref:A,crossOrigin:null==U?void 0:U.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",u({style:F,height:a,width:a,ref:D,role:"img"},M)),z)})).displayName="QRCodeCanvas";var k=o.forwardRef((function(e,t){const r=e,{value:n,size:a=p,level:i=m,bgColor:s=v,fgColor:l=y,includeMargin:c=g,minVersion:h=w,boostLevel:f,title:b,marginSize:E,imageSettings:R}=r,O=d(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:k,cells:M,numCells:L,calculatedImageSettings:P}=C({value:n,level:i,minVersion:h,boostLevel:f,includeMargin:c,marginSize:E,imageSettings:R,size:a});let A=M,D=null;null!=R&&null!=P&&(null!=P.excavation&&(A=x(M,P.excavation)),D=o.createElement("image",{href:R.src,height:P.h,width:P.w,x:P.x+k,y:P.y+k,preserveAspectRatio:"none",opacity:P.opacity,crossOrigin:P.crossOrigin}));const _=S(A,k);return o.createElement("svg",u({height:a,width:a,viewBox:`0 0 ${L} ${L}`,ref:t,role:"img"},O),!!b&&o.createElement("title",null,b),o.createElement("path",{fill:s,d:`M0,0 h${L}v${L}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:l,d:_,shapeRendering:"crispEdges"}),D)}));k.displayName="QRCodeSVG"}}]);