PageSourceSearch

https://southliu.github.io/assets/js/[email protected]_react-d_baab528766f60cc2302fdb247715e15d.3nh8-BRl.js

js southliu.github.io collected 2026-10-03 09:58:44 UTC 35,489 bytes, 1 lines download raw bytes

1import{a as e}from"./[email protected]";import"./[email protected][email protected]";var t="popstate";function n(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function a(e={}){return function(e,a,o,s={}){let{window:c=document.defaultView,v5Compat:h=!1}=s,d=c.history,p="POP",m=null,f=v();null==f&&(f=0,d.replaceState({...d.state,idx:f},""));function v(){return(d.state||{idx:null}).idx}function g(){p="POP";let e=v(),t=null==e?null:e-f;f=e,m&&m({action:p,location:R.location,delta:t})}function y(e,t){p="PUSH";let a=n(e)?e:l(R.location,e,t);o&&o(a,e),f=v()+1;let r=i(a,f),u=R.createHref(a.mask||a);try{d.pushState(r,"",u)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;c.location.assign(u)}h&&m&&m({action:p,location:R.location,delta:1})}function w(e,t){p="REPLACE";let a=n(e)?e:l(R.location,e,t);o&&o(a,e),f=v();let r=i(a,f),u=R.createHref(a.mask||a);d.replaceState(r,"",u),h&&m&&m({action:p,location:R.location,delta:0})}function b(e){return function(e,t,n=!1){let a="http://localhost";e&&(a="null"!==e.location.origin?e.location.origin:e.location.href);r(a,"No window.location.(origin|href) available to create URL");let o="string"==typeof t?t:u(t);o=o.replace(/ $/,"%20"),!n&&o.startsWith("//")&&(o=a+o);return new URL(o,a)}(c,e)}let R={get action(){return p},get location(){return e(c,d)},listen(e){if(m)throw new Error("A history only accepts one active listener");return c.addEventListener(t,g),m=e,()=>{c.removeEventListener(t,g),m=null}},createHref:e=>a(c,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:y,replace:w,go:e=>d.go(e)};return R}(function(e,t){let{pathname:n="/",search:a="",hash:r=""}=s(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),l("",{pathname:n,search:a,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");a=-1===n?t:t.slice(0,n)}return a+"#"+("string"==typeof t?t:u(t))},function(e,t){o("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push(".concat(JSON.stringify(t),")"))},e)}function r(e,t){if(!1===e||null==e)throw new Error(t)}function o(e,t){if(!e)try{throw new Error(t)}catch(n){}}function i(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function l(e,t,n=null,a,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?s(t):t,state:n,key:t&&t.key||a||Math.random().toString(36).substring(2,10),mask:r}}function u({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function s(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function c(e,t,n="/"){return function(e,t,n,a){let r="string"==typeof t?s(t):t,i=x(r.pathname||"/",n);if(null==i)return null;let l=function(e){let t=h(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),u=null,c=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return o(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}(i);for(let o=0;null==u&&o<l.length;++o)u=R(l[o],c,a);return u}(e,t,n,!1)}function h(e,t=[],n=[],a="",o=!1){let i=(e,i,l=o,u)=>{let s={relativePath:void 0===u?e.path||"":u,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(a)&&l)return;r(s.relativePath.startsWith(a),'Absolute route path "'.concat(s.relativePath,'" nested under path "').concat(a,'" is not val
1id. An absolute child route path must start with the combined path of all its parent routes.')),s.relativePath=s.relativePath.slice(a.length)}let c=O([a,s.relativePath]),d=n.concat(s);e.children&&e.children.length>0&&(r(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),h(e.children,t,d,c,l)),(null!=e.path||e.index)&&t.push({path:c,score:b(c,e.index),routesMeta:d})};return e.forEach((e,t)=>{var n;if(""!==e.path&&(null==(n=e.path)?void 0:n.includes("?")))for(let a of d(e.path))i(e,t,!0,a);else i(e,t)}),t}function d(e){let t=e.split("/");if(0===t.length)return[];let[n,...a]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===a.length)return r?[o,""]:[o];let i=d(a.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),r&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var p=/^:[\w-]+$/,m=3,f=2,v=1,g=10,y=-2,w=e=>"*"===e;function b(e,t){let n=e.split("/"),a=n.length;return n.some(w)&&(a+=y),t&&(a+=f),n.filter(e=>!w(e)).reduce((e,t)=>e+(p.test(t)?m:""===t?v:g),a)}function R(e,t,n=!1){let{routesMeta:a}=e,r={},o="/",i=[];for(let l=0;l<a.length;++l){let e=a[l],u=l===a.length-1,s="/"===o?t:t.slice(o.length)||"/",c=E({path:e.relativePath,caseSensitive:e.caseSensitive,end:u},s),h=e.route;if(!c&&u&&n&&!a[a.length-1].route.index&&(c=E({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},s)),!c)return null;
1Object.assign(r,c.params),i.push({params:r,pathname:O([o,c.pathname]),pathnameBase:N(O([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=O([o,c.pathnameBase]))}return i}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=function(e,t=!1,n=!0){o("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,r,o)=>{if(a.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(r+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(a.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))");let i=new RegExp(r,t?void 0:"i");return[i,a]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),u=r.slice(1);return{params:a.reduce((e,{paramName:t,isOptional:n},a)=>{if("*"===t){let e=u[a]||"";l=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const r=u[a];return e[t]=n&&!r?void 0:(r||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:l,pattern:e}}function x(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}var S=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function C(e,t){let n=A(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function k(e,t,n,a){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(a),"].  Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function L(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function T(e,t,n,a=!1){let o;"string"==typeof e?o=s(e):(o={...e},r(!o.pathname||!o.pathname.includes("?"),k("?","pathname","search",o)),r(!o.pathname||!o.pathname.includes("#"),k("#","pathname","hash",o)),r(!o.search||!o.search.includes("#"),k("#","search","hash",o)));let i,l=""===e||""===o.pathname,u=l?"/":o.pathname;if(null==u)i=n;else{let e=t.length-1;if(!a&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:a,search:r="",hash:o=""}="string"==typeof e?s(e):e;return a?(a=P(a),n=a.startsWith("/")?C(a.substring(1),"/"):C(a,t)):n=t,{pathname:n,search:M(r),hash:D(o)}}(o,i),h=u&&"/"!==u&&u.endsWith("/"),d=(l||"."===u)&&n.endsWith("/");return c.pathname.endsWith("/")||!h&&!d||(c.pathname+="/"),c}var P=e=>e.replace(/\/\/+/g,"/"),O=e=>P(e.join("/")),A=e=>e.replace(/\/+$/,""),N=e=>A(e).replace(/^\/*/,"/"),M=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",U=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function j(e){let t=e.map(e=>e.route.path).filter(Boolean);return O(t)||"/"}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function F(e,t){let n=e;if("string"!=typeof n||!S.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,r=!1;if(W)try{let e=new URL(window.location.href),a=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=x(a.pathname,t);a.origin===e.origin&&null!=o?n=o+a.search+a.hash:r=!0}catch(i){o(!1,'<Link to="'.concat(n,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:a,isExternal:r,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _=["POST","PUT","PATCH","DELETE"];new Set(_);var $=["GET",..._];new Set($);var B=e.createContext(null);B.displayName="DataRouter";var I=e.createContext(null);I.displayName="DataRouterState";var H=e.createContext(!1);var z=e.createContext({isTransitioning:!1});z.displayName="ViewTransition",e.createContext(new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var J=e.createContext(null);J.displayName="Navigation";var Y=e.createContext(null);Y.displayName="Location";var q=e.createContext({outlet:null,matches:[],isDataRoute:!1});q.displayName="Route";var K=e.createContext(null);K.displayName="RouteError";var V="REACT_ROUTER_ERROR";function G(){return null!=e.useContext(Y)}function X(){return r(G(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(Y).location}var Q="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z(t){e.useContext(J).static||e.useLayoutEffect(t)}function ee(){let{isDataRoute:t}=e.useContext(q);return t?function(){let{router:t}=function(t){let n=e.useContext(B);return r(n,pe(t)),n}("useNavigate"),n=me("useNavigate"),a=e.useRef(!1);return Z(()=>{a.current=!0}),e.useCallback(async(e,r={})=>{o(a.current,Q),a.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...r}))},[t,n])}():function(){r(G(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(B),{basename:n,navigator:a}=e.useContext(J),{matches:i}=e.useContext(q),{pathname:l}=X(),u=JSON.stringify(L(i)),s=e.useRef(!1);return Z(()=>{s.current=!0}),e.useCallback((e,r={})=>
1{if(o(s.current,Q),!s.current)return;if("number"==typeof e)return void a.go(e);let i=T(e,JSON.parse(u),l,"path"===r.relative);null==t&&"/"!==n&&(i.pathname="/"===i.pathname?n:O([n,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)},[n,a,u,l,t])}()}var te=e.createContext(null);function ne(t){let n=e.useContext(q).outlet;return e.useMemo(()=>n&&e.createElement(te.Provider,{value:t},n),[n,t])}function ae(){var t;let{matches:n}=e.useContext(q),a=n[n.length-1];return null!=(t=null==a?void 0:a.params)?t:{}}function re(t,{relative:n}={}){let{matches:a}=e.useContext(q),{pathname:r}=X(),o=JSON.stringify(L(a));return e.useMemo(()=>T(t,JSON.parse(o),r,"path"===n),[t,o,r,n])}function oe(e,t){return ie(e)}function ie(t,n,a){r(G(),"useRoutes() may be used only in the context of a <Router> component.");let i,{navigator:l}=e.useContext(J),{matches:u}=e.useContext(q),s=u[u.length-1],h=s?s.params:{},d=s?s.pathname:"/",p=s?s.pathnameBase:"/",m=s&&s.route;{let e=m&&m.path||"";ve(d,!m||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}i=X();let f=i.pathname||"/",v=f;if("/"!==p){let e=p.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=a&&a.state.matches.length?a.state.matches.map(e=>Object.assign(e,{route:a.manifest[e.route.id]||e.route})):c(t,{pathname:v});o(m||null!=g,'No routes matched location "'.concat(i.pathname).concat(i.search).concat(i.hash,'" ')),o(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,'Matched leaf route at location "'.concat(i.pathname).concat(i.search).concat(i.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=function(t,n=[],a){let o=null==a?void 0:a.state;if(null==t){if(!o)return null;if(o.errors)t=o.matches;else{if(0!==n.length||o.initialized||!(o.matches.length>0))return null;t=o.matches}}let i=t,l=null==o?void 0:o.errors;if(null!=l){let e=i.findIndex(e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id]));r(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(l).join(","))),i=i.slice(0,Math.min(i.length,e+1))}let u=!1,s=-1;if(a&&o){u=o.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:n}=o,r=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||r){a.isStatic&&(u=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=null==a?void 0:a.onError,h=o&&c?(e,t)=>{var n,a,r;c(e,{location:o.location,params:null!=(r=null==(a=null==(n=o.matches)?void 0:n[0])?void 0:a.params)?r:{},pattern:j(o.matches),errorInfo:t})}:void 0;return i.reduceRight((t,a,r)=>{let c,d=!1,p=null,m=null;o&&(c=l&&a.route.id?l[a.route.id]:void 0,p=a.route.errorElement||ue,u&&(s<0&&0===r?(ve("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,m=null):s===r&&(d=!0,m=a.route.hydrateFallbackElement||null)));let f=n.concat(i.slice(0,r+1)),v=()=>{let n;return n=c?p:d?m:a.route.Component?e.createElement(a.route.Component,null):a.route.element?a.route.element:t,e.createElement(de,{match:a,routeContext:{outlet:t,matches:f,isDataRoute:null!=o},children:n})};return o&&(a.route.ErrorBoundary||a.route.errorElement||0===r)?e.createElement(se,{location:o.location,revalidation:o.revalidation,component:p,error:c,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:h}):v()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},h,e.params),pathname:O([p,l.encodeLocation?l.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:O([p,l.encodeLocation?l.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),u,a);return y}function le(){let t=function(){var t;let n=e.useContext(K),a=function(t){let n=e.useContext(I);return r(n,pe(t)),n}("useRouteError"),o=me("useRouteError");
1if(void 0!==n)return n;return null==(t=a.errors)?void 0:t[o]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?"".concat(t.status," ").concat(t.statusText):t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},l={padding:"2px 4px",backgroundColor:o},u=null;return u=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:l},"ErrorBoundary")," or"," ",e.createElement("code",{style:l},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),a?e.createElement("pre",{style:i},a):null,u)}var ue=e.createElement(le,null),se=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith("".concat(V,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new U(t.status,t.statusText,t.data)}catch(t){}}(t.digest);e&&(t=e)}let n=void 0!==t?e.createElement(q.Provider,{value:this.props.routeContext},e.createElement(K.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?e.createElement(he,{error:t},n):n}};se.contextType=H;var ce=new WeakMap;function he({children:t,error:n}){let{basename:a}=e.useContext(J);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith("".concat(V,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch(t){}}(n.digest);if(t){let r=ce.get(n);if(r)throw r;let o=F(t.location,a);if(W&&!ce.get(n)){if(!o.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:t.replace}));throw ce.set(n,e),e}window.location.href=o.absoluteURL||o.to}return e.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(o.absoluteURL||o.to)})}}return t}function de({routeContext:t,match:n,children:a}){let r=e.useContext(B);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(q.Provider,{value:t},a)}function pe(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function me(t){let n=function(t){let n=e.useContext(q);return r(n,pe(t)),n}(t),a=n.matches[n.matches.length-1];return r(a.route.id,"".concat(t,' can only be used on routes that contain a unique "id"')),a.route.id}var fe={};function ve(e,t,n){t||fe[e]||(fe[e]=!0,o(!1,n))}function ge({basename:t="/",children:n=null,location:a,navigationType:i="POP",navigator:l,static:u=!1,useTransitions:c}){r(!G(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),d=e.useMemo(()=>({basename:h,navigator:l,static:u,useTransitions:c,future:{}}),[h,l,u,c]);"string"==typeof a&&(a=s(a));let{pathname:p="/",search:m="",hash:f="",state:v=null,key:g="default",mask:y}=a,w=e.useMemo(()=>{let e=x(p,h);
1return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g,mask:y},navigationType:i}},[h,p,m,f,v,g,i,y]);return o(null!=w,'<Router basename="'.concat(h,'"> is not able to match the URL "').concat(p).concat(m).concat(f,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==w?null:e.createElement(J.Provider,{value:d},e.createElement(Y.Provider,{children:n,value:w}))}e.memo(function({routes:e,manifest:t,future:n,state:a,isStatic:r,onError:o}){return ie(e,0,{manifest:t,state:a,isStatic:r,onError:o})});var ye="get",we="application/x-www-form-urlencoded";function be(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Re(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(e=>[n,e]):[[n,a]])},[]))}var Ee=null;var xe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Se(e){return null==e||xe.has(e)?e:(o(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(we,'"')),null)}function Ce(e,t){let n,a,r,o,i;if(be(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");a=i?x(i,t):null,n=e.getAttribute("method")||ye,r=Se(e.getAttribute("enctype"))||we,o=new FormData(e)}else if(function(e){return be(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return be(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(a=l?x(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||ye,r=Se(e.getAttribute("formenctype"))||Se(i.getAttribute("enctype"))||we,o=new FormData(i,e),!function(){if(null===Ee)try{new FormData(document.createElement("form"),0),Ee=!1}catch(e){Ee=!0}return Ee}()){let{name:t,type:n,value:a}=e;if("image"===n){let e=t?"".concat(t,"."):"";o.append("".concat(e,"x"),"0"),o.append("".concat(e,"y"),"0")}else t&&o.append(t,a)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ye,a=null,r=we,i=e}var l;return o&&"text/plain"===r&&(i=o,o=void 0),{action:a,method:n.toLowerCase(),encType:r,formData:o,body:i}}function ke(e,t){if(!1===e||null==e)throw new Error(t)}function Le(e,t,n,a){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?r.pathname.endsWith("/")?r.pathname="".concat(r.pathname,"_.").concat(a):r.pathname="".concat(r.pathname,".").concat(a):"/"===r.pathname?r.pathname="_root.".concat(a):t&&"/"===x(r.pathname,t)?r.pathname="".concat(A(t),"/_root.").concat(a):r.pathname="".concat(A(r.pathname),".").concat(a),r}function Te(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Pe(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}(t));return n.has(a)||(n.add(a),e.push({key:a,link:t})),e},[])}((await Promise.all(e.map(async e=>{let a=t.routes[e.route.id];if(a){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(a,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Te).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Oe(e,t,n,a,r,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>
1{var a;return n[t].pathname!==e.pathname||(null==(a=n[t].route.path)?void 0:a.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{var u;let s=a.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:(null==(u=n[0])?void 0:u.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof a)return a}return!0}):[]}function Ae(e,t,{includeHydrateFallback:n}={}){return a=e.map(e=>{let a=t.routes[e.route.id];if(!a)return[];let r=[a.module];return a.clientActionModule&&(r=r.concat(a.clientActionModule)),a.clientLoaderModule&&(r=r.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(r=r.concat(a.hydrateFallbackModule)),a.imports&&(r=r.concat(a.imports)),r}).flat(1),[...new Set(a)];var a}function Ne(){let t=e.useContext(B);return ke(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Me=e.createContext(void 0);function De(){let t=e.useContext(Me);return ke(t,"You must render this element inside a <HydratedRouter> element"),t}function Ue(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function je({page:t,...n}){let a=e.useContext(H),{router:r}=Ne(),o=e.useMemo(()=>c(r.routes,t,r.basename),[r.routes,t,r.basename]);return o?a?e.createElement(We,{page:t,matches:o,...n}):e.createElement(Fe,{page:t,matches:o,...n}):null}function We({page:t,matches:n,...a}){let r=X(),{future:o}=De(),{basename:i}=Ne(),l=e.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=Le(t,i,o.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,l=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?a=!0:l.push(t.route.id);return a&&l.length>0&&e.searchParams.set("_routes",l.join(",")),[e.pathname+e.search]},[i,o.v8_trailingSlashAwareDataRequests,t,r,n]);return e.createElement(e.Fragment,null,l.map(t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...a})))}function Fe({page:t,matches:n,...a}){let r=X(),{future:o,manifest:i,routeModules:l}=De(),{basename:u}=Ne(),{loaderData:s,matches:c}=function(){let t=e.useContext(I);return ke(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}(),h=e.useMemo(()=>Oe(t,n,c,i,r,"data"),[t,n,c,i,r]),d=e.useMemo(()=>Oe(t,n,c,i,r,"assets"),[t,n,c,i,r]),p=e.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=new Set,a=!1;if(n.forEach(t=>{var n;let r=i.routes[t.route.id];r&&r.hasLoader&&(!h.some(e=>e.route.id===t.route.id)&&t.route.id in s&&(null==(n=l[t.route.id])?void 0:n.shouldRevalidate)||r.hasClientLoader?a=!0:e.add(t.route.id))}),0===e.size)return[];let c=Le(t,u,o.v8_trailingSlashAwareDataRequests,"data");return a&&e.size>0&&c.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[u,o.v8_trailingSlashAwareDataRequests,s,r,i,h,n,t,l]),m=e.useMemo(()=>Ae(d,i),[d,i]),f=function(t){let{manifest:n,routeModules:a}=De(),[r,o]=e.useState([]);return e.useEffect(()=>{let e=!1;return Pe(t,n,a).then(t=>{e||o(t)}),()=>{e=!0}},[t,n,a]),r}(d);return e.createElement(e.Fragment,null,p.map(t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...a})),m.map(t=>e.createElement("link",{key:t,rel:"modulepreload",href:t,...a})),f.map(({key:t,link:n})=>{var r;return e.createElement("link",{key:t,nonce:a.nonce,...n,crossOrigin:null!=(r=n.crossOrigin)?r:a.crossOrigin})}))}function _e(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Me.displayName="FrameworkContext";var $e="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{$e&&(window.__reactRouterVersion="7.17.0")}catch(Ke){}function Be({basename:t,children:n,useTransitions:r,window:o}){let i=e.useRef();null==i.current&&(i.current=a({window:o,v5Compat:!0}));let l=i.current,[u,s]=e.useState({action:l.action,location:l.location}),c=e.useCallback(t=>{!1===r?s(t):e.startTransition(()=>s(t))},[r]);return e.useLayoutEffect(()=>l.listen(c),[l,c]),e.createElement(ge,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,useTransitions:r})}var Ie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,He=e.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:o,reloadDocument:i,replace:l,mask:s,state:c,target:h,to:d,preventScrollReset:p,viewTransition:m,defaultShouldRevalidate:f,...v},g){let{basename:y,navigator:w,useTransitions:b}=e.useContext(J),R="string"==typeof d&&Ie.test(d),E=F(d,y),x=function(t,{relative:n}={}){r(G(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=e.useContext(J),{hash:i,pathname:l,search:u}=re(t,{relative:n}),s=l;return"/"!==a&&(s="/"===l?a:O([a,l])),o.createHref({pathname:s,search:u,hash:i})}(d=E.to,{relative:o}),S=X(),C=null;if(s){let e=T(s,[],S.mask?S.mask.pathname:"/",!0);"/"!==y&&(e.pathname="/"===e.pathname?y:O([y,e.pathname])),C=w.createHref(e)}let[k,L,P]=function(t,n){let a=e.useContext(Me),[r,o]=e.useState(!1),[i,l]=e.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:h,onTouchStart:d}=n,p=e.useRef(null);e.useEffect(()=>{if("render"===t&&l(!0),"viewport"===t){let e=new IntersectionObserver(e=>
1{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(r){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{o(!0)},f=()=>{o(!1),l(!1)};return a?"intent"!==t?[i,p,{}]:[i,p,{onFocus:Ue(u,m),onBlur:Ue(s,f),onMouseEnter:Ue(c,m),onMouseLeave:Ue(h,f),onTouchStart:Ue(d,m)}]:[!1,p,{}]}(a,v),A=function(t,{target:n,replace:a,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:c,useTransitions:h}={}){let d=ee(),p=X(),m=re(t,{relative:l});return e.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,n)){f.preventDefault();let n=void 0!==a?a:u(p)===u(m),v=()=>d(t,{replace:n,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:c});h?e.startTransition(()=>v()):v()}},[p,d,m,a,r,o,n,t,i,l,s,c,h])}(d,{replace:l,mask:s,state:c,target:h,preventScrollReset:p,relative:o,viewTransition:m,defaultShouldRevalidate:f,useTransitions:b});let N=!(E.isExternal||i),M=e.createElement("a",{...v,...P,href:(N?C:void 0)||E.absoluteURL||x,onClick:N?function(e){t&&t(e),e.defaultPrevented||A(e)}:t,ref:_e(g,L),target:h,"data-discover":R||"render"!==n?void 0:"true"});return k&&!R?e.createElement(e.Fragment,null,M,e.createElement(je,{page:x})):M});function ze(t){let n=e.useContext(B);return r(n,function(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}(t)),n}function Je(t){o("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=e.useRef(Re(t)),a=e.useRef(!1),r=X(),i=e.useMemo(()=>function(e,t){let n=Re(e);return t&&t.forEach((e,a)=>{n.has(a)||t.getAll(a).forEach(e=>{n.append(a,e)})}),n}(r.search,a.current?null:n.current),[r.search]),l=ee(),u=e.useCallback((e,t)=>{const n=Re("function"==typeof e?e(new URLSearchParams(i)):e);a.current=!0,l("?"+n,t)},[l,i]);return[i,u]}He.displayName="Link",e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:o=!1,style:i,to:l,viewTransition:u,children:s,...c},h){let d=re(l,{relative:c.relative}),p=X(),m=e.useContext(I),{navigator:f,basename:v}=e.useContext(J),g=null!=m&&function(t,{relative:n}={}){let a=e.useContext(z);r(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ze("useViewTransitionState"),i=re(t,{relative:n});if(!a.isTransitioning)return!1;let l=x(a.currentLocation.pathname,o)||a.currentLocation.pathname,u=x(a.nextLocation.pathname,o)||a.nextLocation.pathname;return null!=E(i.pathname,u)||null!=E(i.pathname,l)}(d)&&!0===u,y=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,w=p.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(w=w.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=x(b,v)||b);const R="/"!==y&&y.endsWith("/")?y.length-1:y.length;let S,C=w===y||!o&&w.startsWith(y)&&"/"===w.charAt(R),k=null!=b&&(b===y||!o&&b.startsWith(y)&&"/"===b.charAt(y.length)),L={isActive:C,isPending:k,isTransitioning:g},T=C?t:void 0;S="function"==typeof a?a(L):[a,C?"active":null,k?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let P="function"==typeof i?i(L):i;return e.createElement(He,{...c,"aria-current":T,className:S,ref:h,style:P,to:l,viewTransition:u},"function"==typeof s?s(L):s)}).displayName="NavLink",e.forwardRef(({discover:t="render",fetcherKey:n,navigate:a,reloadDocument:o,replace:i,state:l,method:s=ye,action:c,onSubmit:h,relative:d,preventScrollReset:p,viewTransition:m,defaultShouldRevalidate:f,...v},g)=>{let{useTransitions:y}=e.useContext(J),w=function(){let{router:t}=ze("useSubmit"),{basename:n}=e.useContext(J),a=me("useRouteId"),r=t.fetch,o=t.navigate;return e.useCallback(async(e,t={})=>{let{action:i,method:l,encType:u,formData:s,body:c}=Ce(e,n);if(!1===t.navigate){let e=t.fetcherKey||qe();await r(e,a,t.action||i,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:s,body:c,formMethod:t.method||l,formEncType:t.encType||u,flushSync:t.flushSync})}else await o(t.action||i,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:s,body:c,formMethod:t.method||l,formEncType:t.encType||u,replace:t.replace,state:t.state,fromRouteId:a,flushSync:t.flushSync,viewTransition:t.viewTransition})}
1,[r,o,n,a])}(),b=function(t,{relative:n}={}){let{basename:a}=e.useContext(J),o=e.useContext(q);r(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),l={...re(t||".",{relative:n})},s=X();if(null==t){l.search=s.search;let e=new URLSearchParams(l.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();l.search=n?"?".concat(n):""}}t&&"."!==t||!i.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index");"/"!==a&&(l.pathname="/"===l.pathname?a:O([a,l.pathname]));return u(l)}(c,{relative:d}),R="get"===s.toLowerCase()?"get":"post",E="string"==typeof c&&Ie.test(c);return e.createElement("form",{ref:g,method:R,action:b,onSubmit:o?h:t=>{if(h&&h(t),t.defaultPrevented)return;t.preventDefault();let r=t.nativeEvent.submitter,o=(null==r?void 0:r.getAttribute("formmethod"))||s,u=()=>w(r||t.currentTarget,{fetcherKey:n,method:o,navigate:a,replace:i,state:l,relative:d,preventScrollReset:p,viewTransition:m,defaultShouldRevalidate:f});y&&!1!==a?e.startTransition(()=>u()):u()},...v,"data-discover":E||"render"!==t?void 0:"true"})}).displayName="Form";var Ye=0,qe=()=>"__".concat(String(++Ye),"__");export{Be as H,ee as a,ne as b,oe as c,ae as d,Je as e,X 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.