(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{1217:function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,a,u=[],s=!0,m=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;s=!1}else for(;!(s=(n=o.call(i)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){m=!0,r=e}finally{try{if(!s&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(m)throw r}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}i.r(t);var m=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.endTime=t.endTime||null,this.duration=t.duration||0,this.onTick=t.onTick||function(){},this.onComplete=t.onComplete||function(){},this.isEvergreen=t.isEvergreen||!1,this.interval=null,this.remainingTime=0,this.isRunning=!1,this.timezone=t.timezone||null},(t=[{key:"start",value:function(){var e=this;this.isRunning||(this.isRunning=!0,this.updateRemainingTime(),this.interval=setInterval((function(){e.updateRemainingTime();var t=e.getFormattedTime();e.onTick(e.remainingTime,t),e.remainingTime<=0&&e.complete()}),1e3))}},{key:"pause",value:function(){this.isRunning&&(clearInterval(this.interval),this.isRunning=!1)}},{key:"reset",value:function(){this.pause(),this.isEvergreen?this.remainingTime=this.duration:this.updateRemainingTime()}},{key:"updateRemainingTime",value:function(){if(this.isEvergreen)this.remainingTime<=0?this.remainingTime=this.duration:this.remainingTime--;else{var e;if(this.timezone&&"string"==typeof this.timezone&&"undefined"!=typeof window&&window.Intl&&window.Intl.DateTimeFormat)try{var t=this.timezone&&"string"==typeof this.timezone&&this.timezone.trim()?this.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",i=r((new Date).toLocaleString("en-US",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).split(", "),2),n=i[0],o=i[1],a=r(n.split("/"),3),u=a[0],s=a[1],m=a[2],l=r(o.split(":"),3),h=l[0],c=l[1],f=l[2];e=new Date(Number(m),Number(u)-1,Number(s),Number(h),Number(c),Number(f)).getTime()}catch(t){e=(new Date).getTime()}else e=(new Date).getTime();var g=new Date(this.endTime).getTime();this.remainingTime=Math.max(0,Math.floor((g-e)/1e3))}}},{key:"setTimezone",value:function(e){this.timezone=e,this.updateRemainingTime()}},{key:"complete",value:function(){this.pause(),this.onComplete(),this.isEvergreen&&(this.reset(),this.start())}},{key:"getFormattedTime",value:function(){var e=Math.floor(this.remainingTime/86400),t=Math.floor(this.remainingTime%86400/3600),i=Math.floor(this.remainingTime%3600/60),n=this.remainingTime%60;return{days:String(e).padStart(2,"0"),hours:String(t).padStart(2,"0"),minutes:String(i).padStart(2,"0"),seconds:String(n).padStart(2,"0")}}},{key:"setEndTime",value:function(e){this.isEvergreen||(this.endTime=e,this.updateRemainingTime())}},{key:"setDuration",value:function(e){this.isEvergreen&&(this.duration=e,this.remainingTime=e)}}])&&u(e.prototype,t),i&&u(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}();t.default=m,window.FKCountdown=m}}]);