1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5286],{9992:(t,e,r)=>{r.d(e,{A:()=>l});var n=r(79350),a=r(52639);let s=(0,n.J1)` 2 query LoyaltyMissions($status: MissionStatus, $pageSize: Int, $cursor: String) { 3 loyaltyMissions(status: $status, pageSize: $pageSize, cursor: $cursor) { 4 items { 5 id 6 title 7 description { 8 html 9 } 10 instructions { 11 html 12 } 13 type 14 rewards { 15 type 16 quantity 17 item { 18 id 19 name 20 description { 21 html 22 } 23 type 24 imageURL 25 } 26 } 27 userStatus 28 progress { 29 current 30 target 31 } 32 imageURL 33 requirement 34 } 35 nextCursor 36 } 37 } 38`;async function l({status:t,cursor:e}){let{data:r}=await a.client.query({query:s,variables:{status:t,pageSize:20,cursor:e}});return{data:r?.loyaltyMissions?.items||[],nextCursor:r?.loyaltyMissions?.nextCursor}}},10195:(t,e,r)=>{r.d(e,{A:()=>d});var n=r(37876),a=r(54587),s=r.n(a),l=r(14232),i=r(37847),o=r(30955),u=r(41629);let c=function({isModal:t,setModal:e,data:r}){var a,c;let[d,g]=(0,l.useState)(r?.imageURL),h=(0,u.CG)(r?.instructions),f=new DOMParser().parseFromString(r?.description?.html||"","text/html").body.textContent,x=r?.progress?.current/r?.progress?.target*100;return(0,l.useEffect)(()=>{g(r?.imageURL||o.A.IMAGE_CHANNEL_SQUARE_DEFAULT)}
38,[r?.imageURL]),(0,n.jsx)(i.aF,{isOpen:t,onCancel:()=>{e(!1)},className:"xl:w-[1264px] w-[96%] !max-w-[96svw] !max-h-[80svh] overflow-scroll scrollbar-hide bg-background border border-solid border-bright2",children:(0,n.jsxs)("div",{className:"bg-background-item py-6 pl-6 pr-3 rounded-xl text-primary",children:[(0,n.jsx)("h2",{className:"text20_700_30 text-center",children:"Chi tiết nhiá»m vụ"}),(0,n.jsxs)("div",{className:"mt-6 w-full flex gap-4 items-start justify-center flex-col md:flex-row",children:[(0,n.jsxs)("div",{className:"w-full md:w-1/3",children:[(0,n.jsx)("div",{className:"w-full h-auto",children:(0,n.jsx)(s(),{src:d,width:600,height:600,className:"w-full h-full object-cover",alt:"name",onError:()=>g(o.A.IMAGE_CHANNEL_SQUARE_DEFAULT)})}),(0,n.jsxs)("div",{className:"w-full mt-6",children:[(0,n.jsx)("p",{className:"text20_700_24 mt-2",children:r?.name}),(0,n.jsx)("div",{className:"w-full h-1 bg-bright2 rounded-lg overflow-hidden mt-4",children:(0,n.jsx)("div",{className:"bg-brand h-1",style:{width:`${x}%`}})}),(0,n.jsxs)("div",{className:"mt-2 flex items-center justify-between text14_400_18 text-secondary1",children:[(0,n.jsx)("p",{className:"",children:"PROFILE_FIELD"===(a=r?.progress?.unit)?"Trưá»ng th\xf4ng tin":"APP_OPEN"===a?"Sá» lần má» app":"WATCH_LATER"===a?"Sá» lượng VOD Ä\xe3 th\xeam":"VOD"===a?"Sá» lượng VOD Ä\xe3 xem":void 0}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("p",{className:"text-[#E25F00]",children:r?.progress?.current||0}),"/ ",r?.progress?.target||0," ","PROFILE_FIELD"===(c=r?.progress?.unit)?"th\xf4ng tin":"APP_OPEN"===c?"":"WATCH_LATER"===c||"VOD"===c?"vod":"PROFILE_FIELD"===c||"PROFILE_FIELD"===c?"th\xf4ng tin":void 0]})]}),(0,n.jsx)("button",{className:"mt-4 w-full flex items-center justify-center py-3 rounded-lg bg-brand text14_700_20",children:"Bắt Äầu"})]})]}),(0,n.jsxs)("div",{className:"w-full md:w-2/3",children:[(0,n.jsxs)("div",{className:"px-4 py-5 rounded-2xl bg-disable",children:[(0,n.jsx)("p",{className:"pb-3",children:"\uD83C\uDF81 Phần thưá»ng"}),(0,n.jsxs)("p",{className:"text16_400_20 text-secondary1 mt-3",children:["+",r?.rewards?.[0]?.quantity||0," V-Point"]})]}),(0,n.jsxs)("div",{className:"mt-5 px-4 py-5 rounded-2xl bg-disable",children:[(0,n.jsx)("p",{className:"pb-3",children:"\uD83D\uDCDA Hưá»ng dẫn"}),(0,n.jsx)("p",{className:"text16_400_20 text-secondary1 mt-3",children:h})]}),(0,n.jsxs)("div",{className:"mt-5 px-4 py-5 rounded-2xl bg-disable",children:[(0,n.jsx)("p",{className:"pb-3",children:"\uD83D\uDCCB Äiá»u khoản sá» dụng"}),(0,n.jsx)("p",{className:"text16_400_20 text-secondary1 mt-3",children:f})]}),(0,n.jsxs)("div",{className:"mt-5 px-4 py-5 rounded-2xl bg-disable",children:[(0,n.jsx)("p",{className:"pb-3",children:"âï¸ Há» trợ"}),(0,n.jsx)("p",{className:"text16_400_20 text-secondary1 mt-3",children:"Tá»ng Ä\xe0i: 0900 000 000"}),(0,n.jsx)("p",{className:"text16_400_20 text-secondary1 mt-1",children:"Email: [email protected]"})]})]})]})]})})},d=function({tabSelect:t,item:e}){let[r,a]=(0,l.useState)(!1),[i,u]=(0,l.useState)(e?.imageURL),d=e?.progress?.current/e?.progress?.target*100,g=e?.rewards?.[0]?.quantity>0?`+${e?.rewards?.[0]?.quantity}`:`-${e?.rewards?.[0]?.quantity}`;function h(t,e,r){return(0,n.jsx)(s(),{src:t,width:e,height:r,style:{objectFit:"cover"},alt:"name",className:"rounded-lg",onError:()=>u(o.A.IMAGE_CHANNEL_SQUARE_DEFAULT)})}return(0,l.useEffect)(()=>{u(e?.imageURL||o.A.IMAGE_CHANNEL_SQUARE_DEFAULT)},[e?.imageURL]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"relative overflow-hidden bg-surface rounded-2xl p-4 w-full flex items-center gap-3 justify-between cursor-pointer",onClick:function(){a(!0)},children:[(0,n.jsx)("div",{children:h(i,56,56)}),(0,n.jsxs)("div",{className:"w-[calc(100%-60px)]",children:[(0,n.jsx)("p",{className:"text14_400_18 text-secondary2",children:e.key}),(0,n.jsx)("p",{className:"text16_600_20 mt-2 line-clamp-1",children:e?.name}),(0,n.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,n.jsxs)("div",{className:`text14_500_18 ${"completed"===t?"text-secondary2 bg-[#F4F4F814]":"text-[#E25F00] bg-[#E25F003D]"} flex items-center rounded-3xl p-1 gap-[2px] backdrop-blur`,children:[g,h("/miniapp/loyalty/iconPoint.png",16,16)]}),"completed"!==t?(0,n.jsx)("div",{className:"py-3 px-6 rounded-lg text14_600_20 curs
38or-pointer bg-brand",onClick:function(e){e?.preventDefault(),e?.stopPropagation(),console.log({tabSelect:t})},children:"continue"===t?"Tiếp tục":"Bắt Äầu"}):(0,n.jsx)("div",{className:"py-3 px-6 rounded-lg bg-background-item text-disable text14_400_20 cursor-not-allowed",children:"Ä\xe3 ho\xe0n th\xe0nh"})]})]}),"continue"===t&&(0,n.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-[3px] bg-bright2 rounded-lg overflow-hidden mt-3",children:(0,n.jsx)("div",{className:"bg-brand h-[2px]",style:{width:`${Math.min(100,Math.max(0,d))}%`}})})]}),(0,n.jsx)(c,{isModal:r,setModal:a,data:e})]})}},41629:(t,e,r)=>{r.d(e,{$h:()=>x,BU:()=>w,CG:()=>v,Cp:()=>D,H6:()=>o,Ii:()=>h,Oz:()=>N,R1:()=>M,_D:()=>i,_r:()=>$,_v:()=>d,a7:()=>u,c5:()=>S,cB:()=>c,f7:()=>_,fi:()=>p,k5:()=>b,kF:()=>l,qd:()=>f,sZ:()=>g,tX:()=>m,w:()=>j});var n=r(37876),a=r(22085),s=r(14232);function l(t){let e=new Date,r=new Date(t),n=Math.abs(e.getTime()-r.getTime())/1e3,a=e.getTime()-r.getTime()>0?"trưá»c":"nữa",s=Math.floor(n/86400);if(s>365)return Math.floor(s/365)+" nÄm "+a;if(s>30)return Math.floor(s/30)+" th\xe1ng "+a;if(s>0)return s+" ng\xe0y "+a;let l=Math.floor(n/3600);if(l>0)return Math.floor(l)+" giá» "+a;let i=n%3600,o=Math.floor(i/60);return o>0?Math.floor(o)+" ph\xfat "+a:Math.floor(Math.floor(i%60))+" gi\xe2y "+a}function i(t,e){let r=new Date,n=new Date(t),a=(r.getTime()-n.getTime()||0)/1e3,s=Math.floor(a/86400);if(s>365)return Math.floor(s/365)+" nÄm";if(s>30)return Math.floor(s/30)+" th\xe1ng";if(s>0)return s+" ng\xe0y";let l=Math.floor(a/3600);if(l>0)return Math.floor(l)+" giá»";let i=a%3600,o=Math.floor(i/60);if(o>0)return Math.floor(o)+" ph\xfat";if("message"===e)return"Vừa xong";let u=Math.floor(i%60);return u<=10?"1 gi\xe2y":Math.floor(u)+" gi\xe2y"}let o=t=>{if(!t)return"";let e=new Date(new Date(new Date(t).getTime()+252e5).toUTCString().replace(/ GMT$/,"")),r=""+e.getDate(),n=""+(e.getMonth()+1),a=""+e.getFullYear(),s=""+e.getHours(),l=""+e.getMinutes();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),s.length<2&&(s="0"+s),l.length<2&&(l="0"+l),s+":"+l+" ng\xe0y "+r+"-"+n+"-"+a},u=t=>{let e=new Date,r=new Date(t),n=Math.floor((r-e)/1e3/60),a=r.getHours().toString().padStart(2,"0"),s=r.getMinutes().toString().padStart(2,"0"),l=`${a}:${s}`,i=new Date(e.getFullYear(),e.getMonth(),e.getDate()),o=Math.floor((new Date(r.getFullYear(),r.getMonth(),r.getDate())-i)/864e5);if(1===o)return`Sắp khá»i chiếu: ${l} Ng\xe0y mai`;if(o>1){let t=String(r.getDate()).padStart(2,"0"),e=String(r.getMonth()+1).padStart(2,"0"),n=r.getFullYear();return`Khá»i chiếu l\xfac: ${l} ng\xe0y ${t}-${e}-${n}`}if(0===o){if(n>30)return`L\xfac ${l} h\xf4m nay`;if(n<=30&&n>=1)return`Sắp khá»i chiếu: C\xf2n ${n} ph\xfat`;if(n<1&&n>=0)return"Sẵn s\xe0ng! Sắp khá»i chiếu"}let u=Math.floor((e-r)/1e3),c=Math.floor(u/60),d=Math.floor(c/60),g=Math.floor(d/24),h=Math.floor(g/30);return u<60?`Bắt Äầu ${u} gi\xe2y trưá»c`:c<60?`Bắt Äầu ${c} ph\xfat trưá»c`:d<24?`Bắt Äầu ${d} giá» trưá»c`:g<30?`Bắt Äầu ${g} ng\xe0y trưá»c`:`Bắt Äầu ${h} th\xe1ng trưá»c`},c=t=>{let e=new Date,r=new Date(t),n=e-r;if(n<0)return"Chưa kết th\xfac";let a=Math.floor(n/6e4),s=Math.floor(n/36e5);if(a<60)return`Kết th\xfac ${a} ph\xfat trưá»c`;if(s<24)return`Kết th\xfac ${s} giá» trưá»c`;let l=r.getHours().toString().padStart(2,"0"),i=r.getMinutes().toString().padStart(2,"0"),o=r.getDate().toString().padStart(2,"0"),u=(r.getMonth()+1).toString().padStart(2,"0"),c=r.getFullYear();return`Kết th\xfac l\xfac: ${l}:${i} ng\xe0y ${o}-${u}-${c}`},d=t=>{if(!t)return"";let e=new Date(new Date(new Date(t).getTime()+252e5).toUTCString().replace(/ GMT$/,"")),r=""+e.getDate(),n=""+(e.getMonth()+1),a=""+e.getFullYear();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),a+"-"+n+"-"+r};function g(t,e){if(!t)return"";let r=new Date(t),a=10>r.getMinutes()?"0"+r.getMinutes():r.getMinutes();return(0,n.jsxs)("span",{children:[r.getHours(),":",a," | ",r.getDate(),"/",r.getMonth()+1,e&&(0,n.jsxs)(s.Fragment,{children:["/",r.getFullYear()]})]})}function h(t){let e=Math.floor(t/60),r=Math.floor(t%60);return`${String(e).padStart(2,"0")}
38:${String(r).padStart(2,"0")}`}function f(t){let e=Math.floor(t/60),r=Math.floor(t%60);return 0===e?`${String(r).padStart(2,"0")} gi\xe2y`:`${String(e).padStart(2,"0")} ph\xfat ${String(r).padStart(2,"0")} gi\xe2y`}function x(t){let e=new Date(t),r=10>e.getHours()?"0"+e.getHours():e.getHours(),a=10>e.getMinutes()?"0"+e.getMinutes():e.getMinutes();return(0,n.jsxs)("span",{children:[r,":",a]})}function m(t){let e=Math.floor(t/3600),r=t%3600,n=Math.floor(r/60),a=r%60;return 0===e?e="":e+=":",n<10&&(n="0"+n),a<10&&(a="0"+a),e+n+":"+a}function p(t){let e=new Date;e.setDate(e.getDate()+t);let r=e.getMonth()+1;return{date:e.getFullYear()+"-"+r+"-"+e.getDate(),day:0===t?`H\xf4m nay (${e.getDate()}/${r})`:`${y(e.getDay())} (${e.getDate()}/${r})`}}function M(t){let e=new Date;e.setDate(e.getDate()+t);let r=e.getMonth()+1;return{date:e.getFullYear()+"-"+r+"-"+e.getDate(),day:0===t?`H\xf4m nay, ${e.getDate()}/${r}`:`${y(e.getDay())}, ${e.getDate()}/${r}`}}function y(t){return 0===t?"Chá»§ nháºt":"Thứ "+(t+1)}function D(t){return new Date(t).getFullYear()}function $(t){let[e,r,n]=t.split("-"),a=`${e}-${r.padStart(2,"0")}-${n.padStart(2,"0")}`;return{timeStart:new Date(a).setHours(0,0,0,0),timeStop:new Date(a).setHours(23,59,59,999)}}let w=t=>{if(!t)return"";let e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),n=Math.floor(t-3600*e-60*r);return e>0?e+"h "+r+"ph "+n+"s":r+"ph "+n+"s"},b=t=>{if(!t||0===t)return"0 lượt xem";if(t<1e3)return`${t} lượt xem`;if(t>=1e3&&t<1e4){let e=(Math.round(100*Math.round(t/100)/1e3*10)/10).toFixed(1);return`${e}N lượt xem`}if(t>=1e4&&t<1e6){let e=Math.round(1e3*Math.round(t/1e3)/1e3);return`${e}N lượt xem`}if(t>=1e6){let e=(Math.round(1e4*Math.round(t/1e4)/1e6*100)/100).toFixed(2);return`${e}Tr lượt xem`}},S=t=>{if(!t||0===t)return 0;if(t<1e3)return t.toString();if(t>=1e3&&t<1e4){let e=(Math.round(100*Math.round(t/100)/1e3*10)/10).toFixed(1);return`${e}N`}if(t>=1e4&&t<1e6){let e=Math.round(1e3*Math.round(t/1e3)/1e3);return`${e}N`}if(t>=1e6){let e=(Math.round(1e4*Math.round(t/1e4)/1e6*100)/100).toFixed(2);return`${e}Tr`}return t.toString()};function N(t,e,r,n){let s=new Date;if("subVTVprime"===r){let t=(0,a.h4)(),e=t?.activeSubscriptions||[];e?.forEach(t=>{t?.tier?.id===n?.id&&t?.status==="ACTIVE"&&(s=t?.nextPaymentDate?new Date(t?.nextPaymentDate):new Date)})}switch(e?.toUpperCase()){case"DAY":s.setDate(s.getDate()+t);break;case"MONTH":s.setMonth(s.getMonth()+t);break;case"YEAR":s.setFullYear(s.getFullYear()+t)}return s.toLocaleDateString("vi-VN",{year:"numeric",month:"2-digit",day:"2-digit"})}function j(t=new Date){let e=t=>String(t).padStart(2,"0"),r=t.getFullYear(),n=e(t.getMonth()+1),a=e(t.getDate()),s=e(t.getHours()),l=e(t.getMinutes()),i=e(t.getSeconds()),o=-t.getTimezoneOffset(),u=e(Math.floor(Math.abs(o)/60)),c=e(Math.abs(o)%60);return`${r}-${n}-${a}T${s}:${l}:${i}${o>=0?"+":"-"}${u}:${c}`}let _=t=>{if(t){let e=new DOMParser().parseFromString(t,"text/html"),r=e.body.textContent||e.body.innerText,n=r.split(".");return n.length>=2?`${n[0]}.${n[1]}`:r}return""},v=t=>{if(t?.length>0){let e=new DOMParser;return t.map(t=>{if(!t?.html)return"";let r=e.parseFromString(t.html,"text/html");return r.body.textContent?.trim()||""}).filter(Boolean).join("\n")}return""}}}]);
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.