(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6629],{"oUK+":function(e,t,o){"use strict";o.d(t,{Z:function(){return PollCard_PollCard}});var a=o("BGKE"),n=o("q1tI"),r=o("yQSt"),l=o("ovJ4"),i=o("W3Sf"),s=o("8vDj"),d=o("LES+"),c=o("TIp3"),p=o("dDsW"),u=o("raAP"),m=o("5nj8"),h=o("AeFk"),g=o("iuhU"),f=o("/Ds5"),x=o("VHY4"),v=o.n(x);let RenderWatermark=e=>{let{opacity:t,color:o,svgContent:n,...r}=e;return(0,a.tZ)("div",{style:{opacity:t,color:o},dangerouslySetInnerHTML:{__html:n},...r})},FlipOption=e=>{let{color:t,option:o,isSelected:n,showResults:r,hasWatermarkLogo:l,watermarkContent:i,onClick:d,className:c="",...p}=e,u=(0,s.rZ)(),m=u.colors[t]||u.colors.blue,x=m[6],b=m[6],Z=m[0],C=m[1],w="radial-gradient(55.8% 157.95% at 6.7% -24.87%, ".concat(m[3]," 0%, ").concat(x," 100%)"),k="absolute inset-0 border-2 rounded-2xl flex flex-col items-center justify-center transition-all duration-500 overflow-hidden backdrop-blur-[12px] [backface-visibility:hidden] ".concat("shadow-[0px_0px_1px_0px_#0000000A,0px_0px_2px_0px_#0000000F,0px_4px_8px_0px_#0000000A]").replace(/\s+/g," "),y={svgContent:i,"data-with-watermask":l,className:"".concat(v().watermarkContainer," absolute inset-0 pointer-events-none")};return(0,a.tZ)("div",{...p,className:"".concat(c," ").concat(v().flipCard," rounded-2xl h-[196px] md:h-[204px] [perspective:1000px] ").concat(r?"":"cursor-pointer"),onClick:d,children:(0,a.BX)(f.E.div,{initial:!1,animate:{rotateY:r?180:0},transition:{duration:.6,type:"spring",stiffness:200,damping:20},className:"w-full h-full relative [transform-style:preserve-3d]",children:[(0,a.BX)("div",{className:(0,g.default)("card-inner border-[--border-color] border border-solid ".concat(k),"bg-[var(--bg-color)]","".concat(r?"":"can-hover:hover:border-[--border-hover-color]")),style:{"--hover-color":t,"--border-color":"transparent","--border-hover-color":m[6],"--hover-bg":m[0],"--bg-color":r?Z:n?"transparent":"#ffffff",backgroundImage:n&&!r?w:"none"},children:[(0,h.az)(RenderWatermark,{...y,key:i+n?"selected":"normal",opacity:n&&!r?.1:.6,color:n&&!r?"#ffffff":m[0]}),(0,a.tZ)("span",{className:"relative font-medium text-[17px] leading-[24px] tracking-[-0.4px] text-center transition-colors duration-400",style:{color:n&&!r?"#ffffff":"#1f2937"},children:o.text})]}),(0,a.BX)("div",{className:"".concat(k," [transform:rotateY(180deg)]"),style:{color:n?"#ffffff":b,backgroundColor:n?"transparent":Z,backgroundImage:n?w:"none",borderColor:n?"transparent":C},children:[(0,h.az)(RenderWatermark,{...y,key:i+"result",opacity:n?.1:.5,color:n?"#fff":m[1]}),(0,a.BX)("div",{className:"flex flex-col gap-[16px] relative p-[10px]",children:[(0,a.BX)("span",{className:"font-bold text-[28px] leading-[34px] tracking-[-1px] text-center",children:[o.percentage,"%"]}),(0,a.tZ)("span",{className:"font-medium text-[13px] leading-[20px] tracking-[-0.3px] text-center",children:o.text})]})]})]})})};var b=o("09QT"),Z=o("unRb"),C=o("oQBk"),w=o("csLd");let k="voted_polls_data",getVotedPolls=()=>{let e=localStorage.getItem(k);if(!e)return{};try{let t=JSON.parse(e),o=Date.now(),a={};return Object.keys(t).forEach(e=>{let n=t[e],r="object"==typeof n&&"timestamp"in n?n.timestamp:n;o-r<864e5&&("object"==typeof n?"optionIds"in n&&Array.isArray(n.optionIds)?a[Number(e)]={timestamp:r,optionIds:n.optionIds.map(e=>String(e))}:"optionId"in n&&(a[Number(e)]={timestamp:r,optionIds:n.optionId?[String(n.optionId)]:[]}):a[Number(e)]={timestamp:r,optionIds:[]})}),a}catch(e){return{}}},saveVotedPoll=(e,t)=>{let o=getVotedPolls();o[e]={timestamp:Date.now(),optionIds:t.map(String)},localStorage.setItem(k,JSON.stringify(o))},y=(0,n.createContext)(null),PollProvider=e=>{var t,o,r,l,i,s,d,c;let{pollId:p,articleId:u,color:m="blue",children:h}=e,{state:g}=(0,w.b)(),{userInfo:f,isLoggedIn:x}=g||{},[v,k]=(0,n.useState)(null),[_,B]=(0,n.useState)(null),[N,S]=(0,n.useState)([]),[I,T]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[E,X]=(0,n.useState)(!1),[L,R]=(0,n.useState)(!1),[P,W]=(0,n.useState)(null),M=(0,n.useCallback)(async()=>{let e={id:String(p)};x&&(null==f?void 0:f.id)&&(e.userId=f.id);try{let o=await (0,b.d)(C.y.POLL_WIDGET.GET_RESULT,{params:e}),a=null==o?void 0:o.data;if(!a)return;if(k((0,Z.D)(a)),x){var t;if((null===(t=a.user_voted_options)||void 0===t?void 0:t.length)>0){T(!0),X(!0);let e=a.user_voted_options.map(e=>String(e));B(e[0]||null),S(e)}}else{let e=getVotedPolls()[p];if(e){let t=Array.isArray(e.optionIds)?e.optionIds.map(e=>String(e)):[];t.length>0&&(T(!0),X(!0),B(t[0]||null),S(t))}}}catch(e){console.error("Failed to fetch poll data",e)}},[p,x,null==f?void 0:f.id]);(0,n.useEffect)(()=>{k(null),T(!1),B(null),S([]),X(!1),W(null),M()},[M]);let z={question:(null==v?void 0:v.question)||"",description:(null==v?void 0:v.description)||"",options:(null==v?void 0:v.options)||[],displayType:(null==v?void 0:null===(t=v.ui)||void 0===t?void 0:t.displayType)||"flip-card",hideTotalCount:null!==(c=null==v?void 0:null===(o=v.ui)||void 0===o?void 0:o.hideTotalCount)&&void 0!==c&&c,watermarkLogo:(null==v?void 0:null===(r=v.ui)||void 0===r?void 0:r.watermarkLogo)||"",totalVotes:(null==v?void 0:null===(l=v.results)||void 0===l?void 0:l.total_votes)||0,selectedOption:_,selectedOptions:N,isMulti:(null==v?void 0:null===(i=v.ui)||void 0===i?void 0:i.isMulti)||!1,isVoted:I,isSubmitting:A,isShowingResults:E,isShaking:L,error:P,color:(null==v?void 0:null===(s=v.ui)||void 0===s?void 0:s.theme)||m,ctaBtn:null==v?void 0:null===(d=v.ui)||void 0===d?void 0:d.ctaBtn,toggleResults:()=>X(!E),setOption:e=>{if(!I){var t;(null==v?void 0:null===(t=v.ui)||void 0===t?void 0:t.isMulti)?S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]):B(e),W(null)}},submitVote:async()=>{var e,t,o,a;let n=(null==v?void 0:null===(e=v.ui)||void 0===e?void 0:e.isMulti)||!1,r=n?N:_?[_]:[];if(!r.length){R(!0),setTimeout(()=>R(!1),3e3);return}D(!0),W(null);try{await (0,b.d)(C.y.POLL_WIDGET.POST_VOTE,{method:"POST",data:{poll_id:p,user_id:x?String((null==f?void 0:f.id)||""):"",option_ids:r,article_id:u}}),T(!0),X(!0),x||saveVotedPoll(p,r),await M()}catch(n){let e=(null==n?void 0:null===(o=n.response)||void 0===o?void 0:null===(t=o.data)||void 0===t?void 0:t.message)||"C\xf3 lỗi xảy ra, vui l\xf2ng thử lại.";W(e),(null==n?void 0:null===(a=n.response)||void 0===a?void 0:a.status)===400&&(T(!0),X(!0))}finally{D(!1)}}};return(0,a.tZ)(y.Provider,{value:z,children:h})},usePoll=()=>{let e=(0,n.useContext)(y);if(!e)throw Error("usePoll must be used within a PollProvider");return e};var _=o("ECoa");o("fpRu");let PollSkeleton=()=>(0,a.BX)("div",{className:"w-full max-w-[640px] bg-white rounded-xl p-[8px] border shadow-sm",children:[(0,a.tZ)(_.y,{baseColor:"#f3f4f6",highlightColor:"#e5e7eb",children:(0,a.BX)("div",{className:"rounded-xl p-[24px] flex flex-col gap-[24px] bg-gray-50",children:[(0,a.BX)("div",{className:"flex flex-col gap-[4px]",children:[(0,a.tZ)(_.Z,{height:28,width:"80%",className:"mb-2"}),(0,a.tZ)(_.Z,{height:20,width:"60%"})]}),(0,a.BX)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.tZ)(_.Z,{height:48}),(0,a.tZ)(_.Z,{height:48})]})]})}),(0,a.BX)("div",{className:"flex items-center justify-between p-[4px] mt-[12px]",children:[(0,a.tZ)(_.Z,{width:60,height:20}),(0,a.BX)("div",{className:"flex gap-3",children:[(0,a.tZ)(_.Z,{width:80,height:40}),(0,a.tZ)(_.Z,{width:80,height:40})]})]})]});var B=o("Eso5");let ProgressOption=e=>{let{color:t,option:o,isSelected:n,showResults:r,onClick:l,className:i="",...d}=e,c=(0,s.rZ)(),p=c.colors[t]||c.colors.blue,u=p[1],m=p[6],h=p[7];return(0,a.BX)("div",{...d,onClick:l,className:"".concat(i," rounded-2xl ").concat(n?"bg-white border-[--border-selected-color]":"hover:bg-[var(--hover-bg)] hover:border-[--border-hover-color]"," relative border-[--border-color] border border-solid p-[12px] w-full rounded-2xl overflow-hidden cursor-pointer flex items-center transition-colors duration-200 shadow-[0px_0px_1px_0px_#0000000A,0px_0px_2px_0px_#0000000F,0px_4px_8px_0px_#0000000A] backdrop-blur-[12px]"),style:{"--hover-bg":p[0],"--border-color":p[0],"--border-hover-color":p[6],"--border-selected-color":p[2]},children:[(0,a.tZ)(f.E.div,{initial:{width:0},animate:{width:r?"".concat(o.percentage,"%"):0},transition:{duration:1,ease:"easeOut"},style:{backgroundColor:u,position:"absolute",top:0,bottom:0,left:0}}),(0,a.BX)("div",{className:"relative z-10 flex w-full justify-between items-center gap-5",children:[(0,a.BX)("div",{className:"flex items-center gap-3",children:[!r&&(0,a.tZ)("div",{children:(0,a.tZ)(B.x,{sx:{width:16,height:16,borderRadius:"100%",border:"1px solid ".concat(n?m:c.colors.neutral[4]),backgroundColor:"#fff",...n&&{display:"flex",justifyContent:"center",alignItems:"center","&:before":{content:'""',display:"block",width:8,height:8,borderRadius:"100%",backgroundColor:m}}}})}),(0,a.tZ)("span",{className:"text-[15px] leading-[24px] tracking-[-0.3px] text-[#000] ".concat(n?"font-medium":""),children:o.text})]}),r&&(0,a.BX)("span",{className:"".concat(n?"font-bold text-[17px]":"font-medium text-[15px]"," leading-[24px] tracking-[-0.3px]"),style:{color:n?h:"#000"},children:[o.percentage,"%"]})]})]})},useInlineSvg=e=>{let[t,o]=(0,n.useState)("");return(0,n.useEffect)(()=>{if(!e)return;let t=!0,a=new AbortController,n=e.includes("?")?"".concat(e,"&t=").concat(Date.now()):"".concat(e,"?t=").concat(Date.now());return fetch(n,{signal:a.signal}).then(t=>{let o=t.headers.get("content-type");return o&&!o.includes("svg")&&console.warn("URL ".concat(e," kh\xf4ng trả về file SVG. Content-Type: ").concat(o)),t.text()}).then(a=>{if(!t)return;let n=new DOMParser,r=n.parseFromString(a,"image/svg+xml"),l=r.querySelector("svg");if(l){let e=l.querySelectorAll("script");e.forEach(e=>e.remove()),l.setAttribute("class","w-full h-full");let t=l.querySelectorAll("path, circle, rect, polygon, ellipse, g");t.forEach(e=>{e.setAttribute("fill","currentColor")}),o(l.outerHTML)}else console.error("Kh\xf4ng t\xecm thấy thẻ trong nội dung fetch được từ:",e)}).catch(e=>{"AbortError"!==e.name&&console.error("Lỗi khi fetch SVG:",e)}),()=>{t=!1,a.abort()}},[e]),t},PollCardUI=()=>{let{formatMessage:e}=(0,p.Z)(),t=(0,s.rZ)(),{question:o,description:h,options:g,isMulti:f,displayType:x,hideTotalCount:b,totalVotes:Z,selectedOption:C,selectedOptions:w,setOption:k,submitVote:y,isVoted:_,isSubmitting:B,isShowingResults:N,ctaBtn:S,isShaking:I,color:T,watermarkLogo:A}=usePoll(),D=!!A,E=useInlineSvg(A),X=D?E:'',L=(0,u.U)(),[R,P]=(0,n.useState)(!1),W=_||N;(0,n.useEffect)(()=>{P(I)},[I]);let handleOptionClick=e=>{k(e),P(!1)};if(!g||0===g.length)return(0,a.tZ)(PollSkeleton,{});let M={size:"md",color:T,styles:{label:{fontSize:"15px"}}},z=t.colors[T][0],O=(0,m.oo)(z,!0);return(0,a.tZ)(r.T,{variant:r.C.LEADGEN,children:(0,a.BX)("div",{className:"relative w-full bg-white rounded-xl p-[8px] border poll-fade-in shadow-[0px_0px_1px_0px_#0000000A,0px_2px_8px_0px_#0000000A,0px_10px_16px_0px_#0000000A]",children:[(0,a.BX)("div",{className:"relative rounded-xl p-3 md:p-6",style:{background:"linear-gradient(180deg, rgba(".concat(O.r,",").concat(O.g,",").concat(O.b,", 0.75) 0%, rgba(").concat(O.r,",").concat(O.g,",").concat(O.b,", 0.35) 50%, ").concat(t.colors.neutral[0]," 100%)")},children:[(0,a.tZ)(RenderWatermark,{opacity:.5,color:"#fff",svgContent:X,className:"".concat(v().pollCard," absolute top-6 right-6")}),(0,a.BX)("div",{className:"relative flex flex-col gap-3 md:gap-6",children:[(0,a.BX)("div",{className:"flex flex-col gap-[4px]",children:[(0,a.tZ)("h2",{className:"text-[20px] font-medium text-gray-800 leading-[24px] md:leading-[28px]",children:o}),h&&(0,a.tZ)("p",{className:"text-[13px] text-[#404040] leading-[16px] md:leading-[20px]",children:h})]}),"flip-card"===x?(0,a.tZ)("div",{className:"flex flex-wrap gap-2 justify-center",children:g.map(e=>(0,a.tZ)("div",{className:"\n flex-shrink-0 min-w-[140px] \n ".concat(g.length<=2?"w-full":"w-[calc(50%-4px)]","\n ").concat(g.length<=4?"md:flex-grow md:basis-0":"md:w-[calc(25%-6px)] md:max-w-[calc(25%-6px)]","\n "),children:(0,a.tZ)(FlipOption,{hasWatermarkLogo:D,watermarkContent:X,color:T,option:e,isSelected:f?w.includes(e.id):C===e.id,showResults:W,onClick:()=>handleOptionClick(e.id)})},e.id))}):(0,a.tZ)("div",{className:"space-y-2",children:g.map(e=>(0,a.tZ)(ProgressOption,{color:T,option:e,isSelected:f?w.includes(e.id):C===e.id,showResults:W,onClick:()=>handleOptionClick(e.id)},e.id))})]})]}),(0,a.BX)("div",{className:"flex items-center justify-between p-[4px] mt-2",children:[(0,a.tZ)("span",{className:"text-[13px] leading-[20px] tracking-[-0.3px] text-[#8C8C8C] pl-3 md:pl-6",children:!b&&(0,a.tZ)(a.HY,{children:e({id:"pollWidget.voteNumber"},{number:Z})})}),(0,a.tZ)("div",{className:"flex items-center gap-3",children:_?(null==S?void 0:S.label)&&(null==S?void 0:S.link)?(0,a.tZ)(l.B,{component:"a",href:null==S?void 0:S.link,target:"_blank",...M,variant:"primary",rightIcon:(0,a.tZ)(i.Z,{className:"arrow-jump",size:20,color:"#fff"}),"data-event-category":"Article Poll","data-event-action":"CTA Click","data-event-label":S.link,children:S.label}):null:(0,a.BX)(d.J,{opened:R,onClose:()=>P(!1),position:"top",withArrow:!0,shadow:"md",children:[(0,a.tZ)(d.J.Target,{children:(0,a.tZ)(l.B,{...M,"data-event-category":"Article Poll","data-event-action":"Vote Click","data-event-label":L,variant:"primary",className:I?"shake-trigger":"",onClick:y,rightIcon:!B&&(0,a.tZ)(i.Z,{className:"arrow-jump",size:20,color:"#fff"}),children:e({id:B?"pollWidget.voting":"pollWidget.vote"})})}),(0,a.tZ)(d.J.Dropdown,{children:(0,a.tZ)(c.x,{size:"sm",children:e({id:"pollWidget.errMess.requireSelectAnswer"})})})]})})]})]})})};var PollCard_PollCard=e=>(0,a.tZ)(PollProvider,{...e,children:(0,a.tZ)(PollCardUI,{})})},QiCV:function(e,t,o){"use strict";o.d(t,{Vy:function(){return getRamadanStatus}}),o("Wgwc"),o("q0An"),o("H+I9");var a=o("llb7");function getRamadanStatus(e){let{toDate:t,imsakDate:o,maghribDate:n,nextImsakDate:r}=e;return o||n||!r?t.isBefore(o)?a.I.COUNT_DOWN_TO_PRAY_TIME:t.isBefore(n)?a.I.COUNT_DOWN_TO_BREAKING_TIME:t.isBefore(r)?a.I.COUNT_DOWN_TO_PRAY_TIME:a.I.IDLE:a.I.IDLE}},fx93:function(e,t,o){"use strict";o.d(t,{Z:function(){return V}});var a=o("BGKE"),n=o("q1tI"),r=o("a5vB"),l=o("I07S"),i=o("2IpA"),s=o("/npG"),d=(0,s.k)((e,t)=>{let{colorShade:o,withSmallPattern:a}=t,{mainColor:n,secondColor:r,thirdColor:l,bgFillColor:s}=o||{};return{root:{position:"relative",color:e.colors.indigo[0],background:"radial-gradient(77.54% 111.71% at 50.1% -1.4%, ".concat(n," 0%,").concat(r," 67%, ").concat(l," 100%)"),[e.fn.largerThan("sm")]:{background:"radial-gradient(77.54% 111.71% at 50.1% -1.4%, ".concat(n," 0%,").concat(r," 67%, ").concat(l," 100%)")},"&:before":{content:'""',position:"absolute",inset:0,maskImage:"url(".concat(i.C.getAssetPath("ramadan/pattern.svg"),")"),WebkitMaskImage:"url(".concat(i.C.getAssetPath("ramadan/pattern.svg"),")"),maskRepeat:"repeat",WebkitMaskRepeat:"repeat",maskPosition:"20px 50%",WebkitMaskPosition:"20px 50%",backgroundColor:s,mixBlendMode:"soft-light",opacity:"0.34",borderRadius:"inherit",...a&&{maskSize:"50px",WebkitMaskSize:"50px"},[e.fn.smallerThan("sm")]:{maskSize:"50px",WebkitMaskSize:"50px"}}},inner:{position:"relative",borderRadius:"inherit"}}}),c=o("pdCJ");let p=(0,n.createContext)(null),BoxWrapper=e=>{let{children:t,className:o,withSmallPattern:i,...s}=e,c=(0,n.useContext)(p),{colorShade:u}=(0,l.Y)(c,e=>({colorShade:e.colorShade}),r.X),{classes:m,cx:h}=d({colorShade:u,withSmallPattern:i},{name:"RamadanWidget__BoxWrapper"});return(0,a.tZ)("div",{...s,className:h(m.root,o),children:(0,a.tZ)("div",{className:h(m.inner),children:t})})};var u=o("q9DY"),m=o("kfjY"),h=o("Eso5"),g=o("iuhU"),f=o("raAP"),x=o("hXNO"),v=o("dDsW"),b=o("yv45"),Z=o("H+I9"),C=o("//Af"),w=o.n(C);let GoldText=e=>{let{children:t,className:o,sx:i,gradient:s="linear-gradient(90deg,#D5A561 0%,#E8BD84 14%,#F8D2A4 29%,#FFDBB0 37%,#D5A561 52%,#FFDBB0 67%,#D5A561 100%)",...d}=e,c=(0,n.useContext)(p),{colorShade:u}=(0,l.Y)(c,e=>({colorShade:e.colorShade}),r.X);return(0,a.tZ)(h.x,{...d,className:(0,g.default)(w().className,o),sx:{display:"inline-block",backgroundImage:s,WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent",filter:"\n drop-shadow(1px 0 0 ".concat(u.mainColor,") \n drop-shadow(-1px 0 0 ").concat(u.mainColor,") \n drop-shadow(0 1px 0 ").concat(u.mainColor,") \n drop-shadow(0 -1px 0 ").concat(u.mainColor,")\n "),...i},children:t})};var k=o("llb7");let CountDownTitle=e=>{let{className:t}=e,{formatMessage:o}=(0,v.Z)(),i=(0,n.useContext)(p),{status:s}=(0,l.Y)(i,e=>({status:e.status}),r.X);return(0,a.tZ)(GoldText,{className:(0,g.default)(t,"uppercase","font-bold","text-[16.67px]","leading-[120%]","tracking-[-0.22px]"),children:o({id:s===k.I.COUNT_DOWN_TO_BREAKING_TIME?"ramadanWidget.countdownToIftar":"ramadanWidget.countdownToNextImsak"})})},StatusBarBackground=e=>{let{width:t=293,...o}=e,i=(0,n.useContext)(p),{colorShade:s}=(0,l.Y)(i,e=>({colorShade:e.colorShade}),r.X),{mainColor:d,secondColor:c,thirdColor:u}=s;return(0,a.BX)("svg",{width:t,viewBox:"0 0 293 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,a.BX)("g",{"clip-path":"url(#clip0_4055_102851)",children:[(0,a.tZ)("path",{d:"M29.64 47.99C25.46 47.79 18.34 46.6 13.74 41.14C11.13 38.04 9.9 35.58 8.82 33.42C7.47 30.72 6.49 28.77 3.04 26.23L0 24L3.04 21.77C6.49 19.23 7.47 17.28 8.82 14.58C9.91 12.41 11.14 9.95 13.74 6.85C18.34 1.39 25.46 0.2 29.64 0H262.63C266.81 0.2 273.93 1.39 278.53 6.85C281.14 9.95 282.37 12.41 283.45 14.58C284.8 17.28 285.78 19.23 289.23 21.77L292.27 24L289.23 26.23C285.78 28.77 284.8 30.72 283.45 33.42C282.36 35.59 281.13 38.05 278.53 41.15C273.93 46.61 266.81 47.8 262.63 48H29.64V47.99Z",fill:"url(#paint0_linear_4055_102851)"}),(0,a.tZ)("path",{d:"M30.2101 46.9098C25.9401 46.7898 19.0201 45.6898 14.5801 40.4298C12.0601 37.4298 10.8601 35.0398 9.80012 32.9198C8.43012 30.1898 7.35012 28.0298 3.69012 25.3398L1.87012 23.9998L3.69012 22.6598C7.35012 19.9698 8.44012 17.8098 9.80012 15.0798C10.8601 12.9598 12.0601 10.5698 14.5801 7.56984C19.0201 2.29984 25.9501 1.20984 30.2101 1.08984H262.06C266.32 1.20984 273.25 2.30984 277.68 7.56984C280.2 10.5698 281.4 12.9598 282.46 15.0798C283.83 17.8098 284.91 19.9698 288.57 22.6598L290.39 23.9998L288.57 25.3398C284.91 28.0298 283.82 30.1898 282.46 32.9198C281.4 35.0398 280.2 37.4298 277.68 40.4298C273.25 45.6898 266.32 46.7798 262.06 46.9098H30.2101Z",fill:"url(#paint1_linear_4055_102851)"}),(0,a.tZ)("path",{d:"M30.6503 46.0902C26.5803 46.0302 19.5903 45.0902 15.2203 39.9002C12.7603 36.9802 11.5903 34.6302 10.5503 32.5602C9.13027 29.7302 8.01027 27.4902 4.19027 24.6802L3.28027 24.0102L4.19027 23.3402C8.02027 20.5302 9.14027 18.2902 10.5503 15.4602C11.5903 13.3902 12.7603 11.0402 15.2203 8.12016C19.6003 2.91016 26.5903 1.97016 30.6503 1.91016H261.62C265.69 1.97016 272.68 2.91016 277.05 8.10016C279.51 11.0202 280.68 13.3702 281.72 15.4402C283.14 18.2702 284.26 20.5102 288.09 23.3202L289 23.9902L288.09 24.6602C284.26 27.4702 283.14 29.7102 281.72 32.5402C280.68 34.6102 279.51 36.9602 277.05 39.8802C272.68 45.0702 265.69 46.0102 261.62 46.0702H30.6503V46.0902Z",fill:"url(#paint2_linear_4055_102851)"}),(0,a.tZ)("path",{d:"M276.42 8.64023C272.51 4.00024 266.22 2.74023 261.17 2.74023H103.03C103.03 2.74023 31.3297 2.74023 31.1097 2.74023C26.0597 2.74023 19.7697 4.00024 15.8597 8.64023C10.1697 15.3902 11.5697 18.9402 4.67969 24.0002C11.5697 29.0602 10.1697 32.6102 15.8597 39.3602C19.7697 44.0002 26.0597 45.2602 31.1097 45.2602H261.17C266.22 45.2602 272.51 44.0002 276.42 39.3602C282.11 32.6102 280.71 29.0602 287.6 24.0002C280.71 18.9402 282.11 15.3902 276.42 8.64023Z",fill:"url(#paint3_radial_4055_102851)"})]}),(0,a.BX)("defs",{children:[(0,a.BX)("linearGradient",{id:"paint0_linear_4055_102851",x1:"0",y1:"24",x2:"292.28",y2:"24",gradientUnits:"userSpaceOnUse",children:[(0,a.tZ)("stop",{"stop-color":"#AA9257"}),(0,a.tZ)("stop",{offset:"0.43","stop-color":"#D8BD8E"}),(0,a.tZ)("stop",{offset:"0.57","stop-color":"#D0B685"}),(0,a.tZ)("stop",{offset:"0.8","stop-color":"#BEA46F"}),(0,a.tZ)("stop",{offset:"1","stop-color":"#AA9257"})]}),(0,a.BX)("linearGradient",{id:"paint1_linear_4055_102851",x1:"1.87012",y1:"23.9999",x2:"290.41",y2:"23.9999",gradientUnits:"userSpaceOnUse",children:[(0,a.tZ)("stop",{"stop-color":"#816735"}),(0,a.tZ)("stop",{offset:"0.18","stop-color":"#BDA05F"}),(0,a.tZ)("stop",{offset:"0.5","stop-color":"#816735"}),(0,a.tZ)("stop",{offset:"0.56","stop-color":"#886E3A"}),(0,a.tZ)("stop",{offset:"0.65","stop-color":"#9D8149"}),(0,a.tZ)("stop",{offset:"0.76","stop-color":"#BDA05F"}),(0,a.tZ)("stop",{offset:"0.82","stop-color":"#B59859"}),(0,a.tZ)("stop",{offset:"0.9","stop-color":"#A0834A"}),(0,a.tZ)("stop",{offset:"1","stop-color":"#816735"})]}),(0,a.BX)("linearGradient",{id:"paint2_linear_4055_102851",x1:"3.28027",y1:"24.0002",x2:"289",y2:"24.0002",gradientUnits:"userSpaceOnUse",children:[(0,a.tZ)("stop",{"stop-color":"#C7A265"}),(0,a.tZ)("stop",{offset:"0.14","stop-color":"#DBBB85"}),(0,a.tZ)("stop",{offset:"0.29","stop-color":"#ECD0A4"}),(0,a.tZ)("stop",{offset:"0.37","stop-color":"#F4D9B0"}),(0,a.tZ)("stop",{offset:"0.52","stop-color":"#C7A265"}),(0,a.tZ)("stop",{offset:"0.67","stop-color":"#F4D9B0"}),(0,a.tZ)("stop",{offset:"1","stop-color":"#C7A265"})]}),(0,a.BX)("radialGradient",{id:"paint3_radial_4055_102851",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(145.783 20.1314) scale(163.112 76.6652)",children:[(0,a.tZ)("stop",{"stop-color":d}),(0,a.tZ)("stop",{offset:"0.67","stop-color":c}),(0,a.tZ)("stop",{offset:"1","stop-color":u})]}),(0,a.tZ)("clipPath",{id:"clip0_4055_102851",children:(0,a.tZ)("rect",{width:"292.28",height:"48",fill:"white"})})]})]})},CountDownTimer=e=>{let{hideTitle:t,width:o,valueClass:i,unitClass:s,...d}=e,{formatMessage:c}=(0,v.Z)(),u=(0,n.useContext)(p),{imsakDate:m,maghribDate:f,status:x}=(0,l.Y)(u,e=>({imsakDate:e.imsakDate,maghribDate:e.maghribDate,toDate:e.toDate,status:e.status}),r.X),C="flex items-center",w=i||"font-bold text-[32px] leading-[42px] tracking-[-1px] w-[30px]",k=s||"font-normal text-[20px] leading-[120%] tracking-[-0.2px]",y=(0,b.dD)({imsakDate:m,maghribDate:f,toDate:u.getState().toDate,status:x});return(0,a.tZ)("div",{...d,children:(0,a.BX)(h.x,{className:"relative flex items-center",children:[(0,a.tZ)(StatusBarBackground,{width:o,style:{display:"block",margin:"0 auto"}}),!t&&(0,a.tZ)("div",{className:(0,g.default)("absolute top-0 left-0 w-full text-center"),style:{transform:"translateY(-53%)"},children:(0,a.tZ)(CountDownTitle,{})}),(0,a.BX)("div",{className:"absolute inset-0 flex justify-between px-6",children:[(0,a.BX)("div",{className:C,children:[(0,a.tZ)(GoldText,{className:w,children:(0,Z.yu)(y.hour)}),(0,a.tZ)(GoldText,{className:k,children:c({id:"common.unitHours",defaultMessage:"hours"})})]}),(0,a.BX)("div",{className:C,children:[(0,a.tZ)(GoldText,{className:w,children:(0,Z.yu)(y.minute)}),(0,a.tZ)(GoldText,{className:k,children:c({id:"common.unitMins",defaultMessage:"mins"})})]}),(0,a.BX)("div",{className:C,children:[(0,a.tZ)(GoldText,{className:w,children:(0,Z.yu)(y.second)}),(0,a.tZ)(GoldText,{className:k,children:c({id:"common.unitSeconds",defaultMessage:"seconds"})})]})]})]})})},GregorianDate=e=>{let t=(0,n.useContext)(p),{ramadanEvent:o}=(0,l.Y)(t,e=>({ramadanEvent:e.ramadanEvent}),r.X);return(null==o?void 0:o.gregorianDate)?(0,a.tZ)("div",{...e,children:null==o?void 0:o.gregorianDate}):null},ImsakDate=e=>{let t=(0,n.useContext)(p),{ramadanEvent:o}=(0,l.Y)(t,e=>({ramadanEvent:e.ramadanEvent}),r.X),{formatMessage:i}=(0,v.Z)();return(null==o?void 0:o.prayerTimes.imsak.time)?(0,a.BX)("div",{...e,children:[i({id:"ramadanWidget.fastingTimeStarts",defaultMessage:"Fasting time starts"}),": ",o.prayerTimes.imsak.time]}):null},MaghribTime=e=>{let t=(0,n.useContext)(p),{ramadanEvent:o}=(0,l.Y)(t,e=>({ramadanEvent:e.ramadanEvent}),r.X),{formatMessage:i}=(0,v.Z)();return(null==o?void 0:o.prayerTimes.maghrib.time)?(0,a.BX)("div",{...e,children:[i({id:"ramadanWidget.breakingFastTime",defaultMessage:"Breaking fast time"}),": ",o.prayerTimes.maghrib.time]}):null},EventTime=()=>(0,a.BX)("div",{className:"flex flex-col gap-2",children:[(0,a.tZ)(GregorianDate,{className:(0,g.default)("font-inter font-medium","text-[14px] leading-[110%] tracking-[-0.2px]")}),(0,a.BX)("div",{className:(0,g.default)("font-inter font-normal","text-[12px] leading-[110%] tracking-[-0.2px]"),children:[(0,a.tZ)(ImsakDate,{}),(0,a.tZ)(MaghribTime,{})]})]});var y=(0,s.k)(()=>({root:{},inner:{backgroundImage:"url(".concat(i.C.getAssetPath("ramadan/pattern.svg"),")")}}));let IdleHeading=e=>{let{styles:t,classNames:o,className:n}=e,{formatMessage:r}=(0,v.Z)(),{cx:l}=y(void 0,{name:"RamadanWidget__IdleHeading",styles:t,classNames:o});return(0,a.BX)(h.x,{className:l(n,"flex items-center gap-2"),children:[(0,a.tZ)("img",{loading:"lazy",src:i.C.getAssetPath("ramadan/clock.png"),alt:"clock",className:"ramadan-clock w-16 h-16"}),(0,a.tZ)(GoldText,{className:l("ramadan-heading","uppercase","font-display","font-bold","text-[26px]","leading-[1.2]","tracking-[-0.22px]"),children:r({id:"ramadanWidget.fastingTime"})})]})};var _=o("Ag88"),B=o("1Hbx"),N=o("fEsb"),S=o("8vDj"),I=o("mYVa"),T=o("XRSF"),A=o("ChHM"),D=o("m0Nu"),E=(0,s.k)(e=>({root:{position:"relative"},locator:{},locatorValue:{position:"relative",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:4,".loading-icon":{padding:8,svg:{width:16,height:16}}},selectTarget:{position:"absolute",left:0,bottom:0,right:0,[e.fn.smallerThan("sm")]:{left:"50%",right:"auto"}}})),X=o("c29y"),L=o("VZtU"),R=o("IEKS"),P=o("TD78"),W=o("vaps"),M=o("LES+"),z=o("SPK5"),O=o("Dmus"),Y=(0,s.k)(e=>({root:{display:"flex",flexDirection:"column",gap:8,background:"#fff",border:"1px solid ".concat(e.colors.gray[1]),padding:4,borderRadius:12,width:"100%",boxShadow:"0px 0px 1px 0px #0000000A, 0px 2px 8px 0px #0000000A, 0px 10px 16px 0px #0000000A",[e.fn.largerThan("sm")]:{width:300}},input:{input:{paddingLeft:32,[e.fn.largerThan("sm")]:{paddingLeft:35},"&,&::placeholder":{fontSize:(0,I.h)(12),[e.fn.largerThan("sm")]:{fontSize:(0,I.h)(14)}}}},inputWrapper:{position:"relative"},searchIcon:{position:"absolute",top:10,left:8},item:{padding:"".concat((0,I.h)(6)," ").concat((0,I.h)(8)),transition:"background .2s ease",cursor:"pointer",'&[data-is-current-loc="true"]':{position:"relative",marginBottom:8,"&:before":{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,content:'""',borderBottom:"1px solid ".concat(e.colors.neutral[1])}},'&[data-selected="true"]':{cursor:"default",backgroundColor:e.colors.blue[0],borderRadius:8},"&:hover":{backgroundColor:e.colors.gray[1],borderRadius:8}}}));let Select=e=>{let{data:t=[],onClickItem:o,styles:i,classNames:s}=e,{formatMessage:d}=(0,v.Z)(),{classes:c,theme:u}=Y(void 0,{name:"AirPopulation__Select",styles:i,classNames:s}),m=(0,n.useContext)(p),[f,b]=(0,n.useState)(!1),{selectedZone:Z,errorCurrentLocation:C,setErrorCurrentLocation:w,loadingCurrentLocation:k}=(0,l.Y)(m,e=>({loadingCurrentLocation:e.loadingCurrentLocation,errorCurrentLocation:e.errorCurrentLocation,setErrorCurrentLocation:e.setErrorCurrentLocation,selectedZone:e.selectedZone}),r.X),y=(0,x.d)(),B=y?16:20,[S,A]=(0,n.useState)(""),D=(0,n.useMemo)(()=>{let e=(0,O.bG)(S),o=t.filter(t=>(0,O.bG)(t.label).includes((0,O.bG)(e)));return o.length>0?o:t},[S,t]);return(0,n.useEffect)(()=>{C&&b(!0)},[C]),(0,n.useEffect)(()=>{let e;return f?e=setTimeout(()=>{b(!1)},5e3):w(!1),()=>clearTimeout(e)},[f]),(0,a.BX)(h.x,{className:c.root,children:[(0,a.BX)(h.x,{className:c.inputWrapper,children:[(0,a.tZ)(X.I,{className:c.input,value:S,onChange:A,placeholder:d({id:"navigation.search.input.placeholder",defaultMessage:"Search for city"})}),(0,a.tZ)(L.Z,{size:18,color:u.colors.gray[3],className:c.searchIcon})]}),(0,a.tZ)(W.x.Autosize,{mah:320,type:"auto",scrollbarSize:6,children:D.map((e,t)=>{let n=!e.isUseCurrentLocation&&(null==Z?void 0:Z.value)===e.value;return e.isUseCurrentLocation?(0,a.BX)(M.J,{width:200,position:"bottom",withArrow:!0,shadow:"md",opened:f,children:[(0,a.tZ)(M.J.Target,{children:(0,a.BX)(z.k,{"data-is-current-loc":e.isUseCurrentLocation,"data-selected":n,className:(0,g.default)(c.item,"select-none"),align:"top",gap:8,onClick:()=>!n&&o(e.value),"data-event-category":"Header Banner","data-event-action":"Ramadan Widget Location Combobox","data-event-label":"current location",children:[(0,a.tZ)("div",{className:"shrink-0 pt-[2px]",children:e.isUseCurrentLocation?k?(0,a.tZ)(T.a,{size:B}):(0,a.tZ)(R.Z,{size:B}):(0,a.tZ)(N.Z,{size:B})}),(0,a.tZ)(_.T,{sx:()=>({fontSize:(0,I.h)(12),[u.fn.largerThan("sm")]:{fontSize:(0,I.h)(14)}}),children:e.label})]})}),(0,a.BX)(M.J.Dropdown,{children:[(0,a.tZ)(P.Z,{color:"red",size:B,className:"inline-block mr-1 align-middle mb-[3px]"}),(0,a.tZ)(_.T,{size:"p4",as:"span",variant:"error",children:d({id:"clinicLocator.plsAllowAccess"})})]})]},String(t)):(0,a.BX)(z.k,{"data-is-current-loc":e.isUseCurrentLocation,"data-selected":n,className:c.item,align:"top",gap:8,onClick:()=>!n&&o(e.value),"data-event-category":"Header Banner","data-event-action":"Ramadan Widget Location Combobox","data-event-label":e.label,children:[(0,a.tZ)("div",{className:"shrink-0 pt-[2px]",children:e.isUseCurrentLocation?(0,a.tZ)(R.Z,{size:B}):(0,a.tZ)(N.Z,{size:B})}),(0,a.tZ)(_.T,{sx:()=>({fontSize:(0,I.h)(12),[u.fn.largerThan("sm")]:{fontSize:(0,I.h)(14)}}),children:e.label})]},String(t))})})]})},LocationSelector=e=>{let{styles:t,className:o,classNames:i}=e,{formatMessage:s}=(0,v.Z)(),d=(0,n.useContext)(p),{ramadanEvent:c,currentLocation:u,listZone:g,selectedZone:f,loading:b,colorShade:Z,handleChangeLocation:C,handleChangeZone:w,handleCloseLocatorDropdown:k}=(0,l.Y)(d,e=>({colorShade:e.colorShade,ramadanEvent:e.ramadanEvent,currentLocation:e.currentLocation,currentZone:e.currentZone,listZone:e.listZone,loading:e.loading,selectedZone:e.selectedZone,setSelectedZone:e.setSelectedZone,handleChangeZone:e.handleChangeZone,handleChangeLocation:e.handleChangeLocation,handleCloseLocatorDropdown:e.handleCloseLocatorDropdown}),r.X),y=(0,S.rZ)(),X=y.colors.indigo[1],{mainColor:L,secondColor:R,thirdColor:P}=Z,[W,M]=(0,n.useState)(!1),z=(0,A.O)(()=>M(!1)),{classes:O,cx:Y}=E(void 0,{name:"AirPopulation__LocationSelector",styles:t,classNames:i}),U=(0,x.d)(),j=[{label:s({id:D.eD}),value:D.Zn,isUseCurrentLocation:!0},...g||[]];return(0,n.useEffect)(()=>{W||k()},[W]),(0,n.useEffect)(()=>{M(!1)},[U]),(0,a.tZ)(h.x,{className:Y(o,O.root),children:(0,a.BX)(h.x,{className:O.locator,ref:z,children:[(0,a.BX)(h.x,{className:"cursor-pointer relative w-full h-[40px]",onClick:()=>{b||M(e=>!e)},sx:()=>({background:"radial-gradient(57.65% 180.3% at 49.87% 40.9%, ".concat(L," 0%, ").concat(R," 67%, ").concat(P," 100%)"),borderColor:L,border:"1px solid ".concat(L),borderRadius:8,padding:"8px 30px 8px 36px",color:X}),children:[(0,a.tZ)(_.T,{className:"select-none tracking-[-0.3px] break-all",lineClamp:1,color:X,sx:()=>({fontSize:(0,I.h)(12),lineHeight:(0,I.h)(22),[y.fn.largerThan("sm")]:{fontSize:(0,I.h)(14)}}),children:u&&!c?s({id:D.eD}):null==f?void 0:f.label}),(0,a.tZ)("div",{className:"absolute right-0 top-0 z-[0] w-[40px] h-[40px] flex items-center justify-center",children:b?(0,a.tZ)(T.a,{size:18,color:"yellow",className:"loading-icon"}):(0,a.tZ)(B.Z,{size:24,color:X,style:{transform:"rotate(".concat(W?"180deg":0,")")}})}),(0,a.tZ)("div",{className:"absolute left-0 top-0 z-[0] w-[40px] h-[40px] flex items-center justify-center",children:(0,a.tZ)(N.Z,{color:X,size:U?18:20})})]}),(0,a.tZ)(m.u,{mounted:!!W,keepMounted:!0,transition:"fade",children:e=>(0,a.tZ)(h.x,{sx:{position:"absolute",top:"calc(100% + 8px)",...e,borderColor:L,[y.fn.smallerThan("sm")]:{right:0,width:"calc(100vw - 24px)"},[y.fn.largerThan("sm")]:{right:0}},children:(0,a.tZ)(Select,{data:j,onClickItem:e=>{e===D.Zn?C(()=>{M(!1)}):(w(e),M(!1))}})})})]})})},Logo=()=>(0,a.tZ)(GoldText,{className:(0,g.default)("font-display","font-semibold","text-[32px] md:text-[44px]","leading-[110%]","tracking-[0px]"),children:"Ramadan"}),SponsorLogo=e=>{let{className:t=""}=e,o=(0,n.useContext)(p),{shouldRender:i,ramadanEvent:s}=(0,l.Y)(o,e=>({shouldRender:e.shouldRender,ramadanEvent:e.ramadanEvent}),r.X),d=null==s?void 0:s.sponsorItem;return i&&(null==d?void 0:d.logo)?(0,a.tZ)("img",{className:(0,g.default)(t,"h-[40px] w-auto object-contain"),loading:"lazy",src:d.logo,alt:d.name||"sponsor"}):null},SponsorText=e=>{let{className:t,...o}=e,i=(0,n.useContext)(p),{ramadanEvent:s}=(0,l.Y)(i,e=>({ramadanEvent:e.ramadanEvent}),r.X),d=null==s?void 0:s.sponsorItem;return(null==d?void 0:d.content)?(0,a.tZ)("div",{className:(0,g.default)("font-inter","font-normal","text-[14px]","leading-[110%]","tracking-[-0.2px]","[&_a]:text-[#e8bd84]","[&_a]:underline",t),...o,dangerouslySetInnerHTML:{__html:d.content}}):null},Sponsor=()=>{let e=(0,n.useContext)(p),{shouldRender:t,ramadanEvent:o}=(0,l.Y)(e,e=>({shouldRender:e.shouldRender,ramadanEvent:e.ramadanEvent}),r.X),i=null==o?void 0:o.sponsorItem;return t&&((null==i?void 0:i.logo)||(null==i?void 0:i.content))?(0,a.BX)("div",{className:"flex flex-col gap-0 items-center",children:[(0,a.tZ)(SponsorLogo,{}),(0,a.tZ)(SponsorText,{className:"text-center"})]}):null},DesktopView=()=>{let e=(0,n.useContext)(p),{shouldRender:t,status:o}=(0,l.Y)(e,e=>({shouldRender:e.shouldRender,status:e.status}),r.X);return t?(0,a.BX)("div",{className:(0,g.default)("h-full","relative z-[1]","flex flex-col gap-3","grid grid-cols-[1fr_292px_1fr] items-center gap-0"),children:[(0,a.BX)("div",{className:"flex gap-3 items-center ",children:[(0,a.tZ)("img",{className:" h-[81px] w-[103px] ",loading:"lazy",src:i.C.getAssetPath("ramadan/moon.png"),alt:"moon"}),(0,a.BX)(h.x,{className:"flex gap-[16px]",children:[(0,a.tZ)(Logo,{}),(0,a.tZ)(EventTime,{})]})]}),(0,a.tZ)("div",{className:(0,g.default)("flex justify-center w-[292px]"),children:o===k.I.IDLE?(0,a.tZ)(IdleHeading,{}):(0,a.tZ)(CountDownTimer,{className:"pt-[10px]"})}),(0,a.tZ)("div",{children:(0,a.BX)("div",{className:(0,g.default)("max-w-[550px]","flex items-center gap-1 justify-between"),children:[(0,a.tZ)("div",{className:"w-full",children:(0,a.tZ)(Sponsor,{})}),(0,a.BX)("div",{className:"flex items-center gap-7 flex-shrink-0",children:[(0,a.tZ)("div",{className:"w-[200px]",children:(0,a.tZ)(LocationSelector,{})}),(0,a.tZ)("img",{loading:"lazy",className:"h-[80px] w-auto object-contain [transform:rotateY(-180deg)]",src:i.C.getAssetPath("ramadan/sparkle-star.png"),alt:"sparkle star"})]})]})})]}):null};var U=(0,s.k)(e=>({inner:{position:"relative",[e.fn.largerThan("sm")]:{"&:before,&:after":{content:'""',position:"absolute",top:0,backgroundImage:"url(".concat(i.C.getAssetPath("ramadan/sparkle.png"),")"),backgroundSize:"cover",width:421,height:80},"&:before":{left:-242},"&:after":{right:-242}}}}));let MobileView=()=>{var e;let t=(0,n.useContext)(p),{shouldRender:o,status:s,ramadanEvent:d}=(0,l.Y)(t,e=>({shouldRender:e.shouldRender,status:e.status,ramadanEvent:e.ramadanEvent}),r.X),c="text-[10px] leading-[1.2] tracking-[-0.2px] text-gray-800",u=s!==k.I.IDLE||(null==d?void 0:null===(e=d.sponsorItem)||void 0===e?void 0:e.logo);return o?(0,a.BX)("div",{className:(0,g.default)("p-[12px]","h-full","relative z-[1]","flex flex-col gap-[9px]"),children:[(0,a.BX)("div",{className:"flex flex-col gap-2 items-center ",children:[u&&(0,a.BX)("div",{className:"flex flex-col w-full",children:[(0,a.BX)("div",{className:"flex gap-[4px]",children:[(0,a.tZ)(Logo,{}),(0,a.BX)("div",{className:"pt-[8px]",children:[(0,a.tZ)(ImsakDate,{className:c}),(0,a.tZ)(MaghribTime,{className:c})]})]}),(0,a.tZ)(GregorianDate,{className:c})]}),s===k.I.IDLE?(0,a.tZ)(IdleHeading,{}):(0,a.tZ)(CountDownTimer,{className:"pt-[10px]"}),(0,a.BX)("div",{className:"flex gap-1 items-center w-full",children:[(0,a.tZ)(SponsorText,{className:"shrink-0 w-[50%] !text-[12px] leading-[1.1] tracking-[-0.2px] "}),(0,a.tZ)(LocationSelector,{className:"w-full"})]})]}),(0,a.tZ)(SponsorLogo,{className:"absolute top-0 right-[32px]"}),(0,a.tZ)("img",{loading:"lazy",className:"absolute right-5 top-0 h-[83px] w-auto object-contain",src:i.C.getAssetPath("ramadan/sparkle-star-mobile.png"),alt:"sparkle star"})]}):null},RamadanWidgetComponent=e=>{let t=(0,n.useContext)(p),{shouldRender:o}=(0,l.Y)(t,e=>({shouldRender:e.shouldRender}),r.X),i=(0,x.d)(),{classes:s,cx:d}=U(void 0,{name:"RamadanWidget"});return o?(0,a.tZ)(BoxWrapper,{...e,children:(0,a.tZ)("div",{className:d(s.inner,"max-w-[1440px] mx-auto h-auto md:h-[81px]"),children:i?(0,a.tZ)(MobileView,{}):(0,a.tZ)(DesktopView,{})})}):null};var j=o("nCpW"),H=o("P5LW"),G=o("CF0j"),F=o("0EDw");let WidgetView=e=>{let{className:t,...o}=e,i=(0,n.useContext)(p),{status:s}=(0,l.Y)(i,e=>({status:e.status}),r.X);return s===k.I.IDLE?null:(0,a.tZ)(BoxWrapper,{withSmallPattern:!0,...o,children:(0,a.BX)("div",{className:"flex gap-1 justify-between p-2",children:[(0,a.BX)("div",{className:"flex flex-col gap-[1px] justify-center",children:[(0,a.tZ)(CountDownTitle,{className:"font-bold text-[16.84px] leading-[120%]"}),(0,a.tZ)(SponsorText,{className:"text-[9px]"})]}),(0,a.tZ)(CountDownTimer,{hideTitle:!0,width:192,unitClass:"text-[13.33px] leading-[120%] tracking-[-0.13px]",valueClass:"text-[21.33px] leading-[28px] w-[20px]"})]})})};var V={Provider:e=>{let{children:t,initialState:o}=e,r=(0,n.useRef)();return r.current||(r.current=(0,c.P)(o)),(0,a.tZ)(p.Provider,{value:r.current,children:t})},Container:e=>{let{children:t}=e,o=(0,n.useContext)(p),{locale:i}=(0,H.h)(),{ramadanEvent:s,fetchInitData:d,updateTime:c,status:u}=(0,l.Y)(o,e=>({ramadanEvent:e.ramadanEvent,fetchInitData:e.fetchInitData,updateTime:e.updateTime,status:e.status}),r.X);(0,n.useEffect)(()=>{G.rV.includes(i)&&d()},[d]);let m=(0,j.Y)(()=>{let e=o.getState().toDate;e&&c(e.add(1,"second"))},1e3);return(0,n.useEffect)(()=>(u!==k.I.IDLE?m.start():m.stop(),m.stop),[s,u]),(0,a.tZ)(a.HY,{children:t})},CloseBannerWrapper:()=>{let e=(0,n.useContext)(p),{shouldRender:t}=(0,l.Y)(e,e=>({shouldRender:e.shouldRender}),r.X),o=(0,f.U)(),[i,s]=(0,n.useState)(!1);return(0,a.tZ)(m.u,{mounted:t&&!i,transition:"fade",children:e=>(0,a.BX)(h.x,{className:"relative z-[2]",sx:e=>({".close-btn":{[e.fn.largerThan("sm")]:{transform:"translateY(-50%)"}}}),children:[(0,a.tZ)(RamadanWidgetComponent,{style:e}),(0,a.tZ)(u.Z,{size:24,color:"#fff",className:(0,g.default)("close-btn","cursor-pointer absolute z-[1]","top-[8px] md:top-1/2 right-[8px] md:right-3"),"data-event-category":"Header Banner","data-event-action":"Ramadan Widget Close","data-event-label":o,onClick:()=>s(!0)})]})})},ShortcutWidget:()=>{let e=(0,n.useContext)(p),{status:t,shouldRender:o}=(0,l.Y)(e,e=>({status:e.status,shouldRender:e.shouldRender}),r.X);return o?(0,a.tZ)(BoxWrapper,{withSmallPattern:!0,className:"px-3 py-3 rounded-lg",children:(0,a.tZ)("div",{className:"flex flex-col gap-1",children:t===k.I.IDLE?(0,a.tZ)(IdleHeading,{}):(0,a.BX)(a.HY,{children:[(0,a.tZ)(CountDownTimer,{className:"pt-[10px]"}),(0,a.tZ)(SponsorText,{className:"!text-[12px] text-center"})]})})}):null},CountDownTimer:CountDownTimer,BoxWrapper:BoxWrapper,SponsorText:SponsorText,StickyMobileWidget:()=>{let e=(0,x.d)(),t=(0,n.useContext)(p),{shouldRender:o}=(0,l.Y)(t,e=>({shouldRender:e.shouldRender}),r.X),[i]=(0,F.b)(),s=i.y>=window.innerHeight;return e&&o?(0,a.tZ)(m.u,{transition:"fade",mounted:s,children:e=>(0,a.tZ)(WidgetView,{style:e})}):null}}},llb7:function(e,t,o){"use strict";var a,n;o.d(t,{I:function(){return a}}),(n=a||(a={})).IDLE="idle",n.COUNT_DOWN_TO_PRAY_TIME="count_down_to_pray_time",n.COUNT_DOWN_TO_BREAKING_TIME="count_down_to_breaking_time"},CBW8:function(e,t,o){"use strict";o.d(t,{o:function(){return AdBlockContainer}});var a=o("BGKE"),n=o("P5LW"),r=o("N2Lg");let AdBlockContainer=e=>{let{children:t}=e,{locale:o}=(0,n.h)(),l=null===r.Zr||void 0===r.Zr?void 0:r.Zr.includes(o);return l?null:(0,a.tZ)(a.HY,{children:t})}},LplW:function(e,t,o){"use strict";o.d(t,{E:function(){return FixedBottomAdBlock}});var a=o("BGKE"),n=o("q1tI"),r=o("Vvt1"),l=o.n(r);let i=l()(()=>Promise.all([o.e(4846),o.e(2233),o.e(1058),o.e(3295),o.e(1538),o.e(6629),o.e(7152),o.e(5684),o.e(2574),o.e(9057),o.e(9884),o.e(7644),o.e(6962),o.e(6638),o.e(7741),o.e(1137),o.e(2433),o.e(5385),o.e(3564),o.e(7082),o.e(3158),o.e(5641),o.e(7454),o.e(7004),o.e(4758),o.e(6219),o.e(17),o.e(8990),o.e(4067),o.e(9487),o.e(9083),o.e(1520),o.e(270),o.e(7596),o.e(8217),o.e(7543),o.e(2835),o.e(2507),o.e(6885),o.e(7859),o.e(690),o.e(2730),o.e(6287),o.e(7682),o.e(1551),o.e(4870),o.e(9922),o.e(3133),o.e(612),o.e(2002),o.e(1880),o.e(7471),o.e(7165),o.e(5451),o.e(8612)]).then(o.bind(o,"lXMY")).then(e=>e.FixedBottomAdBlock),{loadableGenerated:{webpack:()=>["lXMY"]},ssr:!1}),FixedBottomAdBlock=e=>{let[t,o]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{setTimeout(()=>{o(!0)},500)},[]),t)?(0,a.tZ)(i,{...e}):null}},lXMY:function(e,t,o){"use strict";o.r(t),o.d(t,{FixedBottomAdBlock:function(){return FixedBottomAdBlock}});var a=o("BGKE"),n=o("q1tI"),r=o("rqZo"),l=o("Q6jF"),i=o("P5LW"),s=o("1LUM"),d=o("xJ6s");let FixedBottomAdBlock=e=>{let{className:t="",adUnitPath:o,divId:c,isMobile:p,contentId:u,ignoreRefreshAd:m=!1,customTargetings:h,...g}=e,{locale:f}=(0,i.h)(),[x,v]=(0,n.useState)(!0),[b,Z]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!0),k=(0,n.useRef)(null),y=(0,n.useRef)((0,l.Z)()),_=(0,n.useRef)(null),B=(0,n.useRef)(),N=(0,n.useRef)();return((0,n.useEffect)(()=>{let checkAdShowing=()=>{N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{if(document.getElementById("subot--container"))v(!0);else{var e;v(!1),(null===(e=k.current)||void 0===e?void 0:e.clientHeight)?w(!1):w(!0)}checkAdShowing()},4e3)};return checkAdShowing(),()=>{B.current&&clearTimeout(B.current),N.current&&clearTimeout(N.current)}},[]),x||b)?null:(0,a.tZ)(d.nE,{ref:_,className:"".concat(t," sticky-bottom-ad"),"data-visible":!C,...g,children:o&&(0,a.tZ)(s.AdBlock,{wrapperProps:{m:0},ref:k,adUnitPath:o,size:p?[[320,50],[320,100]]:[728,90],divId:(c||"div-gpt-ad-sticky")+(p?"-mobile":"")+u+String(y.current),pos:["Sticky"],contentId:u,hideIfHasSubot:p,customTargetings:h,adDefaultSize:p?[320,50]:[728,90],showCloseBtn:!0,onCloseAd:()=>Z(!0),refreshInterval:f===r.L.Vietnam?30:60,ignoreRefreshAd:m})},p?"mobile":"desktop")}},xJ6s:function(e,t,o){"use strict";o.d(t,{On:function(){return s},R7:function(){return d},nE:function(){return i},o$:function(){return c}});var a=o("rBCA"),n=o("SPEo"),r=o("iBNF"),l=o("rIrU");let i=(0,a.Z)("div",{target:"e1q29jt0"})("position:fixed;z-index:",l.kg.adBlock,";bottom:0;left:0;right:0;max-width:100%;background:none;transition:transform 0.3s ease-in-out;",n.M.mbUp,"{left:50%;width:fit-content;transform:translateX(-50%);}.close-sticky-button{position:absolute;display:flex;width:16px;height:16px;align-items:center;justify-content:center;background:#bfbfbf;border-radius:50%;color:white;cursor:pointer;font-size:12px;line-height:12px;transform:translate(50%,-50%);top:0;right:0;}opacity:0;pointer-events:none;&[data-visible='true']{opacity:1;pointer-events:auto;}"),s=(0,a.Z)("div",{target:"e1q29jt1"})("display:flex;justify-content:center;align-items:center;flex-direction:column;max-width:100%;",n.M.mbUp,"{width:fit-content;height:fit-content;}margin-inline:auto;/* margin:1rem auto;*/\n &[data-no-wrapper='false']{border:1px solid ",r.r.colors.neutral50,";background:",r.r.colors.neutral50,";}&[data-no-wrapper='true']{line-height:0;}&[data-header-bottom='true']{flex-direction:column-reverse;background:none;border:none;}",n.M.mbDown,"{[data-video='true'] [data-gc-instream-floating='true']{height:100px !important;div[class^='InstreamDom_player']{&[data-arb-resize-mode='compute-height']:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_){height:100px !important;}div:last-child{width:180px !important;}}div[class^='InstreamDom_videoTitle']{position:absolute !important;left:180px !important;top:50%;transform:translate(0,-50%);z-index:999 !important;color:white !important;display:block !important;white-space:normal !important;text-align:left !important;font-size:14px !important;line-height:22px !important;font-weight:normal !important;padding:0 16px !important;width:auto !important;height:auto !important;max-height:66px !important;}div[class^='CloseButton']{top:23px !important;color:white !important;border-color:transparent !important;}}}"),d=(0,a.Z)("div",{target:"e1q29jt2"})("/* background:",r.r.colors.neutral50,";*/\n width:100%;padding:0 5px 1.5px;display:flex;align-items:center;justify-content:center;gap:5px;text-transform:capitalize;img{height:12px;width:12px;max-width:12px;max-height:12px;}&[data-header-bottom='true']{background:",r.r.colors.neutral50,";}span{font-size:10px;line-height:12px;color:",r.r.colors.gray400,";font-weight:400;}"),c=(0,a.Z)("div",{target:"e1q29jt3"})("background-color:white;background-image:url('/images/close-blue.svg');background-repeat:no-repeat;background-size:contain;background-position:center;width:14px;height:14px;position:absolute;top:0;right:0;z-index:1;cursor:pointer;")},"1LUM":function(e,t,o){"use strict";o.r(t),o.d(t,{AdBlock:function(){return v}});var a=o("BGKE"),n=o("q1tI"),r=o("rqZo"),l=o("Eso5"),i=o("O/o9"),s=o("dDsW"),d=o("P5LW"),c=o("N2Lg"),p=o("VIdu");window.pbjs=window.pbjs||{que:[]},window.googletag=window.googletag||{cmd:[]};var u=o("xJ6s");let m={},h=["TopBanner","MidBanner1","MidBanner2","masthead","Sticky"],_getForceRefreshConfig=(e,t)=>{if(e===r.L.Vietnam&&h.some(e=>t.includes(e)))return!0},displayAd=e=>{let{contentId:t,adUnitPath:o,size:a,divId:n,pos:r,sizeMapping:l,hideIfHasSubot:i,customTargetings:s,onSuccess:d}=e;if(!n||!document.getElementById(n))return console.error("divId is required");destroyAdSlot(n),window.googletag=window.googletag||{cmd:[]};let{googletag:c}=window;c.cmd.push(function(){let e=document.querySelector('meta[name="content_id"]'),u="string"==typeof t?t:null==e?void 0:e.content,h=c.defineSlot(o,a,n);if(document.querySelector("script[src*='https://micro.rubiconproject.com/prebid/dynamic']")&&function(e){var t;let o;let a=(t=e=>{window.googletag.pubads().refresh(e)},o=!1,a=>{o||(o=!0,t(a||e))});window.pbjs.que.push(function(){window.pbjs.rp.requestBids({callback:a,gptSlotObjects:e})}),setTimeout(a,3500)}([h]),h){try{s&&Object.keys(s).forEach(e=>{e&&(null==h||h.setTargeting(e,s[e]))})}catch(e){console.error(e)}m[n]=h,(0,p.Tm)(h),h.setTargeting("Pos",r),h.addService(c.pubads()),u&&h.setTargeting("Content_ID",u),l&&h.defineSizeMapping(l),i&&document.getElementById("subot--container")&&h.setTargeting("chatbot",!0),c.display(n),c.pubads().isInitialLoadDisabled()&&c.pubads().refresh([h]),null==d||d()}})},destroyAdSlot=e=>{if(m[e]){window.googletag=window.googletag||{cmd:[]};let{googletag:t}=window;t.cmd.push(function(){t.destroySlots([m[e]]),delete m[e]})}},g=["Sticky"],f=(0,n.forwardRef)(function(e,t){let{asPath:o,locale:n}=(0,d.h)();return(c.Rk[n]||[]).find(e=>o.startsWith(e))||o.startsWith("/health-tools/")&&!(c.rd[n]||[]).find(e=>encodeURIComponent(decodeURIComponent(o)).startsWith(encodeURIComponent(e)))||o.startsWith("/bot/")&&!(c.Iu[n]||[]).find(e=>encodeURIComponent(decodeURIComponent(o)).startsWith(encodeURIComponent(e)))?(0,a.tZ)("div",{ref:t}):(0,a.tZ)(x,{...e,ref:t})}),x=(0,n.forwardRef)(function(e,t){let{className:o,adUnitPath:c,size:p,divId:h,pos:f,sizeMapping:x,contentId:v,isHidden:b,hideIfHasSubot:Z,isSticky:C,refreshInterval:w,customTargetings:k,style:y,adDefaultSize:_,noWrapper:B,showCloseBtn:N,onCloseAd:S,headerBottom:I,wrapperProps:T,onlyRefreshInview:A,ignoreRefreshAd:D=!1,adWrapperStyle:E,adStyle:X,isVideo:L}=e,{locale:R}=(0,d.h)(),P=w||(R===r.L.Vietnam&&f.some(e=>g.includes(e))?30:void 0),{formatMessage:W}=(0,s.Z)(),{ref:M,inView:z}=(0,i.YD)(),O=(0,n.useRef)(null),Y=(0,n.useRef)(P);Y.current=_getForceRefreshConfig(R,f)?15:P;let U=_getForceRefreshConfig(R,f)||A,[j,H]=(0,n.useState)(!1),setupRefreshAd=e=>{null!==O.current&&clearInterval(O.current),O.current=window.setInterval(()=>{window.googletag=window.googletag||{cmd:[]};let{googletag:e}=window;e.cmd.push(function(){m[h]&&e.pubads().refresh([m[h]])})},1e3*e)};if((0,n.useEffect)(()=>{z&&U&&Y.current&&!D?setupRefreshAd(Y.current):!z&&U&&null!==O.current&&clearInterval(O.current)},[z,U,D]),(0,n.useEffect)(()=>()=>{destroyAdSlot(h),O.current&&clearInterval(O.current)},[]),(0,n.useEffect)(()=>{b||displayAd({contentId:v,adUnitPath:c,size:p,divId:h,pos:f,sizeMapping:x,hideIfHasSubot:Z,customTargetings:k,onSuccess:()=>{!Y.current||U||D||setupRefreshAd(Y.current);let e=document.getElementById(h);e&&L&&e.setAttribute("data-video",String(!!L))}})},[b]),j)return null;let G=(0,a.tZ)("div",{style:{position:"relative",width:"fit-content",height:"fit-content",overflow:"hidden",maxWidth:"100%",display:"flex",alignItems:"center",justifyContent:"center",...E},children:(0,a.tZ)("div",{ref:t,id:h,style:X})});if(C)return G;let F=_?_[0]:p?Array.isArray(p[0])?p[0][0]:p[0]:void 0,V=_?_[1]:p?Array.isArray(p[0])?p[0][1]:p[1]:void 0;return(0,a.BX)(l.x,{...T,className:o,children:[N&&(0,a.tZ)(u.o$,{onClick:()=>{null==S||S(),H(!0)}}),(0,a.tZ)(u.On,{ref:M,className:o,style:y,"data-no-wrapper":!!B,"data-header-bottom":!!I,children:B?(0,a.BX)(a.HY,{children:[N&&(0,a.tZ)(u.o$,{onClick:()=>{null==S||S(),H(!0)}}),G]}):(0,a.BX)(a.HY,{children:[(0,a.BX)(u.R7,{"data-header-bottom":!!I,children:[(0,a.tZ)("img",{loading:"lazy",src:"/svg/adsIcon.svg",alt:"ad icon"}),(0,a.tZ)("span",{"data-ads-type":!0,children:W({id:"adBanner.title",defaultMessage:"Advertisement"})}),N&&(0,a.tZ)(u.o$,{onClick:()=>{null==S||S(),H(!0)}})]}),(0,a.tZ)("div",{style:{minWidth:F||"100%",minHeight:V||"100%",position:"relative"},children:G})]})})]})}),v=(0,n.memo)(f,(e,t)=>e.adUnitPath===t.adUnitPath&&e.divId===t.divId&&e.className===t.className&&e.isHidden===t.isHidden)},VHY4:function(e){e.exports={watermarkContainer:"PollWidget_watermarkContainer__hYFXF",flipCard:"PollWidget_flipCard__ikppG","card-inner":"PollWidget_card-inner__nLnh9",pollCard:"PollWidget_pollCard__SXidA"}}}]);