PageSourceSearch

https://assets.medicalnewstoday.com/_next/felib-async-features-recipe-card-dc5114dc.js

js medicalnewstoday.com collected 2026-10-01 07:41:16 UTC 9,200 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[7352],{43540(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.canAddRecipeToPlan=function(e){return Boolean(e.postId)&&Boolean(e.nutrition)&&Array.isArray(e.ingredients)&&e.ingredients.length>0},t.RecipeCard=function({title:e,image:t,tags:a=[],time:i,rating:o,callToAction:l,callToActionURL:c,ctaClickEvent:d,elementClickEvent:g,children:E,onTouchStart:L,onTouchMove:z,onTouchEnd:W,badge:N,variant:M,nutrition:$,onAddToPlan:U}){var K,V,q;const G=(0,x.useTheme)(),J=null!=M?M:"default",Q=G.features.RecipeCard.variant[J],X="catalog"===J&&!!U,Y=g?{actionOutcome:null!==(K=g.actionOutcome)&&void 0!==K?K:"INTERNALLINK",outboundUrl:c,elementType:null!==(V=g.elementType)&&void 0!==V?V:"LINK",location:null!==(q=g.location)&&void 0!==q?q:"Resource Center - Recipes",name:g.name,position:g.position,text:e,viewCorrelationId:g.viewCorrelationId}:void 0,Z=a.slice(0,2),ee=(0,n.jsx)(y,{children:Z.map((e,t)=>(0,n.jsxs)(h.Fragment,{children:[(0,n.jsx)(k,{variant:J,children:e}),t!==Z.length-1&&(0,n.jsx)(s.Divider,{variant:"dot"})]},e))}),te=i||o?(0,n.jsxs)(C,{children:[i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D,{height:16,width:16}),(0,n.jsx)(A,{children:i})," "]}),o&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Divider,{variant:Q.metaDividerVariant}),(0,n.jsx)(P,{height:16,width:16}),o,"tiger"===J?"/5":" / 5"]})]}):null,ae=[];(null==$?void 0:$.carbs)&&ae.push({label:"Carbs",value:$.carbs});(null==$?void 0:$.fats)&&ae.push({label:"Fats",value:$.fats});(null==$?void 0:$.protein)&&ae.push({label:"Protein",value:$.protein});const ie=$&&"catalog"===J&&ae.length>0?(0,n.jsx)(F,{children:ae.map((e,t)=>(0,n.jsxs)(h.Fragment,{children:[t>0&&(0,n.jsx)(_,{}),(0,n.jsxs)(I,{children:[(0,n.jsx)(T,{children:e.label}),(0,n.jsx)(H,{children:e.value})]})]},e.label))}):null,ne=X?(0,n.jsxs)(B,{type:"button","data-add-to-plan":!0,"data-testid":"recipe-card-add-to-plan","aria-label":`Add to meal plan: ${e}`,onClick:e=>{e.stopPropagation(),null==U||U()},children:["Add to meal plan",(0,n.jsx)(r.default,{width:10,height:10,"aria-hidden":"true"})]}):null,oe=(0,n.jsxs)(n.Fragment,{children:[N&&(0,n.jsx)(v,{children:N}),(0,n.jsx)(b,{variant:J,src:t,loading:"lazy",alt:`Recipe image for ${e}`}),(0,n.jsxs)(j,{variant:J,children:[(0,n.jsx)(O,{children:"catalog"===J?(0,n.jsxs)(n.Fragment,{children:[(a.length>0||i)&&(0,n.jsxs)(S,{children:[ee,te]}),(0,n.jsx)(w,{variant:J,children:e})]}):(0,n.jsxs)(n.Fragment,{children:[a&&"collection"!==J&&ee,(0,n.jsx)(w,{variant:J,children:e})]})}),(0,n.jsxs)(R,{children:["catalog"!==J&&"collection"!==J&&te,ie,l&&(Y?(0,n.jsx)(p.InternalLink,{"data-testid":"recipe-card-default",role:"link",isButton:!0,color:"primary",href:c,event:Y,target:"_blank",style:Object.assign(Object.assign({},Q.ctaButton),{position:"relative",zIndex:2}),children:l}):(0,n.jsx)(p.ProductLink,{"data-testid":"recipe-card-default",role:"link",isButton:!0,color:"primary",href:c,event:Object.assign({},d),target:"_blank",style:Object.assign(Object.assign({},Q.ctaButton),{position:"relative",zIndex:2}),children:l}))]})]}),ne]});return(0,n.jsx)(u,{variant:J,href:c,event:Object.assign({},d),elementClickEvent:Y,ariaLabel:`View recipe: ${e}`,children:(0,n.jsx)(f,{onPointerDown:L,onPointerMove:z,onPointerUp:W,variant:J,children:(0,n.jsx)(m,{variant:J,children:E||oe})})})};const n=a(74848),o=i(a(33804)),l=i(a(60998)),r=i(a(86662)),c=i(a(68978)),s=a(53367),d=a(27691),p=a(37923),g=a(70261),x=a(17437),h=a(96540),u=(0,o.default)(d.ClickableCard)(({theme:e,variant:t})=>Object.assign(Object.assign(Object.assign({},"catalog"===t&&{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column","&:hover:not(:has([data-add-to-plan]:hover))":{color:e.colors.cyanDark,"& *":{color:`${e.colors.cyanDark} !important`},"& img":{opacity:.8},"& [data-add-to-plan], & [data-add-to-plan] *":{color:`${g.commonColors.white} !important`}}}),"collection"===t&&{"&:hover > div":{background:"linear-gradient(180deg, #E4EBE5 53.21%, #BFE1E7 99.85%)"}}),{"@media desktop":{cursor:"pointer",width:"catalog"===t?"100%":"fit-content","&:hover > div":{boxShadow:"catalog"===t?"none":"0 0 12px 0 rgba(0, 0, 0, 0.25)"}}})),f=o.default.div(({theme:e,variant:t})=>Object.assign(Object.assign({},e.features.RecipeCard.wrapper),{touchAction:"manipulation",pointerEvents:"auto",width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:g.commonColors.white,flexShrink:"catalog"===t?1:0,flex:"catalog"===t?1:void 0,minHeight:"catalog"===t?0:void 0,textAlign:"left",overflow:"clip",borderLeft:"none",border:"none",maxWidth:"catalog"===t?"none":"275px",position:"relative",borderRadius:e.features.RecipeCard.variant[t].borderRadius})),m=o.default.div(({variant:e})=>({display:"flex",flexDirection:"column",justifyContent:"catalog"===e?"flex-start":"space-between",width:"100%",flex:1,minHeight:0,gap:"16px"})),v=o.default.span(({theme:e})=>Object.assign(Object.assign({},e.typography.whisper.regular),{position:"absolute",top:"8px",left:"8px",display:"inline-block",borderRadius:"8px",padding:"8px 12px",backgroundColor:e.colors.gold,color:g.commonColors.textBlack})),b=o.default.img(({variant:e})=>Object.assign(Object.assign({width:"100%",flexShrink:0},"catalog"===e?{aspectRatio:"257 / 185",height:"auto",maxHeight:"none"}:"collection"===e?{height:"110px",maxHeight:"110px",objectFit:"cover"}
1:{height:"166px",maxHeight:"166px",objectFit:"cover"}),{objectFit:"cover",borderRadius:"catalog"===e?"18px":"0px"})),j=o.default.div(({variant:e})=>({display:"flex",flexDirection:"column",justifyContent:"catalog"===e?"flex-start":"space-between",padding:"catalog"===e?"0":"0 16px 16px 16px",width:"100%",flex:1,minHeight:0,gap:"catalog"===e?"12px":"4px"})),y=o.default.div(()=>({display:"flex",alignItems:"center",flexShrink:1,minWidth:0,height:"12px",fontSize:"12px",fontStyle:"normal",fontWeight:700,overflow:"hidden"})),k=o.default.p(({theme:e,variant:t})=>Object.assign(Object.assign({},e.features.RecipeCard.variant[t].tag),{whiteSpace:"nowrap",color:"tiger"===t?e.colors.grayMedium:e.features.RecipeCard.variant[t].tag.color,letterSpacing:"catalog"===t?"0":e.features.RecipeCard.variant[t].tag.letterSpacing,textTransform:"catalog"===t?"none":"tiger"===t?"lowercase":"uppercase"})),w=o.default.div(({theme:e,variant:t})=>Object.assign(Object.assign(Object.assign({},e.typography.contentListingTitle.small.mobile),{position:"relative",color:g.commonColors.textBlack,whiteSpace:"normal",wordBreak:"break-word",display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:3}),"collection"===t&&{fontFamily:"Proxima Nova Condensed",fontSize:"20px",fontStyle:"normal",fontWeight:700,lineHeight:"20px"})),C=o.default.div({display:"flex",alignItems:"center",color:g.commonColors.textBlack,flexShrink:0,whiteSpace:"nowrap",height:"12px"}),O=o.default.div({display:"flex",flexDirection:"column",gap:"8px",flexShrink:0}),S=o.default.div({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",width:"100%"}),R=o.default.div({display:"flex",flexDirection:"column",gap:"12px",flexShrink:0}),B=o.default.button(({theme:e})=>Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",width:"100%",flexShrink:0,minHeight:"28px",padding:"4px 12px",border:"none",borderRadius:"21px",backgroundColor:e.colors.cyan,color:g.commonColors.white,cursor:"pointer",transition:"background-color 0.2s ease"},e.typography.smallText.text),{position:"relative",zIndex:2,"&:hover":{backgroundColor:e.colors.cyanDark},"&:focus-visible":{outline:`2px solid ${e.colors.cyanDark}`,outlineOffset:"2px"}})),D=(0,o.default)(l.default)({margin:"0 6px 0 0"}),P=(0,o.default)(c.default)({margin:"0 5px 2px 5px"}),F=o.default.div({display:"flex",alignItems:"stretch",gap:"0"}),I=o.default.div({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px",padding:"0 12px","&:first-of-type":{paddingLeft:"0"},"&:last-of-type":{paddingRight:"0"}}),_=o.default.div({width:"1px",alignSelf:"stretch",backgroundColor:g.commonColors.gray,flexShrink:0}),T=o.default.span({fontFamily:"Proxima Nova",fontSize:"12px",fontStyle:"normal",fontWeight:700,lineHeight:"16px",color:g.commonColors.textBlack}),H=o.default.span({fontFamily:"Proxima Nova",fontSize:"12px",fontStyle:"normal",fontWeight:400,lineHeight:"16px",color:g.commonColors.textBlack}),A=o.default.span({fontFamily:"Proxima Nova Condensed",fontSize:"12px",fontStyle:"normal",fontWeight:700,lineHeight:"12px",color:g.commonColors.textBlack})},95226(e,t,a){var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){void 0===i&&(i=a);var n=Object.getOwnPropertyDescriptor(t,a);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,i,n)}:function(e,t,a,i){void 0===i&&(i=a),e[i]=t[a]}),n=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||i(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),n(a(43540),t)}}]);
2//# sourceMappingURL=felib-async-features-recipe-card-dc5114dc.js.map

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.