bibhamrokhanpin/wp-content/__plugins/under-construction-page/js/ucp-jquery-plugins.js

26 lines
50 KiB
JavaScript
Raw Normal View History

2024-04-10 12:01:06 +00:00
/*
* UnderConstructionPage
* jQuery plugins
* (c) WebFactory Ltd, 2015 - 2022
*/
/**
* Copyright (c) 2007 Ariel Flesler - aflesler gmail com | https://github.com/flesler
* Licensed under MIT
* @author Ariel Flesler
* @version 2.1.2
*/
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
/*! js-cookie v2.1.3 | MIT */
!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if("undefined"!=typeof document){if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}return e=c.write?c.write(e,b):encodeURIComponent(e+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(b+""),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=b+"="+e+(f.expires?"; expires="+f.expires.toUTCString():"")+(f.path?"; path="+f.path:"")+(f.domain?"; domain="+f.domain:"")+(f.secure?"; secure":"")}b||(g={});for(var j=document.cookie?document.cookie.split("; "):[],k=/(%[0-9A-Z]{2})+/g,l=0;l<j.length;l++){var m=j[l].split("="),n=m.slice(1).join("=");'"'===n.charAt(0)&&(n=n.slice(1,-1));try{var o=m[0].replace(k,decodeURIComponent);if(n=c.read?c.read(n,o):c(n,o)||n.replace(k,decodeURIComponent),this.json)try{n=JSON.parse(n)}catch(i){}if(b===o){g=n;break}b||(g[o]=n)}catch(i){}}return g}}return d.set=d,d.get=function(a){return d.call(d,a)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b(function(){})});
/* anytime.5.1.2.min.js
Copyright 2008-2015 Andrew M. Andrews III.
License: creativecommons.org/licenses/by-nc-sa/3.0/
Any+Time is a trademark of Andrew M. Andrews III */
var AnyTime={version:"5.1.2",pad:function(a,b){for(var c=String(Math.abs(a));c.length<b;)c="0"+c;return 0>a&&(c="-"+c),c}};!function(a){var b=[31,28,31,30,31,30,31,31,30,31,30,31],c=!1,d=[];a.fn.AnyTime_picker=function(a){return this.each(function(){AnyTime.picker(this.id,a)})},a.fn.AnyTime_noPicker=function(){return this.each(function(){AnyTime.noPicker(this.id)})},a.fn.AnyTime_setCurrent=function(a){return this.each(function(){AnyTime.setCurrent(this.id,a)})},a.fn.AnyTime_setEarliest=function(a){return this.each(function(){AnyTime.setEarliest(this.id,a)})},a.fn.AnyTime_setLatest=function(a){return this.each(function(){AnyTime.setLatest(this.id,a)})},a.fn.AnyTime_current=function(a,b){a?(this.removeClass("AnyTime-out-btn ui-state-default ui-state-disabled ui-state-highlight"),this.addClass("AnyTime-cur-btn ui-state-default ui-state-highlight")):(this.removeClass("AnyTime-cur-btn ui-state-highlight"),b?this.removeClass("AnyTime-out-btn ui-state-disabled"):this.addClass("AnyTime-out-btn ui-state-disabled"))},a.fn.AnyTime_clickCurrent=function(){this.find(".AnyTime-cur-btn").triggerHandler("click")},a(document).ready(function(){for(var a in d)Array.prototype[a]||d[a].onReady();c=!0}),AnyTime.Converter=function(b){var c=0,d=9,e=9,f=6,g=3,h=Number.MIN_VALUE,i=Number.MIN_VALUE,j=Number.MIN_VALUE,k=-1,l=Number.MIN_VALUE,m=-1,n=!1;this.fmt="%Y-%m-%d %T",this.dAbbr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.dNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.eAbbr=["BCE","CE"],this.mAbbr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.mNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.baseYear=null,this.dAt=function(a,b){return a.charCodeAt(b)>="0".charCodeAt(0)&&a.charCodeAt(b)<="9".charCodeAt(0)},this.format=function(a){var b=new Date(a.getTime());h==Number.MIN_VALUE&&j!=Number.MIN_VALUE&&b.setTime(b.getTime()+6e4*b.getTimezoneOffset()+6e4*j);for(var d,e="",f=0;c>f;f++)if("%"!=this.fmt.charAt(f))e+=this.fmt.charAt(f);else{var g=this.fmt.charAt(f+1);switch(g){case"a":e+=this.dAbbr[b.getDay()];break;case"B":b.getFullYear()<0&&(e+=this.eAbbr[0]);break;case"b":e+=this.mAbbr[b.getMonth()];break;case"C":b.getFullYear()>0&&(e+=this.eAbbr[1]);break;case"c":e+=b.getMonth()+1;break;case"d":d=b.getDate(),10>d&&(e+="0"),e+=String(d);break;case"D":if(d=String(b.getDate()),e+=d,2==d.length&&"1"==d.charAt(0))e+="th";else switch(d.charAt(d.length-1)){case"1":e+="st";break;case"2":e+="nd";break;case"3":e+="rd";break;default:e+="th"}break;case"E":e+=this.eAbbr[b.getFullYear()<0?0:1];break;case"e":e+=b.getDate();break;case"H":d=b.getHours(),10>d&&(e+="0"),e+=String(d);break;case"h":case"I":d=b.getHours()%12,0==d?e+="12":(10>d&&(e+="0"),e+=String(d));break;case"i":d=b.getMinutes(),10>d&&(e+="0"),e+=String(d);break;case"k":e+=b.getHours();break;case"l":d=b.getHours()%12,e+=0==d?"12":String(d);break;case"M":e+=this.mNames[b.getMonth()];break;case"m":d=b.getMonth()+1,10>d&&(e+="0"),e+=String(d);break;case"p":e+=b.getHours()<12?"AM":"PM";break;case"r":d=b.getHours()%12,0==d?e+="12:":(10>d&&(e+="0"),e+=String(d)+":"),d=b.getMinutes(),10>d&&(e+="0"),e+=String(d)+":",d=b.getSeconds(),10>d&&(e+="0"),e+=String(d),e+=b.getHours()<12?"AM":"PM";break;case"S":case"s":d=b.getSeconds(),10>d&&(e+="0"),e+=String(d);break;case"T":d=b.getHours(),10>d&&(e+="0"),e+=String(d)+":",d=b.getMinutes(),10>d&&(e+="0"),e+=String(d)+":",d=b.getSeconds(),10>d&&(e+="0"),e+=String(d);break;case"W":e+=this.dNames[b.getDay()];break;case"w":e+=b.getDay();break;case"Y":e+=AnyTime.pad(b.getFullYear(),4);break;case"y":d=b.getFullYear()%100,e+=AnyTime.pad(d,2);break;case"Z":e+=AnyTime.pad(Math.abs(b.getFullYear()),4);break;case"z":e+=Math.abs(b.getFullYear());break;case"%":e+="%";break;case"#":d=h!=Number.MIN_VALUE?h:j==Number.MIN_VALUE?0-b.getTimezoneOffset():j,d>=0&&(e+="+"),e+=d;break;case"@":if(d=h!=Number.MIN_VALUE?h:j==Number.MIN_VALUE?0-b.getTimezoneOffset():j,AnyTime.utcLabel&&AnyTime.utcLabel[d]){e+=k>0&&k<AnyTime.utcLabel[d].length?Any
},100),void 0;this.showPkr(null)}a.preventDefault()},keyAhead:function(){this.fBtn.hasClass("AnyTime-mil9-btn")?this.yDiv.find(".AnyTime-cent0-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-cent9-btn")?this.yDiv.find(".AnyTime-dec0-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-dec9-btn")?this.yDiv.find(".AnyTime-yr0-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-yr9-btn")?this.yDiv.find(".AnyTime-bce-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-sec9-btn")||(this.fBtn.hasClass("AnyTime-sec50-btn")?this.dS.find(".AnyTime-sec0-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-min9-btn")?this.dS&&this.dS.find(".AnyTime-sec00-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-min50-btn")?this.dM.find(".AnyTime-min0-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-hr23-btn")?this.dM?this.dM.find(".AnyTime-min00-btn").triggerHandler("click"):this.dS&&this.dS.find(".AnyTime-sec00-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-hr11-btn")?this.dH.find(".AnyTime-hr12-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-mon12-btn")?this.dDoM?this.dDoM.AnyTime_clickCurrent():this.dH?this.dH.find(".AnyTime-hr0-btn").triggerHandler("click"):this.dM?this.dM.find(".AnyTime-min00-btn").triggerHandler("click"):this.dS&&this.dS.find(".AnyTime-sec00-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-yrs-ahead-btn")?this.dMo?this.dMo.find(".AnyTime-mon1-btn").triggerHandler("click"):this.dH?this.dH.find(".AnyTime-hr0-btn").triggerHandler("click"):this.dM?this.dM.find(".AnyTime-min00-btn").triggerHandler("click"):this.dS&&this.dS.find(".AnyTime-sec00-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-yr-cur-btn")?this.yNext.triggerHandler("click"):this.fBtn.next().triggerHandler("click"))},keyBack:function(){this.fBtn.hasClass("AnyTime-cent0-btn")?this.yDiv.find(".AnyTime-mil9-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-dec0-btn")?this.yDiv.find(".AnyTime-cent9-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-yr0-btn")?this.yDiv.find(".AnyTime-dec9-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-bce-btn")?this.yDiv.find(".AnyTime-yr9-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-yr-cur-btn")?this.yPrior.triggerHandler("click"):this.fBtn.hasClass("AnyTime-mon1-btn")?this.dY&&this.yCur.triggerHandler("click"):this.fBtn.hasClass("AnyTime-hr0-btn")?this.dDoM?this.dDoM.AnyTime_clickCurrent():this.dMo?this.dMo.find(".AnyTime-mon12-btn").triggerHandler("click"):this.dY&&this.yNext.triggerHandler("click"):this.fBtn.hasClass("AnyTime-hr12-btn")?this.dH.find(".AnyTime-hr11-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-min00-btn")?this.dH?this.dH.find(".AnyTime-hr23-btn").triggerHandler("click"):this.dDoM?this.dDoM.AnyTime_clickCurrent():this.dMo?this.dMo.find(".AnyTime-mon12-btn").triggerHandler("click"):this.dY&&this.yNext.triggerHandler("click"):this.fBtn.hasClass("AnyTime-min0-btn")?this.dM.find(".AnyTime-min50-btn").triggerHandler("click"):this.fBtn.hasClass("AnyTime-sec00-btn")?this.dM?this.dM.find(".AnyTime-min9-btn").triggerHandler("click"):this.dH?this.dH.find(".AnyTime-hr23-btn").triggerHandler("click"):this.dDoM?this.dDoM.AnyTime_clickCurrent():this.dMo?this.dMo.find(".AnyTime-mon12-btn").triggerHandler("click"):this.dY&&this.yNext.triggerHandler("click"):this.fBtn.hasClass("AnyTime-sec0-btn")?this.dS.find(".AnyTime-sec50-btn").triggerHandler("click"):this.fBtn.prev().triggerHandler("click")},keyDateChange:function(a){this.fBtn.hasClass("AnyTime-dom-btn")&&(this.set(a),this.upd(null),this.setFocus(this.dDoM.find(".AnyTime-cur-btn")))},makeCloak:function(){this.cloak?this.cloak.show():(this.cloak=a('<div class="AnyTime-cloak"></div>'),this.div.append(this.cloak),this.cloak.click(function(a){g.oDiv&&g.oDiv.is(":visible")?g.dismissODiv(a):g.dismissYDiv(a)}))},makeDate:function(a){if("number"==typeof a?a=new Date(a):"string"==typeof a&&(a=this.conv.parse(a)),"getTime"in a)return a;throw"cannot make a Date from "+a},newHour:function(b){var c,d,e=a(b.target);if(!e.hasClass("AnyTime-out-btn")){