import{n as A,i as C,o as $,s as z,E as L}from"./chunk-UIGDSWPH-1hkfewjj.js";import{R as c}from"./index-BtyHvDgk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"8bd8bc3153d70a1c10ccde8d38796bd67282553d"}}catch{}})();var w={},R;function j(){if(R)return w;R=1,Object.defineProperty(w,"__esModule",{value:!0}),w.parse=d,w.serialize=E;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,o=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,l=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,u=(()=>{const r=function(){};return r.prototype=Object.create(null),r})();function d(r,s){const e=new u,f=r.length;if(f<2)return e;const g=s?.decode||y;let i=0;do{const h=r.indexOf("=",i);if(h===-1)break;const S=r.indexOf(";",i),x=S===-1?f:S;if(h>x){i=r.lastIndexOf(";",h-1)+1;continue}const v=p(r,i,h),_=m(r,h,v),b=r.slice(v,_);if(e[b]===void 0){let k=p(r,h+1,x),D=m(r,x,k);const O=g(r.slice(k,D));e[b]=O}i=x+1}while(i<f);return e}function p(r,s,e){do{const f=r.charCodeAt(s);if(f!==32&&f!==9)return s}while(++s<e);return e}function m(r,s,e){for(;s>e;){const f=r.charCodeAt(--s);if(f!==32&&f!==9)return s+1}return e}function E(r,s,e){const f=e?.encode||encodeURIComponent;if(!t.test(r))throw new TypeError(`argument name is invalid: ${r}`);const g=f(s);if(!o.test(g))throw new TypeError(`argument val is invalid: ${s}`);let i=r+"="+g;if(!e)return i;if(e.maxAge!==void 0){if(!Number.isInteger(e.maxAge))throw new TypeError(`option maxAge is invalid: ${e.maxAge}`);i+="; Max-Age="+e.maxAge}if(e.domain){if(!a.test(e.domain))throw new TypeError(`option domain is invalid: ${e.domain}`);i+="; Domain="+e.domain}if(e.path){if(!l.test(e.path))throw new TypeError(`option path is invalid: ${e.path}`);i+="; Path="+e.path}if(e.expires){if(!I(e.expires)||!Number.isFinite(e.expires.valueOf()))throw new TypeError(`option expires is invalid: ${e.expires}`);i+="; Expires="+e.expires.toUTCString()}if(e.httpOnly&&(i+="; HttpOnly"),e.secure&&(i+="; Secure"),e.partitioned&&(i+="; Partitioned"),e.priority)switch(typeof e.priority=="string"?e.priority.toLowerCase():void 0){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${e.priority}`)}if(e.sameSite)switch(typeof e.sameSite=="string"?e.sameSite.toLowerCase():e.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${e.sameSite}`)}return i}function y(r){if(r.indexOf("%")===-1)return r;try{return decodeURIComponent(r)}catch{return r}}function I(r){return n.call(r)==="[object Date]"}return w}j();[...A];function U(t,...o){let a=o[0],l=t.replace(/\/*\*?$/,"").replace(/\/:([\w-]+)(\?)?/g,(n,u,d)=>{const p=d===void 0,m=a?a[u]:void 0;if(p&&m===void 0)throw new Error(`Path '${t}' requires param '${u}' but it was not provided`);return m===void 0?"":"/"+m});if(t.endsWith("*")){const n=a?a["*"]:void 0;n!==void 0&&(l+="/"+n)}return l||"/"}new TextEncoder;(class extends c.Component{constructor(t){super(t),this.state={error:null,location:t.location}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,o){return o.location!==t.location?{error:null,location:t.location}:{error:o.error,location:o.location}}render(){return this.state.error?c.createElement(N,{error:this.state.error,renderAppShell:!0}):this.props.children}});function T({renderAppShell:t,title:o,children:a}){return t?c.createElement("html",{lang:"en"},c.createElement("head",null,c.createElement("meta",{charSet:"utf-8"}),c.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),c.createElement("title",null,o)),c.createElement("body",null,c.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a))):a}function N({error:t,renderAppShell:o}){console.error(t);let a=c.createElement("script",{dangerouslySetInnerHTML:{__html:`
        console.log(
          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
        );
      `}});if(C(t))return c.createElement(T,{renderAppShell:o,title:"Unhandled Thrown Response!"},c.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),a);let l;if(t instanceof Error)l=t;else{let n=t==null?"Unknown Error":typeof t=="object"&&"toString"in t?t.toString():JSON.stringify(t);l=new Error(n)}return c.createElement(T,{renderAppShell:o,title:"Application Error!"},c.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),c.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},l.stack),a)}function q(t){if(!t)return null;let o=Object.entries(t),a={};for(let[l,n]of o)if(n&&n.__type==="RouteErrorResponse")a[l]=new L(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let u=window[n.__subType];if(typeof u=="function")try{let d=new u(n.message);d.stack=n.stack,a[l]=d}catch{}}if(a[l]==null){let u=new Error(n.message);u.stack=n.stack,a[l]=u}}else a[l]=n;return a}function F({state:t,routes:o,getRouteInfo:a,location:l,basename:n,isSpaMode:u}){let d={...t,loaderData:{...t.loaderData}},p=$(o,l,n);if(p)for(let m of p){let E=m.route.id,y=a(E);z(E,y.clientLoader,y.hasLoader,u)&&(y.hasHydrateFallback||!y.hasLoader)?delete d.loaderData[E]:y.hasLoader||(d.loaderData[E]=null)}return d}export{q as d,F as g,U as h};
//# sourceMappingURL=chunk-JG3XND5A-O3iOO-XZ.js.map
