1import{r as Q,j as Ue,b as Fe}from"./jsx-runtime-Dt5Dsy05.js";import{v as k,w as R,x as Me,y as je,z as pe,B as V,C as Le,D as A,E as He,G as x,H as Ie,I as K,J as ze,K as Be,O as Ne,P as ne,Q as re,T as ye,U as Xe,V as Ve,W as We,X as Je,Y as Ge}from"./components-Cy9GxVgV.js";import{m as Ye,S as Qe,i as P,U as W,A as ge,s as Ke,E as Ze,T as qe}from"./index-CxoctWfC.js";/*! 2 * cookie 3 * Copyright(c) 2012-2014 Roman Shtylman 4 * Copyright(c) 2015 Douglas Christopher Wilson 5 * MIT Licensed 6 */var $e=ot,et=lt,tt=Object.prototype.toString,nt=Object.prototype.hasOwnProperty,rt=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,at=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,it=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,st=/^[\u0020-\u003A\u003D-\u007E]*$/;function ot(e,n){if(typeof e!="string")throw new TypeError("argument str must be a string");var t={},r=e.length;if(r<2)return t;var a=n&&n.decode||ut,i=0,o=0,s=0;do{if(o=e.indexOf("=",i),o===-1)break;if(s=e.indexOf(";",i),s===-1)s=r;else if(o>s){i=e.lastIndexOf(";",o-1)+1;continue}var l=ae(e,i,o),u=ie(e,o,l),c=e.slice(l,u);if(!nt.call(t,c)){var p=ae(e,o+1,s),d=ie(e,s,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var y=e.slice(p,d);t[c]=dt(y,a)}i=s+1}while(i<r);return t}function ae(e,n,t){do{var r=e.charCodeAt(n);if(r!==32&&r!==9)return n}while(++n<t);return t}function ie(e,n,t){for(;n>t;){var r=e.charCodeAt(--n);if(r!==32&&r!==9)return n+1}return t}function lt(e,n,t){var r=t&&t.encode||encodeURIComponent;if(typeof r!="function")throw new TypeError("option encode is invalid");if(!rt.test(e))throw new TypeError("argument name is invalid");var a=r(n);if(!at.test(a))throw new TypeError("argument val is invalid");var i=e+"="+a;if(!t)return i;if(t.maxAge!=null){var o=Math.floor(t.maxAge);if(!isFinite(o))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+o}if(t.domain){if(!it.test(t.domain))throw new TypeError("option domain is invalid");i+="; Domain="+t.domain}if(t.path){if(!st.test(t.path))throw new TypeError("option path is invalid");i+="; Path="+t.path}if(t.expires){var s=t.expires;if(!ct(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invali
6d");i+="; Expires="+s.toUTCString()}if(t.httpOnly&&(i+="; HttpOnly"),t.secure&&(i+="; Secure"),t.partitioned&&(i+="; Partitioned"),t.priority){var l=typeof t.priority=="string"?t.priority.toLowerCase():t.priority;switch(l){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")}}if(t.sameSite){var u=typeof t.sameSite=="string"?t.sameSite.toLowerCase():t.sameSite;switch(u){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i}function ut(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function ct(e){return tt.call(e)==="[object Date]"}function dt(e,n){try{return n(e)}catch{return e}}/** 7 * @remix-run/server-runtime v2.17.2 8 * 9 * Copyright (c) Remix Software Inc. 10 * 11 * This source code is licensed under the MIT license found in the 12 * LICENSE.md file in the root directory of this source tree. 13 * 14 * @license MIT 15 */const se={};function we(e,n){!e&&!se[n]&&(se[n]=!0,console.warn(n))}/** 16 * @remix-run/server-runtime v2.17.2 17 * 18 * Copyright (c) Remix Software Inc. 19 * 20 * This source code is licensed under the MIT license found in the 21 * LICENSE.md file in the root directory of this source tree. 22 * 23 * @license MIT 24 */const ht=({sign:e,unsign:n})=>(t,r={})=>{let{secrets:a=[],...i}={path:"/",sameSite:"lax",...r};return wt(t,i.expires),{get name(){return t},get isSigned(){return a.length>0},get expires(){return typeof i.maxAge<"u"?new Date(Date.now()+i.maxAge*1e3):i.expires},async parse(o,s){if(!o)return null;let l=$e(o,{...i,...s});return t in l?l[t]===""?"":await mt(n,l[t],a):null},async serialize(o,s){return et(t,o===""?"":await ft(e,o,a),{...i,...s})}}},Z=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function";async function ft(e,n,t){let r=pt(n);return t.length>0&&(r=await e(r,t[0])),r}async function mt(e,n,t){if(t.length>0){for(let r of t){let a=await e(n,r);if(a!==!1)return oe(a)}return null}return oe(n)}function pt(e){return btoa(gt(encodeURIComponent(JSON.stringify(e))))}function oe(e){try{return JSON.parse(decodeURIComponent(yt(atob(e))))}catch{return{}}}function yt(e){let n=e.toString(),t="",r=0,a,i;for(;r<n.length;)a=n.charAt(r++),/[\w*+\-./@]/.exec(a)?t+=a:(i=a.charCodeAt(0),i<256?t+="%"+le(i,2):t+="%u"+le(i,4).toUpperCase());return t}function le(e,n){let t=e.toString(16);for(;t.length<n;)t="0"+t;return t}function gt(e){let n=e.toString(),t="",r=0,a,i;for(;r<n.length;){if(a=n.charAt(r++),a==="%"){if(n.charAt(r)==="u"){if(i=n.slice(r+1,r+5),/^[\da-f]{4}$/i.exec(i)){t+=String.fromCharCode(parseInt(i,16)),r+=5;continue}}else if(i=n.slice(r,r+2),/^[\da-f]{2}$/i.exec(i)){t+=String.fromCharCode(parseInt(i,16)),r+=2;continue}}t+=a}return t}function wt(e,n){we(!n,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}function U(e){const n=unescape(encodeURIComponent(e));return Uint8Array.from(n,(t,r)=>n.charCodeAt(r))}function vt(e){const n=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(n))}function O(...e){const n=new Uint8Array(e.reduce((r,a)=>r+a.length,0));let t=0;for(const r of e)n.set(r,t),t+=r.length;return n}function St(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function ue(e){return e instanceof Uint8Array?n=>e[n]:e}function B(e,n,t,r,a){const i=ue(e),o=ue(t);for(let s=0;s<a;++s)if(i(n+s)!==o(r+s))return!1;return!0}function _t(e){const n=new Array(256).fill(e.length);if(e.length>1)for(let t=0;t<e.length-1;t++)n[e[t]]=e.length-1-t;return n}const _=Symbol("Match");class q{constructor(n){this._lookbehind=new Uint8Array,typeof n=="string"?this._needle=n=U(n):this._needle=n,this._lastChar=n[n.length-1],this._occ=_t(n)}feed(n){let t=0,r;const a=[];for(;t!==n.length;)[t,...r]=this._feed(n,t),a.push(...r);return a}end(){const n=this._lookbehind;return this._lookbehind=new Uint8Array,n}_feed(n,t){const r=[];let a=-this._lookbehind.length;if(a<0){for(;a<0&&a<=n.length-this._needle.length;){const i=this._charAt(n,a+this._needle.length-1);if(i===this._lastChar&&this._memcmp(n,a,this._needle.length-1))return a>-this._lookbehind.length&&r.push(this._lookbehind.slice(0,this._lookbehind.length+a)),r.push(_),this._lookbehind=new Uint8Array,[a+this._needle.length,...r];a+=this._occ[i]}
24if(a<0)for(;a<0&&!this._memcmp(n,a,n.length-a);)a++;if(a>=0)r.push(this._lookbehind),this._lookbehind=new Uint8Array;else{const i=this._lookbehind.length+a;return i>0&&(r.push(this._lookbehind.slice(0,i)),this._lookbehind=this._lookbehind.slice(i)),this._lookbehind=Uint8Array.from(new Array(this._lookbehind.length+n.length),(o,s)=>this._charAt(n,s-this._lookbehind.length)),[n.length,...r]}}for(a+=t;a<=n.length-this._needle.length;){const i=n[a+this._needle.length-1];if(i===this._lastChar&&n[a]===this._needle[0]&&B(this._needle,0,n,a,this._needle.length-1))return a>t&&r.push(n.slice(t,a)),r.push(_),[a+this._needle.length,...r];a+=this._occ[i]}if(a<n.length){for(;a<n.length&&(n[a]!==this._needle[0]||!B(n,a,this._needle,0,n.length-a));)++a;a<n.length&&(this._lookbehind=n.slice(a))}return a>0&&r.push(n.slice(t,a<n.length?a:n.length)),[n.length,...r]}_charAt(n,t){return t<0?this._lookbehind[this._lookbehind.length+t]:n[t]}_memcmp(n,t,r){return B(this._charAt.bind(this,n),t,this._needle,0,r)}}class Rt{constructor(n,t){this._readableStream=t,this._search=new q(n)}async*[Symbol.asyncIterator](){const n=this._readableStream.getReader();try{for(;;){const r=await n.read();if(r.done)break;yield*this._search.feed(r.value)}const t=this._search.end();t.length&&(yield t)}finally{n.releaseLock()}}}const Tt=Function.prototype.apply.bind(O,void 0),ve=U("--"),E=U(`\r 25`);function bt(e){const n=e.split(";").map(r=>r.trim());if(n.shift()!=="form-data")throw new Error('malformed content-disposition header: missing "form-data" in `'+JSON.stringify(n)+"`");const t={};for(const r of n){const a=r.split("=",2);if(a.length!==2)throw new Error("malformed content-disposition header: key-value pair not found - "+r+" in `"+e+"`");const[i,o]=a;if(o[0]==='"'&&o[o.length-1]==='"')t[i]=o.slice(1,-1).replace(/\\"/g,'"');else if(o[0]!=='"'&&o[o.length-1]!=='"')t[i]=o;else if(o[0]==='"'&&o[o.length-1]!=='"'||o[0]!=='"'&&o[o.length-1]==='"')throw new Error("malformed content-disposition header: mismatched quotations in `"+e+"`")}if(!t.name)throw new Error("malformed content-disposition header: missing field name in `"+e+"`");return t}function Ct(e){const n=[];let t=!1,r;for(;typeof(r=e.shift())<"u";){const a=r.indexOf(":");if(a===-1)throw new Error("malformed multipart-form header: missing colon");const i=r.slice(0,a).trim().toLowerCase(),o=r.slice(a+1).trim();switch(i){case"content-disposition":t=!0,n.push(...Object.entries(bt(o)));break;case"content-type":n.push(["contentType",o])}}if(!t)throw new Error("malformed multipart-form header: missing content-disposition");return Object.fromEntries(n)}async function Et(e,n){let t=!0,r=!1;const a=[[]],i=new q(E);for(;;){const o=await e.next();if(o.done)throw new Error("malformed multipart-form data: unexpected end of stream");if(t&&o.value!==_&&St(o.value.slice(0,2),ve))return[void 0,new Uint8Array];let s;if(o.value!==_)s=o.value;else if(!r)s=n;else throw new Error("malformed multipart-form data: unexpected boundary");if(!s.length)continue;t&&(t=!1);const l=i.feed(s);for(const[u,c]of l.entries()){const p=c===_;if(!(!p&&!c.length)){if(r&&p)return l.push(i.end()),[a.filter(d=>d.length).map(Tt).map(vt),O(...l.slice(u+1).map(d=>d===_?E:d))];(r=p)?a.push([]):a[a.length-1].push(c)}}}}async function*xt(e,n){const t=O(ve,U(n)),r=new Rt(t,e)[Symbol.asyncIterator]();for(;;){const i=await r.next();if(i.done)return;if(i.value===_)break}const a=new q(E);for(;;){let u=function(y){const f=[];for(const h of a.feed(y))l&&f.push(E),(l=h===_)||f.push(h);return O(...f)};const[i,o]=await Et(r,t);if(!i)return;async function s(){const y=await r.next();if(y.done)throw new Error("malformed multipart-form data: unexpected end of stream");return y}let l=!1,c=!1;async function p(){const y=await s();let f;if(y.value!==_)f=y.value;else if(!l)f=E;else return c=!0,{value:a.end()};return{value:u(f)}}const d=[{value:u(o)}];for(yield{...Ct(i),data:{[Symbol.asyncIterator](){return this},async next(){for(;;){const y=d.shift();if(!y)break;if(y.value.length>0)return y}for(;;){if(c)return{done:c,value:void 0};const y=await p();if(y.value.length>0)return y}}}};!c;)d.push(await p())}}/** 26 * @remix-run/server-runtime v2.17.2 27 * 28 * Copyright (c) Remix Software Inc. 29 * 30 * This source code is licensed under the MIT license found in the 31 * LICENSE.md file in the root directory of this source tree. 32 * 33 * @license MIT 34 */function kt(...e){return async n=>{for(let t of e){let r=await t(n);if(typeof r<"u"&&r!==null)return r}}}async function At(e,n){let t=e.headers.get("Content-Type")||"",[r,a]=t.split(/\s*;\s*boundary=/);if(!e.body||!a||r!=="multipart/form-data")throw new TypeError("Could not parse content as FormData.");let i=new FormData,o=xt(e.body,a);for await(let s of o){if(s.done)break;typeof s.filename=="string"&&(s.filename=s.filename.split(/[/\\]/).pop());let l=await n(s);typeof l<"u"&&l!==null&&i.append(s.name,l)}return i}/** 35 * @remix-run/server-runtime v2.17.2 36 * 37 * Copyright (c) Remix Software Inc. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE.md file in the root directory of this source tree. 41 * 42 * @license MIT 43 */function Ot(e){return Object.keys(e).reduce((n,t)=>(n[t]=e[t].module,n),{})}/** 44 * @remix-run/server-runtime v2.17.2 45 * 46 * Copyright (c) Remix Software Inc. 47 * 48 * This source code is licensed under the MIT license found in the 49 * LICENSE.md file in the root directory of this source tree. 50 * 51 * @license MIT 52 */function ce(e,n){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new"),new Error(n)}/** 53 * @remix-run/server-runtime v2.17.2 54 * 55 * Copyright (c) Remix Software Inc. 56 * 57 * This source code is licensed under the MIT license found in the 58 * LICENSE.md file in the root directory of this source tree. 59 * 60 * @license MIT 61 */function J(e,n,t){let r=Ye(e,n,t);return r?r.map(a=>({params:a.params,pathname:a.pathname,route:a.route})):null}/** 62 * @remix-run/server-runtime v2.17.2 63 * 64 * Copyright (c) Remix Software Inc. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE.md file in the root directory of this source tree. 68 * 69 * @license MIT 70 */async function Dt({loadContext:e,action:n,params:t,request:r,routeId:a,singleFetch:i}){let o=await n({request:i?_e(D(r)):Se(D(r)),context:e,params:t});if(o===void 0)throw new Error(`You defined an action for route "${a}" but didn't return anything from your \`action\` function. Please return a value or \`null\`.`);return i||R(o)?o:k(o)}async function Pt({loadContext:e,loader:n,params:t,request:r,routeId:a,singleFetch:i}){let o=await n({request:i?_e(D(r)):Se(D(r)),context:e,params:t});if(o===void 0)throw new Error(`You defined a loader for route "${a}" but didn't return anything from your \`loader\` function. Please return a value or \`null\`.`);return Me(o)?o.init&&je(o.init.status||200)?pe(new Headers(o.init.headers).get("Location"),o.init):o:i||R(o)?o:k(o)}function D(e){let n=new URL(e.url),t=n.searchParams.getAll("index");n.searchParams.delete("index");let r=[];for(let i of t)i&&r.push(i);for(let i of r)n.searchParams.append("index",i);let a={method:e.method,body:e.body,headers:e.headers,signal:e.signal};
70return a.body&&(a.duplex="half"),new Request(n.href,a)}function Se(e){let n=new URL(e.url);n.searchParams.delete("_data");let t={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return t.body&&(t.duplex="half"),new Request(n.href,t)}function _e(e){let n=new URL(e.url);n.searchParams.delete("_routes");let t={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return t.body&&(t.duplex="half"),new Request(n.href,t)}/** 71 * @remix-run/server-runtime v2.17.2 72 * 73 * Copyright (c) Remix Software Inc. 74 * 75 * This source code is licensed under the MIT license found in the 76 * LICENSE.md file in the root directory of this source tree. 77 * 78 * @license MIT 79 */function Re(e){let n={};return Object.values(e).forEach(t=>{let r=t.parentId||"";n[r]||(n[r]=[]),n[r].push(t)}),n}function Te(e,n="",t=Re(e)){return(t[n]||[]).map(r=>({...r,children:Te(e,r.id,t)}))}function be(e,n,t="",r=Re(e)){return(r[t]||[]).map(a=>{let i={hasErrorBoundary:a.id==="root"||a.module.ErrorBoundary!=null,id:a.id,path:a.path,loader:a.module.loader?(o,s)=>Pt({request:o.request,params:o.params,loadContext:o.context,loader:a.module.loader,routeId:a.id,singleFetch:n.v3_singleFetch===!0}):void 0,action:a.module.action?(o,s)=>Dt({request:o.request,params:o.params,loadContext:o.context,action:a.module.action,routeId:a.id,singleFetch:n.v3_singleFetch===!0}):void 0,handle:a.module.handle};return a.index?{index:!0,...i}:{caseSensitive:a.caseSensitive,children:be(e,n,a.id,r),...i}})}/** 80 * @remix-run/server-runtime v2.17.2 81 * 82 * Copyright (c) Remix Software Inc. 83 * 84 * This source code is licensed under the MIT license found in the 85 * LICENSE.md file in the root directory of this source tree. 86 * 87 * @license MIT 88 */const Ut={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ft=/[&><\u2028\u2029]/g;function Mt(e){return e.replace(Ft,n=>Ut[n])}/** 89 * @remix-run/server-runtime v2.17.2 90 * 91 * Copyright (c) Remix Software Inc. 92 * 93 * This source code is licensed under the MIT license found in the 94 * LICENSE.md file in the root directory of this source tree. 95 * 96 * @license MIT 97 */function de(e){return Mt(JSON.stringify(e))}var jt={};/** 98 * @remix-run/server-runtime v2.17.2 99 * 100 * Copyright (c) Remix Software Inc. 101 * 102 * This source code is licensed under the MIT license found in the 103 * LICENSE.md file in the root directory of this source tree. 104 * 105 * @license MIT 106 */async function Lt(e,n){if(n??(n=jt.REMIX_DEV_ORIGIN),!n)throw Error("Dev server origin not set");let t=new URL(n);t.pathname="ping";let r=await fetch(t.href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({buildHash:e.assets.version})}).catch(a=>{throw console.error(`Could not reach Remix dev server at ${t}`),a});if(!r.ok)throw console.error(`Could not reach Remix dev server at ${t} (${r.status})`),Error(await r.text())}function Ht(e){console.log(`[REMIX DEV] ${e.assets.version} ready`)}const Ce="__remix_devServerHooks";function It(e){globalThis[Ce]=e}function he(){return globalThis[Ce]}/** 107 * @remix-run/server-runtime v2.17.2 108 * 109 * Copyright (c) Remix Software Inc. 110 * 111 * This source code is licensed under the MIT license found in the 112 * LICENSE.md file in the root directory of this source tree. 113 * 114 * @license MIT 115 */function zt(e,n){return`â ï¸ REMIX FUTURE CHANGE: Externally-accessed resource routes will no longer be able to return raw JavaScript objects or \`null\` in React Router v7 when Single Fetch becomes the default. You can prepare for this change at your convenience by wrapping the data returned from your \`${e}\` function in the \`${n}\` route with \`json()\`. For instructions on making this change, see https://remix.run/docs/en/v2.13.1/guides/single-fetch#resource-routes`}/** 116 * @remix-run/server-runtime v2.17.2 117 * 118 * Copyright (c) Remix Software Inc. 119 * 120 * This source code is licensed under the MIT license found in the 121 * LICENSE.md file in the root directory of this source tree. 122 * 123 * @license MIT 124 */const Ee=new Set([100,101,204,205,304]);function fe(e,n){var t,r;let a=Te(e.routes),i=be(e.routes,e.future),o=Xe(n)?n:x.Production,s=Qe(i,{base
124name:e.basename,future:{v7_relativeSplatPath:((t=e.future)===null||t===void 0?void 0:t.v3_relativeSplatPath)===!0,v7_throwAbortReason:((r=e.future)===null||r===void 0?void 0:r.v3_throwAbortReason)===!0}}),l=e.entry.module.handleError||((u,{request:c})=>{o!==x.Test&&!c.signal.aborted&&console.error(P(u)&&u.error?u.error:u)});return{routes:a,dataRoutes:i,serverMode:o,staticHandler:s,errorHandler:l}}const Bt=(e,n)=>{let t,r,a,i,o;return async function(l,u={}){if(t=typeof e=="function"?await e():e,n??(n=t.mode),typeof e=="function"){let m=fe(t,n);r=m.routes,a=m.serverMode,i=m.staticHandler,o=m.errorHandler}else if(!r||!a||!i||!o){let m=fe(t,n);r=m.routes,a=m.serverMode,i=m.staticHandler,o=m.errorHandler}let c=new URL(l.url),p={},d=m=>{if(n===x.Development){var g,w;(g=he())===null||g===void 0||(w=g.processRequestError)===null||w===void 0||w.call(g,m)}o(m,{context:u,params:p,request:l})},y=`${t.basename??"/"}/__manifest`.replace(/\/+/g,"/");if(c.pathname===y)try{return await Nt(t,r,c)}catch(m){return d(m),new Response("Unknown Server Error",{status:500})}let f=J(r,c.pathname,t.basename);f&&f.length>0&&Object.assign(p,f[0].params);let h;if(c.searchParams.has("_data")){t.future.v3_singleFetch&&d(new Error("Warning: Single fetch-enabled apps should not be making ?_data requests, this is likely to break in the future"));let m=c.searchParams.get("_data");h=await Xt(a,t,i,m,l,u,d),t.entry.module.handleDataRequest&&(h=await t.entry.module.handleDataRequest(h,{context:u,params:p,request:l}),V(h)&&(h=Ae(h,t.basename)))}else if(t.future.v3_singleFetch&&c.pathname.endsWith(".data")){let m=new URL(l.url);m.pathname=m.pathname.replace(/\.data$/,"").replace(/^\/_root$/,"/");let g=J(r,m.pathname,t.basename);if(h=await Vt(a,t,i,l,m,u,d),t.entry.module.handleDataRequest&&(h=await t.entry.module.handleDataRequest(h,{context:u,params:g?g[0].params:{},request:l}),V(h))){let w=Le(h.status,h.headers,t.basename);l.method==="GET"&&(w={[ye]:w});let T=new Headers(h.headers);return T.set("Content-Type","text/x-script"),new Response(A(w,l.signal,t.entry.module.streamTimeout,a),{status:He,headers:T})}}else if(f&&f[f.length-1].route.module.default==null&&f[f.length-1].route.module.ErrorBoundary==null)h=await Jt(a,t,i,f.slice(-1)[0].route.id,l,u,d);else{var v,C;let m=n===x.Development?await((v=he())===null||v===void 0||(C=v.getCriticalCss)===null||C===void 0?void 0:C.call(v,t,c.pathname)):void 0;h=await Wt(a,t,i,l,u,d,m)}return l.method==="HEAD"?new Response(null,{headers:h.headers,status:h.status,statusText:h.statusText}):h}};async function Nt(e,n,t){if(e.assets.version!==t.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let r={};if(t.searchParams.has("p")){let a=new Set;t.searchParams.getAll("p").forEach(i=>{i.startsWith("/")||(i=`/${i}`);let o=i.split("/").slice(1);o.forEach((s,l)=>{let u=o.slice(0,l+1).join("/");a.add(`/${u}`)})});for(let i of a){let o=J(n,i,e.basename);if(o)for(let s of o){let l=s.route.id;r[l]=e.assets.routes[l]}}return k(r,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function Xt(e,n,t,r,a,i,o){try{let s=await t.queryRoute(a,{routeId:r,requestContext:i});if(V(s))return Ae(s,n.basename);if(W in s){let l=s[W],u=Ie(l,a.signal,e),c=l.init||{},p=new Headers(c.headers);return p.set("Content-Type","text/remix-deferred"),p.set("X-Remix-Response","yes"),c.headers=p,new Response(u,c)}return s=G(s,"X-Remix-Response","yes"),s}catch(s){if(R(s))return G(s,"X-Remix-Catch","yes");if(P(s))return o(s),xe(s,e);let l=s instanceof Error||s instanceof DOMException?s:new Error("Unexpected Server Error");return o(l),ge(K(l,e),{status:500,headers:{"X-Remix-Error":"yes"}})}}async function Vt(e,n,t,r,a,i,o){let{result:s,headers:l,status:u}=r.method!=="GET"?await ze(n,e,t,r,a,i,o):await Be(n,e,t,r,a,i,o),c=new Headers(l);return c.set("X-Remix-Response","yes"),Ee.has(u)?new Response(null,{status:u,headers:c}):(c.set("Content-Type","text/x-script"),new Response(A(s,r.signal,n.entry.module.streamTimeout,e),{status:u||200,headers:c}))}async function Wt(e,n,t,r,a,i,o){let s;try{s=await t.query(r,{requestContext:a})}catch(d){return i(d),new Response(null,{status:500})}if(R(s))return s;let l=Ne(n,s);if(Ee.has(s.statusCode))return new Response(null,{status:s.statusCode,headers:l});
124s.errors&&(Object.values(s.errors).forEach(d=>{(!P(d)||d.error)&&i(d)}),s.errors=ne(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:re(s.errors,e)},c={manifest:n.assets,routeModules:Ot(n.routes),staticHandlerContext:s,criticalCss:o,serverHandoffString:de({basename:n.basename,criticalCss:o,future:n.future,isSpaMode:n.isSpaMode,...n.future.v3_singleFetch?null:{state:u}}),...n.future.v3_singleFetch?{serverHandoffStream:A(u,r.signal,n.entry.module.streamTimeout,e),renderMeta:{}}:null,future:n.future,isSpaMode:n.isSpaMode,serializeError:d=>K(d,e)},p=n.entry.module.default;try{return await p(r,s.statusCode,l,c,a)}catch(d){i(d);let y=d;if(R(d))try{let h=await Gt(d);y=new Ze(d.status,d.statusText,h)}catch{}s=qe(t.dataRoutes,s,y),s.errors&&(s.errors=ne(s.errors,e));let f={loaderData:s.loaderData,actionData:s.actionData,errors:re(s.errors,e)};c={...c,staticHandlerContext:s,serverHandoffString:de({basename:n.basename,future:n.future,isSpaMode:n.isSpaMode,...n.future.v3_singleFetch?null:{state:f}}),...n.future.v3_singleFetch?{serverHandoffStream:A(f,r.signal,n.entry.module.streamTimeout,e),renderMeta:{}}:null};try{return await p(r,s.statusCode,l,c,a)}catch(h){return i(h),ke(h,e)}}}async function Jt(e,n,t,r,a,i,o){try{let s=await t.queryRoute(a,{routeId:r,requestContext:i});return typeof s=="object"&&s!==null&&ce(!(W in s),`You cannot return a \`defer()\` response from a Resource Route. Did you forget to export a default UI component from the "${r}" route?`),n.future.v3_singleFetch&&!R(s)&&(console.warn(zt(a.method==="GET"?"loader":"action",r)),s=k(s)),ce(R(s),"Expected a Response to be returned from queryRoute"),s}catch(s){return R(s)?G(s,"X-Remix-Catch","yes"):P(s)?(s&&o(s),xe(s,e)):(o(s),ke(s,e))}}function xe(e,n){return ge(K(e.error||new Error("Unexpected Server Error"),n),{status:e.status,statusText:e.statusText,headers:{"X-Remix-Error":"yes"}})}function ke(e,n){let t="Unexpected Server Error";return n!==x.Production&&(t+=` 125 126${String(e)}`),new Response(t,{status:500,headers:{"Content-Type":"text/plain"}})}function Gt(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}function Ae(e,n){let t=new Headers(e.headers),r=t.get("Location");return t.set("X-Remix-Redirect",n&&Ke(r,n)||r),t.set("X-Remix-Status",String(e.status)),t.delete("Location"),e.headers.get("Set-Cookie")!==null&&t.set("X-Remix-Revalidate","yes"),new Response(null,{status:204,headers:t})}function G(e,n,t){let r=new Headers(e.headers);return r.set(n,t),new Response(e.body,{status:e.status,statusText:e.statusText,headers:r,duplex:e.body?"half":void 0})}/** 127 * @remix-run/server-runtime v2.17.2 128 * 129 * Copyright (c) Remix Software Inc. 130 * 131 * This source code is licensed under the MIT license found in the 132 * LICENSE.md file in the root directory of this source tree. 133 * 134 * @license MIT 135 */function N(e){return`__flash_${e}__`}const $=(e={},n="")=>{let t=new Map(Object.entries(e));return{get id(){return n},get data(){return Object.fromEntries(t)},has(r){return t.has(r)||t.has(N(r))},get(r){if(t.has(r))return t.get(r);let a=N(r);if(t.has(a)){let i=t.get(a);return t.delete(a),i}},set(r,a){t.set(r,a)},flash(r,a){t.set(N(r),a)},unset(r){t.delete(r)}}},Yt=e=>e!=null&&typeof e.id=="string"&&typeof e.data<"u"&&typeof e.has=="function"&&typeof e.get=="function"&&typeof e.set=="function"&&typeof e.flash=="function"&&typeof e.unset=="function",Qt=e=>({cookie:n,createData:t,readData:r,updateData:a,deleteData:i})=>{let o=Z(n)?n:e((n==null?void 0:n.name)||"__session",n);return Oe(o),{async getSession(s,l){let u=s&&await o.parse(s,l),c=u&&await r(u);return $(c||{},u||"")},async commitSession(s,l){let{id:u,data:c}=s,p=(l==null?void 0:l.maxAge)!=null?new Date(Date.now()+l.maxAge*1e3):(l==null?void 0:l.expires)!=null?l.expires:o.expires;return u?await a(u,c,p):u=await t(c,p),o.serialize(u,l)},async destroySession(s,l){return await i(s.id),o.serialize("",{...l,maxAge:void 0,expires:new Date(0)})}}};function Oe(e){we(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://remix.run/utils/cookie
135s#signing-cookies for more information.`)}/** 136 * @remix-run/server-runtime v2.17.2 137 * 138 * Copyright (c) Remix Software Inc. 139 * 140 * This source code is licensed under the MIT license found in the 141 * LICENSE.md file in the root directory of this source tree. 142 * 143 * @license MIT 144 */const Kt=e=>({cookie:n}={})=>{let t=Z(n)?n:e((n==null?void 0:n.name)||"__session",n);return Oe(t),{async getSession(r,a){return $(r&&await t.parse(r,a)||{})},async commitSession(r,a){let i=await t.serialize(r.data,a);if(i.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+i.length);return i},async destroySession(r,a){return t.serialize("",{...a,maxAge:void 0,expires:new Date(0)})}}};/** 145 * @remix-run/server-runtime v2.17.2 146 * 147 * Copyright (c) Remix Software Inc. 148 * 149 * This source code is licensed under the MIT license found in the 150 * LICENSE.md file in the root directory of this source tree. 151 * 152 * @license MIT 153 */const Zt=e=>({cookie:n}={})=>{let t=new Map;return e({cookie:n,async createData(r,a){let i=Math.random().toString(36).substring(2,10);return t.set(i,{data:r,expires:a}),i},async readData(r){if(t.has(r)){let{data:a,expires:i}=t.get(r);if(!i||i>new Date)return a;i&&t.delete(r)}return null},async updateData(r,a,i){t.set(r,{data:a,expires:i})},async deleteData(r){t.delete(r)}})};/** 154 * @remix-run/server-runtime v2.17.2 155 * 156 * Copyright (c) Remix Software Inc. 157 * 158 * This source code is licensed under the MIT license found in the 159 * LICENSE.md file in the root directory of this source tree. 160 * 161 * @license MIT 162 */class De extends Error{constructor(n,t){super(`Field "${n}" exceeded upload size of ${t} bytes.`),this.field=n,this.maxBytes=t}}/** 163 * @remix-run/server-runtime v2.17.2 164 * 165 * Copyright (c) Remix Software Inc. 166 * 167 * This source code is licensed under the MIT license found in the 168 * LICENSE.md file in the root directory of this source tree. 169 * 170 * @license MIT 171 */function qt({filter:e,maxPartSize:n=3e6}={}){return async({filename:t,contentType:r,name:a,data:i})=>{if(e&&!await e({filename:t,contentType:r,name:a}))return;let o=0,s=[];for await(let l of i){if(o+=l.byteLength,o>n)throw new De(a,n);s.push(l)}return typeof t=="string"?new File(s,t,{type:r}):await new Blob(s,{type:r}).text()}}/** 172 * @remix-run/server-runtime v2.17.2 173 * 174 * Copyright (c) Remix Software Inc. 175 * 176 * This source code is licensed under the MIT license found in the 177 * LICENSE.md file in the root directory of this source tree. 178 * 179 * @license MIT 180 */const $t=Object.freeze(Object.defineProperty({__proto__:null,MaxPartSizeExceededError:De,UNSAFE_SingleFetchRedirectSymbol:ye,broadcastDevReady:Lt,createCookieFactory:ht,createCookieSessionStorageFactory:Kt,createMemorySessionStorageFactory:Zt,createRequestHandler:Bt,createSession:$,createSessionStorageFactory:Qt,data:Ve,defer:We,isCookie:Z,isSession:Yt,json:k,logDevReady:Ht,redirect:pe,redirectDocument:Je,replace:Ge,unstable_composeUploadHandlers:kt,unstable_createMemoryUploadHandler:qt,unstable_parseMultipartFormData:At,unstable_setDevServerHooks:It},Symbol.toStringTag,{value:"Module"}));var en={},F={},M={},j={};Object.defineProperty(j,"__esModule",{value:!0});j.useBroadcastChannel=void 0;const Y=Q;function tn(e,n,t){const r=(0,Y.useRef)(typeof window<"u"&&"BroadcastChannel"in window?new BroadcastChannel(e+"-channel"):null);return me(r,"message",n),me(r,"messageerror",t),(0,Y.useCallback)(a=>{var i;(i=r==null?void 0:r.current)===null||i===void 0||i.postMessage(a)},[r])}j.useBroadcastChannel=tn;function me(e,n,t=()=>{}){(0,Y.useEffect)(()=>{const r=e.current;if(r)return r.addEventListener(n,t),()=>r.removeEventListener(n,t)},[e,n,t])}var L={};Object.defineProperty(L,"__esModule",{value:!0});L.useCorrectCssTransition=void 0;const nn=Q;function rn(e){const n=document.createElement("style");n.appendChild(document.createTextNode(`* { 181 -webkit-transition: none !important; 182 -moz-transition: none !important; 183 -o-transition: none !important; 184 -ms-transition: none !important; 185 transition: none !important; 186 }`)),document.head.appendChild(n),e(),setTimeout(()=>{window.getComputedStyle(n).transition,document.head.removeChild(n)},0)}function an({disableTransitions:e=!1}={}){return(0,nn.useCallback)(n=>{e?rn(()=>{n()}):n()},[e])}L.useCorrectCssTransition=an;
186(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isTheme=e.useTheme=e.PreventFlashOnWrongTheme=e.ThemeProvider=e.mediaQuery=e.themes=e.Theme=void 0;const n=Ue,t=Q,r=j,a=L;var i;(function(f){f.DARK="dark",f.LIGHT="light"})(i=e.Theme||(e.Theme={})),e.themes=Object.values(i);const o=(0,t.createContext)(void 0);o.displayName="ThemeContext";const s="(prefers-color-scheme: light)",l=()=>window.matchMedia(s).matches?i.LIGHT:i.DARK;e.mediaQuery=typeof window<"u"?window.matchMedia(s):null;function u({children:f,specifiedTheme:h,themeAction:v,disableTransitionOnThemeChange:C=!1}){const m=(0,a.useCorrectCssTransition)({disableTransitions:C}),[g,w]=(0,t.useState)(()=>h?e.themes.includes(h)?h:null:typeof window!="object"?null:l()),[T,I]=(0,t.useState)(h?"USER":"SYSTEM"),z=(0,r.useBroadcastChannel)("remix-themes",S=>{m(()=>{w(S.data.theme),I(S.data.definedBy)})});(0,t.useEffect)(()=>{if(T==="USER")return()=>{};const S=b=>{m(()=>{w(b.matches?i.LIGHT:i.DARK)})};return e.mediaQuery===null||e.mediaQuery===void 0||e.mediaQuery.addEventListener("change",S),()=>e.mediaQuery===null||e.mediaQuery===void 0?void 0:e.mediaQuery.removeEventListener("change",S)},[m,T]);const ee=(0,t.useCallback)(S=>{const b=typeof S=="function"?S(g):S;if(b===null){const te=l();m(()=>{w(te),I("SYSTEM"),z({theme:te,definedBy:"SYSTEM"})}),fetch(`${v}`,{method:"POST",body:JSON.stringify({theme:null})})}else m(()=>{w(b),I("USER"),z({theme:b,definedBy:"USER"})}),fetch(`${v}`,{method:"POST",body:JSON.stringify({theme:b})})},[z,m,g,v]),Pe=(0,t.useMemo)(()=>[g,ee,{definedBy:T}],[g,ee,T]);return(0,n.jsx)(o.Provider,{value:Pe,children:f})}e.ThemeProvider=u;const c=String.raw` 187(() => { 188 const theme = window.matchMedia(${JSON.stringify(s)}).matches 189 ? 'light' 190 : 'dark'; 191 192 const cl = document.documentElement.classList; 193 const dataAttr = document.documentElement.dataset.theme; 194 195 if (dataAttr != null) { 196 const themeAlreadyApplied = dataAttr === 'light' || dataAttr === 'dark'; 197 if (!themeAlreadyApplied) { 198 document.documentElement.dataset.theme = theme; 199 } 200 } else { 201 const themeAlreadyApplied = cl.contains('light') || cl.contains('dark'); 202 if (!themeAlreadyApplied) { 203 cl.add(theme); 204 } 205 } 206 207 const meta = document.querySelector('meta[name=color-scheme]'); 208 if (meta) { 209 if (theme === 'dark') { 210 meta.content = 'dark light'; 211 } else if (theme === 'light') { 212 meta.content = 'light dark'; 213 } 214 } 215})(); 216`;function p({ssrTheme:f,nonce:h}){const[v]=d();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"color-scheme",content:v==="light"?"light dark":"dark light"}),f?null:(0,n.jsx)("script",{dangerouslySetInnerHTML:{__html:c},nonce:h,suppressHydrationWarning:!0})]})}e.PreventFlashOnWrongTheme=p;function d(){const f=(0,t.useContext)(o);if(f===void 0)throw new Error("useTheme must be used within a ThemeProvider");return f}e.useTheme=d;function y(f){return typeof f=="string"&&e.themes.includes(f)}e.isTheme=y})(M);Object.defineProperty(F,"__esModule",{value:!0});F.createThemeSessionResolver=void 0;const sn=M,on=e=>async t=>{const r=await e.getSession(t.headers.get("Cookie"));return{getTheme:()=>{const a=r.get("theme");return(0,sn.isTheme)(a)?a:null},setTheme:a=>r.set("theme",a),commit:()=>e.commitSession(r),destroy:()=>e.destroySession(r)}};F.createThemeSessionResolver=on;var H={};const ln=Fe($t);Object.defineProperty(H,"__esModule",{value:!0});H.createThemeAction=void 0;const X=ln,un=M,cn=e=>async({request:t})=>{const r=await e(t),{theme:a}=await t.json();return a?(0,un.isTheme)(a)?(r.setTheme(a),(0,X.json)({success:!0},{headers:{"Set-Cookie":await r.commit()}})):(0,X.json)({success:!1,message:`theme value of ${a} is not a valid theme.`}):(0,X.json)({success:!0},{headers:{"Set-Cookie":await r.destroy()}})};H.createThemeAction=cn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createThemeAction=e.PreventFlashOnWrongTheme=e.isTheme=e.Theme=e.themes=e.useTheme=e.ThemeProvider=e.createThemeSessionResolver=void 0;var n=F;Object.defineProperty(e,"createThemeSessionResolver",{enumerable:!0,get:function(){return n.createThemeSessionResolver}});var t=M;Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return t.ThemeProvider}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return t.useTheme}}),Object.defineProperty(e,"themes",{enumerable:!0,get:function(){return t.themes}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return t.Theme}}),Object.defineProperty(e,"isTheme",{enumerable:!0,get:function(){return t.isTheme}}
216),Object.defineProperty(e,"PreventFlashOnWrongTheme",{enumerable:!0,get:function(){return t.PreventFlashOnWrongTheme}});var r=H;Object.defineProperty(e,"createThemeAction",{enumerable:!0,get:function(){return r.createThemeAction}})})(en);export{en as b};
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.