ok

Mini Shell

Direktori : /proc/self/root/home2/selectio/www/bharath/backend/sweet-alert/
Upload File :
Current File : //proc/self/root/home2/selectio/www/bharath/backend/sweet-alert/sweetalert2.min.js

!function(e,t){"use strict";function n(){function n(t){var n=t||e.event,o=n.keyCode||n.which,a=k(m,"visible");if(-1!==[9,13,32,27].indexOf(o)){for(var l=n.target||n.srcElement,i=-1,s=0;s<x.length;s++)if(l===x[s]){i=s;break}if(9===o){if(!a)return;l=-1===i?b:n.shiftKey?0===i?x[x.length-1]:x[i-1]:i===x.length-1?x[0]:x[i+1],A(n),r(l)}else 13===o||32===o?-1===i&&H(b,n):27===o&&c.allowEscapeKey===!0&&H(B,n)}}if(void 0===arguments[0])return e.console.error("sweetAlert expects at least 1 attribute!"),!1;var c=l({},w);switch(typeof arguments[0]){case"string":c.title=arguments[0],c.text=arguments[1]||"",c.type=arguments[2]||"";break;case"object":c.title=arguments[0].title||w.title,c.text=arguments[0].text||w.text,c.html=arguments[0].html||w.html,c.type=arguments[0].type||w.type,c.animation=void 0!==arguments[0].animation?arguments[0].animation:w.animation,c.customClass=arguments[0].customClass||c.customClass,c.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:w.allowOutsideClick,c.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:w.allowEscapeKey,c.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:w.showConfirmButton,c.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:w.showCancelButton,c.closeOnConfirm=void 0!==arguments[0].closeOnConfirm?arguments[0].closeOnConfirm:w.closeOnConfirm,c.closeOnCancel=void 0!==arguments[0].closeOnCancel?arguments[0].closeOnCancel:w.closeOnCancel,c.timer=parseInt(arguments[0].timer)||w.timer,c.width=parseInt(arguments[0].width)||w.width,c.padding=parseInt(arguments[0].padding)||w.padding,c.background=void 0!==arguments[0].background?arguments[0].background:w.background,c.confirmButtonText=arguments[0].confirmButtonText||w.confirmButtonText,c.confirmButtonColor=arguments[0].confirmButtonColor||w.confirmButtonColor,c.confirmButtonClass=arguments[0].confirmButtonClass||c.confirmButtonClass,c.cancelButtonText=arguments[0].cancelButtonText||w.cancelButtonText,c.cancelButtonColor=arguments[0].cancelButtonColor||w.cancelButtonColor,c.cancelButtonClass=arguments[0].cancelButtonClass||c.cancelButtonClass,c.imageUrl=arguments[0].imageUrl||w.imageUrl,c.imageSize=arguments[0].imageSize||w.imageSize,c.callback=arguments[1]||null,e.sweetAlert.callback=e.swal.callback=function(e){"function"==typeof c.callback&&c.callback(e)};break;default:return e.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}o(c),u(),i();var m=h();c.timer&&(m.timeout=setTimeout(function(){s(),"function"==typeof c.callback&&c.callback()},c.timer));var g,p=function(t){var n=t||e.event,o=n.target||n.srcElement,l=k(o,"confirm"),r=k(o,"cancel"),i=k(m,"visible");switch(n.type){case"mouseover":case"mouseup":case"focus":l?o.style.backgroundColor=a(c.confirmButtonColor,-.1):r&&(o.style.backgroundColor=a(c.cancelButtonColor,-.1));break;case"mouseout":case"blur":l?o.style.backgroundColor=c.confirmButtonColor:r&&(o.style.backgroundColor=c.cancelButtonColor);break;case"mousedown":l?o.style.backgroundColor=a(c.confirmButtonColor,-.2):r&&(o.style.backgroundColor=a(c.cancelButtonColor,-.2));break;case"click":if(l&&c.callback&&i)c.callback(!0),c.closeOnConfirm&&s();else if(c.callback&&i){var u=String(c.callback).replace(/\s/g,""),d="function("===u.substring(0,9)&&")"!==u.substring(9,10);d&&c.callback(!1),c.closeOnCancel&&s()}else s()}},v=m.querySelectorAll("button");for(g=0;g<v.length;g++)v[g].onclick=p,v[g].onmouseover=p,v[g].onmouseout=p,v[g].onmousedown=p;d=t.onclick,t.onclick=function(t){var n=t||e.event,o=n.target||n.srcElement;o===C()&&c.allowOutsideClick&&s()};var b=m.querySelector("button.confirm"),B=m.querySelector("button.cancel"),x=m.querySelectorAll("button, input:not([type=hidden]), textarea");for(g=0;g<x.length;g++)x[g].addEventListener("focus",p,!0),x[g].addEventListener("blur",p,!0);f=e.onkeydown,e.onkeydown=n,b.style.borderLeftColor=c.confirmButtonColor,b.style.borderRightColor=c.confirmButtonColor,e.swal.toggleLoading=function(){b.disabled=!b.disabled,B.disabled=!B.disabled},e.swal.enableButtons=function(){b.disabled=!1,B.disabled=!1},e.swal.disableButtons=function(){b.disabled=!0,B.disabled=!0},swal.enableButtons(),e.onfocus=function(){e.setTimeout(function(){void 0!==y&&(y.focus(),y=void 0)},0)}}function o(n){var o=h();o.style.width=n.width+"px",o.style.padding=n.padding+"px",o.style.marginLeft=-n.width/2+"px",o.style.background=n.background;var a=t.getElementsByTagName("head")[0],l=t.createElement("style");l.type="text/css",l.id=v,l.innerHTML="@media screen and (max-width: "+n.width+"px) {.sweet-alert {max-width: 100%;left: 0 !important;margin-left: 0 !important;}}",a.appendChild(l);var r=o.querySelector("h2"),i=o.querySelector("p"),s=o.querySelector("button.cancel"),c=o.querySelector("button.confirm"),u=o.querySelector("hr");if(r.innerHTML=S(n.title).split("\n").join("<br>"),e.jQuery?i=$(i).html(S(n.text.split("\n").join("<br>"))||n.html):(i.innerHTML=S(n.text.split("\n").join("<br>"))||n.html,i.innerHTML&&T(i)),n.customClass&&B(o,n.customClass),O(o.querySelectorAll(".icon")),n.type){for(var m=!1,d=0;d<b.length;d++)if(n.type===b[d]){m=!0;break}if(!m)return e.console.error("Unknown alert type: "+n.type),!1;var f=o.querySelector(".icon."+n.type);switch(T(f),n.type){case"success":B(f,"animate"),B(f.querySelector(".tip"),"animate-success-tip"),B(f.querySelector(".long"),"animate-success-long");break;case"error":B(f,"animate-error-icon"),B(f.querySelector(".x-mark"),"animate-x-mark");break;case"warning":B(f,"pulse-warning"),B(f.querySelector(".body"),"pulse-warning-ins"),B(f.querySelector(".dot"),"pulse-warning-ins")}}if(n.imageUrl){var y=o.querySelector(".icon.custom");if(y.style.backgroundImage="url("+n.imageUrl+")",T(y),n.imageSize){var g=n.imageSize.match(/(\d+)x(\d+)/);g?y.setAttribute("style",y.getAttribute("style")+"width:"+g[1]+"px; height:"+g[2]+"px"):e.console.error("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+n.imageSize)}}n.showCancelButton?s.style.display="inline-block":O(s),n.showConfirmButton?c.style.display="inline-block":O(c),n.showConfirmButton||n.showCancelButton||O(u),c.innerHTML=S(n.confirmButtonText),s.innerHTML=S(n.cancelButtonText),c.style.backgroundColor=n.confirmButtonColor,s.style.backgroundColor=n.cancelButtonColor,c.className="confirm",B(c,n.confirmButtonClass),s.className="cancel",B(s,n.cancelButtonClass),n.animation===!0?x(o,"no-animation"):B(o,"no-animation")}function a(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",o=0;3>o;o++){var a=parseInt(e.substr(2*o,2),16);a=Math.round(Math.min(Math.max(0,a+a*t),255)).toString(16),n+=("00"+a).substr(a.length)}return n}function l(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(e){e.focus()}function i(){var e=h();M(C(),10),T(e),B(e,"show-sweet-alert"),x(e,"hide-sweet-alert"),m=t.activeElement,setTimeout(function(){B(e,"visible")},500)}function s(){var e=h();I(C(),5),I(e,5),x(e,"showSweetAlert"),B(e,"hideSweetAlert"),x(e,"visible");var n=e.querySelector(".icon.success");x(n,"animate"),x(n.querySelector(".tip"),"animate-success-tip"),x(n.querySelector(".long"),"animate-success-long");var o=e.querySelector(".icon.error");x(o,"animate-error-icon"),x(o.querySelector(".x-mark"),"animate-x-mark");var a=e.querySelector(".icon.warning");x(a,"pulse-warning"),x(a.querySelector(".body"),"pulse-warning-ins"),x(a.querySelector(".dot"),"pulse-warning-ins"),c();var l=t.getElementsByTagName("head")[0],r=t.getElementById(v);r&&l.removeChild(r)}function c(){var n=h();e.onkeydown=f,t.onclick=d,m&&m.focus(),y=void 0,clearTimeout(n.timeout)}function u(){var e=h();e.style.marginTop=L(h())}var m,d,f,y,g=".sweet-alert",p=".sweet-overlay",v="sweet-alert-mediaquery",b=["error","warning","info","success"],w={title:"",text:"",html:"",type:null,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,imageUrl:null,imageSize:null,timer:null,width:500,padding:20,background:"#fff"},h=function(){return t.querySelector(g)},C=function(){return t.querySelector(p)},k=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},B=function(e,t){t&&!k(e,t)&&(e.className+=" "+t)},x=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(k(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},S=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},E=function(e){e.style.opacity="",e.style.display="block"},T=function(e){if(e&&!e.length)return E(e);for(var t=0;t<e.length;++t)E(e[t])},q=function(e){e.style.opacity="",e.style.display="none"},O=function(e){if(e&&!e.length)return q(e);for(var t=0;t<e.length;++t)q(e[t])},L=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"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt(n/2+t)+"px"},M=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.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)};o()}e.style.display="block"},I=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=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()},H=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 a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},A=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};e.sweetAlert=e.swal=function(){var e=arguments,t=h();if(null!==t)k(t,"visible")&&c(),n.apply(this,e);else var o=setInterval(function(){null!==h()&&(clearInterval(o),n.apply(this,e))},100)},e.sweetAlert.closeModal=e.swal.closeModal=function(){s()},e.swal.init=function(){var e='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert" style="display: none" tabIndex="-1"><div class="icon error"><span class="x-mark"><span class="line left"></span><span class="line right"></span></span></div><div class="icon warning"> <span class="body"></span> <span class="dot"></span> </div> <div class="icon info"></div> <div class="icon success"> <span class="line tip"></span> <span class="line long"></span> <div class="placeholder"></div> <div class="fix"></div> </div> <div class="icon custom"></div> <h2>Title</h2><p>Text</p><hr><button class="confirm">OK</button><button class="cancel">Cancel</button></div>',n=t.createElement("div");n.className="sweet-container",n.innerHTML=e,t.body.appendChild(n)},e.swal.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");l(w,e)},function(){"complete"===t.readyState||"interactive"===t.readyState&&t.body?swal.init():t.addEventListener?t.addEventListener("DOMContentLoaded",function e(){t.removeEventListener("DOMContentLoaded",e,!1),swal.init()},!1):t.attachEvent&&t.attachEvent("onreadystatechange",function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),swal.init())})}()}(window,document);

Zerion Mini Shell 1.0