/**
 * skylark-domx-plugins-base - The skylark plugins library for dom api extension.
 * @author Hudaokeji Co.,Ltd
 * @version v0.9.0
 * @link www.skylarkjs.org
 * @license MIT
 */
define(["skylark-langx-ns","skylark-langx-types","skylark-langx-objects","skylark-langx-funcs","skylark-langx-events/Emitter","skylark-domx-noder","skylark-domx-data","skylark-domx-eventer","skylark-domx-finder","skylark-domx-geom","skylark-domx-styler","skylark-domx-fx","skylark-domx-query","skylark-domx-velm","./plugins"],function(t,n,i,e,s,o,r,l,a,u,h,p,m,y,f){"use strict";Array.prototype.slice,Array.prototype.concat;function c(t){return t.hasOwnProperty("superclass")?t.superclass:Object.getPrototypeOf(t)}var k=s.inherit({klassName:"Plugin",_construct:function(t,n){this._elm=t,this._initOptions(n)},_initOptions:function(t){var n=this.constructor,e=n.cache=n.hasOwnProperty("cache")?n.cache:{},s=e.defaults;if(!s){var o=[];do{if(o.unshift(n),n===k)break;n=c(n)}while(n);s=e.defaults={};for(var r=0;r<o.length;r++)(n=o[r]).prototype.hasOwnProperty("options")&&i.mixin(s,n.prototype.options,!0),n.hasOwnProperty("options")&&i.mixin(s,n.options,!0)}return Object.defineProperty(this,"options",{value:i.mixin({},s,t,!0)}),this.options},destroy:function(){this._destroy(),this.unlistenTo(),r.removeData(this._elm,this.pluginName)},_destroy:e.noop,_delay:function(t,n){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},n||0)},elmx:function(t){return t?y(t):(this._velm||(this._velm=y(this._elm)),this._velm)},$:function(t){return t?m(t,this._elm):(this._$elm||(this._$elm=m(this._elm)),this._$elm)},option:function(t,n){var e,s,o,r=t;if(0===arguments.length)return i.mixin({},this.options);if("string"==typeof t)if(r={},t=(e=t.split(".")).shift(),e.length){for(s=r[t]=i.mixin({},this.options[t]),o=0;o<e.length-1;o++)s[e[o]]=s[e[o]]||{},s=s[e[o]];if(t=e.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=n}return this._setOptions(r),this},_setOptions:function(t){var n;for(n in t)this._setOption(n,t[n]);return this},_setOption:function(t,n){return this.options[t]=n,this},getUID:function(t){t=t||"plugin";do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},elm:function(){return this._elm}});return f.Plugin=k});
//# sourceMappingURL=sourcemaps/plugin.js.map
