!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-countdown",days:".timer-container.timer-days",hours:".timer-container.timer-hours",minutes:".timer-container.timer-minutes",seconds:".timer-container.timer-seconds",counts:".timer-container .timer-count"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$days:this.$element.find(e.days),$hours:this.$element.find(e.hours),$minutes:this.$element.find(e.minutes),$seconds:this.$element.find(e.seconds),$counts:this.$element.find(e.counts)}}bindEvents(){this.onRender()}onRender(){const e=this,t=new Date(e.elements.$wrapper.data("due-date")).getTime(),n=setInterval(function(){const r=new Date,s=t-r,o=Math.floor(s/864e5),i=Math.floor(s%864e5/36e5),a=Math.floor(s%36e5/6e4),l=Math.floor(s%6e4/1e3);e.elements.$counts.removeClass("timer-loading"),s>=0?(e.elements.$days&&e.elements.$days.find(".timer-count").text(o),e.elements.$hours&&e.elements.$hours.find(".timer-count").text(i),e.elements.$minutes&&e.elements.$minutes.find(".timer-count").text(a),e.elements.$seconds&&e.elements.$seconds.find(".timer-count").text(l)):(clearInterval(n),e.elements.$wrapper.addClass("countdown-expired"),e.onExpired())},1e3)}onExpired(){const e=this,t=e.elements.$wrapper,n=t.data("expired-type");if("message"==n){const n=e.escapeHtml(t.data("expired-title")),r=e.escapeHtml(t.data("expired-content"));t.html(`\n        <div class="expire-message">\n          <span class="expire-title">${n}</span>\n          <span class="expire-content">${r}</span>\n        </div>\n      `)}else if("redirect"==n){const n=t.data("redirect-link");window.self!==window.top?t.html(`<div class="expire-message">\n            <span class="expire-content">${iframe_content}</span>\n          </div>\n        `):e.isValidUrl(n)&&(location.href=n)}else if("template"==n){const e=t.data("template");t.html(atob(e))}}escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}isValidUrl(e){if(!e||"string"!=typeof e)return!1;if(e.startsWith("#"))return/^#[a-zA-Z0-9_-]+$/.test(e);if(e.startsWith("?"))return!0;if(e.startsWith("/"))return!/^\/.*javascript:/i.test(e);try{const t=new URL(e);return/^(https?):$/.test(t.protocol)}catch(e){return!1}}}jQuery(window).on("elementor/frontend/init",()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_countdown.default",e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})})})}]);