{"version":3,"file":"encode-api-key.mjs","names":[],"sources":["../../../src/utils/client-integrations/encode-api-key.ts"],"sourcesContent":["/**\n * Encodes the api key and key into a base64 string\n */\nexport const encodeApiKey = (key: string, apiKey: string) =>\n\tBuffer.from(`${key}:${apiKey}`).toString(\"base64\");\n\n/**\n * Decodes the api key and key from a base64 string\n */\nexport const decodeApiKey = (encodedKey: string) => {\n\tconst decoded = Buffer.from(encodedKey, \"base64\").toString(\"utf-8\");\n\tconst [key, apiKey] = decoded.split(\":\");\n\treturn { key, apiKey };\n};\n"],"mappings":"AAGA,MAAa,GAAgB,EAAa,IACzC,OAAO,KAAK,GAAG,EAAI,GAAG,GAAQ,CAAC,CAAC,SAAS,QAAQ,EAKrC,EAAgB,GAAuB,CAEnD,GAAM,CAAC,EAAK,GADI,OAAO,KAAK,EAAY,QAAQ,CAAC,CAAC,SAAS,OAC/B,CAAC,CAAC,MAAM,GAAG,EACvC,MAAO,CAAE,MAAK,QAAO,CACtB"}