{
  "version": 3,
  "sources": ["../dist-src/auth.js", "../dist-src/with-authorization-prefix.js", "../dist-src/hook.js", "../dist-src/index.js"],
  "sourcesContent": ["async function auth(callback) {\n  const result = await callback();\n  if (!result) {\n    return {\n      type: \"unauthenticated\"\n    };\n  }\n  const token = result.replace(/^(token|bearer) +/i, \"\");\n  const tokenType = token.split(/\\./).length === 3 ? \"app\" : /^v\\d+\\./.test(token) ? \"installation\" : \"oauth\";\n  return {\n    type: \"token\",\n    token,\n    tokenType\n  };\n}\nexport {\n  auth\n};\n", "function withAuthorizationPrefix(token) {\n  if (token.split(/\\./).length === 3) {\n    return `bearer ${token}`;\n  }\n  return `token ${token}`;\n}\nexport {\n  withAuthorizationPrefix\n};\n", "import { withAuthorizationPrefix } from \"./with-authorization-prefix.js\";\nasync function hook(callback, request, route, parameters) {\n  const endpoint = request.endpoint.merge(\n    route,\n    parameters\n  );\n  const result = await callback();\n  if (!result) {\n    return request(endpoint);\n  }\n  const token = result.replace(/^(token|bearer) +/i, \"\");\n  endpoint.headers.authorization = withAuthorizationPrefix(token);\n  return request(endpoint);\n}\nexport {\n  hook\n};\n", "import { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nconst createCallbackAuth = function createCallbackAuth2(options) {\n  if (!options || !options.callback) {\n    throw new Error(\n      \"[@octokit/auth-callback] No options.callback passed to createCallbackAuth\"\n    );\n  }\n  if (typeof options.callback !== \"function\") {\n    throw new Error(\n      \"[@octokit/auth-callback] options.callback passed to createCallbackAuth is not a function\"\n    );\n  }\n  return Object.assign(auth.bind(null, options.callback), {\n    hook: hook.bind(null, options.callback)\n  });\n};\nexport {\n  createCallbackAuth\n};\n"],
  "mappings": ";AAAA,eAAe,KAAK,UAAU;AAC5B,QAAM,SAAS,MAAM,SAAS;AAC9B,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACA,QAAM,QAAQ,OAAO,QAAQ,sBAAsB,EAAE;AACrD,QAAM,Y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