globalThis.process ??= {}; globalThis.process.env ??= {};
import { p as decodeKey } from './chunks/astro/server_WO3f6Mge.mjs';
import './chunks/astro-designed-error-pages_CuMapJD2.mjs';
import { N as NOOP_MIDDLEWARE_FN } from './chunks/noop-middleware_C9xlyid3.mjs';

function sanitizeParams(params) {
  return Object.fromEntries(
    Object.entries(params).map(([key, value]) => {
      if (typeof value === "string") {
        return [key, value.normalize().replace(/#/g, "%23").replace(/\?/g, "%3F")];
      }
      return [key, value];
    })
  );
}
function getParameter(part, params) {
  if (part.spread) {
    return params[part.content.slice(3)] || "";
  }
  if (part.dynamic) {
    if (!params[part.content]) {
      throw new TypeError(`Missing parameter: ${part.content}`);
    }
    return params[part.content];
  }
  return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]");
}
function getSegment(segment, params) {
  const segmentPath = segment.map((part) => getParameter(part, params)).join("");
  return segmentPath ? "/" + segmentPath : "";
}
function getRouteGenerator(segments, addTrailingSlash) {
  return (params) => {
    const sanitizedParams = sanitizeParams(params);
    let trailing = "";
    if (addTrailingSlash === "always" && segments.length) {
      trailing = "/";
    }
    const path = segments.map((segment) => getSegment(segment, sanitizedParams)).join("") + trailing;
    return path || "/";
  };
}

function deserializeRouteData(rawRouteData) {
  return {
    route: rawRouteData.route,
    type: rawRouteData.type,
    pattern: new RegExp(rawRouteData.pattern),
    params: rawRouteData.params,
    component: rawRouteData.component,
    generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
    pathname: rawRouteData.pathname || void 0,
    segments: rawRouteData.segments,
    prerender: rawRouteData.prerender,
    redirect: rawRouteData.redirect,
    redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
    fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
      return deserializeRouteData(fallback);
    }),
    isIndex: rawRouteData.isIndex,
    origin: rawRouteData.origin
  };
}

function deserializeManifest(serializedManifest) {
  const routes = [];
  for (const serializedRoute of serializedManifest.routes) {
    routes.push({
      ...serializedRoute,
      routeData: deserializeRouteData(serializedRoute.routeData)
    });
    const route = serializedRoute;
    route.routeData = deserializeRouteData(serializedRoute.routeData);
  }
  const assets = new Set(serializedManifest.assets);
  const componentMetadata = new Map(serializedManifest.componentMetadata);
  const inlinedScripts = new Map(serializedManifest.inlinedScripts);
  const clientDirectives = new Map(serializedManifest.clientDirectives);
  const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);
  const key = decodeKey(serializedManifest.key);
  return {
    // in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
    middleware() {
      return { onRequest: NOOP_MIDDLEWARE_FN };
    },
    ...serializedManifest,
    assets,
    componentMetadata,
    inlinedScripts,
    clientDirectives,
    routes,
    serverIslandNameMap,
    key
  };
}

const manifest = deserializeManifest({"hrefRoot":"file:///home/fc/Projects/glance/","cacheDir":"file:///home/fc/Projects/glance/node_modules/.astro/","outDir":"file:///home/fc/Projects/glance/dist/","srcDir":"file:///home/fc/Projects/glance/src/","publicDir":"file:///home/fc/Projects/glance/public/","buildClientDir":"file:///home/fc/Projects/glance/dist/","buildServerDir":"file:///home/fc/Projects/glance/dist/_worker.js/","adapterName":"@astrojs/cloudflare","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/@astrojs/cloudflare/dist/entrypoints/image-endpoint.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/generate-link","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/generate-link\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"generate-link","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/generate-link.ts","pathname":"/api/generate-link","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/weather","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/weather\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"weather","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/weather.ts","pathname":"/api/weather","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"inline","content":":root{--bg: #000000;--fg: #ffffff;--border: #ffffff;--gray: #808080}*{margin:0;padding:0;box-sizing:border-box}body{background-color:var(--bg);color:var(--fg);font-family:Courier New,Courier,monospace;font-size:14px;line-height:1.5;padding:5rem}h1,h2,h3,h4,h5,h6{font-weight:700;font-family:Courier New,Courier,monospace}button{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem 1rem;font-family:Courier New,Courier,monospace;cursor:pointer}button:hover{background-color:var(--fg);color:var(--bg)}input,textarea,select{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem;font-family:Courier New,Courier,monospace;font-size:14px}input:focus,textarea:focus,select:focus{outline:2px solid var(--fg)}\n"}],"routeData":{"route":"/app/preview","isIndex":false,"type":"page","pattern":"^\\/app\\/preview\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"preview","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/preview.astro","pathname":"/app/preview","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"inline","content":":root{--bg: #000000;--fg: #ffffff;--border: #ffffff;--gray: #808080}*{margin:0;padding:0;box-sizing:border-box}body{background-color:var(--bg);color:var(--fg);font-family:Courier New,Courier,monospace;font-size:14px;line-height:1.5;padding:5rem}h1,h2,h3,h4,h5,h6{font-weight:700;font-family:Courier New,Courier,monospace}button{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem 1rem;font-family:Courier New,Courier,monospace;cursor:pointer}button:hover{background-color:var(--fg);color:var(--bg)}input,textarea,select{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem;font-family:Courier New,Courier,monospace;font-size:14px}input:focus,textarea:focus,select:focus{outline:2px solid var(--fg)}\n"}],"routeData":{"route":"/app","isIndex":true,"type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/[shortcode]","isIndex":false,"type":"page","pattern":"^\\/([^/]+?)\\/?$","segments":[[{"content":"shortcode","dynamic":true,"spread":false}]],"params":["shortcode"],"component":"src/pages/[shortcode].astro","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"inline","content":":root{--bg: #000000;--fg: #ffffff;--border: #ffffff;--gray: #808080}*{margin:0;padding:0;box-sizing:border-box}body{background-color:var(--bg);color:var(--fg);font-family:Courier New,Courier,monospace;font-size:14px;line-height:1.5;padding:5rem}h1,h2,h3,h4,h5,h6{font-weight:700;font-family:Courier New,Courier,monospace}button{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem 1rem;font-family:Courier New,Courier,monospace;cursor:pointer}button:hover{background-color:var(--fg);color:var(--bg)}input,textarea,select{background-color:var(--bg);color:var(--fg);border:1px solid var(--border);padding:.5rem;font-family:Courier New,Courier,monospace;font-size:14px}input:focus,textarea:focus,select:focus{outline:2px solid var(--fg)}\n"},{"type":"external","src":"/_astro/index.BiMKgvFb.css"}],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/fc/Projects/glance/src/pages/[shortcode].astro",{"propagation":"none","containsHead":true}],["/home/fc/Projects/glance/src/pages/app/index.astro",{"propagation":"none","containsHead":true}],["/home/fc/Projects/glance/src/pages/app/preview.astro",{"propagation":"none","containsHead":true}],["/home/fc/Projects/glance/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000astro-internal:middleware":"_astro-internal_middleware.mjs","\u0000noop-actions":"_noop-actions.mjs","\u0000@astro-page:src/pages/api/generate-link@_@ts":"pages/api/generate-link.astro.mjs","\u0000@astro-page:src/pages/api/weather@_@ts":"pages/api/weather.astro.mjs","\u0000@astro-page:src/pages/app/preview@_@astro":"pages/app/preview.astro.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"pages/app.astro.mjs","\u0000@astro-page:src/pages/[shortcode]@_@astro":"pages/_shortcode_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"index.js","\u0000@astro-page:node_modules/@astrojs/cloudflare/dist/entrypoints/image-endpoint@_@js":"pages/_image.astro.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"manifest_BP1MTNcW.mjs","/home/fc/Projects/glance/node_modules/unstorage/drivers/cloudflare-kv-binding.mjs":"chunks/cloudflare-kv-binding_DMly_2Gl.mjs","/home/fc/Projects/glance/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_CG4EIo5e.mjs","/home/fc/Projects/glance/src/components/Dashboard":"_astro/Dashboard.BYXPJRRI.js","/home/fc/Projects/glance/src/components/Preview":"_astro/Preview.RWPSjH2w.js","@astrojs/solid-js/client.js":"_astro/client.Vw0hJC5L.js","/home/fc/Projects/glance/src/pages/index.astro?astro&type=script&index=0&lang.ts":"_astro/index.astro_astro_type_script_index_0_lang.Cm5NMAxH.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/_astro/index.BiMKgvFb.css","/favicon.svg","/_worker.js/_@astrojs-ssr-adapter.mjs","/_worker.js/_astro-internal_middleware.mjs","/_worker.js/_noop-actions.mjs","/_worker.js/index.js","/_worker.js/renderers.mjs","/_astro/Dashboard.BYXPJRRI.js","/_astro/OrbitControls.B-WH-rzu.js","/_astro/Preview.RWPSjH2w.js","/_astro/client.Vw0hJC5L.js","/_astro/index.astro_astro_type_script_index_0_lang.Cm5NMAxH.js","/_astro/registry.C0UvCNn_.js","/_astro/web.gEHESIx2.js","/_worker.js/chunks/Layout_eV-qEGCG.mjs","/_worker.js/chunks/_@astro-renderers_DpxbEuk7.mjs","/_worker.js/chunks/_@astrojs-ssr-adapter_DpluC3qk.mjs","/_worker.js/chunks/astro-designed-error-pages_CuMapJD2.mjs","/_worker.js/chunks/astro_BlpftBPo.mjs","/_worker.js/chunks/cloudflare-kv-binding_DMly_2Gl.mjs","/_worker.js/chunks/image-endpoint_DVs7qPGs.mjs","/_worker.js/chunks/index_BfW_FHpJ.mjs","/_worker.js/chunks/noop-middleware_C9xlyid3.mjs","/_worker.js/chunks/path_CH3auf61.mjs","/_worker.js/chunks/registry_B7C18axh.mjs","/_worker.js/chunks/remote_BC1y8RCW.mjs","/_worker.js/chunks/sharp_CG4EIo5e.mjs","/_worker.js/chunks/shortlink_FrzJzDij.mjs","/_worker.js/_astro/index.BiMKgvFb.css","/_worker.js/pages/_image.astro.mjs","/_worker.js/pages/_shortcode_.astro.mjs","/_worker.js/pages/app.astro.mjs","/_worker.js/pages/index.astro.mjs","/_worker.js/chunks/astro/server_WO3f6Mge.mjs","/_worker.js/pages/api/generate-link.astro.mjs","/_worker.js/pages/api/weather.astro.mjs","/_worker.js/pages/app/preview.astro.mjs"],"buildFormat":"directory","checkOrigin":true,"allowedDomains":[],"serverIslandNameMap":[],"key":"ozOeDuaRXld/IX/0Pxjz/ZpivyhkV/N8mwea+QttuBs=","sessionConfig":{"driver":"cloudflare-kv-binding","options":{"binding":"SESSION"}}});
if (manifest.sessionConfig) manifest.sessionConfig.driverModule = () => import('./chunks/cloudflare-kv-binding_DMly_2Gl.mjs');

export { manifest };
