PageSourceSearch

https://biletomat.pl/chunk-54Y5XZH6.js

js biletomat.pl collected 2026-10-01 12:05:29 UTC 70,654 bytes, 1 lines download raw bytes

1import{c as Kt,d as so,e as Fi,f as co}from"./chunk-V7RASHU7.js";import{c as Ri,d as wi,e as wt,f as en,g as $,h as We,m as Ai,n as tn,q as po,r as xa,s as lo,t as Pa}from"./chunk-GVNMJLST.js";import{a as Vr,b as Ca}from"./chunk-I6TL6OGQ.js";import{a as Jr,b as va,c as Zr,d as _a,e as no,f as La,g as ro,h as ya,i as oo,j as ao}from"./chunk-WVXQ5MQR.js";import{e as Xr,f as Sa}from"./chunk-BSRGYMJ7.js";import{C as Kr,D as Qr,G as eo,H as Ia,J as to,K as io,o as Br,p as ha,q as Ti,r as ua,s as Dr,v as zr}from"./chunk-7CIZKTER.js";import{A as Yr,B as bi,D as nt,b as Fr,c as Mr,d as Or,e as Ei,f as kr,g as $r,h as Nr,k as jr,m as Ur,r as oe,v as Wr,w as Gr,x as Vi,y as Hr,z as qr}from"./chunk-BG4USSGX.js";import"./chunk-YXBWRIT2.js";import{A as Pr,B as Ie,D as Er,E as Tr,G as br,J as Rr,L as wr,N as K,P as Ar,S as yi,T as Rt,U as fe,W as xi,ca as Pi,k as Xi,l as fa,q as yr,x as xr,y as qt,z as Yt}from"./chunk-BAV524KM.js";import{$ as O,$a as B,$d as Wn,Ab as pi,Ad as te,Ag as cr,B as xe,Bd as it,C as De,Ca as g,Cd as se,Da as T,Db as H,E as pt,Eb as q,Ec as Oe,H as _t,He as aa,I as Q,Ib as li,Ja as yn,Ka as xn,Kh as fr,La as Xe,Ld as Y,Md as F,Na as C,Nc as Pt,Nd as Ee,Ob as Qi,Oc as we,P as ue,Pa as d,Pc as Se,Pf as er,Q as ni,Qb as k,Qc as An,Qd as Bn,Qe as Kn,Qf as ca,Rd as z,Rh as hr,S as zt,Sa as Ki,Sb as Tn,Sc as gi,Sd as Et,Sh as da,T as le,Ta as ri,Td as N,Tf as tr,Th as ur,U as D,Ub as bn,Uc as fi,Ud as M,Va as oi,Vb as mi,Vd as ke,W as St,Wa as ai,Wc as Fn,Wd as _,X as Z,Xa as ne,Xd as Dn,Y as ge,Ya as ee,Yc as Ji,Yd as Ae,Yh as vr,Z as Ln,Za as J,Zb as Rn,Zd as zn,Zh as ga,_a as U,_b as et,_d as ui,_e as Qn,_i as Ir,a as u,aa as Ct,ab as ze,ad as tt,ae as Te,b as I,bb as Gt,bc as wn,ca as m,cb as yt,cd as X,ce as Tt,ch as pr,d as L,db as h,dh as pa,ec as di,ee as vi,eg as ir,eh as lr,f as Ke,fa as ve,fc as lt,fd as Ce,fe as _i,ga as It,gd as Mn,ge as Si,hd as On,he as bt,i as Sn,ic as Me,jd as kn,jg as Ci,kd as $n,ke as Gn,kg as nr,l as ti,lb as si,ld as Nn,le as ra,lg as Ii,ma as Je,mb as ci,mf as Jn,mg as rr,n as Cn,na as Ze,nb as _e,nd as Zi,ne as Hn,ni as _r,o as A,ob as Pe,oe as oa,oj as Lr,pb as xt,pj as $e,q as ii,qb as Ve,qi as Sr,rd as hi,rj as V,s as E,t as Qe,tf as Zn,u as R,uf as sa,v as ye,va as Lt,vh as mr,w as In,wb as Pn,wd as jn,we as qn,wg as or,wh as la,wi as Cr,xa as Wt,xf as Xn,xg as Li,xh as dr,y as Fe,yb as En,ye as Yn,yf as Vn,yg as ar,yh as ma,zb as Ht,zd as Un,zg as sr,zh as gr}from"./chunk-POKSBX2Y.js";function wa(t,i){if(t&1&&J(0,"div",5),t&2){let s=h(3);d("innerHTML",s.artist.internalDescription,Wt)}}function Aa(t,i){if(t&1&&(U(0),ne(1,"kfb-details-box",2)(2,"kfb-zippy",3),J(3,"div",4),C(4,wa,1,1,"div",5),ee()(),B()),t&2){let s=h().$implicit,e=h();g(),d("title",e.artist.name)("imageSource",e.getArtistImageUrl())("imageSize",s.isMobile?e.artistImageSize.mobile:e.artistImageSize.desktop),g(),d("maxLines",9)("withScrollbar",!0),g(),d("innerHTML",e.artist.description,Wt),g(),ri(e.artist.internalDescription?4:-1)}}function Fa(t,i){t&1&&(U(0),C(1,Aa,5,7,"ng-container",1),B()),t&2&&(g(),d("translocoRead","repertoireListing.events.artistDetailsBox"))}var nn,Ma,Oa,ka,$a,mo,rn=L(()=>{"use strict";X();Pi();k();Pi();nr();Tt();ar();rr();nn=120,Ma=120,Oa=80,ka=80,$a={mobile:{width:`${nn}px`,height:`${nn}px`},desktop:{width:`${Oa}px`,height:`${ka}px`}},mo=(()=>{let i=class i{constructor(e){this.imageSrcPipe=e,this.artistImageSize=$a}getArtistImageUrl(){return this.imageSrcPipe.transform(this.artist.picture,{width:nn,height:Ma},fi.NONE)}};i.\u0275fac=function(n){return new(n||i)(T(xi))},i.\u0275cmp=ve({type:i,selectors:[["km-artist-details-box"]],inputs:{artist:"artist"},decls:1,vars:0,consts:[[4,"kfbBreakpoint"],[4,"transloco","translocoRead"],["fallbackImageSource","assets/images/kmf-artist-placeholder.jpg",3,"title","imageSource","imageSize"],["content","","body","",1,"zippy",3,"maxLines","withScrollbar"],[3,"innerHTML"],[1,"additional-description",3,"innerHTML"]],template:function(n,a){n&1&&C(0,Fa,2,1,"ng-container",0)},dependencies:[Ci,Te,Li,Ii],styles:["[_nghost-%COMP%]   .km-artist-details-box-rating[_ngcontent-%COMP%]{font-size:1.125em;display:flex;gap:.2em}[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]   .additional-description[_ngcontent-%COMP%]{padding-top:1em}[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]     kfb-scrollbar{height:14em}@media (max-width: 768px){[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]     kfb-scrollbar{height:auto}}"]});let t=i;return t})()});function Da(t,i){if(t&1&&J(0,"km-events-carousel",1),t&2){let s=i.$implicit,e=h().$implicit,n=h();d("withSimpleHeader",!0)("type",n.eventsCarouselTrackingPrefix+s.country.name.toUpperCase())("title",e("events.artistEventsByCountries.title",pi(6,Ba,s.country.name,s.artistName)))("filters",s.filters)("citySelectorMode","hidden")("urlBuilder",s.urlBuilder)}}function za(t,i){if(t&1&&(U(0),oi(1,Da,1,9,"km-events-carousel",1,Ua),H(3,"async"),B()),t&2){let s=h();g(),ai(q(3,0,s.artistEventsByCountries$))}}var ja,Ua,Ba,Wa,gt,Oi=L(()=>{"use strict";Me();k();X();V();oe();fe();N();ge();io();We();so();co();k();oe();X();N();io();so();Me();Tt();ja=$.selectFiltersValues,Ua=(t,i)=>i.country.code,Ba=(t,i)=>({countryName:t,artistName:i});Wa="LISTING_CAROUSEL_ARTIST_EVENTS_IN_",gt=(()=>{let i=class i extends Ce{createUrlBuilderForArtist(e,n){return{build:()=>
1{if(!e)return{pathSegments:[],queryParams:[]};let a=this.itemMapper.mapToI18nUrlTree(I(u({},e),{type:br.Artist}));return{pathSegments:gi.fromString(this.rewriteService.rewritePathSegments(a,{sourceLocaleId:we.DEFAULT,targetLocaleId:n,explicitLocaleId:!0})).pathSegments.pathSegments,queryParams:[]}}}}normalizeCountryName(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}constructor(e,n,a,c){super(),this.cityApiService=e,this.localeIdProvider=n,this.repertoireStore=a,this.itemMapper=c,this.eventsCarouselTrackingPrefix=Wa,this.eventCarousels=xn(Kt),this.currentFiltersValues$=this.repertoireStore.pipe(F(ja),D(this.destroy$)),this.rewriteService=zn(),this.totalEventsCount=Qi(()=>{let o=this.eventCarousels();if(!o.length)return null;let r=!0,v=0;for(let S of o){let y=S.eventsCount();if(y===null){r=!1;break}v+=y}return r?v:null}),this.isNoEventsForArtist=Qi(()=>{let o=this.totalEventsCount();return o===null?null:o===0}),this.artistEventsByCountries$=Qe([this.cityApiService.getCitiesGroupedByCountries(Tr.ActiveOfferSale,void 0,we.DEFAULT),this.currentFiltersValues$]).pipe(E(([o,r])=>{let v=this.localeIdProvider.get(),S=r.artist;return o.map(y=>{let b=Pt.fromString(y.code),ie=new we(v.languageCode,b??we.DEFAULT.countryCode),l=I(u({},r),{city:void 0,locations:void 0,localeId:ie,isOnline:!1,size:29});return{country:{code:y.code,name:this.normalizeCountryName(y.name)},artistName:S==null?void 0:S.name,filters:[{buttonText:"",listingParams:l}],urlBuilder:this.createUrlBuilderForArtist(S,ie)}})}))}};i.\u0275fac=function(n){return new(n||i)(T(Or),T(Se),T(Y),T(to))},i.\u0275cmp=ve({type:i,selectors:[["km-artist-events-in-other-places-section"]],viewQuery:function(n,a){n&1&&si(a.eventCarousels,Kt,5),n&2&&ci()},standalone:!0,features:[Xe,Pn],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[3,"withSimpleHeader","type","title","filters","citySelectorMode","urlBuilder"]],template:function(n,a){n&1&&C(0,za,4,2,"ng-container",0),n&2&&d("translocoRead","repertoireListing")},dependencies:[Fi,Kt,di,et,Si,Te],changeDetection:0});let t=i;return t})()});var Ha,Le,At=L(()=>{"use strict";N();en();Ha=wt.selectRepertoireListingStore;(function(t){t.INITIAL_STATE={},t.selectMetadataState=Ee(Ha,({metadataState:i})=>i),t.selectArtistMetadata=Ee(t.selectMetadataState,i=>i.artist),t.selectLocationMetadata=Ee(t.selectMetadataState,i=>i.location),t.selectTextMetadata=Ee(t.selectMetadataState,i=>i.text)})(Le||(Le={}))});function Za(t,i){if(t&1&&(U(0),J(1,"kfb-breadcrumbs",1),H(2,"async"),B()),t&2){let s=h();g(),d("links",q(2,1,s.links$))}}var qa,Ya,Ka,Qa,Ja,go,an=L(()=>{"use strict";X();V();fe();ge();We();At();k();N();V();Tt();X();ra();Me();qa=$.selectSelectedSingleLocation,Ya=$.selectSelectedSingleCategory,Ka=$.selectSelectedOrganizer,Qa=Le.selectArtistMetadata,Ja=$.selectSelectedCityWithCountry;go=(()=>{let i=class i{constructor(e,n,a,c){this.store=e,this.dictApiService=n,this.translocoService=a,this.localeIdProvider=c,this.links$=_i().pipe(le(()=>Qe([this.dictApiService.listCountries(),this.store.select(Ja),this.store.select(qa),this.store.select(Ya),this.store.select(Qa),this.store.select(Ka)])),E(([o,r,v,S,y,b])=>this.mapToBreadcrumbsLinks(o,r,v,S,y,b)))}mapToBreadcrumbsLinks(e,n,a,c,o,r){let S=[{text:this.translocoService.translate("repertoireListing.events.title"),routerLink:new Rt().build().pathSegments},this.mapToCountryLink(e,n),this.mapToArtistLinkIfSelected(o),this.mapToCityLinkIfSelected(n,o),this.mapToCategoryLinkIfSelected(n,c,o),this.mapToLocationLinkIfSelected(a),this.mapToOrganizerIfSelected(o,r)];return this.withInactiveLastLink(this.withNotNullLinks(S))}mapToCountryLink(e,n){let a=(n==null?void 0:n.countryCode)??this.localeIdProvider.get().countryCode;return{text:e.find(({code:c})=>Pt.isEqualCodes(c,a)).name,routerLink:new Rt().build().pathSegments}}mapToArtistLinkIfSelected(e){return e?{text:e.name,routerLink:new Rt().withArtist(e).build().pathSegments}:null}mapToCityLinkIfSelected(e,n){return!n&&e&&!xr(e.city)?{text:e.city.name,routerLink:new Rt().withCity(e.city).build().pathSegments}:null}mapToCategoryLinkIfSelected(e,n,a){return!a&&n?{text:n.name,routerLink:new Rt().withCity(e==null?void 0:e.city).withCategory(n).build().pathSegments}:null}mapToLocationLinkIfSelected(e){return e&&e.name?{text:e.name,routerLink:[]}:null}mapToOrganizerIfSelected(e,n){return!e&&n?{text:n.name,routerLink:[]}:null}withNotNullLinks(e){return e.filter(n=>n!==null)}withInactiveLastLink(e){let n=e.slice(0,e.length-1),[a]=e.splice(-1);return[...n,I(u({},a),{routerLink:[]})]}};i.\u0275fac=function(n){return new(n||i)(T(Y),T(Kn),T(Wn),T(Se))},i.\u0275cmp=ve({type:i,selectors:[["km-repertoire-breadcrumbs"]],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[3,"links"]],template:function(n,a){n&1&&C(0,Za,3,3,"ng-container",0),n&2&&d("translocoRead","repertoireListing.events.breadcrumbs")},dependencies:[Gn,Te,et],styles:["@media (max-width: 768px){[_nghost-%COMP%]{display:none}}@media (max-width: 1200px){[_nghost-%COMP%]{padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}}"],changeDetection:0});let t=i;return t})()});function Va(t,i){if(t&1&&Pe(0),t&2){let s=h(2);Ve(" ",s.location.zipCode," ")}}function es(t,i){if(t&1&&(U(0),ne(1,"kfb-details-box",1)(2,"kfb-zippy",2),J(3,"div",3),ee(),ne(4,"div",4)(5,"h5",5),Pe(6),ee(),Pe(7),C(8,Va,1,1),Pe(9),ee()(),B()),t&2){let s=i.$implicit,e=h();g(),d("title",e.location.name)("maxLinesWithElipsisForTitle",3)("imageSource",e.getLocationImageUrl())("imageSize",e.locationImageSize),g(),d("maxLines",9)("withScrollbar",!0),g(),d("innerHTML",e.location.description,Wt),g(3),xt(s("address")),g(),Ve(" ",e.location.address,", "),g(),ri(e.location.zipCode?8:-1),g(),Ve(" ",e.location.city.name," ")}}var fo,ho,ts,uo,sn=L(()=>{"use strict";X();Pi();k();Pi();nr();Tt();ar();fo=123,ho=80,ts={width:`${fo}px`,height:`${ho}px`},uo=(()=>{let i=class i{constructor(e){this.imageSrcPipe=e,this.locationImageSize=ts}getLocationImageUrl(){return this.imageSrcPipe.transform(this.location.logo,{width:fo,height:ho},fi.NONE)}};i.\u0275fac=function(n){return new(n||i)(T(xi))},i.\u0275cmp=ve({type:i,selectors:[["km-location-box"]],inputs:{location:"location"},decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["fallbackImageSource","assets/images/kmf-location-placeholder.jpg",1,"km-location-box",3,"title","maxLinesWithElipsisForTitle","imageSource","imageSize"],["content","","body","",1,"zippy",3,"maxLines","withScrollbar"],[3,"innerHTML"],["footer","",1,"km-location-box-footer"],[1,"km-location-box-footer-title"]],template:function(n,a){n&1&&C(0,es,10,11,"ng-container",0),n&2&&d("translocoRead","repertoireListing.events.locationBox")},dependencies:[Ci,Te,Li],styles:["@media (max-width: 768px){[_nghost-%COMP%]   .km-location-box[_ngcontent-%COMP%]{margin-bottom:1.5em}}[_nghost-%COMP%]   .km-location-box-footer[_ngcontent-%COMP%]{font-size:1em;margin-top:5px}[_nghost-%COMP%]   .km-location-box-footer-title[_ngcontent-%COMP%]{font-size:1.25em;font-weight:500;margin:0 0 4px}[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]     kfb-scrollbar{height:14em}@media (max-width: 768px){[_nghost-%COMP%]   kfb-zippy.zippy[_ngcontent-%COMP%]     kfb-scrollbar{height:auto}}"]});let t=i;return t})()});var ki,$i=L(()=>{"use strict";X();fe();k();X();fe();ki=(()=>{let i=class i{constructor(e,n){this.imageUrlResolver=e,this.repertoireShowUrlResolver=n}mapToStructuredData(e){return e.map(n=>({"@context":"https://schema.org","@type":"TheaterEvent",url:this.repertoireShowUrlResolver.resolveFullUrl(n.show,n),image:this.imageUrlResolver.resolve({imageId:n.show.pictures[0]}
1),name:n.title,description:n.show.description??"",startDate:n.displayPeriod.startsAt,endDate:n.displayPeriod.endsAt??void 0,location:{"@type":"Place",name:n.location.name,address:n.location.address}}))}};i.\u0275fac=function(n){return new(n||i)(m(Fn),m(yi))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var Ft,Mt=L(()=>{"use strict";X();V();oe();ge();k();oe();Ft=(()=>{let i=class i extends Ce{constructor(e){super(),this.listingEventsApiService=e,this.defaultEventsSize=9,this.events=new Sn(null),this.log=Oe.getLogger("RepertoireEventsInOtherCityStore"),this.events$=this.events.asObservable()}loadEvents(e){return this.clearEvents(),new Promise(n=>{var a;this.listingEventsApiService.getEvents(I(u({},e),{size:this.defaultEventsSize,city:void 0,excludedCityId:(a=e.city)==null?void 0:a.id,page:0})).pipe(Q(1)).subscribe({next:c=>{this.events.next(c),n(c)},error:c=>{this.log.error("Cannot fetch events for other city",{error:c}),this.events.next([]),n([])}})})}areEventsLoaded(){return this.events.getValue()!=null}clearEvents(){this.events.next(null)}};i.\u0275fac=function(n){return new(n||i)(m(kr))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var w,Ot=L(()=>{"use strict";N();w=it({source:"Repertoire / Listing / Events",events:{"Upsert new events for current page requested":se(),"New events for current page upserted success":te(),"New events for current page upserted failure":se(),"Events for current page already upserted":se(),"Events per page updated":te(),"Events per page cleared":se(),"Clear and load events per page requested":se(),"Current page updated":te(),"Loading status updated":te(),"State cleared":se()}})});var os,re,Jt=L(()=>{"use strict";Ca();N();en();os=wt.selectRepertoireListingStore;(function(t){let i;(function(s){s.Idle="idle",s.Loading="loading",s.Loaded="loaded",s.Error="error"})(i=t.LoadingStatus||(t.LoadingStatus={})),t.adapter=Vr({selectId:s=>s.page}),t.INITIAL_STATE=t.adapter.getInitialState({loadingStatus:i.Idle,currentPage:0,pageSize:18}),t.selectEventsState=Ee(os,({eventsState:s})=>s),t.selectCurrentPage=Ee(t.selectEventsState,s=>s.currentPage),t.selectLoadingStatus=Ee(t.selectEventsState,s=>s.loadingStatus),t.selectEventsPerPage=Ee(t.selectEventsState,s=>t.adapter.getSelectors().selectAll(s)),t.selectEventsForCurrentPage=Ee(t.selectEventsPerPage,t.selectEventsState,(s,e)=>{var n;return((n=s.find(a=>a.page===e.currentPage))==null?void 0:n.events)??[]}),t.selectAllLoadedEvents=Ee(t.selectEventsPerPage,s=>s.sort((e,n)=>e.page-n.page).reduce((e,n)=>e.concat(n.events),[]))})(re||(re={}))});var _o,as,ss,Ni,cs,ps,ce,kt,$t=L(()=>{"use strict";Me();k();X();V();N();ge();Ln();Ot();Jt();k();Me();N();_o=re.selectEventsState,as=re.selectEventsPerPage,ss=re.selectLoadingStatus,Ni=re.LoadingStatus,cs={pageSize:0,currentPage:0,firstLoadedPage:0,pageInTheViewport:0,theLowestLoadedPage:0,theHighestLoadedPage:0,canLoadPreviousPage:!1,canLoadNextPage:!1},ps={lastScrollPosition:0,infiniteScrollTopEnabled:!0,infiniteScrollBottomEnabled:!0},ce=function(t){return t.page="page",t.pageStart="page-start",t.pageEnd="page-end",t.loadPreviousPage="load-previous-page",t.dynamicLoadNextPage="dynamic-load-next-page",t}(ce||{}),kt=(()=>{let i=class i extends Ce{constructor(e,n,a){super(),this.platformId=e,this.location=n,this.store=a,this.loadingStatus$=this.store.pipe(F(ss),zt(Ni.Idle),D(this.destroy$),ue(1))}get dynamicLoaderClassName(){return ce.dynamicLoadNextPage}get canLoadPreviousPage(){return this.paginationState.canLoadPreviousPage}get canLoadNextPage(){return this.paginationState.canLoadNextPage}load(e=0){this.clear(),this.setPageParam(e),this.watchScrollEventChanges(),this.watchPageChanges(),this.enableLoadPreviousButtonWhenPageIsNotFirst()}clear(){var e,n;this.paginationState=u({},cs),this.scrollState=u({},ps),(e=this.scrollEventChangesSubscription)==null||e.unsubscribe(),(n=this.pageChangesSubscription)==null||n.unsubscribe(),this.eventsPerPage=null}enableInfiniteScroll(e){switch(e){case"backward":{document.getElementsByClassName(`${ce.pageEnd} ${ce.page}-${this.paginationState.pageInTheViewport}`)[0].scrollIntoView({behavior:"auto",block:"nearest",inline:"center"}),this.loadEventsPreviousPage(),this.scrollState.infiniteScrollTopEnabled=!0,this.paginationState.canLoadPreviousPage=!1;break}case"forward":{this.loadEventsNextPage(),this.scrollState.infiniteScrollBottomEnabled=!0,this.paginationState.canLoadNextPage=!1;break}}}generateClassNames(e,n,a){let{theLowestLoadedPage:c}=this.paginationState,o=this.paginationState.pageSize,r=[];return n&&r.push(ce.loadPreviousPage),(n||e%o===0)&&r.push(ce.pageStart,`${ce.page}-${c+e/o}`),(a||e%o===o-1)&&r.push(ce.pageEnd,`${ce.page}-${c+Math.floor(e/o)}`),r.join(" ")}get currentUrlTree(){return gi.fromString(this.location.path(!0))}setPageParam(e){this.paginationState.pageInTheViewport=e,this.paginationState.theLowestLoadedPage=e}watchScrollEventChanges(){lt(this.platformId)&&(this.scrollEventChangesSubscription=In(window,"scroll").pipe(D(this.destroy$),_t(1)).subscribe(()=>{this.loadPreviousPageWhenNeeded(),this.loadNextPageWhenNeeded(),this.showNextPageButtonWhenViewportIsBelowList(),this.updatePageQueryParamWhenScrolling()}))}watchPageChanges(){this.pageChangesSubscription=this.store.select(_o).pipe(Z(this.store.select(as))).pipe(D(this.destroy$)).subscribe(([{currentPage:e,pageSize:n,entities:a},c])=>{var o;if(this.eventsPerPage=c,!((o=a[e])!=null&&o.events.length)){this.paginationState.canLoadNextPage=!1;return}e===0&&(this.paginationState.canLoadPreviousPage=!1),this.paginationState.pageSize=n,this.paginationState.currentPage=e,this.paginationState.firstLoadedPage=e,this.setTheLowestAndTheHighestLoadedPages(e),this.replacePageQueryParam(e)})}replacePageQueryParam(e){let n=this.currentUrlTree,{queryParams:a}=n.queryParams;e===0&&a.page===void 0||(e>0?a.page=e:delete a.page,this.location.replaceState(n.set({queryParams:new An(a)}).toString()))}changePage(e){this.store.pipe(ni(1),Q(1),F(_o),F(n=>n.currentPage)).subscribe(()=>{this.store.dispatch(w.upsertNewEventsForCurrentPageRequested())}),this.store.dispatch(w.currentPageUpdated({page:e}))}isLastPage(){var e,n,a;return!((a=(n=this.eventsPerPage)==null?void 0:n[((e=this.eventsPerPage)==null?void 0:e.length)-1])!=null&&a.events.length)}wasFirstPageLoaded(){var e;return(e=this.eventsPerPage)==null?void 0:e.some(n=>n.page===0)}getFirstLoadedPage(){return this.paginationState.firstLoadedPage??0}getTheLowestLoadedPage(){return this.paginationState.theLowestLoadedPage??this.getFirstLoadedPage()}enableLoadPreviousButtonWhenPageIsNotFirst(){this.paginationState.pageInTheViewport>0&&(this.scrollState.infiniteScrollTopEnabled=!1,this.paginationState.canLoadPreviousPage=!0)}loadPreviousPageWhenNeeded(){return Ke(this,null,function*(){(yield this.isLoadPreviousPageNeeded())&&(document.getElementsByClassName(`${ce.pageStart} ${ce.page}-${this.paginationState.pageInTheViewport+1}`)[0].scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.loadEventsPreviousPage())})}loadNextPageWhenNeeded(){return Ke(this,null,function*(){(yield this.isLoadNextPageNeeded())&&this.loadEventsNextPage()})}isLoadPreviousPageNeeded(){return Ke(this,null,function*(){let e=(yield ii(this.loadingStatus$))===Ni.Loading,n=this.isInViewport(document.getElementsByClassName(ce.loadPreviousPage)[0]);return this.scrollState.infiniteScrollTopEnabled&&n&&this.getTheLowestLoadedPage()>0&&!e})}isLoadNextPageNeeded(){return Ke(this,null,function*(){let e=(yield ii(this.loadingStatus$))===Ni.Loading,n=document.getElementsByClassName(ce.dynamicLoadNextPage),a=this.endIsInViewport(n[0]);return this.scrollState.infiniteScrollBottomEnabled&&!e&&a})}updatePageQueryParamWhenScrolling(){return Ke(this,null,function*(){var a;let e=((a=document.scrollingElement)==null?void 0:a.scrollTop)??0;if(!((yield ii(this.loadingStatus$))===Ni.Loading))if(this.scrollState.lastScrollPosition<e){let c=document.getElementsByClassName(ce.pageStart);for(let o=0;o<c.length;o++)this.updatePageParamWhenNewPageIsInViewport(c[o])}else if(e===0&&!this.currentUrlTree.fragment)this.wasFirstPageLoaded()?(this.paginationState.pageInTheViewport=0,this.replacePageQueryParam(0)):(this.paginationState.canLoadPreviousPage=!0,this.scrollState.infiniteScrollTopEnabled=!1);else{let c=document.getElementsByClassName(ce.pageEnd);for(let o=0;o<c.length;o++)this.updatePageParamWhenNewPageIsInViewport(c[o])}this.scrollState.lastScrollPosition=e})}updatePageParamWhenNewPageIsInViewport(e){var n;if(this.isInViewport(e)){let a=Array.from(e.classList).find(o=>o.startsWith(ce.page)),c=Number((n=a==null?void 0:a.match(/[0-9]+/))==null?void 0:n[0]);c!==this.paginationState.pageInTheViewport&&(this.paginationState.pageInTheViewport=c,this.replacePageQueryParam(c))}}setTheLowestAndTheHighestLoadedPages(e){(this.paginationState.theLowestLoadedPage>e||e===0)&&(this.paginationState.theLowestLoadedPage=e),(this.paginationState.theHighestLoadedPage<e||e===0)&&(this.paginationState.theHighestLoadedPage=e)}loadEventsPreviousPage(){let{theLowestLoadedPage:e}=this.paginationState;e!==void 0&&this.changePage(e-1)}loadEventsNextPage(){let{theHighestLoadedPage:e}=this.paginationState;e!==void 0&&this.changePage(e+1)}toggleNextPageButton(){this.scrollState.infiniteScrollBottomEnabled=!1,this.paginationState.canLoadNextPage=!this.isLastPage()}showNextPageButtonWhenViewportIsBelowList(){let e=document.getElementsByClassName(ce.dynamicLoadNextPage);e.length===1&&this.viewportIsBelowElement(e[0])&&this.toggleNextPageButton()}viewportIsBelowElement(e){return e?e.getBoundingClientRect().bottom+document.documentElement.clientHeight<(window.innerHeight||document.documentElement.clientHeight):!1}isInViewport(e){if(!e)return!1;let n=e.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}endIsInViewport(e){if(this.isLastPage()||!e)return!1;let n=e.getBoundingClientRect(),a=document.documentElement.clientHeight,c=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||a;return window.innerWidth<=768?n.top<=o&&n.bottom>=0:n.left>=0&&n.right<=c&&n.bottom-a/2<=o}};i.\u0275fac=function(n){return new(n||i)(m(Lt),m(Tn),m(Y))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});function Cs(t,i){t&1&&ze(0)}function Is(t,i){t&1&&ze(0)}function Ls(t,i){if(t&1&&(U(0),C(1,Cs,1,0,"ng-container",10)(2,Is,1,0,"ng-container",10),B()),t&2){h();let s=_e(23),e=_e(25);g(),d("ngTemplateOutlet",s),g(),d("ngTemplateOutlet",e)}}function ys(t,i){t&1&&ze(0)}function xs(t,i){if(t&1&&(U(0),C(1,ys,1,0,"ng-container",11),B()),t&2){h();let s=_e(21);g(),d("ngTemplateOutlet",s)("ngTemplateOutletContext",En(2,us))}}function Ps(t,i){t&1&&ze(0)}function Es(t,i){if(t&1&&(U(0),C(1,Ps,1,0,"ng-container",11),B()),t&2){let s;h();let e=_e(21),n=h(2);g(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",Ht(2,vs,(s=n.artistEventsInOtherPlaces())!=null&&s.isNoEventsForArtist()?"no-events":"no-events-in-location"))}}function Ts(t,i){if(t&1){let s=Gt();ne(0,"section",12)(1,"kfb-button",13),yt("clicked",function(){Je(s);let n=h(3);return Ze(n.paginationService.enableInfiniteScroll("backward"))}),Pe(2),ee()()}if(t&2){let s=h(2).$implicit;g(2),Ve(" ",s("loadPrevious")," ")}}function bs(t,i){t&1&&ze(0)}function Rs(t,i){t&1&&ze(0)}function ws(t,i){if(t&1&&(U(0),C(1,bs,1,0,"ng-container",10)(2,Rs,1,0,"ng-container",10),B()),t&2){h(3);let s=_e(23),e=_e(25);g(),d("ngTemplateOutlet",s),g(),d("ngTemplateOutlet",e)}}function As(t,i){if(t&1&&J(0,"kmf-marketing-listing-banner",18),t&2){let s=i.$implicit;d("banner",s)}}function Fs(t,i){if(t&1&&(J(0,"km-event-box",16,3),C(2,As,1,1,"kmf-marketing-listing-banner",17)),t&2){let s=i.$implicit,e=i.$index,n=i.$count,a=_e(1),c=h(2).ngIf,o=h(3);Ki(o.paginationService.generateClassNames(e,e===0,e===n-1)),d("event",s)("kfbIntersectionEntry",a),g(2),d("kmfIfListingBannerAtIndex",pi(5,_s,e,c.length))}}function Ms(t,i){if(t&1&&(ne(0,"section",15),C(1,ws,3,2,"ng-container",7),oi(2,Fs,3,8,null,null,hs),ee()),t&2){let s=h().ngIf,e=h().$implicit,n=h(2);d("kmRepertoireEventToGtmSender",Ht(2,Lo,n.gtmItemListName)),g(),d("ngIf",!e.isMobile),g(),ai(s)}}function Os(t,i){if(t&1&&(U(0),C(1,Ms,4,4,"section",14),B()),t&2){let s=i.ngIf;g(),d("ngIf",s.length)}}function ks(t,i){t&1&&J(0,"kfb-spinner")}function $s(t,i){if(t&1&&J(0,"km-event-box",16,3),t&2){let s=i.$implicit,e=_e(1);d("event",s)("kfbIntersectionEntry",e)}}function Ns(t,i){if(t&1&&(U(0),ne(1,"header",19)(2,"h1"),Pe(3),ee()(),ne(4,"section",15),C(5,$s,2,2,"km-event-box",20),ee(),B()),t&2){let s=i.ngIf,e=h().ngIf,n=h(2).$implicit,a=h();
1g(3),xt(n("headerForLocationInOtherCities",Ht(3,Ss,s.name))),g(),d("kmRepertoireEventToGtmSender",Ht(5,Lo,a.gtmItemListName)),g(),d("ngForOf",e)}}function js(t,i){if(t&1&&(U(0),C(1,Ns,6,7,"ng-container",7),H(2,"async"),B()),t&2){let s=h(3);g(),d("ngIf",q(2,1,s.locationMetadata$))}}function Us(t,i){t&1&&(U(0),J(1,"km-artist-events-in-other-places-section",null,4),B())}function Bs(t,i){t&1&&ze(0)}function Ds(t,i){t&1&&ze(0)}function zs(t,i){if(t&1&&(ne(0,"div",24),C(1,Bs,1,0,"ng-container",10)(2,Ds,1,0,"ng-container",10),ee()),t&2){h(2);let s=_e(23),e=_e(25);g(),d("ngTemplateOutlet",e),g(),d("ngTemplateOutlet",s)}}function Ws(t,i){if(t&1&&(ne(0,"div",21)(1,"p",22),Pe(2),ee(),C(3,zs,3,2,"div",23),ee()),t&2){let s=i.$implicit,e=h().$implicit,n=h().$implicit;g(2),Ve(" ",n(s)," "),g(),d("ngIf",!e.isMobile)}}function Gs(t,i){if(t&1&&J(0,"km-artist-details-box",26),t&2){let s=i.ngIf;d("artist",s)}}function Hs(t,i){if(t&1&&(C(0,Gs,1,1,"km-artist-details-box",25),H(1,"async")),t&2){let s=h(3);d("ngIf",q(1,1,s.artistMetadata$))}}function qs(t,i){if(t&1&&J(0,"km-location-box",28),t&2){let s=i.ngIf;d("location",s)}}function Ys(t,i){if(t&1&&(C(0,qs,1,1,"km-location-box",27),H(1,"async")),t&2){let s=h(3);d("ngIf",q(1,1,s.locationMetadata$))}}function Ks(t,i){if(t&1){let s=Gt();ne(0,"section",12)(1,"kfb-button",13),yt("clicked",function(){Je(s);let n=h(3);return Ze(n.paginationService.enableInfiniteScroll("forward"))}),Pe(2),ee()()}if(t&2){let s=h(2).$implicit;g(2),Ve(" ",s("loadMore")," ")}}function Qs(t,i){if(t&1&&(U(0),C(1,Ls,3,2,"ng-container",7)(2,xs,2,3,"ng-container",7),H(3,"async"),C(4,Es,2,4,"ng-container",7),H(5,"async"),H(6,"async"),C(7,Ts,3,1,"section",8),H(8,"async"),C(9,Os,2,1,"ng-container",7),H(10,"async"),ne(11,"div",9),C(12,ks,1,0,"kfb-spinner",7),H(13,"async"),ee(),C(14,js,3,3,"ng-container",7),H(15,"async"),C(16,Us,3,0,"ng-container",7),H(17,"async"),H(18,"async"),H(19,"async"),C(20,Ws,4,2,"ng-template",null,0,li)(22,Hs,2,3,"ng-template",null,1,li)(24,Ys,2,3,"ng-template",null,2,li)(26,Ks,3,1,"section",8),H(27,"async"),B()),t&2){let s,e,n,a,c=i.$implicit,o=h(2);g(),d("ngIf",c.isMobile),g(),d("ngIf",q(3,11,o.loadingStatus$)===o.LoadingStatus.Error),g(2),d("ngIf",!((s=q(5,13,o.events$))!=null&&s.length)&&q(6,15,o.loadingStatus$)===o.LoadingStatus.Loaded),g(3),d("ngIf",((e=q(8,17,o.events$))==null?null:e.length)&&o.paginationService.canLoadPreviousPage),g(2),d("ngIf",q(10,19,o.events$)),g(2),Ki(o.paginationService.dynamicLoaderClassName),g(),d("ngIf",q(13,21,o.loadingStatus$)===o.LoadingStatus.Loading),g(2),d("ngIf",q(15,23,o.eventsInOtherCities$)),g(2),d("ngIf",!((n=q(17,25,o.events$))!=null&&n.length)&&q(18,27,o.loadingStatus$)===o.LoadingStatus.Loaded&&q(19,29,o.artistMetadata$)),g(10),d("ngIf",((a=q(27,31,o.events$))==null?null:a.length)&&o.paginationService.canLoadNextPage)}}function Js(t,i){t&1&&(U(0),C(1,Qs,28,33,"ng-container",6),B())}var ls,Co,ms,ds,gs,fs,hs,us,vs,Lo,_s,Ss,Zs,me,ji=L(()=>{"use strict";k();V();nt();fe();N();ge();Oi();$i();Mt();$t();Jt();At();k();$t();N();Mt();nt();$i();fe();sa();Me();La();va();Tt();la();ma();pa();rr();Oi();ua();ha();rn();sn();ls=re.LoadingStatus,Co=re.selectEventsState,ms=re.selectAllLoadedEvents,ds=re.selectEventsForCurrentPage,gs=Le.selectLocationMetadata,fs=Le.selectArtistMetadata,hs=(t,i)=>i.id,us=()=>({$implicit:"events-error"}),vs=t=>({$implicit:t}),Lo=t=>({gtmItemListName:t}),_s=(t,i)=>({eventIndex:t,eventsCount:i}),Ss=t=>({locationName:t});Zs="EVENT_LISTING",me=(()=>{let i=class i extends Ce{constructor(e,n,a,c,o,r,v,S){super(),this.paginationService=e,this.repertoireStore=n,this.repertoireListingEventsInOtherCitiesService=a,this.structuredDataService=c,this.structuredDataMapper=o,this.pageLinkService=r,this.repertoireShowUrlResolver=v,this.seoInternalLinksStore=S,this.artistEventsInOtherPlaces=yn(gt),this.LoadingStatus=ls,this.loadingStatus$=this.repertoireStore.pipe(F(Co),F(({loadingStatus:y})=>y),D(this.destroy$),ue(1)),this.events$=this.repertoireStore.pipe(F(ms),D(this.destroy$),ue(1)),this.eventsInOtherCities$=this.repertoireListingEventsInOtherCitiesService.events$.pipe(De(y=>!!(y!=null&&y.length)),D(this.destroy$),ue(1)),this.artistMetadata$=this.repertoireStore.pipe(F(fs),D(this.destroy$),ue(1)),this.locationMetadata$=this.repertoireStore.pipe(F(gs),D(this.destroy$),ue(1))}ngOnInit(){this.watchEventsChanges()}get gtmItemListName(){return Zs}watchEventsChanges(){Qe([this.events$,this.repertoireStore.select(ds),this.repertoireStore.select(Co)]).pipe(D(this.destroy$)).subscribe(([e,n,{currentPage:a,pageSize:c}])=>{let o=e.filter(v=>!Rr(v.sourceSystem));this.structuredDataService.create(()=>this.structuredDataMapper.mapToStructuredData(o)),this.pageLinkService.update(a,n.length<c);let r=new Set(e.map(v=>this.makeShowPathFromEvent(v)));this.seoInternalLinksStore.dispatch(bi.updateSeoExcludedPaths({excludedPaths:r}))})}makeShowPathFromEvent(e){return this.repertoireShowUrlResolver.resolvePathAndQueryParams(e.show)}};i.\u0275fac=function(n){return new(n||i)(T(kt),T(Y),T(Ft),T(qr),T(ki),T(Gr),T(yi),T(Y))},i.\u0275cmp=ve({type:i,selectors:[["km-repertoire-listing-events"]],viewQuery:function(n,a){n&1&&si(a.artistEventsInOtherPlaces,gt,5),n&2&&ci()},features:[Xe],decls:1,vars:1,consts:[["notEventsFound",""],["artistDetails",""],["locationDetail
1s",""],["repertoireEvent",""],["artistEventsInOtherPlaces",""],[4,"transloco","translocoRead"],[4,"kfbBreakpoint"],[4,"ngIf"],["class","repertoire-listing-events-pagination-action",4,"ngIf"],[1,"repertoire-listing-events-pagination-dynamic-loader"],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"repertoire-listing-events-pagination-action"],["appearance","default","shape","round",3,"clicked"],["class","repertoire-listing-events","kfbIntersectionObserver","",3,"kmRepertoireEventToGtmSender",4,"ngIf"],["kfbIntersectionObserver","",1,"repertoire-listing-events",3,"kmRepertoireEventToGtmSender"],[3,"event","kfbIntersectionEntry"],["class","repertoire-listing-events-banner",3,"banner",4,"kmfIfListingBannerAtIndex"],[1,"repertoire-listing-events-banner",3,"banner"],[1,"repertoire-listing-events-in-other-cities-header"],[3,"event","kfbIntersectionEntry",4,"ngFor","ngForOf"],[1,"repertoire-listing-events-not-found"],[1,"repertoire-listing-events-not-found-message"],["class","repertoire-listing-events-not-found-details",4,"ngIf"],[1,"repertoire-listing-events-not-found-details"],["class","repertoire-listing-events-details-box",3,"artist",4,"ngIf"],[1,"repertoire-listing-events-details-box",3,"artist"],["class","repertoire-listing-events-details-box",3,"location",4,"ngIf"],[1,"repertoire-listing-events-details-box",3,"location"]],template:function(n,a){n&1&&C(0,Js,2,0,"ng-container",5),n&2&&d("translocoRead","repertoireListing.events")},dependencies:[Zn,bn,mi,Rn,no,Jr,Te,mr,dr,pr,Ii,gt,Ti,Br,mo,uo,et],styles:["[_nghost-%COMP%]   .repertoire-listing-events[_ngcontent-%COMP%]{padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em);margin-top:.5em;margin-bottom:.5em;gap:1.5em;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:dense}@media (max-width: 600px){[_nghost-%COMP%]   .repertoire-listing-events[_ngcontent-%COMP%]{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (min-width: 600px) and (max-width: 1200px){[_nghost-%COMP%]   .repertoire-listing-events[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}[_nghost-%COMP%]   .repertoire-listing-events[_ngcontent-%COMP%]   .repertoire-listing-events-banner[_ngcontent-%COMP%]{grid-column:1/-1;display:block}[_nghost-%COMP%]   .repertoire-listing-events[_ngcontent-%COMP%]   km-event-box[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .repertoire-listing-events-not-found[_ngcontent-%COMP%]{display:flex;padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}[_nghost-%COMP%]   .repertoire-listing-events-not-found-message[_ngcontent-%COMP%]{width:100%;margin-top:8%;margin-bottom:8%;letter-spacing:.2px;font-size:1.625em;line-height:2.153em;text-align:center;color:#000;opacity:.5}[_nghost-%COMP%]   .repertoire-listing-events-not-found-details[_ngcontent-%COMP%]{width:50%}[_nghost-%COMP%]   .repertoire-listing-events-details-box[_ngcontent-%COMP%]{display:block;grid-column-start:3;grid-row-start:1}@media (min-width: 600px) and (max-width: 1200px){[_nghost-%COMP%]   .repertoire-listing-events-details-box[_ngcontent-%COMP%]{grid-column-start:2}}@media (max-width: 768px){[_nghost-%COMP%]   .repertoire-listing-events-details-box[_ngcontent-%COMP%]{margin-top:40px}}[_nghost-%COMP%]   .repertoire-listing-events-pagination-dynamic-loader[_ngcontent-%COMP%]{margin-top:20px}[_nghost-%COMP%]   .repertoire-listing-events-pagination-dynamic-loader[_ngcontent-%COMP%]   kfb-spinner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-bottom:60px}[_nghost-%COMP%]   .repertoire-listing-events-pagination-action[_ngcontent-%COMP%]{margin:2em 0;display:flex;justify-content:center}[_nghost-%COMP%]   .repertoire-listing-events-in-other-cities-header[_ngcontent-%COMP%]{padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}"]});let t=i;return t})()});var p,Ge=L(()=>{"use strict";N();p=it({source:"Repertoire / Listing / Filters",events:{"Retrieve available values requested":te(),"All filters values updated":te(),"All available values updated":te(),"All filters values cleared":se(),"Create all filters definitions requested":se(),"All filters definitions upserted":te(),"Filter value changed":te(),"Filter value upserted":te(),"Filter closed":te(),"Filter tag removed":te(),"All filter tags removed":se(),"State cleared":se()}})});function ic(t,i){if(t&1){let s=Gt();U(0),ne(1,"kfb-multi-filter",5,1),yt("closed",function(n){Je(s);let a=h(4);return Ze(a.onFilterClosed(n))})("tagRemoved",function(n){Je(s);let a=h(4);return Ze(a.onFilterTagRemoved(n))})("allTagsRemoved",function(){Je(s);let n=h(4);return Ze(n.onAllFilterTagsRemoved())}),ne(3,"km-repertoire-search",6),yt("modalClosed",function(){Je(s);let n=_e(2);return Ze(n.filtersModalRef==null?null:n.filtersModalRef.close())}),ee()(),B()}if(t&2){let s=i.ngIf,e=h().ngIf;h();let n=_e(4);g(),d("filters",e)("formGroup",s)("guideRef",n)}}function nc(t,i){if(t&1&&(U(0),C(1,ic,4,3,"ng-container",3),H(2,"async"),B()),t&2){let s=h(3);g(),d("ngIf",q(2,1,s.formGroup$))}}function rc(t,i){if(t&1&&(U(0),C(1,nc,3,3,"ng-container",3),H(2,"async"),J(3,"kfb-multi-filter-guide",4,0),ne(5,"h1"),Pe(6),ee(),B()),t&2){let s=i.ngIf,e=h().$implicit,n=h();g(),d("ngIf",q(2,4,n.filters$)),g(2),d("placeholder",e("howFiltersWork"))("guideText",s.filtersGuide),g(3),xt(s.head)}}function oc(t,i){if(t&1&&(U(0),ne(1,"header"),J(2,"km-repertoire-breadcrumbs"),C(3,rc,7,6,"ng-container",3),H(4,"async"),ee(),B()),t&2){let s=h();g(3),d("ngIf",q(4,1,s.textMetadata$))}}var Xs,Vs,ec,tc,yo,cn=L(()=>{"use strict";Me();k();aa();V();nt();N();ge();Ge();We();At();k();N();V();nt();Me();Tt();da();ga();xa();an();Xs=Le.selectTextMetadata,Vs=$.FilterType,ec=$.selectFiltersValues,tc=$.selectFiltersDefinitions;yo=(()=>{let i=class i extends Ce{constructor(e,n,a,c,o){super(),this.platformId=e,this.store=n,this.router=a,this.pageHeadService=c,this.validatorsFactory=o,this.filters$=Fe(()=>lt(this.platformId),this.store.pipe(F(tc),D(this.destroy$),ue(1)),A({})),this.textMetadata$=this.store.pipe(F(Xs),D(this.destroy$),ue(1)),this.formGroup$=this.filters$.pipe(Z(this.store.select(ec)),E(([r,v])=>new qn(Object.fromEntries(Object.keys(r).map(S=>[S,new Yn(v[S],this.getValidatorsByFilterType(S,r))])))),D(this.destroy$),ue(1)),this.watchFiltersValuesChanges(),this.watchTextMetadataChanges()}onFilterTagRemoved([e,n]){this.store.dispatch(p.filterTagRemoved({filterType:e,filterTag:n}))}onFilterClosed(e){this.store.dispatch(p.filterClosed({filterType:e}))}onAllFilterTagsRemoved(){this.store.dispatch(p.allFilterTagsRemoved())}watchFiltersValuesChanges(){this.formGroup$.pipe(le(e=>xe(...Object.entries(e.controls).map(([n,a])=>a.valueChanges.pipe(E(c=>[a.valid,n,c]))))),De(([e])=>e),D(this.destroy$)).subscribe(([,e,n])=>{this.store.dispatch(p.filterValueChanged({[e]:n}))})}watchTextMetadataChanges(){this.textMetadata$.subscribe(e=>this.pageHeadService.updateForListing(e))}getValidatorsByFilterType(e,n){let a=[];if(e===Vs.PriceRange){let{min:c,max:o,options:r}=n[e],{from:v,to:S}=r;a.push(this.validatorsFactory.minMax(c,o,{fromLabel:v.label,toLabel:S.label}))}return a}};i.\u0275fac=function(n){return new(n||i)(T(Lt),T(Y),T(bt),T(Wr),T(_r))},i.\u0275cmp=ve({type:i,selectors:[["km-repertoire-listing-filters"]],features:[Xe],decls:1,vars:1,consts:[["multiFilterGuide",""],["multiFilter",""],[4,"transloco","translocoRead"],[4,"ngIf"],[3,"placeholder","guideText"],[3,"closed","tagRemoved","allTagsRemoved","filters","formGroup","guideRef"],["search","",3,"modalClosed"]],template:function(n,a){n&1&&C(0,oc,5,3,"ng-container",2),n&2&&d("translocoRead","repertoireListing.filters")},dependencies:[mi,Te,hr,vr,po,go,et],styles:["[_nghost-%COMP%]{display:block;padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}[_nghost-%COMP%] > header[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:auto;min-height:15em}@media (max-width: 1200px){[_nghost-%COMP%] > header[_ngcontent-%COMP%]{overflow-x:auto;margin-left:calc(calc(var(--km-document-bleed) * -1) + 0em);margin-right:calc(calc(var(--km-document-bleed) * -1) + 0em)}}@media (max-width: 768px){[_nghost-%COMP%] > header[_ngcontent-%COMP%]{flex-direction:column-reverse}}@media (max-width: 1200px){[_nghost-%COMP%] > header[_ngcontent-%COMP%]   kfb-multi-filter[_ngcontent-%COMP%]     .kfb-multi-filter-grid{padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}}[_nghost-%COMP%] > header[_ngcontent-%COMP%]   kfb-multi-filter-guide[_ngcontent-%COMP%]{border-bottom:1px solid #000}@media (max-width: 1200px){[_nghost-%COMP%] > header[_ngcontent-%COMP%]   kfb-multi-filter-guide[_ngcontent-%COMP%]{padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}}@media (max-width: 768px){[_nghost-%COMP%] > header[_ngcontent-%COMP%]   kfb-multi-filter-guide[_ngcontent-%COMP%]{border:none}}[_nghost-%COMP%] > header[_ngcontent-%COMP%] > h1[_ngcontent-%COMP%]{letter-spacing:0px;text-align:left;font-size:2.5em;line-height:1.25em;margin:1em 0 .4em;font-weight:500}@media (max-width: 1200px){[_nghost-%COMP%] > header[_ngcontent-%COMP%] > h1[_ngcontent-%COMP%]{font-size:2.25em;padding-left:calc(var(--km-document-bleed) + 0em);padding-right:calc(var(--km-document-bleed) + 0em)}}@media (max-width: 768px){[_nghost-%COMP%] > header[_ngcontent-%COMP%] > h1[_ngcontent-%COMP%]{margin:.9em 0}}"]});let t=i;return t})()});var be,Nt=L(()=>{"use strict";N();be=it({source:"Repertoire / Listing",events:{"Load listing params requested":te(),"Required redirection to new url":te(
1)}})});var G,ft=L(()=>{"use strict";N();G=it({source:"Repertoire / Listing / Metadata",events:{"Load texts metadata requested":se(),"Metadata updated":te(),"Location metadata updated":te(),"Location metadata cleared":se(),"Artist metadata cleared":se(),"State cleared":se()}})});var xo,pn=L(()=>{"use strict";Zi();X();V();ge();$t();Nt();Ot();Ge();ft();k();Zi();V();N();$t();X();xo=(()=>{let i=class i extends Ce{constructor(e,n,a,c,o){super(),this.activatedRoute=e,this.router=n,this.store=a,this.paginationService=c,this.localeIdProvider=o,this.navigationChanges$=this.router.events.pipe(De(r=>r instanceof Mn),le(()=>this.router.events.pipe(D(this.destroy$)).pipe(De(r=>r instanceof On)).pipe(E(()=>!0))),zt(!1),D(this.destroy$),ue(1)),this.languageCode$=vi().pipe(D(this.destroy$)),this.log=Oe.getLogger("RepertoireListingComponent")}ngOnDestroy(){this.store.dispatch(p.stateCleared()),this.store.dispatch(w.stateCleared()),this.store.dispatch(G.stateCleared()),super.ngOnDestroy()}ngOnInit(){this.watchNavigationChanges()}watchNavigationChanges(){this.navigationChanges$.pipe(le(e=>e?this.languageCode$.pipe(E(()=>!0),zt(!1)):A(!1)),St(e=>{e||this.store.dispatch(p.allFiltersValuesCleared())}),le(()=>{var e,n,a;return ye([((e=this.activatedRoute.firstChild)==null?void 0:e.params.pipe(Q(1)))??A({}),((n=this.activatedRoute.firstChild)==null?void 0:n.queryParams.pipe(Q(1)))??A({}),((a=this.activatedRoute.firstChild)==null?void 0:a.data.pipe(Q(1)))??A({})])})).subscribe({next:c=>Ke(this,[c],function*([e,n,{isOnline:a}]){let o=Number(n.page)||0;this.paginationService.load(o),this.store.dispatch(be.loadListingParamsRequested({pathParams:I(u({},e),{isOnline:a}),queryParams:I(u({},n),{page:o})}))}),error:e=>this.log.error("Failed to load params!",{error:e})})}};i.\u0275fac=function(n){return new(n||i)(T($n),T(bt),T(Y),T(kt),T(Se))},i.\u0275cmp=ve({type:i,selectors:[["km-repertoire-listing"]],features:[Xe],decls:2,vars:0,consts:[["name","filters-outlet"]],template:function(n,a){n&1&&J(0,"router-outlet",0)(1,"router-outlet")},dependencies:[Nn],styles:["[_nghost-%COMP%]{display:block}"]});let t=i;return t})()});var Po,Eo,To=L(()=>{"use strict";zr();ji();cn();pn();Po=[{path:":category",component:me,data:{isOnline:!0},children:[{path:":genre",component:me,data:{isOnline:!0}}]}],Eo=[{path:"",component:xo,children:[{path:"",component:yo,outlet:"filters-outlet"},{path:"",component:me},{path:"online/in/:location",component:me,data:{isOnline:!0},children:Po},{path:"online",component:me,data:{isOnline:!0},children:Po},{path:"in/:city",component:me},{path:"in/:city/in/:location",component:me},{path:"in/:city/:category",component:me},{path:"in/:city/:category/:genre",component:me},{path:"in/:city/in/:location/:category",component:me},{path:"in/:city/in/:location/:category/:genre",component:me},{path:":category",component:me},{path:":category/:genre",component:me}]},Dr()]});var bo,Ro=L(()=>{"use strict";V();fe();To();k();bo=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=It({type:i}),i.\u0275inj=Ct({imports:[Un.forChild(Eo,yr)]});let t=i;return t})()});var Ui,ln=L(()=>{"use strict";Zi();V();nt();ge();ji();k();V();nt();Ui=(()=>{let i=class i extends Ce{constructor(e,n){super(),this.router=e,this.robotsMetaService=n}init(){this.watchAndMarkAsNoIndexIfNeeded()}watchAndMarkAsNoIndexIfNeeded(){this.router.events.pipe(D(this.destroy$)).pipe(De(e=>this.isOnPrimaryListingComponent(e))).subscribe(({snapshot:{params:e,queryParams:n,data:a}})=>{this.markAsNoIndexIfTextSearchOnAllCities(["/events"],this.router.url,e,n,a),this.markAsNoIndexIfOrganizerIdQueryParam(n)})}markAsNoIndexIfTextSearchOnAllCities(e,n,a,c,o){let r=e.some(v=>n.startsWith(this.router.parseUrl(v).toString()));this.robotsMetaService.updateOrRemoveMeta(Vi.NoIndex,r&&this.isTextSearchOnAllCities(a,c,o))}isTextSearchOnAllCities(e,n,a){return e.city===void 0&&a.city===void 0&&n.text!==void 0}isOnPrimaryListingComponent(e){return e instanceof kn&&e.snapshot.component==me&&e.snapshot.outlet=="primary"}markAsNoIndexIfOrganizerIdQueryParam(e){let n=!!e.organizerId;this.robotsMetaService.updateOrRemoveMeta(Vi.NoIndex,n)}};i.\u0275fac=function(n){return new(n||i)(m(bt),m(Hr))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var jt,ht=L(()=>{"use strict";oe();ge();k();oe();jt=(()=>{let i=class i{constructor(e){this.locationApiService=e}getLocationById(e){return Fe(()=>!e,A(null),this.locationApiService.getLocationById(e))}getLocationBySlug(e){return this.locationApiService.getLocationsBySlug(e).pipe(E(n=>n.length===1?n[0]:null))}};i.\u0275fac=function(n){return new(n||i)(m(jr))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var sc,cc,pc,lc,wo,Ao=L(()=>{"use strict";X();V();fe();Ae();ge();ao();ht();Mt();Nt();Ot();Ge();ft();Jt();We();k();Ae();N();ao();ht();Mt();sc=$.selectFiltersValues,cc=re.selectEventsState,pc=re.selectAllLoadedEvents,lc=$.selectSelectedSingleLocation,wo=(()=>{let i=class i extends $e{constructor(e,n,a,c,o){super(),this.actions$=e,this.store=n,this.listingEventsService=a,this.locationService=c,this.repertoireListingEventsInOtherCitiesService=o,this.upsertNewEventsForCurrentPageWithUp
1dateLocationMetadata=M(()=>this.actions$.pipe(_(w.upsertNewEventsForCurrentPageRequested),_t(0),Z(this.store.select(sc),this.store.select(cc)),R(([,r,v])=>{var y,b,ie,l;if(v.ids.some(f=>f===v.currentPage))return A(w.eventsForCurrentPageAlreadyUpserted());let S={city:(y=r==null?void 0:r.cityWithCountry)==null?void 0:y.city,locations:r==null?void 0:r.locations,categories:(b=r==null?void 0:r.categoriesOrGenres)==null?void 0:b.filter(f=>!f.genre).map(f=>f.category),genres:(ie=r==null?void 0:r.categoriesOrGenres)==null?void 0:ie.filter(f=>f.genre),artist:r==null?void 0:r.artist,additionalFilters:(l=r==null?void 0:r.additionalFilters)==null?void 0:l.filter(f=>f!==Ie.IS_ONLINE),dateRange:r==null?void 0:r.dateRange,priceRange:r==null?void 0:r.priceRange,text:r==null?void 0:r.searchPhrase,isOnline:!!(r!=null&&r.isOnline),sort:r==null?void 0:r.sort,page:v.currentPage,size:v.pageSize,organizer:r==null?void 0:r.organizer};return this.listingEventsService.getEvents(S).pipe(Q(1),Z(this.store.select(lc),this.store.select(pc)),R(([f,x,de])=>{let He=de.map(Re=>Re.id),vt=f.filter(Re=>!He.includes(Re.id));vt.length<v.pageSize&&x&&!this.repertoireListingEventsInOtherCitiesService.areEventsLoaded()&&this.repertoireListingEventsInOtherCitiesService.loadEvents(S);let Ut=this.locationService.getLocationById(x==null?void 0:x.id);return ye([A(vt),Ut])}),R(([f,x])=>[w.newEventsForCurrentPageUpsertedSuccess({events:f}),G.locationMetadataUpdated({location:x})]),pt(f=>(this.log.error("Cannot fetch events!",{error:f}),A(w.newEventsForCurrentPageUpsertedFailure()))))}))),this.upsertNewEventsForCurrentPageWhenAllFiltersUpserted$=M(()=>this.actions$.pipe(_(be.loadListingParamsRequested),le(()=>this.actions$.pipe(_(p.allFiltersDefinitionsUpserted),Q(1)))).pipe(E(()=>w.upsertNewEventsForCurrentPageRequested()))),this.updateCurrentPageWhenLoadListingParamsRequested$=M(()=>this.actions$.pipe(_(be.loadListingParamsRequested),R(({queryParams:{page:r}})=>[w.currentPageUpdated({page:r})]))),this.clearAllEventsPerPageWhenNewEventsForCurrentPageNotUpserted$=M(()=>this.actions$.pipe(_(w.newEventsForCurrentPageUpsertedFailure),E(()=>w.eventsPerPageCleared()))),this.clearAllEventsPerPage$=M(()=>this.actions$.pipe(_(w.eventsPerPageCleared),St(()=>this.repertoireListingEventsInOtherCitiesService.clearEvents())),{dispatch:!1}),this.clearAndUpsertNewEventsForCurrentPage$=M(()=>this.actions$.pipe(_(w.clearAndLoadEventsPerPageRequested),R(()=>[w.eventsPerPageCleared(),w.upsertNewEventsForCurrentPageRequested()]))),this.clearAndLoadAllEvents$=M(()=>xe(this.actions$.pipe(_(p.filterValueUpserted)),xe(this.actions$.pipe(_(p.allFiltersValuesCleared)),this.actions$.pipe(_(p.allFilterTagsRemoved))).pipe(le(()=>this.actions$.pipe(_(p.allFiltersDefinitionsUpserted),Q(1))))).pipe(E(()=>w.clearAndLoadEventsPerPageRequested()))),this.log=Oe.getLogger("RepertoireListingEventsEffects")}};i.\u0275fac=function(n){return new(n||i)(m(ke),m(Y),m(oo),m(jt),m(Ft))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var Fo,je,Zt,Ue,Mo,Oo=L(()=>{"use strict";X();V();fe();Ae();N();ge();Ln();wi();ht();Ge();ft();We();At();k();Ae();N();wi();ht();X();Fo=Le.selectLocationMetadata,je=$.FilterType,Zt=$.selectFiltersValues,Ue=$.ofFilterType,Mo=(()=>{let i=class i extends $e{constructor(e,n,a,c,o){super(),this.actions$=e,this.store=n,this.cityService=a,this.locationService=c,this.localeIdProvider=o,this.upsertCityValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.CityWithCountry),Z(this.store.select(Fo),this.store.pipe(F(Zt),F(r=>r==null?void 0:r.additionalFilters))),R(([{cityWithCountry:r},v,S])=>{r=Yt(r,this.getLocaleId(r==null?void 0:r.countryCode)),S=S==null?void 0:S.filter(ie=>ie!==Ie.IS_ONLINE);let y={cityWithCountry:r,additionalFilters:S,isOnline:!1},b=[];return(!r||(v==null?void 0:v.city.id)!==r.city.id)&&(y.locations=void 0,b.push(G.locationMetadataCleared())),[...b,p.filterValueUpserted(y)]}))),this.upsertLocationsValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.Locations),Z(this.store.pipe(F(Zt),F(r=>r==null?void 0:r.cityWithCountry)),this.store.pipe(F(Zt),F(r=>r==null?void 0:r.isOnline))),R(([{locations:r},v,S])=>{let y=(r==null?void 0:r.map(l=>l.id))??[],b=this.locationService.getLocationById(y[0]),ie=A(v);return y.length>0&&!S&&(ie=this.cityService.getCityByLocationIds(y).pipe(E(qt))),ye([ie,b,A(r)])}),R(([r,v,S])=>[G.locationMetadataUpdated({location:v}),p.filterValueUpserted({cityWithCountry:r,locations:S,organizer:void 0})]))),this.upsertCategoriesOrGenresValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.CategoriesOrGenres),R(({categoriesOrGenres:r})=>[p.filterValueUpserted({categoriesOrGenres:r})]))),this.upsertDateRangeValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.DateRange),R(({dateRange:r})=>[p.filterValueUpserted({dateRange:r})]))),this.upsertPriceRangeValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.PriceRange),R(({priceRange:r})=>[p.filterValueUpserted({priceRange:r})]))),this.upsertArtistValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.Artist),R(()=>[G.artistMetadataCleared(),p.filterValueUpserted({artist:void 0})]))),this.upsertAdditionalFiltersValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.AdditionalFilters),Z(this.store.pipe(F(Zt),F(r=>r==null?void 0:r.cityWithCountry)),this.store.select(Fo)),R(([{additionalFilters:r},v,S])=>{var l;let y=!!(r!=null&&r.includes(Ie.IS_ONLINE)),b={additionalFilters:r,isOnline:y},ie=f=>[p.filterValueUpserted(f)];if(y)b.cityWithCountry=void 0;else{let f=(l=S==null?void 0:S.city)==null?void 0:l.id,x=40;if(!(!f||v))return f===x?[...ie(I(u({},b),{cityWithCountry:void 0,locations:void 0})),G.locationMetadataCleared()]:this.cityService.getCityById(f).pipe(Q(1),R(de=>ie(I(u({},b),{cityWithCountry:qt(de)}
1))))}return ie(b)}))),this.upsertSearchPhraseValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.SearchPhrase),Z(this.store.pipe(F(Zt),F(r=>r==null?void 0:r.searchPhrase))),R(([{searchPhrase:r},v])=>r!==v?[p.filterValueUpserted({searchPhrase:r})]:ti))),this.upsertSortValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.Sort),R(({sort:r})=>[p.filterValueUpserted({sort:r})]))),this.upsertOrganizerValue$=M(()=>this.actions$.pipe(_(p.filterValueChanged),Ue(je.Organizer),R(()=>[p.filterValueUpserted({organizer:void 0})])))}getLocaleId(e){return we.withOverride(this.localeIdProvider.get(),{countryCode:e})}};i.\u0275fac=function(n){return new(n||i)(m(ke),m(Y),m(Ri),m(jt),m(Se))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var ko,dn=L(()=>{"use strict";oe();k();oe();ko=(()=>{let i=class i{constructor(e){this.artistApiService=e}getArtist(e,n){return n?this.artistApiService.getArtistBySlugAndId(n,e):this.artistApiService.getArtist(e)}};i.\u0275fac=function(n){return new(n||i)(m(Fr))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var $o,gn=L(()=>{"use strict";oe();fe();ge();k();oe();$o=(()=>{let i=class i{constructor(e){this.categoryApiService=e}getCategoryAndGenreById(e,n){let a=e?this.categoryApiService.getCategoryById(e):null,c=n?this.categoryApiService.getGenreById(n):null;return this.getCategoryAndGenre(a,c)}getCategoryAndGenreBySlug(e,n){let a=null,c=null;if(e&&(a=this.categoryApiService.getCategoriesBySlug(e).pipe(E(([o])=>o)),n)){let o=new wr(e,n);c=this.categoryApiService.getGenresByCombinedSlug(o).pipe(E(([r])=>r))}return this.getCategoryAndGenre(a,c)}getCategoryAndGenre(e,n){return n?n.pipe(R(a=>Fe(()=>!a,A(null),ye([this.categoryApiService.getCategoryById(a.category.id),A(a)]).pipe(R(([c,o])=>Fe(()=>!o||o.category.id!==c.id,A(null),ye([A(c),A(o)]))))))):e?e.pipe(R(a=>Fe(()=>!a,A(null),ye([A(a),A(null)])))):A(null)}};i.\u0275fac=function(n){return new(n||i)(m(Mr))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var No,fn=L(()=>{"use strict";V();oe();fe();k();oe();No=(()=>{let i=class i{constructor(e){this.listingFiltersApiService=e,this.localeId=hi()}getAvailableFiltersValues(e){return this.listingFiltersApiService.getAvailableFiltersValues(u({genres:{sort:Er.Alphabetical},localeId:this.localeId},e))}};i.\u0275fac=function(n){return new(n||i)(m($r))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var jo,hn=L(()=>{"use strict";oe();k();oe();jo=(()=>{let i=class i{constructor(e){this.organizerApiService=e}getOrganizer(e){return this.organizerApiService.getOrganizer(e)}};i.\u0275fac=function(n){return new(n||i)(m(Ur))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var Uo,Bo=L(()=>{"use strict";fe();Uo=t=>{let{artist:i,cityWithCountry:s,locations:e,categoriesOrGenres:n}=t,c=[{condition:i,result:[K.SHOW,K.CATEGORY_GENRE_CITY,K.LOCATION,K.OTHER]},{condition:(s==null?void 0:s.city)&&(e==null?void 0:e.length)===1,result:[K.SHOW,K.CATEGORY_CITY,K.LOCATION]},{condition:(s==null?void 0:s.city)&&(n==null?void 0:n.length)===1&&n[0].genre,result:[K.ARTIST,K.CATEGORY_GENRE_CITY]},{condition:(s==null?void 0:s.city)&&(n==null?void 0:n.length)===1,result:[K.SHOW,K.CATEGORY_CITY]},{condition:s==null?void 0:s.city,result:[K.SHOW,K.CATEGORY_CITY,K.CATEGORY_GENRE_CITY]},{condition:(n==null?void 0:n.length)===1&&n[0].genre,result:[K.ARTIST,K.CATEGORY_CITY]},{condition:(n==null?void 0:n.length)===1,result:[K.SHOW,K.CITY,K.CATEGORY_CITY,K.LOCATION]}].find(o=>o.condition);return c?c.result:[K.SHOW,K.CATEGORY_CITY]}});var uc,un,vc,_c,Do,ut,zo=L(()=>{"use strict";X();V();oe();nt();fe();Ae();N();ge();Qr();dn();gn();wi();fn();ht();hn();tn();Bo();Nt();Ge();ft();We();k();Ae();N();wi();ht();gn();dn();hn();fn();tn();Qr();X();uc=$.FilterType,un=$.selectFiltersValues,vc=$.selectAvailableValues,_c=$.ofFilterType,Do=(()=>{let i=class i extends $e{constructor(e,n,a,c,o,r,v,S,y,b,ie){super(),this.actions$=e,this.repertoireStore=n,this.cityService=a,this.locationService=c,this.categoryService=o,this.artistService=r,this.organizerService=v,this.filtersService=S,this.filterFactory=y,this.userPreferencesFacade=b,this.localeIdProvider=ie,this.retrieveAvailableValuesWhenListingParamsReceived$=M(()=>this.actions$.pipe(_(be.loadListingParamsRequested),R(({pathParams:l,queryParams:f})=>{var Dt,j,st,Vt,ei;let{location:x,category:de,genre:He}=l,{text:vt,sort:Ut,organizerId:Re}=f,rt=!!(l.isOnline||f.isOnline),ot=l.city||f.city,[qe,at]=((Dt=l.artist)==null?void 0:Dt.split(","))??[],Wi={locations:((j=f.locations)==null?void 0:j.split(","))??[],categories:((st=f.categories)==null?void 0:st.split(","))??[],genres:((Vt=f.genres)==null?void 0:Vt.split(","))??[]},Gi=new Ji(f["dateRange.from"]??null,f["dateRange.to"]??null),Hi=new Ji(f["priceRange.from"]??null,f["priceRange.to"]??null),Xt=(ei=f.additionalFilters)==null?void 0:ei.split(","),Bt=this.sanitizeAdditionalFiltersToOnlyValidValues(Xt);
1return rt&&Bt.push(Ie.IS_ONLINE),ye([ut.getIf(ot).select(this.cityService.getCityBySlug(ot)).thrownErrorIfUndefinedOrNull().redirectedIf(({country:pe})=>!Pt.isEqualCodes(pe.code,this.getLocaleId().countryCode)).observer$,ut.getIf(x).select(this.locationService.getLocationBySlug(x)).thrownErrorIfUndefinedOrNull().redirectedIf(({slug:pe,city:{slug:ae}})=>pe!==x||ae!==ot).observer$,ut.getIf(de||He).select(this.categoryService.getCategoryAndGenreBySlug(de,He)).thrownErrorIfUndefinedOrNull().redirectedIf(([pe,ae])=>pe.slug!==de||He&&(ae==null?void 0:ae.slug)!==He).observer$,ut.getIf(at||qe).select(this.artistService.getArtist(at,qe)).thrownErrorIfUndefinedOrNull().redirectedIf(pe=>pe.slug!==qe||at===null||at===void 0).observer$,ut.getIf(Re).select(this.organizerService.getOrganizer(Re)).thrownErrorIfUndefinedOrNull().observer$]).pipe(R(([pe,ae,he,P,ct])=>{let Be={cityWithCountry:Pr(pe==null?void 0:pe.content,this.getLocaleId()),dateRange:Gi,priceRange:Hi,additionalFilters:Bt,searchPhrase:vt,sort:Ut,isOnline:rt,organizer:ct},Yi=[];return(ae||P)&&(ae!=null&&ae.content&&(Be.locations=[ae.content],Be.cityWithCountry=qt(ae.content.city)),Be.artist=P==null?void 0:P.content),he!=null&&he.content&&(Be.categoriesOrGenres=[{category:he==null?void 0:he.content[0],genre:he==null?void 0:he.content[1]}]),P!=null&&P.content&&Yi.push(G.metadataUpdated({metadata:{artist:P==null?void 0:P.content}})),(pe!=null&&pe.redirected||ae!=null&&ae.redirected||P!=null&&P.redirected||he!=null&&he.redirected)&&Yi.push(be.requiredRedirectionToNewUrl({filtersValues:Be})),[p.retrieveAvailableValuesRequested({filtersValues:Be,slugs:Wi}),...Yi]}),pt(()=>{throw new Ir("Cannot set filters values due to invalid params received!")}))}))),this.createAllFiltersWithUpdatingAvailableAndFiltersValues$=M(()=>Qe([this.actions$.pipe(_(p.retrieveAvailableValuesRequested)),_i()]).pipe(Z(this.repertoireStore.select(un)),R(([[{filtersValues:l,slugs:f}],x])=>{var Xt,Bt,qi,Dt;l??=x;let de=Yt(l==null?void 0:l.cityWithCountry,this.getLocaleId()),He=de==null?void 0:de.city.slug,vt=l!=null&&l.artist?Number(l.artist.id):void 0,Ut=(Xt=l==null?void 0:l.organizer)==null?void 0:Xt.id,Re=[...((Bt=l==null?void 0:l.locations)==null?void 0:Bt.filter(Boolean).map(j=>j.slug))??[],...(f==null?void 0:f.locations)??[]],rt=[...(f==null?void 0:f.categories)??[]],ot=((qi=l==null?void 0:l.categoriesOrGenres)==null?void 0:qi.filter(j=>!j.genre).map(j=>j.category.id))??[],qe=[...(f==null?void 0:f.genres)??[]],at=((Dt=l==null?void 0:l.categoriesOrGenres)==null?void 0:Dt.filter(j=>j.genre).map(j=>{var st;return{categoryId:j.category.id,genreId:(st=j.genre)==null?void 0:st.id,category:j.category,genre:j.genre}}))??[],Wi=this.sanitizeAdditionalFiltersToOnlyValidValues(l==null?void 0:l.additionalFilters).filter(j=>j!==Ie.IS_ONLINE),Gi=!!(l!=null&&l.isOnline),Hi={citySlug:He,locationSlugs:Re,categorySlugs:rt,combinedGenreSlugs:qe,additionalFilters:Wi,artistId:vt,isOnline:Gi,organizerId:Ut};return this.filtersService.getAvailableFiltersValues(I(u({},Hi),{localeId:this.getLocaleId(de==null?void 0:de.countryCode)})).pipe(Q(1),R(j=>{let st=j.locations.filter(({slug:P})=>Re==null?void 0:Re.includes(P)).map(P=>tt(P)),Vt=[...j.categories.filter(({category:{slug:P}})=>rt==null?void 0:rt.includes(P)).map(({category:P})=>({category:tt(P)})),...j.categories.filter(({category:{id:P}})=>ot==null?void 0:ot.includes(P)).map(({category:P})=>({category:tt(P)}))],ei=j.categories.map(({category:P,genres:ct})=>({category:P,genres:ct.filter(Ye=>qe==null?void 0:qe.includes(new Ei(P,Ye).toCombinedSlugs()))})).filter(P=>P.genres.length).flatMap(({category:P,genres:ct})=>ct.map(Ye=>({category:tt(P),genre:tt(Ye)}))),pe=at.length>0?j.categories.flatMap(({category:P,genres:ct})=>ct.filter(Ye=>at.some(Be=>Be.categoryId===P.id&&Be.genreId===Ye.id)).map(Ye=>({category:tt(P),genre:tt(Ye)}))):[],ae=[...ei,...pe],he=[...Vt,...ae];return[p.allFiltersValuesUpdated({filtersValues:I(u({},l),{cityWithCountry:de,locations:st,categoriesOrGenres:he})}),p.allAvailableValuesUpdated({availableValues:j}),p.createAllFiltersDefinitionsRequested()]}),pt(j=>(this.log.error("Cannot fetch available filters values!",{error:j}),ti)))}),Lr())),this.upsertAllFilters$=M(()=>this.actions$.pipe(_(p.createAllFiltersDefinitionsRequested),Z(this.repertoireStore.select(vc)),E(([,l])=>{let f=this.filterFactory.createAllFilterDefinitions(l);return p.allFiltersDefinitionsUpserted({filtersDefinitions:f})}
1))),this.clearAllFiltersAndRetrieveAvailableValues$=M(()=>this.actions$.pipe(_(p.allFilterTagsRemoved)).pipe(Z(this.repertoireStore.pipe(F(un),F(l=>l==null?void 0:l.cityWithCountry))),E(([,l])=>p.retrieveAvailableValuesRequested({filtersValues:{cityWithCountry:l}})))),this.retrieveAvailableValuesWhenAnyFilterClosedOrRemovedOrSearchPhraseChanged$=M(()=>xe(this.actions$.pipe(_(p.filterClosed)),this.actions$.pipe(_(p.filterTagRemoved)).pipe(_t(300)),this.actions$.pipe(_(p.filterValueUpserted),_c(uc.SearchPhrase))).pipe(R(()=>Cn(new Promise(l=>{l(p.retrieveAvailableValuesRequested({}))}))))),this.changeSelectedCityWhenAllFiltersDefinitionsUpserted$=M(()=>this.actions$.pipe(_(p.allFiltersDefinitionsUpserted),Z(this.repertoireStore.pipe(F(un),F(l=>l==null?void 0:l.cityWithCountry))),St(([,l])=>{let{city:f,countryCode:x}=Yt(l,this.getLocaleId());this.userPreferencesFacade.changeSelectedCity(f,x)})),{dispatch:!1}),this.changeSeoInternalLinkTypes$=M(()=>this.actions$.pipe(_(p.allFiltersValuesUpdated),E(l=>{let f=Uo(l.filtersValues);return bi.updateSeoLinkTypes({types:f})}))),this.log=Oe.getLogger("RepertoireListingFiltersEffects")}sanitizeAdditionalFiltersToOnlyValidValues(e){let n=Object.values(Ie);return(e??[]).filter(a=>n.includes(a))}getLocaleId(e){return we.withOverride(this.localeIdProvider.get(),{countryCode:e})}};i.\u0275fac=function(n){return new(n||i)(m(ke),m(Y),m(Ri),m(jt),m($o),m(ko),m(jo),m(No),m(Ai),m(Kr),m(Se))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})(),ut=class t{constructor(i,s){this.condition=i,this.truePath$=s}static getIf(i){return new t(i,A(void 0))}select(i){return new t(this.condition,i.pipe(R(()=>i)))}redirectedIf(i){return new t(this.condition,this.truePath$.pipe(E(s=>({content:s,redirected:i(s)}))))}thrownErrorIfUndefinedOrNull(){return new t(this.condition,this.observer$.pipe(E(i=>{if(!i)throw new Error;return i})))}get observer$(){return Fe(()=>this.condition,this.truePath$,A(void 0))}}});var Wo,vn=L(()=>{"use strict";V();oe();k();oe();Wo=(()=>{let i=class i{constructor(e){this.listingTextsApiService=e,this.localeId=hi()}getTexts(e){return this.listingTextsApiService.getTexts(u({localeId:this.localeId},e))}};i.\u0275fac=function(n){return new(n||i)(m(Nr))},i.\u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})()});var Cc,Go,Ho=L(()=>{"use strict";X();V();oe();fe();Ae();ge();vn();Nt();Ot();Ge();ft();We();k();Ae();N();vn();X();Cc=$.selectFiltersValues,Go=(()=>{let i=class i extends $e{constructor(e,n,a,c){super(),this.actions$=e,this.store=n,this.textsService=a,this.localeIdProvider=c,this.updateTextMetadata$=M(()=>this.actions$.pipe(_(G.loadTextsMetadataRequested),Z(this.store.select(Cc)),R(([,o])=>{var v,S,y,b,ie,l,f;let r={citySlug:(v=o==null?void 0:o.cityWithCountry)==null?void 0:v.city.slug,locationSlugs:(S=o==null?void 0:o.locations)==null?void 0:S.filter(x=>!!x).map(x=>x.slug),categorySlugs:(y=o==null?void 0:o.categoriesOrGenres)==null?void 0:y.filter(x=>x.category).map(x=>x.category.slug),combinedGenreSlugs:(b=o==null?void 0:o.categoriesOrGenres)==null?void 0:b.filter(x=>x.genre).map(x=>new Ei(x.category,x.genre).toCombinedSlugs()),artistId:o!=null&&o.artist?Number(o==null?void 0:o.artist.id):void 0,additionalFilters:(ie=o==null?void 0:o.additionalFilters)==null?void 0:ie.filter(x=>x!==Ie.IS_ONLINE),isOnline:!!(o!=null&&o.isOnline),organizerId:(l=o==null?void 0:o.organizer)==null?void 0:l.id};return this.textsService.getTexts(I(u({},r),{localeId:this.getLocaleId((f=o==null?void 0:o.cityWithCountry)==null?void 0:f.countryCode)})).pipe(Q(1),E(x=>G.metadataUpdated({metadata:{text:x}})),pt(x=>(this.log.error("Cannot fetch texts!",{error:x}),A(G.metadataUpdated({metadata:{text:void 0}})))))}))),this.updateTextMetadataWhenFiltersUpsertedOrEventsLoaded$=M(()=>xe(this.actions$.pipe(_(be.loadListingParamsRequested),le(()=>this.actions$.pipe(_(p.allFiltersDefinitionsUpserted),Q(1)))),this.actions$.pipe(_(w.clearAndLoadEventsPerPageRequested))).pipe(E(()=>G.loadTextsMetadataRequested()))),this.clearMetadata$=M(()=>xe(this.actions$.pipe(_(p.allFilterTagsRemoved)),this.actions$.pipe(_(p.allFiltersValuesCleared))).pipe(R(()=>[G.artistMetadataCleared(),G.locationMetadataCleared()]))),this.log=Oe.getLogger("RepertoireListingMetadataEffects")}getLocaleId(e){return we.withOverride(this.localeIdProvider.get(),{countryCode:e})}};i.\u0275fac=function(n){return new(n||i)(m(ke),m(Y),m(Wo),m(Se))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var Ic,qo,Yo=L(()=>{"use strict";k();V();fe();Ae();Me();X();fa();ge();Nt();Ge();We();k();Ae();N();X();Ic=$.selectFiltersValues,qo=(()=>{let i=class i extends $e{constructor(e,n,a,c){super(),this.actions$=e,this.store=n,this.localeIdProvider=a,this.platformId=c,this.changeUrlOrRedirectTo$=lt(this.platformId)?ui(this.createSeri
1alizerWhenRedirectionRequired()):Xi(this.createSerializerWhenRedirectionRequired()),this.updateURLWhenFiltersHaveBeenChanged$=ui(()=>xe(this.actions$.pipe(_(p.filterValueUpserted)),this.actions$.pipe(_(p.allFilterTagsRemoved)).pipe(le(()=>this.actions$.pipe(_(p.allFiltersDefinitionsUpserted),Q(1))))).pipe(Z(this.store.select(Ic)),E(([,o])=>this.createSerializer(o)))),this.updateURLWhenLanguageChanges$=lt(this.platformId)?ui(this.createSerializerWhenLanguageChanged()):Xi(this.createSerializerWhenLanguageChanged())}createSerializerWhenLanguageChanged(){return()=>vi().pipe(ni(1),le(()=>this.actions$.pipe(_(p.allFiltersValuesUpdated),Q(1),E(({filtersValues:e})=>e))),E(e=>this.createSerializer(e)))}createSerializerWhenRedirectionRequired(){return()=>this.actions$.pipe(_(be.requiredRedirectionToNewUrl),E(({filtersValues:e})=>this.createSerializer(e)))}createSerializer(e){var a,c,o,r,v,S,y;return new Ar(this.localeIdProvider).serialize({isOnline:!!(e!=null&&e.isOnline),city:(a=e==null?void 0:e.cityWithCountry)==null?void 0:a.city.slug,locations:(c=e==null?void 0:e.locations)==null?void 0:c.map(b=>b.slug),categories:(o=e==null?void 0:e.categoriesOrGenres)==null?void 0:o.filter(b=>!b.genre).map(b=>b.category.slug),genres:(r=e==null?void 0:e.categoriesOrGenres)==null?void 0:r.filter(b=>!!b.genre).map(b=>({slug:b.genre.slug,category:{slug:b.category.slug}})),artist:(e==null?void 0:e.artist)??void 0,dateRange:(e==null?void 0:e.dateRange)??void 0,priceRange:(e==null?void 0:e.priceRange)??void 0,sort:e==null?void 0:e.sort,additionalFilters:(v=e==null?void 0:e.additionalFilters)==null?void 0:v.filter(b=>b!==Ie.IS_ONLINE),text:e==null?void 0:e.searchPhrase,organizerId:(S=e==null?void 0:e.organizer)==null?void 0:S.id,countryCode:(y=e==null?void 0:e.cityWithCountry)==null?void 0:y.countryCode})}};i.\u0275fac=function(n){return new(n||i)(m(ke),m(Y),m(Se),m(Lt))},i.\u0275prov=O({token:i,factory:i.\u0275fac});let t=i;return t})()});var Di,_n,zi,Ko,Qo=L(()=>{"use strict";N();Ot();Jt();Di=re.INITIAL_STATE,_n=re.adapter,zi=re.LoadingStatus,Ko=Et(Di,z(w.upsertNewEventsForCurrentPageRequested,t=>I(u({},t),{loadingStatus:zi.Loading})),z(w.newEventsForCurrentPageUpsertedSuccess,t=>I(u({},t),{loadingStatus:zi.Loaded})),z(w.newEventsForCurrentPageUpsertedFailure,t=>I(u({},t),{loadingStatus:zi.Error})),z(w.eventsForCurrentPageAlreadyUpserted,t=>I(u({},t),{loadingStatus:zi.Idle})),z(w.eventsPerPageUpdated,(t,{events:i})=>_n.addMany(i,t)),z(w.newEventsForCurrentPageUpsertedSuccess,(t,{events:i})=>_n.upsertOne({page:t.currentPage,events:i},t)),z(w.currentPageUpdated,(t,{page:i})=>{let s=Number(i??Di.currentPage);return I(u({},t),{currentPage:s})}),z(w.loadingStatusUpdated,(t,{status:i})=>I(u({},t),{loadingStatus:i})),z(w.eventsPerPageCleared,t=>{let i=Di.currentPage;return _n.removeAll(I(u({},t),{currentPage:i}))}),z(w.stateCleared,()=>Di))});var Jo,Zo,Xo=L(()=>{"use strict";N();Ge();We();Jo=$.INITIAL_STATE,Zo=Et(Jo,z(p.allFiltersValuesUpdated,(t,{filtersValues:i})=>I(u({},t),{filtersValues:i})),z(p.allAvailableValuesUpdated,(t,{availableValues:i})=>I(u({},t),{availableValues:i})),z(p.allFiltersDefinitionsUpserted,(t,{filtersDefinitions:i})=>I(u({},t),{filtersDefinitions:i})),z(p.filterValueUpserted,(t,i)=>I(u({},t),{filtersValues:u(u({},t.filtersValues),i)})),z(p.allFiltersValuesCleared,t=>I(u({},t),{filtersValues:void 0})),z(p.stateCleared,()=>Jo))});var Vo,ea,ta=L(()=>{"use strict";N();ft();At();Vo=Le.INITIAL_STATE,ea=Et(Vo,z(G.metadataUpdated,(t,{metadata:i})=>u(u({},t),i)),z(G.locationMetadataUpdated,(t,{location:i})=>I(u({},t),{location:t.artist?void 0:i})),z(G.locationMetadataCleared,t=>I(u({},t),{location:void 0})),z(G.artistMetadataCleared,t=>I(u({},t),{artist:void 0})),z(G.stateCleared,()=>Vo))});var ia,na=L(()=>{"use strict";Ae();N();Ao();Oo();zo();Ho();Yo();Qo();Xo();ta();en();k();ia=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=It({type:i}),i.\u0275inj=Ct({imports:[Bn.forFeature(wt.KEY,{eventsState:Ko,filtersState:Zo,metadataState:ea}),Dn.forFeature([qo,wo,Do,Mo,Go])]});let t=i;return t})()});var Kf,Lc=L(()=>{Me();ca();oa();V();zr();nt();Ia();_a();Sa();rn();Oi();an();ya();co();sn();Pa();$i();Ro();ji();cn();pn();ln();Mt();tn();$t();na();k();ln();Kf=(()=>{let i=class i{constructor(e){e.init()}};i.\u0275fac=function(n){return new(n||i)(m(Ui))},i.\u0275mod=It({type:i}),i.\u0275inj=Ct({providers:[wn,Qn,Ft,Ai,kt,ki,Ui],imports:[Vn,Xn,di,ro,Zr,eo,cr,jn,Si.forChild(),gr,er,Hn,fr,ur,Sr,bo,lo,ia,tr,Yr,lr,Xr,sr,Fi,Jn,or,ir,Cr,gt,Ti]});let t=i;return t})()});Lc();export{Kf as RepertoireListingModule};

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.