countdown-8.x-1.8/js/integrations/countdown.core.integration.min.js

js/integrations/countdown.core.integration.min.js
!function(t){"use strict";t.countdown.registerLoader("countdown",(function(e,o){if("undefined"==typeof CountdownTimer)return void t.countdown.utils.handleError(e,"Core timer library not loaded","countdown");const n=t.countdown.utils.resolveCountdownSettings(e,o,"countdown");if(n.library&&"countdown"!==n.library)return;e.id||(e.id="countdown-"+Math.random().toString(36).substr(2,9));const i={selector:"#"+e.id,mode:n.mode||"countdown",precision:n.precision||"seconds",driftCompensation:void 0===n.driftCompensation||n.driftCompensation,autoStart:void 0===n.autoStart||n.autoStart,debug:n.debug||!1,benchmark:n.benchmark||!1};n.style&&(i.style=n.style),n.formatTemplate&&n.formatTemplate.length>0&&(i.formatTemplate=n.formatTemplate,i.useCustomFormat=!0),void 0!==n.start&&(i.start=n.start),void 0!==n.target_date&&(i.target=n.target_date),n.offset&&(i.offset=parseInt(n.offset,10)),i.onComplete=function(o,i){t.countdown.utils.showExpiredMessage(e,n,"countdown")},i.onTick=function(o,n){t.countdown.utils.dispatchEvent(e,"tick",{element:e,library:"countdown",timeObj:o})},i.onStart=function(o,n){e.classList.add("countdown-initialized"),t.countdown.utils.dispatchEvent(e,"initialized",{element:e,library:"countdown"})};try{const o=new CountdownTimer(i);if(i.formatTemplate&&i.useCustomFormat){o._tick.bind(o);o._tick=function(){o.config.selector&&!o._element&&(o._element=document.querySelector(o.config.selector));const t=o.getElapsed(),e="countdown"===o.config.mode?Math.max(0,o.state.targetMs-t):t;if(o._checkCompletion(e))return;const n=o.formatTime(o.config.formatTemplate),i=o.getTime();if(o.config.style&&CountdownTimer._styles&&CountdownTimer._styles.has(o.config.style)){if(!o._styleRenderer){const t=CountdownTimer._styles.get(o.config.style);o._styleRenderer=new t(o,o.config.styleOptions)}o._element&&o._styleRenderer.render&&o._styleRenderer.render(n,i)}else o._element&&(o._element.textContent=n);o.config.debug&&console.log("[CountdownTimer]",n,i),o._emit("tick",i),o.config.onTick&&o.config.onTick(i,o)}}t.countdown.storeInstance(e,{instance:o,stop:function(){o&&o.stop&&o.stop()}}),!i.autoStart&&o.start&&o.start(),n.debug&&console.log("Core countdown initialized:",{element:e,config:i,settings:n})}catch(o){console.error("Countdown: Failed to create core timer",o),t.countdown.utils.handleError(e,"Failed to create timer: "+o.message,"countdown")}}))}(Drupal);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc