@mcp-use/inspector 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{c as je,s as ee,b as Ee,r as k,F as te,R as ze,S as Ce,d as qe,u as Ve,e as A,E as L,m as be,f as K,g as We,h as Xe,i as Je,j as Ke,k as xe,l as se,n as oe,o as Q,q as P,w as _e,t as Qe,v as Ge,x as Ye,y as Ze,z as et,O as tt,A as rt,B as at,C as I,D as nt,G as st,H as ot,I as $,J as it,K as ie,L as lt,M as re,N as U,P as ut,Q as dt,T as ct}from"./index-DjkfvIWz.js";import{U as wr,V as gr,W as Rr,X as Sr,Y as vr,Z as Er,$ as Cr,a0 as br,a1 as xr,a2 as _r,a3 as kr,a4 as Ar,a5 as Dr,a6 as Tr,a7 as Hr,a8 as Fr,a9 as Pr,aa as Nr,ab as Ur,ac as Or,ad as Lr,ae as Ir,af as Br,ag as Mr,ah as $r,ai as jr,aj as zr,ak as qr,al as Vr,am as Wr,an as Xr,ao as Jr,ap as Kr,aq as Qr,ar as Gr,as as Yr,at as Zr,au as ea,av as ta,aw as ra,ax as aa,ay as na,az as sa,aA as oa,aB as ia,aC as la,aD as ua,aE as da,aF as ca,aG as fa,aH as ha,aI as pa,aJ as ma,aK as ya,aL as wa,aM as ga,aN as Ra,aO as Sa,aP as va,aQ as Ea,aR as Ca,aS as ba,aT as xa,aU as _a,aV as ka,aW as Aa,aX as Da,aY as Ta,aZ as Ha,a_ as Fa,a$ as Pa,b0 as Na,b1 as Ua,b2 as Oa,b3 as La,b4 as Ia,b5 as Ba,b6 as Ma,b7 as $a,b8 as ja,b9 as za,ba as qa,bb as Va,bc as Wa,bd as Xa,be as Ja,bf as Ka,bg as Qa,bh as Ga,bi as Ya}from"./index-DjkfvIWz.js";var H={},le;function ft(){if(le)return H;le=1,Object.defineProperty(H,"__esModule",{value:!0}),H.parseCookie=u,H.parse=u,H.stringifyCookie=s,H.stringifySetCookie=i,H.serialize=i,H.parseSetCookie=l,H.stringifySetCookie=i,H.serialize=i;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=/^-?\d+$/,o=Object.prototype.toString,d=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function u(f,v){const m=new d,c=f.length;if(c<2)return m;const R=v?.decode||y;let S=0;do{const b=p(f,S,c);if(b===-1)break;const E=h(f,S,c);if(b>E){S=f.lastIndexOf(";",b-1)+1;continue}const _=w(f,S,b);m[_]===void 0&&(m[_]=R(w(f,b+1,E))),S=E+1}while(S<c);return m}function s(f,v){const m=v?.encode||encodeURIComponent,c=[];for(const R of Object.keys(f)){const S=f[R];if(S===void 0)continue;if(!e.test(R))throw new TypeError(`cookie name is invalid: ${R}`);const b=m(S);if(!t.test(b))throw new TypeError(`cookie val is invalid: ${S}`);c.push(`${R}=${b}`)}return c.join("; ")}function i(f,v,m){const c=typeof f=="object"?f:{...m,name:f,value:String(v)},S=(typeof v=="object"?v:m)?.encode||encodeURIComponent;if(!e.test(c.name))throw new TypeError(`argument name is invalid: ${c.name}`);const b=c.value?S(c.value):"";if(!t.test(b))throw new TypeError(`argument val is invalid: ${c.value}`);let E=c.name+"="+b;if(c.maxAge!==void 0){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);E+="; Max-Age="+c.maxAge}if(c.domain){if(!r.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);E+="; Domain="+c.domain}if(c.path){if(!a.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);E+="; Path="+c.path}if(c.expires){if(!g(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);E+="; Expires="+c.expires.toUTCString()}if(c.httpOnly&&(E+="; HttpOnly"),c.secure&&(E+="; Secure"),c.partitioned&&(E+="; Partitioned"),c.priority)switch(typeof c.priority=="string"?c.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}if(c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}return E}function l(f,v){const m=v?.decode||y,c=f.length,R=h(f,0,c),S=p(f,0,R),b=S===-1?{name:"",value:m(w(f,0,R))}:{name:w(f,0,S),value:m(w(f,S+1,R))};let E=R+1;for(;E<c;){const _=h(f,E,c),F=p(f,E,_),x=F===-1?w(f,E,_):w(f,E,F),C=F===-1?void 0:w(f,F+1,_);switch(x.toLowerCase()){case"httponly":b.httpOnly=!0;break;case"secure":b.secure=!0;break;case"partitioned":b.partitioned=!0;break;case"domain":b.domain=C;break;case"path":b.path=C;break;case"max-age":C&&n.test(C)&&(b.maxAge=Number(C));break;case"expires":if(!C)break;const D=new Date(C);Number.isFinite(D.valueOf())&&(b.expires=D);break;case"priority":if(!C)break;const T=C.toLowerCase();(T==="low"||T==="medium"||T==="high")&&(b.priority=T);break;case"samesite":if(!C)break;const M=C.toLowerCase();(M==="lax"||M==="strict"||M==="none")&&(b.sameSite=M);break}E=_+1}return b}function h(f,v,m){const c=f.indexOf(";",v);return c===-1?m:c}function p(f,v,m){const c=f.indexOf("=",v);return c<m?c:-1}function w(f,v,m){let c=v,R=m;do{const S=f.charCodeAt(c);if(S!==32&&S!==9)break}while(++c<R);for(;R>c;){const S=f.charCodeAt(R-1);if(S!==32&&S!==9)break;R--}return f.slice(c,R)}function y(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function g(f){return o.call(f)==="[object Date]"}return H}var ue=ft(),O={exports:{}},de;function ht(){if(de)return O.exports;de=1;var e={decodeValues:!0,map:!1,silent:!1};function t(s){return typeof s!="string"||s in{}}function r(){return Object.create(null)}function a(s){return typeof s=="string"&&!!s.trim()}function n(s,i){var l=s.split(";").filter(a),h=l.shift(),p=o(h),w=p.name,y=p.value;if(i=i?Object.assign({},e,i):e,t(w))return null;try{y=i.decodeValues?decodeURIComponent(y):y}catch(f){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",f)}var g=r();return g.name=w,g.value=y,l.forEach(function(f){var v=f.split("="),m=v.shift().trimLeft().toLowerCase();if(!t(m)){var c=v.join("=");if(m==="expires")g.expires=new Date(c);else if(m==="max-age"){var R=parseInt(c,10);Number.isNaN(R)||(g.maxAge=R)}else m==="secure"?g.secure=!0:m==="httponly"?g.httpOnly=!0:m==="samesite"?g.sameSite=c:m==="partitioned"?g.partitioned=!0:m&&(g[m]=c)}}),g}function o(s){var i="",l="",h=s.split("=");return h.length>1?(i=h.shift(),l=h.join("=")):l=s,{name:i,value:l}}function d(s,i){if(i=i?Object.assign({},e,i):e,!s)return i.map?r():[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var l=s.headers[Object.keys(s.headers).find(function(p){return p.toLowerCase()==="set-cookie"})];!l&&s.headers.cookie&&!i.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=l}if(Array.isArray(s)||(s=[s]),i.map){var h=r();return s.filter(a).reduce(function(p,w){var y=n(w,i);return y&&!t(y.name)&&(p[y.name]=y),p},h)}else return s.filter(a).map(function(p){return n(p,i)}).filter(Boolean)}function u(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var i=[],l=0,h,p,w,y,g;function f(){for(;l<s.length&&/\s/.test(s.charAt(l));)l+=1;return l<s.length}function v(){return p=s.charAt(l),p!=="="&&p!==";"&&p!==","}for(;l<s.length;){for(h=l,g=!1;f();)if(p=s.charAt(l),p===","){for(w=l,l+=1,f(),y=l;l<s.length&&v();)l+=1;l<s.length&&s.charAt(l)==="="?(g=!0,l=y,i.push(s.substring(h,w)),h=l):l=w+1}else l+=1;(!g||l>=s.length)&&i.push(s.substring(h,s.length))}return i}return O.exports=d,O.exports.parse=d,O.exports.parseString=n,O.exports.splitCookiesString=u,O.exports}var pt=ht(),mt={};function rr({context:e,url:t,nonce:r}){typeof t=="string"&&(t=new URL(t));let{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d}=e,u=je(a.routes,n,e.future,e.isSpaMode);e.staticHandlerContext.loaderData={...e.staticHandlerContext.loaderData};for(let i of e.staticHandlerContext.matches){let l=i.route.id,h=n[l],p=e.manifest.routes[l];h&&p&&ee(l,h.clientLoader,p.hasLoader,e.isSpaMode)&&(h.HydrateFallback||!p.hasLoader)&&delete e.staticHandlerContext.loaderData[l]}let s=Ee(u,e.staticHandlerContext);return k.createElement(k.Fragment,null,k.createElement(te.Provider,{value:{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d,future:e.future,ssr:e.ssr,isSpaMode:e.isSpaMode,routeDiscovery:e.routeDiscovery,serializeError:e.serializeError,renderMeta:e.renderMeta}},k.createElement(ze,{location:s.state.location},k.createElement(Ce,{router:s,context:e.staticHandlerContext,hydrate:!1}))),e.serverHandoffStream?k.createElement(k.Suspense,null,k.createElement(qe,{context:e,identifier:0,reader:e.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:r})):null)}function ar(e,t){return function({initialEntries:a,initialIndex:n,hydrationData:o,future:d}){let u=k.useRef(),s=k.useRef();if(u.current==null){s.current={future:{unstable_subResourceIntegrity:d?.unstable_subResourceIntegrity===!0,v8_middleware:d?.v8_middleware===!0,unstable_trailingSlashAwareDataRequests:d?.unstable_trailingSlashAwareDataRequests===!0},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},ssr:!1,isSpaMode:!1,routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"}};let i=ke(We(e,l=>l),t!==void 0?t:d?.v8_middleware?new K:{},s.current.manifest,s.current.routeModules);u.current=Xe(i,{initialEntries:a,initialIndex:n,hydrationData:o})}return k.createElement(te.Provider,{value:s.current},k.createElement(Je,{router:u.current}))}}function ke(e,t,r,a,n){return e.map(o=>{if(!o.id)throw new Error("Expected a route.id in react-router processRoutes() function");let d={id:o.id,path:o.path,index:o.index,Component:o.Component?et(o.Component):void 0,HydrateFallback:o.HydrateFallback?Ze(o.HydrateFallback):void 0,ErrorBoundary:o.ErrorBoundary?Ye(o.ErrorBoundary):void 0,action:o.action?s=>o.action({...s,context:t}):void 0,loader:o.loader?s=>o.loader({...s,context:t}):void 0,middleware:o.middleware?o.middleware.map(s=>(...i)=>s({...i[0],context:t},i[1])):void 0,handle:o.handle,shouldRevalidate:o.shouldRevalidate},u={id:o.id,path:o.path,index:o.index,parentId:n,hasAction:o.action!=null,hasLoader:o.loader!=null,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:o.ErrorBoundary!=null,module:"build/stub-path-to-module.js",clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0};return r.routes[d.id]=u,a[o.id]={default:d.Component||tt,ErrorBoundary:d.ErrorBoundary||void 0,handle:o.handle,links:o.links,meta:o.meta,shouldRevalidate:o.shouldRevalidate},o.children&&(d.children=ke(o.children,t,r,a,d.id)),d})}var ae=new TextEncoder,yt=async(e,t)=>{let r=ae.encode(e),a=await Ae(t,["sign"]),n=await crypto.subtle.sign("HMAC",a,r),o=btoa(String.fromCharCode(...new Uint8Array(n))).replace(/=+$/,"");return e+"."+o},wt=async(e,t)=>{let r=e.lastIndexOf("."),a=e.slice(0,r),n=e.slice(r+1),o=ae.encode(a),d=await Ae(t,["verify"]);try{let u=gt(atob(n));return await crypto.subtle.verify("HMAC",d,u,o)?a:!1}catch{return!1}},Ae=async(e,t)=>crypto.subtle.importKey("raw",ae.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);function gt(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}var De=(e,t={})=>{let{secrets:r=[],...a}={path:"/",sameSite:"lax",...t};return bt(e,a.expires),{get name(){return e},get isSigned(){return r.length>0},get expires(){return typeof a.maxAge<"u"?new Date(Date.now()+a.maxAge*1e3):a.expires},async parse(n,o){if(!n)return null;let d=ue.parse(n,{...a,...o});if(e in d){let u=d[e];return typeof u=="string"&&u!==""?await St(u,r):""}else return null},async serialize(n,o){return ue.serialize(e,n===""?"":await Rt(n,r),{...a,...o})}}},Te=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function";async function Rt(e,t){let r=vt(e);return t.length>0&&(r=await yt(r,t[0])),r}async function St(e,t){if(t.length>0){for(let r of t){let a=await wt(e,r);if(a!==!1)return ce(a)}return null}return ce(e)}function vt(e){return btoa(Ct(encodeURIComponent(JSON.stringify(e))))}function ce(e){try{return JSON.parse(decodeURIComponent(Et(atob(e))))}catch{return{}}}function Et(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;)n=t.charAt(a++),/[\w*+\-./@]/.exec(n)?r+=n:(o=n.charCodeAt(0),o<256?r+="%"+fe(o,2):r+="%u"+fe(o,4).toUpperCase());return r}function fe(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function Ct(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;){if(n=t.charAt(a++),n==="%"){if(t.charAt(a)==="u"){if(o=t.slice(a+1,a+5),/^[\da-f]{4}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=5;continue}}else if(o=t.slice(a,a+2),/^[\da-f]{2}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=2;continue}}r+=n}return r}function bt(e,t){_e(!t,`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 xt(e){return Object.keys(e).reduce((t,r)=>{let a=e[r];return a&&(t[r]=a.module),t},{})}var _t=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(_t||{});function kt(e){return e==="development"||e==="production"||e==="test"}function V(e,t){if(e instanceof Error&&t!=="development"){let r=new Error("Unexpected Server Error");return r.stack=void 0,r}return e}function z(e,t){return Object.entries(e).reduce((r,[a,n])=>Object.assign(r,{[a]:V(n,t)}),{})}function He(e,t){let r=V(e,t);return{message:r.message,stack:r.stack}}function he(e,t){if(!e)return null;let r=Object.entries(e),a={};for(let[n,o]of r)if(P(o))a[n]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let d=V(o,t);a[n]={message:d.message,stack:d.stack,__type:"Error",...d.name!=="Error"?{__subType:d.name}:{}}}else a[n]=o;return a}function G(e,t,r){let a=be(e,t,r);return a?a.map(n=>({params:n.params,pathname:n.pathname,route:n.route})):null}async function pe(e,t){let r=await e({request:Dt(At(t.request)),params:t.params,context:t.context,unstable_pattern:t.unstable_pattern});if(lt(r)&&r.init&&r.init.status&&re(r.init.status))throw new Response(null,r.init);return r}function At(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let a=[];for(let o of r)o&&a.push(o);for(let o of a)t.searchParams.append("index",o);let n={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return n.body&&(n.duplex="half"),new Request(t.href,n)}function Dt(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function j(e,t){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),new Error(t)}var Fe="__reactRouterDevServerHooks";function nr(e){globalThis[Fe]=e}function W(){return globalThis[Fe]}function Pe(e,t){if(typeof process<"u")try{if(mt?.IS_RR_BUILD_REQUEST==="yes")return e.headers.get(t)}catch{}return null}function Ne(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Ue(e,t="",r=Ne(e)){return(r[t]||[]).map(a=>({...a,children:Ue(e,a.id,r)}))}function Oe(e,t,r="",a=Ne(e)){return(a[r]||[]).map(n=>{let o={hasErrorBoundary:n.id==="root"||n.module.ErrorBoundary!=null,id:n.id,path:n.path,middleware:n.module.middleware,loader:n.module.loader?async d=>{let u=Pe(d.request,"X-React-Router-Prerender-Data");if(u!=null){let i=u&&decodeURI(u);j(i,"Missing prerendered data for route");let l=new TextEncoder().encode(i),h=new ReadableStream({start(y){y.enqueue(l),y.close()}}),w=(await at(h,globalThis)).value;if(w&&I in w){let y=w[I],g={status:y.status};throw y.reload?nt(y.redirect,g):y.replace?st(y.redirect,g):ot(y.redirect,g)}else{j(w&&n.id in w,"Unable to decode prerendered data");let y=w[n.id];return j("data"in y,"Unable to process prerendered data"),y.data}}return await pe(n.module.loader,d)}:void 0,action:n.module.action?d=>pe(n.module.action,d):void 0,handle:n.module.handle};return n.index?{index:!0,...o}:{caseSensitive:n.caseSensitive,children:Oe(e,t,n.id,a),...o}})}function me(e){return Q(JSON.stringify(e))}function ne(e,t){return Tt(e,r=>{let a=t.routes[r.route.id];return j(a,`Route with id "${r.route.id}" not found in build`),a.module.headers})}function Tt(e,t,r){let a=e.errors?e.matches.findIndex(u=>e.errors[u.route.id]):-1,n=a>=0?e.matches.slice(0,a+1):e.matches,o;if(a>=0){let{actionHeaders:u,actionData:s,loaderHeaders:i,loaderData:l}=e;e.matches.slice(a).some(h=>{let p=h.route.id;return u[p]&&(!s||!s.hasOwnProperty(p))?o=u[p]:i[p]&&!l.hasOwnProperty(p)&&(o=i[p]),o!=null})}const d=new Headers(r);return n.reduce((u,s,i)=>{let{id:l}=s.route,h=e.loaderHeaders[l]||new Headers,p=e.actionHeaders[l]||new Headers,w=o!=null&&i===n.length-1,y=w&&o!==h&&o!==p,g=t(s);if(g==null){let v=new Headers(u);return y&&N(o,v),N(p,v),N(h,v),v}let f=new Headers(typeof g=="function"?g({loaderHeaders:h,parentHeaders:u,actionHeaders:p,errorHeaders:w?o:void 0}):g);return y&&N(o,f),N(p,f),N(h,f),N(u,f),f},new Headers(d))}function N(e,t){let r=e.get("Set-Cookie");if(r){let a=pt.splitCookiesString(r),n=new Set(t.getSetCookie());a.forEach(o=>{n.has(o)||t.append("Set-Cookie",o)})}}function Le(e,t){let r=e.get("origin"),a=typeof r=="string"&&r!=="null"?new URL(r).host:r,n=Pt(e);if(a&&(!n||a!==n.value)&&!Ft(a,t))throw n?new Error(`${n.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`):new Error("`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action.")}function Ht(e,t){const r=e.split("."),a=t.split(".");if(a.length<1||r.length<a.length||a.length===1&&(a[0]==="*"||a[0]==="**"))return!1;for(;a.length;){const n=a.pop(),o=r.pop();switch(n){case"":return!1;case"*":{if(o)continue;return!1}case"**":return a.length>0?!1:o!==void 0;case void 0:default:if(o!==n)return!1}}return r.length===0}function Ft(e,t=[]){return t.some(r=>r&&(r===e||Ht(e,r)))}function Pt(e){let r=e.get("x-forwarded-host")?.split(",")[0]?.trim(),a=e.get("host");return r?{type:"x-forwarded-host",value:r}:a?{type:"host",value:a}:void 0}var Ie=new Set([...dt,304]);async function Nt(e,t,r,a,n,o,d){try{Le(a.headers,Array.isArray(e.allowedActionOrigins)?e.allowedActionOrigins:[]);let l=new Request(n,{method:a.method,body:a.body,headers:a.headers,signal:a.signal,...a.body?{duplex:"half"}:void 0}),h=await r.query(l,{requestContext:o,skipLoaderErrorBubbling:!0,skipRevalidation:!0,generateMiddlewareResponse:e.future.v8_middleware?async p=>{try{let w=await p(l);return u(w)}catch(w){return s(w)}}:void 0});return u(h)}catch(l){return s(l)}function u(l){return U(l)?l:i(l)}function s(l){return d(l),B(a,e,t,{result:{error:l},headers:new Headers,status:500})}function i(l){let h=ne(l,e);if(re(l.statusCode)&&h.has("Location"))return new Response(null,{status:l.statusCode,headers:h});l.errors&&(Object.values(l.errors).forEach(w=>{(!P(w)||w.error)&&d(w)}),l.errors=z(l.errors,t));let p;return l.errors?p={error:Object.values(l.errors)[0]}:p={data:Object.values(l.actionData||{})[0]},B(a,e,t,{result:p,headers:h,status:l.statusCode})}}async function Ut(e,t,r,a,n,o,d){let u=new URL(a.url).searchParams.get("_routes"),s=u?new Set(u.split(",")):null;try{let p=new Request(n,{headers:a.headers,signal:a.signal}),w=await r.query(p,{requestContext:o,filterMatchesToLoad:y=>!s||s.has(y.route.id),skipLoaderErrorBubbling:!0,generateMiddlewareResponse:e.future.v8_middleware?async y=>{try{let g=await y(p);return i(g)}catch(g){return l(g)}}:void 0});return i(w)}catch(p){return l(p)}function i(p){return U(p)?p:h(p)}function l(p){return d(p),B(a,e,t,{result:{error:p},headers:new Headers,status:500})}function h(p){let w=ne(p,e);if(re(p.statusCode)&&w.has("Location"))return new Response(null,{status:p.statusCode,headers:w});p.errors&&(Object.values(p.errors).forEach(f=>{(!P(f)||f.error)&&d(f)}),p.errors=z(p.errors,t));let y={},g=new Set(p.matches.filter(f=>s?s.has(f.route.id):f.route.loader!=null).map(f=>f.route.id));if(p.errors)for(let[f,v]of Object.entries(p.errors))y[f]={error:v};for(let[f,v]of Object.entries(p.loaderData))!(f in y)&&g.has(f)&&(y[f]={data:v});return B(a,e,t,{result:y,headers:w,status:p.statusCode})}}function B(e,t,r,{result:a,headers:n,status:o}){let d=new Headers(n);return d.set("X-Remix-Response","yes"),Ie.has(o)?new Response(null,{status:o,headers:d}):(d.set("Content-Type","text/x-script"),d.delete("Content-Length"),new Response(Y(a,e.signal,t.entry.module.streamTimeout,r),{status:o||200,headers:d}))}function ye(e,t,r,a){let n=Ot(e.status,e.headers,r.basename),o=new Headers(e.headers);return o.delete("Location"),o.set("Content-Type","text/x-script"),B(t,r,a,{result:t.method==="GET"?{[I]:n}:n,headers:o,status:xe})}function Ot(e,t,r){let a=t.get("Location");return r&&(a=$(a,r)||a),{redirect:a,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function Y(e,t,r,a){let n=new AbortController,o=setTimeout(()=>n.abort(new Error("Server Timeout")),typeof r=="number"?r:4950);return t.addEventListener("abort",()=>clearTimeout(o)),ct(e,{signal:n.signal,plugins:[d=>{if(d instanceof Error){let{name:u,message:s,stack:i}=a==="production"?V(d,a):d;return["SanitizedError",u,s,i]}if(d instanceof L){let{data:u,status:s,statusText:i}=d;return["ErrorResponse",u,s,i]}if(d&&typeof d=="object"&&I in d)return["SingleFetchRedirect",d[I]]}],postPlugins:[d=>{if(d&&typeof d=="object")return["SingleFetchClassInstance",Object.fromEntries(Object.entries(d))]},()=>["SingleFetchFallback"]]})}function we(e,t){let r=Ue(e.routes),a=Oe(e.routes,e.future),n=kt(t)?t:"production",o=Qe(a,{basename:e.basename,unstable_instrumentations:e.entry.module.unstable_instrumentations}),d=e.entry.module.handleError||((s,{request:i})=>{n!=="test"&&!i.signal.aborted&&console.error(P(s)&&s.error?s.error:s)}),u=async(s,i)=>{let l={},h,p=R=>{t==="development"&&W()?.processRequestError?.(R),d(R,{context:h,params:l,request:s})};if(e.future.v8_middleware){if(i&&!(i instanceof K)){let R=new Error("Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function.");return p(R),q(R,n)}h=i||new K}else h=i||{};let w=new URL(s.url),y=e.basename||"/",g=w.pathname;e.future.unstable_trailingSlashAwareDataRequests?g.endsWith("/_.data")?g=g.replace(/_.data$/,""):g=g.replace(/\.data$/,""):($(g,y)==="/_root.data"?g=y:g.endsWith(".data")&&(g=g.replace(/\.data$/,"")),$(g,y)!=="/"&&g.endsWith("/")&&(g=g.slice(0,-1)));let f=Pe(s,"X-React-Router-SPA-Mode")==="yes";if(!e.ssr){let R=decodeURI(g);if(y!=="/"){let S=$(R,y);if(S==null)return d(new L(404,"Not Found",`Refusing to prerender the \`${R}\` path because it does not start with the basename \`${y}\``),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});R=S}if(e.prerender.length===0)f=!0;else if(!e.prerender.includes(R)&&!e.prerender.includes(R+"/")){if(w.pathname.endsWith(".data"))return d(new L(404,"Not Found",`Refusing to SSR the path \`${R}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});f=!0}}let v=it(e.routeDiscovery.manifestPath,y);if(w.pathname===v)try{return await Lt(e,r,w)}catch(R){return p(R),new Response("Unknown Server Error",{status:500})}let m=G(r,g,e.basename);m&&m.length>0&&Object.assign(l,m[0].params);let c;if(w.pathname.endsWith(".data")){let R=new URL(s.url);R.pathname=g;let S=G(r,R.pathname,e.basename);c=await It(n,e,o,s,R,h,p),ie(c)&&(c=ye(c,s,e,n)),e.entry.module.handleDataRequest&&(c=await e.entry.module.handleDataRequest(c,{context:h,params:S?S[0].params:{},request:s}),ie(c)&&(c=ye(c,s,e,n)))}else if(!f&&m&&m[m.length-1].route.module.default==null&&m[m.length-1].route.module.ErrorBoundary==null)c=await Mt(n,e,o,m.slice(-1)[0].route.id,s,h,p);else{let{pathname:R}=w,S;e.unstable_getCriticalCss?S=await e.unstable_getCriticalCss({pathname:R}):t==="development"&&W()?.getCriticalCss&&(S=await W()?.getCriticalCss?.(R)),c=await Bt(n,e,o,s,h,p,f,S)}return s.method==="HEAD"?new Response(null,{headers:c.headers,status:c.status,statusText:c.statusText}):c};return e.entry.module.unstable_instrumentations&&(u=Ge(u,e.entry.module.unstable_instrumentations.map(s=>s.handler).filter(Boolean))),{routes:r,dataRoutes:a,serverMode:n,staticHandler:o,errorHandler:d,requestHandler:u}}var sr=(e,t)=>{let r,a,n,o,d,u;return async function(i,l){if(r=typeof e=="function"?await e():e,typeof e=="function"){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}else if(!a||!n||!o||!d||!u){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}return u(i,l)}};async function Lt(e,t,r){if(e.assets.version!==r.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let a={};if(r.searchParams.has("paths")){let n=new Set;(r.searchParams.get("paths")||"").split(",").filter(Boolean).forEach(u=>{u.startsWith("/")||(u=`/${u}`);let s=u.split("/").slice(1);s.forEach((i,l)=>{let h=s.slice(0,l+1).join("/");n.add(`/${h}`)})});for(let u of n){let s=G(t,u,e.basename);if(s)for(let i of s){let l=i.route.id,h=e.assets.routes[l];h&&(a[l]=h)}}return Response.json(a,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function It(e,t,r,a,n,o,d){return a.method!=="GET"?await Nt(t,e,r,a,n,o,d):await Ut(t,e,r,a,n,o,d)}async function Bt(e,t,r,a,n,o,d,u){try{a.method==="POST"&&Le(a.headers,Array.isArray(t.allowedActionOrigins)?t.allowedActionOrigins:[]);let i=await r.query(a,{requestContext:n,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(a);return U(h)||(h=await s(h,d)),h}catch(h){return o(h),new Response(null,{status:500})}}:void 0});return U(i)||(i=await s(i,d)),i}catch(i){return o(i),new Response(null,{status:500})}async function s(i,l){let h=ne(i,t);if(Ie.has(i.statusCode))return new Response(null,{status:i.statusCode,headers:h});i.errors&&(Object.values(i.errors).forEach(f=>{(!P(f)||f.error)&&o(f)}),i.errors=z(i.errors,e));let p={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)},w={basename:t.basename,future:t.future,routeDiscovery:t.routeDiscovery,ssr:t.ssr,isSpaMode:l},y={manifest:t.assets,routeModules:xt(t.routes),staticHandlerContext:i,criticalCss:u,serverHandoffString:me({...w,criticalCss:u}),serverHandoffStream:Y(p,a.signal,t.entry.module.streamTimeout,e),renderMeta:{},future:t.future,ssr:t.ssr,routeDiscovery:t.routeDiscovery,isSpaMode:l,serializeError:f=>He(f,e)},g=t.entry.module.default;try{return await g(a,i.statusCode,h,y,n)}catch(f){o(f);let v=f;if(U(f))try{let c=await jt(f);v=new L(f.status,f.statusText,c)}catch{}i=ut(r.dataRoutes,i,v),i.errors&&(i.errors=z(i.errors,e));let m={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)};y={...y,staticHandlerContext:i,serverHandoffString:me(w),serverHandoffStream:Y(m,a.signal,t.entry.module.streamTimeout,e),renderMeta:{}};try{return await g(a,i.statusCode,h,y,n)}catch(c){return o(c),q(c,e)}}}}async function Mt(e,t,r,a,n,o,d){try{let i=await r.queryRoute(n,{routeId:a,requestContext:o,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(n);return u(h)}catch(h){return s(h)}}:void 0});return u(i)}catch(i){return s(i)}function u(i){return U(i)?i:typeof i=="string"?new Response(i):Response.json(i)}function s(i){if(U(i))return i;if(P(i))return d(i),$t(i,e);if(i instanceof Error&&i.message==="Expected a response from queryRoute"){let l=new Error("Expected a Response to be returned from resource route handler");return d(l),q(l,e)}return d(i),q(i,e)}}function $t(e,t){return Response.json(He(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText})}function q(e,t){let r="Unexpected Server Error";return t!=="production"&&(r+=`
1
+ import{c as je,s as ee,b as Ee,r as k,F as te,R as ze,S as Ce,d as qe,u as Ve,e as A,E as L,m as be,f as K,g as We,h as Xe,i as Je,j as Ke,k as xe,l as se,n as oe,o as Q,q as P,w as _e,t as Qe,v as Ge,x as Ye,y as Ze,z as et,O as tt,A as rt,B as at,C as I,D as nt,G as st,H as ot,I as $,J as it,K as ie,L as lt,M as re,N as U,P as ut,Q as dt,T as ct}from"./index-yO7Y3pL6.js";import{U as wr,V as gr,W as Rr,X as Sr,Y as vr,Z as Er,$ as Cr,a0 as br,a1 as xr,a2 as _r,a3 as kr,a4 as Ar,a5 as Dr,a6 as Tr,a7 as Hr,a8 as Fr,a9 as Pr,aa as Nr,ab as Ur,ac as Or,ad as Lr,ae as Ir,af as Br,ag as Mr,ah as $r,ai as jr,aj as zr,ak as qr,al as Vr,am as Wr,an as Xr,ao as Jr,ap as Kr,aq as Qr,ar as Gr,as as Yr,at as Zr,au as ea,av as ta,aw as ra,ax as aa,ay as na,az as sa,aA as oa,aB as ia,aC as la,aD as ua,aE as da,aF as ca,aG as fa,aH as ha,aI as pa,aJ as ma,aK as ya,aL as wa,aM as ga,aN as Ra,aO as Sa,aP as va,aQ as Ea,aR as Ca,aS as ba,aT as xa,aU as _a,aV as ka,aW as Aa,aX as Da,aY as Ta,aZ as Ha,a_ as Fa,a$ as Pa,b0 as Na,b1 as Ua,b2 as Oa,b3 as La,b4 as Ia,b5 as Ba,b6 as Ma,b7 as $a,b8 as ja,b9 as za,ba as qa,bb as Va,bc as Wa,bd as Xa,be as Ja,bf as Ka,bg as Qa,bh as Ga,bi as Ya}from"./index-yO7Y3pL6.js";var H={},le;function ft(){if(le)return H;le=1,Object.defineProperty(H,"__esModule",{value:!0}),H.parseCookie=u,H.parse=u,H.stringifyCookie=s,H.stringifySetCookie=i,H.serialize=i,H.parseSetCookie=l,H.stringifySetCookie=i,H.serialize=i;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=/^-?\d+$/,o=Object.prototype.toString,d=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function u(f,v){const m=new d,c=f.length;if(c<2)return m;const R=v?.decode||y;let S=0;do{const b=p(f,S,c);if(b===-1)break;const E=h(f,S,c);if(b>E){S=f.lastIndexOf(";",b-1)+1;continue}const _=w(f,S,b);m[_]===void 0&&(m[_]=R(w(f,b+1,E))),S=E+1}while(S<c);return m}function s(f,v){const m=v?.encode||encodeURIComponent,c=[];for(const R of Object.keys(f)){const S=f[R];if(S===void 0)continue;if(!e.test(R))throw new TypeError(`cookie name is invalid: ${R}`);const b=m(S);if(!t.test(b))throw new TypeError(`cookie val is invalid: ${S}`);c.push(`${R}=${b}`)}return c.join("; ")}function i(f,v,m){const c=typeof f=="object"?f:{...m,name:f,value:String(v)},S=(typeof v=="object"?v:m)?.encode||encodeURIComponent;if(!e.test(c.name))throw new TypeError(`argument name is invalid: ${c.name}`);const b=c.value?S(c.value):"";if(!t.test(b))throw new TypeError(`argument val is invalid: ${c.value}`);let E=c.name+"="+b;if(c.maxAge!==void 0){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);E+="; Max-Age="+c.maxAge}if(c.domain){if(!r.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);E+="; Domain="+c.domain}if(c.path){if(!a.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);E+="; Path="+c.path}if(c.expires){if(!g(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);E+="; Expires="+c.expires.toUTCString()}if(c.httpOnly&&(E+="; HttpOnly"),c.secure&&(E+="; Secure"),c.partitioned&&(E+="; Partitioned"),c.priority)switch(typeof c.priority=="string"?c.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}if(c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}return E}function l(f,v){const m=v?.decode||y,c=f.length,R=h(f,0,c),S=p(f,0,R),b=S===-1?{name:"",value:m(w(f,0,R))}:{name:w(f,0,S),value:m(w(f,S+1,R))};let E=R+1;for(;E<c;){const _=h(f,E,c),F=p(f,E,_),x=F===-1?w(f,E,_):w(f,E,F),C=F===-1?void 0:w(f,F+1,_);switch(x.toLowerCase()){case"httponly":b.httpOnly=!0;break;case"secure":b.secure=!0;break;case"partitioned":b.partitioned=!0;break;case"domain":b.domain=C;break;case"path":b.path=C;break;case"max-age":C&&n.test(C)&&(b.maxAge=Number(C));break;case"expires":if(!C)break;const D=new Date(C);Number.isFinite(D.valueOf())&&(b.expires=D);break;case"priority":if(!C)break;const T=C.toLowerCase();(T==="low"||T==="medium"||T==="high")&&(b.priority=T);break;case"samesite":if(!C)break;const M=C.toLowerCase();(M==="lax"||M==="strict"||M==="none")&&(b.sameSite=M);break}E=_+1}return b}function h(f,v,m){const c=f.indexOf(";",v);return c===-1?m:c}function p(f,v,m){const c=f.indexOf("=",v);return c<m?c:-1}function w(f,v,m){let c=v,R=m;do{const S=f.charCodeAt(c);if(S!==32&&S!==9)break}while(++c<R);for(;R>c;){const S=f.charCodeAt(R-1);if(S!==32&&S!==9)break;R--}return f.slice(c,R)}function y(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function g(f){return o.call(f)==="[object Date]"}return H}var ue=ft(),O={exports:{}},de;function ht(){if(de)return O.exports;de=1;var e={decodeValues:!0,map:!1,silent:!1};function t(s){return typeof s!="string"||s in{}}function r(){return Object.create(null)}function a(s){return typeof s=="string"&&!!s.trim()}function n(s,i){var l=s.split(";").filter(a),h=l.shift(),p=o(h),w=p.name,y=p.value;if(i=i?Object.assign({},e,i):e,t(w))return null;try{y=i.decodeValues?decodeURIComponent(y):y}catch(f){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",f)}var g=r();return g.name=w,g.value=y,l.forEach(function(f){var v=f.split("="),m=v.shift().trimLeft().toLowerCase();if(!t(m)){var c=v.join("=");if(m==="expires")g.expires=new Date(c);else if(m==="max-age"){var R=parseInt(c,10);Number.isNaN(R)||(g.maxAge=R)}else m==="secure"?g.secure=!0:m==="httponly"?g.httpOnly=!0:m==="samesite"?g.sameSite=c:m==="partitioned"?g.partitioned=!0:m&&(g[m]=c)}}),g}function o(s){var i="",l="",h=s.split("=");return h.length>1?(i=h.shift(),l=h.join("=")):l=s,{name:i,value:l}}function d(s,i){if(i=i?Object.assign({},e,i):e,!s)return i.map?r():[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var l=s.headers[Object.keys(s.headers).find(function(p){return p.toLowerCase()==="set-cookie"})];!l&&s.headers.cookie&&!i.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=l}if(Array.isArray(s)||(s=[s]),i.map){var h=r();return s.filter(a).reduce(function(p,w){var y=n(w,i);return y&&!t(y.name)&&(p[y.name]=y),p},h)}else return s.filter(a).map(function(p){return n(p,i)}).filter(Boolean)}function u(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var i=[],l=0,h,p,w,y,g;function f(){for(;l<s.length&&/\s/.test(s.charAt(l));)l+=1;return l<s.length}function v(){return p=s.charAt(l),p!=="="&&p!==";"&&p!==","}for(;l<s.length;){for(h=l,g=!1;f();)if(p=s.charAt(l),p===","){for(w=l,l+=1,f(),y=l;l<s.length&&v();)l+=1;l<s.length&&s.charAt(l)==="="?(g=!0,l=y,i.push(s.substring(h,w)),h=l):l=w+1}else l+=1;(!g||l>=s.length)&&i.push(s.substring(h,s.length))}return i}return O.exports=d,O.exports.parse=d,O.exports.parseString=n,O.exports.splitCookiesString=u,O.exports}var pt=ht(),mt={};function rr({context:e,url:t,nonce:r}){typeof t=="string"&&(t=new URL(t));let{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d}=e,u=je(a.routes,n,e.future,e.isSpaMode);e.staticHandlerContext.loaderData={...e.staticHandlerContext.loaderData};for(let i of e.staticHandlerContext.matches){let l=i.route.id,h=n[l],p=e.manifest.routes[l];h&&p&&ee(l,h.clientLoader,p.hasLoader,e.isSpaMode)&&(h.HydrateFallback||!p.hasLoader)&&delete e.staticHandlerContext.loaderData[l]}let s=Ee(u,e.staticHandlerContext);return k.createElement(k.Fragment,null,k.createElement(te.Provider,{value:{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d,future:e.future,ssr:e.ssr,isSpaMode:e.isSpaMode,routeDiscovery:e.routeDiscovery,serializeError:e.serializeError,renderMeta:e.renderMeta}},k.createElement(ze,{location:s.state.location},k.createElement(Ce,{router:s,context:e.staticHandlerContext,hydrate:!1}))),e.serverHandoffStream?k.createElement(k.Suspense,null,k.createElement(qe,{context:e,identifier:0,reader:e.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:r})):null)}function ar(e,t){return function({initialEntries:a,initialIndex:n,hydrationData:o,future:d}){let u=k.useRef(),s=k.useRef();if(u.current==null){s.current={future:{unstable_subResourceIntegrity:d?.unstable_subResourceIntegrity===!0,v8_middleware:d?.v8_middleware===!0,unstable_trailingSlashAwareDataRequests:d?.unstable_trailingSlashAwareDataRequests===!0},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},ssr:!1,isSpaMode:!1,routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"}};let i=ke(We(e,l=>l),t!==void 0?t:d?.v8_middleware?new K:{},s.current.manifest,s.current.routeModules);u.current=Xe(i,{initialEntries:a,initialIndex:n,hydrationData:o})}return k.createElement(te.Provider,{value:s.current},k.createElement(Je,{router:u.current}))}}function ke(e,t,r,a,n){return e.map(o=>{if(!o.id)throw new Error("Expected a route.id in react-router processRoutes() function");let d={id:o.id,path:o.path,index:o.index,Component:o.Component?et(o.Component):void 0,HydrateFallback:o.HydrateFallback?Ze(o.HydrateFallback):void 0,ErrorBoundary:o.ErrorBoundary?Ye(o.ErrorBoundary):void 0,action:o.action?s=>o.action({...s,context:t}):void 0,loader:o.loader?s=>o.loader({...s,context:t}):void 0,middleware:o.middleware?o.middleware.map(s=>(...i)=>s({...i[0],context:t},i[1])):void 0,handle:o.handle,shouldRevalidate:o.shouldRevalidate},u={id:o.id,path:o.path,index:o.index,parentId:n,hasAction:o.action!=null,hasLoader:o.loader!=null,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:o.ErrorBoundary!=null,module:"build/stub-path-to-module.js",clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0};return r.routes[d.id]=u,a[o.id]={default:d.Component||tt,ErrorBoundary:d.ErrorBoundary||void 0,handle:o.handle,links:o.links,meta:o.meta,shouldRevalidate:o.shouldRevalidate},o.children&&(d.children=ke(o.children,t,r,a,d.id)),d})}var ae=new TextEncoder,yt=async(e,t)=>{let r=ae.encode(e),a=await Ae(t,["sign"]),n=await crypto.subtle.sign("HMAC",a,r),o=btoa(String.fromCharCode(...new Uint8Array(n))).replace(/=+$/,"");return e+"."+o},wt=async(e,t)=>{let r=e.lastIndexOf("."),a=e.slice(0,r),n=e.slice(r+1),o=ae.encode(a),d=await Ae(t,["verify"]);try{let u=gt(atob(n));return await crypto.subtle.verify("HMAC",d,u,o)?a:!1}catch{return!1}},Ae=async(e,t)=>crypto.subtle.importKey("raw",ae.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);function gt(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}var De=(e,t={})=>{let{secrets:r=[],...a}={path:"/",sameSite:"lax",...t};return bt(e,a.expires),{get name(){return e},get isSigned(){return r.length>0},get expires(){return typeof a.maxAge<"u"?new Date(Date.now()+a.maxAge*1e3):a.expires},async parse(n,o){if(!n)return null;let d=ue.parse(n,{...a,...o});if(e in d){let u=d[e];return typeof u=="string"&&u!==""?await St(u,r):""}else return null},async serialize(n,o){return ue.serialize(e,n===""?"":await Rt(n,r),{...a,...o})}}},Te=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function";async function Rt(e,t){let r=vt(e);return t.length>0&&(r=await yt(r,t[0])),r}async function St(e,t){if(t.length>0){for(let r of t){let a=await wt(e,r);if(a!==!1)return ce(a)}return null}return ce(e)}function vt(e){return btoa(Ct(encodeURIComponent(JSON.stringify(e))))}function ce(e){try{return JSON.parse(decodeURIComponent(Et(atob(e))))}catch{return{}}}function Et(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;)n=t.charAt(a++),/[\w*+\-./@]/.exec(n)?r+=n:(o=n.charCodeAt(0),o<256?r+="%"+fe(o,2):r+="%u"+fe(o,4).toUpperCase());return r}function fe(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function Ct(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;){if(n=t.charAt(a++),n==="%"){if(t.charAt(a)==="u"){if(o=t.slice(a+1,a+5),/^[\da-f]{4}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=5;continue}}else if(o=t.slice(a,a+2),/^[\da-f]{2}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=2;continue}}r+=n}return r}function bt(e,t){_e(!t,`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 xt(e){return Object.keys(e).reduce((t,r)=>{let a=e[r];return a&&(t[r]=a.module),t},{})}var _t=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(_t||{});function kt(e){return e==="development"||e==="production"||e==="test"}function V(e,t){if(e instanceof Error&&t!=="development"){let r=new Error("Unexpected Server Error");return r.stack=void 0,r}return e}function z(e,t){return Object.entries(e).reduce((r,[a,n])=>Object.assign(r,{[a]:V(n,t)}),{})}function He(e,t){let r=V(e,t);return{message:r.message,stack:r.stack}}function he(e,t){if(!e)return null;let r=Object.entries(e),a={};for(let[n,o]of r)if(P(o))a[n]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let d=V(o,t);a[n]={message:d.message,stack:d.stack,__type:"Error",...d.name!=="Error"?{__subType:d.name}:{}}}else a[n]=o;return a}function G(e,t,r){let a=be(e,t,r);return a?a.map(n=>({params:n.params,pathname:n.pathname,route:n.route})):null}async function pe(e,t){let r=await e({request:Dt(At(t.request)),params:t.params,context:t.context,unstable_pattern:t.unstable_pattern});if(lt(r)&&r.init&&r.init.status&&re(r.init.status))throw new Response(null,r.init);return r}function At(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let a=[];for(let o of r)o&&a.push(o);for(let o of a)t.searchParams.append("index",o);let n={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return n.body&&(n.duplex="half"),new Request(t.href,n)}function Dt(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function j(e,t){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),new Error(t)}var Fe="__reactRouterDevServerHooks";function nr(e){globalThis[Fe]=e}function W(){return globalThis[Fe]}function Pe(e,t){if(typeof process<"u")try{if(mt?.IS_RR_BUILD_REQUEST==="yes")return e.headers.get(t)}catch{}return null}function Ne(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Ue(e,t="",r=Ne(e)){return(r[t]||[]).map(a=>({...a,children:Ue(e,a.id,r)}))}function Oe(e,t,r="",a=Ne(e)){return(a[r]||[]).map(n=>{let o={hasErrorBoundary:n.id==="root"||n.module.ErrorBoundary!=null,id:n.id,path:n.path,middleware:n.module.middleware,loader:n.module.loader?async d=>{let u=Pe(d.request,"X-React-Router-Prerender-Data");if(u!=null){let i=u&&decodeURI(u);j(i,"Missing prerendered data for route");let l=new TextEncoder().encode(i),h=new ReadableStream({start(y){y.enqueue(l),y.close()}}),w=(await at(h,globalThis)).value;if(w&&I in w){let y=w[I],g={status:y.status};throw y.reload?nt(y.redirect,g):y.replace?st(y.redirect,g):ot(y.redirect,g)}else{j(w&&n.id in w,"Unable to decode prerendered data");let y=w[n.id];return j("data"in y,"Unable to process prerendered data"),y.data}}return await pe(n.module.loader,d)}:void 0,action:n.module.action?d=>pe(n.module.action,d):void 0,handle:n.module.handle};return n.index?{index:!0,...o}:{caseSensitive:n.caseSensitive,children:Oe(e,t,n.id,a),...o}})}function me(e){return Q(JSON.stringify(e))}function ne(e,t){return Tt(e,r=>{let a=t.routes[r.route.id];return j(a,`Route with id "${r.route.id}" not found in build`),a.module.headers})}function Tt(e,t,r){let a=e.errors?e.matches.findIndex(u=>e.errors[u.route.id]):-1,n=a>=0?e.matches.slice(0,a+1):e.matches,o;if(a>=0){let{actionHeaders:u,actionData:s,loaderHeaders:i,loaderData:l}=e;e.matches.slice(a).some(h=>{let p=h.route.id;return u[p]&&(!s||!s.hasOwnProperty(p))?o=u[p]:i[p]&&!l.hasOwnProperty(p)&&(o=i[p]),o!=null})}const d=new Headers(r);return n.reduce((u,s,i)=>{let{id:l}=s.route,h=e.loaderHeaders[l]||new Headers,p=e.actionHeaders[l]||new Headers,w=o!=null&&i===n.length-1,y=w&&o!==h&&o!==p,g=t(s);if(g==null){let v=new Headers(u);return y&&N(o,v),N(p,v),N(h,v),v}let f=new Headers(typeof g=="function"?g({loaderHeaders:h,parentHeaders:u,actionHeaders:p,errorHeaders:w?o:void 0}):g);return y&&N(o,f),N(p,f),N(h,f),N(u,f),f},new Headers(d))}function N(e,t){let r=e.get("Set-Cookie");if(r){let a=pt.splitCookiesString(r),n=new Set(t.getSetCookie());a.forEach(o=>{n.has(o)||t.append("Set-Cookie",o)})}}function Le(e,t){let r=e.get("origin"),a=typeof r=="string"&&r!=="null"?new URL(r).host:r,n=Pt(e);if(a&&(!n||a!==n.value)&&!Ft(a,t))throw n?new Error(`${n.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`):new Error("`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action.")}function Ht(e,t){const r=e.split("."),a=t.split(".");if(a.length<1||r.length<a.length||a.length===1&&(a[0]==="*"||a[0]==="**"))return!1;for(;a.length;){const n=a.pop(),o=r.pop();switch(n){case"":return!1;case"*":{if(o)continue;return!1}case"**":return a.length>0?!1:o!==void 0;case void 0:default:if(o!==n)return!1}}return r.length===0}function Ft(e,t=[]){return t.some(r=>r&&(r===e||Ht(e,r)))}function Pt(e){let r=e.get("x-forwarded-host")?.split(",")[0]?.trim(),a=e.get("host");return r?{type:"x-forwarded-host",value:r}:a?{type:"host",value:a}:void 0}var Ie=new Set([...dt,304]);async function Nt(e,t,r,a,n,o,d){try{Le(a.headers,Array.isArray(e.allowedActionOrigins)?e.allowedActionOrigins:[]);let l=new Request(n,{method:a.method,body:a.body,headers:a.headers,signal:a.signal,...a.body?{duplex:"half"}:void 0}),h=await r.query(l,{requestContext:o,skipLoaderErrorBubbling:!0,skipRevalidation:!0,generateMiddlewareResponse:e.future.v8_middleware?async p=>{try{let w=await p(l);return u(w)}catch(w){return s(w)}}:void 0});return u(h)}catch(l){return s(l)}function u(l){return U(l)?l:i(l)}function s(l){return d(l),B(a,e,t,{result:{error:l},headers:new Headers,status:500})}function i(l){let h=ne(l,e);if(re(l.statusCode)&&h.has("Location"))return new Response(null,{status:l.statusCode,headers:h});l.errors&&(Object.values(l.errors).forEach(w=>{(!P(w)||w.error)&&d(w)}),l.errors=z(l.errors,t));let p;return l.errors?p={error:Object.values(l.errors)[0]}:p={data:Object.values(l.actionData||{})[0]},B(a,e,t,{result:p,headers:h,status:l.statusCode})}}async function Ut(e,t,r,a,n,o,d){let u=new URL(a.url).searchParams.get("_routes"),s=u?new Set(u.split(",")):null;try{let p=new Request(n,{headers:a.headers,signal:a.signal}),w=await r.query(p,{requestContext:o,filterMatchesToLoad:y=>!s||s.has(y.route.id),skipLoaderErrorBubbling:!0,generateMiddlewareResponse:e.future.v8_middleware?async y=>{try{let g=await y(p);return i(g)}catch(g){return l(g)}}:void 0});return i(w)}catch(p){return l(p)}function i(p){return U(p)?p:h(p)}function l(p){return d(p),B(a,e,t,{result:{error:p},headers:new Headers,status:500})}function h(p){let w=ne(p,e);if(re(p.statusCode)&&w.has("Location"))return new Response(null,{status:p.statusCode,headers:w});p.errors&&(Object.values(p.errors).forEach(f=>{(!P(f)||f.error)&&d(f)}),p.errors=z(p.errors,t));let y={},g=new Set(p.matches.filter(f=>s?s.has(f.route.id):f.route.loader!=null).map(f=>f.route.id));if(p.errors)for(let[f,v]of Object.entries(p.errors))y[f]={error:v};for(let[f,v]of Object.entries(p.loaderData))!(f in y)&&g.has(f)&&(y[f]={data:v});return B(a,e,t,{result:y,headers:w,status:p.statusCode})}}function B(e,t,r,{result:a,headers:n,status:o}){let d=new Headers(n);return d.set("X-Remix-Response","yes"),Ie.has(o)?new Response(null,{status:o,headers:d}):(d.set("Content-Type","text/x-script"),d.delete("Content-Length"),new Response(Y(a,e.signal,t.entry.module.streamTimeout,r),{status:o||200,headers:d}))}function ye(e,t,r,a){let n=Ot(e.status,e.headers,r.basename),o=new Headers(e.headers);return o.delete("Location"),o.set("Content-Type","text/x-script"),B(t,r,a,{result:t.method==="GET"?{[I]:n}:n,headers:o,status:xe})}function Ot(e,t,r){let a=t.get("Location");return r&&(a=$(a,r)||a),{redirect:a,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function Y(e,t,r,a){let n=new AbortController,o=setTimeout(()=>n.abort(new Error("Server Timeout")),typeof r=="number"?r:4950);return t.addEventListener("abort",()=>clearTimeout(o)),ct(e,{signal:n.signal,plugins:[d=>{if(d instanceof Error){let{name:u,message:s,stack:i}=a==="production"?V(d,a):d;return["SanitizedError",u,s,i]}if(d instanceof L){let{data:u,status:s,statusText:i}=d;return["ErrorResponse",u,s,i]}if(d&&typeof d=="object"&&I in d)return["SingleFetchRedirect",d[I]]}],postPlugins:[d=>{if(d&&typeof d=="object")return["SingleFetchClassInstance",Object.fromEntries(Object.entries(d))]},()=>["SingleFetchFallback"]]})}function we(e,t){let r=Ue(e.routes),a=Oe(e.routes,e.future),n=kt(t)?t:"production",o=Qe(a,{basename:e.basename,unstable_instrumentations:e.entry.module.unstable_instrumentations}),d=e.entry.module.handleError||((s,{request:i})=>{n!=="test"&&!i.signal.aborted&&console.error(P(s)&&s.error?s.error:s)}),u=async(s,i)=>{let l={},h,p=R=>{t==="development"&&W()?.processRequestError?.(R),d(R,{context:h,params:l,request:s})};if(e.future.v8_middleware){if(i&&!(i instanceof K)){let R=new Error("Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function.");return p(R),q(R,n)}h=i||new K}else h=i||{};let w=new URL(s.url),y=e.basename||"/",g=w.pathname;e.future.unstable_trailingSlashAwareDataRequests?g.endsWith("/_.data")?g=g.replace(/_.data$/,""):g=g.replace(/\.data$/,""):($(g,y)==="/_root.data"?g=y:g.endsWith(".data")&&(g=g.replace(/\.data$/,"")),$(g,y)!=="/"&&g.endsWith("/")&&(g=g.slice(0,-1)));let f=Pe(s,"X-React-Router-SPA-Mode")==="yes";if(!e.ssr){let R=decodeURI(g);if(y!=="/"){let S=$(R,y);if(S==null)return d(new L(404,"Not Found",`Refusing to prerender the \`${R}\` path because it does not start with the basename \`${y}\``),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});R=S}if(e.prerender.length===0)f=!0;else if(!e.prerender.includes(R)&&!e.prerender.includes(R+"/")){if(w.pathname.endsWith(".data"))return d(new L(404,"Not Found",`Refusing to SSR the path \`${R}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});f=!0}}let v=it(e.routeDiscovery.manifestPath,y);if(w.pathname===v)try{return await Lt(e,r,w)}catch(R){return p(R),new Response("Unknown Server Error",{status:500})}let m=G(r,g,e.basename);m&&m.length>0&&Object.assign(l,m[0].params);let c;if(w.pathname.endsWith(".data")){let R=new URL(s.url);R.pathname=g;let S=G(r,R.pathname,e.basename);c=await It(n,e,o,s,R,h,p),ie(c)&&(c=ye(c,s,e,n)),e.entry.module.handleDataRequest&&(c=await e.entry.module.handleDataRequest(c,{context:h,params:S?S[0].params:{},request:s}),ie(c)&&(c=ye(c,s,e,n)))}else if(!f&&m&&m[m.length-1].route.module.default==null&&m[m.length-1].route.module.ErrorBoundary==null)c=await Mt(n,e,o,m.slice(-1)[0].route.id,s,h,p);else{let{pathname:R}=w,S;e.unstable_getCriticalCss?S=await e.unstable_getCriticalCss({pathname:R}):t==="development"&&W()?.getCriticalCss&&(S=await W()?.getCriticalCss?.(R)),c=await Bt(n,e,o,s,h,p,f,S)}return s.method==="HEAD"?new Response(null,{headers:c.headers,status:c.status,statusText:c.statusText}):c};return e.entry.module.unstable_instrumentations&&(u=Ge(u,e.entry.module.unstable_instrumentations.map(s=>s.handler).filter(Boolean))),{routes:r,dataRoutes:a,serverMode:n,staticHandler:o,errorHandler:d,requestHandler:u}}var sr=(e,t)=>{let r,a,n,o,d,u;return async function(i,l){if(r=typeof e=="function"?await e():e,typeof e=="function"){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}else if(!a||!n||!o||!d||!u){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}return u(i,l)}};async function Lt(e,t,r){if(e.assets.version!==r.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let a={};if(r.searchParams.has("paths")){let n=new Set;(r.searchParams.get("paths")||"").split(",").filter(Boolean).forEach(u=>{u.startsWith("/")||(u=`/${u}`);let s=u.split("/").slice(1);s.forEach((i,l)=>{let h=s.slice(0,l+1).join("/");n.add(`/${h}`)})});for(let u of n){let s=G(t,u,e.basename);if(s)for(let i of s){let l=i.route.id,h=e.assets.routes[l];h&&(a[l]=h)}}return Response.json(a,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function It(e,t,r,a,n,o,d){return a.method!=="GET"?await Nt(t,e,r,a,n,o,d):await Ut(t,e,r,a,n,o,d)}async function Bt(e,t,r,a,n,o,d,u){try{a.method==="POST"&&Le(a.headers,Array.isArray(t.allowedActionOrigins)?t.allowedActionOrigins:[]);let i=await r.query(a,{requestContext:n,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(a);return U(h)||(h=await s(h,d)),h}catch(h){return o(h),new Response(null,{status:500})}}:void 0});return U(i)||(i=await s(i,d)),i}catch(i){return o(i),new Response(null,{status:500})}async function s(i,l){let h=ne(i,t);if(Ie.has(i.statusCode))return new Response(null,{status:i.statusCode,headers:h});i.errors&&(Object.values(i.errors).forEach(f=>{(!P(f)||f.error)&&o(f)}),i.errors=z(i.errors,e));let p={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)},w={basename:t.basename,future:t.future,routeDiscovery:t.routeDiscovery,ssr:t.ssr,isSpaMode:l},y={manifest:t.assets,routeModules:xt(t.routes),staticHandlerContext:i,criticalCss:u,serverHandoffString:me({...w,criticalCss:u}),serverHandoffStream:Y(p,a.signal,t.entry.module.streamTimeout,e),renderMeta:{},future:t.future,ssr:t.ssr,routeDiscovery:t.routeDiscovery,isSpaMode:l,serializeError:f=>He(f,e)},g=t.entry.module.default;try{return await g(a,i.statusCode,h,y,n)}catch(f){o(f);let v=f;if(U(f))try{let c=await jt(f);v=new L(f.status,f.statusText,c)}catch{}i=ut(r.dataRoutes,i,v),i.errors&&(i.errors=z(i.errors,e));let m={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)};y={...y,staticHandlerContext:i,serverHandoffString:me(w),serverHandoffStream:Y(m,a.signal,t.entry.module.streamTimeout,e),renderMeta:{}};try{return await g(a,i.statusCode,h,y,n)}catch(c){return o(c),q(c,e)}}}}async function Mt(e,t,r,a,n,o,d){try{let i=await r.queryRoute(n,{routeId:a,requestContext:o,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(n);return u(h)}catch(h){return s(h)}}:void 0});return u(i)}catch(i){return s(i)}function u(i){return U(i)?i:typeof i=="string"?new Response(i):Response.json(i)}function s(i){if(U(i))return i;if(P(i))return d(i),$t(i,e);if(i instanceof Error&&i.message==="Expected a response from queryRoute"){let l=new Error("Expected a Response to be returned from resource route handler");return d(l),q(l,e)}return d(i),q(i,e)}}function $t(e,t){return Response.json(He(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText})}function q(e,t){let r="Unexpected Server Error";return t!=="production"&&(r+=`
2
2
 
3
3
  ${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function jt(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}function X(e){return`__flash_${e}__`}var Be=(e={},t="")=>{let r=new Map(Object.entries(e));return{get id(){return t},get data(){return Object.fromEntries(r)},has(a){return r.has(a)||r.has(X(a))},get(a){if(r.has(a))return r.get(a);let n=X(a);if(r.has(n)){let o=r.get(n);return r.delete(n),o}},set(a,n){r.set(a,n)},flash(a,n){r.set(X(a),n)},unset(a){r.delete(a)}}},or=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";function zt({cookie:e,createData:t,readData:r,updateData:a,deleteData:n}){let o=Te(e)?e:De(e?.name||"__session",e);return Me(o),{async getSession(d,u){let s=d&&await o.parse(d,u),i=s&&await r(s);return Be(i||{},s||"")},async commitSession(d,u){let{id:s,data:i}=d,l=u?.maxAge!=null?new Date(Date.now()+u.maxAge*1e3):u?.expires!=null?u.expires:o.expires;return s?await a(s,i,l):s=await t(i,l),o.serialize(s,u)},async destroySession(d,u){return await n(d.id),o.serialize("",{...u,maxAge:void 0,expires:new Date(0)})}}}function Me(e){_e(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://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`)}function ir({cookie:e}={}){let t=Te(e)?e:De(e?.name||"__session",e);return Me(t),{async getSession(r,a){return Be(r&&await t.parse(r,a)||{})},async commitSession(r,a){let n=await t.serialize(r.data,a);if(n.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+n.length);return n},async destroySession(r,a){return t.serialize("",{...a,maxAge:void 0,expires:new Date(0)})}}}function lr({cookie:e}={}){let t=new Map;return zt({cookie:e,async createData(r,a){let n=Math.random().toString(36).substring(2,10);return t.set(n,{data:r,expires:a}),n},async readData(r){if(t.has(r)){let{data:a,expires:n}=t.get(r);if(!n||n>new Date)return a;n&&t.delete(r)}return null},async updateData(r,a,n){t.set(r,{data:a,expires:n})},async deleteData(r){t.delete(r)}})}function ur(e,...t){let r=t[0],a=qt(e).replace(/\/:([\w-]+)(\?)?/g,(n,o,d)=>{const u=d===void 0,s=r?.[o];if(u&&s===void 0)throw new Error(`Path '${e}' requires param '${o}' but it was not provided`);return s===void 0?"":"/"+s});if(e.endsWith("*")){const n=r?.["*"];n!==void 0&&(a+="/"+n)}return a||"/"}function qt(e){let t=e.length-1,r=e[t];if(r!=="*"&&r!=="/")return e;for(t--;t>=0&&e[t]==="/";t--);return e.slice(0,t+1)}var Z=new TextEncoder,ge="</body></html>";function Re(e){let t=new TextDecoder,r,a=new Promise(s=>r=s),n=!1,o=[],d=null;function u(s){for(let i of o){let l=t.decode(i,{stream:!0});l.endsWith(ge)&&(l=l.slice(0,-ge.length)),s.enqueue(Z.encode(l))}o.length=0,d=null}return new TransformStream({transform(s,i){o.push(s),!d&&(d=setTimeout(async()=>{u(i),n||(n=!0,Vt(e,i).catch(l=>i.error(l)).then(r))},0))},async flush(s){await a,d&&(clearTimeout(d),u(s)),s.enqueue(Z.encode("</body></html>"))}})}async function Vt(e,t){let r=new TextDecoder("utf-8",{fatal:!0});const a=e.getReader();try{let o;for(;(o=await a.read())&&!o.done;){const d=o.value;try{J(JSON.stringify(r.decode(d,{stream:!0})),t)}catch{let s=JSON.stringify(btoa(String.fromCodePoint(...d)));J(`Uint8Array.from(atob(${s}), m => m.codePointAt(0))`,t)}}}finally{a.releaseLock()}let n=r.decode();n.length&&J(JSON.stringify(n),t)}function J(e,t){t.enqueue(Z.encode(`<script>${Wt(`(self.__FLIGHT_DATA||=[]).push(${e})`)}<\/script>`))}function Wt(e){return e.replace(/<!--/g,"<\\!--").replace(/<\/(script)/gi,"</\\$1")}var Xt=class extends A.Component{constructor(e){super(e),this.state={error:null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:null,location:e.location}:{error:t.error,location:t.location}}render(){return this.state.error?A.createElement($e,{error:this.state.error,renderAppShell:!0}):this.props.children}};function Se({renderAppShell:e,title:t,children:r}){return e?A.createElement("html",{lang:"en"},A.createElement("head",null,A.createElement("meta",{charSet:"utf-8"}),A.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),A.createElement("title",null,t)),A.createElement("body",null,A.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r))):r}function $e({error:e,renderAppShell:t}){console.error(e);let r=A.createElement("script",{dangerouslySetInnerHTML:{__html:`
4
4
  console.log(
@@ -1,4 +1,4 @@
1
- import{p as y,e as E,m as x,_ as g,i as P,a as $,b as N,T as f,v as O,C as A,c as I,d as L,f as S,g as J,o as F,s as R,h as M,j as B,k as b,A as C,l as _,n as j}from"./index-D7mhOTIc.js";import{B as Z,i as W,a as H,b as K,c as V}from"./index-o8LZS9ZF.js";import{p as q}from"./index-DjkfvIWz.js";var z={};J(z,{BaseToolkit:()=>G,DynamicStructuredTool:()=>k,DynamicTool:()=>D,StructuredTool:()=>T,Tool:()=>w,ToolInputParsingException:()=>f,isLangChainTool:()=>V,isRunnableToolLike:()=>K,isStructuredTool:()=>H,isStructuredToolParams:()=>W,tool:()=>Q});var T=class extends Z{extras;returnDirect=!1;verboseParsingErrors=!1;get lc_namespace(){return["langchain","tools"]}responseFormat="content";defaultConfig;constructor(t){super(t??{}),this.verboseParsingErrors=t?.verboseParsingErrors??this.verboseParsingErrors,this.responseFormat=t?.responseFormat??this.responseFormat,this.defaultConfig=t?.defaultConfig??this.defaultConfig,this.metadata=t?.metadata??this.metadata,this.extras=t?.extras??this.extras}async invoke(t,e){let a,s=E(x(this.defaultConfig,e));return g(t)?(a=t.args,s={...s,toolCall:t}):a=t,this.call(a,s)}async call(t,e,a){const s=g(t)?t.args:t;let u;if(P(this.schema))try{u=await $(this.schema,s)}catch(c){let o="Received tool input did not match expected schema";throw this.verboseParsingErrors&&(o=`${o}
1
+ import{p as y,e as E,m as x,_ as g,i as P,a as $,b as N,T as f,v as O,C as A,c as I,d as L,f as S,g as J,o as F,s as R,h as M,j as B,k as b,A as C,l as _,n as j}from"./index-Bx2mJviJ.js";import{B as Z,i as W,a as H,b as K,c as V}from"./index-Bs_zxOrk.js";import{p as q}from"./index-yO7Y3pL6.js";var z={};J(z,{BaseToolkit:()=>G,DynamicStructuredTool:()=>k,DynamicTool:()=>D,StructuredTool:()=>T,Tool:()=>w,ToolInputParsingException:()=>f,isLangChainTool:()=>V,isRunnableToolLike:()=>K,isStructuredTool:()=>H,isStructuredToolParams:()=>W,tool:()=>Q});var T=class extends Z{extras;returnDirect=!1;verboseParsingErrors=!1;get lc_namespace(){return["langchain","tools"]}responseFormat="content";defaultConfig;constructor(t){super(t??{}),this.verboseParsingErrors=t?.verboseParsingErrors??this.verboseParsingErrors,this.responseFormat=t?.responseFormat??this.responseFormat,this.defaultConfig=t?.defaultConfig??this.defaultConfig,this.metadata=t?.metadata??this.metadata,this.extras=t?.extras??this.extras}async invoke(t,e){let a,s=E(x(this.defaultConfig,e));return g(t)?(a=t.args,s={...s,toolCall:t}):a=t,this.call(a,s)}async call(t,e,a){const s=g(t)?t.args:t;let u;if(P(this.schema))try{u=await $(this.schema,s)}catch(c){let o="Received tool input did not match expected schema";throw this.verboseParsingErrors&&(o=`${o}
2
2
  Details: ${c.message}`),N(c)&&(o=`${o}
3
3
 
4
4
  ${q(c)}`),new f(o,JSON.stringify(t))}else{const c=O(s,this.schema);if(!c.valid){let o="Received tool input did not match expected schema";throw this.verboseParsingErrors&&(o=`${o}