Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/wp-maintenance-mode/assets/js/jquery.countdown.min.js
Назад
!function(e){e.JQPlugin.createPlugin({name:"countdown",defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_getters:["getTimes"],_rtlClass:"countdown-rtl",_sectionClass:"countdown-section",_amountClass:"countdown-amount",_periodClass:"countdown-period",_rowClass:"countdown-row",_holdingClass:"countdown-holding",_showClass:"countdown-show",_descrClass:"countdown-descr",_timerElems:[],_init:function(){var t=this;this._super(),this._serverSyncs=[];var i="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},s=window.performance&&"function"==typeof window.performance.now;var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,o=0;!n||e.noRequestAnimationFrame?(e.noRequestAnimationFrame=null,setInterval(function(){t._updateElems()},980)):(o=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||i(),n(function e(r){var a=r<1e12?s?performance.now()+performance.timing.navigationStart:i():r||i();a-o>=1e3&&(t._updateElems(),o=a),n(e)}))},UTCDate:function(e,t,i,s,n,o,r,a){"object"==typeof t&&t.constructor==Date&&(a=t.getMilliseconds(),r=t.getSeconds(),o=t.getMinutes(),n=t.getHours(),s=t.getDate(),i=t.getMonth(),t=t.getFullYear());var l=new Date;return l.setUTCFullYear(t),l.setUTCDate(1),l.setUTCMonth(i||0),l.setUTCDate(s||1),l.setUTCHours(n||0),l.setUTCMinutes((o||0)-(Math.abs(e)<30?60*e:e)),l.setUTCSeconds(r||0),l.setUTCMilliseconds(a||0),l},periodsToSeconds:function(e){return 31557600*e[0]+2629800*e[1]+604800*e[2]+86400*e[3]+3600*e[4]+60*e[5]+e[6]},resync:function(){var t=this;e("."+this._getMarker()).each(function(){var i=e.data(this,t.name);if(i.options.serverSync){for(var s=null,n=0;n<t._serverSyncs.length;n++)if(t._serverSyncs[n][0]==i.options.serverSync){s=t._serverSyncs[n];break}if(null==s[2]){var o=e.isFunction(i.options.serverSync)?i.options.serverSync.apply(this,[]):null;s[2]=(o?(new Date).getTime()-o.getTime():0)-s[1]}i._since&&i._since.setMilliseconds(i._since.getMilliseconds()+s[2]),i._until.setMilliseconds(i._until.getMilliseconds()+s[2])}});for(var i=0;i<t._serverSyncs.length;i++)null!=t._serverSyncs[i][2]&&(t._serverSyncs[i][1]+=t._serverSyncs[i][2],delete t._serverSyncs[i][2])},_instSettings:function(e,t){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(e){this._hasElem(e)||this._timerElems.push(e)},_hasElem:function(t){return e.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e==t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--)this._updateCountdown(this._timerElems[e])},_optionsChanged:function(t,i,s){s.layout&&(s.layout=s.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(i.options,s);var n=i.options.timezone!=s.timezone;e.extend(i.options,s),this._adjustSettings(t,i,null!=s.until||null!=s.since||n);var o=new Date;(i._since&&i._since<o||i._until&&i._until>o)&&this._addElem(t[0]),this._updateCountdown(t,i)},_updateCountdown:function(t,i){if(t=t.jquery?t:e(t),i=i||this._getInst(t)){if(t.html(this._generateHTML(i)).toggleClass(this._rtlClass,i.options.isRTL),e.isFunction(i.options.onTick)){var s="lap"!=i._hold?i._periods:this._calculatePeriods(i,i._show,i.options.significant,new Date);1!=i.options.tickInterval&&this.periodsToSeconds(s)%i.options.tickInterval!=0||i.options.onTick.apply(t[0],[s])}if("pause"!=i._hold&&(i._since?i._now.getTime()<i._since.getTime():i._now.getTime()>=i._until.getTime())&&!i._expiring){if(i._expiring=!0,this._hasElem(t[0])||i.options.alwaysExpire){if(this._removeElem(t[0]),e.isFunction(i.options.onExpiry)&&i.options.onExpiry.apply(t[0],[]),i.options.expiryText){var n=i.options.layout;i.options.layout=i.options.expiryText,this._updateCountdown(t[0],i),i.options.layout=n}i.options.expiryUrl&&(window.location=i.options.expiryUrl)}i._expiring=!1}else"pause"==i._hold&&this._removeElem(t[0])}},_resetExtraLabels:function(e,t){for(var i in t)i.match(/[Ll]abels[02-9]|compactLabels1/)&&(e[i]=t[i]);for(var i in e)i.match(/[Ll]abels[02-9]|compactLabels1/)&&void 0===t[i]&&(e[i]=null)},_adjustSettings:function(t,i,s){for(var n=null,o=0;o<this._serverSyncs.length;o++)if(this._serverSyncs[o][0]==i.options.serverSync){n=this._serverSyncs[o][1];break}if(null!=n)var r=i.options.serverSync?n:0,a=new Date;else{var l=e.isFunction(i.options.serverSync)?i.options.serverSync.apply(t[0],[]):null;a=new Date,r=l?a.getTime()-l.getTime():0;this._serverSyncs.push([i.options.serverSync,r])}var _=i.options.timezone;_=null==_?-a.getTimezoneOffset():_,(s||!s&&null==i._until&&null==i._since)&&(i._since=i.options.since,null!=i._since&&(i._since=this.UTCDate(_,this._determineTime(i._since,null)),i._since&&r&&i._since.setMilliseconds(i._since.getMilliseconds()+r)),i._until=this.UTCDate(_,this._determineTime(i.options.until,a)),r&&i._until.setMilliseconds(i._until.getMilliseconds()+r)),i._show=this._determineShow(i)},_preDestroy:function(e,t){this._removeElem(e[0]),e.empty()},pause:function(e){this._hold(e,"pause")},lap:function(e){this._hold(e,"lap")},resume:function(e){this._hold(e,null)},toggle:function(t){this[(e.data(t,this.name)||{})._hold?"resume":"pause"](t)},toggleLap:function(t){this[(e.data(t,this.name)||{})._hold?"resume":"lap"](t)},_hold:function(t,i){var s=e.data(t,this.name);if(s){if("pause"==s._hold&&!i){s._periods=s._savePeriods;var n=s._since?"-":"+";s[s._since?"_since":"_until"]=this._determineTime(n+s._periods[0]+"y"+n+s._periods[1]+"o"+n+s._periods[2]+"w"+n+s._periods[3]+"d"+n+s._periods[4]+"h"+n+s._periods[5]+"m"+n+s._periods[6]+"s"),this._addElem(t)}s._hold=i,s._savePeriods="pause"==i?s._periods:null,e.data(t,this.name,s),this._updateCountdown(t,s)}},getTimes:function(t){var i=e.data(t,this.name);return i?"pause"==i._hold?i._savePeriods:i._hold?this._calculatePeriods(i,i._show,i.options.significant,new Date):i._periods:null},_determineTime:function(e,t){var i=this,s=null==e?t:"string"==typeof e?function(e){e=e.toLowerCase();for(var t=new Date,s=t.getFullYear(),n=t.getMonth(),o=t.getDate(),r=t.getHours(),a=t.getMinutes(),l=t.getSeconds(),_=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,p=_.exec(e);p;){switch(p[2]||"s"){case"s":l+=parseInt(p[1],10);break;case"m":a+=parseInt(p[1],10);break;case"h":r+=parseInt(p[1],10);break;case"d":o+=parseInt(p[1],10);break;case"w":o+=7*parseInt(p[1],10);break;case"o":n+=parseInt(p[1],10),o=Math.min(o,i._getDaysInMonth(s,n));break;case"y":s+=parseInt(p[1],10),o=Math.min(o,i._getDaysInMonth(s,n))}p=_.exec(e)}return new Date(s,n,o,r,a,l,0)}(e):"number"==typeof e?function(e){var t=new Date;return t.setTime(t.getTime()+1e3*e),t}(e):e;return s&&s.setMilliseconds(0),s},_getDaysInMonth:function(e,t){return 32-new Date(e,t,32).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var i=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);for(var s=!1,n=0,o=t.options.significant,r=e.extend({},t._show),a=0;a<=6;a++)s|="?"==t._show[a]&&t._periods[a]>0,r[a]="?"!=t._show[a]||s?t._show[a]:null,n+=r[a]?1:0,o-=t._periods[a]>0?1:0;var l=[!1,!1,!1,!1,!1,!1,!1];for(a=6;a>=0;a--)t._show[a]&&(t._periods[a]?l[a]=!0:(l[a]=o>0,o--));var _=t.options.compact?t.options.compactLabels:t.options.labels,p=t.options.whichLabels||this._normalLabels,c=function(e){var s=t.options["compactLabels"+p(t._periods[e])];return r[e]?i._translateDigits(t,t._periods[e])+(s?s[e]:_[e])+" ":""},u=t.options.padZeroes?2:1,d=function(e){var s=t.options["labels"+p(t._periods[e])];return!t.options.significant&&r[e]||t.options.significant&&l[e]?'<span class="'+i._sectionClass+'"><span class="'+i._amountClass+'">'+i._minDigits(t,t._periods[e],u)+'</span><span class="'+i._periodClass+'">'+(s?s[e]:_[e])+"</span></span>":""};return t.options.layout?this._buildLayout(t,r,t.options.layout,t.options.compact,t.options.significant,l):(t.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(t._hold?" "+this._holdingClass:"")+'">'+c(0)+c(1)+c(2)+c(3)+(r[4]?this._minDigits(t,t._periods[4],2):"")+(r[5]?(r[4]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[5],2):"")+(r[6]?(r[4]||r[5]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[6],2):""):'<span class="'+this._rowClass+" "+this._showClass+(t.options.significant||n)+(t._hold?" "+this._holdingClass:"")+'">'+d(0)+d(1)+d(2)+d(3)+d(4)+d(5)+d(6))+"</span>"+(t.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+t.options.description+"</span>":"")},_buildLayout:function(t,i,s,n,o,r){for(var a=t.options[n?"compactLabels":"labels"],l=t.options.whichLabels||this._normalLabels,_=function(e){return(t.options[(n?"compactLabels":"labels")+l(t._periods[e])]||a)[e]},p=function(e,i){return t.options.digits[Math.floor(e/i)%10]},c={desc:t.options.description,sep:t.options.timeSeparator,yl:_(0),yn:this._minDigits(t,t._periods[0],1),ynn:this._minDigits(t,t._periods[0],2),ynnn:this._minDigits(t,t._periods[0],3),y1:p(t._periods[0],1),y10:p(t._periods[0],10),y100:p(t._periods[0],100),y1000:p(t._periods[0],1e3),ol:_(1),on:this._minDigits(t,t._periods[1],1),onn:this._minDigits(t,t._periods[1],2),onnn:this._minDigits(t,t._periods[1],3),o1:p(t._periods[1],1),o10:p(t._periods[1],10),o100:p(t._periods[1],100),o1000:p(t._periods[1],1e3),wl:_(2),wn:this._minDigits(t,t._periods[2],1),wnn:this._minDigits(t,t._periods[2],2),wnnn:this._minDigits(t,t._periods[2],3),w1:p(t._periods[2],1),w10:p(t._periods[2],10),w100:p(t._periods[2],100),w1000:p(t._periods[2],1e3),dl:_(3),dn:this._minDigits(t,t._periods[3],1),dnn:this._minDigits(t,t._periods[3],2),dnnn:this._minDigits(t,t._periods[3],3),d1:p(t._periods[3],1),d10:p(t._periods[3],10),d100:p(t._periods[3],100),d1000:p(t._periods[3],1e3),hl:_(4),hn:this._minDigits(t,t._periods[4],1),hnn:this._minDigits(t,t._periods[4],2),hnnn:this._minDigits(t,t._periods[4],3),h1:p(t._periods[4],1),h10:p(t._periods[4],10),h100:p(t._periods[4],100),h1000:p(t._periods[4],1e3),ml:_(5),mn:this._minDigits(t,t._periods[5],1),mnn:this._minDigits(t,t._periods[5],2),mnnn:this._minDigits(t,t._periods[5],3),m1:p(t._periods[5],1),m10:p(t._periods[5],10),m100:p(t._periods[5],100),m1000:p(t._periods[5],1e3),sl:_(6),sn:this._minDigits(t,t._periods[6],1),snn:this._minDigits(t,t._periods[6],2),snnn:this._minDigits(t,t._periods[6],3),s1:p(t._periods[6],1),s10:p(t._periods[6],10),s100:p(t._periods[6],100),s1000:p(t._periods[6],1e3)},u=s,d=0;d<=6;d++){var h="yowdhms".charAt(d),m=new RegExp("\\{"+h+"<\\}([\\s\\S]*)\\{"+h+">\\}","g");u=u.replace(m,!o&&i[d]||o&&r[d]?"$1":"")}return e.each(c,function(e,t){var i=new RegExp("\\{"+e+"\\}","g");u=u.replace(i,t)}),u},_minDigits:function(e,t,i){return(t=""+t).length>=i?this._translateDigits(e,t):(t="0000000000"+t,this._translateDigits(e,t.substr(t.length-i)))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format,i=[];return i[0]=t.match("y")?"?":t.match("Y")?"!":null,i[1]=t.match("o")?"?":t.match("O")?"!":null,i[2]=t.match("w")?"?":t.match("W")?"!":null,i[3]=t.match("d")?"?":t.match("D")?"!":null,i[4]=t.match("h")?"?":t.match("H")?"!":null,i[5]=t.match("m")?"?":t.match("M")?"!":null,i[6]=t.match("s")?"?":t.match("S")?"!":null,i},_calculatePeriods:function(e,t,i,s){e._now=s,e._now.setMilliseconds(0);var n=new Date(e._now.getTime());e._since?s.getTime()<e._since.getTime()?e._now=s=n:s=e._since:(n.setTime(e._until.getTime()),s.getTime()>e._until.getTime()&&(e._now=s=n));var o=[0,0,0,0,0,0,0];if(t[0]||t[1]){var r=this._getDaysInMonth(s.getFullYear(),s.getMonth()),a=this._getDaysInMonth(n.getFullYear(),n.getMonth()),l=n.getDate()==s.getDate()||n.getDate()>=Math.min(r,a)&&s.getDate()>=Math.min(r,a),_=function(e){return 60*(60*e.getHours()+e.getMinutes())+e.getSeconds()},p=Math.max(0,12*(n.getFullYear()-s.getFullYear())+n.getMonth()-s.getMonth()+(n.getDate()<s.getDate()&&!l||l&&_(n)<_(s)?-1:0));o[0]=t[0]?Math.floor(p/12):0,o[1]=t[1]?p-12*o[0]:0;var c=(s=new Date(s.getTime())).getDate()==r,u=this._getDaysInMonth(s.getFullYear()+o[0],s.getMonth()+o[1]);s.getDate()>u&&s.setDate(u),s.setFullYear(s.getFullYear()+o[0]),s.setMonth(s.getMonth()+o[1]),c&&s.setDate(u)}var d=Math.floor((n.getTime()-s.getTime())/1e3),h=function(e,i){o[e]=t[e]?Math.floor(d/i):0,d-=o[e]*i};if(h(2,604800),h(3,86400),h(4,3600),h(5,60),h(6,1),d>0&&!e._since)for(var m=[1,12,4.3482,7,24,60,60],g=6,w=1,f=6;f>=0;f--)t[f]&&(o[g]>=w&&(o[g]=0,d=1),d>0&&(o[f]++,d=0,g=f,w=1)),w*=m[f];if(i)for(f=0;f<=6;f++)i&&o[f]?i--:i||(o[f]=0);return o}})}(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка