System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./pay-legacy-5XMctsci.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(o,e){"use strict";var t,n,a,p,i,c,l,r,s,u,d,x,b,m,v,g,f,h,y,C,w,k,_,j,$;return{setters:[o=>{t=o.fE,n=o.h,a=o.fF,p=o.c},o=>{i=o.u},o=>{c=o.k,l=o.r,r=o.$,s=o.a8,u=o.S,d=o.R,x=o.a0,b=o.j,m=o.u,v=o.O,g=o.c,f=o.Z,h=o._,y=o.aa,C=o.F,w=o.P,k=o.ak},o=>{_=o.az,j=o.o,$=o.a6},null],execute:function(){var e=document.createElement("style");function z(o){return"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!m(o)}e.textContent=".coupon-box[data-v-5b993027]{background:var(--coupon-bg) no-repeat;background-size:100%;background-position:left top 30px}.coupon-box .n-select[data-v-5b993027] .n-base-selection{--n-color: transparent;--n-color-active: transparent;--n-border: none;--n-border-active: none;--n-border-focus: none;--n-border-hover: none;--n-box-shadow-active: none;--n-box-shadow-focus: none}.coupon-box .n-select[data-v-5b993027] .n-base-selection .n-base-selection-placeholder{justify-content:center}.coupon-list[data-v-5b993027]{margin-top:24px}.coupon-list .coupon-item[data-v-5b993027]{position:relative;margin-bottom:24px;display:flex;align-items:center;border-radius:4px;padding-top:16px;padding-bottom:16px;background:var(--pay-color-bg);border:1px solid var(--pay-color-border)}.coupon-list .coupon-item .decoration[data-v-5b993027]{position:absolute;top:0;left:0;width:44px;height:44px;background:url(\"data:image/svg+xml,%3csvg%20width='44'%20height='43'%20viewBox='0%200%2044%2043'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.047%200H44L0%2043V2.047C0%20.917.916%200%202.047%200z'%20fill-rule='evenodd'%20fill='%23FFAC0A'/%3e%3c/svg%3e\") no-repeat;padding-top:4px;padding-left:2px;font-size:14px;color:#fff}.coupon-list .coupon-item .coupon-amount[data-v-5b993027]{position:relative;width:120px;display:flex;flex-direction:column;align-items:center;padding-left:16px;padding-right:16px;background:linear-gradient(to bottom,#ffa700,#fdca44);-webkit-background-clip:text;background-clip:text;color:transparent}.coupon-list .coupon-item .coupon-amount[data-v-5b993027]:after{content:\"\";position:absolute;top:50%;right:0;display:block;width:1px;height:48px;margin-top:-24px;background:#fdca44}.coupon-list .coupon-item .coupon-amount .coupon-price[data-v-5b993027]{display:flex;align-items:baseline;font-weight:700}.coupon-list .coupon-item .coupon-amount .coupon-desc[data-v-5b993027]{margin-top:10px;color:var(--color-text-3)}.coupon-list .coupon-item .coupon-info[data-v-5b993027]{flex:1 1 0%;padding-left:16px;color:var(--color-text-2)}.coupon-list .coupon-item .coupon-info .coupon-name[data-v-5b993027]{margin-bottom:12px;font-size:14px}.coupon-number[data-v-5b993027]{margin-top:20px;text-align:center;font-size:14px;color:var(--color-text-2)}.coupon-btn[data-v-5b993027]{margin-top:20px;width:100%;height:42px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:20px;--un-bg-opacity:1;background-color:rgb(255 176 76 / var(--un-bg-opacity));text-align:center;font-size:16px;--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity));box-shadow:0 2px 2px rgba(0,0,0,.2);transition:background-color .3s}.coupon-btn[data-v-5b993027]:hover{--un-bg-opacity:1;background-color:rgb(246 137 0 / var(--un-bg-opacity))}\n/*$vite$:1*/",document.head.appendChild(e);const D=c({__name:"time",props:{endtime:{default:0}},setup(o){const e=o,t=l(0),n=o=>o.toString().padStart(2,"0"),a=({hours:o,minutes:e,seconds:t})=>{let a,p,i;const{t:c}=d();return x("div",{class:"flex justify-center items-center text-font2 text-16px"},[x("span",null,[c("Component.Coupon.index_10")]),x(j,{type:"error",size:"small",class:"h-30px mx-10px px-4px text-18px font-bold",bordered:!1},z(a=n(o))?a:{default:()=>[a]}),x("span",null,[b(":")]),x(j,{type:"error",size:"small",class:"h-30px mx-10px px-4px text-18px font-bold",bordered:!1},z(p=n(e))?p:{default:()=>[p]}),x("span",null,[b(":")]),x(j,{type:"error",size:"small",class:"h-30px mx-10px px-4px text-18px font-bold",bordered:!1},z(i=n(t))?i:{default:()=>[i]})])};return t.value=1e3*e.endtime-Math.floor(Date.now()),(o,e)=>{const n=_;return r(),s(n,{duration:u(t),render:a},null,8,["duration"])}}}),S={class:"coupon-box"},L={class:"pt-24px bg-modal rounded-10px"},T={class:"px-36px"},F={class:"text-20px text-pro"},M={class:"coupon-list"},R={class:"decoration"},q={class:"coupon-amount"},I={class:"coupon-price"},O={class:"text-34px"},P={class:"coupon-info"},A={class:"coupon-name"},E={class:"coupon-time"},Q={class:"mr-0.25em text-error text-20px"},U={class:"pt-14px"},B={class:"mt-24px text-center"},H={key:0,class:"coupon-number"},V={class:"px-36px pb-16px bg-modal rounded-10px"},Z={class:"w-200px mt-10px mx-auto"},G=c({__name:"index",props:{obtainId:{default:0},endTime:{default:0},couponList:{default:()=>[]},couponQuota:{default:()=>({quota:0,total:0,received:0})}},emits:["close","receive"],setup(o,{emit:e}){const{t:p}=d(),c=o,{couponList:s,couponQuota:b}=v(c),m=g((()=>b.value.total-b.value.quota)),_=e,j=i(),z=o=>Math.floor(o/86400),G=l(null),J=[{label:p("Component.Coupon.index_6"),value:"today"},{label:p("Component.Coupon.index_7"),value:"week"},{label:p("Component.Coupon.index_8"),value:"forver"}],K=async()=>{await t({obtain_id:`${c.obtainId}`}),j.getReceiveCoupon(),_("close"),_("receive")},N=(o,e)=>{n({title:p("Public.Confirm.Title"),content:`${p("Component.Coupon.index_9",[e.label])}`,onConfirm:async()=>{let e=0;switch(o){case"today":e=new Date((new Date).toLocaleDateString()).getTime()+864e5-1;break;case"week":e=new Date((new Date).toLocaleDateString()).getTime()+6048e5-1;break;case"forver":e=-100}e=Math.floor(e>0?e/1e3:e),await a({limit_time:e}),j.getReceiveCoupon(),_("close")}})};return(o,e)=>{const t=$;return r(),f("div",S,[h("div",L,[h("div",T,[h("div",F,y(o.$t("Component.Coupon.index_1")),1),h("div",M,[(r(!0),f(C,null,w(u(s),((t,n)=>(r(),f("div",{key:`${n}`,class:"coupon-item"},[h("div",R,y(o.$t("Component.Coupon.index_2")),1),h("div",q,[h("div",I,[e[0]||(e[0]=h("span",{class:"text-20px mr-4px"},"$",-1)),h("span",O,y(t.deduct_amount),1)])]),h("div",P,[h("div",A,y(t.title),1),h("div",E,[h("span",null,y(o.$t("Component.Coupon.index_3")),1),h("span",Q,y(z(t.expires)),1),h("span",null,y(o.$t("Public.Unit.Day",z(t.expires))),1)])])])))),128))])])]),h("div",U,[h("div",B,[x(D,{endtime:o.endTime},null,8,["endtime"])]),u(b).total>0?(r(),f("div",H," ⏳Remaining: "+y(u(m))+" / "+y(u(b).total)+" (🎁 "+y(u(m))+" peoples have get it) ",1)):k("",!0),h("div",V,[h("div",{class:"coupon-btn",onClick:K},y(o.$t("Component.Coupon.index_5"))+" (Last "+y(u(b).quota)+" coupons) ",1),h("div",Z,[x(t,{value:u(G),options:J,"consistent-menu-width":!1,placeholder:o.$t("Component.Coupon.index_13"),"onUpdate:value":N},null,8,["value","placeholder"])])])])])}}});o("default",p(G,[["__scopeId","data-v-5b993027"]]))}}}));