PageSourceSearch

https://www.setel.com/PETRONAS-Shop/_next/static/chunks/2004-5cf571321b79b88a.js

js setel.com collected 2026-10-02 03:59:00 UTC 11,688 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2004],{14888:(e,l,n)=>{n.d(l,{Y:()=>t});let t=(e,l)=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,pageType:l})}},22004:(e,l,n)=>{n.r(l),n.d(l,{__N_SSP:()=>ee,default:()=>el});var t=n(28888),a=n(37876),i=n(15039),s=n.n(i),c=n(35244),o=n(62867),u=n(89099),r=n(14232),d=n(65212),m=n(77185),g=n(48230),h=n.n(g),p=n(33176),f=n(66196),x=n(20339),v=n(57322),y=n(43764),k=n(81864),w=n(87928),C=n(15411),j=n(71632),N=n(36203);function _(){let e=(0,t._)(["daily-check-in.coins"]);return _=function(){return e},e}function I(){let e=(0,t._)(["daily-check-in.get-free-coins-daily"]);return I=function(){return e},e}function b(e){var l,n,t;let{dailyCheckInFeatureFlagData:i,className:c,titleClassName:o}=e,{t:u}=(0,d.Bd)(),{isAuthenticated:m}=(0,j.As)(),g=w.Y.get()===C.Qe.MINIAPP,h=(0,y.A)(),{userCoinsInfo:f,setUserCoinsInfo:k,setIsFetchingUserCoinsInfo:b}=(0,r.useContext)(x.BR),{isActiveMesraInfo:D}=(0,r.useContext)(v.C),E=(g||h)&&m,T=(0,r.useMemo)(()=>{if(!m){var e,l,n,t;return u("daily-check-in.check-in-to-earn-nums-coins",{count:null==i||null==(l=i.daily_check_in)||null==(e=l.daily_coins_values)?void 0:e.Day_1,coins:null==i||null==(t=i.daily_check_in)||null==(n=t.daily_coins_values)?void 0:n.Day_1})}return E?u(_()):u(I())},[null==i||null==(n=i.daily_check_in)||null==(l=n.daily_coins_values)?void 0:l.Day_1,m,E,u]);return(0,r.useEffect)(()=>{var e;b(!0);let l=async()=>{let e=await (0,N.TH)();k(null!=e?e:void 0)};m&&(null==i||null==(e=i.daily_check_in)?void 0:e.feature_toggle)&&l(),b(!1)},[null==i||null==(t=i.daily_check_in)?void 0:t.feature_toggle,m]),(0,a.jsxs)("div",{className:s()("rounded-lg bg-warning-100 md:p-5 md:px-6 lg:mb-3",m?"p-[14px]":"p-4",c),children:[(0,a.jsxs)("div",{className:s()("flex md:mb-0 lg:h-[55px] lg:w-full lg:justify-between","md:!items-center",E&&"mb-3 items-center",(h||g)&&!m&&"flex-col gap-2",!D&&"lg:!justify-center"),children:[(g||h)&&(0,a.jsx)("div",{className:s()("h-[35px]",{"!h-10":E}),children:(0,a.jsx)("img",{src:"".concat(p.ZX,"/images/daily-checkin.png"),alt:"daily-checkin",width:60,height:35,className:"mr-[10px] h-full"})}),(0,a.jsxs)("div",{className:s()("leading-[23px] md:mr-6"),children:[(0,a.jsx)("div",{className:s()(m&&(g||h)&&"flex h-[35px] items-center justify-center"),children:(0,a.jsx)("div",{className:s()(E&&"flex items-start"),children:(0,a.jsx)("h4",{className:s()("text-base font-medium leading-[23px] text-grey-dark md:mb-1 md:text-black",o,E&&"flex h-[35px] items-center whitespace-nowrap"),children:T})})}),(0,a.jsx)(S,{userCoinsInfo:f,isAuthenticated:m,className:"hidden text-base leading-[23px] md:inline-block"})]}),!g&&!h&&(0,a.jsx)("img",{src:"".concat(p.ZX,"/images/daily-checkin.png"),alt:"daily-checkin"})]}),(0,a.jsx)(S,{userCoinsInfo:f,isAuthenticated:m,className:s()("inline-block md:hidden")})]})}function S(e){let{isAuthenticated:l,className:n,userCoinsInfo:t}=e,{t:i}=(0,d.Bd)(),c=w.Y.get()===C.Qe.MINIAPP,o=(0,y.A)(),m=(0,u.useRouter)(),g=(0,r.useMemo)(()=>{var e,n;return l?!(null==t?void 0:t.accumulatedCoins)&&l&&(o||c)?i("daily-check-in.coins-balance",{count:0,coins:(0,k.u)(0)}):(null==t?void 0:t.accumulatedCoins)||!l||o||c?(null==t?void 0:t.accumulatedCoins)&&l&&!o&&!c?i("daily-check-in.coins-balance-desktop",{count:null==t?void 0:t.accumulatedCoins,coins:(0,k.u)(null!=(e=null==t?void 0:t.accumulatedCoins)?e:0)}):i("daily-check-in.coins-balance",{count:null==t?void 0:t.accumulatedCoins,coins:(0,k.u)(null!=(n=null==t?void 0:t.accumulatedCoins)?n:0)}):i("daily-check-in.coins-balance-desktop",{count:0,coins:(0,k.u)(0)}):null},[l,null==t?void 0:t.accumulatedCoins,o,c,i]);return(0,a.jsxs)("p",{className:s()("text-sm text-grey-dark lg:text-gray-trout",n),children:[g,l?(0,a.jsx)(d.x6,{i18nKey:"daily-check-in.check-in-today-link",components:{link1:(0,a.jsx)(h(),{target:"_self",href:(0,f.xfB)(m),className:s()("text-petronas-500",!l&&"font-medium lg:font-normal",n,o||c?"!block":"inline-block")})}}):(0,a.jsx)(d.x6,{i18nKey:"daily-check-in.log-in-to-collect",components:{link1:(0,a.jsx)(h(),{target:"_self",href:(0,f.xfB)(m),className:s()("text-petronas-500",!l&&"font-medium lg:font-normal",n,o||c?"!block":"inl
1ine-block")})}})]})}var D=n(15834),E=n(7400),T=n(11856),B=n(42703),A=n(77232),P=n(14888);let M={get:()=>sessionStorage.getItem(C.Kx),set(){sessionStorage.setItem(C.Kx,C.WF.REDIRECT)}};var R=n(49084),L=n(17e3),O=n(10272),X=n(21480),F=n(21282);function H(e){let{containerClassName:l}=e,n=(0,r.useMemo)(()=>({slides:{perView:m.f$q,spacing:16},breakpoints:{[m.CGB]:{slides:{perView:m.nXT,spacing:16}}}}),[]);return(0,a.jsx)("section",{className:s()("w-full relative flex items-center",l),children:(0,a.jsx)(m.RCg,{showNavigation:!0,isShowPreviousButton:!1,useEmptySlides:!0,options:n,children:(0,F.k)(m.nXT).map(e=>(0,a.jsx)(m.qrq,{className:"w-full",children:(0,a.jsx)(U,{})},"CategoryCardLoadingSkeleton_".concat(e)))})})}function U(){return(0,a.jsxs)("div",{role:"presentation",className:"overflow-hidden lg:w-32",children:[(0,a.jsx)("div",{className:"w-full pt-[100%] lg:w-full animate-pulse bg-gray-400 rounded-lg"}),(0,a.jsx)("div",{className:"h-4 mt-2 animate-pulse bg-gray-400 rounded-[4px] lg:h-5 lg:w-32"})]})}var Q=n(18847),Y=n.n(Q);let q=Y()(()=>n.e(3075).then(n.bind(n,73075)).then(e=>e.CatalogueCards),{loadableGenerated:{webpack:()=>[73075]},ssr:!1}),V=Y()(()=>n.e(3686).then(n.bind(n,43686)).then(e=>e.DailyFlashSale),{loadableGenerated:{webpack:()=>[43686]},ssr:!1});var G=n(54482),Z=n(1243),K=n(84239),$=n(56111);function J(){let e=(0,t._)(["common.page-title"]);return J=function(){return e},e}function z(){let e=(0,t._)(["common.page-description"]);return z=function(){return e},e}function W(e,l){var n,t,a;let i=(null==(n=l.itemCollection)?void 0:n.length)||0,s=new Map;null==(t=e.itemCollection)||t.forEach(e=>s.set(e._id,e));let c=i>=8?null==(a=l.itemCollection)?void 0:a.filter(e=>!s.get(e._id)):l.itemCollection;return{...l,itemCollection:c}}var ee=!0;function el(e){var l,n,t;let{customerCode:i,merchant:g}=e,h=(0,u.useRouter)(),{t:y}=(0,d.Bd)(),{isActiveMesraInfo:k,isFetchingMesraInfo:N}=(0,r.useContext)(v.C),[_,I]=(0,r.useState)([]),[S,F]=(0,r.useState)(!1),[U,Q]=(0,r.useState)([]),[Y,ee]=(0,r.useState)(!1),[el,en]=(0,r.useState)([]),[et,ea]=(0,r.useState)(!1),[ei,es]=(0,r.useState)([]),[ec,eo]=(0,r.useState)(!1),{isAuthenticated:eu,user:er}=(0,j.As)(),{closeLoginPopup:ed,openLoginPopup:em,dailyCheckInFeatureData:eg,bundleDiscount:eh,isFetchingDailyCheckIn:ep,isFetchingUserCoinsInfo:ef,isFetchingBundleDiscount:ex}=(0,r.useContext)(x.BR),{authLoading:ev}=(0,j.As)();(0,r.useEffect)(()=>{eh.fetched&&(null==g?void 0:g.tenantId)&&!ev&&async function(){try{var e,l,n;ee(!0),Promise.all([(0,L.c)({merchantId:null==g?void 0:g.tenantId,customerCode:i,perPage:(null==(e=B.DD.get())?void 0:e.accessToken)?6:5,limitItemCollection:8},null==(l=B.DD.get())?void 0:l.accessToken),(0,L.c)({merchantId:null==g?void 0:g.tenantId,customerCode:i,display:Z.pX.ITEM,typeValueCatalogues:Z.gl.BRAND_HIGHLIGHT,page:1,perPage:1},null==(n=B.DD.get())?void 0:n.accessToken)]).then(e=>{let[l,n]=e;if(n.length){var t;let e=l[0],a=l[1],i=W(e,n[0]),s=eh.enable&&a.type&&[Z.gl.BUNDLE_DISCOUNT].includes(a.type)?2:1;i.itemCollection=null==(t=i.itemCollection)?void 0:t.slice(0,8);let c=l.slice(s).map(e=>W(i,e)),o=[e,i,...c];eh.enable&&a.type&&[Z.gl.BUNDLE_DISCOUNT].includes(a.type)&&o.splice(1,0,a),Q(o)}else Q(l);ee(!1)})}catch(e){ee(!1)}}()},[ev,eh,i,null==g?void 0:g.tenantId]),(0,r.useEffect)(()=>{if(!ev){async function e(){try{var e;ea(!0);let l=await (0,L.fZ)({merchantId:null==g?void 0:g.tenantId,customerCode:i,display:Z.pX.BANNER,page:1,perPage:1},null==(e=B.DD.get())?void 0:e.accessToken);en(l),ea(!1)}catch(e){ea(!1)}}async function l(){try{var e;F(!0);let l=await (0,L.c)({merchantId:null==g?void 0:g.tenantId,customerCode:i,typeValueCatalogues:Z.gl.COLLECTION,page:1,perPage:6},null==(e=B.DD.get())?void 0:e.accessToken);I(l),F(!1)}catch(e){F(!1)}}async function n(){try{var e;eo(!0);let l=await (0,L.c)({merchantId:null==g?void 0:g.tenantId,customerCode:i,typeValueCatalogues:Z.gl.BRAND,page:1,perPage:500},null==(e=B.DD.get())?void 0:e.accessToken);es(l),eo(!1)}catch(e){eo(!1)}}let t=setTimeout(()=>{Promise.all([n(),l(),e()])},200);return()=>{clearTimeout(t)}}},[i,null==g?void 0:g.tenantId,ev]),(0,r.useEffect)(()=>(function(e,l){if((null==e?void 0:e.theme)===K.S.Ecommerce){let e=l.reduce((e,l)=>(l.itemCollection&&l.itemCollection.length>0&&e.push(...l.itemCollection),e),[]);if(e&&e.length>0){let l=window.dataLayer;l&&(l.push({ecommerce:null}),l.push({ecommerce:{impressions:e}}))}}})(g,U),[U,g]),(0,r.useEffect)(()=>
1{if(h.query.utm_medium===C.Qe.MINIAPP&&!M.get()){var e,l;let n=B.AE.get();n||(n=B.AE.set()),T.Y.setClientId(n);let t={response_type:G.AO.Code,client_id:null!=(l=null==g||null==(e=g.setelSso)?void 0:e.clientId)?l:"",redirect_uri:"".concat(function(e){let l=e.query.merchantcode,n=window.location.origin;return p.m$.includes(window.location.origin)&&(n+="".concat(p.ZX)),(null==e?void 0:e.locale)&&(n+="/".concat(e.locale)),l&&(n+="/".concat(l)),n}(h)).concat(f.Lkd),scope:G.Rr.UserInfoRead,state:T.Y.getClientId(),lang:c.Ay.language};w.Y.get()===C.Qe.MINIAPP&&Object.assign(t,{mode:"miniapp"}),M.set()}},[g,h]),(0,r.useEffect)(()=>{var e;let l=R.h.get();"string"==typeof l&&(null==(e=JSON.parse(l))?void 0:e.isReview)&&(eu&&er.accessToken?(ed(),R.h.remove()):em())},[eu,ed,em,er.accessToken]),(0,r.useEffect)(()=>{(0,P.Y)(E.$q.insider.page.home,A.O$.HOME)},[]);let ey=(0,r.useMemo)(()=>{var e;return(null==eg||null==(e=eg.daily_check_in)?void 0:e.feature_toggle)||!1},[null==eg||null==(l=eg.daily_check_in)?void 0:l.feature_toggle]);return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)(o.bV,{title:(null==g||null==(n=g.seo)?void 0:n.title)||y(J())||"",description:(null==g||null==(t=g.seo)?void 0:t.descriptions)||y(z())||""}),(0,a.jsx)("main",{className:"flex w-full flex-wrap justify-center",children:(0,a.jsx)("div",{className:"flex w-full flex-wrap justify-center lg:px-3",children:(null==g?void 0:g.theme)===K.S.Ecommerce&&(0,a.jsxs)(a.Fragment,{children:[S?(0,a.jsx)(m.Mxu,{className:"pl-5 pt-5 lg:pl-0 lg:pt-10",children:(0,a.jsx)(H,{containerClassName:"w-full overflow-hidden lg:overflow-visible"})}):(0,a.jsx)(m.Mxu,{className:"pt-5 lg:pl-0 lg:pt-10",children:_&&(0,a.jsx)(q,{catalogues:_,className:"!mb-0"})}),(0,a.jsx)(m.Mxu,{className:"my-6 flex gap-4 px-5 lg:my-[30px] lg:gap-5 lg:px-0",children:ep||ef||N?(0,a.jsx)($.SkeletonForMesraAndDailyCheckInBanner,{}):(0,a.jsxs)("div",{className:s()("grid w-full grid-cols-2 gap-5",{"!grid-cols-1":!ey}),children:[k&&(0,a.jsx)(D.Z,{isHomePage:!0,isEnabledDailyCheckInFeature:ey}),ey&&(0,a.jsx)(b,{dailyCheckInFeatureFlagData:eg,className:"w-full",titleClassName:"!text-sm md:!text-xl md:font-semibold"})]})}),(0,a.jsxs)(m.Mxu,{className:"mb-0",children:[(0,a.jsx)(V,{}),Y||ex?(0,a.jsx)(X.T,{catalogueQuantity:4,containerClassName:"w-full px-5 mb-16 lg:px-0 overflow-hidden"}):(0,a.jsx)(L.zs,{catalogues:U,centerNavOnImage:!0}),ec?(0,a.jsx)(X.T,{catalogueQuantity:1,containerClassName:"w-full px-5 mb-16 lg:px-0 overflow-hidden"}):(0,a.jsx)(a.Fragment,{children:ei.length>0&&(0,a.jsx)(O.CatalogueShopByBrand,{cataloguesShopByBrand:ei})}),et?(0,a.jsx)(X.T,{catalogueQuantity:1,containerClassName:"w-full px-5 mb-16 lg:px-0 overflow-hidden"}):(0,a.jsx)(a.Fragment,{children:el.length>0&&el.map(e=>(0,a.jsx)(O.CatalogueHighlightsBanner,{cataloguesHighlightsBanner:e},e._id))})]})]})})})]})}},49084:(e,l,n)=>{n.d(l,{h:()=>a});var t=n(15411);let a={get:()=>localStorage.getItem(t.UX),set(e){localStorage.setItem(t.UX,JSON.stringify(e))},remove(){localStorage.removeItem(t.UX)}}}}]);

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.