text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("underscore"),require("backbone"),require("backbone.eventrouter"),require("backbone.marionette"),require("marionette.toolkit")):"function"==typeof define&&define.amd?define(["underscore","backbone","backbone.eventrouter","backbone.marionette","marionette.toolkit"],e):t.Marionette.Toolkit.RouterApp=e(t._,t.Backbone,t.EventRouter,t.Marionette,t.Toolkit)}(this,function(t,e,r,n,o){"use strict";var i=n.Toolkit.RouterApp=o.App.extend({constructor:function(){this.configRoutes(),this.router=new this.EventRouter({routeTriggers:this._routeTriggers}),this.bindRouteEvents(),this.listenTo(this.router,"noMatch",this.stop),o.App.apply(this,arguments)},configRoutes:function(){this._eventRoutes=t.extend({},t.result(this,"eventRoutes")),this._routeTriggers=t.mapObject(this._eventRoutes,function(t,e,r){return t.route?t.route:void(r[e]=null)})},EventRouter:e.EventRouter,bindRouteEvents:function(){var e=this.router.getChannel();t.each(this._eventRoutes,function(r,n){r.action&&(r=r.action),this.listenTo(e,n,t.partial(this.routeAction,n,r))},this)},routeAction:function(e,r){var n=t.tail(arguments,2);this.isRunning()||this.start(),this.triggerMethod("before:route",e,n),t.isFunction(r)||(r=this[r]),r&&r.apply(this,n),this.triggerMethod("route",e,n)},startApp:function(e,r){r=t.extend({},t.result(this,"routeOptions"),r),this.stopCurrent();var n=this.getChildApp(e).start(r);return this.setCurrent(n),n},setCurrent:function(t){this._current=t},getCurrent:function(){return this._current},stopCurrent:function(){return this._current&&this._current.stop(),this},translateEvent:function(e){var r=this.router.getDefaultRoute(e);return this.router.translateRoute(r,t.drop(arguments,0))},replaceRoute:function(){var t=this.translateEvent.apply(this,arguments);e.history.navigate(t,{trigger:!1,replace:!0})}}),u=i;return u});
  //# sourceMappingURL=marionette.toolkit.routerapp.min.js.map