import{d as $,x as w,b as a,e as h,m as D,l as J,t as f,u as n,s as g,i as l,h as I,f as c,n as C,p as q,v as z,F as P,r as y,g as de,o as _e,y as fe,C as Ne,L as Ie,j as ue,a as K}from"./CookieHelper-DsoBasaQ.js";import{A as Ae,U as Ee,V as Be}from"./VueI18nHelper-CaUD--0m.js";import{S as be}from"./SessionStorageHelper-DqTQYl5e.js";import{D as Z}from"./DomPositioningHelper-DqTJGDXy.js";import{u as X}from"./announcement-bar.composable-DJKiZDE8.js";import{S as j,E as Le}from"./ErrorHandlerHelper-D0FpauLC.js";import{E as he}from"./EventListenerHelper-COwNWEWu.js";import{u as G}from"./index-DtEV5De2.js";import{a as Pe}from"./index.enum-CbvfSyt8.js";import{R as Oe}from"./RinArrow-Ca6i1xdc.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{I as M}from"./index-CgFz5N04.js";import{i as b}from"./iconsOLD-CgcMPYzw.js";import{E as me}from"./ApiRoutes-pN95k8NG.js";import{P as Se}from"./rin-settings--feS-jNu.js";import{u as He,A as Me}from"./zapi.composable-B8xRDVH4.js";import{N as Ge}from"./NewsletterForm-Cgcn2NRR.js";import{P as Ve}from"./PriceText-BLc3KYUg.js";/* empty css                   */import"./DomEventHelper-g1lmsfws.js";import"./ABApiRoutes-D-JhqqfT.js";import"./index-3qJi59ao.js";import"./FormatHelper-BToVSXCt.js";import"./EventsHelper-CkzpG0DK.js";import"./icons-CQJNAfJd.js";import"./RinIcon-DQ3KwHSb.js";import"./LoadingSpinner-DW4bcGS4.js";import"./frontpage.enum-DXqTVIde.js";import"./input-identifier.enum-CQ6rFmSs.js";import"./SelectInput-1RaLbc6z.js";import"./CustomCheckbox-Cg7PninX.js";const Ke={class:"info-bar"},ze=["href","target"],Ue=$({__name:"InfoBar",props:{infoBar:{}},setup(p){const v=p,{t:i}=G(),m=Pe.RIGHT,s=w(()=>`color: ${v.infoBar.textColor};`);function t(e){return e.substring(0,1)==="/"?"_self":"_blank"}return(e,d)=>(a(),h("div",Ke,[e.infoBar.infoLink?(a(),h("a",{key:0,class:"info-bar__text info-bar__text--link",href:`/${e.infoBar.infoLink}`,style:D(s.value),target:t(e.infoBar.infoLink)},[J(f(n(i)(`announcement-bar-ufe:primaryText.${e.infoBar.primaryText}`))+" ",1),e.infoBar.displayArrow?(a(),g(Oe,{key:0,class:"info-bar__arrow",direction:n(m)},null,8,["direction"])):l("",!0)],12,ze)):l("",!0),e.infoBar.infoLink?l("",!0):(a(),h("span",{key:1,class:"info-bar__text",style:D(s.value)},f(n(i)(`announcement-bar-ufe:primaryText.${e.infoBar.primaryText}`)),5))]))}}),Fe=T(Ue,[["__scopeId","data-v-1b48ac7d"]]),We=["href"],Ye={class:"bar__content"},je={key:0,class:"bar-text__text bar-text__text--primary"},Je={key:1,class:"bar-text__text"},qe=["href"],Ze={key:0,class:"bar-link__text"},Qe=$({__name:"TimerBar",props:{active:{type:Boolean,default:!1},bar:{},link:{default:""},timer:{}},setup(p){const v=p,{t:i}=G(),m=b.arrow,s=b.announcementBarInfoI,t=w(()=>`color: ${v.bar.textColor};`),e=w(()=>`color: ${v.bar.highlightTextColor};`),d=w(()=>`background-color: ${v.bar.infoBackgroundColor};`),u=w(()=>`color: ${v.bar.infoTextColor};`),R=w(()=>`color: ${v.bar.linkColor}`);function _(r){return r<10?`0${r}`:`${r}`}return(r,O)=>(a(),h("div",{class:C(["bar",{"bar--without-info":!r.bar.showInfoLink}])},[r.bar.showInfoLink?(a(),h("a",{key:0,class:"bar__info bar-info",href:r.bar.infoLink},[I(n(M),{class:"bar-info__i",src:n(s),style:D(u.value)},null,8,["src","style"]),c("span",{class:"bar-info__circle",style:D(d.value)},null,4)],8,We)):l("",!0),c("div",Ye,[c("div",{class:"bar__text bar-text",style:D(t.value)},[r.bar.primaryText?(a(),h("span",je,f(n(i)(`announcement-bar-ufe:primaryText.${r.bar.primaryText}`)),1)):l("",!0),r.bar.secondaryText?(a(),h("span",Je,f(n(i)(`announcement-bar-ufe:secondaryText.${r.bar.secondaryText}`)),1)):l("",!0)],4),c("div",{class:C(["bar__time bar-time",{"bar__time--without-info":!r.bar.showInfoLink}])},[r.timer.days>0?(a(),h("span",{key:0,class:"bar-time__value bar-time__value--highlighted",style:D(e.value)},f(_(r.timer.days)),5)):l("",!0),r.timer.days>0?(a(),h("span",{key:1,class:"bar-time__value",style:D(t.value)},f(n(i)("announcement-bar-ufe:time.day")),5)):l("",!0),c("span",{class:"bar-time__value bar-time__value--highlighted",style:D(e.value)},f(_(r.timer.hours)),5),c("span",{class:"bar-time__value",style:D(t.value)},f(n(i)("announcement-bar-ufe:time.hour")),5),c("span",{class:"bar-time__value bar-time__value--highlighted",style:D(e.value)},f(_(r.timer.minutes)),5),c("span",{class:"bar-time__value",style:D(t.value)},f(n(i)("announcement-bar-ufe:time.minute")),5),c("span",{class:"bar-time__value bar-time__value--highlighted",style:D(e.value)},f(_(r.timer.seconds)),5),c("span",{class:"bar-time__value",style:D(t.value)},f(n(i)("announcement-bar-ufe:time.second")),5)],2)]),r.link?(a(),h("a",{key:1,class:"bar__link bar-link",href:r.link,style:D(R.value)},[r.bar.linkText?(a(),h("span",Ze,f(n(i)(`announcement-bar-ufe:linkText.${r.bar.linkText}`)),1)):l("",!0),I(n(M),{class:"bar-link__icon",src:n(m)},null,8,["src"])],12,qe)):l("",!0)],2))}}),Xe=T(Qe,[["__scopeId","data-v-5365d42f"]]);var E=(p=>(p.CONTENT="content",p.GIVEAWAY="giveaway",p.PRODUCT="product",p))(E||{}),o=(p=>(p.DARK="dark",p.LIGHT="light",p.RED="red",p))(o||{});const xe=["onKeyup"],eo=$({__name:"CalendarCloseButton",setup(p,{emit:v}){const i=v,m=b.christmasCalendar.close;function s(){i("click:button")}return(t,e)=>(a(),h("button",{class:"calendar-close-button",onClick:s,onKeyup:q(z(s,["prevent"]),["enter"])},[I(n(M),{class:"calendar-close-button__icon",src:n(m)},null,8,["src"])],40,xe))}}),ge=T(eo,[["__scopeId","data-v-fce55041"]]),oo={class:"information-overlay__container"},to={class:"information-overlay__headline"},ao={key:0,class:"information-overlay__description"},Q="announcement-bar-ufe:",no=$({__name:"InformationOverlay",props:{type:{}},setup(p,{emit:v}){const i=v,{t:m}=G();function s(){i("close")}return(t,e)=>(a(),h("div",{class:"information-overlay",onClick:z(s,["self"])},[c("div",oo,[c("h2",to,f(n(m)(`${Q}christmasCalendar.soSorry`)),1),t.type?(a(),h("p",ao,[t.type==="early"?(a(),h(P,{key:0},[J(f(n(m)(`${Q}christmasCalendar.early`)),1)],64)):l("",!0),t.type==="late"?(a(),h(P,{key:1},[J(f(n(m)(`${Q}christmasCalendar.late`)),1)],64)):l("",!0)])):l("",!0),I(ge,{class:"information-overlay__close-button","onClick:button":s})])]))}}),ro=T(no,[["__scopeId","data-v-b72cf936"]]),so=$({__name:"ChristmasCalendarButton",props:{label:{}},setup(p,{emit:v}){const i=v;function m(){i("click:button")}return(s,t)=>(a(),h("button",{class:"christmas-calendar-button",onClick:m,onKeyup:q(m,["enter"])},[J(f(s.label)+" ",1),I(n(M),{class:"christmas-calendar-button__icon",src:n(b).arrowLegacy},null,8,["src"])],32))}}),U=T(so,[["__scopeId","data-v-31a62e5a"]]),io={class:"christmas-calendar-giveaway-door"},lo=["src"],co={class:"christmas-calendar-giveaway-door__container"},uo=["src"],ho={class:"christmas-calendar-giveaway-door__inner-container"},mo={class:"christmas-calendar-giveaway-door__text-container"},po={key:0,class:"christmas-calendar-giveaway-door__text"},vo=$({__name:"ChristmasCalendarGiveawayDoor",props:{content:{},isDesktopView:{type:Boolean,default:!1},logoPath:{},showReadMore:{type:Boolean,default:!1}},setup(p,{emit:v}){const i=v,m=p,s=He(),{t}=G(),e=y(!1),d=y(!1);function u(){window.location.href="/angebote/"}async function R(_){d.value=!0;const r=await s.registerForGiveaway(_,m.content.calendarId,m.content.id);d.value=!1,typeof r=="boolean"&&r?(e.value=!0,j.fire({icon:"success",text:t("announcement-bar-ufe:calendar.giveaway.success.message").toString(),title:t("announcement-bar-ufe:calendar.giveaway.success.headline").toString()})):typeof r=="string"&&r==="Participant is already registered for the giveaway"?(e.value=!0,j.fire({icon:"info",text:t("announcement-bar-ufe:calendar.giveaway.alreadyRegistered.message").toString(),title:t("announcement-bar-ufe:calendar.giveaway.alreadyRegistered.headline").toString()})):typeof r=="string"&&r!=="database operation failed"?j.fire({icon:"warning",text:r,title:t("announcement-bar-ufe:calendar.giveaway.fail.headline").toString()}):j.fire({icon:"error",text:t("announcement-bar-ufe:calendar.giveaway.fail.message").toString(),title:t("announcement-bar-ufe:calendar.giveaway.fail.headline").toString()})}return(_,r)=>(a(),h("div",io,[_.isDesktopView?(a(),h("img",{key:0,alt:"",class:"christmas-calendar-giveaway-door__logo",src:_.logoPath},null,8,lo)):l("",!0),c("div",co,[_.isDesktopView||!_.showReadMore?(a(),h("img",{key:0,alt:"",class:"christmas-calendar-giveaway-door__image",src:`${_.content.imageLink}&h=370`},null,8,uo)):l("",!0),c("div",ho,[c("div",mo,[c("h4",{class:C(["christmas-calendar-giveaway-door__overline",{"text-left":_.showReadMore}])},f(n(t)("announcement-bar-ufe:christmasCalendar.calendarTitle")),3),c("h2",{class:C(["christmas-calendar-giveaway-door__title",{"text-left":_.showReadMore}])},f(n(t)(`announcement-bar-ufe:calendar.${_.content.locizeIdentifier}.title`)),3),_.isDesktopView||_.showReadMore?(a(),h("p",po,f(e.value?n(t)("announcement-bar-ufe:calendar.giveaway.alreadyRegistered.text"):n(t)(`announcement-bar-ufe:calendar.${_.content.locizeIdentifier}.text`)),1)):l("",!0),!e.value&&(_.isDesktopView||_.showReadMore)?(a(),g(Ge,{key:1,"is-christmas":"","open-extended":!_.isDesktopView,"registration-in-progress":d.value,"onSubscribe:newsletter":R},null,8,["open-extended","registration-in-progress"])):l("",!0)]),e.value?(a(),g(U,{key:0,class:"christmas-calendar-giveaway-door__button",label:n(t)("announcement-bar-ufe:calendar.giveaway.alreadyRegistered.goToOffers"),"onClick:button":u},null,8,["label"])):l("",!0)])]),!_.showReadMore&&!_.isDesktopView?(a(),g(U,{key:1,label:n(t)("announcement-bar-ufe:calendar.giveawayDoor.readMore"),"onClick:button":r[0]||(r[0]=O=>i("click:read-more"))},null,8,["label"])):l("",!0)]))}}),we=T(vo,[["__scopeId","data-v-97f5f838"]]),_o={class:"christmas-calendar-product-door"},fo=["src"],bo={class:"christmas-calendar-product-door__container"},go=["src"],wo={class:"christmas-calendar-product-door__text-container"},yo={class:"christmas-calendar-product-door__overline"},ko={class:"christmas-calendar-product-door__title"},Co={key:1,class:"christmas-calendar-product-door__text"},Do=$({__name:"ChristmasCalendarProductDoor",props:{content:{},isDesktopView:{type:Boolean,default:!1},logoPath:{}},setup(p){const v=p,{t:i}=G(),m=w(()=>{var u;return((u=v.content.products)==null?void 0:u.length)===1}),s=w(()=>m.value?i("announcement-bar-ufe:calendar.productDoor.goToOffer"):i("announcement-bar-ufe:calendar.productDoor.goToOffers")),t=w(()=>{var u;return m.value?((u=v.content.products)==null?void 0:u[0].link)??"":"/angebote/"}),e=w(()=>{var u;return m.value?i(((u=v.content.products)==null?void 0:u[0].description)??""):i(`announcement-bar-ufe:calendar.${v.content.locizeIdentifier}.text`)});function d(){window.location.href=t.value}return(u,R)=>(a(),h("div",_o,[c("img",{alt:"",class:"christmas-calendar-product-door__logo",src:u.logoPath},null,8,fo),c("div",bo,[c("img",{alt:"",class:"christmas-calendar-product-door__image",src:`${u.content.imageLink}&h=370`},null,8,go),c("div",wo,[c("h4",yo,f(n(i)("announcement-bar-ufe:christmasCalendar.calendarTitle")),1),c("h2",ko,f(n(i)(`announcement-bar-ufe:calendar.${u.content.locizeIdentifier}.title`)),1),u.content.type===n(E).PRODUCT&&m.value&&u.content.products?(a(),g(Ve,{key:0,class:"christmas-calendar-product-door__price-text","is-partner":!1,"product-info":u.content.products[0],small:!u.isDesktopView},null,8,["product-info","small"])):l("",!0),u.isDesktopView?(a(),h("p",Co,f(e.value),1)):l("",!0),I(U,{class:C(["christmas-calendar-product-door__button",{"christmas-calendar-product-door__button-margin":u.content.type===n(E).PRODUCT&&!m.value}]),label:s.value,"onClick:button":d},null,8,["class","label"])])])]))}}),ye=T(Do,[["__scopeId","data-v-67733b55"]]),Ro={class:"christmas-calendar-content-door"},$o=["src"],To={class:"christmas-calendar-content-door__container"},No=["src"],Io={class:"christmas-calendar-content-door__inner-container"},Ao={class:"christmas-calendar-content-door__text-container"},Eo={key:0,class:"christmas-calendar-content-door__text"},Bo=$({__name:"ChristmasCalendarContentDoor",props:{content:{},isDesktopView:{type:Boolean,default:!1},logoPath:{},showReadMore:{type:Boolean,default:!1}},setup(p,{emit:v}){const i=v,m=p,{t:s}=G();function t(){m.content.link&&(window.location.href=m.content.link)}return(e,d)=>(a(),h("div",Ro,[c("img",{alt:"",class:"christmas-calendar-content-door__logo",src:e.logoPath},null,8,$o),c("div",To,[e.showReadMore?l("",!0):(a(),h("img",{key:0,alt:"",class:"christmas-calendar-content-door__image",src:`${e.content.imageLink}&h=370`},null,8,No)),c("div",Io,[c("div",Ao,[c("h4",{class:C(["christmas-calendar-content-door__overline",{"text-left":e.showReadMore}])},f(n(s)("announcement-bar-ufe:christmasCalendar.calendarTitle")),3),c("h2",{class:C(["christmas-calendar-content-door__title",{"text-left":e.showReadMore}])},f(n(s)(`announcement-bar-ufe:calendar.${e.content.locizeIdentifier}.title`)),3),e.isDesktopView||e.showReadMore?(a(),h("p",Eo,f(n(s)(`announcement-bar-ufe:calendar.${e.content.locizeIdentifier}.text`)),1)):l("",!0)]),e.content.link&&(e.isDesktopView||e.showReadMore&&!e.isDesktopView)?(a(),g(U,{key:0,class:"christmas-calendar-content-door__button",label:n(s)("announcement-bar-ufe:calendar.contentDoor.readMore"),"onClick:button":t},null,8,["label"])):l("",!0)])]),!e.showReadMore&&!e.isDesktopView?(a(),g(U,{key:0,label:n(s)("announcement-bar-ufe:calendar.contentDoor.readMore"),"onClick:button":d[0]||(d[0]=u=>i("click:read-more"))},null,8,["label"])):l("",!0)]))}}),ke=T(Bo,[["__scopeId","data-v-4f5b4782"]]),Lo={class:"christmas-calendar-mobile-view__day-circle"},Po={class:"christmas-calendar-mobile-view__text-container"},Oo={class:"christmas-calendar-mobile-view__title"},So={class:"christmas-calendar-mobile-view__headline"},Ho=$({__name:"ChristmasCalendarMobileView",props:{content:{},day:{},logoPath:{},showReadMore:{type:Boolean,default:!1}},setup(p,{emit:v}){const i=v,m=p,{t:s}=G(),t=w(()=>!!m.content);return(e,d)=>{var u,R,_;return a(),h("div",{class:C(["christmas-calendar-mobile-view",{"christmas-calendar-mobile-view--door-content-displaying":t.value}])},[t.value?l("",!0):(a(),h(P,{key:0},[c("div",{class:"christmas-calendar-mobile-view__door",onClick:d[0]||(d[0]=r=>e.$emit("click:door"))},[I(n(M),{class:"christmas-calendar-mobile-view__icon",src:n(b).christmasCalendar.xMasPresent},null,8,["src"]),c("div",Lo,f(e.day),1)]),c("div",Po,[c("span",Oo,f(n(s)("announcement-bar-ufe:christmasCalendar.calendarTitle")),1),c("h3",So,f(n(s)("announcement-bar-ufe:christmasCalendar.mobile.headline")),1)]),I(U,{label:n(s)("announcement-bar-ufe:christmasCalendar.mobile.button"),"onClick:button":d[1]||(d[1]=r=>i("click:door"))},null,8,["label"])],64)),t.value?(a(),h(P,{key:1},[((u=e.content)==null?void 0:u.type)===n(E).CONTENT?(a(),g(ke,{key:0,content:e.content,"logo-path":e.logoPath,"show-read-more":e.showReadMore,"onClick:readMore":d[2]||(d[2]=r=>i("click:read-more"))},null,8,["content","logo-path","show-read-more"])):l("",!0),((R=e.content)==null?void 0:R.type)===n(E).PRODUCT?(a(),g(ye,{key:1,content:e.content,"logo-path":e.logoPath},null,8,["content","logo-path"])):l("",!0),((_=e.content)==null?void 0:_.type)===n(E).GIVEAWAY?(a(),g(we,{key:2,content:e.content,"logo-path":e.logoPath,"show-read-more":e.showReadMore,"onClick:readMore":d[3]||(d[3]=r=>i("click:read-more"))},null,8,["content","logo-path","show-read-more"])):l("",!0)],64)):l("",!0)],2)}}}),Mo=T(Ho,[["__scopeId","data-v-765be145"]]),Go=["onKeyup"],Vo={key:0,class:"christmas-calendar-door__number"},Ko=$({__name:"ChristmasCalendarDoor",props:{doorData:{}},setup(p,{emit:v}){const i=v;function m(){i("click:door")}return(s,t)=>(a(),h("div",{class:C(["christmas-calendar-door",[`christmas-calendar-door--${s.doorData.color}`]]),onClick:z(m,["prevent"]),onKeyup:q(z(m,["prevent"]),["enter"])},[s.doorData.doorNumber!==0?(a(),h("div",Vo,f(s.doorData.doorNumber),1)):l("",!0),s.doorData.icon?(a(),g(n(M),{key:1,class:"christmas-calendar-door__icon",src:s.doorData.icon},null,8,["src"])):l("",!0)],42,Go))}}),pe=T(Ko,[["__scopeId","data-v-2ae0bc86"]]),zo=["src"],Uo={class:"christmas-calendar-desktop-view__door-container christmas-calendar-desktop-view__door-container--desktop"},Fo={class:"christmas-calendar-desktop-view__door-container christmas-calendar-desktop-view__door-container--tablet"},Wo=$({__name:"ChristmasCalendarDesktopView",props:{content:{default:null},doors:{},doorsTablet:{},logoPath:{}},setup(p,{emit:v}){const i=v,m=p,s=w(()=>!!m.content);return(t,e)=>(a(),h("div",{class:C(["christmas-calendar-desktop-view",{"christmas-calendar-desktop-view--door-content-displaying":s.value}])},[s.value?l("",!0):(a(),h(P,{key:0},[c("img",{alt:"",class:"christmas-calendar-desktop-view__logo",src:t.logoPath},null,8,zo),c("div",Uo,[(a(!0),h(P,null,de(t.doors,(d,u)=>(a(),g(pe,{key:`christmas-calendar-door-${u}`,class:C(`christmas-calendar-desktop-view__door-w-${d.width} christmas-calendar-desktop-view__door-h-${d.height}`),"door-data":d,"onClick:door":R=>i("click:door",d.doorNumber)},null,8,["class","door-data","onClick:door"]))),128))]),c("div",Fo,[(a(!0),h(P,null,de(t.doorsTablet,(d,u)=>(a(),g(pe,{key:`christmas-calendar-door-${u}`,class:C(`christmas-calendar-desktop-view__door-w-${d.width} christmas-calendar-desktop-view__door-h-${d.height}`),"door-data":d,"onClick:door":R=>i("click:door",d.doorNumber)},null,8,["class","door-data","onClick:door"]))),128))])],64)),s.value&&t.content?(a(),h(P,{key:1},[t.content.type===n(E).CONTENT?(a(),g(ke,{key:0,content:t.content,"is-desktop-view":"","logo-path":t.logoPath},null,8,["content","logo-path"])):l("",!0),t.content.type===n(E).PRODUCT?(a(),g(ye,{key:1,content:t.content,"is-desktop-view":"","logo-path":t.logoPath},null,8,["content","logo-path"])):l("",!0),t.content.type===n(E).GIVEAWAY?(a(),g(we,{key:2,content:t.content,"is-desktop-view":"","logo-path":t.logoPath},null,8,["content","logo-path"])):l("",!0)],64)):l("",!0)],2))}}),Yo=T(Wo,[["__scopeId","data-v-c5119765"]]),jo=$({__name:"ChristmasCalendar",props:{barHeight:{default:0},doors:{},doorsTablet:{},visible:{type:Boolean,default:!1}},setup(p,{emit:v}){const i=v,{getDoorById:m}=X(),s=y(null),t=y(null),e=y({type:null,visible:!1}),d=y(!1),u=w(()=>{const k=Ae.getEnvironmentName();return k==="production"||k==="staging"?new Date().getDate():10}),R=w(()=>{var k;return((k=t.value)==null?void 0:k.type)===E.GIVEAWAY}),_=w(()=>Se.isPageInPartnerShop()?b.ringanaLogoPartner:b.ringanaLogo);function r(){e.value={type:null,visible:!1}}function O(){r(),i("close:calendar"),t.value=null,d.value=!1}function S(k){k.code==="Escape"&&O()}async function Y(k){var B;if(k)try{const N=Ne.getDeliveryAddressIso()||void 0;t.value=Me.transformApiCalendarDoorToCalendarDoor(await m(k,N))}catch(N){const F=(B=N==null?void 0:N.info)==null?void 0:B.errorCode;if(F)switch(F){case me.ANNOUNCEMENT_CALENDAR_DOOR_TOO_EARLY:e.value={type:"early",visible:!0};break;case me.ANNOUNCEMENT_CALENDAR_DOOR_TOO_LATE:e.value={type:"late",visible:!0};break;default:throw N}else throw N}}return _e(()=>{window.addEventListener("keyup",S),be.setChristmasCalendarSeen()}),fe(()=>{typeof s.value=="function"&&window.removeEventListener("resize",s.value),window.removeEventListener("keyup",S)}),(k,B)=>(a(),h("div",{class:C(["christmas-calendar",{"christmas-calendar--visible":k.visible}])},[c("div",{class:C(["christmas-calendar__container",{"christmas-calendar__container--giveaway":R.value}])},[I(Yo,{content:t.value,doors:k.doors,"doors-tablet":k.doorsTablet,"logo-path":_.value,"onClick:door":Y},null,8,["content","doors","doors-tablet","logo-path"]),I(Mo,{content:t.value,day:u.value,"logo-path":_.value,"show-read-more":d.value,"onClick:door":B[0]||(B[0]=N=>Y(u.value)),"onClick:readMore":B[1]||(B[1]=N=>d.value=!0)},null,8,["content","day","logo-path","show-read-more"]),I(ge,{class:"christmas-calendar__close-button","onClick:button":O})],2),e.value.visible?(a(),g(ro,{key:0,type:e.value.type,onClose:r},null,8,["type"])):l("",!0)],2))}}),Jo=T(jo,[["__scopeId","data-v-8f8aa8d7"]]),qo=["onKeyup"],Zo=$({__name:"ChristmasCalendarToggleCircle",setup(p,{emit:v}){const i=v,m=b.christmasCalendar.present;function s(){i("show:calendar")}return(t,e)=>(a(),h("button",{class:"christmas-calendar-toggle-circle",onClick:z(s,["prevent"]),onKeyup:q(z(s,["prevent"]),["enter"])},[I(n(M),{class:"christmas-calendar-toggle-circle__icon",src:n(m)},null,8,["src"])],40,qo))}}),Qo=T(Zo,[["__scopeId","data-v-f85edd49"]]);var L=(p=>(p.BAR="bar",p.COUNTDOWN_BAR="countdownBar",p.INFO_BAR="infoBar",p))(L||{});const Xo=[{color:o.RED,height:1,icon:b.christmasCalendar.cookieMan,width:2},{color:o.DARK,doorNumber:3,height:2,width:1},{color:o.LIGHT,doorNumber:20,height:1,width:1},{color:o.RED,doorNumber:16,height:1,width:2},{color:o.DARK,height:1,icon:b.christmasCalendar.candle,width:1},{color:o.LIGHT,doorNumber:23,height:1,width:1},{color:o.DARK,doorNumber:12,height:1,width:2},{color:o.RED,height:1,icon:b.christmasCalendar.northStar,width:1},{color:o.RED,doorNumber:1,height:2,width:1},{color:o.RED,doorNumber:19,height:1,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.deer,width:1},{color:o.RED,doorNumber:24,height:2,width:2},{color:o.LIGHT,doorNumber:14,height:1,width:1},{color:o.RED,doorNumber:8,height:2,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.christmasTree,width:2},{color:o.RED,doorNumber:2,height:1,width:1},{color:o.LIGHT,doorNumber:18,height:1,width:1},{color:o.DARK,doorNumber:4,height:1,width:1},{color:o.DARK,doorNumber:15,height:1,width:1},{color:o.LIGHT,doorNumber:6,height:1,width:1},{color:o.LIGHT,height:1,icon:b.christmasCalendar.cane,width:1},{color:o.LIGHT,doorNumber:9,height:1,width:1},{color:o.RED,doorNumber:10,height:2,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.present,width:2},{color:o.LIGHT,doorNumber:22,height:1,width:1},{color:o.LIGHT,doorNumber:11,height:1,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.christmasTree,width:2},{color:o.RED,height:1,icon:b.christmasCalendar.olaf,width:1},{color:o.LIGHT,doorNumber:7,height:1,width:1},{color:o.DARK,doorNumber:5,height:1,width:1},{color:o.LIGHT,height:1,icon:b.christmasCalendar.northStar,width:1},{color:o.RED,doorNumber:17,height:1,width:1},{color:o.LIGHT,doorNumber:13,height:1,width:1},{color:o.DARK,doorNumber:21,height:1,width:2}],xo=[{color:o.RED,height:1,icon:b.christmasCalendar.cookieMan,width:2},{color:o.DARK,doorNumber:3,height:2,width:1},{color:o.LIGHT,doorNumber:20,height:1,width:1},{color:o.RED,doorNumber:16,height:1,width:2},{color:o.DARK,height:1,icon:b.christmasCalendar.candle,width:1},{color:o.LIGHT,doorNumber:23,height:1,width:1},{color:o.RED,doorNumber:1,height:1,width:1},{color:o.RED,doorNumber:19,height:1,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.deer,width:1},{color:o.RED,doorNumber:24,height:2,width:2},{color:o.LIGHT,doorNumber:14,height:1,width:1},{color:o.RED,doorNumber:8,height:2,width:1},{color:o.RED,doorNumber:22,height:1,width:2},{color:o.DARK,doorNumber:4,height:1,width:1},{color:o.DARK,doorNumber:15,height:1,width:1},{color:o.LIGHT,doorNumber:6,height:1,width:1},{color:o.LIGHT,height:1,icon:b.christmasCalendar.cane,width:1},{color:o.LIGHT,doorNumber:9,height:1,width:1},{color:o.RED,doorNumber:10,height:2,width:1},{color:o.LIGHT,doorNumber:11,height:1,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.christmasTree,width:2},{color:o.RED,height:1,icon:b.christmasCalendar.olaf,width:1},{color:o.LIGHT,doorNumber:7,height:1,width:1},{color:o.DARK,doorNumber:5,height:1,width:1},{color:o.LIGHT,height:1,icon:b.christmasCalendar.northStar,width:1},{color:o.RED,doorNumber:17,height:1,width:1},{color:o.DARK,doorNumber:12,height:1,width:2},{color:o.RED,doorNumber:2,height:1,width:1},{color:o.LIGHT,doorNumber:18,height:1,width:1},{color:o.RED,height:1,icon:b.christmasCalendar.present,width:2},{color:o.LIGHT,doorNumber:13,height:1,width:1},{color:o.DARK,doorNumber:21,height:1,width:2}],et={key:0,class:"announcement-bar"},ve="rin-announcement-bar",ot=$({__name:"AnnouncementBar",setup(p){const v=new Ee,i=document.querySelector("body"),m=y(null),s=y(!1),t=y(0),e=y({backgroundColor:"",calendar:null,highlightTextColor:"",infoBackgroundColor:"",infoLink:"",infoTextColor:"",linkColor:"",linkText:"",partnerOnly:!1,primaryText:"",secondaryText:"",textColor:"",type:L.BAR}),d=y(0),u=y(!1),R=y(!1),_=y(""),r=y({days:0,hours:0,minutes:0,seconds:0}),O=y(null),S=y(null),Y=w(()=>`background-color: ${e.value.backgroundColor}; top: ${t.value}px;`),k=w(()=>!(e.value.partnerOnly&&!R.value)),B=w(()=>!!e.value.calendar&&!u.value&&v.getParsedUrlObject().pathname==="/");function N(){u.value=!1,document.body.style.overflowY="auto"}function F(){u.value=!0,document.body.style.overflowY="hidden"}function Ce(){if(!e.value.calendar){N();return}const A=be.getChristmasCalendarSeen();(A===0||new Date().getDate()!==new Date(A).getDate())&&F()}function W(){Z.registerArea(2,ve,d.value)}function x(){s.value=!1,d.value=0,ue(W)}function De(){return X().getIsConnected()&&s.value}function Re(){if(!De()){x();return}r.value.seconds--,r.value.seconds<0&&(r.value.seconds=59,r.value.minutes--,r.value.minutes<0&&(r.value.minutes=59,r.value.hours--,r.value.hours<0&&(r.value.hours=23,r.value.days--,r.value.days<0&&(s.value=!1))))}function ee(){i&&Z.setBodyPosition(i),t.value=Z.getAreaTopPosition(ve)}function oe(){x()}function te(){var A;d.value=((A=m.value)==null?void 0:A.clientHeight)??0}function ae(A){try{const V=JSON.parse(A.detail);s.value=!0,e.value=V.bar,_.value=V.link;const ne=1e3*60*60*24,re=1e3*60*60,se=1e3*60,$e=1e3;let H=V.until-Date.now();const ie=Math.floor(H/ne);H-=ie*ne;const le=Math.floor(H/re);H-=le*re;const ce=Math.floor(H/se);H-=ce*se;const Te=Math.ceil(H/$e);r.value={days:ie,hours:le,minutes:ce,seconds:Te},O.value||(O.value=window.setInterval(Re,1e3)),S.value=window._.debounce(te,125),window.addEventListener("resize",S.value),ue(()=>{te(),W()}),Ce()}catch(V){Le.handleError(V,{logToConsole:!0})}}return _e(async()=>{var A;he.setUpEventListeners([{callback:ae,name:"update-announcementbar"},{callback:oe,name:"remove-announcementbar"},{callback:W,name:"resize"},{callback:ee,name:"rin-top-margin-height-changed"}]),await X().connect(),R.value=((A=Ie.getPersonalInfo())==null?void 0:A.isPartner)??!1,W()}),fe(()=>{he.teardownEventListeners([{callback:ae,name:"update-announcementbar"},{callback:oe,name:"remove-announcementbar"},{callback:W,name:"resize"},{callback:ee,name:"rin-top-margin-height-changed"}]),typeof S.value=="function"&&window.removeEventListener("resize",S.value)}),(A,V)=>s.value&&k.value?(a(),h("div",et,[c("div",{ref_key:"announcementBarRef",ref:m,class:C(["announcement-bar__bar",[{"announcement-bar__bar--info":e.value.type===n(L).INFO_BAR},{"announcement-bar__bar--timer":e.value.type===n(L).BAR||e.value.type===n(L).COUNTDOWN_BAR}]]),style:D(Y.value)},[e.value.type===n(L).INFO_BAR?(a(),g(Fe,{key:0,"info-bar":e.value},null,8,["info-bar"])):l("",!0),e.value.type===n(L).BAR||e.value.type===n(L).COUNTDOWN_BAR?(a(),g(Xe,{key:1,active:s.value,bar:e.value,link:_.value,timer:r.value},null,8,["active","bar","link","timer"])):l("",!0)],6),c("div",{class:C({"announcement-bar__christmas-backdrop":u.value}),onClick:N},null,2),e.value.calendar?(a(),g(Jo,{key:0,"bar-height":d.value,doors:n(Xo),"doors-tablet":n(xo),visible:u.value,"onClose:calendar":N},null,8,["bar-height","doors","doors-tablet","visible"])):l("",!0),B.value?(a(),g(Qo,{key:1,"onShow:calendar":F})):l("",!0)])):l("",!0)}}),tt=T(ot,[["__scopeId","data-v-ab3dc0f5"]]);Be.initVueWithI18NMultipleForPage(tt,".announcementbar-vue",[K.locize.announcementBar.namespaces.UFE,K.locize.frontPage.namespaces.FRONTPAGE],[{projectId:K.locize.announcementBar.PROJECTID,version:K.locize.announcementBar.version},{projectId:K.locize.frontPage.PROJECTID,version:K.locize.frontPage.version}]);
