{"version":3,"sources":["jsdelivr-header.js","/npm/blitz-js-api@1.0.8/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,MAAQ,QAAQ,qBAChB,OAAS,QAAQ,2BACjB,EAAI,QAAQ,UAElB,MAAM,IACJ,WAAA,CAAa,GACX,KAAK,OAAS,CACZ,MAAO,MACP,SAAU,GAAW,CAAC,EAE1B,CAEA,IAAA,GACE,MAAM,EAAK,KAAK,OAAO,SAAS,MAAQ,KAAK,OAAO,SAAS,MAAQ,OAAS,MACxE,EAAS,EAAE,IAAI,MAAM,OAAQ,GACnC,EAAO,OAAS,EAAO,UAAa,EAAO,MAAQ,EAAO,MAAQ,IAAM,IAAvC,OAA+C,OAAO,IACvF,KAAK,OAAS,IAAI,OAAO,GACzB,KAAK,OAAO,MACd,CAKA,GAAA,CAAI,EAAO,EAAI,GACb,OAAO,KAAK,OAAO,IAAI,EAAO,EAAI,EACpC,EAGF,OAAO,QAAU","file":"/npm/blitz-js-api@1.0.8/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/blitz-js-api@1.0.8/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const local = require('./config/local.js')\r\nconst Server = require('./connections/server.js')\r\nconst _ = require('lodash')\r\n\r\nclass API {\r\n  constructor (options) {\r\n    this.config = {\r\n      local: local,\r\n      provided: options || {}\r\n    }\r\n  }\r\n\r\n  init() {\r\n    const id = this.config.provided.group ? this.config.provided.group + '.api' : 'api'\r\n    const config = _.get(blitz.config, id)\r\n    config.prefix = config.prefix || `${config.group ? config.group + ' ' : ''}api`.padEnd(10)\r\n    this.server = new Server(config)\r\n    this.server.init()\r\n  }\r\n\r\n  /**\r\n   * Convenience methods that can be called from other nodes more easily\r\n   */\r\n  use(route, fn, verb) {\r\n    return this.server.use(route, fn, verb)\r\n  }\r\n}\r\n\r\nmodule.exports = API\r\n"]}