{"version":3,"sources":["jsdelivr-header.js","/npm/@vinox/adonis-ally@0.0.3/build/providers/AllyProvider.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aASA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,MAAM,cAAgB,QAAQ,sBAI9B,MAAM,aACF,WAAA,CAAY,GACR,KAAK,YAAc,CACvB,CAIA,QAAA,GACI,KAAK,YAAY,UAAU,UAAU,4BAA6B,IAC9D,MAAM,EAAS,EAAU,eAAe,sBAAsB,IAAI,OAAQ,CAAC,GAC3E,OAAO,IAAI,cAAc,YAAY,KAAK,YAAa,EAAO,GAEtE,CAIA,IAAA,GACI,KAAK,YAAY,UAAU,aAAa,CAAC,0BAA2B,6BAA6B,CAAC,EAAa,KAC3G,EAAY,OAAO,QAAQ,WACvB,OAAO,EAAK,kBAAkB,KAClC,IAAG,EAAK,GAEhB,EAEJ,QAAQ,QAAU,aAClB,aAAa,kBAAmB","file":"/npm/@vinox/adonis-ally@0.0.3/build/providers/AllyProvider.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@vinox/adonis-ally@0.0.3/build/providers/AllyProvider.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n/*\n * @adonisjs/ally\n *\n * (c) Harminder Virk <virk@adonisjs.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst AllyManager_1 = require(\"../src/AllyManager\");\n/**\n * Ally provider to hook into an AdonisJS application\n */\nclass AllyProvider {\n    constructor(application) {\n        this.application = application;\n    }\n    /**\n     * Register the binding\n     */\n    register() {\n        this.application.container.singleton('Vinox/Adonis/Addons/Ally', (container) => {\n            const config = container.resolveBinding('Adonis/Core/Config').get('ally', {});\n            return new AllyManager_1.AllyManager(this.application, config);\n        });\n    }\n    /**\n     * Stick an instance to the current HTTP request\n     */\n    boot() {\n        this.application.container.withBindings(['Adonis/Core/HttpContext', 'Vinox/Adonis/Addons/Ally'], (HttpContext, Ally) => {\n            HttpContext.getter('ally', function ally() {\n                return Ally.getAllyForRequest(this);\n            }, true);\n        });\n    }\n}\nexports.default = AllyProvider;\nAllyProvider.needsApplication = true;\n"]}