(function(){"use strict";u8.Base.Clipboard=function(){this._contents=null};$.extend(u8.Base.Clipboard.prototype,{copy:function(t){$command(this._getSource(t),"Clipboard/Copy",{})},paste:function(t){$command(this._getSource(t),"Clipboard/Paste",$.extend({},this._args))},setData:function(t,e){this._contents={type:t,data:e}},is:function(t){return this._contents&&(!t||this._contents.type==t)},getData:function(){return this._contents&&this._contents.data},_getSource:function(t){var e=t.source;if(!e){e=$w("work").document.activeElement}if(u8.Base.Dom.isDomElement(e)){e=u8.Base.Widgets.Tools.closest(e)}return e}});u8.Base.Clipboard.makeClass({name:"Clipboard"});u8.services.add("clipboard",u8.Base.Clipboard)})();