import{_ as z}from"./Flipper-B80NPi1m.js";import{d as E}from"./dayjs.min-tKPc2Ebd.js";import{aa as q,a6 as G,p as J,o as g,b as S,e as Z,F as K,q as D,m as v,n as T,g as A}from"./index-bVOhw2NF.js";var I={exports:{}};(function(l,m){(function(n,o){l.exports=o()})(q,function(){var n,o,y=1e3,r=6e4,d=36e5,b=864e5,H=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k=31536e6,$=2628e6,h=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_={years:k,months:$,days:b,hours:d,minutes:r,seconds:y,milliseconds:1,weeks:6048e5},Y=function(e){return e instanceof P},x=function(e,s,t){return new P(e,t,s.$l)},j=function(e){return o.p(e)+"s"},N=function(e){return e<0},M=function(e){return N(e)?Math.ceil(e):Math.floor(e)},B=function(e){return Math.abs(e)},w=function(e,s){return e?N(e)?{negative:!0,format:""+B(e)+s}:{negative:!1,format:""+e+s}:{negative:!1,format:""}},P=function(){function e(t,i,a){var u=this;if(this.$d={},this.$l=a,t===void 0&&(this.$ms=0,this.parseFromMilliseconds()),i)return x(t*_[j(i)],this);if(typeof t=="number")return this.$ms=t,this.parseFromMilliseconds(),this;if(typeof t=="object")return Object.keys(t).forEach(function(p){u.$d[j(p)]=t[p]}),this.calMilliseconds(),this;if(typeof t=="string"){var c=t.match(h);if(c){var f=c.slice(2).map(function(p){return p!=null?Number(p):0});return this.$d.years=f[0],this.$d.months=f[1],this.$d.weeks=f[2],this.$d.days=f[3],this.$d.hours=f[4],this.$d.minutes=f[5],this.$d.seconds=f[6],this.calMilliseconds(),this}}return this}var s=e.prototype;return s.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(i,a){return i+(t.$d[a]||0)*_[a]},0)},s.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=M(t/k),t%=k,this.$d.months=M(t/$),t%=$,this.$d.days=M(t/b),t%=b,this.$d.hours=M(t/d),t%=d,this.$d.minutes=M(t/r),t%=r,this.$d.seconds=M(t/y),t%=y,this.$d.milliseconds=t},s.toISOString=function(){var t=w(this.$d.years,"Y"),i=w(this.$d.months,"M"),a=+this.$d.days||0;this.$d.weeks&&(a+=7*this.$d.weeks);var u=w(a,"D"),c=w(this.$d.hours,"H"),f=w(this.$d.minutes,"M"),p=this.$d.seconds||0;this.$d.milliseconds&&(p+=this.$d.milliseconds/1e3,p=Math.round(1e3*p)/1e3);var O=w(p,"S"),V=t.negative||i.negative||u.negative||c.negative||f.negative||O.negative,W=c.format||f.format||O.format?"T":"",F=(V?"-":"")+"P"+t.format+i.format+u.format+W+c.format+f.format+O.format;return F==="P"||F==="-P"?"P0D":F},s.toJSON=function(){return this.toISOString()},s.format=function(t){var i=t||"YYYY-MM-DDTHH:mm:ss",a={Y:this.$d.years,YY:o.s(this.$d.years,2,"0"),YYYY:o.s(this.$d.years,4,"0"),M:this.$d.months,MM:o.s(this.$d.months,2,"0"),D:this.$d.days,DD:o.s(this.$d.days,2,"0"),H:this.$d.hours,HH:o.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:o.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:o.s(this.$d.seconds,2,"0"),SSS:o.s(this.$d.milliseconds,3,"0")};return i.replace(H,function(u,c){return c||String(a[u])})},s.as=function(t){return this.$ms/_[j(t)]},s.get=function(t){var i=this.$ms,a=j(t);return a==="milliseconds"?i%=1e3:i=a==="weeks"?M(i/_[a]):this.$d[a],i||0},s.add=function(t,i,a){var u;return u=i?t*_[j(i)]:Y(t)?t.$ms:x(t,this).$ms,x(this.$ms+u*(a?-1:1),this)},s.subtract=function(t,i){return this.add(t,i,!0)},s.locale=function(t){var i=this.clone();return i.$l=t,i},s.clone=function(){return x(this.$ms,this)},s.humanize=function(t){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},s.valueOf=function(){return this.asMilliseconds()},s.milliseconds=function(){return this.get("milliseconds")},s.asMilliseconds=function(){return this.as("milliseconds")},s.seconds=function(){return this.get("seconds")},s.asSeconds=function(){return this.as("seconds")},s.minutes=function(){return this.get("minutes")},s.asMinutes=function(){return this.as("minutes")},s.hours=function(){return this.get("hours")},s.asHours=function(){return this.as("hours")},s.days=function(){return this.get("days")},s.asDays=function(){return this.as("days")},s.weeks=function(){return this.get("weeks")},s.asWeeks=function(){return this.as("weeks")},s.months=function(){return this.get("months")},s.asMonths=function(){return this.as("months")},s.years=function(){return this.get("years")},s.asYears=function(){return this.as("years")},e}(),C=function(e,s,t){return e.add(s.years()*t,"y").add(s.months()*t,"M").add(s.days()*t,"d").add(s.hours()*t,"h").add(s.minutes()*t,"m").add(s.seconds()*t,"s").add(s.milliseconds()*t,"ms")};return function(e,s,t){n=t,o=t().$utils(),t.duration=function(u,c){var f=t.locale();return x(u,{$l:f},c)},t.isDuration=Y;var i=s.prototype.add,a=s.prototype.subtract;s.prototype.add=function(u,c){return Y(u)?C(this,u,1):i.bind(this)(u,c)},s.prototype.subtract=function(u,c){return Y(u)?C(this,u,-1):a.bind(this)(u,c)}}})})(I);var L=I.exports;const Q=G(L);E.extend(Q);const R={name:"EsCountdown",components:{Flipper:z},props:{options:{}},data(){return{timer:null,flipObjs:[],endDateTime:null}},computed:{getStyle(){return{color:this.options.fontColor,"line-height":`${this.options.digitHeight}px`,"font-size":`${this.options.fontSize-10}px`,margin:"0 5px"}}},mounted(){this.flipObjs=[this.$refs.flipperHour1,this.$refs.flipperHour2,this.$refs.flipperMinute1,this.$refs.flipperMinute2,this.$refs.flipperSecond1,this.$refs.flipperSecond2],this.options.showDay&&(this.flipObjs.unshift(this.$refs.flipperDay2),this.flipObjs.unshift(this.$refs.flipperDay1)),this.init(),this.run()},methods:{init(){const l=new Date;this.options.fixedEndtime&&this.options.endTime?this.endDateTime=new Date(this.options.endTime).getTime():this.endDateTime=l.getTime()+this.options.countdown*1e3;const m=new Date(l.getTime()),n=this.getDiffTime(m);for(let o=0;o{const l=new Date,m=new Date(l.getTime()-1e3),n=new Date(l.getTime()),o=this.getDiffTime(m),y=this.getDiffTime(n);for(let r=0;r