10 __coverage__['build/plugin/plugin.js'] = {"path":"build/plugin/plugin.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":37}}},"2":{"name":"Plugin","line":16,"loc":{"start":{"line":16,"column":4},"end":{"line":16,"column":28}}},"3":{"name":"(anonymous_3)","line":85,"loc":{"start":{"line":85,"column":22},"end":{"line":85,"column":39}}},"4":{"name":"(anonymous_4)","line":96,"loc":{"start":{"line":96,"column":20},"end":{"line":96,"column":31}}},"5":{"name":"(anonymous_5)","line":116,"loc":{"start":{"line":116,"column":18},"end":{"line":116,"column":51}}},"6":{"name":"(anonymous_6)","line":139,"loc":{"start":{"line":139,"column":17},"end":{"line":139,"column":50}}},"7":{"name":"(anonymous_7)","line":162,"loc":{"start":{"line":162,"column":22},"end":{"line":162,"column":50}}},"8":{"name":"(anonymous_8)","line":180,"loc":{"start":{"line":180,"column":24},"end":{"line":180,"column":52}}},"9":{"name":"(anonymous_9)","line":197,"loc":{"start":{"line":197,"column":25},"end":{"line":197,"column":53}}},"10":{"name":"(anonymous_10)","line":215,"loc":{"start":{"line":215,"column":29},"end":{"line":215,"column":57}}},"11":{"name":"(anonymous_11)","line":232,"loc":{"start":{"line":232,"column":27},"end":{"line":232,"column":60}}},"12":{"name":"(anonymous_12)","line":249,"loc":{"start":{"line":249,"column":26},"end":{"line":249,"column":59}}},"13":{"name":"(anonymous_13)","line":255,"loc":{"start":{"line":255,"column":18},"end":{"line":255,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":263,"column":42}},"2":{"start":{"line":16,"column":4},"end":{"line":22,"column":5}},"3":{"start":{"line":17,"column":8},"end":{"line":21,"column":9}},"4":{"start":{"line":18,"column":12},"end":{"line":18,"column":65}},"5":{"start":{"line":20,"column":12},"end":{"line":20,"column":64}},"6":{"start":{"line":31,"column":4},"end":{"line":43,"column":6}},"7":{"start":{"line":53,"column":4},"end":{"line":53,"column":27}},"8":{"start":{"line":64,"column":4},"end":{"line":64,"column":25}},"9":{"start":{"line":66,"column":4},"end":{"line":258,"column":7}},"10":{"start":{"line":86,"column":12},"end":{"line":86,"column":31}},"11":{"start":{"line":98,"column":12},"end":{"line":102,"column":13}},"12":{"start":{"line":99,"column":16},"end":{"line":101,"column":17}},"13":{"start":{"line":100,"column":19},"end":{"line":100,"column":45}},"14":{"start":{"line":117,"column":12},"end":{"line":117,"column":48}},"15":{"start":{"line":119,"column":12},"end":{"line":123,"column":13}},"16":{"start":{"line":120,"column":16},"end":{"line":120,"column":71}},"17":{"start":{"line":121,"column":19},"end":{"line":123,"column":13}},"18":{"start":{"line":122,"column":16},"end":{"line":122,"column":66}},"19":{"start":{"line":125,"column":12},"end":{"line":125,"column":26}},"20":{"start":{"line":140,"column":12},"end":{"line":140,"column":48}},"21":{"start":{"line":142,"column":12},"end":{"line":146,"column":13}},"22":{"start":{"line":143,"column":16},"end":{"line":143,"column":70}},"23":{"start":{"line":144,"column":19},"end":{"line":146,"column":13}},"24":{"start":{"line":145,"column":16},"end":{"line":145,"column":69}},"25":{"start":{"line":148,"column":12},"end":{"line":148,"column":26}},"26":{"start":{"line":163,"column":12},"end":{"line":163,"column":72}},"27":{"start":{"line":164,"column":12},"end":{"line":164,"column":39}},"28":{"start":{"line":165,"column":12},"end":{"line":165,"column":26}},"29":{"start":{"line":181,"column":12},"end":{"line":181,"column":74}},"30":{"start":{"line":182,"column":12},"end":{"line":182,"column":39}},"31":{"start":{"line":183,"column":12},"end":{"line":183,"column":26}},"32":{"start":{"line":198,"column":12},"end":{"line":198,"column":75}},"33":{"start":{"line":199,"column":12},"end":{"line":199,"column":39}},"34":{"start":{"line":200,"column":12},"end":{"line":200,"column":26}},"35":{"start":{"line":216,"column":12},"end":{"line":216,"column":79}},"36":{"start":{"line":217,"column":12},"end":{"line":217,"column":39}},"37":{"start":{"line":218,"column":12},"end":{"line":218,"column":26}},"38":{"start":{"line":233,"column":12},"end":{"line":233,"column":87}},"39":{"start":{"line":234,"column":12},"end":{"line":234,"column":39}},"40":{"start":{"line":235,"column":12},"end":{"line":235,"column":26}},"41":{"start":{"line":250,"column":12},"end":{"line":250,"column":86}},"42":{"start":{"line":251,"column":12},"end":{"line":251,"column":39}},"43":{"start":{"line":252,"column":12},"end":{"line":252,"column":26}},"44":{"start":{"line":256,"column":12},"end":{"line":256,"column":75}},"45":{"start":{"line":260,"column":4},"end":{"line":260,"column":40}}},"branchMap":{"1":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":8},"end":{"line":17,"column":8}},{"start":{"line":17,"column":8},"end":{"line":17,"column":8}}]},"2":{"line":17,"type":"binary-expr","locations":[{"start":{"line":17,"column":15},"end":{"line":17,"column":27}},{"start":{"line":17,"column":31},"end":{"line":17,"column":58}}]},"3":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":12},"end":{"line":98,"column":12}},{"start":{"line":98,"column":12},"end":{"line":98,"column":12}}]},"4":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":12},"end":{"line":119,"column":12}},{"start":{"line":119,"column":12},"end":{"line":119,"column":12}}]},"5":{"line":121,"type":"if","locations":[{"start":{"line":121,"column":19},"end":{"line":121,"column":19}},{"start":{"line":121,"column":19},"end":{"line":121,"column":19}}]},"6":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":12},"end":{"line":142,"column":12}},{"start":{"line":142,"column":12},"end":{"line":142,"column":12}}]},"7":{"line":144,"type":"if","locations":[{"start":{"line":144,"column":19},"end":{"line":144,"column":19}},{"start":{"line":144,"column":19},"end":{"line":144,"column":19}}]},"8":{"line":163,"type":"binary-expr","locations":[{"start":{"line":163,"column":55},"end":{"line":163,"column":62}},{"start":{"line":163,"column":66},"end":{"line":163,"column":70}}]},"9":{"line":181,"type":"binary-expr","locations":[{"start":{"line":181,"column":57},"end":{"line":181,"column":64}},{"start":{"line":181,"column":68},"end":{"line":181,"column":72}}]},"10":{"line":198,"type":"binary-expr","locations":[{"start":{"line":198,"column":58},"end":{"line":198,"column":65}},{"start":{"line":198,"column":69},"end":{"line":198,"column":73}}]},"11":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":62},"end":{"line":216,"column":69}},{"start":{"line":216,"column":73},"end":{"line":216,"column":77}}]},"12":{"line":233,"type":"binary-expr","locations":[{"start":{"line":233,"column":70},"end":{"line":233,"column":77}},{"start":{"line":233,"column":81},"end":{"line":233,"column":85}}]},"13":{"line":250,"type":"binary-expr","locations":[{"start":{"line":250,"column":69},"end":{"line":250,"column":76}},{"start":{"line":250,"column":80},"end":{"line":250,"column":84}}]}},"code":["(function () { YUI.add('plugin', function (Y, NAME) {",""," /**"," * Provides the base Plugin class, which plugin developers should extend, when creating custom plugins"," *"," * @module plugin"," */",""," /**"," * The base class for all Plugin instances."," *"," * @class Plugin.Base"," * @extends Base"," * @param {Object} config Configuration object with property name/value pairs."," */"," function Plugin(config) {"," if (! (this.hasImpl && this.hasImpl(Y.Plugin.Base)) ) {"," Plugin.superclass.constructor.apply(this, arguments);"," } else {"," Plugin.prototype.initializer.apply(this, arguments);"," }"," }",""," /**"," * Object defining the set of attributes supported by the Plugin.Base class"," *"," * @property ATTRS"," * @type Object"," * @static"," */"," Plugin.ATTRS = {",""," /**"," * The plugin's host object."," *"," * @attribute host"," * @writeonce"," * @type Plugin.Host"," */"," host : {"," writeOnce: true"," }"," };",""," /**"," * The string identifying the Plugin.Base class. Plugins extending"," * Plugin.Base should set their own NAME value."," *"," * @property NAME"," * @type String"," * @static"," */"," Plugin.NAME = 'plugin';",""," /**"," * The name of the property the the plugin will be attached to"," * when plugged into a Plugin Host. Plugins extending Plugin.Base,"," * should set their own NS value."," *"," * @property NS"," * @type String"," * @static"," */"," Plugin.NS = 'plugin';",""," Y.extend(Plugin, Y.Base, {",""," /**"," * The list of event handles for event listeners or AOP injected methods"," * applied by the plugin to the host object."," *"," * @property _handles"," * @private"," * @type Array"," * @value null"," */"," _handles: null,",""," /**"," * Initializer lifecycle implementation."," *"," * @method initializer"," * @param {Object} config Configuration object with property name/value pairs."," */"," initializer : function(config) {"," this._handles = [];"," },",""," /**"," * Destructor lifecycle implementation."," *"," * Removes any event listeners or injected methods applied by the Plugin"," *"," * @method destructor"," */"," destructor: function() {"," // remove all handles"," if (this._handles) {"," for (var i = 0, l = this._handles.length; i < l; i++) {"," this._handles[i].detach();"," }"," }"," },",""," /**"," * Listens for the \"on\" moment of events fired by the host,"," * or injects code \"before\" a given method on the host."," *"," * @method doBefore"," *"," * @param strMethod {String} The event to listen for, or method to inject logic before."," * @param fn {Function} The handler function. For events, the \"on\" moment listener. For methods, the function to execute before the given method is executed."," * @param context {Object} An optional context to call the handler with. The default context is the plugin instance."," * @return handle {EventHandle} The detach handle for the handler."," */"," doBefore: function(strMethod, fn, context) {"," var host = this.get(\"host\"), handle;",""," if (strMethod in host) { // method"," handle = this.beforeHostMethod(strMethod, fn, context);"," } else if (host.on) { // event"," handle = this.onHostEvent(strMethod, fn, context);"," }",""," return handle;"," },",""," /**"," * Listens for the \"after\" moment of events fired by the host,"," * or injects code \"after\" a given method on the host."," *"," * @method doAfter"," *"," * @param strMethod {String} The event to listen for, or method to inject logic after."," * @param fn {Function} The handler function. For events, the \"after\" moment listener. For methods, the function to execute after the given method is executed."," * @param context {Object} An optional context to call the handler with. The default context is the plugin instance."," * @return handle {EventHandle} The detach handle for the listener."," */"," doAfter: function(strMethod, fn, context) {"," var host = this.get(\"host\"), handle;",""," if (strMethod in host) { // method"," handle = this.afterHostMethod(strMethod, fn, context);"," } else if (host.after) { // event"," handle = this.afterHostEvent(strMethod, fn, context);"," }",""," return handle;"," },",""," /**"," * Listens for the \"on\" moment of events fired by the host object."," *"," * Listeners attached through this method will be detached when the plugin is unplugged."," *"," * @method onHostEvent"," * @param {String | Object} type The event type."," * @param {Function} fn The listener."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the listener."," */"," onHostEvent : function(type, fn, context) {"," var handle = this.get(\"host\").on(type, fn, context || this);"," this._handles.push(handle);"," return handle;"," },",""," /**"," * Listens for the \"on\" moment of events fired by the host object one time only."," * The listener is immediately detached when it is executed."," *"," * Listeners attached through this method will be detached when the plugin is unplugged."," *"," * @method onceHostEvent"," * @param {String | Object} type The event type."," * @param {Function} fn The listener."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the listener."," */"," onceHostEvent : function(type, fn, context) {"," var handle = this.get(\"host\").once(type, fn, context || this);"," this._handles.push(handle);"," return handle;"," },",""," /**"," * Listens for the \"after\" moment of events fired by the host object."," *"," * Listeners attached through this method will be detached when the plugin is unplugged."," *"," * @method afterHostEvent"," * @param {String | Object} type The event type."," * @param {Function} fn The listener."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the listener."," */"," afterHostEvent : function(type, fn, context) {"," var handle = this.get(\"host\").after(type, fn, context || this);"," this._handles.push(handle);"," return handle;"," },",""," /**"," * Listens for the \"after\" moment of events fired by the host object one time only."," * The listener is immediately detached when it is executed."," *"," * Listeners attached through this method will be detached when the plugin is unplugged."," *"," * @method onceAfterHostEvent"," * @param {String | Object} type The event type."," * @param {Function} fn The listener."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the listener."," */"," onceAfterHostEvent : function(type, fn, context) {"," var handle = this.get(\"host\").onceAfter(type, fn, context || this);"," this._handles.push(handle);"," return handle;"," },",""," /**"," * Injects a function to be executed before a given method on host object."," *"," * The function will be detached when the plugin is unplugged."," *"," * @method beforeHostMethod"," * @param {String} method The name of the method to inject the function before."," * @param {Function} fn The function to inject."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the injected function."," */"," beforeHostMethod : function(strMethod, fn, context) {"," var handle = Y.Do.before(fn, this.get(\"host\"), strMethod, context || this);"," this._handles.push(handle);"," return handle;"," },",""," /**"," * Injects a function to be executed after a given method on host object."," *"," * The function will be detached when the plugin is unplugged."," *"," * @method afterHostMethod"," * @param {String} method The name of the method to inject the function after."," * @param {Function} fn The function to inject."," * @param {Object} context The execution context. Defaults to the plugin instance."," * @return handle {EventHandle} The detach handle for the injected function."," */"," afterHostMethod : function(strMethod, fn, context) {"," var handle = Y.Do.after(fn, this.get(\"host\"), strMethod, context || this);"," this._handles.push(handle);"," return handle;"," },",""," toString: function() {"," return this.constructor.NAME + '[' + this.constructor.NS + ']';"," }"," });",""," Y.namespace(\"Plugin\").Base = Plugin;","","","}, '3.13.0', {\"requires\": [\"base-base\"]});","","}());"]};