1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([["cozy_mobile_components_promotionBanner_FeedBannerSwitch_tsx"],{
1"./cozy/data/selectors/PromotionSelectors.tsx":function(t,o,e){"use strict";e.d(o,{uG:function(){return i},NU:function(){return r},qz:function(){return a},Yk:function(){return s},v9:function(){return c},A2:function(){return l},$f:function(){return d},nz:function(){return p},TS:function(){return u},zs:function(){return m},f:function(){return x}});var n=e("./cozy/data/selectors/DataSelectors.tsx");const i=t=>(0,n.Bw)(t).promotionType,r=t=>null!=i(t),a=t=>(0,n.Bw)(t).feedPromotionSpec,s=t=>(0,n.Bw)(t).productPromotionSpec,c=t=>(0,n.Bw)(t).productBannerPromotionSpec,l=t=>(0,n.Bw)(t).splashPromotionSpec,d=t=>Boolean((0,n.Bw)(t).hasAttemptedToLoad),p=t=>{const{rotatingFeedBanners:o}=(0,n.Bw)(t);return o},u=t=>{const o=p(t);return Boolean(o&&o.length>1)},m=t=>(0,n.Bw)(t).fpiCartBannerSpec,x=t=>(0,n.Bw)(t).hasTopPromoModuleSpecs},
1"./cozy/mobile/components/promotionBanner/FeedBannerSwitch.tsx":function(t,o,e){"use strict";e.d(o,{Z:function(){return P}});var n=e("./node_modules/react-redux/es/index.js"),i=e("./node_modules/react-router/esm/react-router.js"),r=e("./cozy/data/selectors/PromotionSelectors.tsx"),a=e("./cozy/data/services/AnalyticsService.tsx"),s=e("./cozy/data/constants/PromotionConstants.tsx"),c=e("./cozy/mobile/components/promotionBanner/FeedPromotionBanner.tsx"),l=(e("./node_modules/core-js/modules/web.dom-collections.iterator.js"),e("./node_modules/react/index.js")),d=e("./cozy/coco/components/PromoCodeButton/PromoCodeButton.tsx"),p=e("./cozy/coco/components/PromoCodeButton/PromoCodeButtonConstants.tsx"),u=e("./cozy/mobile/styles/promotionBanner/PromotionBanner.tsx"),m=e("./cozy/routes/RouteGenerators.tsx"),x=e("./node_modules/react/jsx-runtime.js");function _(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}class g extends l.Component{constructor(){super(...arguments),_(this,"onClickPromotionCard",(()=>{(0,a.y)("CLICK_MSITE_ROTATING_FEED_PROMOTION_CARD")})),_(this,"onClickActionText",(()=>{(0,a.y)("CLICK_MSITE_ROTATING_FEED_ACTION_TEXT")})),_(this,"onClickCopyButton",(()=>{(0,a.y)("CLICK_MSITE_FEED_PROMO_COPY_BUTTON")}))}componentDidMount(){(0,a.y)("IMPRESSION_MSITE_HOME_BANNER")}render(){var t,o,e,n;const{promotionSpec:i}=this.props;return i?(0,x.jsxs)(u.F,{imageUrl:i.background_image_url,color:i.text_color,children:[i.expiry_text_spec&&(0,x.jsx)(u.VC,{color:i.expiry_text_spec.text_color,children:i.expiry_text_spec.text}),(0,x.jsxs)(u.Mb,{children:[(0,x.jsx)(u.Jw,{color:null===(t=i.title_text_spec)||void 0===t?void 0:t.text_color,children:null===(o=i.title_text_spec)||void 0===o?void 0:o.text}),(0,x.jsxs)(u.JT,{color:null===(e=i.subtitle_text_spec)||void 0===e?void 0:e.text_color,children:[null===(n=i.subtitle_text_spec)||void 0===n?void 0:n.text,i.promo_code&&i.promo_code.text&&(0,x.jsx)(d.Z,{size:p.DV.SMALL_BOLD,color:p.KN.LIGHT,promoCode:i.promo_code.text,overrideTextColor:i.promo_code.text_color,onClickButton:this.onClickCopyButton,overrideStyles:{margin:"0 0 0 5px"},withDashedBorder:!0})]}),i.action_text_spec&&i.filter_id&&(0,x.jsx)(u.zd,{to:(0,m.pR)(i.filter_id),color:i.action_text_spec.text_color,children:"".concat(i.action_text_spec.text," >")})]})]}):null}}var h=g,f=e("./cozy/coco/components/ItemCarousel/ItemCarousel.tsx"),y=e("./cozy/utils/logger/LogBannerImpression.tsx");const B={[s.$l.THEME_DARK]:f.XY.THEME_DARK,[s.$l.THEME_LIGHT]:f.XY.THEME_LIGHT};var S=(0,n.$j)((t=>({rotatingPromotion:(0,r.nz)(t)})))((t=>{let{rotatingPromotion:o}=t;const[e,n]=(0,l.useState)(!1),[i,r]=(0,l.useState)([]);return o&&o.length>1?(0,x.jsx)(u.nm,{onMouseEnter:()=>{n(!0)},onTouchStart:()=>{n(!0)},onMouseLeave:()=>{n(!1)},onTouchEnd:()=>{n(!1)},children:(0,x.jsx)(f.ZP,{entries:o.filter((t=>Boolean(t))).map((t=>(0,x.jsx)(c.Z,{promotionSpec:t,onClickCopyButton:()=>{(0,a.y)("CLICK_ROTATING_PROMO_FEED_COPY_BUTTON",{promo_name:null==t?void 0:t.promo_name})},onClickActionText:()=>{(0,a.y)("CLICK_PROMO_BANNER_FEED",{promo_name:null==t?void 0:t.promo_name})}}))),onScrollCallback:t=>{let{position:e,carouselLength:n}=t;!i[e]&&o&&o[e]&&((0,y.z)(o[e],{rotatingBanner:!0,position:e,carouselLength:n}),(t=>{const o=[...i];o[t]=!0,r(o)})(e))},overrideStyle:{padding:0},rotate:!0,withDot:!0,isSwipeable:!0,autoScroll:!e,dotThemes:o.map((t=>{let{promotion_theme:o=s.$l.THEME_LIGHT}=t;return B[o]}))})}):null})),C=e("./cozy/shared/components/promotionBanner/HorizontalCards.tsx"),z=e("./cozy/routes/RouteTesters.tsx"),P=(0,n.$j)((t=>({promotionType:(0,r.uG)(t),promotionSpec:(0,r.qz)(t),productPromotionSpec:(0,r.Yk)(t),shouldShowRotatingPromotionSection:(0,r.TS)(t),hasTopPromoModuleSpecs:(0,r.f)(t)})))((t=>{let{promotionType:o,promotionSpec:e,productPromotionSpec:n,shouldShowRotatingPromotionSection:r,hasTopPromoModuleSpecs:l}=t;const d=(0,i.TH)();if(l&&(0,z.hT1)(d))return null;if(r)return(0,x.jsx)(S,{});switch(o){case s.jT.COUPON:case s.jT.NO_COUPON:return(0,x.jsx)(c.Z,{onClickActionText:()=>{(0,a.y)("CLICK_PROMO_BANNER_FEED",{promo_name:null==e?void 0:e.promo_name})},promotionSpec:e||n,logBannerImpression:()=>{(0,y.z)(e||n)}});case s.jT.ROTATING:return(0,x.jsx)(h,{promotionSpec:e});case s.jT.PROMOTION_HORIZONTAL_CARDS:return(0,x.jsx)(C.Z,{});default:return null}}))},
1"./cozy/mobile/components/promotionBanner/FeedPromotionBanner.tsx":function(t,o,e){"use strict";var n=e("./node_modules/react/index.js"),i=e("./node_modules/react-router/esm/react-router.js"),r=e("./node_modules/react-router-dom/esm/react-router-dom.js"),a=e("./node_modules/react-redux/es/index.js"),s=e("./cozy/coco/components/PromoCodeButton/PromoCodeButton.tsx"),c=e("./cozy/coco/components/PromoCodeButton/PromoCodeButtonConstants.tsx"),l=e("./cozy/data/actions/AuthenticationActions.tsx"),d=e("./cozy/data/actions/WishSellerStandardsActions.tsx"),p=e("./cozy/mobile/styles/promotionBanner/PromotionBanner.tsx"),u=e("./cozy/data/services/AnalyticsService.tsx"),m=e("./cozy/data/constants/PromotionConstants.tsx"),x=e("./cozy/utils/lottie/Lottie.tsx"),_=e("./cozy/utils/ClientExperimentUtils.tsx"),g=e("./cozy/routes/RouteGenerators.tsx"),h=e("./cozy/shared/components/promotionBanner/PromotionBannerDetailsModalSwitch.tsx"),f=e("./node_modules/react/jsx-runtime.js");o.Z=(0,a.$j)(null,(t=>({attemptedActionRequiringLogin:()=>t((0,l.attemptedActionRequiringLogin)()),setWSSPremierMerchantModalShown:()=>t((0,d.setWSSPremierMerchantModalShown)(!0))})))((t=>{var o;let{promotionSpec:e,onClickCopyButton:a,logBannerImpression:l,onClickActionText:d,setWSSPremierMerchantModalShown:y}=t;const B=(0,i.k6)(),S=Boolean(null==e?void 0:e.animated_banner_url),C=(0,n.useRef)(null);let z;(0,n.useEffect)((()=>{(0,u.y)("IMPRESSION_MSITE_HOME_BANNER"),l&&l(),S&&(0,x.m)(C.current,(()=>{}),x.v.STATIC_URL_SOURCES,null==e?void 0:e.animated_banner_url)}),[]),e&&(e.filter_id?z=(0,g.pR)(e.filter_id):e.action_url&&(z=e.action_url));const P=t=>{t===m.Wy&&y()},v=(0,_.yp)();return e?(0,f.jsxs)(p.F,{imageUrl:e.background_image_url,color:e.text_color,onClick:()=>{z&&B.push(z),null!=e&&e.action_id&&P(e.action_id)},backgroundColor:e.background_color,isAtlasSearchBarShown:v,children:[S&&(0,f.jsx)(p.K1,{ref:C}),e.expiry_text?(0,f.jsx)(p.VC,{color:e.expiry_text.text_color,fontSize:e.expiry_text.text_size&&"".concat(e.expiry_text.text_size,"px"),fontWeight:e.expiry_text.text_bold?700:400,hasAnimation:S,children:e.expiry_text.text}):(0,f.jsx)(p.VC,{}),(0,f.jsxs)(p.Mb,{hasAnimation:S,children:[e.title?(0,f.jsx)(p.Jw,{color:e.title.text_color,fontSize:e.title.text_size&&"".concat(e.title.text_size,"px"),fontWeight:e.title.text_bold?700:400,gravity:e.title.gravity,paddingBottom:e.title.padding_bottom&&"".concat(e.title.padding_bottom,"px"),paddingLeft:e.title.padding_left&&"".concat(e.title.padding_left,"px"),paddingRight:e.title.padding_right&&"".concat(e.title.padding_right,"px"),paddingTop:e.title.padding_top&&"".concat(e.title.padding_top,"px"),children:e.title.text}):null,e.subtitle?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p.JT,{color:e.subtitle.text_color,fontSize:e.subtitle.text_size&&"".concat(e.subtitle.text_size,"px"),fontWeight:e.subtitle.text_bold?700:400,marginTop:e.subtitle.margin_top&&"".concat(e.subtitle.margin_top,"px"),paddingBottom:e.subtitle.padding_bottom&&"".concat(e.subtitle.padding_bottom,"px"),paddingLeft:e.subtitle.padding_left&&"".concat(e.subtitle.padding_left,"px"),paddingRight:e.subtitle.padding_right&&"".concat(e.subtitle.padding_right,"px"),paddingTop:e.subtitle.padding_top&&"".concat(e.subtitle.padding_top,"px"),gravity:e.subtitle.gravity,children:null===(o=e.subtitle)||void 0===o?void 0:o.text}),e.promo_code&&e.promo_code.text&&(0,f.jsx)(s.Z,{size:c.DV.SMALL_BOLD,color:c.KN.LIGHT,promoCode:e.promo_code.text,overrideTextColor:e.promo_code.text_color,onClickButton:()=>{(0,u.y)("CLICK_MSITE_FEED_PROMO_COPY_BUTTON"),a&&a()},overrideStyles:{margin:"8px"},withDashedBorder:!0})]}):null,(()=>{if(null==e||!e.action_text)return null;const t=e.action_text,o=t.text_size?"".concat(t.text_size,"px"):"",n=t.text_bold?700:600,i=null==t?void 0:t.text_color,a=null==t?void 0:t.gravity,s=t.padding_bottom?"".concat(t.padding_bottom,"px"):"",c=t.padding_left?"".concat(t.padding_left,"px"):"",l=t.padding_right?"".concat(t.padding_right,"px"):"",u=t.padding_top?"".concat(t.padding_top,"px"):"";if(z){var m;const t=e.action_text.open_new_page;return(0,f.jsx)(r.rU,{to:z,target:t?"_blank":"",rel:t?"noopener noreferrer":"",onClick:o=>{t&&o.stopPropagation(),d&&d()},children:(0,f.jsx)(p.dw,{gravity:a,paddingBottom:s,paddingLeft:c,paddingRight:l,paddingTop:u,fontSize:o,fontWeight:n,color:i,children:null===(m=e.action_text)||void 0===m?void 0:m.text})})}var x;return e.action_id?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p.dw,{gravity:a,paddingBottom:s,paddingLeft:c,paddingRight:l,paddingTop:u,fontSize:o,fontWeight:n,color:i,onClick:()=>{P(e.action_id)},children:null===(x=e.action_text)||void 0===x?void 0:x.text}),(0,f.jsx)(h.Z,{actionID:e.action_id})]}):null})(),e.disclaimer_text&&!e.expiry_text?(0,f.jsx)(p.xG,{color:e.disclaimer_text.text_color,fontWeight:e.disclaimer_text.text_bold?700:400,children:e.disclaimer_text.text}):null]})]}):null}))},
1"./cozy/mobile/styles/promotionBanner/PromotionBanner.tsx":function(t,o,e){"use strict";e.d(o,{F:function(){return d},K1:function(){return p},VC:function(){return u},xG:function(){return m},Mb:function(){return x},Jw:function(){return g},JT:function(){return h},zd:function(){return f},dw:function(){return y},nm:function(){return B}});var n=e("./node_modules/styled-components/dist/styled-components.browser.esm.js"),i=e("./cozy/data/constants/PromotionConstants.tsx"),r=e("./cozy/shared/styles/Mixins.tsx"),a=e("./cozy/shared/styles/Utils.tsx"),s=e("./cozy/shared/styles/SpecialFonts.tsx"),c=e("./cozy/shared/styles/promotionBanner/PromotionBanner.tsx");const l=(0,n.ZP)(c.WG).withConfig({displayName:"PromotionBanner__BannerWrapperStyle",componentId:"pgn0x2-0"})(["flex:0 0 auto;"]),d=(0,n.ZP)(l).withConfig({displayName:"PromotionBanner__FeedBannerWrapper",componentId:"pgn0x2-1"})(["width:100vw;height:","px;background-size:cover;overflow:hidden;display:flex;flex-direction:column;position:relative;",""],i.Fi,(t=>{let{isAtlasSearchBarShown:o}=t;return o&&"margin-top: 0px;\n "})),p=n.ZP.div.withConfig({displayName:"PromotionBanner__FeedBannerAnimationContainer",componentId:"pgn0x2-2"})(["width:100vw;height:","px;position:absolute;top:0;"],i.Fi),u=n.ZP.div.withConfig({displayName:"PromotionBanner__ExpiryText",componentId:"pgn0x2-3"})(["",";min-height:11px;color:",";padding:6px;text-align:end;",";",";z-index:",";"],s.hS,(t=>
1{let{theme:o,color:e}=t;return e||o.Grey1}),(0,a.V8)("fontSize","font-size"),(0,a.V8)("fontWeight","font-weight"),(t=>{let{theme:o,hasAnimation:e}=t;return e&&o.zIndexBase1})),m=n.ZP.div.withConfig({displayName:"PromotionBanner__DisclaimerText",componentId:"pgn0x2-4"})(["",";min-height:11px;color:",";padding:6px;text-align:center;",";",";",";white-space:pre-wrap;line-height:12px;"],s.YL,(t=>{let{theme:o,color:e}=t;return e||o.Grey1}),(0,a.V8)("color"),(0,a.V8)("fontSize","font-size"),(0,a.V8)("fontWeight","font-weight")),x=n.ZP.div.withConfig({displayName:"PromotionBanner__FeedBannerDescription",componentId:"pgn0x2-5"})(["",";width:",";height:80%;flex-direction:column;align-self:",";z-index:",";"],r.qO,(t=>{let{gravity:o}=t;return"left"===o?"63.8%":"87%"}),(t=>{let{gravity:o}=t;return"left"===o?"left":"center"}),(t=>{let{theme:o,hasAnimation:e}=t;return e&&o.zIndexBase1})),_=t=>{switch(t){case"left":return"\n align-self: flex-start;\n text-align:left;\n ";case"right":return"\n align-self: flex-end;\n text-align:right;\n ";default:return""}},g=n.ZP.div.withConfig({displayName:"PromotionBanner__FeedBannerTitle",componentId:"pgn0x2-6"})(["",";text-align:center;",";",";",";",";",";",";",";",";line-height:28px;"],r.zb,(0,a.V8)("color"),(0,a.V8)("fontSize","font-size"),(0,a.V8)("fontWeight","font-weight"),(0,a.V8)("paddingBottom","padding-bottom"),(0,a.V8)("paddingLeft","padding-left"),(0,a.V8)("paddingRight","padding-right"),(0,a.V8)("paddingTop","padding-top"),(t=>{let{gravity:o}=t;return _(o)})),h=n.ZP.div.withConfig({displayName:"PromotionBanner__FeedBannerSubtitle",componentId:"pgn0x2-7"})(["",";text-align:center;",";",";",";",";",";",";",";",";",";",";white-space:pre-wrap;line-height:20px;"],r.Mc,(0,a.V8)("color"),(0,a.V8)("fontSize","font-size"),(0,a.V8)("fontWeight","font-weight"),(0,a.V8)("marginTop","margin-top"),(0,a.V8)("margin"),(t=>{let{gravity:o}=t;return _(o)}),(0,a.V8)("paddingBottom","padding-bottom"),(0,a.V8)("paddingLeft","padding-left"),(0,a.V8)("paddingRight","padding-right"),(0,a.V8)("paddingTop","padding-top")),f=(0,n.ZP)(c.Zl).withConfig({displayName:"PromotionBanner__FeedRotatingActionText",componentId:"pgn0x2-8"})(["",";"],r.zb),y=n.ZP.div.withConfig({displayName:"PromotionBanner__ActionText",componentId:"pgn0x2-9"})(["",";display:none;align-items:center;color:",";",";",";",";",";",";",";",";"],r.Lp,(t=>
1{let{theme:o,color:e}=t;return e||o.Grey1}),(t=>{let{gravity:o}=t;return _(o)}),(0,a.V8)("paddingBottom","padding-bottom"),(0,a.V8)("paddingLeft","padding-left"),(0,a.V8)("paddingRight","padding-right"),(0,a.V8)("paddingTop","padding-top"),(0,a.V8)("fontSize","font-size"),(0,a.V8)("fontWeight","font-weight")),B=n.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingWrapper",componentId:"pgn0x2-10"})(["width:100%;"])},
1"./cozy/shared/components/promotionBanner/HorizontalCards.tsx":function(t,o,e){"use strict";e.d(o,{Z:function(){return p}});var n=e("./cozy/coco/components/DesignSpec/TextSpec.tsx"),i=e("./cozy/coco/components/ItemCarousel/ItemCarousel.tsx"),r=e("./node_modules/react-redux/es/index.js"),a=e("./cozy/shared/styles/promotionBanner/PromotionBanner.tsx"),s=e("./node_modules/react/jsx-runtime.js"),c=t=>{let{cardSpec:{image_url:o,action_url:e,title:i},shouldRenderMobileComponent:r}=t;return(0,s.jsxs)(a.UK,{shouldRenderMobileComponent:r,to:e,children:[(0,s.jsx)(a.xu,{image:o,shouldRenderMobileComponent:r}),(0,s.jsx)(a.ll,{children:(0,s.jsx)(n.Z,{textSpec:i})})]})},l=e("./cozy/data/selectors/PromotionSelectors.tsx"),d=e("./cozy/data/selectors/BrowserSelectors.tsx"),p=(0,r.$j)((t=>({promotionSpec:(0,l.qz)(t),shouldRenderMobileComponent:(0,d.LG)(t)})))((t=>{var o;let{promotionSpec:e,shouldRenderMobileComponent:r,bannerWidth:l}=t;if(null==e||null===(o=e.card_specs)||void 0===o||!o.length)return null;const d=e.card_specs.map((t=>(0,s.jsx)(c,{cardSpec:t,shouldRenderMobileComponent:r})));return(0,s.jsxs)(a.pn,{shouldRenderMobileComponent:r,children:[r&&(null==e?void 0:e.title)&&(0,s.jsxs)(a.lb,{children:[(0,s.jsx)(n.Z,{textSpec:e.title}),e.action_url&&e.action_text&&(0,s.jsx)(n.Z,{textSpec:e.action_text,to:e.action_url})]}),(0,s.jsx)(i.ZP,{entries:d,forceHorizontal:!0,overrideStyle:{padding:"16px 0 10px 12px",backgroundColor:!r&&"transparent",width:l}})]})}))},
1"./cozy/shared/components/promotionBanner/PromotionBannerDetailsModalSwitch.tsx":function(t,o,e){"use strict";var n=e("./cozy/data/constants/PromotionConstants.tsx"),i=e("./cozy/shared/components/wishSellerStandards/PremierMerchantInfoModalSwitch.tsx"),r=e("./node_modules/react/jsx-runtime.js");o.Z=t=>{let{actionID:o}=t;return o&&o===n.Wy?(0,r.jsx)(i.Z,{}):null}},
1"./cozy/utils/logger/LogBannerImpression.tsx":function(t,o,e){"use strict";e.d(o,{z:function(){return i}});var n=e("./cozy/data/services/AnalyticsService.tsx");const i=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.y)("IMPRESSION_PROMO_BANNER_FEED",{promo_name:null==t?void 0:t.promo_name,rotating_banner:o.rotatingBanner,animated_banner:Boolean(null==t?void 0:t.animated_banner_url),...o.rotatingBanner&&{position:o.position},...o.rotatingBanner&&{carousel_length:o.carouselLength}})}}
1}]); 2//# sourceMappingURL=cozy_mobile_components_promotionBanner_FeedBannerSwitch_tsx.c856d4ee87bd00040bf8.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.