|
|
|
function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function copyToClipboard(t){if(!document.execCommand)return!1;var e="_hiddenCopyText_";if(n=document.getElementById(e),!n){var n=document.createElement("textarea");n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.id=e,document.body.appendChild(n)}n.textContent=t;var r=document.activeElement;n.focus(),n.setSelectionRange(0,n.value.length);var o;try{o=document.execCommand("copy")}catch(a){o=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",o}function errorMsg(t,e){$("#notif").addClass("error"),notify.show(t,e||3e3)}function infoMsg(t,e){$("#notif").removeClass("error"),notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(h=!0,t=0;t<p.length;t+=1)p[t]();p=[]}function e(){var e;for(v=!0,h||t(),e=0;e<d.length;e+=1)d[e]();d=[]}function n(t,e){var n;for(n=e.length-1;n>=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function o(t,e){return t.currentStyle?t.currentStyle[r(e)]:m.getComputedStyle?m.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function u(t,e,n){try{t.style[r(e)]=n}catch(o){}}function i(t){t.style.display="","none"===o(t,"display")&&(t.style.display="block")}function c(t){var e,r,o,u="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r<t[e].length;r+=1)u+="&"+a(e,t[e][r]);else u+="&"+a(e,t[e])}else n(function(t){if("FORM"===t.nodeName)for(r=0;r<t.elements.length;r+=1)if(e=t.elements[r],!e.disabled)switch(e.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":e.length>0&&(u+="&"+a(e.name,e.value));break;case"select-multiple":for(o=0;o<e.length;o+=1)e[o].selected&&(u+="&"+a(e.name,e[o].value));break;case"checkbox":case"radio":e.checked&&(u+="&"+a(e.name,e.value));break;default:u+="&"+a(e.name,e.value)}},t);return u.length>0?u.substring(1):""}function f(t,e,r){var o,a,u,i=!1;return t&&(o=t.split(/\s+/),n(function(t){for(u=0;u<o.length;u+=1)if(a=new RegExp("\\b"+o[u]+"\\b","g"),"remove"===e)t.className=t.className.replace(a,"");else if("toggle"===e)t.className=t.className.match(a)?t.className.replace(a,""):t.className+" "+o[u];else if("has"===e&&t.className.match(a)){i=!0;break}},r)),i}function s(t,e,r){var o,a;t&&n(function(n){for(o=g.createElement("div"),o.innerHTML=t;null!==(a=o.lastChild);)try{"before"===e?n.parentNode.insertBefore(a,n):"after"===e?n.parentNode.insertBefore(a,n.nextSibling):"append"===e?n.appendChild(a):"prepend"===e&&n.insertBefore(a,n.firstChild)}catch(r){break}},r)}function l(t){var e,a,y,b=[],w=!1;if(t)if(t.nodeType&&1===t.nodeType)b=[t];else if("object"==typeof t)w="number"!=typeof t.length,b=t;else if("string"==typeof t)for(g.querySelectorAll||(g.querySelectorAll=function(t){var e,n,r,a=g.getElementsByTagName("head")[0],u=[];if(e=g.createElement("STYLE"),e.type="text/css",e.styleSheet){for(e.styleSheet.cssText=t+" {a:b}",a.appendChild(e),n=g.getElementsByTagName("*"),r=0;r<n.length;r+=1)"b"===o(n[r],"a")&&u.push(n[r]);a.removeChild(e)}return u}),a=g.querySelectorAll(t),y=0;y<a.length;y+=1)b[y]=a[y];return e=w?{}:b,e.ready=function(t){if(t){if(h)return t(),e;p.push(t)}},e.loaded=function(t){if(t){if(v)return t(),e;d.push(t)}},e.each=function(t){return"function"==typeof t&&n(function(e){return t.apply(e,arguments)},b),e},e.first=function(){return l(b.shift())},e.last=function(){return l(b.pop())},e.odd=function(){var t,e=[];for(t=0;t<b.length;t+=2)e.push(b[t]);return l(e)},e.even=function(){var t,e=[];for(t=1;t<b.length;t+=2)e.push(b[t]);return l(e)},e.hide=function(){return n(function(t){t.style.display="none"},b),e},e.show=function(){return n(function(t){i(t)},b),e},e.toggle=function(t){return"undefined"!=typeof t?t?e.show():e.hide():n(function(t
|