!functiona(b,c,d){functione(g,h){if(!c[g]){if(!b[g]){vari="function"==typeofrequire&&require;if(!h&&i)returni(g,!0);if(f)returnf(g,!0);varj=newError("Cannot find module '"+g+"'");throwj.code="MODULE_NOT_FOUND",j}vark=c[g]={exports:{}};b[g][0].call(k.exports,function(a){varc=b[g][1][a];returne(c?c:a)},k,k.exports,a,b,c,d)}returnc[g].exports}for(varf="function"==typeofrequire&&require,g=0;g<d.length;g++)e(d[g]);returne}({1:[function(a,b,c){(function(a){functionc(){try{vara=newd("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}vard=a.CustomEvent;b.exports=c()?d:"function"==typeofdocument.createEvent?function(a,b){varc=document.createEvent("CustomEvent");returnb?c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail):c.initCustomEvent(a,!1,!1,void0),c}:function(a,b){varc=document.createEventObject();returnc.type=a,b?(c.bubbles=Boolean(b.bubbles),c.cancelable=Boolean(b.cancelable),c.detail=b.detail):(c.bubbles=!1,c.cancelable=!1,c.detail=void0),c}}).call(this,"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{}],2:[function(a,b,c){(function(d){"use strict";functione(a,b){if(!(ainstanceofb))thrownewTypeError("Cannot call a class as a function")}c.__esModule=!0;varf=a("custom-event"),g=function(){functiona(b){varc=this;if(e(this,a),this.triggers=document.querySelectorAll(b),!this.triggers.length)thrownewError("No matches were found for the provided selector");[].forEach.call(this.triggers,function(a){returnc.bind(a)})}returna.prototype.bind=function(a){varb=this;a.addEventListener("click",function(a){returnb.validate(a)})},a.prototype.validate=function(a){varb=a.currentTarget,c=b.getAttribute("data-action")||"copy",d=b.getAttribute("data-target"),e=b.getAttribute("data-text");if("copy"!==c&&"cut"!==c)thrownewError('Invalid "data-action" value, use either "copy" or "cut"');if(!d&&!e)thrownewError('Missing required attributes, use either "data-target" or "data-text"');if(d&&(d=document.getElementById(d),!d))thrownewError('Invalid "data-target" selector, use a value that matches an ID');newh(c,d,e,b)},a}();c["default"]=g;varh=function(){functiona(b,c,d,f){e(this,a),this.action=b,this.target=c,this.text=d,this.trigger=f,this.selectedText="",this.text?this.selectValue():this.target&&this.selectTarget()}returna.prototype.selectValue=function(){vara=document.createElement("input");a.style.opacity=0,a.style.zIndex=-1,a.value=this.text,this.selectedText=this.text,document.body.appendChild(a),a.select(),this.copy(),document.body.removeChild(a)},a.prototype.selectTarget=function(){if("INPUT"===this.target.nodeName||"TEXTAREA"===this.target.nodeName)this.target.select(),this.selectedText=this.target.value;else{vara=document.createRange(),b=window.getSelection();a.selectNode(this.target),b.addRange(a),this.selectedText=b.toString()}this.copy()},a.prototype.copy=function(){vara=void0;try{a=document.execCommand(this.action)}catch(b){a=!1}a?this.fireEvent("success",{action:this.action,text:this.selectedText}):this.fireEvent("error","Cannot execute "+this.action+" operation"),this.clearSelection()},a.prototype.clearSelection=function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},a.prototype.fireEvent=function(a,b){varc=newf(a,{detail:b});this.trigger.dispatchEvent(c)},a}();d.Clipboard=g,b.exports=c["default"]}).call(this,"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{"custom-event":1}]},{},[2]);