HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/coauthor/node_modules/next/dist/server/app-render/segment-value-encoding.js.map
{"version":3,"sources":["../../../src/server/app-render/segment-value-encoding.ts"],"sourcesContent":["import type { Segment as FlightRouterStateSegment } from './types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type EncodedSegment = Opaque<'EncodedSegment', string>\n\nexport function encodeSegment(\n  segment: FlightRouterStateSegment\n): EncodedSegment {\n  if (typeof segment === 'string') {\n    const safeName =\n      // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n      // But params typically don't include the leading slash. We should use\n      // a different encoding to avoid this special case.\n      segment === '/_not-found'\n        ? '_not-found'\n        : encodeToFilesystemAndURLSafeString(segment)\n    // Since this is not a dynamic segment, it's fully encoded. It does not\n    // need to be \"hydrated\" with a param value.\n    return safeName as EncodedSegment\n  }\n  const name = segment[0]\n  const paramValue = segment[1]\n  const paramType = segment[2]\n  const safeName = encodeToFilesystemAndURLSafeString(name)\n  const safeValue = encodeToFilesystemAndURLSafeString(paramValue)\n\n  const encodedName = '$' + paramType + '$' + safeName + '$' + safeValue\n  return encodedName as EncodedSegment\n}\n\nexport const ROOT_SEGMENT_KEY = ''\n\nexport function encodeChildSegmentKey(\n  // TODO: Make segment keys an opaque type, too?\n  parentSegmentKey: string,\n  parallelRouteKey: string,\n  segment: EncodedSegment\n): string {\n  // Aside from being filesystem safe, segment keys are also designed so that\n  // each segment and parallel route creates its own subdirectory. Roughly in\n  // the same shape as the source app directory. This is mostly just for easier\n  // debugging (you can open up the build folder and navigate the output); if\n  // we wanted to do we could just use a flat structure.\n\n  // Omit the parallel route key for children, since this is the most\n  // common case. Saves some bytes (and it's what the app directory does).\n  const slotKey =\n    parallelRouteKey === 'children'\n      ? segment\n      : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${segment}`\n\n  return parentSegmentKey + '/' + slotKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n  if (simpleParamValueRegex.test(value)) {\n    return value\n  }\n  // If there are any unsafe characters, base64url-encode the entire value.\n  // We also add a ! prefix so it doesn't collide with the simple case.\n  const base64url = btoa(value)\n    .replace(/\\+/g, '-') // Replace '+' with '-'\n    .replace(/\\//g, '_') // Replace '/' with '_'\n    .replace(/=+$/, '') // Remove trailing '='\n  return '!' + base64url\n}\n"],"names":["ROOT_SEGMENT_KEY","encodeChildSegmentKey","encodeSegment","segment","safeName","encodeToFilesystemAndURLSafeString","name","paramValue","paramType","safeValue","encodedName","parentSegmentKey","parallelRouteKey","slotKey","simpleParamValueRegex","value","test","base64url","btoa","replace"],"mappings":";;;;;;;;;;;;;;;;IAgCaA,gBAAgB;eAAhBA;;IAEGC,qBAAqB;eAArBA;;IA3BAC,aAAa;eAAbA;;;AAAT,SAASA,cACdC,OAAiC;IAEjC,IAAI,OAAOA,YAAY,UAAU;QAC/B,MAAMC,WACJ,qEAAqE;QACrE,sEAAsE;QACtE,mDAAmD;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