text: function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e,t,n){"use strict";!function e(t,n,o){function r(s,l){if(!n[s]){if(!t[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){var n=t[s][1][e];return r(n||e)}),c,c.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(o,r,a){var s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});var l,i,u,c,d=o("./modules/handle-dom"),f=o("./modules/utils"),p=o("./modules/handle-swal-dom"),m=o("./modules/handle-click"),v=s(o("./modules/handle-key")),y=s(o("./modules/default-params")),b=s(o("./modules/set-params"));a.default=u=c=function(){function o(e){var t=r;return t[e]===n?y.default[e]:t[e]}var r=arguments[0];if(d.addClass(t.body,"stop-scrolling"),p.resetInput(),r===n)return f.logStr("SweetAlert expects at least 1 attribute!"),!1;var a=f.extend({},y.default);switch(_typeof(r)){case"string":a.title=r,a.text=arguments[1]||"",a.type=arguments[2]||"";break;case"object":if(r.title===n)return f.logStr('Missing "title" argument!'),!1;for(var s in a.title=r.title,y.default)a[s]=o(s);a.confirmButtonText=a.showCancelButton?"Confirm":y.default.confirmButtonText,a.confirmButtonText=o("confirmButtonText"),a.doneFunction=arguments[1]||null;break;default:return f.logStr('Unexpected type of argument! Expected "string" or "object", got '+_typeof(r)),!1}b.default(a),p.fixVerticalPosition(),p.openModal(arguments[1]);for(var u=p.getModal(),h=u.querySelectorAll("button"),g=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],w=function(e){return m.handleButton(e,a,u)},C=0;C<h.length;C++)for(var S=0;S<g.length;S++){var x=g[S];h[C][x]=w}p.getOverlay().onclick=w,l=e.onkeydown;var k=function(e){return v.default(e,a,u)};e.onkeydown=k,e.onfocus=function(){setTimeout((function(){i!==n&&(i.focus(),i=n)}),0)},c.enableButtons()},u.setDefaults=c.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=_typeof(e))throw new Error("userParams has to be a object");f.extend(y.default,e)},u.close=c.close=function(){var o=p.getModal();d.fadeOut(p.getOverlay(),5),d.fadeOut(o,5),d.removeClass(o,"showSweetAlert"),d.addClass(o,"hideSweetAlert"),d.removeClass(o,"visible");var r=o.querySelector(".sa-icon.sa-success");d.removeClass(r,"animate"),d.removeClass(r.querySelector(".sa-tip"),"animateSuccessTip"),d.removeClass(r.querySelector(".sa-long"),"animateSuccessLong");var a=o.querySelector(".sa-icon.sa-error");d.removeClass(a,"animateErrorIcon"),d.removeClass(a.querySelector(".sa-x-mark"),"animateXMark");var s=o.querySelector(".sa-icon.sa-warning");return d.removeClass(s,"pulseWarning"),d.removeClass(s.querySelector(".sa-body"),"pulseWarningIns"),d.removeClass(s.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout((function(){var e=o.getAttribute("data-custom-class");d.removeClass(o,e)}),300),d.removeClass(t.body,"stop-scrolling"),e.onkeydown=l,e.previousActiveElement&&e.previousActiveElement.focus(),i=n,clearTimeout(o.timeout),!0},u.showInputError=c.showInputError=function(e){var t=p.getModal(),n=t.querySelector(".sa-input-error");d.addClass(n,"show");var o=t.querySelector(".sa-error-container");d.addClass(o,"show"),o.querySelector("p").innerHTML=e,setTimeout((function(){u.enableButtons()}),1),t.querySelector("input").focus()},u.resetInputError=c.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=p.getModal(),n=t.querySelector(".sa-input-error");d.removeClass(n,"show");var o=t.querySelector(".sa-error-container");d.removeClass(o,"show")},u.disableButtons=c.disableButtons=function(){var e=p.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!0,n.disabled=!0},u.enableButtons=c.enableButtons=function(){var e=p.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!1,n.disabled=!1},void 0!==e?e.sweetAlert=e.swal=u:f.logStr("SweetAlert is a frontend module!"),r.exports=a.default},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});n.default={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1},t.exports=n.default},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var r=t("./utils"),a=(t("./handle-swal-dom"),t("./handle-dom")),s=function(e,t){var n=!0;a.hasClass(e,"show-input")&&((n=e.querySelector("input").value)||(n="")),t.doneFunction(n),t.closeOnConfirm&&sweetAlert.close(),t.showLoaderOnConfirm&&sweetAlert.disableButtons()},l=function(e,t){var n=String(t.doneFunction).replace(/\s/g,"");"function("===n.substring(0,9)&&")"!==n.substring(9,10)&&t.doneFunction(!1),t.closeOnCancel&&sweetAlert.close()};o.default={handleButton:function(t,n,o){function i(e){m&&n.confirmButtonColor&&(p.style.backgroundColor=e)}var u,c,d,f=t||e.event,p=f.target||f.srcElement,m=-1!==p.className.indexOf("confirm"),v=-1!==p.className.indexOf("sweet-overlay"),y=a.hasClass(o,"visible"),b=n.doneFunction&&"true"===o.getAttribute("data-has-done-function");switch(m&&n.confirmButtonColor&&(u=n.confirmButtonColor,c=r.colorLuminance(u,-.04),d=r.colorLuminance(u,-.14)),f.type){case"mouseover":case"mouseup":i(c);break;case"mouseout":i(u);break;case"mousedown":i(d);break;case"focus":var h=o.querySelector("button.confirm"),g=o.querySelector("button.cancel");m?g.style.boxShadow="none":h.style.boxShadow="none";break;case"click":var w=o===p,C=a.isDescendant(o,p);if(!w&&!C&&y&&!n.allowOutsideClick)break;m&&b&&y?s(o,n):b&&y||v?l(o,n):a.isDescendant(o,p)&&"BUTTON"===p.tagName&&sweetAlert.close()}},handleConfirm:s,handleCancel:l},n.exports=o.default},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(n,o,r){Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e){e.style.opacity="",e.style.display="block"},l=function(e){e.style.opacity="",e.style.display="none"};r.hasClass=a,r.addClass=function(e,t){a(e,t)||(e.className+=" "+t)},r.removeClass=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(a(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},r.escapeHtml=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},r._show=s,r.show=function(e){if(e&&!e.length)return s(e);for(var t=0;t<e.length;++t)s(e[t])},r._hide=l,r.hide=function(e){if(e&&!e.length)return l(e);for(var t=0;t<e.length;++t)l(e[t])},r.isDescendant=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},r.getTopMargin=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},r.fadeIn=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)}));o()}e.style.display="block"},r.fadeOut=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(o,t):e.style.display="none"}));o()},r.fireClick=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var r=t.createEvent("MouseEvents");r.initEvent("click",!1,!1),n.dispatchEvent(r)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},r.stopEventPropagation=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)}},{}],5:[function(t,o,r){Object.defineProperty(r,"__esModule",{value:!0});var a=t("./handle-dom"),s=t("./handle-swal-dom");r.default=function(t,o,r){var l=t||e.event,i=l.keyCode||l.which,u=r.querySelector("button.confirm"),c=r.querySelector("button.cancel"),d=r.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m<d.length;m++)if(f===d[m]){p=m;break}9===i?(f=-1===p?u:p===d.length-1?d[0]:d[p+1],a.stopEventPropagation(l),f.focus(),o.confirmButtonColor&&s.setFocusStyle(f,o.confirmButtonColor)):13===i?("INPUT"===f.tagName&&(f=u,u.focus()),f=-1===p?u:n):27===i&&!0===o.allowEscapeKey?(f=c,a.fireClick(f,l)):f=n}},o.exports=r.default},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(n,o,r){var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var s=n("./utils"),l=n("./handle-dom"),i=a(n("./default-params")),u=a(n("./injected-html")),c=function(){var e=t.createElement("div");for(e.innerHTML=u.default;e.firstChild;)t.body.appendChild(e.firstChild)},d=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=t.querySelector(".sweet-alert");return e||(c(),e=d()),e})),f=function(){var e=d();return e?e.querySelector("input"):void 0},p=function(){return t.querySelector(".sweet-overlay")},m=function(e){if(e&&13===e.keyCode)return!1;var t=d(),n=t.querySelector(".sa-input-error");l.removeClass(n,"show");var o=t.querySelector(".sa-error-container");l.removeClass(o,"show")};r.sweetAlertInitialize=c,r.getModal=d,r.getOverlay=p,r.getInput=f,r.setFocusStyle=function(e,t){var n=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},r.openModal=function(n){var o=d();l.fadeIn(p(),10),l.show(o),l.addClass(o,"showSweetAlert"),l.removeClass(o,"hideSweetAlert"),e.previousActiveElement=t.activeElement,o.querySelector("button.confirm").focus(),setTimeout((function(){l.addClass(o,"visible")}),500);var r=o.getAttribute("data-timer");if("null"!==r&&""!==r){var a=n;o.timeout=setTimeout((function(){(a?"true"===o.getAttribute("data-has-done-function"):null)?a(null):sweetAlert.close()}),r)}},r.resetInput=function(){var e=d(),t=f();l.removeClass(e,"show-input"),t.value=i.default.inputValue,t.setAttribute("type",i.default.inputType),t.setAttribute("placeholder",i.default.inputPlaceholder),m()},r.resetInputError=m,r.fixVerticalPosition=function(){d().style.marginTop=l.getTopMargin(d())}},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});n.default='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n      <span class="sa-x-mark">\n        <span class="sa-line sa-left"></span>\n        <span class="sa-line sa-right"></span>\n      </span>\n    </div><div class="sa-icon sa-warning">\n      <span class="sa-body"></span>\n      <span class="sa-dot"></span>\n    </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n      <span class="sa-line sa-tip"></span>\n      <span class="sa-line sa-long"></span>\n\n      <div class="sa-placeholder"></div>\n      <div class="sa-fix"></div>\n    </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n    <p>Text</p>\n    <fieldset>\n      <input type="text" tabIndex="3" />\n      <div class="sa-input-error"></div>\n    </fieldset><div class="sa-error-container">\n      <div class="icon">!</div>\n      <p>Not valid!</p>\n    </div><div class="sa-button-container">\n      <button class="cancel" tabIndex="2">Cancel</button>\n      <div class="sa-confirm-button-container">\n        <button class="confirm" tabIndex="1">OK</button><div class="la-ball-fall">\n          <div></div>\n          <div></div>\n          <div></div>\n        </div>\n      </div>\n    </div></div>',t.exports=n.default},{}],8:[function(e,t,o){Object.defineProperty(o,"__esModule",{value:!0});var r=e("./utils"),a=e("./handle-swal-dom"),s=e("./handle-dom"),l=["error","warning","info","success","input","prompt"];o.default=function(e){var t=a.getModal(),o=t.querySelector("h2"),i=t.querySelector("p"),u=t.querySelector("button.cancel"),c=t.querySelector("button.confirm");if(o.innerHTML=e.html?e.title:s.escapeHtml(e.title).split("\n").join("<br>"),i.innerHTML=e.html?e.text:s.escapeHtml(e.text||"").split("\n").join("<br>"),e.text&&s.show(i),e.customClass)s.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");s.removeClass(t,d),t.setAttribute("data-custom-class","")}if(s.hide(t.querySelectorAll(".sa-icon")),e.type&&!r.isIE8()){var f=function(){for(var o=!1,r=0;r<l.length;r++)if(e.type===l[r]){o=!0;break}if(!o)return logStr("Unknown alert type: "+e.type),{v:!1};var i=n;-1!==["success","error","warning","info"].indexOf(e.type)&&(i=t.querySelector(".sa-icon.sa-"+e.type),s.show(i));var u=a.getInput();switch(e.type){case"success":s.addClass(i,"animate"),s.addClass(i.querySelector(".sa-tip"),"animateSuccessTip"),s.addClass(i.querySelector(".sa-long"),"animateSuccessLong");break;case"error":s.addClass(i,"animateErrorIcon"),s.addClass(i.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":s.addClass(i,"pulseWarning"),s.addClass(i.querySelector(".sa-body"),"pulseWarningIns"),s.addClass(i.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":u.setAttribute("type",e.inputType),u.value=e.inputValue,u.setAttribute("placeholder",e.inputPlaceholder),s.addClass(t,"show-input"),setTimeout((function(){u.focus(),u.addEventListener("keyup",swal.resetInputError)}),400)}}();if("object"==_typeof(f))return f.v}if(e.imageUrl){var p=t.querySelector(".sa-icon.sa-custom");p.style.backgroundImage="url("+e.imageUrl+")",s.show(p);var m=80,v=80;if(e.imageSize){var y=e.imageSize.toString().split("x"),b=y[0],h=y[1];b&&h?(m=b,v=h):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}p.setAttribute("style",p.getAttribute("style")+"width:"+m+"px; height:"+v+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?u.style.display="inline-block":s.hide(u),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?c.style.display="inline-block":s.hide(c),e.cancelButtonText&&(u.innerHTML=s.escapeHtml(e.cancelButtonText)),e.confirmButtonText&&(c.innerHTML=s.escapeHtml(e.confirmButtonText)),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor,c.style.borderLeftColor=e.confirmLoadingButtonColor,c.style.borderRightColor=e.confirmLoadingButtonColor,a.setFocusStyle(c,e.confirmButtonColor)),t.setAttribute("data-allow-outside-click",e.allowOutsideClick);var g=!!e.doneFunction;t.setAttribute("data-has-done-function",g),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)},t.exports=o.default},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});o.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},o.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},o.isIE8=function(){return e.attachEvent&&!e.addEventListener},o.logStr=function(t){e.console&&e.console.log("SweetAlert: "+t)},o.colorLuminance=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,o,r="#";for(o=0;3>o;o++)n=parseInt(e.substr(2*o,2),16),r+=("00"+(n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16))).substr(n.length);return r}},{}]},{},[1]),"function"==typeof define&&define.amd?define((function(){return sweetAlert})):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document);
  