{"version":3,"sources":["../src/controller.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,KAAK,MAAM,MAAM,YAAY,CAAC;AAIrC;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAE5B,IAAI,UAAU,IAAI,MAAM,CAWvB;IAED,IAAI,iBAAiB,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAEhE;CACF","file":"controller.d.ts","sourcesContent":["import 'reflect-metadata';\n\nimport * as _ from 'underscore';\nimport * as Router from 'koa-router';\n\nimport { A7ControllerMetadata, METADATA_KEY } from './declarations';\n\n/**\n * Base class of the Ark7 Controller.\n */\nexport class A7Controller {\n  private $_koaRouter: Router;\n\n  get $koaRouter(): Router {\n    if (this.$_koaRouter == null) {\n      const meta: A7ControllerMetadata = Reflect.getMetadata(\n        METADATA_KEY,\n        this.constructor,\n      );\n\n      this.$_koaRouter = meta?.koaRouter(this);\n    }\n\n    return this.$_koaRouter;\n  }\n\n  get $koaRouterUseArgs(): [Router.IMiddleware, Router.IMiddleware] {\n    return [this.$koaRouter.routes(), this.$koaRouter.allowedMethods()];\n  }\n}\n"],"sourceRoot":"/Users/yz/workspace/router/src"}