{"version":3,"file":"get-next-phase.cjs","sources":["../../../src/router/utils/get-next-phase.ts"],"sourcesContent":["import type { Phase } from '../types';\n\n/**\n * Gets the next phase of the routing process.\n *\n * Determines which phase should follow the `none`, `filesystem`, `rewrite`, or `resource` phases.\n * Falls back to `miss`.\n *\n * @param phase Current phase of the routing process.\n * @returns Next phase of the routing process.\n */\nexport const getNextPhase = (phase: Phase): Phase => {\n\tswitch (phase) {\n\t\t// `none` applied headers/redirects/middleware/`beforeFiles` rewrites. It checked non-dynamic routes and static assets.\n\t\tcase 'none':\n\t\t\treturn 'filesystem';\n\t\t// `filesystem` applied `afterFiles` rewrites. It checked those rewritten routes.\n\t\tcase 'filesystem':\n\t\t\treturn 'rewrite';\n\t\t// `rewrite` applied dynamic params to requests. It checked dynamic routes.\n\t\tcase 'rewrite':\n\t\t\treturn 'resource';\n\t\t// `resource` applied `fallback` rewrites. It checked the final routes.\n\t\tcase 'resource':\n\t\tdefault:\n\t\t\treturn 'miss';\n\t}\n};\n"],"names":["getNextPhase","phase"],"mappings":"gFAWa,MAAAA,EAAgBC,GAAwB,CACpD,OAAQA,EAAO,CAEd,IAAK,OACG,MAAA,aAER,IAAK,aACG,MAAA,UAER,IAAK,UACG,MAAA,WAER,IAAK,WACL,QACQ,MAAA,MACT,CACD"}