PageSourceSearch

https://nader-ragab.com/front/_next/static/chunks/5807-ffe2d35ee406e0a8.js

js nader-ragab.com collected 2026-10-01 14:31:28 UTC 20,250 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5807],{82002:(e,s,l)=>{l.d(s,{AS:()=>c,Ay:()=>n,hQ:()=>t,ht:()=>i,x3:()=>r});let a=(0,l(59267).Z0)({name:"modal",initialState:{activeModal:null,modalData:null,viewWarningConfirmed:!1},reducers:{openGlobalModal:(e,s)=>{e.activeModal=s.payload.type,e.modalData=s.payload.data||null},closeGlobalModal:e=>{e.activeModal=null,e.modalData=null},confirmViewWarning:e=>{e.viewWarningConfirmed=!0},resetViewWarning:e=>{e.viewWarningConfirmed=!1}}}),{openGlobalModal:r,closeGlobalModal:t,confirmViewWarning:c,resetViewWarning:i}=a.actions,n=a.reducer},95807:(e,s,l)=>{l.d(s,{o:()=>k});var a=l(95155),r=l(12115),t=l(18955),c=l(902),i=l(46392),n=l(70667),d=l(99708),o=l(26983),u=l(57828),m=l(16485),p=l(35299),h=l(10512),x=l(71360),y=l(45345),f=l(79397),v=l(36168),g=l(52472),b=l(346),j=l(20063),_=l(8842),w=l(36386),N=l(47605),C=l(39957),S=l(96486),A=l(6439),I=l(82002);function k(e){let{course:s,chapterId:l,classId:k,onCouponClick:D,onClose:V}=e,M=(0,t.c)("dashboard.learning"),F=(0,c.Ym)(),P=(0,j.useRouter)(),R=(0,A.j)(),{webSettings:E}=(0,w.A)(),U=e=>{R((0,I.hQ)()),null==V||V();let a=e||eg;if(null==s?void 0:s.id)if("class"===a&&((null==K?void 0:K.id)||k)){let e=(null==K?void 0:K.id)||k,a=(null==H?void 0:H.id)||l;a?sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id,"/chapters/").concat(a,"/classes/").concat(e)):sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id))}else if("chapter"===a&&((null==H?void 0:H.id)||l)){let e=(null==H?void 0:H.id)||l;sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id,"/chapters/").concat(e))}else"course"===a&&sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id));P.push("/".concat(F,"/checkout"))},{mutate:$,isPending:T,variables:W}=(0,i.AP)(),{data:G}=(0,i._$)(),{mutate:O,isPending:J,variables:L}=(0,i.IM)(),Y=!!(0,A.G)(e=>e.auth.user),Z=(0,j.usePathname)(),Q=(0,j.useSearchParams)(),q="".concat(Z||"").concat((null==Q?void 0:Q.toString())?"?".concat(Q.toString()):""),z="/auth/login?returnUrl=".concat(encodeURIComponent(q)),B=(0,r.useRef)(null);(0,r.useEffect)(()=>{s&&(0,S.Z0)(s),(null==s?void 0:s.id)&&k&&l?(0,S.lD)({type:"class",id:k,courseId:s.id,chapterId:l}):(null==s?void 0:s.id)&&l&&(0,S.lD)({type:"chapter",id:l,courseId:s.id})},[s,l,k]);let H=(0,r.useMemo)(()=>{var e,a,r,t;if(!s)return null;let c=null!=(t=null!=(r=null==s||null==(a=s.course_type)||null==(e=a.recorded)?void 0:e.chapter)?r:null==s?void 0:s.chapter)?t:[];return l?c.find(e=>e.id.toString()===l.toString())||null:k&&c.find(e=>{var s;return null==(s=e.classes)?void 0:s.some(e=>e.id.toString()===k.toString())})||null},[s,l,k]),K=(0,r.useMemo)(()=>{var e,l,a,r,t;if(!k)return null;if(null==H?void 0:H.classes)return H.classes.find(e=>e.id.toString()===k.toString())||null;for(let c of null!=(r=null!=(a=null==s||null==(l=s.course_type)||null==(e=l.recorded)?void 0:e.chapter)?a:null==s?void 0:s.chapter)?r:[]){let e=null==(t=c.classes)?void 0:t.find(e=>e.id.toString()===k.toString());if(e)return e}return null},[s,H,k]),X=null==s?void 0:s.pricing_type,ee=(null==K?void 0:K.price)?parseFloat(K.price):0,es=(null==K?void 0:K.discount_price)?parseFloat(K.discount_price):0,el=es>0&&es<ee?es:ee>0?ee:es,ea=(null==H?void 0:H.price)?parseFloat(H.price):0,er=(null==H?void 0:H.discount_price)?parseFloat(H.discount_price):0,et=er>0&&er<ea?er:ea>0?ea:er,ec=(0,r.useMemo)(()=>(null==H?void 0:H.classes)?H.classes.reduce((e,s)=>e+(s.price?parseFloat(s.price):0),0):0,[H]),ei=parseFloat((null==s?void 0:s.price)||"0"),en=parseFloat((null==s?void 0:s.discount_price)||"0"),ed=en>0&&en<ei?en:ei,eo=(0,r.useMemo)(()=>(null==s?void 0:s.chapter)?s.chapter.reduce((e,s)=>e+(s.price?parseFloat(s.price):0),0):0,[s]),eu=(e,s)=>!!(null==G?void 0:G.cart)&&G.cart.some(l=>"course"===e?l.course_id===s&&!l.class_id&&!l.chapter_id:"chapter"===e?l.chapter_id===s&&!l.class_id:"class"===e&&l.class_id===s),em=(e,a,r)=>{if(eu(e,a)){var t;let s=null==G||null==(t=G.cart)?void 0:t.find(s=>
1"course"===e?s.course_id===a&&!s.class_id&&!s.chapter_id:"chapter"===e?s.chapter_id===a&&!s.class_id:"class"===e&&s.class_id===a);(null==s?void 0:s.id)&&O(s.id)}else{if(null==s?void 0:s.id)if("class"===e){let e=(null==H?void 0:H.id)||l;e&&((0,S.lD)({type:"class",id:a,courseId:s.id,chapterId:e}),sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id,"/chapters/").concat(e,"/classes/").concat(a)))}else"chapter"===e?((0,S.lD)({type:"chapter",id:a,courseId:s.id}),sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id,"/chapters/").concat(a))):"course"===e&&sessionStorage.setItem("checkoutReturnUrl","/".concat(F,"/dashboard/my-courses/").concat(s.id));$({itemType:"course"===e?"course_id":"chapter"===e?"chapter_id":"class_id",itemId:a,meta:r})}},ep="course_chapter_class"===X?(null==K?void 0:K.paid)===!0:(null==K?void 0:K.paid)===!0||(null==H?void 0:H.paid)===!0||(null==s?void 0:s.paid)===!0,eh="course_chapter_class"===X?!!((null==H?void 0:H.classes)&&H.classes.length>0&&H.classes.every(e=>!0===e.paid)):!!((null==H?void 0:H.paid)===!0||(null==H?void 0:H.classes)&&H.classes.length>0&&H.classes.every(e=>!0===e.paid)),ex=(null==s?void 0:s.paid)===!0,ey="course_chapter_class"===X&&null!=K&&!ep&&el>0,ef=("course_chapter"===X||"course_chapter_class"===X)&&null!=H&&!eh&&et>0,ev=null!=s&&!ex&&ed>0,eg=ey?"class":ef?"chapter":"course",eb=[];ef&&"class"===eg&&eb.push("chapter"),ev&&("class"===eg||"chapter"===eg)&&eb.push("course");let ej=1+eb.length;return(0,C.L)(()=>{if(!B.current)return;let e=N.Ay.timeline();e.to(".upsell-card",{opacity:1,y:0,scale:1,duration:.6,stagger:.1,ease:"back.out(1.5)",clearProps:"transform"}),e.to(".upsell-card-highlight",{y:-10,duration:3.2,ease:"power2.inOut",yoyo:!0,repeat:-1,force3D:!0},"-=0.2")},{dependencies:[ej],scope:B}),(0,a.jsxs)("div",{ref:B,className:"w-full flex flex-col items-center py-2",children:[(()=>{var e,r;let t="",c=0,i=0,f={},v=null,g=null,b=null,j=null;"class"===eg?(t=(null==K?void 0:K.title)||M("class"),c=el,i=Number(null==K?void 0:K.id),f={title:t,image:null==s?void 0:s.preview_image,price:c,slug:"class-".concat(i),course_id:null==s?void 0:s.id,chapter_id:(null==H?void 0:H.id)||l,class_id:i},v=(null==K?void 0:K.start_at)||(null==K?void 0:K.start_time)||null,g=(null==K?void 0:K.end_time)||null,b=(null==K?void 0:K.class_watching_limit)||null,j=(null==K?void 0:K.class_open_days)||null):"chapter"===eg?(t=(null==H?void 0:H.chapter_name)||M("chapter"),c=et,i=Number(null==H?void 0:H.id),f={title:t,image:null==s?void 0:s.preview_image,price:c,slug:"chapter-".concat(i),course_id:null==s?void 0:s.id,chapter_id:i}):(t=(null==s?void 0:s.title)||M("course"),c=ed,i=Number(null==s?void 0:s.id),f={title:t,image:null==s?void 0:s.preview_image,price:c,offer_price:en,slug:null==s?void 0:s.slug,course_id:i});let w=eu(eg,i),N=T&&(null==W?void 0:W.itemId)===i&&(null==W?void 0:W.itemType)===("course"===eg?"course_id":"chapter"===eg?"chapter_id":"class_id"),C=null==G||null==(e=G.cart)?void 0:e.find(e=>"course"===eg?e.course_id===i&&!e.class_id&&!e.chapter_id:"chapter"===eg?e.chapter_id===i&&!e.class_id:"class"===eg&&e.class_id===i),S=J&&L===(null==C?void 0:C.id);return(0,a.jsxs)("div",{className:"upsell-card bg-dashboard-card rounded-4xl p-6 sm:px-8 sm:py-6 flex flex-col items-center border premium-shadow border-white/5 relative z-10 w-full max-w-2xl mx-auto",style:{opacity:0,transform:"translateY(30px) scale(0.95)"},children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-full bg-dynamic-primary-500 text-white flex items-center justify-center mb-4 shadow-xl shadow-dynamic-primary-500/30",children:(0,a.jsx)(d.A,{className:"w-7 h-7"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-dynamic-secondary-500 mb-2 text-center",children:M("purchaseRequiredToWatch")}),(0,a.jsx)("p",{className:"text-gray-400 text-center mb-6 text-sm font-medium",children:t}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 w-full mb-6",children:[(0,a.jsxs)("div",{className:"bg-dynamic-secondary-500/5 rounded-2xl p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:M("validity")}),(0,a.jsx)("p",{className:"font-bold text-dynamic-secondary-500",children:j?"".concat(j," ").concat(M("days")):""})]}),(0,a.jsx)(o.A,{className:"w-5 h-5 text-gray-400"})]}),(0,a.jsxs)("div",{className:"bg-dynamic-secondary-500/5 rounded-2xl p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:M("maxViews")}),(0,a.jsx)("p",{className:"font-bold text-dynamic-secondary-500",children:b?"".concat(b," ").concat(M("times")):""})]}),(0,a.jsx)(u.A,{className:"w-5 h-5 text-gray-400"})]}),(0,a.jsxs)("div",{className:"bg-dynamic-secondary-500/5 rounded-2xl p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:M("startDate")}),(0,a.jsx)("p",{className:"font-bold text-dynamic-secondary-500",children:v?new Date(v).toLocaleDateString(F):""})]}),(0,a.jsx)(m.A,{className:"w-5 h-5 text-gray-400"})]}),(0,a.jsxs)("div",{className:"bg-dynamic-secondary-500/5 rounded-2xl p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:M("endDate")}),(0,a.jsx)("p",{className:"font-bold text-dynamic-secondary-500",children:g?new Date(g).toLocaleDateString(F):""})]}),(0,a.jsx)(m.A,{className:"w-5 h-5 text-gray-400"})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 w-full mb-6",children:[(0,a.jsx)("span",{className:"text-gray-400 text-sm",children:M("itemPrice")}),(0,a.jsxs)("span",{className:"text-dynamic-primary-500 font-black text-2xl flex items-baseline gap-1",children:[c," ",(0,a.jsx)("span",{className:"text-sm",dir:"ltr",children:(null==E?void 0:E.
1currency)==="EG"||(null==E?void 0:E.currency)==="EGP"?M("priceCurrency"):null==E?void 0:E.currency})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 w-full",children:[(null==E||null==(r=E.purchase_options)?void 0:r.show_carts)!==0&&(w?(0,a.jsxs)("div",{className:"flex-1 flex gap-2 w-full",children:[(0,a.jsxs)(n.$,{onClick:()=>U(eg),className:"flex-1 bg-[#4caf50]/10 text-[#4caf50] hover:bg-[#4caf50]/20 h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,a.jsx)(h.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:M("goToCheckout")})]}),(0,a.jsx)(n.$,{onClick:()=>em(eg,i,f),disabled:S,className:"w-12 bg-red-500/10 text-red-500 hover:bg-red-500/20 h-12 rounded-xl transition-all flex items-center justify-center shrink-0",title:M("removeFromCart"),children:S?(0,a.jsx)(p.A,{className:"w-5 h-5 animate-spin shrink-0"}):(0,a.jsx)(x.A,{className:"w-5 h-5 shrink-0",strokeWidth:2.5})})]}):(0,a.jsxs)(n.$,{onClick:()=>em(eg,i,f),disabled:N,className:"flex-1 h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 bg-dynamic-primary-500 hover:bg-dynamic-primary-600 text-white shadow-lg shadow-dynamic-primary-500/20",children:[N?(0,a.jsx)(p.A,{className:"w-5 h-5 animate-spin"}):(0,a.jsx)(h.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:M("addToCart")})]})),D&&(Y?(0,a.jsxs)(n.$,{variant:"outline",onClick:()=>null==D?void 0:D(eg,i,{title:t,price:c}),className:"flex-1 h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 border-dynamic-primary-500 text-dynamic-primary-500 hover:bg-dynamic-primary-500/5 cursor-pointer text-center",children:[(0,a.jsx)(y.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:"course"===eg?M("buyCourseViaCoupon"):"chapter"===eg?M("buyChapterViaCoupon"):M("buyViaCoupon")})]}):(0,a.jsxs)(_.N_,{href:z,className:"flex-1 h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 border border-dynamic-primary-500 text-dynamic-primary-500 hover:bg-dynamic-primary-500/5 cursor-pointer text-center text-sm",children:[(0,a.jsx)(y.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:"course"===eg?M("buyCourseViaCoupon"):"chapter"===eg?M("buyChapterViaCoupon"):M("buyViaCoupon")})]}))]})]})})(),eb.length>0&&(0,a.jsx)("div",{className:"w-full mt-4 flex flex-col gap-4",children:eb.map(e=>(e=>{var l,r,t,c;let i="",d=0,o=0,u=0,m={},j="course"===e,w=j?M("bestValue"):M("recommended");"chapter"===e?(i=(null==H?void 0:H.chapter_name)||M("chapter"),d=et,o=ec>et?ec:et,u=Number(null==H?void 0:H.id),m={title:i,image:null==s?void 0:s.preview_image,price:d,slug:"chapter-".concat(u),course_id:null==s?void 0:s.id,chapter_id:u}):(i=(null==s?void 0:s.title)||M("course"),d=ed,o=eo>ed?eo:ei>ed?ei:ed,u=Number(null==s?void 0:s.id),m={title:i,image:null==s?void 0:s.preview_image,price:d,offer_price:en,slug:null==s?void 0:s.slug,course_id:u});let N=o>d?Math.round((o-d)/o*100):0,C=eu(e,u),S=T&&(null==W?void 0:W.itemId)===u&&(null==W?void 0:W.itemType)===("course"===e?"course_id":"chapter_id"),A=null==G||null==(l=G.cart)?void 0:l.find(s=>"course"===e?s.course_id===u&&!s.class_id&&!s.chapter_id:"chapter"===e&&s.chapter_id===u&&!s.class_id),I=J&&L===(null==A?void 0:A.id),k=[];if("course"===e&&(null==s||null==(t=s.course_type)||null==(r=t.recorded)?void 0:r.chapter)){let e=s.course_type.recorded.chapter.length,l=s.course_type.recorded.chapter.reduce((e,s)=>{var l;return e+((null==(l=s.classes)?void 0:l.length)||0)},0);e>0&&k.push({icon:(0,a.jsx)(f.A,{className:"w-4 h-4"}),text:"".concat(e," ").concat(M("fullChapters"))}),l>0&&k.push({icon:(0,a.jsx)(v.A,{className:"w-4 h-4"}),text:"".concat(l," ").concat(M("integratedLectures"))}),k.push({icon:(0,a.jsx)(g.A,{className:"w-4 h-4"}),text:M("completionCertificate")})}else if("chapter"===e&&(null==H?void 0:H.classes)){let e=H.classes.length;e>0&&k.push({icon:(0,a.jsx)(v.A,{className:"w-4 h-4"}),text:"".concat(e," ").concat(M("integratedLectures"))})}let V=(0,a.jsxs)("div",{style:{opacity:0,transform:"translateY(30px) scale(0.95)"},className:(0,b.cn)("upsell-card relative flex flex-col bg-dashboard-card rounded-4xl border premium-shadow overflow-hidden group/upsell-card transition-all duration-300 w-full max-w-4xl mx-auto p-6 sm:p-8 mt-6 pt-10",j?"border-dynamic-primary-500 shadow-xl shadow-dynamic-primary-500/20":"border-dynamic-secondary-500/20"),children:[(0,a.jsxs)("div",{className:(0,b.cn)("absolute top-0 left-1/2 -translate-x-1/2 px-4 py-1.5 rounded-b-xl text-white text-xs font-bold flex items-center gap-2 shadow-md bg-dynamic-primary-500"),children:[j&&(0,a.jsx)(g.A,{className:"w-4 h-4"}),w]}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center md:items-start text-center md:text-start w-full",children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-dynamic-secondary-500 mb-1",children:"course"===e?M("saveMoreBuyingFullCourse"):M("openFullChapter")}),(0,a.jsx)("p",{className:"text-gray-400 text-sm mb-4",children:i}),k.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-4 mb-6",children:k.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-dynamic-secondary-500",children:[(0,a.jsx)("div",{className:"text-dynamic-primary-500",children:e.icon}),(0,a.jsx)("span",{children:e.text})]},s))}),(0,a.jsxs)("div",{className:"flex items-center justify-center md:justify-start gap-2 w-full",children:[(0,a.jsx)("span",{className:"text-gray-400 text-sm",children:M("itemPrice",{defaultValue:"السعر:"})}),(0,a.jsxs)("span",{className:"text-dynamic-primary-500 font-black text-2xl flex items-baseline gap-1",children:[d," ",(0,a.jsx)("span",{className:"text-sm",dir:"ltr",children:(null==E?void 0:E.
1currency)==="EG"||(null==E?void 0:E.currency)==="EGP"?M("priceCurrency"):null==E?void 0:E.currency})]}),N>0&&(0,a.jsx)("span",{className:"mr-3 bg-dynamic-primary-500/10 text-dynamic-primary-500 text-xs font-bold px-3 py-1 rounded-full border border-dynamic-primary-500/20",children:M("savePercentage",{percentage:N})||"وفر ".concat(N,"%")})]})]}),(0,a.jsxs)("div",{className:"w-full md:w-auto flex flex-col sm:flex-row md:flex-col gap-3 min-w-50",children:[(null==E||null==(c=E.purchase_options)?void 0:c.show_carts)!==0&&(C?(0,a.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,a.jsxs)(n.$,{onClick:()=>U(e),className:"flex-1 bg-[#4caf50]/10 text-[#4caf50] hover:bg-[#4caf50]/20 h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,a.jsx)(h.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:M("goToCheckout")})]}),(0,a.jsx)(n.$,{onClick:()=>em(e,u,m),disabled:I,className:"w-12 bg-red-500/10 text-red-500 hover:bg-red-500/20 h-12 rounded-xl transition-all flex items-center justify-center shrink-0",children:I?(0,a.jsx)(p.A,{className:"w-5 h-5 animate-spin shrink-0"}):(0,a.jsx)(x.A,{className:"w-5 h-5 shrink-0",strokeWidth:2.5})})]}):(0,a.jsxs)(n.$,{onClick:()=>em(e,u,m),disabled:S,className:"w-full h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 bg-dynamic-primary-500 hover:bg-dynamic-primary-600 text-white shadow-lg shadow-dynamic-primary-500/20",children:[S?(0,a.jsx)(p.A,{className:"w-5 h-5 animate-spin"}):(0,a.jsx)(h.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:M("addToCart")})]})),D&&(Y?(0,a.jsxs)(n.$,{variant:"outline",onClick:()=>null==D?void 0:D(e,u,{title:i,price:d}),className:"w-full h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 border-dynamic-primary-500 text-dynamic-primary-500 hover:bg-dynamic-primary-500/5 cursor-pointer text-center",children:[(0,a.jsx)(y.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:"course"===e?M("buyCourseViaCoupon"):M("buyChapterViaCoupon")})]}):(0,a.jsxs)(_.N_,{href:z,className:"w-full h-12 rounded-xl font-bold transition-all flex items-center justify-center gap-2 border border-dynamic-primary-500 text-dynamic-primary-500 hover:bg-dynamic-primary-500/5 cursor-pointer text-center text-sm",children:[(0,a.jsx)(y.A,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:"course"===e?M("buyCourseViaCoupon"):M("buyChapterViaCoupon")})]}))]})]})]});return j?(0,a.jsx)("div",{className:"upsell-card-highlight will-change-transform w-full",children:V},e):(0,a.jsx)("div",{className:"w-full",children:V},e)})(e))})]})}},96486:(e,s,l)=>{l.d(s,{A_:()=>r,Z0:()=>t,lD:()=>c});let a="vclasses_chapter_class_course_map";function r(e,s){if(!s)return null;try{var l,r;let t=localStorage.getItem(a);if(!t)return null;let c=JSON.parse(t),i=s.toString();if("chapter"===e&&(null==(l=c.chapters)?void 0:l[i]))return c.chapters[i];if("class"===e&&(null==(r=c.classes)?void 0:r[i]))return c.classes[i]}catch(e){console.error("Error reading course item map:",e)}return null}function t(e){if(null==e?void 0:e.id)try{var s,l,r;let t=localStorage.getItem(a),c=t?JSON.parse(t):{chapters:{},classes:{}};c.chapters||(c.chapters={}),c.classes||(c.classes={});let i=e.id,n=e.slug;for(let a of e.chapter||(null==(l=e.course_type)||null==(s=l.recorded)?void 0:s.chapter)||[])if((null==a?void 0:a.id)&&(c.chapters[a.id.toString()]={courseId:i,slug:n,chapterId:a.id}),(null==a?void 0:a.classes)&&Array.isArray(a.classes))for(let e of a.classes)(null==e?void 0:e.id)&&(c.classes[e.id.toString()]={courseId:i,slug:n,chapterId:a.id||e.chapter_id});if(e.classes&&Array.isArray(e.classes))for(let s of e.classes)(null==s?void 0:s.id)&&(c.classes[s.id.toString()]={courseId:i,slug:n,chapterId:s.chapter_id||(null==(r=s.chapter)?void 0:r.id)});localStorage.setItem(a,JSON.stringify(c))}catch(e){console.error("Error saving course item map:",e)}}function c(e){if(e.id&&e.courseId)try{let s=localStorage.getItem(a),l=s?JSON.parse(s):{chapters:{},classes:{}};l.chapters||(l.chapters={}),l.classes||(l.classes={});let r=e.id.toString();"chapter"===e.type?l.chapters[r]={courseId:e.courseId,slug:e.slug,chapterId:e.id}:"class"===e.type&&(l.classes[r]={courseId:e.courseId,slug:e.slug,chapterId:e.chapterId}),localStorage.setItem(a,JSON.stringify(l))}catch(e){console.error("Error saving specific item map:",e)}}}}]);

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.