@sunrise-upc/sales-static-components 3.8.7-beta.5 → 3.8.7-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";exports.AFTER="after",exports.AUTHCOOKIE="sunriseAuth",exports.AUTHSTAMP="auth-stamp",exports.BEFORE="before",exports.CART_COOKIE="one-commerce-cartId",exports.CENTER="center",exports.COLLG3="col-lg-3",exports.COLLG4="col-lg-4",exports.COLLG6="col-lg-6",exports.COLORWHITE="#ffffff",exports.CUSTOMER_GROUP_STORAGE_KEY="customerGroup",exports.CUSTOMER_SEGMENT_REFRESH_EVENT="customerSegmentRefresh",exports.DEFAULTLOCALE="en",exports.DISMISSED_RIBBONS_STORAGE_KEY="dismissedRibbonsByUid",exports.EXTRA="extra",exports.FALCONBUTTONCLICKED="clicked",exports.FLEX_UPGRADE="FLEX_UPGRADE",exports.H1="h1",exports.H2="h2",exports.H3="h3",exports.H4="h4",exports.ICON="icon",exports.IMG="img",exports.LEFT="left",exports.LGDESKSTART=1440,exports.MDDESKEND=1439,exports.MDDESKSTART=1024,exports.MOBEND=767,exports.NONE="none",exports.PRE_TO_POST_PROMOTION_ID="PreToPost",exports.PRIMARYCOLORS="#da291c",exports.RIBBON_DISMISS_UPDATED_EVENT="ribbonDismissUpdated",exports.RIGHT="right",exports.SEMIEXTRA="semiextra",exports.SMART_UPGRADE="SMART_UPGRADE",exports.STACK="stack",exports.SVG="svg",exports.TABEND=1023,exports.TABSTART=768,exports.TRANSPARENT="transparent",exports.ZEROES="00";
1
+ "use strict";exports.AFTER="after",exports.AUTHCOOKIE="sunriseAuth",exports.AUTHSTAMP="auth-stamp",exports.BEFORE="before",exports.CART_COOKIE="one-commerce-cartId",exports.CENTER="center",exports.COLLG3="col-lg-3",exports.COLLG4="col-lg-4",exports.COLLG6="col-lg-6",exports.COLORWHITE="#ffffff",exports.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE="NEW_CUSTOMER",exports.CUSTOMER_GROUP_STORAGE_KEY="customerGroup",exports.CUSTOMER_SEGMENT_REFRESH_EVENT="customerSegmentRefresh",exports.DEFAULTLOCALE="en",exports.DISMISSED_RIBBONS_STORAGE_KEY="dismissedRibbonsByUid",exports.EXTRA="extra",exports.FALCONBUTTONCLICKED="clicked",exports.FLEX_UPGRADE="FLEX_UPGRADE",exports.H1="h1",exports.H2="h2",exports.H3="h3",exports.H4="h4",exports.ICON="icon",exports.IMG="img",exports.LEFT="left",exports.LGDESKSTART=1440,exports.MDDESKEND=1439,exports.MDDESKSTART=1024,exports.MOBEND=767,exports.NONE="none",exports.PRE_TO_POST_PROMOTION_ID="PreToPost",exports.PRIMARYCOLORS="#da291c",exports.RIBBON_DISMISS_UPDATED_EVENT="ribbonDismissUpdated",exports.RIGHT="right",exports.SEMIEXTRA="semiextra",exports.SMART_UPGRADE="SMART_UPGRADE",exports.STACK="stack",exports.SVG="svg",exports.TABEND=1023,exports.TABSTART=768,exports.TRANSPARENT="transparent",exports.ZEROES="00";
2
2
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":"2BAOqB,2BA8BK,gCA4GD,4BAzIH,6BA2JK,qCAnKL,wBAyBA,0BADA,0BADA,8BAbI,6CAqJgB,uDAGI,+CA9HjB,2CA4HgB,sCAjJxB,oCATc,+BA+JP,0BA1JV,gBACA,gBACA,gBACA,kBAwEE,mBADD,mBApFC,2BAoDO,uBAlCF,yBAiCE,oBA/BL,iBAJH,wCA2IqB,kCAvJX,+CA4Je,qCA/JvB,0BAcI,kCAoJI,8BA9IR,oBAiEF,qBAnEG,sBA+BE,wBAhDG,6BACL"}
1
+ {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":"2BAOqB,2BA8BK,gCA4GD,4BAzIH,6BA4JK,qCApKL,wBAyBA,0BADA,0BADA,8BAbI,oDAsJuB,kDADP,uDAII,+CA/HjB,2CA6HgB,sCAlJxB,oCATc,+BAgKP,0BA3JV,gBACA,gBACA,gBACA,kBAwEE,mBADD,mBApFC,2BAoDO,uBAlCF,yBAiCE,oBA/BL,iBAJH,wCA2IqB,kCAvJX,+CA6Je,qCAhKvB,0BAcI,kCAqJI,8BA/IR,oBAiEF,qBAnEG,sBA+BE,wBAhDG,6BACL"}
@@ -1,3 +1,3 @@
1
1
  require('./StageTeaserV3.css');
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react/jsx-runtime"),i=require("react"),l=require("react-loading-skeleton");require("react-loading-skeleton/dist/skeleton.css");var n=require("./StageTeaserSwiperV3.js"),r=require("./StageTeaserV3.module.scss.js"),o=require("./DoubleGrid/DoubleGridComponent.js"),u=require("./SingleGrid/SingleGridComponent.js"),s=require("../RibbonComponent/utils.js"),d=require("../../services/CustomerService.js"),a=require("../../services/customerSegmentSync.js"),c=require("cookies-next"),v=require("../Constants.js");const m=l.default||l,f=a.createCustomerGroupFetcher({fetchCustomerProfile:d.customerGroup});exports.default=({content:l})=>{var d,S,g,E;const[h,p]=i.useState(null),[w,T]=i.useState(null),[C,O]=i.useState(!0),[_,y]=i.useState(!1),[R,x]=i.useState(!1),[j,G]=i.useState(!1),[M,b]=i.useState(null),[N,U]=i.useState(0),A=i.useRef(null),V=i.useRef(null),q=i.useRef(null),F=!!c.getCookie(v.AUTHCOOKIE),W=e=>e?s.calculateDateTime(new Date(e.trim().replace(/-/g,"/"))):null,I=(e,t)=>{const i=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase());return!i.length||!!t.size&&i.some(e=>t.has(e))},$=e=>(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim()).length>0,k=(e,t,i=!1)=>{const l=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase()),n=l.length>0;return t?!!l.includes("all")||l.includes(t.toLowerCase()):!!i&&(!n||l.includes("all"))};i.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{U(e=>e+1)};return window.addEventListener(v.CUSTOMER_SEGMENT_REFRESH_EVENT,e),()=>{window.removeEventListener(v.CUSTOMER_SEGMENT_REFRESH_EVENT,e)}},[]),i.useEffect(()=>{let t=!0;return e.__awaiter(void 0,void 0,void 0,function*(){t&&(O(!0),y(!1),x(!1),G(!1));const e=q.current,i=null!==e&&e!==F,l=!0===e&&!F;if(q.current=F,l&&"undefined"!=typeof window&&window.localStorage.removeItem(v.CUSTOMER_GROUP_STORAGE_KEY),i&&T(null),"undefined"!=typeof window){const e=window.localStorage.getItem(v.CUSTOMER_GROUP_STORAGE_KEY);if(e&&!i&&F&&"NEW_CUSTOMER"!==e)return T(e),x(!1),void y(!0)}if(!F)return T("NEW_CUSTOMER"),"undefined"!=typeof window&&window.localStorage.setItem(v.CUSTOMER_GROUP_STORAGE_KEY,"NEW_CUSTOMER"),x(!1),void y(!0);try{const e=yield a.resolveCustomerGroup({fetchCustomerGroup:f,isLoggedIn:()=>F,storageKey:v.CUSTOMER_GROUP_STORAGE_KEY,newCustomerValue:"NEW_CUSTOMER"});t&&(T(e),x(!1),"undefined"!=typeof window&&e&&window.localStorage.setItem(v.CUSTOMER_GROUP_STORAGE_KEY,e),y(!0))}catch(e){t&&(T(null),x(!0),y(!0))}}),()=>{t=!1}},[F,N]),i.useEffect(()=>{const e=()=>{A.current&&(clearTimeout(A.current),A.current=null)};if(!_)return void G(!1);const t=R&&!w;if(!w&&!t)return void(_&&(p(null),G(!0),O(!1)));G(!1);const i=(null==l?void 0:l.teaserSlides)||[],n=(()=>{if("undefined"==typeof window)return new Set;const e=window.localStorage.getItem("tealium_va");if(!e)return new Set;try{const t=JSON.parse(e),i=null==t?void 0:t.audiences;return i&&"object"==typeof i?new Set(Object.keys(i).filter(Boolean).map(e=>String(e).trim().toLowerCase())):new Set}catch(e){return new Set}})(),r={FIXNET:null==l?void 0:l.fixnetOrder,MOBILE:null==l?void 0:l.mobileOrder,FIXNET_MOBILE:null==l?void 0:l.mobileFixnetOrder,DEFAULT:null==l?void 0:l.defaultOrder},o=w?r[w]:null;if(o){const e=o.split(",").map(e=>e.trim()).filter(e=>e.length>0),t=new Map(e.map((e,t)=>[e,t])),l=new Map(i.map((e,t)=>[e,t]));i.sort((e,i)=>{var n,r,o,u,s,d;const a=String(null!==(n=null==e?void 0:e.id)&&void 0!==n?n:"").trim(),c=String(null!==(r=null==i?void 0:i.id)&&void 0!==r?r:"").trim(),v=null!==(o=l.get(e))&&void 0!==o?o:0,m=null!==(u=l.get(i))&&void 0!==u?u:0,f=null!==(s=t.get(a))&&void 0!==s?s:t.get(String(v)),S=null!==(d=t.get(c))&&void 0!==d?d:t.get(String(m));return null==f&&null==S?v-m:null==f?1:null==S?-1:Number(f)-Number(S)})}const u=i.filter(e=>!0===(null==e?void 0:e.active)&&($(null==e?void 0:e.tealiumAudiences)?I(null==e?void 0:e.tealiumAudiences,n):k(null==e?void 0:e.customerType,w,t))),s=()=>{const e=new Date,t=[];u.forEach(i=>{((e,t)=>{const i=W(null==e?void 0:e.scheduleStartTime),l=W(null==e?void 0:e.scheduleEndTime),n=!i||t.getTime()>=i.getTime(),r=!l||l.getTime()>t.getTime();return n&&r})(i,e)&&(t.includes(i)||t.push(i))}),p(t.length>0?t:null),G(!0),O(!1)},d=()=>{e();const i=((null==l?void 0:l.teaserSlides)||[]).filter(e=>!0===(null==e?void 0:e.active)&&($(null==e?void 0:e.tealiumAudiences)?I(null==e?void 0:e.tealiumAudiences,n):k(null==e?void 0:e.customerType,w,t))),r=(new Date).getTime(),o=i.flatMap(e=>{const t=[],i=W(null==e?void 0:e.scheduleStartTime),l=W(null==e?void 0:e.scheduleEndTime);if(i){const e=i.getTime();e>r&&t.push(e)}if(l){const e=l.getTime();e>r&&t.push(e)}return t}).sort((e,t)=>e-t)[0];if(!o)return;const u=o-r;A.current=setTimeout(()=>{s(),d()},Math.max(u,0))};return s(),d(),()=>{e()}},[null==l?void 0:l.teaserSlides,w,_,R]),i.useEffect(()=>{if(!V.current||!(null==h?void 0:h.length))return;const e=()=>{var e;const t=null===(e=V.current)||void 0===e?void 0:e.offsetHeight;t&&t>0&&b(t)};e();const t=new ResizeObserver(e);return t.observe(V.current),()=>{t.disconnect()}},[null==h?void 0:h.length,null==l?void 0:l.isSlimVersion,null==l?void 0:l.isFullWidth]);const L=null==l?void 0:l.isFullWidth,B=null===(d=null==l?void 0:l.solidBgColor)||void 0===d?void 0:d.color,D="undefined"==typeof window?1368:window.innerWidth,K=D>=1024,P=(null==l?void 0:l.isSlimVersion)?480:K?550:500,H=L?0:48,Y=(null===(S=null==l?void 0:l.teaserSlides)||void 0===S?void 0:S.length)>1?34:0,z=M||P+H+Y,X=(()=>{if(!L)return D<768?"320px":D<1024?"660px":D>=1920?"1368px":"960px"})(),J=L?void 0:{width:X},Q=(e,i)=>"single"===(null==e?void 0:e.layoutgrid)?t.jsx(u.default,{content:e,isFullWidth:L,isSlimVersion:null==l?void 0:l.isSlimVersion,isFirstSlide:0===i},i):t.jsx(o.default,{content:e,isFullWidth:L,isSlimVersion:null==l?void 0:l.isSlimVersion,isFirstSlide:0===i},i),Z=t.jsx("div",{ref:V,className:`${r.default.outerContainer} ${L?r.default.fullWidth:""} ${(null==l?void 0:l.isSlimVersion)&&L?r.default.slimVersion:""}`,style:{backgroundColor:B,minHeight:`${z}px`},children:(null==h?void 0:h.length)>1?t.jsx(n.default,{content:l,isFullWidth:L,children:null===(g=h||[])||void 0===g?void 0:g.map((e,t)=>Q(e,t))}):t.jsx("div",{className:L?"":r.default.singleSlideCentered,style:J,children:Q(null==h?void 0:h[0],0)})});if(C||!_||!j){const e=(null===(E=null==l?void 0:l.teaserSlides)||void 0===E?void 0:E.length)>1,i={backgroundColor:B,minHeight:`${z}px`},n={display:"block",height:`${P}px`};return t.jsx("div",{className:`${r.default.outerContainer} ${L?r.default.fullWidth:""} ${(null==l?void 0:l.isSlimVersion)&&L?r.default.slimVersion:""}`,style:i,children:t.jsxs("div",{className:L?"":r.default.singleSlideCentered,style:J,children:[t.jsx("div",{className:`${r.default.skeletonContainer} ${(null==l?void 0:l.isSlimVersion)?r.default.slimVersion:""}`,children:t.jsx(m,{height:"100%",borderRadius:L?0:32,style:n})}),e&&t.jsx("div",{style:{marginTop:"24px",height:"10px"}})]})})}return(null==h?void 0:h.length)?Z:null};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),i=require("react/jsx-runtime"),t=require("react"),l=require("react-loading-skeleton");require("react-loading-skeleton/dist/skeleton.css");var n=require("./StageTeaserSwiperV3.js"),r=require("./StageTeaserV3.module.scss.js"),o=require("./DoubleGrid/DoubleGridComponent.js"),u=require("./SingleGrid/SingleGridComponent.js"),s=require("../RibbonComponent/utils.js"),d=require("../../services/CustomerService.js"),a=require("../../services/customerSegmentSync.js"),c=require("cookies-next"),v=require("../Constants.js");const m=l.default||l,f=a.createCustomerGroupFetcher({fetchCustomerProfile:d.customerGroup});exports.default=({content:l})=>{var d,S,g,E;const[h,p]=t.useState(null),[w,T]=t.useState(null),[_,C]=t.useState(!0),[O,R]=t.useState(!1),[y,x]=t.useState(!1),[U,j]=t.useState(!1),[G,M]=t.useState(null),[b,A]=t.useState(0),V=t.useRef(null),N=t.useRef(null),q=t.useRef(null),F=!!c.getCookie(v.AUTHCOOKIE),L=e=>e?s.calculateDateTime(new Date(e.trim().replace(/-/g,"/"))):null,I=(e,i)=>{const t=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase());return!t.length||!!i.size&&t.some(e=>i.has(e))},W=e=>(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim()).length>0,$=(e,i,t=!1)=>{const l=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase()),n=l.length>0;return i?!!l.includes("all")||l.includes(i.toLowerCase()):!!t&&(!n||l.includes("all"))};t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{A(e=>e+1)};return window.addEventListener(v.CUSTOMER_SEGMENT_REFRESH_EVENT,e),()=>{window.removeEventListener(v.CUSTOMER_SEGMENT_REFRESH_EVENT,e)}},[]),t.useEffect(()=>{let i=!0;return e.__awaiter(void 0,void 0,void 0,function*(){i&&(C(!0),R(!1),x(!1),j(!1));const e=q.current,t=null!==e&&e!==F,l=!0===e&&!F;if(q.current=F,l&&"undefined"!=typeof window&&window.localStorage.removeItem(v.CUSTOMER_GROUP_STORAGE_KEY),t&&T(null),"undefined"!=typeof window){const e=window.localStorage.getItem(v.CUSTOMER_GROUP_STORAGE_KEY);if(e&&!t&&F&&e!==v.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE)return T(e),x(!1),void R(!0)}if(!F)return T(v.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE),"undefined"!=typeof window&&window.localStorage.setItem(v.CUSTOMER_GROUP_STORAGE_KEY,v.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE),x(!1),void R(!0);try{const e=yield a.resolveCustomerGroup({fetchCustomerGroup:f,isLoggedIn:()=>F});i&&(T(e),x(!1),"undefined"!=typeof window&&e&&window.localStorage.setItem(v.CUSTOMER_GROUP_STORAGE_KEY,e),R(!0))}catch(e){i&&(T(null),x(!0),R(!0))}}),()=>{i=!1}},[F,b]),t.useEffect(()=>{const e=()=>{V.current&&(clearTimeout(V.current),V.current=null)};if(!O)return void j(!1);const i=y&&!w;if(!w&&!i)return void(O&&(p(null),j(!0),C(!1)));j(!1);const t=(null==l?void 0:l.teaserSlides)||[],n=(()=>{if("undefined"==typeof window)return new Set;const e=window.localStorage.getItem("tealium_va");if(!e)return new Set;try{const i=JSON.parse(e),t=null==i?void 0:i.audiences;return t&&"object"==typeof t?new Set(Object.keys(t).filter(Boolean).map(e=>String(e).trim().toLowerCase())):new Set}catch(e){return new Set}})(),r={FIXNET:null==l?void 0:l.fixnetOrder,MOBILE:null==l?void 0:l.mobileOrder,FIXNET_MOBILE:null==l?void 0:l.mobileFixnetOrder,DEFAULT:null==l?void 0:l.defaultOrder},o=w?r[w]:null;if(o){const e=o.split(",").map(e=>e.trim()).filter(e=>e.length>0),i=new Map(e.map((e,i)=>[e,i])),l=new Map(t.map((e,i)=>[e,i]));t.sort((e,t)=>{var n,r,o,u,s,d;const a=String(null!==(n=null==e?void 0:e.id)&&void 0!==n?n:"").trim(),c=String(null!==(r=null==t?void 0:t.id)&&void 0!==r?r:"").trim(),v=null!==(o=l.get(e))&&void 0!==o?o:0,m=null!==(u=l.get(t))&&void 0!==u?u:0,f=null!==(s=i.get(a))&&void 0!==s?s:i.get(String(v)),S=null!==(d=i.get(c))&&void 0!==d?d:i.get(String(m));return null==f&&null==S?v-m:null==f?1:null==S?-1:Number(f)-Number(S)})}const u=t.filter(e=>!0===(null==e?void 0:e.active)&&(W(null==e?void 0:e.tealiumAudiences)?I(null==e?void 0:e.tealiumAudiences,n):$(null==e?void 0:e.customerType,w,i))),s=()=>{const e=new Date,i=[];u.forEach(t=>{((e,i)=>{const t=L(null==e?void 0:e.scheduleStartTime),l=L(null==e?void 0:e.scheduleEndTime),n=!t||i.getTime()>=t.getTime(),r=!l||l.getTime()>i.getTime();return n&&r})(t,e)&&(i.includes(t)||i.push(t))}),p(i.length>0?i:null),j(!0),C(!1)},d=()=>{e();const t=((null==l?void 0:l.teaserSlides)||[]).filter(e=>!0===(null==e?void 0:e.active)&&(W(null==e?void 0:e.tealiumAudiences)?I(null==e?void 0:e.tealiumAudiences,n):$(null==e?void 0:e.customerType,w,i))),r=(new Date).getTime(),o=t.flatMap(e=>{const i=[],t=L(null==e?void 0:e.scheduleStartTime),l=L(null==e?void 0:e.scheduleEndTime);if(t){const e=t.getTime();e>r&&i.push(e)}if(l){const e=l.getTime();e>r&&i.push(e)}return i}).sort((e,i)=>e-i)[0];if(!o)return;const u=o-r;V.current=setTimeout(()=>{s(),d()},Math.max(u,0))};return s(),d(),()=>{e()}},[null==l?void 0:l.teaserSlides,w,O,y]),t.useEffect(()=>{if(!N.current||!(null==h?void 0:h.length))return;const e=()=>{var e;const i=null===(e=N.current)||void 0===e?void 0:e.offsetHeight;i&&i>0&&M(i)};e();const i=new ResizeObserver(e);return i.observe(N.current),()=>{i.disconnect()}},[null==h?void 0:h.length,null==l?void 0:l.isSlimVersion,null==l?void 0:l.isFullWidth]);const k=null==l?void 0:l.isFullWidth,P=null===(d=null==l?void 0:l.solidBgColor)||void 0===d?void 0:d.color,B="undefined"==typeof window?1368:window.innerWidth,D=B>=1024,H=(null==l?void 0:l.isSlimVersion)?480:D?550:500,K=k?0:48,Y=(null===(S=null==l?void 0:l.teaserSlides)||void 0===S?void 0:S.length)>1?34:0,z=G||H+K+Y,X=(()=>{if(!k)return B<768?"320px":B<1024?"660px":B>=1920?"1368px":"960px"})(),J=k?void 0:{width:X},Q=(e,t)=>"single"===(null==e?void 0:e.layoutgrid)?i.jsx(u.default,{content:e,isFullWidth:k,isSlimVersion:null==l?void 0:l.isSlimVersion,isFirstSlide:0===t},t):i.jsx(o.default,{content:e,isFullWidth:k,isSlimVersion:null==l?void 0:l.isSlimVersion,isFirstSlide:0===t},t),Z=i.jsx("div",{ref:N,className:`${r.default.outerContainer} ${k?r.default.fullWidth:""} ${(null==l?void 0:l.isSlimVersion)&&k?r.default.slimVersion:""}`,style:{backgroundColor:P,minHeight:`${z}px`},children:(null==h?void 0:h.length)>1?i.jsx(n.default,{content:l,isFullWidth:k,children:null===(g=h||[])||void 0===g?void 0:g.map((e,i)=>Q(e,i))}):i.jsx("div",{className:k?"":r.default.singleSlideCentered,style:J,children:Q(null==h?void 0:h[0],0)})});if(_||!O||!U){const e=(null===(E=null==l?void 0:l.teaserSlides)||void 0===E?void 0:E.length)>1,t={backgroundColor:P,minHeight:`${z}px`},n={display:"block",height:`${H}px`};return i.jsx("div",{className:`${r.default.outerContainer} ${k?r.default.fullWidth:""} ${(null==l?void 0:l.isSlimVersion)&&k?r.default.slimVersion:""}`,style:t,children:i.jsxs("div",{className:k?"":r.default.singleSlideCentered,style:J,children:[i.jsx("div",{className:`${r.default.skeletonContainer} ${(null==l?void 0:l.isSlimVersion)?r.default.slimVersion:""}`,children:i.jsx(m,{height:"100%",borderRadius:k?0:32,style:n})}),e&&i.jsx("div",{style:{marginTop:"24px",height:"10px"}})]})})}return(null==h?void 0:h.length)?Z:null};
3
3
  //# sourceMappingURL=StageTeaserV3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StageTeaserV3.js","sources":["../../../../../src/components/StageTeaserV3/StageTeaserV3.tsx"],"sourcesContent":[null],"names":["Skeleton","SkeletonRaw","default","fetchCustomerGroup","createCustomerGroupFetcher","fetchCustomerProfile","customerGroup","content","displayArray","setdisplayArray","useState","customerGroupValue","setCustomerGroupValue","isInitialSkeletonVisible","setIsInitialSkeletonVisible","isCustomerGroupResolved","setIsCustomerGroupResolved","didCustomerGroupApiFail","setDidCustomerGroupApiFail","isDisplaySlidesFiltered","setIsDisplaySlidesFiltered","measuredTeaserHeight","setMeasuredTeaserHeight","customerSegmentRefreshVersion","setCustomerSegmentRefreshVersion","recalculateTimerRef","useRef","teaserContainerRef","previousExistingCustomerRef","existingCustomer","getCookie","AUTHCOOKIE","getScheduleDateTime","value","calculateDateTime","Date","trim","replace","matchesTealiumAudiences","slideAudiences","availableAudiences","normalizedSlideAudiences","Array","isArray","filter","Boolean","map","audience","String","toLowerCase","length","size","some","has","hasTealiumAudiencesConfigured","matchesCustomerType","customerType","allowAllOrUnsetAudienceFallback","normalizedTypes","type","hasAudienceConfigured","includes","useEffect","window","onCustomerSegmentRefresh","previousValue","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","removeEventListener","isMounted","__awaiter","previousExistingCustomer","current","hasExistingCustomerChanged","didCustomerLogout","localStorage","removeItem","CUSTOMER_GROUP_STORAGE_KEY","cachedGroup","getItem","setItem","resolvedGroup","resolveCustomerGroup","isLoggedIn","storageKey","newCustomerValue","error","clearRecalculateTimer","clearTimeout","shouldUseAllAudienceFallback","teaserSlides","availableTealiumAudiences","Set","rawValue","parsed","JSON","parse","audiences","Object","keys","getTealiumAudienceKeys","orderConfig","FIXNET","fixnetOrder","MOBILE","mobileOrder","FIXNET_MOBILE","mobileFixnetOrder","DEFAULT","defaultOrder","selectedOrder","orderKeys","split","orderMap","Map","index","originalIndexMap","slide","sort","a","b","aIdKey","_a","id","bIdKey","_b","aOriginalIndex","_c","get","bOriginalIndex","_d","aIndex","_e","bIndex","_f","Number","activeSlides","slider","active","tealiumAudiences","recalculateDisplayArray","presentTime","toDisplay","forEach","currentTime","startTime","scheduleStartTime","endTime","scheduleEndTime","hasStarted","getTime","notExpired","isSlideWithinScheduleWindow","push","scheduleNextStartRecalculation","presentTimeMs","nextRecalculationTimeMs","flatMap","times","startTimeMs","endTimeMs","delay","setTimeout","Math","max","updateHeight","nextHeight","offsetHeight","observer","ResizeObserver","observe","disconnect","isSlimVersion","isFullWidth","solidBackGroundColor","solidBgColor","color","fallbackViewportWidth","innerWidth","isDesktopViewport","baseTeaserHeight","outerPaddingHeight","estimatedDotsHeight","reservedTeaserHeight","centeredSlideWidth","singleSlideContainerStyle","undefined","width","renderTeaserCard","card","key","layoutgrid","_jsx","SingleGridComponent","isFirstSlide","DoubleGridComponent","stageTeaserJsx","ref","className","Styles","outerContainer","fullWidth","slimVersion","style","backgroundColor","minHeight","children","StageTeaserSwiperV3","singleSlideCentered","showDots","loadingContainerStyle","loadingSkeletonStyle","display","height","_jsxs","skeletonContainer","borderRadius","marginTop"],"mappings":"+nBAIA,MAAMA,EAAYC,EAAoBC,SAAWD,EAiB3CE,EAAqBC,EAAAA,2BAA2B,CACpDC,qBAAsBC,EAAAA,gCAIS,EAAGC,0BAClC,MAAOC,EAAcC,GAAmBC,EAAAA,SAAc,OAC/CC,EAAoBC,GAAyBF,EAAAA,SAAc,OAC3DG,EAA0BC,GAA+BJ,EAAAA,UAAkB,IAC3EK,EAAyBC,GAA8BN,EAAAA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AAAA,EAAEjF,IAAI,CAAC+I,EAAW1E,IAAkByE,EAAiBC,EAAM1E,MAGlF6E,EAAAA,WACEM,UAAYzB,EAA2C,GAA7B0B,EAAAA,QAAOS,oBACjCL,MAAOlB,EAAyBqB,SAE/BlB,EAAiBpL,aAAY,EAAZA,EAAe,GAAI,OAW7C,GAJEK,IACCE,IACAI,EAEqB,CACtB,MAAM8L,GAAgC,QAArB/E,EAAA3H,aAAO,EAAPA,EAASmF,oBAAY,IAAAwC,OAAA,EAAAA,EAAEhF,QAAS,EAC3CgK,EAA6C,CACjDN,gBAAiB9B,EACjB+B,UAAW,GAAGtB,OAEV4B,EAA4C,CAChDC,QAAS,QACTC,OAAQ,GAAGjC,OAGb,OACEY,EAAAA,IAAA,MAAA,CACEM,UAAW,GAAGC,UAAOC,kBACnB3B,EAAc0B,EAAAA,QAAOE,UAAY,OAC/BlM,aAAO,EAAPA,EAASqK,gBAAiBC,EAAc0B,UAAOG,YAAc,KACjEC,MAAOO,EAAqBJ,SAE5BQ,OAAA,MAAA,CACEhB,UAAYzB,EAA2C,GAA7B0B,EAAAA,QAAOS,oBACjCL,MAAOlB,EAAyBqB,SAAA,CAEhCd,EAAAA,WAAKM,UAAW,GAAGC,EAAAA,QAAOgB,sBAAqBhN,aAAO,EAAPA,EAASqK,eAAgB2B,EAAAA,QAAOG,YAAc,cAC3FV,EAAAA,IAAChM,EAAQ,CACPqN,OAAO,OACPG,aAAc3C,EAAc,EAAI,GAChC8B,MAAOQ,MAGVF,GACCjB,MAAA,MAAA,CAAKW,MAAO,CAAEc,UAAW,OAAQJ,OAAQ,cAKnD,CAEA,OAAI7M,aAAY,EAAZA,EAAc0C,QACTkJ,EAGF"}
1
+ {"version":3,"file":"StageTeaserV3.js","sources":["../../../../../src/components/StageTeaserV3/StageTeaserV3.tsx"],"sourcesContent":[null],"names":["Skeleton","SkeletonRaw","default","fetchCustomerGroup","createCustomerGroupFetcher","fetchCustomerProfile","customerGroup","content","displayArray","setdisplayArray","useState","customerGroupValue","setCustomerGroupValue","isInitialSkeletonVisible","setIsInitialSkeletonVisible","isCustomerGroupResolved","setIsCustomerGroupResolved","didCustomerGroupApiFail","setDidCustomerGroupApiFail","isDisplaySlidesFiltered","setIsDisplaySlidesFiltered","measuredTeaserHeight","setMeasuredTeaserHeight","customerSegmentRefreshVersion","setCustomerSegmentRefreshVersion","recalculateTimerRef","useRef","teaserContainerRef","previousExistingCustomerRef","existingCustomer","getCookie","AUTHCOOKIE","getScheduleDateTime","value","calculateDateTime","Date","trim","replace","matchesTealiumAudiences","slideAudiences","availableAudiences","normalizedSlideAudiences","Array","isArray","filter","Boolean","map","audience","String","toLowerCase","length","size","some","has","hasTealiumAudiencesConfigured","matchesCustomerType","customerType","allowAllOrUnsetAudienceFallback","normalizedTypes","type","hasAudienceConfigured","includes","useEffect","window","onCustomerSegmentRefresh","previousValue","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","removeEventListener","isMounted","__awaiter","previousExistingCustomer","current","hasExistingCustomerChanged","didCustomerLogout","localStorage","removeItem","CUSTOMER_GROUP_STORAGE_KEY","cachedGroup","getItem","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","setItem","resolvedGroup","resolveCustomerGroup","isLoggedIn","error","clearRecalculateTimer","clearTimeout","shouldUseAllAudienceFallback","teaserSlides","availableTealiumAudiences","Set","rawValue","parsed","JSON","parse","audiences","Object","keys","getTealiumAudienceKeys","orderConfig","FIXNET","fixnetOrder","MOBILE","mobileOrder","FIXNET_MOBILE","mobileFixnetOrder","DEFAULT","defaultOrder","selectedOrder","orderKeys","split","orderMap","Map","index","originalIndexMap","slide","sort","a","b","aIdKey","_a","id","bIdKey","_b","aOriginalIndex","_c","get","bOriginalIndex","_d","aIndex","_e","bIndex","_f","Number","activeSlides","slider","active","tealiumAudiences","recalculateDisplayArray","presentTime","toDisplay","forEach","currentTime","startTime","scheduleStartTime","endTime","scheduleEndTime","hasStarted","getTime","notExpired","isSlideWithinScheduleWindow","push","scheduleNextStartRecalculation","presentTimeMs","nextRecalculationTimeMs","flatMap","times","startTimeMs","endTimeMs","delay","setTimeout","Math","max","updateHeight","nextHeight","offsetHeight","observer","ResizeObserver","observe","disconnect","isSlimVersion","isFullWidth","solidBackGroundColor","solidBgColor","color","fallbackViewportWidth","innerWidth","isDesktopViewport","baseTeaserHeight","outerPaddingHeight","estimatedDotsHeight","reservedTeaserHeight","centeredSlideWidth","singleSlideContainerStyle","undefined","width","renderTeaserCard","card","key","layoutgrid","_jsx","SingleGridComponent","isFirstSlide","DoubleGridComponent","stageTeaserJsx","ref","className","Styles","outerContainer","fullWidth","slimVersion","style","backgroundColor","minHeight","children","StageTeaserSwiperV3","singleSlideCentered","showDots","loadingContainerStyle","loadingSkeletonStyle","display","height","_jsxs","skeletonContainer","borderRadius","marginTop"],"mappings":"+nBAIA,MAAMA,EAAYC,EAAoBC,SAAWD,EAkB3CE,EAAqBC,EAAAA,2BAA2B,CACpDC,qBAAsBC,EAAAA,gCAIS,EAAGC,0BAClC,MAAOC,EAAcC,GAAmBC,EAAAA,SAAc,OAC/CC,EAAoBC,GAAyBF,EAAAA,SAAc,OAC3DG,EAA0BC,GAA+BJ,EAAAA,UAAkB,IAC3EK,EAAyBC,GAA8BN,EAAAA,UAAkB,IACzEO,EAAyBC,GAA8BR,EAAAA,UAAkB,IACzES,EAAyBC,GAA8BV,EAAAA,UAAkB,IACzEW,EAAsBC,GAA2BZ,EAAAA,SAAwB,OACzEa,EAA+BC,GAAoCd,EAAAA,SAAiB,GACrFe,EAAsBC,EAAAA,OAA6C,MACnEC,EAAqBD,EAAAA,OAA8B,MACnDE,EAA8BF,EAAAA,OAAuB,MAErDG,IADiBC,EAAAA,UAAUC,cAG3BC,EAAuBC,GACtBA,EAIEC,EAAAA,kBAAkB,IAAIC,KAAKF,EAAMG,OAAOC,QAAQ,KAAM,OAHpD,KAkCLC,EAA0B,CAACC,EAAqBC,KACpD,MAAMC,GAA4BC,MAAMC,QAAQJ,GAAkBA,EAAiB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AAA,CACEM,UAAW,GAAGC,UAAOC,kBACnB3B,EAAc0B,EAAAA,QAAOE,UAAY,OAC/BjM,aAAO,EAAPA,EAASoK,gBAAiBC,EAAc0B,UAAOG,YAAc,KACjEC,MAAOO,EAAqBJ,SAE5BQ,OAAA,MAAA,CACEhB,UAAYzB,EAA2C,GAA7B0B,EAAAA,QAAOS,oBACjCL,MAAOlB,EAAyBqB,SAAA,CAEhCd,EAAAA,WAAKM,UAAW,GAAGC,EAAAA,QAAOgB,sBAAqB/M,aAAO,EAAPA,EAASoK,eAAgB2B,EAAAA,QAAOG,YAAc,cAC3FV,EAAAA,IAAC/L,EAAQ,CACPoN,OAAO,OACPG,aAAc3C,EAAc,EAAI,GAChC8B,MAAOQ,MAGVF,GACCjB,MAAA,MAAA,CAAKW,MAAO,CAAEc,UAAW,OAAQJ,OAAQ,cAKnD,CAEA,OAAI5M,aAAY,EAAZA,EAAc0C,QACTiJ,EAGF"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../components/Constants.js");const r=e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null},o=e=>{var t,o;const n=r(null==e?void 0:e.customerGroup);if(n)return n;const i=r(null===(o=null===(t=null==e?void 0:e.relatedParty)||void 0===t?void 0:t[0])||void 0===o?void 0:o.segment);return i||null},n=new Map,i=e=>"undefined"==typeof window?null:r(window.localStorage.getItem(e)),u=(e,t)=>{"undefined"!=typeof window&&(t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e))},s=o=>e.__awaiter(void 0,void 0,void 0,function*(){const s=o.storageKey||t.CUSTOMER_GROUP_STORAGE_KEY,d=o.newCustomerValue||"NEW_CUSTOMER";if("undefined"==typeof window)return null;if(!o.isLoggedIn())return u(s,d),d;if(!o.forceRefresh){const e=i(s);if(e&&e!==d)return e}const l=n.get(s);if(l)return l;const f=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=r(yield o.fetchCustomerGroup());return u(s,e),e}catch(e){return o.onError&&o.onError(e),i(s)}finally{n.delete(s)}});return n.set(s,f),f});exports.createCustomerGroupFetcher=t=>()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield t.fetchCustomerProfile();return o(e||{})}),exports.createCustomerSegmentSync=r=>{var o;const n=r.storageKey||t.CUSTOMER_GROUP_STORAGE_KEY,u=r.refreshEventName||t.CUSTOMER_SEGMENT_REFRESH_EVENT,d=null!==(o=r.minSyncIntervalMs)&&void 0!==o?o:8e3,l=r.newCustomerValue||"NEW_CUSTOMER";let f=null,a=0;const c=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(u,{detail:{customerGroup:e,refreshedAt:Date.now()}}))};return{refreshCustomerSegmentAfterLogin:()=>e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;if(f)return f;if(Date.now()-a<d){const e=i(n);return c(e),e}return f=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield s({fetchCustomerGroup:r.fetchCustomerGroup,isLoggedIn:r.isLoggedIn,storageKey:n,newCustomerValue:l,forceRefresh:!0,onError:r.onError});return a=Date.now(),c(e),e}finally{f=null}}),f}),subscribeToCustomerSegmentRefresh:e=>{if("undefined"==typeof window)return()=>{};const t=t=>{e(t)};return window.addEventListener(u,t),()=>{window.removeEventListener(u,t)}},dispatchCustomerSegmentRefreshEvent:c}},exports.extractCustomerGroupFromProfile=o,exports.resolveCustomerGroup=s;
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../components/Constants.js");const r=e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null},o=e=>{var t,o;const n=r(null==e?void 0:e.customerGroup);if(n)return n;const i=r(null===(o=null===(t=null==e?void 0:e.relatedParty)||void 0===t?void 0:t[0])||void 0===o?void 0:o.segment);return i||null},n=new Map,i=e=>"undefined"==typeof window?null:r(window.localStorage.getItem(e)),u=(e,t)=>{"undefined"!=typeof window&&(t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e))},s=o=>e.__awaiter(void 0,void 0,void 0,function*(){const s=t.CUSTOMER_GROUP_STORAGE_KEY,d=t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE;if("undefined"==typeof window)return null;if(!o.isLoggedIn())return u(s,d),d;if(!o.forceRefresh){const e=i(s);if(e&&e!==d)return e}const l=n.get(s);if(l)return l;const f=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=r(yield o.fetchCustomerGroup());return u(s,e),e}catch(e){return o.onError&&o.onError(e),i(s)}finally{n.delete(s)}});return n.set(s,f),f});exports.createCustomerGroupFetcher=t=>()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield t.fetchCustomerProfile();return o(e||{})}),exports.createCustomerSegmentSync=r=>{const o=t.CUSTOMER_GROUP_STORAGE_KEY,n=t.CUSTOMER_SEGMENT_REFRESH_EVENT;let u=null,d=0;const l=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(n,{detail:{customerGroup:e,refreshedAt:Date.now()}}))};return{refreshCustomerSegmentAfterLogin:()=>e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;if(u)return u;if(Date.now()-d<8e3){const e=i(o);return l(e),e}return u=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield s({fetchCustomerGroup:r.fetchCustomerGroup,isLoggedIn:r.isLoggedIn,forceRefresh:!0,onError:r.onError});return d=Date.now(),l(e),e}finally{u=null}}),u}),subscribeToCustomerSegmentRefresh:e=>{if("undefined"==typeof window)return()=>{};const t=t=>{e(t)};return window.addEventListener(n,t),()=>{window.removeEventListener(n,t)}},dispatchCustomerSegmentRefreshEvent:l}},exports.extractCustomerGroupFromProfile=o,exports.resolveCustomerGroup=s;
2
2
  //# sourceMappingURL=customerSegmentSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","customerGroup","relatedPartySegment","_b","_a","relatedParty","segment","inFlightCustomerGroupByStorageKey","Map","getCachedCustomerGroup","storageKey","window","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","resolveCustomerGroup","options","__awaiter","CUSTOMER_GROUP_STORAGE_KEY","newCustomerValue","isLoggedIn","forceRefresh","cachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","fetchCustomerGroup","error","onError","delete","set","customerProfile","fetchCustomerProfile","refreshEventName","CUSTOMER_SEGMENT_REFRESH_EVENT","minSyncIntervalMs","inFlightSync","lastSyncedAtMs","dispatchCustomerSegmentRefreshEvent","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","refreshCustomerSegmentAfterLogin","subscribeToCustomerSegmentRefresh","handler","eventListener","event","addEventListener","removeEventListener"],"mappings":"yGA8CA,MAAMA,EAA0BC,IAC9B,GAAqB,iBAAVA,EACT,OAAO,KAGT,MAAMC,EAAaD,EAAME,OACzB,OAAOD,EAAWE,OAAS,EAAIF,EAAa,MAGjCG,EAAmCC,YAC9C,MAAMC,EAAsBP,EAAuBM,aAAO,EAAPA,EAASE,eAC5D,GAAID,EACF,OAAOA,EAGT,MAAME,EAAsBT,EAAiD,QAA1BU,EAAqB,QAArBC,EAAAL,eAAAA,EAASM,oBAAY,IAAAD,OAAA,EAAAA,EAAG,UAAE,IAAAD,OAAA,EAAAA,EAAEG,SAC/E,OAAIJ,GAIG,MAYHK,EAAoC,IAAIC,IAExCC,EAA0BC,GACR,oBAAXC,OACF,KAGFlB,EAAuBkB,OAAOC,aAAaC,QAAQH,IAGtDI,EAAyB,CAACJ,EAAoBT,KAC5B,oBAAXU,SAIPV,EACFU,OAAOC,aAAaG,QAAQL,EAAYT,GAI1CU,OAAOC,aAAaI,WAAWN,KAGpBO,EACXC,GAC0BC,EAAAA,eAAA,OAAA,OAAA,EAAA,YAC1B,MAAMT,EAAaQ,EAAQR,YAAcU,EAAAA,2BACnCC,EAAmBH,EAAQG,kB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,EAAmB,CAC5C,MAAMd,EAAsBf,EAAuBC,GAEnD,OADA+B,EAAoCjB,GAC7BA,CACT,CAoBA,OAlBAe,EAA2BpB,EAAAA,eAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAMS,QAA8BX,EAAqB,CACvDY,mBAAoBX,EAAQW,mBAC5BP,WAAYJ,EAAQI,WACpBZ,aACAW,mBACAE,cAAc,EACdQ,QAASb,EAAQa,UAInB,OAFAS,EAAiBM,KAAKC,MACtBN,EAAoCb,GAC7BA,CACT,SACEW,EAAe,IACjB,CACF,GAEOA,CACT,GAsBEU,kCAnBAC,IAEA,GAAsB,oBAAXvC,OACT,MAAO,OAGT,MAAMwC,EAAgCC,IACpCF,EAAQE,IAKV,OAFAzC,OAAO0C,iBAAiBjB,EAAkBe,GAEnC,KACLxC,OAAO2C,oBAAoBlB,EAAkBe,KAO/CV"}
1
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","customerGroup","relatedPartySegment","_b","_a","relatedParty","segment","inFlightCustomerGroupByStorageKey","Map","getCachedCustomerGroup","storageKey","window","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","resolveCustomerGroup","options","__awaiter","CUSTOMER_GROUP_STORAGE_KEY","newCustomerValue","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","isLoggedIn","forceRefresh","cachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","fetchCustomerGroup","error","onError","delete","set","customerProfile","fetchCustomerProfile","refreshEventName","CUSTOMER_SEGMENT_REFRESH_EVENT","inFlightSync","lastSyncedAtMs","dispatchCustomerSegmentRefreshEvent","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","refreshCustomerSegmentAfterLogin","subscribeToCustomerSegmentRefresh","handler","eventListener","event","addEventListener","removeEventListener"],"mappings":"yGAyCA,MAAMA,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IxB,EAAYkB,GAC3CA,CACT,sCA7EEV,GAEO,IAAWC,EAAAA,eAAA,OAAA,OAAA,EAAA,YAChB,MAAMgB,QAAwBjB,EAAQkB,uBACtC,OAAOtC,EAAiCqC,GAAmB,GAC7D,qCA2EAjB,IAEA,MAAMR,EAAaU,EAAAA,2BACbiB,EAAmBC,EAAAA,+BAGzB,IAAIC,EAA8C,KAC9CC,EAAiB,EAErB,MAAMC,EAAuCxC,IACrB,oBAAXU,QAIXA,OAAO+B,cACL,IAAIC,YAA0CN,EAAkB,CAC9DO,OAAQ,CACN3C,gBACA4C,YAAaC,KAAKC,WA2D1B,MAAO,CACLC,iCAtDuC,IAAmC7B,EAAAA,eAAA,OAAA,OAAA,EAAA,YAC1E,GAAsB,oBAAXR,OACT,OAAO,KAGT,GAAI4B,EACF,OAAOA,EAIT,GADYO,KAAKC,MACPP,EAzGgC,IAyGI,CAC5C,MAAMf,EAAsBhB,EAAuBC,GAEnD,OADA+B,EAAoChB,GAC7BA,CACT,CAkBA,OAhBAc,EAA2BpB,EAAAA,eAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAMU,QAA8BZ,EAAqB,CACvDa,mBAAoBZ,EAAQY,mBAC5BP,WAAYL,EAAQK,WACpBC,cAAc,EACdQ,QAASd,EAAQc,UAInB,OAFAQ,EAAiBM,KAAKC,MACtBN,EAAoCZ,GAC7BA,CACT,SACEU,EAAe,IACjB,CACF,GAEOA,CACT,GAsBEU,kCAnBAC,IAEA,GAAsB,oBAAXvC,OACT,MAAO,OAGT,MAAMwC,EAAgCC,IACpCF,EAAQE,IAKV,OAFAzC,OAAO0C,iBAAiBhB,EAAkBc,GAEnC,KACLxC,OAAO2C,oBAAoBjB,EAAkBc,KAO/CV"}
@@ -1,2 +1,2 @@
1
- const e="center",t="left",s="right",r="transparent",o="00",c="#da291c",i="clicked",n="after",a="before",f="#ffffff",m="h1",d="h2",h="h3",l="h4",g="extra",u="semiextra",b="none",p=1439,R=1023,A=767,P="stack",U="col-lg-6",x="col-lg-4",D="col-lg-3",E="en",G="sunriseAuth",k=768,S=1024,T=1440,_="img",v="icon",y="svg",B="auth-stamp",F="PreToPost",I="customerGroup",L="dismissedRibbonsByUid",M="ribbonDismissUpdated",X="customerSegmentRefresh",j="one-commerce-cartId",q="SMART_UPGRADE",w="FLEX_UPGRADE";export{n as AFTER,G as AUTHCOOKIE,B as AUTHSTAMP,a as BEFORE,j as CART_COOKIE,e as CENTER,D as COLLG3,x as COLLG4,U as COLLG6,f as COLORWHITE,I as CUSTOMER_GROUP_STORAGE_KEY,X as CUSTOMER_SEGMENT_REFRESH_EVENT,E as DEFAULTLOCALE,L as DISMISSED_RIBBONS_STORAGE_KEY,g as EXTRA,i as FALCONBUTTONCLICKED,w as FLEX_UPGRADE,m as H1,d as H2,h as H3,l as H4,v as ICON,_ as IMG,t as LEFT,T as LGDESKSTART,p as MDDESKEND,S as MDDESKSTART,A as MOBEND,b as NONE,F as PRE_TO_POST_PROMOTION_ID,c as PRIMARYCOLORS,M as RIBBON_DISMISS_UPDATED_EVENT,s as RIGHT,u as SEMIEXTRA,q as SMART_UPGRADE,P as STACK,y as SVG,R as TABEND,k as TABSTART,r as TRANSPARENT,o as ZEROES};
1
+ const e="center",t="left",s="right",r="transparent",o="00",c="#da291c",i="clicked",n="after",a="before",f="#ffffff",m="h1",d="h2",h="h3",l="h4",g="extra",u="semiextra",R="none",b=1439,p=1023,E=767,U="stack",A="col-lg-6",P="col-lg-4",x="col-lg-3",D="en",G="sunriseAuth",S=768,T=1024,_=1440,k="img",M="icon",v="svg",y="auth-stamp",B="PreToPost",C="customerGroup",F="NEW_CUSTOMER",I="dismissedRibbonsByUid",L="ribbonDismissUpdated",N="customerSegmentRefresh",O="one-commerce-cartId",W="SMART_UPGRADE",X="FLEX_UPGRADE";export{n as AFTER,G as AUTHCOOKIE,y as AUTHSTAMP,a as BEFORE,O as CART_COOKIE,e as CENTER,x as COLLG3,P as COLLG4,A as COLLG6,f as COLORWHITE,F as CUSTOMER_GROUP_NEW_CUSTOMER_VALUE,C as CUSTOMER_GROUP_STORAGE_KEY,N as CUSTOMER_SEGMENT_REFRESH_EVENT,D as DEFAULTLOCALE,I as DISMISSED_RIBBONS_STORAGE_KEY,g as EXTRA,i as FALCONBUTTONCLICKED,X as FLEX_UPGRADE,m as H1,d as H2,h as H3,l as H4,M as ICON,k as IMG,t as LEFT,_ as LGDESKSTART,b as MDDESKEND,T as MDDESKSTART,E as MOBEND,R as NONE,B as PRE_TO_POST_PROMOTION_ID,c as PRIMARYCOLORS,L as RIBBON_DISMISS_UPDATED_EVENT,s as RIGHT,u as SEMIEXTRA,W as SMART_UPGRADE,U as STACK,v as SVG,p as TABEND,S as TABSTART,r as TRANSPARENT,o as ZEROES};
2
2
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY","DISMISSED_RIBBONS_STORAGE_KEY","RIBBON_DISMISS_UPDATED_EVENT","CUSTOMER_SEGMENT_REFRESH_EVENT","CART_COOKIE","SMART_UPGRADE","FLEX_UPGRADE"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B,gBAC7BC,EAAgC,wBAChCC,EAA+B,uBAC/BC,EAAiC,yBACjCC,EAAc,sBACdC,EAAgB,gBAChBC,EAAe"}
1
+ {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","DISMISSED_RIBBONS_STORAGE_KEY","RIBBON_DISMISS_UPDATED_EVENT","CUSTOMER_SEGMENT_REFRESH_EVENT","CART_COOKIE","SMART_UPGRADE","FLEX_UPGRADE"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B,gBAC7BC,EAAoC,eACpCC,EAAgC,wBAChCC,EAA+B,uBAC/BC,EAAiC,yBACjCC,EAAc,sBACdC,EAAgB,gBAChBC,EAAe"}
@@ -1,3 +1,3 @@
1
1
  import './StageTeaserV3.css';
2
- import{__awaiter as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";import{useState as l,useRef as t,useEffect as o}from"react";import r from"react-loading-skeleton";import"react-loading-skeleton/dist/skeleton.css";import s from"./StageTeaserSwiperV3.js";import d from"./StageTeaserV3.module.scss.js";import u from"./DoubleGrid/DoubleGridComponent.js";import m from"./SingleGrid/SingleGridComponent.js";import{calculateDateTime as a}from"../RibbonComponent/utils.js";import{customerGroup as c}from"../../services/CustomerService.js";import{resolveCustomerGroup as v,createCustomerGroupFetcher as f}from"../../services/customerSegmentSync.js";import{getCookie as g}from"cookies-next";import{AUTHCOOKIE as p,CUSTOMER_SEGMENT_REFRESH_EVENT as S,CUSTOMER_GROUP_STORAGE_KEY as h}from"../Constants.js";const w=r.default||r,y=f({fetchCustomerProfile:c}),T=({content:r})=>{var c,f,T,C;const[b,E]=l(null),[x,V]=l(null),[N,O]=l(!0),[j,W]=l(!1),[A,F]=l(!1),[$,I]=l(!1),[L,M]=l(null),[k,B]=l(0),R=t(null),_=t(null),D=t(null),G=!!g(p),U=e=>e?a(new Date(e.trim().replace(/-/g,"/"))):null,H=(e,i)=>{const n=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase());return!n.length||!!i.size&&n.some(e=>i.has(e))},z=e=>(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim()).length>0,X=(e,i,n=!1)=>{const l=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase()),t=l.length>0;return i?!!l.includes("all")||l.includes(i.toLowerCase()):!!n&&(!t||l.includes("all"))};o(()=>{if("undefined"==typeof window)return;const e=()=>{B(e=>e+1)};return window.addEventListener(S,e),()=>{window.removeEventListener(S,e)}},[]),o(()=>{let i=!0;return e(void 0,void 0,void 0,function*(){i&&(O(!0),W(!1),F(!1),I(!1));const e=D.current,n=null!==e&&e!==G,l=!0===e&&!G;if(D.current=G,l&&"undefined"!=typeof window&&window.localStorage.removeItem(h),n&&V(null),"undefined"!=typeof window){const e=window.localStorage.getItem(h);if(e&&!n&&G&&"NEW_CUSTOMER"!==e)return V(e),F(!1),void W(!0)}if(!G)return V("NEW_CUSTOMER"),"undefined"!=typeof window&&window.localStorage.setItem(h,"NEW_CUSTOMER"),F(!1),void W(!0);try{const e=yield v({fetchCustomerGroup:y,isLoggedIn:()=>G,storageKey:h,newCustomerValue:"NEW_CUSTOMER"});i&&(V(e),F(!1),"undefined"!=typeof window&&e&&window.localStorage.setItem(h,e),W(!0))}catch(e){i&&(V(null),F(!0),W(!0))}}),()=>{i=!1}},[G,k]),o(()=>{const e=()=>{R.current&&(clearTimeout(R.current),R.current=null)};if(!j)return void I(!1);const i=A&&!x;if(!x&&!i)return void(j&&(E(null),I(!0),O(!1)));I(!1);const n=(null==r?void 0:r.teaserSlides)||[],l=(()=>{if("undefined"==typeof window)return new Set;const e=window.localStorage.getItem("tealium_va");if(!e)return new Set;try{const i=JSON.parse(e),n=null==i?void 0:i.audiences;return n&&"object"==typeof n?new Set(Object.keys(n).filter(Boolean).map(e=>String(e).trim().toLowerCase())):new Set}catch(e){return new Set}})(),t={FIXNET:null==r?void 0:r.fixnetOrder,MOBILE:null==r?void 0:r.mobileOrder,FIXNET_MOBILE:null==r?void 0:r.mobileFixnetOrder,DEFAULT:null==r?void 0:r.defaultOrder},o=x?t[x]:null;if(o){const e=o.split(",").map(e=>e.trim()).filter(e=>e.length>0),i=new Map(e.map((e,i)=>[e,i])),l=new Map(n.map((e,i)=>[e,i]));n.sort((e,n)=>{var t,o,r,s,d,u;const m=String(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"").trim(),a=String(null!==(o=null==n?void 0:n.id)&&void 0!==o?o:"").trim(),c=null!==(r=l.get(e))&&void 0!==r?r:0,v=null!==(s=l.get(n))&&void 0!==s?s:0,f=null!==(d=i.get(m))&&void 0!==d?d:i.get(String(c)),g=null!==(u=i.get(a))&&void 0!==u?u:i.get(String(v));return null==f&&null==g?c-v:null==f?1:null==g?-1:Number(f)-Number(g)})}const s=n.filter(e=>!0===(null==e?void 0:e.active)&&(z(null==e?void 0:e.tealiumAudiences)?H(null==e?void 0:e.tealiumAudiences,l):X(null==e?void 0:e.customerType,x,i))),d=()=>{const e=new Date,i=[];s.forEach(n=>{((e,i)=>{const n=U(null==e?void 0:e.scheduleStartTime),l=U(null==e?void 0:e.scheduleEndTime),t=!n||i.getTime()>=n.getTime(),o=!l||l.getTime()>i.getTime();return t&&o})(n,e)&&(i.includes(n)||i.push(n))}),E(i.length>0?i:null),I(!0),O(!1)},u=()=>{e();const n=((null==r?void 0:r.teaserSlides)||[]).filter(e=>!0===(null==e?void 0:e.active)&&(z(null==e?void 0:e.tealiumAudiences)?H(null==e?void 0:e.tealiumAudiences,l):X(null==e?void 0:e.customerType,x,i))),t=(new Date).getTime(),o=n.flatMap(e=>{const i=[],n=U(null==e?void 0:e.scheduleStartTime),l=U(null==e?void 0:e.scheduleEndTime);if(n){const e=n.getTime();e>t&&i.push(e)}if(l){const e=l.getTime();e>t&&i.push(e)}return i}).sort((e,i)=>e-i)[0];if(!o)return;const s=o-t;R.current=setTimeout(()=>{d(),u()},Math.max(s,0))};return d(),u(),()=>{e()}},[null==r?void 0:r.teaserSlides,x,j,A]),o(()=>{if(!_.current||!(null==b?void 0:b.length))return;const e=()=>{var e;const i=null===(e=_.current)||void 0===e?void 0:e.offsetHeight;i&&i>0&&M(i)};e();const i=new ResizeObserver(e);return i.observe(_.current),()=>{i.disconnect()}},[null==b?void 0:b.length,null==r?void 0:r.isSlimVersion,null==r?void 0:r.isFullWidth]);const J=null==r?void 0:r.isFullWidth,K=null===(c=null==r?void 0:r.solidBgColor)||void 0===c?void 0:c.color,P="undefined"==typeof window?1368:window.innerWidth,q=P>=1024,Q=(null==r?void 0:r.isSlimVersion)?480:q?550:500,Y=J?0:48,Z=(null===(f=null==r?void 0:r.teaserSlides)||void 0===f?void 0:f.length)>1?34:0,ee=L||Q+Y+Z,ie=(()=>{if(!J)return P<768?"320px":P<1024?"660px":P>=1920?"1368px":"960px"})(),ne=J?void 0:{width:ie},le=(e,n)=>"single"===(null==e?void 0:e.layoutgrid)?i(m,{content:e,isFullWidth:J,isSlimVersion:null==r?void 0:r.isSlimVersion,isFirstSlide:0===n},n):i(u,{content:e,isFullWidth:J,isSlimVersion:null==r?void 0:r.isSlimVersion,isFirstSlide:0===n},n),te=i("div",{ref:_,className:`${d.outerContainer} ${J?d.fullWidth:""} ${(null==r?void 0:r.isSlimVersion)&&J?d.slimVersion:""}`,style:{backgroundColor:K,minHeight:`${ee}px`},children:(null==b?void 0:b.length)>1?i(s,{content:r,isFullWidth:J,children:null===(T=b||[])||void 0===T?void 0:T.map((e,i)=>le(e,i))}):i("div",{className:J?"":d.singleSlideCentered,style:ne,children:le(null==b?void 0:b[0],0)})});if(N||!j||!$){const e=(null===(C=null==r?void 0:r.teaserSlides)||void 0===C?void 0:C.length)>1,l={backgroundColor:K,minHeight:`${ee}px`},t={display:"block",height:`${Q}px`};return i("div",{className:`${d.outerContainer} ${J?d.fullWidth:""} ${(null==r?void 0:r.isSlimVersion)&&J?d.slimVersion:""}`,style:l,children:n("div",{className:J?"":d.singleSlideCentered,style:ne,children:[i("div",{className:`${d.skeletonContainer} ${(null==r?void 0:r.isSlimVersion)?d.slimVersion:""}`,children:i(w,{height:"100%",borderRadius:J?0:32,style:t})}),e&&i("div",{style:{marginTop:"24px",height:"10px"}})]})})}return(null==b?void 0:b.length)?te:null};export{T as default};
2
+ import{__awaiter as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";import{useState as l,useRef as t,useEffect as o}from"react";import r from"react-loading-skeleton";import"react-loading-skeleton/dist/skeleton.css";import s from"./StageTeaserSwiperV3.js";import d from"./StageTeaserV3.module.scss.js";import u from"./DoubleGrid/DoubleGridComponent.js";import m from"./SingleGrid/SingleGridComponent.js";import{calculateDateTime as a}from"../RibbonComponent/utils.js";import{customerGroup as c}from"../../services/CustomerService.js";import{resolveCustomerGroup as v,createCustomerGroupFetcher as f}from"../../services/customerSegmentSync.js";import{getCookie as g}from"cookies-next";import{AUTHCOOKIE as p,CUSTOMER_SEGMENT_REFRESH_EVENT as h,CUSTOMER_GROUP_STORAGE_KEY as w,CUSTOMER_GROUP_NEW_CUSTOMER_VALUE as S}from"../Constants.js";const y=r.default||r,T=f({fetchCustomerProfile:c}),C=({content:r})=>{var c,f,C,b;const[x,V]=l(null),[j,A]=l(null),[F,$]=l(!0),[E,I]=l(!1),[L,N]=l(!1),[k,O]=l(!1),[W,B]=l(null),[D,M]=l(0),G=t(null),H=t(null),R=t(null),_=!!g(p),z=e=>e?a(new Date(e.trim().replace(/-/g,"/"))):null,X=(e,i)=>{const n=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase());return!n.length||!!i.size&&n.some(e=>i.has(e))},J=e=>(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim()).length>0,P=(e,i,n=!1)=>{const l=(Array.isArray(e)?e:[e]).filter(Boolean).map(e=>String(e).trim().toLowerCase()),t=l.length>0;return i?!!l.includes("all")||l.includes(i.toLowerCase()):!!n&&(!t||l.includes("all"))};o(()=>{if("undefined"==typeof window)return;const e=()=>{M(e=>e+1)};return window.addEventListener(h,e),()=>{window.removeEventListener(h,e)}},[]),o(()=>{let i=!0;return e(void 0,void 0,void 0,function*(){i&&($(!0),I(!1),N(!1),O(!1));const e=R.current,n=null!==e&&e!==_,l=!0===e&&!_;if(R.current=_,l&&"undefined"!=typeof window&&window.localStorage.removeItem(w),n&&A(null),"undefined"!=typeof window){const e=window.localStorage.getItem(w);if(e&&!n&&_&&e!==S)return A(e),N(!1),void I(!0)}if(!_)return A(S),"undefined"!=typeof window&&window.localStorage.setItem(w,S),N(!1),void I(!0);try{const e=yield v({fetchCustomerGroup:T,isLoggedIn:()=>_});i&&(A(e),N(!1),"undefined"!=typeof window&&e&&window.localStorage.setItem(w,e),I(!0))}catch(e){i&&(A(null),N(!0),I(!0))}}),()=>{i=!1}},[_,D]),o(()=>{const e=()=>{G.current&&(clearTimeout(G.current),G.current=null)};if(!E)return void O(!1);const i=L&&!j;if(!j&&!i)return void(E&&(V(null),O(!0),$(!1)));O(!1);const n=(null==r?void 0:r.teaserSlides)||[],l=(()=>{if("undefined"==typeof window)return new Set;const e=window.localStorage.getItem("tealium_va");if(!e)return new Set;try{const i=JSON.parse(e),n=null==i?void 0:i.audiences;return n&&"object"==typeof n?new Set(Object.keys(n).filter(Boolean).map(e=>String(e).trim().toLowerCase())):new Set}catch(e){return new Set}})(),t={FIXNET:null==r?void 0:r.fixnetOrder,MOBILE:null==r?void 0:r.mobileOrder,FIXNET_MOBILE:null==r?void 0:r.mobileFixnetOrder,DEFAULT:null==r?void 0:r.defaultOrder},o=j?t[j]:null;if(o){const e=o.split(",").map(e=>e.trim()).filter(e=>e.length>0),i=new Map(e.map((e,i)=>[e,i])),l=new Map(n.map((e,i)=>[e,i]));n.sort((e,n)=>{var t,o,r,s,d,u;const m=String(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"").trim(),a=String(null!==(o=null==n?void 0:n.id)&&void 0!==o?o:"").trim(),c=null!==(r=l.get(e))&&void 0!==r?r:0,v=null!==(s=l.get(n))&&void 0!==s?s:0,f=null!==(d=i.get(m))&&void 0!==d?d:i.get(String(c)),g=null!==(u=i.get(a))&&void 0!==u?u:i.get(String(v));return null==f&&null==g?c-v:null==f?1:null==g?-1:Number(f)-Number(g)})}const s=n.filter(e=>!0===(null==e?void 0:e.active)&&(J(null==e?void 0:e.tealiumAudiences)?X(null==e?void 0:e.tealiumAudiences,l):P(null==e?void 0:e.customerType,j,i))),d=()=>{const e=new Date,i=[];s.forEach(n=>{((e,i)=>{const n=z(null==e?void 0:e.scheduleStartTime),l=z(null==e?void 0:e.scheduleEndTime),t=!n||i.getTime()>=n.getTime(),o=!l||l.getTime()>i.getTime();return t&&o})(n,e)&&(i.includes(n)||i.push(n))}),V(i.length>0?i:null),O(!0),$(!1)},u=()=>{e();const n=((null==r?void 0:r.teaserSlides)||[]).filter(e=>!0===(null==e?void 0:e.active)&&(J(null==e?void 0:e.tealiumAudiences)?X(null==e?void 0:e.tealiumAudiences,l):P(null==e?void 0:e.customerType,j,i))),t=(new Date).getTime(),o=n.flatMap(e=>{const i=[],n=z(null==e?void 0:e.scheduleStartTime),l=z(null==e?void 0:e.scheduleEndTime);if(n){const e=n.getTime();e>t&&i.push(e)}if(l){const e=l.getTime();e>t&&i.push(e)}return i}).sort((e,i)=>e-i)[0];if(!o)return;const s=o-t;G.current=setTimeout(()=>{d(),u()},Math.max(s,0))};return d(),u(),()=>{e()}},[null==r?void 0:r.teaserSlides,j,E,L]),o(()=>{if(!H.current||!(null==x?void 0:x.length))return;const e=()=>{var e;const i=null===(e=H.current)||void 0===e?void 0:e.offsetHeight;i&&i>0&&B(i)};e();const i=new ResizeObserver(e);return i.observe(H.current),()=>{i.disconnect()}},[null==x?void 0:x.length,null==r?void 0:r.isSlimVersion,null==r?void 0:r.isFullWidth]);const U=null==r?void 0:r.isFullWidth,q=null===(c=null==r?void 0:r.solidBgColor)||void 0===c?void 0:c.color,K="undefined"==typeof window?1368:window.innerWidth,Q=K>=1024,Y=(null==r?void 0:r.isSlimVersion)?480:Q?550:500,Z=U?0:48,ee=(null===(f=null==r?void 0:r.teaserSlides)||void 0===f?void 0:f.length)>1?34:0,ie=W||Y+Z+ee,ne=(()=>{if(!U)return K<768?"320px":K<1024?"660px":K>=1920?"1368px":"960px"})(),le=U?void 0:{width:ne},te=(e,n)=>"single"===(null==e?void 0:e.layoutgrid)?i(m,{content:e,isFullWidth:U,isSlimVersion:null==r?void 0:r.isSlimVersion,isFirstSlide:0===n},n):i(u,{content:e,isFullWidth:U,isSlimVersion:null==r?void 0:r.isSlimVersion,isFirstSlide:0===n},n),oe=i("div",{ref:H,className:`${d.outerContainer} ${U?d.fullWidth:""} ${(null==r?void 0:r.isSlimVersion)&&U?d.slimVersion:""}`,style:{backgroundColor:q,minHeight:`${ie}px`},children:(null==x?void 0:x.length)>1?i(s,{content:r,isFullWidth:U,children:null===(C=x||[])||void 0===C?void 0:C.map((e,i)=>te(e,i))}):i("div",{className:U?"":d.singleSlideCentered,style:le,children:te(null==x?void 0:x[0],0)})});if(F||!E||!k){const e=(null===(b=null==r?void 0:r.teaserSlides)||void 0===b?void 0:b.length)>1,l={backgroundColor:q,minHeight:`${ie}px`},t={display:"block",height:`${Y}px`};return i("div",{className:`${d.outerContainer} ${U?d.fullWidth:""} ${(null==r?void 0:r.isSlimVersion)&&U?d.slimVersion:""}`,style:l,children:n("div",{className:U?"":d.singleSlideCentered,style:le,children:[i("div",{className:`${d.skeletonContainer} ${(null==r?void 0:r.isSlimVersion)?d.slimVersion:""}`,children:i(y,{height:"100%",borderRadius:U?0:32,style:t})}),e&&i("div",{style:{marginTop:"24px",height:"10px"}})]})})}return(null==x?void 0:x.length)?oe:null};export{C as default};
3
3
  //# sourceMappingURL=StageTeaserV3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StageTeaserV3.js","sources":["../../../../../src/components/StageTeaserV3/StageTeaserV3.tsx"],"sourcesContent":[null],"names":["Skeleton","SkeletonRaw","default","fetchCustomerGroup","createCustomerGroupFetcher","fetchCustomerProfile","customerGroup","StageTeaserV3","content","displayArray","setdisplayArray","useState","customerGroupValue","setCustomerGroupValue","isInitialSkeletonVisible","setIsInitialSkeletonVisible","isCustomerGroupResolved","setIsCustomerGroupResolved","didCustomerGroupApiFail","setDidCustomerGroupApiFail","isDisplaySlidesFiltered","setIsDisplaySlidesFiltered","measuredTeaserHeight","setMeasuredTeaserHeight","customerSegmentRefreshVersion","setCustomerSegmentRefreshVersion","recalculateTimerRef","useRef","teaserContainerRef","previousExistingCustomerRef","existingCustomer","getCookie","AUTHCOOKIE","getScheduleDateTime","value","calculateDateTime","Date","trim","replace","matchesTealiumAudiences","slideAudiences","availableAudiences","normalizedSlideAudiences","Array","isArray","filter","Boolean","map","audience","String","toLowerCase","length","size","some","has","hasTealiumAudiencesConfigured","matchesCustomerType","customerType","allowAllOrUnsetAudienceFallback","normalizedTypes","type","hasAudienceConfigured","includes","useEffect","window","onCustomerSegmentRefresh","previousValue","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","removeEventListener","isMounted","__awaiter","previousExistingCustomer","current","hasExistingCustomerChanged","didCustomerLogout","localStorage","removeItem","CUSTOMER_GROUP_STORAGE_KEY","cachedGroup","getItem","setItem","resolvedGroup","resolveCustomerGroup","isLoggedIn","storageKey","newCustomerValue","error","clearRecalculateTimer","clearTimeout","shouldUseAllAudienceFallback","teaserSlides","availableTealiumAudiences","Set","rawValue","parsed","JSON","parse","audiences","Object","keys","getTealiumAudienceKeys","orderConfig","FIXNET","fixnetOrder","MOBILE","mobileOrder","FIXNET_MOBILE","mobileFixnetOrder","DEFAULT","defaultOrder","selectedOrder","orderKeys","split","orderMap","Map","index","originalIndexMap","slide","sort","a","b","aIdKey","_a","id","bIdKey","_b","aOriginalIndex","_c","get","bOriginalIndex","_d","aIndex","_e","bIndex","_f","Number","activeSlides","slider","active","tealiumAudiences","recalculateDisplayArray","presentTime","toDisplay","forEach","currentTime","startTime","scheduleStartTime","endTime","scheduleEndTime","hasStarted","getTime","notExpired","isSlideWithinScheduleWindow","push","scheduleNextStartRecalculation","presentTimeMs","nextRecalculationTimeMs","flatMap","times","startTimeMs","endTimeMs","delay","setTimeout","Math","max","updateHeight","nextHeight","offsetHeight","observer","ResizeObserver","observe","disconnect","isSlimVersion","isFullWidth","solidBackGroundColor","solidBgColor","color","fallbackViewportWidth","innerWidth","isDesktopViewport","baseTeaserHeight","outerPaddingHeight","estimatedDotsHeight","reservedTeaserHeight","centeredSlideWidth","singleSlideContainerStyle","undefined","width","renderTeaserCard","card","key","layoutgrid","_jsx","SingleGridComponent","isFirstSlide","DoubleGridComponent","stageTeaserJsx","ref","className","Styles","outerContainer","fullWidth","slimVersion","style","backgroundColor","minHeight","children","StageTeaserSwiperV3","singleSlideCentered","showDots","loadingContainerStyle","loadingSkeletonStyle","display","height","_jsxs","skeletonContainer","borderRadius","marginTop"],"mappings":"40BAIA,MAAMA,EAAYC,EAAoBC,SAAWD,EAiB3CE,EAAqBC,EAA2B,CACpDC,qBAAsBC,IAIlBC,EAA2B,EAAGC,0BAClC,MAAOC,EAAcC,GAAmBC,EAAc,OAC/CC,EAAoBC,GAAyBF,EAAc,OAC3DG,EAA0BC,GAA+BJ,GAAkB,IAC3EK,EAAyBC,GAA8BN,GAAkB,IACzEO,EAAyBC,GAA8BR,GAAkB,IACzES,EAAyBC,GAA8BV,GAAkB,IACzEW,EAAsBC,GAA2BZ,EAAwB,OACzEa,EAA+BC,GAAoCd,EAAiB,GACrFe,EAAsBC,EAA6C,MACnEC,EAAqBD,EAA8B,MACnDE,EAA8BF,EAAuB,MAErDG,IADiBC,EAAUC,GAG3BC,EAAuBC,GACtBA,EAIEC,EAAkB,IAAIC,KAAKF,EAAMG,OAAOC,QAAQ,KAAM,OAHpD,KAkCLC,EAA0B,CAACC,EAAqBC,KACpD,MAAMC,GAA4BC,MAAMC,QAAQJ,GAAkBA,EAAiB,CAACA,IACjFK,OAAOC,SACPC,IAAKC,GAAkBC,OAAOD,GAAUX,OAAOa,eAElD,OAAKR,EAAyBS,UAIzBV,EAAmBW,MAIjBV,EAAyBW,KAAML,GAAaP,EAAmBa,IAAIN,KAGtEO,EAAiCf,IACHG,MAAMC,QAAQJ,GAAkBA,EAAiB,CAACA,IACjFK,OAAOC,SACPC,IAAKC,GAAkBC,OAAOD,GAAUX,QAE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B,EAAA,MAAA,CAAKW,MAAO,CAAEc,UAAW,OAAQJ,OAAQ,cAKnD,CAEA,OAAI7M,aAAY,EAAZA,EAAc0C,QACTkJ,GAGF"}
1
+ {"version":3,"file":"StageTeaserV3.js","sources":["../../../../../src/components/StageTeaserV3/StageTeaserV3.tsx"],"sourcesContent":[null],"names":["Skeleton","SkeletonRaw","default","fetchCustomerGroup","createCustomerGroupFetcher","fetchCustomerProfile","customerGroup","StageTeaserV3","content","displayArray","setdisplayArray","useState","customerGroupValue","setCustomerGroupValue","isInitialSkeletonVisible","setIsInitialSkeletonVisible","isCustomerGroupResolved","setIsCustomerGroupResolved","didCustomerGroupApiFail","setDidCustomerGroupApiFail","isDisplaySlidesFiltered","setIsDisplaySlidesFiltered","measuredTeaserHeight","setMeasuredTeaserHeight","customerSegmentRefreshVersion","setCustomerSegmentRefreshVersion","recalculateTimerRef","useRef","teaserContainerRef","previousExistingCustomerRef","existingCustomer","getCookie","AUTHCOOKIE","getScheduleDateTime","value","calculateDateTime","Date","trim","replace","matchesTealiumAudiences","slideAudiences","availableAudiences","normalizedSlideAudiences","Array","isArray","filter","Boolean","map","audience","String","toLowerCase","length","size","some","has","hasTealiumAudiencesConfigured","matchesCustomerType","customerType","allowAllOrUnsetAudienceFallback","normalizedTypes","type","hasAudienceConfigured","includes","useEffect","window","onCustomerSegmentRefresh","previousValue","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","removeEventListener","isMounted","__awaiter","previousExistingCustomer","current","hasExistingCustomerChanged","didCustomerLogout","localStorage","removeItem","CUSTOMER_GROUP_STORAGE_KEY","cachedGroup","getItem","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","setItem","resolvedGroup","resolveCustomerGroup","isLoggedIn","error","clearRecalculateTimer","clearTimeout","shouldUseAllAudienceFallback","teaserSlides","availableTealiumAudiences","Set","rawValue","parsed","JSON","parse","audiences","Object","keys","getTealiumAudienceKeys","orderConfig","FIXNET","fixnetOrder","MOBILE","mobileOrder","FIXNET_MOBILE","mobileFixnetOrder","DEFAULT","defaultOrder","selectedOrder","orderKeys","split","orderMap","Map","index","originalIndexMap","slide","sort","a","b","aIdKey","_a","id","bIdKey","_b","aOriginalIndex","_c","get","bOriginalIndex","_d","aIndex","_e","bIndex","_f","Number","activeSlides","slider","active","tealiumAudiences","recalculateDisplayArray","presentTime","toDisplay","forEach","currentTime","startTime","scheduleStartTime","endTime","scheduleEndTime","hasStarted","getTime","notExpired","isSlideWithinScheduleWindow","push","scheduleNextStartRecalculation","presentTimeMs","nextRecalculationTimeMs","flatMap","times","startTimeMs","endTimeMs","delay","setTimeout","Math","max","updateHeight","nextHeight","offsetHeight","observer","ResizeObserver","observe","disconnect","isSlimVersion","isFullWidth","solidBackGroundColor","solidBgColor","color","fallbackViewportWidth","innerWidth","isDesktopViewport","baseTeaserHeight","outerPaddingHeight","estimatedDotsHeight","reservedTeaserHeight","centeredSlideWidth","singleSlideContainerStyle","undefined","width","renderTeaserCard","card","key","layoutgrid","_jsx","SingleGridComponent","isFirstSlide","DoubleGridComponent","stageTeaserJsx","ref","className","Styles","outerContainer","fullWidth","slimVersion","style","backgroundColor","minHeight","children","StageTeaserSwiperV3","singleSlideCentered","showDots","loadingContainerStyle","loadingSkeletonStyle","display","height","_jsxs","skeletonContainer","borderRadius","marginTop"],"mappings":"m3BAIA,MAAMA,EAAYC,EAAoBC,SAAWD,EAkB3CE,EAAqBC,EAA2B,CACpDC,qBAAsBC,IAIlBC,EAA2B,EAAGC,0BAClC,MAAOC,EAAcC,GAAmBC,EAAc,OAC/CC,EAAoBC,GAAyBF,EAAc,OAC3DG,EAA0BC,GAA+BJ,GAAkB,IAC3EK,EAAyBC,GAA8BN,GAAkB,IACzEO,EAAyBC,GAA8BR,GAAkB,IACzES,EAAyBC,GAA8BV,GAAkB,IACzEW,EAAsBC,GAA2BZ,EAAwB,OACzEa,EAA+BC,GAAoCd,EAAiB,GACrFe,EAAsBC,EAA6C,MACnEC,EAAqBD,EAA8B,MACnDE,E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,OAGb,OACEY,EAAA,MAAA,CACEM,UAAW,GAAGC,EAAOC,kBACnB3B,EAAc0B,EAAOE,UAAY,OAC/BjM,aAAO,EAAPA,EAASoK,gBAAiBC,EAAc0B,EAAOG,YAAc,KACjEC,MAAOO,EAAqBJ,SAE5BQ,EAAA,MAAA,CACEhB,UAAYzB,EAA2C,GAA7B0B,EAAOS,oBACjCL,MAAOlB,GAAyBqB,SAAA,CAEhCd,SAAKM,UAAW,GAAGC,EAAOgB,sBAAqB/M,aAAO,EAAPA,EAASoK,eAAgB2B,EAAOG,YAAc,cAC3FV,EAAChM,EAAQ,CACPqN,OAAO,OACPG,aAAc3C,EAAc,EAAI,GAChC8B,MAAOQ,MAGVF,GACCjB,EAAA,MAAA,CAAKW,MAAO,CAAEc,UAAW,OAAQJ,OAAQ,cAKnD,CAEA,OAAI5M,aAAY,EAAZA,EAAc0C,QACTiJ,GAGF"}
@@ -1,2 +1,2 @@
1
- import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{CUSTOMER_GROUP_STORAGE_KEY as n,CUSTOMER_SEGMENT_REFRESH_EVENT as o}from"../components/Constants.js";const t=e=>{if("string"!=typeof e)return null;const n=e.trim();return n.length>0?n:null},r=e=>{var n,o;const r=t(null==e?void 0:e.customerGroup);if(r)return r;const i=t(null===(o=null===(n=null==e?void 0:e.relatedParty)||void 0===n?void 0:n[0])||void 0===o?void 0:o.segment);return i||null},i=n=>()=>e(void 0,void 0,void 0,function*(){const e=yield n.fetchCustomerProfile();return r(e||{})}),u=new Map,d=e=>"undefined"==typeof window?null:t(window.localStorage.getItem(e)),s=(e,n)=>{"undefined"!=typeof window&&(n?window.localStorage.setItem(e,n):window.localStorage.removeItem(e))},l=o=>e(void 0,void 0,void 0,function*(){const r=o.storageKey||n,i=o.newCustomerValue||"NEW_CUSTOMER";if("undefined"==typeof window)return null;if(!o.isLoggedIn())return s(r,i),i;if(!o.forceRefresh){const e=d(r);if(e&&e!==i)return e}const l=u.get(r);if(l)return l;const f=e(void 0,void 0,void 0,function*(){try{const e=t(yield o.fetchCustomerGroup());return s(r,e),e}catch(e){return o.onError&&o.onError(e),d(r)}finally{u.delete(r)}});return u.set(r,f),f}),f=t=>{var r;const i=t.storageKey||n,u=t.refreshEventName||o,s=null!==(r=t.minSyncIntervalMs)&&void 0!==r?r:8e3,f=t.newCustomerValue||"NEW_CUSTOMER";let c=null,v=0;const w=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(u,{detail:{customerGroup:e,refreshedAt:Date.now()}}))};return{refreshCustomerSegmentAfterLogin:()=>e(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;if(c)return c;if(Date.now()-v<s){const e=d(i);return w(e),e}return c=e(void 0,void 0,void 0,function*(){try{const e=yield l({fetchCustomerGroup:t.fetchCustomerGroup,isLoggedIn:t.isLoggedIn,storageKey:i,newCustomerValue:f,forceRefresh:!0,onError:t.onError});return v=Date.now(),w(e),e}finally{c=null}}),c}),subscribeToCustomerSegmentRefresh:e=>{if("undefined"==typeof window)return()=>{};const n=n=>{e(n)};return window.addEventListener(u,n),()=>{window.removeEventListener(u,n)}},dispatchCustomerSegmentRefreshEvent:w}};export{i as createCustomerGroupFetcher,f as createCustomerSegmentSync,r as extractCustomerGroupFromProfile,l as resolveCustomerGroup};
1
+ import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{CUSTOMER_GROUP_NEW_CUSTOMER_VALUE as n,CUSTOMER_GROUP_STORAGE_KEY as o,CUSTOMER_SEGMENT_REFRESH_EVENT as t}from"../components/Constants.js";const r=e=>{if("string"!=typeof e)return null;const n=e.trim();return n.length>0?n:null},i=e=>{var n,o;const t=r(null==e?void 0:e.customerGroup);if(t)return t;const i=r(null===(o=null===(n=null==e?void 0:e.relatedParty)||void 0===n?void 0:n[0])||void 0===o?void 0:o.segment);return i||null},d=n=>()=>e(void 0,void 0,void 0,function*(){const e=yield n.fetchCustomerProfile();return i(e||{})}),u=new Map,s=e=>"undefined"==typeof window?null:r(window.localStorage.getItem(e)),f=(e,n)=>{"undefined"!=typeof window&&(n?window.localStorage.setItem(e,n):window.localStorage.removeItem(e))},l=t=>e(void 0,void 0,void 0,function*(){const i=o,d=n;if("undefined"==typeof window)return null;if(!t.isLoggedIn())return f(i,d),d;if(!t.forceRefresh){const e=s(i);if(e&&e!==d)return e}const l=u.get(i);if(l)return l;const c=e(void 0,void 0,void 0,function*(){try{const e=r(yield t.fetchCustomerGroup());return f(i,e),e}catch(e){return t.onError&&t.onError(e),s(i)}finally{u.delete(i)}});return u.set(i,c),c}),c=n=>{const r=o,i=t;let d=null,u=0;const f=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{customerGroup:e,refreshedAt:Date.now()}}))};return{refreshCustomerSegmentAfterLogin:()=>e(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;if(d)return d;if(Date.now()-u<8e3){const e=s(r);return f(e),e}return d=e(void 0,void 0,void 0,function*(){try{const e=yield l({fetchCustomerGroup:n.fetchCustomerGroup,isLoggedIn:n.isLoggedIn,forceRefresh:!0,onError:n.onError});return u=Date.now(),f(e),e}finally{d=null}}),d}),subscribeToCustomerSegmentRefresh:e=>{if("undefined"==typeof window)return()=>{};const n=n=>{e(n)};return window.addEventListener(i,n),()=>{window.removeEventListener(i,n)}},dispatchCustomerSegmentRefreshEvent:f}};export{d as createCustomerGroupFetcher,c as createCustomerSegmentSync,i as extractCustomerGroupFromProfile,l as resolveCustomerGroup};
2
2
  //# sourceMappingURL=customerSegmentSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","customerGroup","relatedPartySegment","_b","_a","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","getCachedCustomerGroup","storageKey","window","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","resolveCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","newCustomerValue","isLoggedIn","forceRefresh","cachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","fetchCustomerGroup","error","onError","delete","set","createCustomerSegmentSync","refreshEventName","CUSTOMER_SEGMENT_REFRESH_EVENT","minSyncIntervalMs","inFlightSync","lastSyncedAtMs","dispatchCustomerSegmentRefreshEvent","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","refreshCustomerSegmentAfterLogin","subscribeToCustomerSegmentRefresh","handler","eventListener","event","addEventListener","removeEventListener"],"mappings":"2KA8CA,MAAMA,EAA0BC,IAC9B,GAAqB,iBAAVA,EACT,OAAO,KAGT,MAAMC,EAAaD,EAAME,OACzB,OAAOD,EAAWE,OAAS,EAAIF,EAAa,MAGjCG,EAAmCC,YAC9C,MAAMC,EAAsBP,EAAuBM,aAAO,EAAPA,EAASE,eAC5D,GAAID,EACF,OAAOA,EAGT,MAAME,EAAsBT,EAAiD,QAA1BU,EAAqB,QAArBC,EAAAL,eAAAA,EAASM,oBAAY,IAAAD,OAAA,EAAAA,EAAG,UAAE,IAAAD,OAAA,EAAAA,EAAEG,SAC/E,OAAIJ,GAIG,MAGIK,EACXC,GAEO,IAAWC,OAAA,OAAA,OAAA,EAAA,YAChB,MAAMC,QAAwBF,EAAQG,uBACtC,OAAOb,EAAiCY,GAAmB,GAC7D,GAGIE,EAAoC,IAAIC,IAExCC,EAA0BC,GACR,oBAAXC,OACF,KAGFvB,EAAuBuB,OAAOC,aAAaC,QAAQH,IAGtDI,EAAyB,CAACJ,EAAoBd,KAC5B,oBAAXe,SAIPf,EACFe,OAAOC,aAAaG,QAAQL,EAAYd,GAI1Ce,OAAOC,aAAaI,WAAWN,KAGpBO,EACXd,GAC0BC,OAAA,OAAA,OAAA,EAAA,YAC1B,MAAMM,EAAaP,EAAQO,YAAcQ,EACnCC,EAAmBhB,EAAQgB,kBAAoB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A8BT,EAAqB,CACvDU,mBAAoBxB,EAAQwB,mBAC5BP,WAAYjB,EAAQiB,WACpBV,aACAS,mBACAE,cAAc,EACdQ,QAAS1B,EAAQ0B,UAInB,OAFAQ,EAAiBM,KAAKC,MACtBN,EAAoCZ,GAC7BA,CACT,SACEU,EAAe,IACjB,CACF,GAEOA,CACT,GAsBEU,kCAnBAC,IAEA,GAAsB,oBAAXpC,OACT,MAAO,OAGT,MAAMqC,EAAgCC,IACpCF,EAAQE,IAKV,OAFAtC,OAAOuC,iBAAiBjB,EAAkBe,GAEnC,KACLrC,OAAOwC,oBAAoBlB,EAAkBe,KAO/CV"}
1
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","customerGroup","relatedPartySegment","_b","_a","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","getCachedCustomerGroup","storageKey","window","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","resolveCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","newCustomerValue","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","isLoggedIn","forceRefresh","cachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","fetchCustomerGroup","error","onError","delete","set","createCustomerSegmentSync","refreshEventName","CUSTOMER_SEGMENT_REFRESH_EVENT","inFlightSync","lastSyncedAtMs","dispatchCustomerSegmentRefreshEvent","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","refreshCustomerSegmentAfterLogin","subscribeToCustomerSegmentRefresh","handler","eventListener","event","addEventListener","removeEventListener"],"mappings":"kNAyCA,MAAMA,EAA0BC,IAC9B,GAAqB,iBAAVA,EACT,OAAO,KAGT,MAAMC,EAAaD,EAAME,OACzB,OAAOD,EAAWE,OAAS,EAAIF,EAAa,MAGjC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A,CACT,GAEaO,EACX9B,IAEA,MAAMO,EAAaQ,EACbgB,EAAmBC,EAGzB,IAAIC,EAA8C,KAC9CC,EAAiB,EAErB,MAAMC,EAAuC1C,IACrB,oBAAXe,QAIXA,OAAO4B,cACL,IAAIC,YAA0CN,EAAkB,CAC9DO,OAAQ,CACN7C,gBACA8C,YAAaC,KAAKC,WA2D1B,MAAO,CACLC,iCAtDuC,IAAmCzC,OAAA,OAAA,OAAA,EAAA,YAC1E,GAAsB,oBAAXO,OACT,OAAO,KAGT,GAAIyB,EACF,OAAOA,EAIT,GADYO,KAAKC,MACPP,EAzGgC,IAyGI,CAC5C,MAAMd,EAAsBd,EAAuBC,GAEnD,OADA4B,EAAoCf,GAC7BA,CACT,CAkBA,OAhBAa,EAA2BhC,OAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAMuB,QAA8BV,EAAqB,CACvDW,mBAAoBzB,EAAQyB,mBAC5BP,WAAYlB,EAAQkB,WACpBC,cAAc,EACdQ,QAAS3B,EAAQ2B,UAInB,OAFAO,EAAiBM,KAAKC,MACtBN,EAAoCX,GAC7BA,CACT,SACES,EAAe,IACjB,CACF,GAEOA,CACT,GAsBEU,kCAnBAC,IAEA,GAAsB,oBAAXpC,OACT,MAAO,OAGT,MAAMqC,EAAgCC,IACpCF,EAAQE,IAKV,OAFAtC,OAAOuC,iBAAiBhB,EAAkBc,GAEnC,KACLrC,OAAOwC,oBAAoBjB,EAAkBc,KAO/CV"}
package/dist/index.d.ts CHANGED
@@ -534,17 +534,11 @@ type CustomerSegmentRefreshDetail = {
534
534
  type CustomerSegmentSyncOptions = {
535
535
  fetchCustomerGroup: () => Promise<string | null>;
536
536
  isLoggedIn: () => boolean;
537
- storageKey?: string;
538
- refreshEventName?: string;
539
- minSyncIntervalMs?: number;
540
- newCustomerValue?: string;
541
537
  onError?: (error: unknown) => void;
542
538
  };
543
539
  type ResolveCustomerGroupOptions = {
544
540
  fetchCustomerGroup: () => Promise<string | null>;
545
541
  isLoggedIn: () => boolean;
546
- storageKey?: string;
547
- newCustomerValue?: string;
548
542
  forceRefresh?: boolean;
549
543
  onError?: (error: unknown) => void;
550
544
  };
@@ -1407,6 +1407,88 @@
1407
1407
  filter: brightness(0) invert(0.9);
1408
1408
  }
1409
1409
 
1410
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss */
1411
+ /* center a block element */
1412
+ /* use this to any of the pseudo elements as these are the mandatory properties */
1413
+ /* setting styles in separate formats for cross browser support */
1414
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
1415
+ /* vertically center alilgn any HTML element */
1416
+ /* add basePath to assets */
1417
+ .EmptyCart-module__emptyState___HtCXJ {
1418
+ display: flex;
1419
+ flex-direction: column;
1420
+ align-items: center;
1421
+ justify-content: center;
1422
+ flex: 1;
1423
+ padding: 32px 24px 24px;
1424
+ text-align: center;
1425
+ }
1426
+
1427
+ .EmptyCart-module__emptyIcon___A7F8f {
1428
+ margin-bottom: 8px;
1429
+ }
1430
+
1431
+ .EmptyCart-module__emptyText___aX6Nu {
1432
+ font-size: 16px;
1433
+ line-height: 24px;
1434
+ font-weight: 700;
1435
+ color: #3d3935;
1436
+ margin: 0 0 44px;
1437
+ }
1438
+
1439
+ .EmptyCart-module__emptySubText___P504H {
1440
+ font-size: 14px;
1441
+ line-height: 20px;
1442
+ color: #787472;
1443
+ margin: 0 0 8px;
1444
+ }
1445
+
1446
+ .EmptyCart-module__categoryLinks___J9tic {
1447
+ display: flex;
1448
+ gap: 12px;
1449
+ width: 100%;
1450
+ justify-content: center;
1451
+ }
1452
+
1453
+ .EmptyCart-module__categoryLink___YxsmA {
1454
+ display: flex;
1455
+ flex-direction: column;
1456
+ align-items: center;
1457
+ justify-content: center;
1458
+ gap: 6px;
1459
+ flex: 1;
1460
+ padding: 12px 8px;
1461
+ background-color: #ffffff;
1462
+ border: none;
1463
+ border-radius: 8px;
1464
+ text-decoration: none;
1465
+ color: #3d3935;
1466
+ font-size: 12px;
1467
+ line-height: 16px;
1468
+ font-weight: 500;
1469
+ text-align: center;
1470
+ transition: background-color 0.15s ease;
1471
+ }
1472
+ .EmptyCart-module__categoryLink___YxsmA:hover {
1473
+ background-color: #f8f8f8;
1474
+ text-decoration: none;
1475
+ color: #3d3935;
1476
+ }
1477
+ .EmptyCart-module__categoryLink___YxsmA:focus-visible {
1478
+ outline: 2px solid #e6003c;
1479
+ outline-offset: 2px;
1480
+ }
1481
+
1482
+ .EmptyCart-module__categoryLinkIcon___HjhbO {
1483
+ display: flex;
1484
+ align-items: center;
1485
+ justify-content: center;
1486
+ }
1487
+
1488
+ .EmptyCart-module__categoryLinkLabel___1dS9s {
1489
+ line-height: 1.3;
1490
+ }
1491
+
1410
1492
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconHeader/BusinessCustomerLinkOut/BusinessCustomerLinkOut.module.scss */
1411
1493
  /* center a block element */
1412
1494
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -1722,134 +1804,208 @@
1722
1804
  outline-offset: 2px;
1723
1805
  }
1724
1806
 
1725
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartHeader/CartHeader.module.scss */
1807
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss */
1726
1808
  /* center a block element */
1727
1809
  /* use this to any of the pseudo elements as these are the mandatory properties */
1728
1810
  /* setting styles in separate formats for cross browser support */
1729
1811
  /* specify the max width for an element and apply ellipses and truncate the overflow */
1730
1812
  /* vertically center alilgn any HTML element */
1731
1813
  /* add basePath to assets */
1732
- .CartHeader-module__headerTitle___35F6g {
1814
+ .CartItems-module__container___9xcV- {
1733
1815
  display: flex;
1734
- align-items: center;
1735
- gap: 8px;
1816
+ flex-direction: column;
1817
+ flex: 1;
1736
1818
  }
1737
1819
 
1738
- .CartHeader-module__headerItemCount___g1Ynd {
1739
- font-size: 24px;
1740
- line-height: 32px;
1741
- font-weight: 400;
1742
- color: #3d3935;
1820
+ .CartItems-module__itemList___CK3U1 {
1821
+ list-style: none;
1822
+ margin: 0;
1823
+ padding: 0;
1743
1824
  }
1744
- @media (max-width: 1023px) {
1745
- .CartHeader-module__headerItemCount___g1Ynd {
1746
- font-size: 20px;
1747
- line-height: 28px;
1825
+
1826
+ .CartItems-module__item___A6nFF {
1827
+ border-bottom: 1px solid #e6e3df;
1828
+ background-color: #f7f6f5;
1829
+ }
1830
+ .CartItems-module__item___A6nFF:last-child {
1831
+ border-bottom: none;
1832
+ }
1833
+
1834
+ .CartItems-module__itemContent___DaQhK {
1835
+ display: flex;
1836
+ flex-direction: row;
1837
+ align-items: flex-start;
1838
+ gap: 16px;
1839
+ padding: 16px 24px;
1840
+ }
1841
+ @media (max-width: 767px) {
1842
+ .CartItems-module__itemContent___DaQhK {
1843
+ padding: 16px;
1748
1844
  }
1749
1845
  }
1750
1846
 
1751
- .CartHeader-module__clearAllButton___B3bNF {
1752
- display: inline;
1753
- background: none;
1754
- border: none;
1755
- padding: 0;
1756
- cursor: pointer;
1757
- font-size: 14px;
1758
- line-height: 20px;
1759
- font-weight: 400;
1760
- color: #da291c;
1761
- text-decoration: underline;
1762
- text-underline-offset: 2px;
1847
+ .CartItems-module__itemIcon___pk1NU {
1848
+ display: flex;
1849
+ align-items: center;
1850
+ justify-content: center;
1851
+ flex-shrink: 0;
1852
+ width: 40px;
1853
+ height: 40px;
1854
+ color: #86807c;
1763
1855
  }
1764
- .CartHeader-module__clearAllButton___B3bNF:hover {
1765
- color: #961c13;
1856
+ .CartItems-module__itemIcon___pk1NU .CartItems-module__itemIconImage___q1IQJ {
1857
+ width: 40px;
1858
+ height: 40px;
1859
+ object-fit: contain;
1860
+ border-radius: 4px;
1766
1861
  }
1767
- .CartHeader-module__clearAllButton___B3bNF:focus-visible {
1768
- outline: 2px solid #da291c;
1769
- outline-offset: 2px;
1770
- border-radius: 2px;
1862
+
1863
+ .CartItems-module__itemBody___leOoI {
1864
+ display: flex;
1865
+ flex-direction: column;
1866
+ gap: 4px;
1867
+ flex: 1;
1868
+ min-width: 0;
1771
1869
  }
1772
1870
 
1773
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss */
1774
- /* center a block element */
1775
- /* use this to any of the pseudo elements as these are the mandatory properties */
1776
- /* setting styles in separate formats for cross browser support */
1777
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1778
- /* vertically center alilgn any HTML element */
1779
- /* add basePath to assets */
1780
- .EmptyCart-module__emptyState___HtCXJ {
1871
+ .CartItems-module__itemRow___owvC2 {
1872
+ display: flex;
1873
+ justify-content: space-between;
1874
+ align-items: flex-start;
1875
+ gap: 16px;
1876
+ }
1877
+
1878
+ .CartItems-module__itemDetails___vQu14 {
1781
1879
  display: flex;
1782
1880
  flex-direction: column;
1783
- align-items: center;
1784
- justify-content: center;
1881
+ gap: 2px;
1882
+ min-width: 0;
1785
1883
  flex: 1;
1786
- padding: 32px 24px 24px;
1787
- text-align: center;
1788
1884
  }
1789
1885
 
1790
- .EmptyCart-module__emptyIcon___A7F8f {
1791
- margin-bottom: 8px;
1886
+ .CartItems-module__categoryLabel___gSZid {
1887
+ font-size: 12px;
1888
+ line-height: 16px;
1889
+ color: #86807c;
1792
1890
  }
1793
1891
 
1794
- .EmptyCart-module__emptyText___aX6Nu {
1795
- font-size: 16px;
1796
- line-height: 24px;
1892
+ .CartItems-module__productName___yYFNw {
1893
+ font-size: 14px;
1894
+ line-height: 20px;
1797
1895
  font-weight: 700;
1798
1896
  color: #3d3935;
1799
- margin: 0 0 44px;
1800
1897
  }
1801
1898
 
1802
- .EmptyCart-module__emptySubText___P504H {
1803
- font-size: 14px;
1804
- line-height: 20px;
1805
- color: #787472;
1806
- margin: 0 0 8px;
1899
+ .CartItems-module__variantText___saarn {
1900
+ font-size: 12px;
1901
+ line-height: 16px;
1902
+ color: #86807c;
1807
1903
  }
1808
1904
 
1809
- .EmptyCart-module__categoryLinks___J9tic {
1905
+ .CartItems-module__downPaymentLabel___9sOP7 {
1906
+ font-size: 12px;
1907
+ line-height: 16px;
1908
+ color: #86807c;
1909
+ }
1910
+
1911
+ .CartItems-module__downPaymentRow___9a5jS {
1810
1912
  display: flex;
1811
- gap: 12px;
1812
1913
  width: 100%;
1813
- justify-content: center;
1914
+ justify-content: space-between;
1915
+ align-items: center;
1814
1916
  }
1815
1917
 
1816
- .EmptyCart-module__categoryLink___YxsmA {
1918
+ .CartItems-module__itemPricing___7gEuf {
1817
1919
  display: flex;
1818
1920
  flex-direction: column;
1819
- align-items: center;
1820
- justify-content: center;
1821
- gap: 6px;
1822
- flex: 1;
1823
- padding: 12px 8px;
1824
- background-color: #ffffff;
1825
- border: none;
1826
- border-radius: 8px;
1827
- text-decoration: none;
1921
+ align-items: flex-end;
1922
+ gap: 2px;
1923
+ flex-shrink: 0;
1924
+ white-space: nowrap;
1925
+ }
1926
+
1927
+ .CartItems-module__monthlyPrice___G6sH6 {
1928
+ font-size: 14px;
1929
+ line-height: 20px;
1930
+ font-weight: 700;
1828
1931
  color: #3d3935;
1932
+ }
1933
+
1934
+ .CartItems-module__originalPrice___LsGAC {
1829
1935
  font-size: 12px;
1830
1936
  line-height: 16px;
1831
- font-weight: 500;
1832
- text-align: center;
1833
- transition: background-color 0.15s ease;
1937
+ color: #86807c;
1938
+ text-decoration: line-through;
1834
1939
  }
1835
- .EmptyCart-module__categoryLink___YxsmA:hover {
1836
- background-color: #f8f8f8;
1837
- text-decoration: none;
1940
+
1941
+ .CartItems-module__downPaymentAmount___3K98L {
1942
+ font-size: 12px;
1943
+ line-height: 16px;
1944
+ font-weight: 700;
1838
1945
  color: #3d3935;
1839
1946
  }
1840
- .EmptyCart-module__categoryLink___YxsmA:focus-visible {
1841
- outline: 2px solid #e6003c;
1842
- outline-offset: 2px;
1947
+
1948
+ .CartItems-module__disclaimer___mOvek {
1949
+ font-size: 12px;
1950
+ line-height: 16px;
1951
+ color: #86807c;
1952
+ padding: 16px 24px;
1953
+ margin: 0;
1954
+ background-color: #f7f6f5;
1955
+ border-top: 1px solid #e6e3df;
1956
+ }
1957
+ @media (max-width: 767px) {
1958
+ .CartItems-module__disclaimer___mOvek {
1959
+ padding: 16px;
1960
+ }
1843
1961
  }
1844
1962
 
1845
- .EmptyCart-module__categoryLinkIcon___HjhbO {
1963
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartHeader/CartHeader.module.scss */
1964
+ /* center a block element */
1965
+ /* use this to any of the pseudo elements as these are the mandatory properties */
1966
+ /* setting styles in separate formats for cross browser support */
1967
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
1968
+ /* vertically center alilgn any HTML element */
1969
+ /* add basePath to assets */
1970
+ .CartHeader-module__headerTitle___35F6g {
1846
1971
  display: flex;
1847
1972
  align-items: center;
1848
- justify-content: center;
1973
+ gap: 8px;
1849
1974
  }
1850
1975
 
1851
- .EmptyCart-module__categoryLinkLabel___1dS9s {
1852
- line-height: 1.3;
1976
+ .CartHeader-module__headerItemCount___g1Ynd {
1977
+ font-size: 24px;
1978
+ line-height: 32px;
1979
+ font-weight: 400;
1980
+ color: #3d3935;
1981
+ }
1982
+ @media (max-width: 1023px) {
1983
+ .CartHeader-module__headerItemCount___g1Ynd {
1984
+ font-size: 20px;
1985
+ line-height: 28px;
1986
+ }
1987
+ }
1988
+
1989
+ .CartHeader-module__clearAllButton___B3bNF {
1990
+ display: inline;
1991
+ background: none;
1992
+ border: none;
1993
+ padding: 0;
1994
+ cursor: pointer;
1995
+ font-size: 14px;
1996
+ line-height: 20px;
1997
+ font-weight: 400;
1998
+ color: #da291c;
1999
+ text-decoration: underline;
2000
+ text-underline-offset: 2px;
2001
+ }
2002
+ .CartHeader-module__clearAllButton___B3bNF:hover {
2003
+ color: #961c13;
2004
+ }
2005
+ .CartHeader-module__clearAllButton___B3bNF:focus-visible {
2006
+ outline: 2px solid #da291c;
2007
+ outline-offset: 2px;
2008
+ border-radius: 2px;
1853
2009
  }
1854
2010
 
1855
2011
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartClearConfirm/CartClearConfirm.module.scss */
@@ -2030,159 +2186,3 @@
2030
2186
  .active-link .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2031
2187
  display: block;
2032
2188
  }
2033
-
2034
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss */
2035
- /* center a block element */
2036
- /* use this to any of the pseudo elements as these are the mandatory properties */
2037
- /* setting styles in separate formats for cross browser support */
2038
- /* specify the max width for an element and apply ellipses and truncate the overflow */
2039
- /* vertically center alilgn any HTML element */
2040
- /* add basePath to assets */
2041
- .CartItems-module__container___9xcV- {
2042
- display: flex;
2043
- flex-direction: column;
2044
- flex: 1;
2045
- }
2046
-
2047
- .CartItems-module__itemList___CK3U1 {
2048
- list-style: none;
2049
- margin: 0;
2050
- padding: 0;
2051
- }
2052
-
2053
- .CartItems-module__item___A6nFF {
2054
- border-bottom: 1px solid #e6e3df;
2055
- background-color: #f7f6f5;
2056
- }
2057
- .CartItems-module__item___A6nFF:last-child {
2058
- border-bottom: none;
2059
- }
2060
-
2061
- .CartItems-module__itemContent___DaQhK {
2062
- display: flex;
2063
- flex-direction: row;
2064
- align-items: flex-start;
2065
- gap: 16px;
2066
- padding: 16px 24px;
2067
- }
2068
- @media (max-width: 767px) {
2069
- .CartItems-module__itemContent___DaQhK {
2070
- padding: 16px;
2071
- }
2072
- }
2073
-
2074
- .CartItems-module__itemIcon___pk1NU {
2075
- display: flex;
2076
- align-items: center;
2077
- justify-content: center;
2078
- flex-shrink: 0;
2079
- width: 40px;
2080
- height: 40px;
2081
- color: #86807c;
2082
- }
2083
- .CartItems-module__itemIcon___pk1NU .CartItems-module__itemIconImage___q1IQJ {
2084
- width: 40px;
2085
- height: 40px;
2086
- object-fit: contain;
2087
- border-radius: 4px;
2088
- }
2089
-
2090
- .CartItems-module__itemBody___leOoI {
2091
- display: flex;
2092
- flex-direction: column;
2093
- gap: 4px;
2094
- flex: 1;
2095
- min-width: 0;
2096
- }
2097
-
2098
- .CartItems-module__itemRow___owvC2 {
2099
- display: flex;
2100
- justify-content: space-between;
2101
- align-items: flex-start;
2102
- gap: 16px;
2103
- }
2104
-
2105
- .CartItems-module__itemDetails___vQu14 {
2106
- display: flex;
2107
- flex-direction: column;
2108
- gap: 2px;
2109
- min-width: 0;
2110
- flex: 1;
2111
- }
2112
-
2113
- .CartItems-module__categoryLabel___gSZid {
2114
- font-size: 12px;
2115
- line-height: 16px;
2116
- color: #86807c;
2117
- }
2118
-
2119
- .CartItems-module__productName___yYFNw {
2120
- font-size: 14px;
2121
- line-height: 20px;
2122
- font-weight: 700;
2123
- color: #3d3935;
2124
- }
2125
-
2126
- .CartItems-module__variantText___saarn {
2127
- font-size: 12px;
2128
- line-height: 16px;
2129
- color: #86807c;
2130
- }
2131
-
2132
- .CartItems-module__downPaymentLabel___9sOP7 {
2133
- font-size: 12px;
2134
- line-height: 16px;
2135
- color: #86807c;
2136
- }
2137
-
2138
- .CartItems-module__downPaymentRow___9a5jS {
2139
- display: flex;
2140
- width: 100%;
2141
- justify-content: space-between;
2142
- align-items: center;
2143
- }
2144
-
2145
- .CartItems-module__itemPricing___7gEuf {
2146
- display: flex;
2147
- flex-direction: column;
2148
- align-items: flex-end;
2149
- gap: 2px;
2150
- flex-shrink: 0;
2151
- white-space: nowrap;
2152
- }
2153
-
2154
- .CartItems-module__monthlyPrice___G6sH6 {
2155
- font-size: 14px;
2156
- line-height: 20px;
2157
- font-weight: 700;
2158
- color: #3d3935;
2159
- }
2160
-
2161
- .CartItems-module__originalPrice___LsGAC {
2162
- font-size: 12px;
2163
- line-height: 16px;
2164
- color: #86807c;
2165
- text-decoration: line-through;
2166
- }
2167
-
2168
- .CartItems-module__downPaymentAmount___3K98L {
2169
- font-size: 12px;
2170
- line-height: 16px;
2171
- font-weight: 700;
2172
- color: #3d3935;
2173
- }
2174
-
2175
- .CartItems-module__disclaimer___mOvek {
2176
- font-size: 12px;
2177
- line-height: 16px;
2178
- color: #86807c;
2179
- padding: 16px 24px;
2180
- margin: 0;
2181
- background-color: #f7f6f5;
2182
- border-top: 1px solid #e6e3df;
2183
- }
2184
- @media (max-width: 767px) {
2185
- .CartItems-module__disclaimer___mOvek {
2186
- padding: 16px;
2187
- }
2188
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunrise-upc/sales-static-components",
3
- "version": "3.8.7-beta.5",
3
+ "version": "3.8.7-beta.6",
4
4
  "description": "Static Reusable Components Library",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",