{"version":3,"file":"util-x8EFRhkz.mjs","names":[],"sources":["../src/engine/adapters/util.ts"],"sourcesContent":["/**\n * Shared utilities for the Phase B adapters.\n *\n * Anything used by more than one adapter belongs here so a future\n * bug fix touches one site, not N.\n */\n\n/**\n * base64url decode (RFC 4648, section 5): `-` and `_` stand for `+` and `/`,\n * and padding is optional. Uses `atob`, which Node, Cloudflare Workers and the\n * Edge runtime all have, so it also works where Node's `Buffer` is missing\n * (Workers without `nodejs_compat`). A character outside the alphabet throws\n * instead of being skipped.\n */\nexport function base64UrlDecode(input: string): Uint8Array {\n  const binary = atob(input.replace(/-/g, '+').replace(/_/g, '/'));\n  const bytes = new Uint8Array(binary.length);\n  for (let index = 0; index < binary.length; index += 1) {\n    bytes[index] = binary.charCodeAt(index);\n  }\n  return bytes;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAgB,gBAAgB,OAA2B;CACzD,MAAM,SAAS,KAAK,MAAM,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,MAAM,GAAG,CAAC;CAC/D,MAAM,QAAQ,IAAI,WAAW,OAAO,MAAM;CAC1C,KAAK,IAAI,QAAQ,GAAG,QAAQ,OAAO,QAAQ,SAAS,GAClD,MAAM,SAAS,OAAO,WAAW,KAAK;CAExC,OAAO;AACT"}