PageSourceSearch

https://cyl62.com/_app/immutable/nodes/13.DzzwrbiT.js

js cyl62.com collected 2026-10-06 00:21:24 UTC 10,168 bytes, 1 lines download raw bytes

1import"../chunks/CuFcpNLf.js";import{w as rt,p as ot,h as de,g as ce,aj as ue,f as J,a as p,b as it,k as nt,l as r,c as y,u as h,d as n,s as l,r as i,t as j,e as w,m as _,n as ve,ap as pe,at as lt,au as dt,x as ct,j as G}from"../chunks/B1WHINfF.js";import{bp as ut,c as me,v as K,bk as fe,a9 as ge,B as _e,i as $,$ as vt,h as pt,d as mt,bq as ft,bi as gt,n as ye,aB as _t,ah as yt,ai as ht,A as he,av as xt,aw as xe,br as Q,bf as bt,g as wt,bs as $t,bj as kt,ay as Ct}from"../chunks/BN74xd1h.js";import{I as Pt,e as be,i as Ot,h as Dt}from"../chunks/BjNnHQJm.js";import{B as Ht}from"../chunks/DwgoyVV3.js";import{M as we}from"../chunks/DzSLVTFp.js";import{N as jt}from"../chunks/0u4ThoAj.js";import{S as x}from"../chunks/CitqqhTH.js";import{T as $e}from"../chunks/CWdpFodN.js";import{u as It}from"../chunks/Do8g51W6.js";import{i as Lt}from"../chunks/CfTRSIcM.js";const ra=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Tt=""+new URL("../assets/coupons.DB1hLlhw.webp",import.meta.url).href,At=""+new URL("../assets/coupon.Dhi42eWv.webp",import.meta.url).href,Mt=""+new URL("../assets/coupons.To08vQgG.webp",import.meta.url).href,Nt=""+new URL("../assets/coupon.B8VWlDRI.webp",import.meta.url).href;var Ut=y('<div class="flex items-center gap-1"><!> <span> </span></div>'),Bt=y('<div class="bg-card-secondary text-secondary flex min-h-[50vh] w-full flex-1 items-center justify-center rounded-lg p-4"><!></div>'),Rt=y('<div class="relative overflow-hidden rounded-2xl"><!> <div class="relative flex p-4"><div class="w-[35%] shrink-0"><!></div> <div class="flex w-[65%] flex-col justify-between pl-3"><div><!> <!> <!> <!></div> <div class="mt-5 flex justify-end"><!></div></div></div> <div class="absolute top-3 right-4"><!></div></div>'),St=y('<div class="grid grid-cols-1 gap-[1.5100671140939599vw] md:grid-cols-2 xl:grid-cols-3 2xl:grid 2xl:grid-cols-4"></div>'),qt=y('<p class="text-secondary text-sm sm:text-xs"> </p>'),Et=y('<div class="absolute top-3 right-6 rounded-xl bg-(--coupon-image-bg) px-2 py-0.5 text-sm font-semibold text-(--text-white) shadow sm:top-2 sm:text-xs"> </div>'),Ft=y('<div class="relative"><img alt="coupon background" class="absolute inset-0 h-full w-full object-fill"/> <div class="relative flex"><div class="flex w-[35%] shrink-0 items-center justify-center pt-[5%] pr-[5%] pb-[7%] pl-[4%]"><div class="relative h-full w-full overflow-hidden"><div class="coupon-img relative svelte-1mzf15r"><img alt="Promotion" class="v-rounded absolute top-0 left-0 h-full w-full object-cover"/></div></div></div> <div class="flex w-[65%] flex-col justify-between py-5 pr-6 pl-2"><div><p class="text-primary mb-1 line-clamp-1 text-lg leading-tight font-bold sm:text-base"> </p> <p class="text-secondary line-clamp-1 text-sm sm:text-xs"></p> <button class="text-link cursor-pointer text-sm underline sm:text-xs"> </button> <!></div> <div class="mb-1 flex justify-end"><!></div></div></div> <!></div>'),zt=y('<div class="grid grid-cols-1 gap-[1.5100671140939599vw] md:grid-cols-2 xl:grid-cols-3 2xl:grid 2xl:grid-cols-4"></div>'),Wt=y('<div class="overflow-x-auto"><!></div>'),Jt=y('<div class="flex items-center justify-between"><!> <!></div> <div class="text-wrapper bg-opacity-card-primary-80 mt-4 mb-6 min-h-[50vh] w-full rounded-lg p-4"><!></div> <!> <!>',1);function oa(ke,Ce){ot(Ce,!0);const Pe=()=>_(Ct,"$useThemeMode",m),d=()=>_(vt,"$t",m),V=()=>_(yt,"$walletActive",m),R=()=>_(ht,"$useDefaults",m),X=()=>_(mt,"$isAuthenticated",m),Y=()=>_(ft,"$loadingCouponPromotions",m),Z=()=>_(Te,"$couponList",m),Oe=()=>_(Q,"$promotionClaiming",m),De=()=>_(Ae,"$mapHistoryItems",m),He=()=>_(fe,"$redeemHistory",m),je=()=>_(kt,"$loadingHistory",m),[m,Ie]=nt();let I=de({isOpen:!1}),k=ce(de({isOpen:!1,data:null})),S=ce(1);const Le=5,Te=ue([ut,me,Lt],([e,a,s])=>e==null?void 0:e.sort((t,o)=>(t==null?void 0:t.order)-(o==null?void 0:o.order)).map(t=>{const o=It(t),c=Ne(t.image,s,(a==null?void 0:a.IETF)??"");return{...o,_imageUrl:c,title:o.title||"-",detail:o.detail||"-"}})),Ae=ue([fe,me],([e,a])=>{var s;return(s=e==null?void 0:e.data)!=null&&s.length?e.data.map(t=>
1({datetime:K.getLocalDate(t.created_at),promotionCode:t.promotion_code,status:t.status==="used"?"success":t.status,action:{view:!0,data:t}})):[]}),Me=h(()=>e=>Pe()==="dark"?e>1?Mt:Nt:e>1?Tt:At),ee=h(()=>{const e=r(k).data;if(!e)return[];const a=[];return e.credit_benefit&&a.push({rewardName:d()("credit"),quantity:`${K.currency(e.credit_amount||0)} (${e.currency})`,type:d()("credit")}),e.event_benefit&&e.event_detail&&JSON.parse(e.event_detail).forEach(s=>a.push({rewardName:s.sub_type==="lucky_wheel"?d()("luckyWheel"):s.type,quantity:`${s.qty} (${d()("ticket")})`,type:d()("events")})),e.freespin_benefit&&e.freespin_detail&&JSON.parse(e.freespin_detail).forEach(s=>{var t;return a.push({rewardName:((t=s.game)==null?void 0:t.description)||"-",quantity:"-",type:d()("category.freespin")})}),a}),Ne=(e=[],a,s)=>{var o;const t=a?"mobile":"desktop";return((o=e.find(c=>{var u;return c.type===t&&((u=c.lang)==null?void 0:u.includes(s))}))==null?void 0:o.url)||ge().promotionImage},te=async e=>{try{const a=await xt({promotionCode:e.code});xe(!0,{...a,_resolvedImage:{current:e._imageUrl}},{isCoupon:!0,onClaim:ae})}catch(a){console.error("Failed to fetch promotion detail",a)}},ae=async e=>{var a,s;if(e){Q.update(t=>({...t,[e.code]:!0}));try{await bt({promotionCode:e.code,amount:e.amount||1,currency:e.currency||((a=V())==null?void 0:a.currency)||((s=R())==null?void 0:s.currencyCode)}),ye({message:d()("success"),status:"success"}),xe(!1,{}),await wt(),await $t()}catch{}finally{Q.update(t=>({...t,[e.code]:!1}))}}},se=async()=>{var e,a;try{await gt({currency:((e=V())==null?void 0:e.currency)||((a=R())==null?void 0:a.currencyCode),type:"coupon",page:r(S),pageSize:Le})}catch(s){ye({message:_t({error:s}),status:"error"})}},Ue=()=>{if(!X())return pt({active:!0,tab:"login"});se(),I.isOpen=!0},Be=e=>{G(S,e,!0),se()},Re=e=>{var a;(a=e==null?void 0:e.action)!=null&&a.data&&G(k,{isOpen:!0,data:e.action.data},!0)},Se=e=>{e.target.src=ge().placeholdersImage},qe=[{label:"table.dateTime",key:"datetime",class:"text-left"},{label:"code",key:"promotionCode",class:"text-left"},{label:"table.status",key:"status",class:"text-center"},{label:"benefits",key:"action",class:"text-center"}
1],Ee=[{label:"rewardName",key:"rewardName",class:"text-left"},{label:"quantity",key:"quantity",class:"text-center"},{label:"table.type",key:"type",class:"text-right"}];var re=Jt(),q=J(re),oe=n(q);{let e=h(()=>[{name:d()("events"),path:"/events"},{name:d()("coupons")}]);Ht(oe,{handleArrow:!0,link:"/events",get setting(){return r(e)}})}var Fe=l(oe,2);_e(Fe,{class:"btn-secondary text-base",onclick:Ue,size:"sm",children:(e,a)=>{var s=Ut(),t=n(s);Pt(t,{icon:"lucide:clipboard-clock",class:"text-xl"});var o=l(t,2),c=n(o,!0);i(o),i(s),j(u=>w(c,u),[()=>d()("couponHistory")]),p(e,s)},$$slots:{default:!0}}),i(q);var E=l(q,2),ze=n(E);{var We=e=>{var a=Bt(),s=n(a);{let t=h(()=>d()("couponNotFound"));jt(s,{get title(){return r(t)},icon:"lucide:ticket-x",titleClass:"text-tertiary"})}i(a),p(e,a)},Je=e=>{var a=St();be(a,20,()=>Array(3),Ot,(s,t)=>{var o=Rt(),c=n(o);x(c,{class:"absolute inset-0 h-full w-full rounded-2xl pt-[5%]"});var u=l(c,2),v=n(u),N=n(v);x(N,{class:"aspect-square w-full rounded-xl pt-[5%]"}),i(v);var L=l(v,2),b=n(L),T=n(b);x(T,{class:"h-5 w-3/4 rounded pt-[5%]"});
1var C=l(T,2);x(C,{class:"mt-2 h-4 w-full rounded pt-[5%]"});var P=l(C,2);x(P,{class:"mt-2 h-4 w-5/6 rounded pt-[5%]"});var F=l(P,2);x(F,{class:"mt-3 h-4 w-20 rounded pt-[5%]"}),i(b);var O=l(b,2),D=n(O);x(D,{class:"h-8 w-25 rounded-lg pt-[5%]"}),i(O),i(L),i(u);var U=l(u,2),z=n(U);x(z,{class:"h-6 w-10 rounded-xl pt-[5%]"}),i(U),i(o),p(s,o)}),i(a),p(e,a)},Ge=e=>{var a=zt();be(a,5,Z,s=>s.code,(s,t)=>{var o=Ft(),c=n(o),u=l(c,2),v=n(u),N=n(v),L=n(N),b=n(L);i(L),i(N),i(v);var T=l(v,2),C=n(T),P=n(C),F=n(P,!0);i(P);var O=l(P,2);Dt(O,()=>r(t).detail,!0),i(O);var D=l(O,2),U=n(D,!0);i(D);var z=l(D,2);{var Xe=f=>{var g=qt(),A=n(g);i(g),j((le,B)=>w(A,`${le??""} : ${B??""}`),[()=>d()("endDate"),()=>K.dateOnly(r(t).endDate,"dd/mm/yyyy")]),p(f,g)};$(z,f=>{r(t).endDate&&f(Xe)})}i(C);var ne=l(C,2),Ye=n(ne);{let f=h(()=>Oe()[r(t).code]||!1),g=h(()=>r(t).isExpires==="expired");_e(Ye,{size:"sm",class:"btn-primary min-w-10",get loading(){return r(f)},get disabled(){return r(g)},onclick:()=>R().countryCode==="KR"?te(r(t)):ae(r(t)),children:(A,le)=>{var B=ve(),tt=J(B);{var at=H=>{var M=pe();j(W=>w(M,W),[()=>d()("expired")]),p(H,M)},st=H=>{var M=pe();j(W=>w(M,W),[()=>d()("claim")]),p(H,M)};$(tt,H=>{r(t).isExpires==="expired"?H(at):H(st,-1)})}p(A,B)},$$slots:{default:!0}})}i(ne),i(T),i(u);var Ze=l(u,2);{var et=f=>{var g=Et(),A=n(g);i(g),j(()=>w(A,`x${r(t).amount??""}`)),p(f,g)};$(Ze,f=>{r(t).amount>1&&f(et)})}i(o),j((f,g)=>{he(c,"src",f),he(b,"src",r(t)._imageUrl),w(F,r(t).title),w(U,g)},[()=>r(Me)(r(t).amount),()=>d()("conditions")]),lt("error",b,Se),dt(b),ct("click",D,()=>te(r(t))),p(s,o)}),i(a),p(e,a)};$(ze,e=>{var a;!X()||!Y()&&!((a=Z())!=null&&a.length)?e(We):Y()?e(Je,1):e(Ge,-1)})}i(E);var ie=l(E,2);{var Ke=e=>{{let a=h(()=>d()("couponHistory"));we(e,{get title(){return r(a)},TitleDescription:"",handleClose:()=>I.isOpen=!1,get open(){return I.isOpen},set open(s){I.isOpen=s},children:(s,t)=>{var o=Wt(),c=n(o);{let u=h(()=>{var v;return((v=He())==null?void 0:v.pageTotal)||1});$e(c,{pagination:!0,get fields(){return qe},get items(){return De()},mbFields:["datetime","promotionCode","status"],get currPage(){return r(S)},get totalPage(){return r(u)},handleCurrPage:Be,handleAction:Re,get loading(){return je()}})}i(o),p(s,o)},$$slots:{default:!0}})}};$(ie,e=>{I.isOpen&&e(Ke)})}var Qe=l(ie,2);{var Ve=e=>{{let a=h(()=>d()("listOfBenefits"));we(e,{get title(){return r(a)},handleClose:()=>G(k,{isOpen:!1,data:null},!0),get open(){return r(k).isOpen},set open(s){r(k).isOpen=s},children:(s,t)=>{var o=ve(),c=J(o);{var u=v=>{$e(v,{get fields(){return Ee},get items(){return r(ee)},isOnlyPc:!0,minHeight:!1})};$(c,v=>{r(ee).length>0&&v(u)})}p(s,o)},$$slots:{default:!0}})}};$(Qe,e=>{r(k).isOpen&&e(Ve)})}p(ke,re),it(),Ie()}rt(["click"]);export{oa as component,ra as universal};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.