1import{a as se}from"./chunk-5BXYF2AG.js";import"./chunk-WPXKIKRP.js";import{b as oe,c as re}from"./chunk-X2S22MOD.js";import"./chunk-SZKC77YR.js";import"./chunk-36QGUXGL.js";import"./chunk-4DFU7RH5.js";import"./chunk-J72GSHTC.js";import{a as ne,b as ae}from"./chunk-2J55GRCB.js";import"./chunk-GB5GBUON.js";import"./chunk-LKTRCDCR.js";import"./chunk-DMY3H4IB.js";import"./chunk-76W42G5L.js";import"./chunk-G6A6YPFG.js";import"./chunk-FDJDGCBD.js";import{j as te}from"./chunk-L5YPXMLJ.js";import{a as q,c as B,e as H}from"./chunk-F5OCHRC5.js";import"./chunk-QTDTO7BC.js";import"./chunk-5BWHHP6R.js";import"./chunk-NB2M2N6L.js";import"./chunk-J5VBO6ZC.js";import{a as X}from"./chunk-BMMKHR2B.js";import"./chunk-SUKSKTBG.js";import"./chunk-GI2MEETV.js";import"./chunk-2OZ3VZKX.js";import{a as ee}from"./chunk-YJACMEVJ.js";import{a as G}from"./chunk-EZAWR2KN.js";import{a as W,c as Z}from"./chunk-OAEDTLGA.js";import"./chunk-XBINRJTF.js";import{c as K,f as Y}from"./chunk-F2I26AL6.js";import"./chunk-5Y6XJYUS.js";import"./chunk-CG7OMNUZ.js";import"./chunk-QM2QG644.js";import{a as Q}from"./chunk-MVSTJOUV.js";import"./chunk-VN3FQGF2.js";import"./chunk-GREP6RXZ.js";import"./chunk-FDXXEPOG.js";import{a as ie}from"./chunk-HGQXL2MS.js";import"./chunk-ZGRMU7QE.js";import{a as J}from"./chunk-M73RLUUB.js";import{d as c}from"./chunk-UVSZBC4Q.js";import"./chunk-GLYOPDGR.js";import"./chunk-6XDZRRGZ.js";import"./chunk-2V7R246S.js";import{$c as D,Ba as h,Bc as g,Ca as v,Gb as w,H as y,I as f,Ic as $,J as E,Jc as I,Ma as M,Pc as L,Q as P,Wc as R,Xc as V,Yc as A,ad as N,cc as z,dc as k,gc as O,hc as T,ia as x,ic as d,jc as o,kc as s,lc as p,oa as F,od as _,r as b,sb as l,ta as a,uc as U,ud as j,w as u,zc as C}from"./chunk-RUH5ZQFX.js";import"./chunk-ZGVHDELW.js";var S=(()=>{class i{constructor(){this.#i=a(Y),this.#n=a(G),this.#t=a(ee,{optional:!0}),this.#e=new X({action:({timeout:e,params:t})=>this.#a(t,e)}),this.events$=this.#e.result$,this.errorEvents$=this.#e.error$}#i;#n;#t;#e;fetchEvents(e){let{force:t=!1,timeout:n=null,immediately:r=!1,limit:ue=12,offset:le=0}=e,ce=new K().appendAll({immediately:r,limit:ue,offset:le,api:"v2"});return this.#e.next({timeout:n,params:ce},t),this}#a(e,t){return E([t!=null?b(null).pipe(P(t)):y,this.#i.get(`${this.#n}/events/list?${e.toString()}`).pipe(x(n=>{n.isUpToDate||this.#t?.cancelCache()}),u(n=>n.data))])}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=F({token:i,factory:i.\u0275fac})}}return i})();var pe=["newsTitle"],de=()=>({nominative:"\u043C\u0435\u0440\u043E\u043F\u0440\u0438\u044F\u0442\u0438\u044F",genitive:"\u043C\u0435\u0440\u043E\u043F\u0440\u0438\u044F\u0442\u0438\u0439"}),ge=(i,m)=>m.title;function fe(i,m){i&1&&(o(0,"div",6),p(1,"tui-icon",7),o(2,"div",8),L(3," \u0421\u043A\u043E\u0440\u043E \u0437\u0434\u0435\u0441\u044C \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043C\u0435\u0440\u043E\u043F\u0440\u0438\u044F\u0442\u0438\u044F "),s()())}function he(i,m){if(i&1&&p(0,"cu-site-kit-card-event-ui",10),i&2){let e=m.$implicit;d("event",e)}}function ve(i,m){if(i&1){let e=U();o(0,"div",9),O(1,he,1,1,"cu-site-kit-card-event-ui",10,ge),s(),o(3,"div",11)(4,"cu-site-kit-pagination-ui",12),C("indexChange",function(n){h(e);let r=g();return v(r.onPageChange(n))}),s(),o(5,"cu-site-kit-page-size-selector-ui",13),C("pageSizeChange",function(n){h(e);let r=g();return v(r.updatePageSize(n))}),s()()}if(i&2){let e=g(),t=A(7);l(),T(t),l(3),d("isMobile",e.isMobile())("index",e.currentPage())("length",e.totalPages()),l(),d("isMobile",e.isMobile())("pageSize",e.pageSize()??12)("declensionForms",N(9,de))("buttonSize","xs")("currentPage",e.currentPage())("totalElements",e.totalEvents()??0)}}var je=(()=>{class i{constructor(){this.#i=a(J,{optional:!0}),this.#n=a(B),this.#t=a(H),this.#e=a(S),this.#a=a(te),this.headerStartElRef=j("newsTitle"),this.isMobile=c(a(Z).isEqualToOrNarrowerThan$(W.mobile),{initialValue:!1}),this.events=c(this.#e.events$.pipe(u(e=>e?.items??null)),{initialValue:null}),this.errorEvents=c(this.#e.errorEvents$,{initialValue:null}),this.pageSize=c(this.#e.events$.pipe(u(e=>e?.limit??null)),{initialValue:null}),this.totalEvents=c(this.#e.events$.pipe(u(e=>e?.totalCount??null)),{initialValue:null}),this.totalPages=_(()=>this.totalEvents()&&this.pageSize()?Math.ceil(this.totalEvents()/this.pageSize()):0),this.baseLimit=_(()=>this.isMobile()?6:12),this.currentPage=M(0)}#i;#n;#t;#e;#a;ngOnInit(){let e=this.#r();if(this.#i){this.#e.fetchEvents({timeout:200,immediately:!0,limit:this.baseLimit(),offset:(e-1)*this.baseLimit()}),this.currentPage.set(e-1);return}this.#e.fetchEvents({immediately:!0,limit:this.baseLimit(),offset:(e-1)*this.baseLimit()}),this.currentPage.set(e-1),this.#s()}updatePageSize(e){let t=this.pageSize();t&&t>e&&this.#o(),this.#e.fetchEvents({immediately:!0,limit:e,offset:0}),this.currentPage.set(0)}onPageChange(e){this.#o(),this.#t.navigate(["/events/page",e+1],{replaceUrl:!0})}#s(){this.#t.events.pipe(f(e=>e instanceof q),u(()=>this.#r()),f(e=>e!==this.currentPage()+1)).subscribe(e=>{this.#e.fetchEvents({limit:this.pageSize()??this.baseLimit(),offset:(e-1)*(this.pageSize()??this.baseLimit())}),this.currentPage.set(e-1)})}#o(){let e=this.headerStartElRef();e?.nativeElement&&this.#a.scrollToElementWithOffset(e.nativeElement,-200)}#r(){return Number(this.#n.snapshot.paramMap.get("numberPage"))||1}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=w({type:i,selectors:[["cu-site-events-feature"]],viewQuery:function(t,n){t&1&&$(n.headerStartElRef,pe,5),t&2&&I()},features:[D([S])],decls:11,vars:2,consts:[["newsTitle",""],["cuSiteUiPianoText","\u041C\u0435\u0440\u043E\u043F\u0440\u0438\u044F\u0442\u0438\u044F","aria-label","\u041C\u0435\u0440\u043E\u043F\u0440\u0438\u044F\u0442\u0438\u044F",1,"d:font-h-2xl","font-display","d:
1px-[1.25rem]","px-[0.625rem]","piano-active"],[1,"events-toolbar"],["title","\u0411\u0423\u0414\u0423\u0429\u0418\u0415"],["title","\u041F\u0420\u041E\u0428\u0415\u0414\u0428\u0418\u0415"],[1,"events-content"],[1,"flex","flex-col","items-center","justify-center","gap-24","mt-6","empty-state-animation"],["icon","cuSiteIconContentNotFound",1,"w-[13.75rem]","h-[13.75rem]","cu-site-blue-marguerite-500"],[1,"d:font-body-m-400","font-body-m-400","cu-site-color-grey-300"],[1,"events-list"],[3,"event"],[1,"events-pagination"],[1,"font-ui-m-500",3,"indexChange","isMobile","index","length"],[1,"d:font-body-m-400","font-body-m-400",3,"pageSizeChange","isMobile","pageSize","declensionForms","buttonSize","currentPage","totalElements"]],template:function(t,n){if(t&1&&(o(0,"div",null,0),p(2,"h1",1),s(),o(3,"div",2)(4,"cu-site-tabset-ui"),p(5,"cu-site-tab-ui",3)(6,"cu-site-tab-ui",4),s()(),R(7),o(8,"div",5),z(9,fe,4,0,"div",6)(10,ve,6,10),s()),t&2){l(7);let r=V(n.events());l(2),k(!(r!=null&&r.length)||n.errorEvents()?9:10)}},dependencies:[ae,ne,ie,re,oe,Q,se],styles:["@keyframes _ngcontent-%COMP%_slideUpAndFadeIn{0%{transform:translateY(1rem);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _ngcontent-%COMP%_scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _ngcontent-%COMP%_growHorizontal{0%{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes _ngcontent-%COMP%_slideUpAndFadeInPercent{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%]{--cu-site-tabset-ui-active-color: var(--cu-site-blue-marguerite-500);display:block;min-height:100vh;box-sizing:border-box;margin-top:calc(var(--cu-site-header-height) + 4rem)}.events-toolbar[_ngcontent-%COMP%]{font:var(--font-body-m-600-mobile);letter-spacing:var(--font-body-m-600-mobile-spacing);position:sticky;top:4.875rem;z-index:100;margin-top:3.5rem;padding:.5rem 1.25rem 1rem;background-color:var(--cu-site-color-base-black);opacity:0;animation:_ngcontent-%COMP%_slideUpAndFadeIn .5s cubic-bezier(.6,0,.4,1) forwards;animation-delay:calc(var(--animation-delay, 1s) + .3s)}@media screen and (min-width:64em){.events-toolbar[_ngcontent-%COMP%]{font:var(--font-body-m-600-desktop);letter-spacing:var(--font-body-m-600-desktop-spacing)}}@media screen and (max-width:63.999em){.events-toolbar[_ngcontent-%COMP%]{padding:.5rem 0 1rem}}.events-content[_ngcontent-%COMP%]{margin-top:1.5rem;padding:0 1.25rem;opacity:0;animation:_ngcontent-%COMP%_slideUpAndFadeIn .5s cubic-bezier(.6,0,.4,1) forwards;animation-delay:calc(var(--animation-delay, 1.25s) + .3s)}@media screen and (max-width:63.999em){.events-content[_ngcontent-%COMP%]{padding:0 .625rem}}.events-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.3125rem}@media screen and (max-width:63.999em){.events-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}}.events-pagination[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:2.5rem;width:100%}@media screen and (max-width:63.999em){.events-pagination[_ngcontent-%COMP%]{flex-direction:column;gap:.5rem}}"],changeDetection:0})}}return i})();export{je as SiteEventsFeatureComponent};
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.