1import{a as le}from"./chunk-IMLLTNEV.js";import{a as ae}from"./chunk-DBFITYTI.js";import{a as ce}from"./chunk-YCMNYOJ3.js";import{a as se,b as pe}from"./chunk-QNQG3WXS.js";import{a as re}from"./chunk-XU3X2YP5.js";import"./chunk-NQVLXGVB.js";import"./chunk-BE45IUKI.js";import"./chunk-B6NRLRBS.js";import"./chunk-IP5FUP2B.js";import"./chunk-QH2RXAO2.js";import{a as ie}from"./chunk-CQLAGQNM.js";import{a as oe}from"./chunk-2AOOQWIT.js";import{a as ne}from"./chunk-Q5LJUV3L.js";import"./chunk-3O4NXPYV.js";import{a as te}from"./chunk-6LEZHGLX.js";import"./chunk-SOWNSDVS.js";import{k as Z}from"./chunk-K4O73SKT.js";import"./chunk-D3ED5CAA.js";import"./chunk-ASZKVKS2.js";import"./chunk-JXZUBHAP.js";import"./chunk-FE4OSO6A.js";import"./chunk-PLY5JERT.js";import"./chunk-W4TN3D7V.js";import{b as ee}from"./chunk-SGFDMKOB.js";import{$ as Y,X}from"./chunk-FBKQDMH7.js";import{a as K}from"./chunk-UYAJYTOD.js";import"./chunk-GM3TIB7Z.js";import"./chunk-QL6YS5OU.js";import"./chunk-FZ7WUL3C.js";import{a as ge}from"./chunk-RCUPQHA7.js";import{h as V,r as J}from"./chunk-YJOMLR5S.js";import{Db as U,Dc as f,Jc as W,Kc as F,Lc as $,Ob as P,Qc as Q,Sa as M,Sc as q,Ub as g,Va as A,ad as R,bd as G,f as k,ha as O,hc as l,nc as d,oc as j,qc as B,rc as I,sc as b,sd as N,tc as h,ua as E,uc as u,xb as s}from"./chunk-P3WUMIUN.js";import"./chunk-2TPHVERC.js";import"./chunk-4HA6AAV2.js";import{g as T}from"./chunk-5NZDUGTO.js";import"./chunk-2OY4FR2S.js";import"./chunk-BKGEFWZG.js";import{a as H,b as z,e as Ce,f as x,g as S,h as _}from"./chunk-P7UHXAQQ.js";function me(e,n,t){let p=+T(e,t?.in),[c,v]=[+T(n.start,t?.in),+T(n.end,t?.in)].sort((r,i)=>r-i);return p>=c&&p<=v}function ve(e,n){if(e&1&&(b(0,"div",3),u(1,"ewp-richtext",5),h()),e&2){let t=f(2);s(),l("content",t.content().branchPromoSubtext)}}function we(e,n){if(e&1&&(b(0,"li",6)(1,"div",7),u(2,"ewp-icon",8)(3,"ewp-text",9),h(),u(4,"ewp-tooltip",10),h()),e&2){let t=n.$implicit;s(2),l("content",t.icon),s(),l("content",t.label),s(),l("tooltipText",t.tooltipText)}}function xe(e,n){if(e&1&&(b(0,"ul",4),B(1,we,5,3,"li",6,j),h()),e&2){let t=f(2);s(),I(t.content().branchPromoList)}}function _e(e,n){if(e&1&&(b(0,"div",0)(1,"div",1)(2,"span",2),Q(3),h(),g(4,ve,2,1,"div",3),h(),g(5,xe,3,0,"ul",4),h()),e&2){let t,p,c,v=f();s(3),q(" ",(t=v.content().branchPromoHeadline)==null?null:t.textPlain," "),s(),d(!((p=v.content().branchPromoSubtext)==null||p.wysiwyg==null)&&p.wysiwyg.length?4:-1),s(),d((c=v.content().branchPromoList)!=null&&c.length?5:-1)}}var de=(()=>{let n=class n{constructor(){this.content=M(void 0)}};n.\u0275fac=function(c){return new(c||n)},n.\u0275cmp=P({type:n,selectors:[["ewp-branch-usp-promo-branch-usp-promo"]],inputs:{content:[1,"content"]},decls:1,vars:1,consts:[[1,"branch-promo"],[1,"gap-4"],[1,"text-ewp-headline-xs","!font-ewp-fw-bold","leading-5","text-ewp-ui-headline-dark"],[1,"text-base","text-ewp-ui-copy-dark"],[1,"flex","w-full","flex-col","gap-2"],[3,"content"],[1,"align-self-stretch","flex","w-full","items-center","gap-4"],[1,"flex","flex-1","items-center","gap-4"],[1,"usp-icon",3,"content"],[1,"text-base","font-normal","text-ewp-ui-copy-dark",3,"content"],[1,"tooltip-container",3,"tooltipText"]],template:function(c,v){c&1&&g(0,_e,6,3,"div",0),c&2&&d(v.content()?0:-1)},dependencies:[ee,oe,ne,se],styles:[".branch-promo[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1.5rem;border-radius:.5rem;background-color:var(--ewp-ui-bg-container-loud, #FFDC00);padding:1rem 1.5rem}.tooltip-container[_ngcontent-%COMP%] svg-icon{background-color:var(--ewp-ui-bg-container-loud, #FFDC00)} ewp-icon.usp-icon svg{height:2rem;width:2rem}"]});let e=n;return e})();var Pe=(e,n)=>n.branchPromoId;function ye(e,n){if(e&1&&u(0,"ewp-branch-usp-promo-branch-usp-promo",1),e&2){let t=f(2);l("content",t.uspPromo)}}function Se(e,n){if(e&1&&u(0,"ewp-branch-picture-promo",1),e&2){let t=n.$implicit;l("content",t)}}function Me(e,n){if(e&1&&(b(0,"div",0),g(1,ye,1,1,"ewp-branch-usp-promo-branch-usp-promo",1),B(2,Se,1,1,"ewp-branch-picture-promo",1,Pe),h()),e&2){let t=f();s(),d(t.hasUspItems()?1:-1),s(),I(t.picturePromos)}}var ue=(()=>{let n=class n{hidePromoWrapper(){let p=(this.uspPromo?.branchPromoList?.length??0)>0,c=(this.picturePromos?.length??0)>0;return p||c}hasUspItems(){return(this.uspPromo?.branchPromoList?.length??0)>0}};n.\u0275fac=function(c){return new(c||n)},n.\u0275cmp=P({type:n,selectors:[["ewp-branch-promo-wrapper"]],inputs:{uspPromo:"uspPromo",picturePromos:"picturePromos"},decls:1,vars:1,consts:[[1,"grid","gap-2"],[3,"content"]],template:function(c,v){c&1&&g(0,Me,4,1,"div",0),c&2&&d(v.hidePromoWrapper()?0:-1)},dependencies:[J,de,pe],encapsulation:2});let e=n;return e})();var D=Ce(ge(),1);var Be=["branchCard"],Ie=["branchMapDiv"],Re=(e,n)=>({"w-full":e,"items-stretch":n}),L=e=>({"mobile-max":e});function Te(e,n){if(e&1&&u(0,"ewp-headline",2),e&2){let t=f();l("content",t.content().headline)}}function De(e,n){if(e&1&&u(0,"ewp-mobile-service-banner",6),e&2){let t=f();l("content",t.mobileServiceBanner)("region",t.branchRegion)("branchShowMobileService",t.branchShowMobileService)}}function ke(e,n){if(e&1&&u(0,"ewp-branch-promo-wrapper",7),e&2){let t=f();l("uspPromo",t.uspPromo)("picturePromos",t.picturePromos)}}function Oe(e,n){if(e&1&&u(0,"ewp-branch-card",8),e&2){let t=f();l("branchCardMode",t.BranchCardMode.STAGE_BRANCH)("conversationalMode",!!t.conversationalContent)("branchCardProperties",t.branchCardProperties)("woosmapBranchInformation",t.woosmapBranchInformation[0])("changeAppointmentLink",t.content().changeAppointment)("flexibleWidth",!0)("branchRatingsData",t.branchRatingsData())}}function Ee(e,n){if(e&1&&(b(0,"div",9),u(1,"ewp-conversational",11),h()),e&2){let t=f();l("ngClass",R(2,L,t.isMobileWindow())),s(),l("content",t.conversationalContent)}}function Ue(e,n){if(e&1&&(b(0,"div",10,1),u(2,"ewp-branch-map",12),h()),e&2){let t=f();l("ngClass",R(3,L,t.isMobileWindow())),s(2),l("content",t.branchMap)("isStandalone",!1)}}function We(e,n){if(e&1&&(b(0,"div",9),u(1,"ewp-picture",13),h()),e&2){let t=f();l("ngClass",R(3,L,t.isMobileWindow())),s(),l("content",t.pictureContent)("stageBranch",!0)}}var dt=(()=>{var n,t,p;let c=class c{constructor(r,i){S(this,n);S(this,t);S(this,p);this.isBrowser=r,this.cdr=i,this.destroy1$=new k,this.destroy2$=new k,this.BranchCardMode=X,this.content=M.required(),this.branchMap=null,this.conversationalContent=null,this.pictureContent=null,_
1(this,n,E(Z)),_(this,t,E(Y)),this.woosmapBranchInformation=[],this.isInitialized=!1,this.picturePromos=[],this.uspPromo=null,this.branchRatingsData=A(null),this.mobileServiceBanner=null,this.branchRegion="",this.branchShowMobileService=!1,_(this,p,null)}ngOnInit(){this.branchCardProperties=this.content().leftComponent,this.mobileServiceBanner=this.content().mobileServiceBanner??null,this.mapRightComponent(),this.handleBranchCard()}ngAfterViewInit(){this.isBrowser&&this.observeBranchCardHeight()}filterBranchPromos(r){let i=new Date,{branchPromoList:o}=this.content().leftComponent.branchPromos??{};if(!o)return;let m={individual:[],global:[]},C={individual:[],global:[]};for(let a of o){if(!this.isPromoActive(i,new Date(a.startDate),new Date(a.endDate)))continue;let w=a.templateId==="ewpBranchUspPromo";if(a.isGlobal){w?C.global.push({icon:a.icon,label:{templateId:"",textPlain:a.label},tooltipText:a.tooltipText,templateId:a.templateId}):m.global.push(a);continue}r?.ids&&r.ids?.includes(a.branchPromoId)&&(w?C.individual.push({icon:a.icon,label:{templateId:"",textPlain:a.label},tooltipText:a.tooltipText,templateId:a.templateId}):m.individual.push(a))}this.picturePromos=[...m.individual,...m.global],this.uspPromo=this.prepareUspPromo(C,r)}prepareUspPromo(r,i){let o=this.content(),m=o.leftComponent.branchPromos?.branchPromoHeadline,C=o.leftComponent.branchPromos?.branchPromoSubtext,a={branchPromoHeadline:{templateId:"",textPlain:i?.headerText||m},branchPromoList:[...r.individual,...r.global]};return i?.subText?a.branchPromoSubtext={templateId:"",wysiwyg:i.subText}:C&&(a.branchPromoSubtext=C),a}isPromoActive(r,i,o){return me(r,{start:i,end:o})}matchHeight(){if(!this.branchCardRef||!this.branchMapDivRef)return;let r=this.branchCardRef.nativeElement,i=this.branchMapDivRef.nativeElement;i.style.height=`${r.getBoundingClientRect().height}px`,i.style.overflow="hidden"}observeBranchCardHeight(){this.branchCardRef?.nativeElement&&(_(this,p,new ResizeObserver(()=>this.matchHeight())),x(this,p).observe(this.branchCardRef.nativeElement))}shouldShowPromos(){let r=(this.uspPromo?.branchPromoList?.length??0)>0,i=(this.picturePromos?.length??0)>0;return r||i}handleBranchCard(){x(this,n).woosmapContent$.pipe(O(this.destroy1$)).subscribe(r=>{this.woosmapBranchInformation[0]=r?.features[0]?.properties,this.branchRegion=this.woosmapBranchInformation[0]?.user_properties?.region??"",this.branchShowMobileService=this.woosmapBranchInformation[0]?.user_properties?.showMobileService===!0,this.filterBranchPromos(this.woosmapBranchInformation[0]?.user_properties?.promotions),this.fetchRatings(),this.isInitialized=!0,this.cdr.detectChanges()})}fetchRatings(){let r=this.content()?.leftComponent?.userFeedback;if(!r)return;let i=this.woosmapBranchInformation[0];if(!i)return;let o=r.reviewService||"google",m=x(this,t).normalizeReviewService(o),C=x(this,t).extractServiceCenterIds([i],o);C.length!==0&&x(this,t).getRatings(m,C[0]).subscribe({next:a=>{if(a&&a.rating>0&&a.amount_of_reviews>0){let w=null;switch(m){case"google":case"qualtrics":w=i.user_properties?.reviews?.googleUrl||null;break;case"trustpilot":w=i.user_properties?.reviews?.trustpilotUrl||null;break}this.branchRatingsData.set(z(H({},a),{reviewUrl:w||void 0}))}}})}mapRightComponent(){let{mode:r,templateId:i,whitespace:o,primarySubComponent:m,secondarySubComponent:C,hideOn:a,hideHeadlineOn:w,uspBranchReferences:fe}=this.content().rightComponent;switch(i){case"ewpConversational":this.conversationalContent={templateId:i,whitespace:o,mode:r||D.Mode.L,uspBranchReferences:fe,primarySubComponent:m??{templateId:""},secondarySubComponent:C??{templateId:""}},this.branchMap=null,this.pictureContent=null;break;case"ewpBranchMap":this.branchMap={templateId:i,hideOn:a,hideHeadlineOn:w,whitespace:o||D.Whitespace.M},this.conversationalContent=null,this.pictureContent=null;break;case"ewpPicture":x(this,n).woosmapContent$.pipe(O(this.destroy2$)).subscribe(be=>{let y=be?.features[0]?.properties?.user_properties?.stageBranchPicture;y&&y.src&&(this.pictureContent={templateId:i,src:y.src??"",alt:y.alt??"",fallback:y.fallback,isLazyLoadingEnabled:!0,link:void 0,sizes:[]},this.conversationalContent=null,this.branchMap=null)});break;default:this.conversationalContent=null,this.branchMap=null,this.pictureContent=null;break}}isMobileWindow(){return this.isBrowser?window.matchMedia("(max-width: 769px)").matches:!0}ngOnDestroy(){this.destroy1$.next(),this.destroy1$.complete(),this.destroy2$.next(),this.destroy2$.complete(),x(this,p)?.disconnect(),_(this,p,null)}};n=new WeakMap,t=new WeakMap,p=new WeakMap,c.\u0275fac=function(i){return new(i||c)(U(K),U(N))},c.\u0275cmp=P({type:c,selectors:[["ewp-stage-branch"]],viewQuery:function(i,o){if(i&1&&(W(Be,5),W(Ie,5)),i&2){let m;F(m=$())&&(o.branchCardRef=m.first),F(m=$())&&(o.branchMapDivRef=m.first)}},inputs:{content:[1,"content"]},decls:11,vars:11,consts:[["branchCard",""],["branchMapDiv",""],[1,"mx-auto","mb-6","block","m:mb-8","xl:mb-12",3,"content"],[1,"grid-container","w-full","justify-center"],[1,"apply-width","min-w-[296px]","max-w-[400px]",3,"ngClass"],[1,"flex","flex-col","gap-2"],[1,"block",3,"content","regi
1on","branchShowMobileService"],[3,"uspPromo","picturePromos"],[1,"flex-grow",3,"branchCardMode","conversationalMode","branchCardProperties","woosmapBranchInformation","changeAppointmentLink","flexibleWidth","branchRatingsData"],[1,"apply-max",3,"ngClass"],[1,"map-container","apply-max",3,"ngClass"],[3,"content"],[3,"content","isStandalone"],[3,"content","stageBranch"]],template:function(i,o){if(i&1&&(g(0,Te,1,1,"ewp-headline",2),b(1,"div",3)(2,"div",4)(3,"div",5,0),g(5,De,1,3,"ewp-mobile-service-banner",6)(6,ke,1,2,"ewp-branch-promo-wrapper",7)(7,Oe,1,7,"ewp-branch-card",8),h()(),g(8,Ee,2,4,"div",9)(9,Ue,3,5,"div",10)(10,We,2,5,"div",9),h()),i&2){let m;d(o.content().headline?0:-1),s(2),l("ngClass",G(8,Re,o.isMobileWindow(),o.branchMap)),s(3),d(o.mobileServiceBanner&&o.isInitialized&&o.branchShowMobileService?5:-1),s(),d((m=o.content().leftComponent)!=null&&m.branchPromos&&o.shouldShowPromos()?6:-1),s(),d(o.isInitialized?7:-1),s(),d(o.conversationalContent?8:-1),s(),d(o.branchMap?9:-1),s(),d(o.pictureContent?10:-1)}},dependencies:[V,re,ce,ae,ie,ue,le,te],styles:["[_nghost-%COMP%]{display:block}@media(width>=992px){.apply-max[_ngcontent-%COMP%]{width:67%}}@media(width>=769px){.apply-width[_ngcontent-%COMP%]{width:33%}}.mobile-max[_ngcontent-%COMP%]{max-width:400px}.grid-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:2rem}ewp-branch-card[_ngcontent-%COMP%], ewp-conversational[_ngcontent-%COMP%], ewp-branch-map[_ngcontent-%COMP%], ewp-picture[_ngcontent-%COMP%]{margin:0;padding:0}@media(width<=768px){.grid-container[_ngcontent-%COMP%]{flex-direction:column;align-items:center;gap:3rem}} .grid-map{height:100%!important;width:100%!important;margin-top:0!important}@media(width<=768px){ .grid-map{max-width:400px!important;margin:0 auto}}.map-container[_ngcontent-%COMP%] ewp-branch-map div:first-child{height:100%;width:100%}.map-container[_ngcontent-%COMP%] .mapboxgl-ctrl{width:unset!important}"]});let e=c;return e})();export{dt as StageBranchComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.