text: /**
    * v1.0.13 generated on: Thu Dec 17 2015 10:48:03 GMT-0600 (CST)
    * Copyright (c) 2014-2015, Corey Butler. All Rights Reserved.
    */
  window.NGN.BUS=function(){var n=[],e=[],t=[],r={},i=function(n,e){var t=n.filter(function(n){return e.toLowerCase()===n[0].toLowerCase()});return 0===t.length?null:(t.length>1&&console.warn("NGN Event Bus: "+t[0][0]+" exists more than once."),t[0].filter(function(n,e){return 0!==e}))},u=function(e){return i.apply(this,[n,e])},s=function(n){return i.apply(this,[e,n])},c=function(n){return i.apply(this,[t,n])},o=function(n,e){return null===n||void 0===n||null===e||void 0===e};return Object.defineProperties(r,{subscribe:NGN.define(!0,!1,!1,function(e,t){if(o(e,t))throw new Error("subscribe() requires a topic and listener function as arguments.");var r=u(e);null!==r&&r.unshift(e),null===r&&(r=[e])&&n.push(r);var i=r.push(t);return n[n.map(function(n){return n[0]}).indexOf(e)]=r,{unsubscribe:function(){r=r.splice(i,1),0===r.length?n.splice(n.map(function(n){return n[0]}).indexOf(e),1):n[n.map(function(n){return n[0]}).indexOf(e)]=r}}}),subscribeOnce:NGN.define(!0,!1,!1,function(n,t){if(o(n,t))throw new Error("subscribeOnce() requires a topic and listener function as arguments.");var r=s(n);null!==r&&r.unshift(n),null===r&&(r=[n])&&e.push(r),r.push(t),e[e.map(function(n){return n[0]}).indexOf(n)]=r}),on:NGN.define(!0,!1,!1,function(){return this.subscribe.apply(this,arguments)}),once:NGN.define(!0,!1,!1,function(){return this.subscribeOnce.apply(this,arguments)}),bind:NGN.define(!0,!1,!0,function(n,e,r){e="string"==typeof e?[e]:e;var i=c(n);null!==i&&i.unshift(n),null===i&&(i=[n])&&t.push(i);var u=this,s=function(n){e.forEach(function(e){u.publish(e,void 0!==n?n:{})})},o=i.push(s);return t[t.map(function(n){return n[0]}).indexOf(n)]=i,{remove:function(){i=i.splice(o,1),0===i.length?t.splice(t.map(function(n){return n[0]}).indexOf(n),1):t[t.map(function(n){return n[0]}).indexOf(n)]=i}}}),execWildcardListeners:NGN.define(!1,!1,!1,function(n,e,t,r){var i={eventName:n};r=void 0===r?!0:r,t=t.filter(function(e){if(e[0].indexOf("*")>=0){var t=new RegExp(e[0].replace("*",".*","gi"));return t.test(n)}return!1}),r&&(t=t.map(function(n){return n.slice(1,n.length)})),t.forEach(function(n){n.forEach(function(n){n.call(i,void 0!==e?e:{})})})}),execListeners:NGN.define(!1,!1,!1,function(n,e,t){var r={eventName:n};null!==t&&t.forEach(function(n){n.call(r,void 0!==e?e:{})})}),publish:NGN.define(!0,!1,!1,function(t,r){var i=u(t),o=s(t),f=c(t);this.execListeners(t,r,i),null!==o&&(e=e.filter(function(n){return n[0].toLowerCase()!==t.toLowerCase()}),this.execListeners(t,r,o)),this.execListeners(t,r,f),this.execWildcardListeners(t,r,n),this.execWildcardListeners(t,r,e),e=e.filter(function(n){if(n[0].indexOf("*")>=0){var e=new RegExp(n[0].replace("*",".*","gi"));return!e.test(t)}return!0}),this.execWildcardListeners(t,r,e,!1)}),clear:NGN.define(!1,!1,!1,function(r){var i=function(n){return n.filter(function(n){return n[0].toLowerCase()!==r.toLowerCase()})};n=i(n),e=i(e),t=i(t)}),emit:NGN.define(!0,!1,!1,function(){return this.publish.apply(this,arguments)}),subscribers:NGN._get(function(){var t={};return n.forEach(function(n){t[n[0]]={persist:n.length-1,adhoc:0}}),e.forEach(function(n){t[n[0]]=t[n[0]]||{persist:0},t[n[0]].adhoc=n.length-1}),t}),persistentSubscribers:NGN._get(function(){return n.map(function(n){return n[0]}).sort()}),adhocSubscribers:NGN._get(function(){return e.map(function(n){return n[0]}).sort()}),autoSubscribers:NGN._get(function(){return t.map(function(n){return n[0]}).sort()}),pool:NGN.define(!0,!1,!1,function(n,e,t){"string"!=typeof n&&(e=n,n="");var r=this,i={};Object.keys(e).forEach(function(t){"function"==typeof e[t]?i[t]=r.subscribe((n.trim()||"")+t,e[t]):console.warn((n.trim()||"")+t+" could not be pooled in the event bus because it's value is not a function.")}),t&&t(i)}),attach:NGN.define(!0,!1,!1,function(n){var e=this;return function(){var t=NGN._slice(arguments);t.unshift(n),e.publish.apply(e,t)}})}),r}();