1import{n as e}from"./rolldown-runtime-C60lm6uB.js";import{a as t,c as n,i as r,l as i,m as a,n as o,o as s,r as c,t as l}from"./headers-CeAbe3am.js";import{t as u}from"./hash-D0ldriCF.js";import{n as d}from"./app-rsc-render-mode-IDJu5NEE.js";import{n as f,t as p}from"./deployment-id-DFhHa9wO.js";var m=e({VINEXT_RSC_CACHE_BUSTING_SEARCH_PARAM:()=>h,VINEXT_RSC_COMPATIBILITY_ID_HEADER:()=>g,VINEXT_RSC_CONTENT_TYPE:()=>_,VINEXT_RSC_RENDER_MODE_HEADER:()=>a,VINEXT_RSC_VARY_HEADER:()=>v,applyRscCompatibilityIdHeader:()=>T,applyRscDeploymentIdHeader:()=>E,computeRscCacheBustingSearchParam:()=>z,createRscRedirectLocation:()=>q,createRscRequestHeaders:()=>U,createRscRequestUrl:()=>G,createServerActionRequestUrl:()=>K,getVinextRscCompatibilityId:()=>w,hasRscCacheBustingSearchParam:()=>R,isRscCompatibilityIdCompatible:()=>D,resolveHardNavigationTargetFromRscResponse:()=>O,resolveInvalidRscCacheBustingRequest:()=>J,resolveRscCompatibilityNavigationDecision:()=>k,setRscCacheBustingSearchParam:()=>B,stripRscCacheBustingSearchParam:()=>V,stripRscSuffix:()=>H}),h=`_rsc`,g=`X-Vinext-RSC-Compatibility-Id`,_=`text/x-component`,v=[`RSC`,r,o,c,t,n,i,a].join(`, `),y=12,b=new TextEncoder;function x(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function S(e){return e??`0`}function C(e){return e&&e.length>0?e:null}function w(){return C(`2839aeea-997f-4c71-9705-caac044585ec`)}function T(e,t=w()){let n=C(t);n?e.set(g,n):e.delete(g)}function E(e){let t=f();t?e.set(l,t):e.delete(l)}function D(e,t=w()){let n=C(e),r=C(t);return r===null||n!==null&&n===r}function O(e,t,n){if(!e)return t;let r=new URL(e,n);V(r);let i=new URL(t,n),a=H(r.pathname);i.pathname.length>1&&i.pathname.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`);let o=a+r.search;return i.hash&&(o+=i.hash),o}function k(e){return D(e.responseCompatibilityId,e.clientCompatibilityId)?{kind:`compatible`}:{hardNavigationTarget:O(e.responseUrl,e.currentHref,e.origin),kind:`hard-navigate`}}function A(e){let t=d(e);return t===`navigation`?null:t}function j(e,s={}){let l=[e.get(o),e.get(c),e.get(r),e.get(t),e.get(n),e.get(i),...s.includeRenderModeHeader===!1?[]:[A(e.get(a))]];return l.every(e=>e===null)?null:l.map(S).join(`,`)}async function M(e){let t=await globalThis.crypto.subtle.digest(`SHA-256`,b.encode(e));return x(new Uint8Array(t).subarray(0,y))}function N(e){let t=j(e);return t===null?``:u(t)}async function P(e){let t=j(e,{includeRenderModeHeader:!1});return t===null?null:M(t)}function F(e){let t=j(e,{includeRenderModeHeader:!1});return t===null?null:u(t)}function I(e){return(e.search.startsWith(`?`)?e.search.slice(1):e.search).split(`&`).filter(e=>e.length>0&&!L(e))}function L(e){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t);try{return decodeURIComponent(n.replaceAll(`+`,` `))===h}catch{return n===h}}function R(e){return(e.search.startsWith(`?`)?e.search.slice(1):e.search).split(`&`).some(e=>e.length>0&&L(e))}async function z(e){let t=j(e);return t===null?``:M(t)}function B(e,t){let n=I(e);n.push(t.length>0?`${h}=${t}`:h),e.search=`?${n.join(`&`)}`}function V(e){let t=I(e);e.search=t.length>0?`?${t.join(`&`)}`:``}function H(e){return e.endsWith(`.rsc`)?e.slice(0,-4):e}function U(e={}){let t=new Headers({Accept:_,RSC:`1`});p(t),e.interceptionContext!==void 0&&e.interceptionContext!==null&&t.set(n,e.interceptionContext),e.mountedSlotsHeader!==void 0&&e.mountedSlotsHeader!==null&&t.set(i,e.mountedSlotsHeader),e.clientReuseManifestHeader!==void 0&&e.clientReuseManifestHeader!==null&&t.set(s,e.clientReuseManifestHeader);let r=e.renderMode??`navigation`;return r!==`navigation`&&t.set(a,r),t}function W(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}async function G(e,t){let n=new URL(W(e),`http://vinext.local`);return B(n,await z(t)),`${n.pathname}${n.search}`}function K(e){let t=e.indexOf(`#`),n=t===-1?e:e.slice(0,t),r=new URL(n,`http://vinext.local`);return`${r.pathname}${r.search}`}async function q(e,t){let n=new URL(t.url),r=new URL(e,n);if(r.origin!==n.origin)return r.toString();let i=await G(`${r.pathname}${r.search}`,t.headers);return`${r.origin}${i}`}async function J(e){if(!e.isRscRequest||e.request.method!==`GET`&&e.request.method!==`HEAD`)return null;let t=new URL(e.request.url),n=t.searchParams.get(h),r=await z(e.request.headers);if(n===null&&r===``&&t.pathname.endsWith(`.rsc`))return null;let i=new Set([r]);if(n!==null&&n!==r&&(i.add(N(e.request.headers)),A(e.request.headers.get(`X-Vinext-Rsc-Render-Mode`))===null)){let t=await P(e.request.headers),n=F(e.request.headers);t!==null&&i.add(t),n!==null&&i.add(n)}return n!==null&&i.has(n)?null:(B(t,r),new Response(null,{status:307,headers:{Location:`${t.pathname}${t.search}`}}))}export{G as a,k as c,U as i,V as l,_ as n,w as o,m as r,O as s,g as t,H as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.