!function(t){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=t();elseif("function"==typeofdefine&&define.amd)define([],t);else{vare;e="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,e.Clipboard=t()}}(function(){vart,e,n;returnfunctiont(e,n,r){functiono(a,c){if(!n[a]){if(!e[a]){vars="function"==typeofrequire&&require;if(!c&&s)returns(a,!0);if(i)returni(a,!0);varu=newError("Cannot find module '"+a+"'");throwu.code="MODULE_NOT_FOUND",u}varl=n[a]={exports:{}};e[a][0].call(l.exports,function(t){varn=e[a][1][t];returno(n?n:t)},l,l.exports,t,e,n,r)}returnn[a].exports}for(vari="function"==typeofrequire&&require,a=0;a<r.length;a++)o(r[a]);returno}({1:[function(t,e,n){varr=t("matches-selector");e.exports=function(t,e,n){for(varo=n?t:t.parentNode;o&&o!==document;){if(r(o,e))returno;o=o.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){functionr(t,e,n,r,i){vara=o.apply(this,arguments);returnt.addEventListener(n,a,i),{destroy:function(){t.removeEventListener(n,a,i)}}}functiono(t,e,n,r){returnfunction(n){n.delegateTarget=i(n.target,e,!0),n.delegateTarget&&r.call(t,n)}}vari=t("closest");e.exports=r},{closest:1}],3:[function(t,e,n){n.node=function(t){returnvoid0!==t&&tinstanceofHTMLElement&&1===t.nodeType},n.nodeList=function(t){vare=Object.prototype.toString.call(t);returnvoid0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"int&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeoft||tinstanceofString},n.fn=function(t){vare=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){functionr(t,e,n){if(!t&&!e&&!n)thrownewError("Missing required arguments");if(!c.string(e))thrownewTypeError("Second argument must be a String");if(!c.fn(n))thrownewTypeError("Third argument must be a Function");if(c.node(t))returno(t,e,n);if(c.nodeList(t))returni(t,e,n);if(c.string(t))returna(t,e,n);thrownewTypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}functiono(t,e,n){returnt.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}functioni(t,e,n){returnArray.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}functiona(t,e,n){returns(document.body,t,e,n)}varc=t("./is"),s=t("delegate");e.exports=r},{"./is":3,delegate:2}],5:[function(t,e,n){functionr(t,e){if(i)returni.call(t,e);for(varn=t.parentNode.querySelectorAll(e),r=0;r<n.length;++r)if(n[r]==t)return!0;return!1}varo=Element.prototype,i=o.matchesSelector||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;e.exports=r},{}],6:[function(t,e,n){functionr(t){vare;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();varn=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}returne}e.exports=r},{}],7:[function(t,e,n){functionr(){}r.prototype={on:function(t,e,n){varr=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){functionr(){o.off(t,r),e.apply(n,arguments)}varo=this;returnr._=e,this.on(t,r,n)},emit:function(t){vare=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;for(r;o>r;r++)n[r].fn.apply(n[r].ctx,e);returnthis},off:function(t,e){varn=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(vari=0,a=r.length;a>i;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);returno.length?n[t]=o:deleten[t],this}},e.exports=r},{}],8:[function(t,e,n){"use strict";functionr(t){returnt&&t.__esModule?t:{"default":t}}functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}n.__esModule=!0;vari=function(){functiont(t,e){for(varn=0;n<e.length;n++){varr=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}returnfunction(e,n,r){returnn&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("select"),c=r(a),s=function(){functiont(e){o(this,t),this.resolveOptions(e),this.initSelection()}returnt.prototype.resolveOptions=functiont(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""},t.prototype.initSelection=functiont(){if(this.text&&this.target)thrownewError('Multiple attributes declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!this.target)thrownewError('Missing required attributes, use either "target" or "text"');this.selectTarget()}},t.prototype.selectFake=functiont(){vare=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){returne.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=c.default(this.fakeElem),this.copyText()},t.prototype.removeFake=functiont(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=functiont(){this.selectedText=c.default(this.target),this.copyText()},t.prototype.copyText=functiont(){vare=void0;try{e=document.execCommand(this.action)}catch(n){e=!1}this.handleResult(e)},t.prototype.handleResult=functiont(e){e?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=functiont(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=functiont(){this.removeFake()},i(t,[{key:"action",set:functiont(){vare=arguments.length<=0||void0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!==this._action&&"cut"!==this._action)thrownewError('Invalid "action" value, use either "copy" or "cut"')},get:functiont(){returnthis._action}},{key:"target",set:functiont(e){if(void0!==e){if(!e||"object"!=typeofe||1!==e.nodeType)thrownewError('Invalid "target" value, use a valid Element');this._target=e}},get:functiont(){returnthis._target}}]),t}();n.default=s,e.exports=n.default},{select:6}],9:[function(t,e,n){"use strict";functionr(t){returnt&&t.__esModule?t:{"default":t}}functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functioni(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}functiona(t,e){varn="data-clipboard-"+t;if(e.hasAttribute(n))returne.getAttribute(n)}n.__esModule=!0;varc=t("./clipboard-action"),s=r(c),u=t("tiny-emitter"),l=r(u),f=t("good-listener"),d=r(f),h=function(t){functione(n,r){o(this,e),t.call(this),this.resolveOptions(r),this.listenClick(n)}returni(e,t),e.prototype.resolveOptions=functiont(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.action="function"==typeofe.action?e.action:this.defaultAction,this.target="function"==typeofe.target?e.target:this.defaultTarget,this.text="function"==typeofe.text?e.text:this.defaultText},e.prototype.listenClick=functiont(e){varn=this;this.listener=d.default(e,"click",function(t){returnn.onClick(t)})},e.prototype.onClick=functiont(e){varn=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=news.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})},e.prototype.defaultAction=functiont(e){returna("action",e)},e.prototype.defaultTarget=functiont(e){varn=a("target",e);returnn?document.querySelector(n):void0},e.prototype.defaultText=functiont(e){returna("text",e)},e.prototype.destroy=functiont(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(l.default);n.default=h,e.exports=n.default},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});
\ No newline at end of file
!function(t){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=t();elseif("function"==typeofdefine&&define.amd)define([],t);else{vare;e="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,e.Clipboard=t()}}(function(){vart,e,n;returnfunctiont(e,n,o){functioni(c,a){if(!n[c]){if(!e[c]){vars="function"==typeofrequire&&require;if(!a&&s)returns(c,!0);if(r)returnr(c,!0);varl=newError("Cannot find module '"+c+"'");throwl.code="MODULE_NOT_FOUND",l}varu=n[c]={exports:{}};e[c][0].call(u.exports,function(t){varn=e[c][1][t];returni(n?n:t)},u,u.exports,t,e,n,o)}returnn[c].exports}for(varr="function"==typeofrequire&&require,c=0;c<o.length;c++)i(o[c]);returni}({1:[function(t,e,n){varo=t("matches-selector");e.exports=function(t,e,n){for(vari=n?t:t.parentNode;i&&i!==document;){if(o(i,e))returni;i=i.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){functiono(t,e,n,o,r){varc=i.apply(this,arguments);returnt.addEventListener(n,c,r),{destroy:function(){t.removeEventListener(n,c,r)}}}functioni(t,e,n,o){returnfunction(n){n.delegateTarget=r(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}varr=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){returnvoid0!==t&&tinstanceofHTMLElement&&1===t.nodeType},n.nodeList=function(t){vare=Object.prototype.toString.call(t);returnvoid0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"int&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeoft||tinstanceofString},n.fn=function(t){vare=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){functiono(t,e,n){if(!t&&!e&&!n)thrownewError("Missing required arguments");if(!a.string(e))thrownewTypeError("Second argument must be a String");if(!a.fn(n))thrownewTypeError("Third argument must be a Function");if(a.node(t))returni(t,e,n);if(a.nodeList(t))returnr(t,e,n);if(a.string(t))returnc(t,e,n);thrownewTypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}functioni(t,e,n){returnt.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}functionr(t,e,n){returnArray.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}functionc(t,e,n){returns(document.body,t,e,n)}vara=t("./is"),s=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){functiono(t,e){if(r)returnr.call(t,e);for(varn=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}vari=Element.prototype,r=i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){functiono(t){vare;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();varn=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}returne}e.exports=o},{}],7:[function(t,e,n){functiono(){}o.prototype={on:function(t,e,n){varo=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){functiono(){i.off(t,o),e.apply(n,arguments)}vari=this;returno._=e,this.on(t,o,n)},emit:function(t){vare=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;i>o;o++)n[o].fn.apply(n[o].ctx,e);returnthis},off:function(t,e){varn=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(varr=0,c=o.length;c>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);returni.length?n[t]=i:deleten[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if("function"==typeoft&&t.amd)t(["module","select"],r);elseif("undefined"!=typeofo)r(n,e("select"));else{varc={exports:{}};r(c,i.select),i.clipboardAction=c.exports}}(this,function(t,e){"use strict";functionn(t){returnt&&t.__esModule?t:{"default":t}}functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vari=n(e),r="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol?"symbol":typeoft},c=function(){functiont(t,e){for(varn=0;n<e.length;n++){varo=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,n,o){returnn&&t(e.prototype,n),o&&t(e,o),e}}(),a=function(){functiont(e){o(this,t),this.resolveOptions(e),this.initSelection()}returnt.prototype.resolveOptions=functiont(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""},t.prototype.initSelection=functiont(){this.text?this.selectFake():this.target&&this.selectTarget()},t.prototype.selectFake=functiont(){vare=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){returne.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="fixed",this.fakeElem.style[n?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()},t.prototype.removeFake=functiont(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=functiont(){this.selectedText=(0,i.default)(this.target),this.copyText()},t.prototype.copyText=functiont(){vare=void0;try{e=document.execCommand(this.action)}catch(n){e=!1}this.handleResult(e)},t.prototype.handleResult=functiont(e){e?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=functiont(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=functiont(){this.removeFake()},c(t,[{key:"action",set:functiont(){vare=arguments.length<=0||void0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!==this._action&&"cut"!==this._action)thrownewError('Invalid "action" value, use either "copy" or "cut"')},get:functiont(){returnthis._action}},{key:"target",set:functiont(e){if(void0!==e){if(!e||"object"!==("undefined"==typeofe?"undefined":r(e))||1!==e.nodeType)thrownewError('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))thrownewError('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))thrownewError('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:functiont(){returnthis._target}}]),t}();t.exports=a})},{select:6}],9:[function(e,n,o){!function(i,r){if("function"==typeoft&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);elseif("undefined"!=typeofo)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{varc={exports:{}};r(c,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=c.exports}}(this,function(t,e,n,o){"use strict";functioni(t){returnt&&t.__esModule?t:{"default":t}}functionr(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionc(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}functions(t,e){varn="data-clipboard-"+t;if(e.hasAttribute(n))returne.getAttribute(n)}varl=i(e),u=i(n),f=i(o),d=function(t){functione(n,o){r(this,e);vari=c(this,t.call(this));returni.resolveOptions(o),i.listenClick(n),i}returna(e,t),e.prototype.resolveOptions=functiont(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.action="function"==typeofe.action?e.action:this.defaultAction,this.target="function"==typeofe.target?e.target:this.defaultTarget,this.text="function"==typeofe.text?e.text:this.defaultText},e.prototype.listenClick=functiont(e){varn=this;this.listener=(0,f.default)(e,"click",function(t){returnn.onClick(t)})},e.prototype.onClick=functiont(e){varn=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=newl.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})},e.prototype.defaultAction=functiont(e){returns("action",e)},e.prototype.defaultTarget=functiont(e){varn=s("target",e);returnn?document.querySelector(n):void0},e.prototype.defaultText=functiont(e){returns("text",e)},e.prototype.destroy=functiont(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(u.default);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});