PageSourceSearch

https://learn.uniklife.com/_next/static/chunks/7026.963009aa89e95399.js

js uniklife.com collected 2026-10-02 01:48:03 UTC 7,857 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7026],{7026:function(e,l,i){i.r(l),i.d(l,{UpsellBox:function(){return N},default:function(){return C}});var n=i(9268);i(6232);var o=i(6006),t=i(2577),d=i(8404),r=i(2147);let s=new Set(["address","article","aside","blockquote","br","dd","div","dl","dt","figure","footer","h1","h2","h3","h4","h5","h6","header","hr","li","main","nav","ol","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul"]),u=e=>{let l=e=>e.map(e=>{var i;if("text"===e.type)return null!==(i=e.data)&&void 0!==i?i:"";if(!e.name||"script"===e.name||"style"===e.name)return"";let n=e.children?l(e.children):"";return s.has(e.name)?" ".concat(n," "):n}).join("");return l((0,d.AG)(e)).replace(/\s+/g," ").trim()};var a=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,[i,n]=(0,o.useState)(!1),t=(0,o.useCallback)(()=>n(e=>!e),[]),{preview:d,isTruncatable:r}=(0,o.useMemo)(()=>{let i=Array.from(u(null!=e?e:""));return{preview:"".concat(i.slice(0,l).join("").trimEnd(),"..."),isTruncatable:i.length>l}},[e,l]);return{preview:d,isTruncatable:r,isExpanded:i,isCollapsed:r&&!i,toggle:t}},c=i(639),v=i(504),m=i(153);let x={"BEST SELLER":{bg:"#FBEED9",ink:"#8A5A04"},POPULAR:{bg:"#FDEAE0",ink:"#C2490A"},"ADD-ON":{bg:"#E9E6E1",ink:"#5C554E"},"BEST DEAL":{bg:"#DCF2E3",ink:"#1C6B3C"},LIMITED:{bg:"#FBEED9",ink:"#8A5A04"}},f={bg:"#E9E6E1",ink:"#5C554E"},p=e=>{var l;let{label:i}=e,o=null==i?void 0:i.trim();if(!o)return null;let{bg:t,ink:d}=null!==(l=x[o.toUpperCase()])&&void 0!==l?l:f;return(0,n.jsx)("span",{className:"shrink-0 rounded-full px-[6px] py-[1px] text-[10px] font-bold leading-[1.5] tracking-[0.05em] font-[Inter]",style:{backgroundColor:t,color:d},children:o})},b={backgroundColor:"#ffffff",borderColor:"#e6e9f2",borderStyle:"solid",borderWidth:0,borderRadius:12},h=e=>{var l;let{mangoData:i,selectedCurrency:t,setAddedMangoList:s,addedMangoList:u,newUpsellData:x,primaryMangoData:f,creatorData:h,upsellGstExempt:g}=e,[E,N]=(0,o.useState)(!1),[C,j]=(0,o.useState)(""),D=(0,m.Vl)((0,m.QS)(f,h)),[y,k]=(0,o.useState)(b),w=(0,o.useMemo)(()=>{let e=(e,l)=>"number"==typeof l&&l<e?l:e;return{INR:e((0,c.yD)("INR",i),null==x?void 0:x.upsellDiscountedPriceInr),USD:e((0,c.yD)("USD",i),null==x?void 0:x.upsellDiscountedPriceUsd),EUR:e((0,c.yD)("EUR",i),null==x?void 0:x.upsellDiscountedPriceEur)}},[i,x]),S=(0,o.useMemo)(()=>({...i,preDiscount:w.INR,inrAmount:w.INR,INR:w.INR,usdAmount:w.USD,USD:w.USD,eurAmount:w.EUR,EUR:w.EUR}),[i,w]),R=()=>{s(e=>e.filter(e=>(null==e?void 0:e._id)!==(null==i?void 0:i._id)))},A=()=>{s(e=>e[0]?[...e,S]:[S])},I=(0,o.useMemo)(()=>{let e=null;if(x&&(null==x?void 0:x.newCoverImage))e=null==x?void 0:x.newCoverImage;else{var l,o;e=(null==i?void 0:null===(l=i.additionalCoverContent)||void 0===l?void 0:null===(o=l.find)||void 0===o?void 0:o.call(l,e=>!(0,v.g9)(e)))||(null==i?void 0:i.imgUrl)||null}return"string"==typeof e?(0,n.jsx)("div",{className:"w-full shrink-0",children:(0,n.jsx)("div",{className:"aspect-video relative overflow-hidden rounded-md",children:(0,n.jsx)("img",{src:e,alt:"",className:"absolute inset-0 w-full h-full object-cover object-center"})})}):null},[null==i?void 0:i.additionalCoverContent,null==i?void 0:i.imgUrl,x]),U=(0,o.useMemo)(()=>null!==(l=(null==x?void 0:x.newDescription)||(null==i?void 0:i.styledDescription)||(null==i?void 0:i.description))&&void 0!==l?l:"",[null==x?void 0:x.newDescription,null==i?void 0:i.styledDescription,null==i?void 0:i.description]),_=a(U),M=(0,o.useMemo)(()=>{var e;let l=(0,c.yD)(t,i),n=null!==(e=w[t])&&void 0!==e?e:l,o=!!(null==f?void 0:f.includegst)&&!g,d=e=>o&&(null==f?void 0:f.isPriceIncludedGst)?e*D:e;return{charged:d(n).toFixed(2),strike:n<l?d(l).toFixed(2):null,gstCaption:o?(null==f?void 0:f.isPriceIncludedGst)?"incl. GST":"excl. GST":null}},[t,i,w,g,null==f?void 0:f.includegst,null==f?void 0:f.isPriceIncludedGst,D]);return(0,o.useEffect)(()=>{if(window){var e;j(null==window?void 0:null===(e=window.location)||void 0===e?void 0:e.origin)}},[]),(0,o.useEffect)(()=>{N(u.some(e=>(null==e?void 0:e._id)===(null==i?void 0:i._id)))},[u,null==i?void 0:i._id]),(0,o.useEffect)(()=>{let e={backgroundColor:null==x?void 0:x.backgroundColor,borderColor:null==x?void 0:x.borderColor,borderStyle:null==x?void 0:x.borderStyle,borderWidth:null==x?void 0:x.borderWidth,borderRadius:null==x?void 0:x.corner};k(e)},[x]),(0,n.jsxs)("div",{className:"bg-white border-[1px] border-[#e6e9f2] rounded-[6px] shadow-sm overflow-hidden",style:{borderRadius:Number(null==y?void 0:y.borderRadius),borderStyle:null==y?void 0:y.borderStyle,borderWidth:Number(null==y?void 0:y.borderWidth),borderColor:null==y?void 0:y.borderColor,backgroundColor:null==y?void 0:y.backgroundColor,borderTopLeftRadius:Number(null==y?void 0:y.borderRadius),borderTopRightRadius:Number(null==y?void 0:y.borderRadius)},children:[(null==x?void 0:x.upsellNote)&&(0,n.jsx)("div",{className:"px-3 py-[6px] bg-[#FDEAE0] text-[#C2490A] text-xs font-semibold truncate",children:null==x?void 0:x.upsellNote}),(0,n.jsxs)("div",{className:"flex justify-between items-start gap-x-2 p-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-x-2 min-w-0",children:[(0,n.jsx)("input",{type:"checkbox",className:"shrink-0",checked:E,onChange:()=>{E?R():A()}}),(0,n.jsxs)("div",{className:"flex items-center gap-x-2 min-w-0",children:[(0,n.jsx)("span",{className:"text-[#3f3f3f] text-base font-medium truncate",children:(null==x?void 0:x.newTitle)||(null==i?void 0:i.title)}),(0,n.jsx)(p,{label:null==x?void 0:x.pillBadge})]})]}),(0,n.jsxs)("div",{className:"flex flex-col items-end shrink-0",children:[M.strike?(0,n.jsxs)("div",{className:"text-[#8
1c8c8c] text-sm font-medium line-through",children:[(0,c.jK)(t),M.strike]}):null,(0,n.jsxs)("div",{className:"text-[#3f3f3f] text-base font-medium",children:[(0,c.jK)(t),M.charged]}),M.gstCaption?(0,n.jsx)("div",{className:"text-[#8c8c8c] text-[10px] leading-tight",children:M.gstCaption}):null]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-4 p-2",children:[I,(0,n.jsx)("div",{className:"".concat(I?"col-span-2":"col-span-3"," flex flex-col gap-y-2 overflow-hidden"),children:!!U&&(0,n.jsx)("div",{className:"flex flex-col gap-y-2 font-[Inter] text-sm text-[#3f3f3f]",children:_.isCollapsed?(0,n.jsxs)("p",{children:[_.preview," ",(0,n.jsx)("button",{type:"button",className:"align-baseline text-xs font-semibold text-[#2b4dc7]",onClick:_.toggle,children:"See more"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Z,{children:(0,d.ZP)(U)}),_.isTruncatable&&(0,n.jsx)("button",{type:"button",className:"self-start text-xs font-semibold text-[#2b4dc7]",onClick:_.toggle,children:"See less"})]})})})]})]})},g=o.memo(h),E=e=>{let{state:l,dispatch:i}=e,{mangoData:d,selectedCurrency:r,isCouponApplied:s,appliedCouponCodeData:u,creatorData:a,addedMangoList:c,upsellMangoPurchaseStatus:v,upsellGstExempt:m}=l,x=null==d?void 0:d.additionalMangoes,f=null==d?void 0:d.upsellDetails,p=null==d?void 0:d.upsellTitle,b=(0,o.useCallback)(e=>{let l="function"==typeof e?e(null!=c?c:[]):e;i({type:t.uG.SET_ADDED_MANGO_LIST,payload:l})},[i,c]),h=(0,o.useMemo)(()=>{let e=new Map;return null==f||f.forEach(l=>{let{mango:i,...n}=l;(null==i?void 0:i._id)&&e.set(i._id,n)}),e},[f]),E=(0,o.useMemo)(()=>null==x?void 0:x.map(e=>v[null==e?void 0:e._id]?null:(0,n.jsx)(g,{mangoData:e,selectedCurrency:r,setAddedMangoList:b,addedMangoList:c,newUpsellData:h.get(null==e?void 0:e._id),primaryMangoData:d,creatorData:a,upsellGstExempt:m},null==e?void 0:e._id)),[x,h,v,r,b,c,d,a,m]);return d&&a?(0,n.jsx)("div",{className:"mb-8",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-[#050505] font-semibold mt-8 mb-2 font-['Poppins']",children:p||"Exclusive Offer"}),(0,n.jsx)("div",{className:"upsell-box flex flex-col gap-3",children:E})]})}):null},N=o.memo(E);var C=N}}]);

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.