PageSourceSearch

https://smartertoys.ai/assets/router-BPdjxME5.js

js smartertoys.ai collected 2026-10-05 15:08:00 UTC 32,104 bytes, 12 lines download raw bytes

1import{r as i}from"./react-vendor-YsBxPMQB.js";/**
2 * react-router v7.9.5
3 *
4 * Copyright (c) Remix Software Inc.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE.md file in the root directory of this source tree.
8 *
9 * @license MIT
10 */var ae="popstate";function Le(e={}){function t(n,a){let{pathname:o,search:l,hash:c}=n.location;return G("",{pathname:o,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:M(a)}return ke(t,r,null,e)}function R(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Se(){return Math.random().toString(36).substring(2,10)}function oe(e,t){return{usr:e.state,key:e.key,idx:t}}function G(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?N(t):t,state:r,key:t&&t.key||n||Se()}}function M({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function N(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ke(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,c="POP",u=null,s=f();s==null&&(s=0,l.replaceState({...l.state,idx:s},""));function f(){return(l.state||{idx:null}).idx}function d(){c="POP";let h=f(),y=h==null?null:h-s;s=h,u&&u({action:c,location:w.location,delta:y})}function m(h,y){c="PUSH";let x=G(w.location,h,y);s=f()+1;let p=oe(x,s),E=w.createHref(x);try{l.pushState(p,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(E)}o&&u&&u({action:c,location:w.location,delta:1})}function g(h,y){c="REPLACE";let x=G(w.location,h,y);s=f();let p=oe(x,s),E=w.createHref(x);l.replaceState(p,"",E),o&&u&&u({action:c,location:w.location,delta:0})}function v(h){return $e(h)}let w={get action(){return c},get location(){return e(a,l)},listen(h){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(ae,d),u=h,()=>{a.removeEventListener(ae,d),u=null}},createHref(h){return t(a,h)},createURL:v,encodeLocation(h){let y=v(h);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:m,replace:g,go(h){return l.go(h)}};return w}function $e(e,t=!1){let r="http://localhost";
10typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),R(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:M(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function se(e,t,r="/"){return Fe(e,t,r,!1)}function Fe(e,t,r,n){let a=typeof t=="string"?N(t):t,o=k(a.pathname||"/",r);if(o==null)return null;let l=ce(e);Ie(l);let c=null;for(let u=0;c==null&&u<l.length;++u){let s=_e(o);c=Ue(l[u],s,n)}return c}function ce(e,t=[],r=[],n="",a=!1){let o=(l,c,u=a,s)=>{let f={relativePath:s===void 0?l.path||"":s,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&u)return;R(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let d=S([n,f.relativePath]),m=r.concat(f);l.children&&l.children.length>0&&(R(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),ce(l.children,t,m,d,u)),!(l.path==null&&!l.index)&&t.push({path:d,score:Ae(d,l.index),routesMeta:m})};return e.forEach((l,c)=>{var u;if(l.path===""||!((u=l.path)!=null&&u.includes("?")))o(l,c);else for(let s of fe(l.path))o(l,c,!0,s)}),t}function fe(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=fe(n.join("/")),c=[];return c.push(...l.map(u=>u===""?o:[o,u].join("/"))),a&&c.push(...l),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function Ie(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:We(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Ne=/^:[\w-]+$/,Te=3,De=2,Be=1,Me=10,Oe=-2,le=e=>e==="*";function Ae(e,t){let r=e.split("/"),n=r.length;return r.some(le)&&(n+=Oe),t&&(n+=De),r.filter(a=>!le(a)).reduce((a,o)=>a+(Ne.test(o)?Te:o===""?Be:Me),n)}function We(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Ue(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let c=0;c<n.length;++c){let u=n[c],s=c===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",d=z({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},f),m=u.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=z({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!d)return null;
10Object.assign(a,d.params),l.push({params:a,pathname:S([o,d.pathname]),pathnameBase:Ke(S([o,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(o=S([o,d.pathnameBase]))}return l}function z(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=He(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((s,{paramName:f,isOptional:d},m)=>{if(f==="*"){let v=c[m]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=c[m];return d&&!g?s[f]=void 0:s[f]=(g||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:l,pattern:e}}function He(e,t=!1,r=!0){P(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function _e(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return P(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function k(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 Ve(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?N(e):e;return{pathname:r?r.startsWith("/")?r:je(r,t):t,search:Je(n),hash:Ye(a)}}function je(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Y(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 ze(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function de(e){let t=ze(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function he(e,t,r,n=!1){let a;typeof e=="string"?a=N(e):(a={...e},R(!a.pathname||!a.pathname.includes("?"),Y("?","pathname","search",a)),R(!a.pathname||!a.pathname.includes("#"),Y("#","pathname","hash",a)),R(!a.search||!a.search.includes("#"),Y("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,c;if(l==null)c=r;else{let d=t.length-1;if(!n&&l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),d-=1;a.pathname=m.join("/")}c=d>=0?t[d]:"/"}let u=Ve(a,c),s=l&&l!=="/"&&l.endsWith("/"),f=(o||l===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}var S=e=>e.join("/").replace(/\/\/+/g,"/"),Ke=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Je=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ye=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var pe=["POST","PUT","PATCH","DELETE"];new Set(pe);var Ge=["GET",...pe];new Set(Ge);var T=i.createContext(null);T.displayName="DataRouter";var K=i.createContext(null);K.displayName="DataRouterState";i.createContext(!1);var me=i.createContext({isTransitioning:!1});me.displayName="ViewTransition";var Xe=i.createContext(new Map);Xe.displayName="Fetchers";var Qe=i.createContext(null);Qe.displayName="Await";var L=i.createContext(null);L.displayName="Navigation";var O=i.createContext(null);O.displayName="Location";var $=i.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var Q=i.createContext(null);Q.displayName="RouteError";function Ze(e,{relative:t}={}){R(A(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(L),{hash:a,pathname:o,search:l}=W(e,{relative:t}),c=o;return r!=="/"&&(c=o==="/"?r:S([r,o])),n.createHref({pathname:c,search:l,hash:a})}function A(){return i.useContext(O)!=null}function F(){return R(A(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(O).location}var ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ge(e){i.useContext(L).static||i.useLayoutEffect(e)}function et(){let{isDataRoute:e}=i.useContext($);return e?ht():tt()}function tt(){R(A(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(T),{basename:t,navigator:r}=i.useContext(L),{matches:n}=i.useContext($),{pathname:a}=F(),o=JSON.stringify(de(n)),l=i.useRef(!1);return ge(()=>{l.current=!0}),i.useCallback((u,s={})=>
10{if(P(l.current,ye),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=he(u,JSON.parse(o),a,s.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:S([t,f.pathname])),(s.replace?r.replace:r.push)(f,s.state,s)},[t,r,o,a,e])}i.createContext(null);function W(e,{relative:t}={}){let{matches:r}=i.useContext($),{pathname:n}=F(),a=JSON.stringify(de(r));return i.useMemo(()=>he(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function rt(e,t){return ve(e,t)}function ve(e,t,r,n,a){var x;R(A(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=i.useContext(L),{matches:l}=i.useContext($),c=l[l.length-1],u=c?c.params:{},s=c?c.pathname:"/",f=c?c.pathnameBase:"/",d=c&&c.route;{let p=d&&d.path||"";we(s,!d||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
12Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let m=F(),g;if(t){let p=typeof t=="string"?N(t):t;R(f==="/"||((x=p.pathname)==null?void 0:x.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${p.pathname}" was given in the \`location\` prop.`),g=p}else g=m;let v=g.pathname||"/",w=v;if(f!=="/"){let p=f.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(p.length).join("/")}let h=se(e,{pathname:w});P(d||h!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),P(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=it(h&&h.map(p=>Object.assign({},p,{params:Object.assign({},u,p.params),pathname:S([f,o.encodeLocation?o.encodeLocation(p.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?f:S([f,o.encodeLocation?o.encodeLocation(p.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,r,n,a);return t&&y?i.createElement(O.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},y):y}function nt(){let e=dt(),t=qe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var at=i.createElement(nt,null),ot=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?i.createElement($.Provider,{value:this.props.routeContext},i.createElement(Q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function lt({routeContext:e,match:t,children:r}){let n=i.useContext(T);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement($.Provider,{value:e},r)}function it(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=r==null?void 0:r.errors;if(l!=null){let s=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);R(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,s+1))}let c=!1,u=-1;if(r)for(let s=0;s<o.length;s++){let f=o[s];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=s),f.route.id){let{loaderData:d,errors:m}
12=r,g=f.route.loader&&!d.hasOwnProperty(f.route.id)&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((s,f,d)=>{let m,g=!1,v=null,w=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||at,c&&(u<0&&d===0?(we("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):u===d&&(g=!0,w=f.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,d+1)),y=()=>{let x;return m?x=v:g?x=w:f.route.Component?x=i.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=s,i.createElement(lt,{match:f,routeContext:{outlet:s,matches:h,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?i.createElement(ot,{location:r.location,revalidation:r.revalidation,component:v,error:m,children:y(),routeContext:{outlet:null,matches:h,isDataRoute:!0},unstable_onError:n}):y()},null)}function Z(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function ut(e){let t=i.useContext(T);return R(t,Z(e)),t}function st(e){let t=i.useContext(K);return R(t,Z(e)),t}function ct(e){let t=i.useContext($);return R(t,Z(e)),t}function ee(e){let t=ct(e),r=t.matches[t.matches.length-1];return R(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ft(){return ee("useRouteId")}function dt(){var n;let e=i.useContext(Q),t=st("useRouteError"),r=ee("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function ht(){let{router:e}=ut("useNavigate"),t=ee("useNavigate"),r=i.useRef(!1);return ge(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{P(r.current,ye),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var ie={};function we(e,t,r){!t&&!ie[e]&&(ie[e]=!0,P(!1,r))}i.memo(pt);function pt({routes:e,future:t,state:r,unstable_onError:n}){return ve(e,void 0,r,n,t)}function mt(e){R(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function yt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1}){R(!A(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=i.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);typeof r=="string"&&(r=N(r));let{pathname:u="/",search:s="",hash:f="",state:d=null,key:m="default"}=r,g=i.useMemo(()=>{let v=k(u,l);return v==null?null:{location:{pathname:v,search:s,hash:f,state:d,key:m},navigationType:n}},[l,u,s,f,d,m,n]);return P(g!=null,`<Router basename="${l}"> is not able to match the URL "${u}${s}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:i.createElement(L.Provider,{value:c},i.createElement(O.Provider,{children:t,value:g}))}function qt({children:e,location:t}){return rt(X(e),t)}function X(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,X(n.props.children,o));return}R(n.type===mt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),R(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=X(n.props.children,o)),r.push(l)}),r}var V="get",j="application/x-www-form-urlencoded";function J(e){return e!=null&&typeof e.tagName=="string"}function gt(e){return J(e)&&e.tagName.toLowerCase()==="button"}function vt(e){return J(e)&&e.tagName.toLowerCase()==="form"}function wt(e){return J(e)&&e.tagName.toLowerCase()==="input"}function xt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Rt(e,t){return e.button===0&&(!t||t==="_self")&&!xt(e)}var _=null;function Et(){if(_===null)try{new FormData(document.createElement("form"),0),_=!1}catch{_=!0}return _}var Ct=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q(e){return e!=null&&!Ct.has(e)?(P(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${j}"`),null):e}function bt(e,t){let r,n,a,o,l;if(vt(e)){let c=e.getAttribute("action");n=c?k(c,t):null,r=e.getAttribute("method")||V,a=q(e.getAttribute("enctype"))||j,o=new FormData(e)}else if(gt(e)||wt(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(n=u?k(u,t):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||V,a=q(e.getAttribute("formenctype"))||q(c.getAttribute("enctype"))||j,o=new FormData(c,e),!Et()){let{name:s,type:f,value:d}=e;if(f==="image"){let m=s?`${s}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}
12else s&&o.append(s,d)}}else{if(J(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=V,n=null,a=j,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function te(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pt(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&k(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Lt(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function St(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function kt(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await Lt(o,r);return l.links?l.links():[]}return[]}));return Nt(n.flat(1).filter(St).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function ue(e,t,r,n,a,o){let l=(u,s)=>r[s]?u.route.id!==r[s].route.id:!0,c=(u,s)=>{var f;return r[s].pathname!==u.pathname||((f=r[s].route.path)==null?void 0:f.endsWith("*"))&&r[s].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,s)=>l(u,s)||c(u,s)):o==="data"?t.filter((u,s)=>{var d;let f=n.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(l(u,s)||c(u,s))return!0;if(u.route.shouldRevalidate){let m=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function $t(e,t,{includeHydrateFallback:r}={}){return Ft(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Ft(e){return[...new Set(e)]}function It(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Nt(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(It(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function xe(){let e=i.useContext(T);return te(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Tt(){let e=i.useContext(K);return te(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var re=i.createContext(void 0);re.displayName="FrameworkContext";function Re(){let e=i.useContext(re);return te(e,"You must render this element inside a <HydratedRouter> element"),e}function Dt(e,t){let r=i.useContext(re),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:s,onMouseLeave:f,onTouchStart:d}=t,m=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=y=>{y.forEach(x=>{l(x.isIntersecting)})},h=new IntersectionObserver(w,{threshold:.5});return m.current&&h.observe(m.current),()=>{h.disconnect()}}},[e]),i.useEffect(()=>{if(n){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[n]);let g=()=>{a(!0)},v=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:B(c,g),onBlur:B(u,v),onMouseEnter:B(s,g),onMouseLeave:B(f,v),onTouchStart:B(d,g)}]:[!1,m,{}]}function B(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Bt({page:e,...t}){let{router:r}=xe(),n=i.useMemo(()=>se(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?i.createElement(Ot,{page:e,matches:n,...t}):null}function Mt(e){let{manifest:t,routeModules:r}=Re(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return kt(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function Ot({page:e,matches:t,...r}){let n=F(),{manifest:a,routeModules:o}=Re(),{basename:l}=xe(),{loaderData:c,matches:u}=Tt(),s=i.useMemo(()=>ue(e,t,u,a,n,"data"),[e,t,u,a,n]),f=i.useMemo(()=>ue(e,t,u,a,n,"assets"),[e,t,u,a,n]),d=i.useMemo(()=>
12{if(e===n.pathname+n.search+n.hash)return[];let v=new Set,w=!1;if(t.forEach(y=>{var p;let x=a.routes[y.route.id];!x||!x.hasLoader||(!s.some(E=>E.route.id===y.route.id)&&y.route.id in c&&((p=o[y.route.id])!=null&&p.shouldRevalidate)||x.hasClientLoader?w=!0:v.add(y.route.id))}),v.size===0)return[];let h=Pt(e,l,"data");return w&&v.size>0&&h.searchParams.set("_routes",t.filter(y=>v.has(y.route.id)).map(y=>y.route.id).join(",")),[h.pathname+h.search]},[l,c,n,a,s,t,e,o]),m=i.useMemo(()=>$t(f,a),[f,a]),g=Mt(f);return i.createElement(i.Fragment,null,d.map(v=>i.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...r})),m.map(v=>i.createElement("link",{key:v,rel:"modulepreload",href:v,...r})),g.map(({key:v,link:w})=>i.createElement("link",{key:v,nonce:r.nonce,...w})))}function At(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ee=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ee&&(window.__reactRouterVersion="7.9.5")}catch{}function Gt({basename:e,children:t,window:r}){let n=i.useRef();n.current==null&&(n.current=Le({window:r,v5Compat:!0}));let a=n.current,[o,l]=i.useState({action:a.action,location:a.location}),c=i.useCallback(u=>{i.startTransition(()=>l(u))},[l]);return i.useLayoutEffect(()=>a.listen(c),[a,c]),i.createElement(yt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var Ce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,be=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,state:c,target:u,to:s,preventScrollReset:f,viewTransition:d,...m},g){let{basename:v}=i.useContext(L),w=typeof s=="string"&&Ce.test(s),h,y=!1;if(typeof s=="string"&&w&&(h=s,Ee))try{let b=new URL(window.location.href),I=s.startsWith("//")?new URL(b.protocol+s):new URL(s),ne=k(I.pathname,v);I.origin===b.origin&&ne!=null?s=ne+I.search+I.hash:y=!0}catch{P(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Ze(s,{relative:a}),[p,E,C]=Dt(n,m),U=_t(s,{replace:l,state:c,target:u,preventScrollReset:f,relative:a,viewTransition:d});function D(b){t&&t(b),b.defaultPrevented||U(b)}let H=i.createElement("a",{...m,...C,href:h||x,onClick:y||o?t:D,ref:At(g,E),target:u,"data-discover":!w&&r==="render"?"true":void 0});return p&&!w?i.createElement(i.Fragment,null,H,i.createElement(Bt,{page:x})):H});be.displayName="Link";var Wt=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:c,children:u,...s},f){let d=W(l,{relative:s.relative}),m=F(),g=i.useContext(K),{navigator:v,basename:w}=i.useContext(L),h=g!=null&&Jt(d)&&c===!0,y=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,x=m.pathname,p=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(x=x.toLowerCase(),p=p?p.toLowerCase():null,y=y.toLowerCase()),p&&w&&(p=k(p,w)||p);const E=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let C=x===y||!a&&x.startsWith(y)&&x.charAt(E)==="/",U=p!=null&&(p===y||!a&&p.startsWith(y)&&p.charAt(y.length)==="/"),D={isActive:C,isPending:U,isTransitioning:h},H=C?t:void 0,b;typeof n=="function"?b=n(D):b=[n,C?"active":null,U?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let I=typeof o=="function"?o(D):o;return i.createElement(be,{...s,"aria-current":H,className:b,ref:f,style:I,to:l,viewTransition:c},typeof u=="function"?u(D):u)});Wt.displayName="NavLink";var Ut=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=V,action:c,onSubmit:u,relative:s,preventScrollReset:f,viewTransition:d,...m},g)=>{let v=zt(),w=Kt(c,{relative:s}),h=l.toLowerCase()==="get"?"get":"post",y=typeof c=="string"&&Ce.test(c),x=p=>{if(u&&u(p),p.defaultPrevented)return;p.preventDefault();let E=p.nativeEvent.submitter,C=(E==null?void 0:E.getAttribute("formmethod"))||l;v(E||p.currentTarget,{fetcherKey:t,method:C,navigate:r,replace:a,state:o,relative:s,preventScrollReset:f,viewTransition:d})};return i.createElement("form",{ref:g,method:h,action:w,onSubmit:n?u:x,...m,"data-discover":!y&&e==="render"?"true":void 0})});Ut.displayName="Form";function Ht(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pe(e){let t=i.useContext(T);return R(t,Ht(e)),t}function _t(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:l}={}){let c=et(),u=F(),s=W(e,{relative:o});return i.useCallback(f=>{if(Rt(f,t)){f.preventDefault();let d=r!==void 0?r:M(u)===M(s);c(e,{replace:d,state:n,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,s,r,n,t,e,a,o,l])}var Vt=0,jt=()=>`__${String(++Vt)}__`;function zt(){let{router:e}=Pe("useSubmit"),{basename:t}=i.useContext(L),r=ft();return i.useCallback(async(n,a={})=>{let{action:o,method:l,encType:c,formData:u,body:s}=bt(n,t);if(a.navigate===!1){let f=a.fetcherKey||jt();await e.fetch(f,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:u,body:s,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:u,body:s,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Kt(e,{relative:t}={}){let{basename:r}=i.useContext(L),n=i.useContext($);R(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...W(e||".",{relative:t})},l=F();if(e==null){o.search=l.search;let c=new URLSearchParams(o.search),u=c.getAll("index");if(u.some(f=>f==="")){c.delete("index"),u.filter(d=>
12d).forEach(d=>c.append("index",d));let f=c.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:S([r,o.pathname])),M(o)}function Jt(e,{relative:t}={}){let r=i.useContext(me);R(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Pe("useViewTransitionState"),a=W(e,{relative:t});if(!r.isTransitioning)return!1;let o=k(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=k(r.nextLocation.pathname,n)||r.nextLocation.pathname;return z(a.pathname,l)!=null||z(a.pathname,o)!=null}export{Gt as B,be as L,qt as R,mt as a,F as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.