1"use strict";(self.webpackChunkenergy_tcm=self.webpackChunkenergy_tcm||[]).push([[6057,4221],{77617:(R,h,o)=>{o.d(h,{I:()=>M});var i,e=o(76965),c=o(45286),g=o(7605),s=o(1173),f=function(i){return i[i.Add=0]="Add",i[i.Save=1]="Save",i[i.Reset=2]="Reset",i}(f||{});(i=f||(f={})).keys=function m(){return Object.keys(i).map(d=>{const T=parseInt(d,10);if(T>=0)return{key:T,value:i[T]}}).filter(d=>!!d)};var l=o(44029),n=o(54438),_=o(65382),D=o(63649),O=o(26588),G=o(60177);let F=(()=>{class i{transform(d,T){return T[d]}static#t=this.\u0275fac=function(T){return new(T||i)};static#e=this.\u0275pipe=n.EJ8({name:"enumToString",type:i,pure:!0})}return i})();function v(i,m){if(1&i){const d=n.RV6();n.j41(0,"button",5),n.bIt("click",function(){n.eBV(d);const t=n.XpG().$implicit,x=n.XpG(3);return n.Njj(x.dispatchMode(t))}),n.j41(1,"mcrai-icon"),n.EFF(2),n.nI1(3,"enumToString"),n.nI1(4,"lowercase"),n.k0s()()}if(2&i){const d=n.XpG().$implicit,T=n.XpG(3);n.AVh("toolbar__button--active",T.toolbarService.isModeActive(d)),n.R7$(2),n.JRh(n.bMT(4,6,n.i5U(3,3,d,T.TOOLBAR_MODES)))}}function E(i,m){if(1&i&&n.DNE(0,v,5,8,"button",4),2&i){const d=m.$implicit,T=n.XpG(3);n.vxM(0,T.showToolbar()||T.toolbarService.isModeActive(d)?0:-1)}}function P(i,m){if(1&i&&(n.j41(0,"div",2),n.Z7z(1,E,1,1,null,null,n.fX1),n.k0s()),2&i){const d=n.XpG(2);n.R7$(),n.Dyx(d.modes)}}function L(i,m){if(1&i){const d=n.RV6();n.j41(0,"button",7),n.bIt("click",function(){const t=n.eBV(d).$implicit,x=n.XpG(3);return n.Njj(x.dispatchAction(t))}),n.EFF(1),n.nI1(2,"enumToString"),n.nI1(3,"lowercase"),n.k0s()}if(2&i){const d=m.$implicit,T=n.XpG(3);n.R7$(),n.SpI(" ",n.bMT(3,4,n.i5U(2,1,d,T.TOOLBAR_ACTIONS))," ")}}function b(i,m){if(1&i&&(n.j41(0,"div",3),n.Z7z(1,L,4,6,"button",6,n.fX1),n.k0s()),2&i){const d=n.XpG(2);n.R7$(),n.Dyx(d.actions)}}function C(i,m){if(1&i){const d=n.RV6();n.j41(0,"div",0)(1,"button",1),n.bIt("click",function(){n.eBV(d);const t=n.XpG();return n.Njj(t.toggle())}),n.j41(2,"mcrai-icon"),n.EFF(3,"toggle_toolbar_y"),n.k0s()(),n.DNE(4,P,3,0,"div",2)(5,b,3,0,"div",3),n.k0s()}if(2&i){const d=n.XpG();n.R7$(4),n.vxM(4,d.showModes()?4:-1),n.R7$(),n.vxM(5,d.showActions()?5:-1)}}let M=(()=>{class i{get modes(){return this._activeModes}get actions(){return this._activeActions}get activeMode(){return this._activeMode}constructor(d,T){this._store=d,this.toolbarService=T,this._destroy=new c.B7,this.TOOLBAR_MODES=s.H,this.TOOLBAR_ACTIONS=f}ngOnInit(){this._store.pipe((0,e.Lt)(d=>d.aegisxToolbar.activeMode),(0,g.Q)(this._destroy)).subscribe(d=>this._activeMode=d),this._store.pipe((0,e.Lt)(d=>d.aegisxToolbar.modes),(0,g.Q)(this._destroy)).subscribe(d=>this._activeModes=d),this._store.pipe((0,e.Lt)(d=>d.aegisxToolbar.actions),(0,g.Q)(this._destroy)).subscribe(d=>this._activeActions=d)}ngOnDestroy(){this._destroy.next(),this._destroy.complete()}toggle(){this._toggle=!this._toggle}dispatchMode(d){this._store.dispatch(new l.wX({mode:d}))}dispatchAction(d){this._store.dispatch(new l.P7({action:d}))}showModes(){return this._activeModes.length>0}showActions(){return this._activeActions.length>0}showToolbar(){return this._toggle}static#t=this.\u0275fac=function(T){return new(T||i)(n.rXU(e.il),n.rXU(_.h))};static#e=this.\u0275cmp=n.VBU({type:i,selectors:[["aegisx-toolbar"]],decls:1,vars:1,consts:[[1,"toolbar"],["mcrai-button","",1,"toolbar__button","toolbar__button--toggle",3,"click"],[1,"toolbar__modes"],[1,"toolbar__actions"],["mcrai-button","",1,"toolbar__button","toolbar__button--mode",3,"toolbar__button--active"],["mcrai-button","",1,"toolbar__button","toolbar__button--mode",3,"click"],["mcrai-button","",1,"toolbar__button","toolbar__button--action"],["mcrai-button","",1,"toolbar__button","toolbar__button--action",3,"click"]],template:function(T,t){1&T&&n.DNE(0,C,6,2,"div",0),2&T&&n.vxM(0,t.showModes()||t.showActions()?0:-1)},dependencies:[D.Q,O.R,G.GH,F],styles:[".toolbar[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:0;display:flex;z-index:1001;background-color:#21344f!important;height:64px;overflow:hidden}.toolbar__button[_ngcontent-%COMP%]{width:64px;height:64px;margin:0;color:#fff!important}.toolbar__button[_ngcontent-%COMP%]:hover, .toolbar__button--toggle[_ngcontent-%COMP%], .toolbar__button--active[_ngcontent-%COMP%]{background-color:#001435!important}.toolbar__button--toggle[_ngcontent-%COMP%]{min-width:32px;width:32px}"]})}return i})()},36588:(R,h,o)=>{o.d(h,{r:()=>f});var e=o(60177),c=o(4280),g=o(634),s=o(54438);let f=(()=>{class l{static#t=this.\u0275fac=function(D){return new(D||l)};static#e=this.\u0275mod=s.$C({type:l});static#o=this.\u0275inj=s.G2t({providers:[c.u],imports:[e.MD,g.r]})}return l})()},41986:(R,h,o)=>{o.d(h,{T:()=>l});var e=o(54438),c=o(4280),g=o(41635),s=o(76965),f=o(29262);let l=(()=>{class n{constructor(D,O,G,F,v){this.dataService=D,this.actions=O,this.store=G,this.toastService=F,this.loaderService=v}static#t=this.\u0275fac=function(O){return new(O||n)(e.KVO(c.u),e.KVO(g.En),e.KVO(s.il),e.KVO(f.FS),e.KVO(f.wA))};static#e=this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac})}return n})()},4280:(R,h,o)=>{o.d(h,{u:()=>g});var e=o(12906),c=o(54438);let g=(()=>{class s extends e.d{constructor(){super(...arguments),this.CATEGORY_TREES_ROOT="category_trees"}getCategoryTrees(l,n){const _={page:l,...n},D=this.buildUrl(this.CATEGORY_TREES_ROOT,_);return this.get(D)}getCategoryTree(l){const n=this.buildUrl([this.CATEGORY_TREES_ROOT,l]);return this.get(n)}createCategoryTree(l,n,_){return this.post(this.buildUrl(this.CATEGORY_TREES_ROOT,{page:n,..._}),this.objProc.deleteEmptyKeys(l,{let_zero:!0,set_to_null:!0}))}patchCategoryTree(l,n){return this.patch(this.buildUrl([this.CATEGORY_TREES_ROOT,l]),this.objProc.deleteEmptyKeys(n,{let_zero:!0,set_to_null:!0}))}deleteCategoryTrees(l,n,_){const D={category_tree_ids:this.extractIds(l),page:n,..._},O=this.buildUrl(this.CATEGORY_TREES_ROOT,D);return this.del(O)}static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275prov=c.jDH({token:s,factory:s.\u0275fac})}return s})()},918:(R,h,o)=>{o.d(h,{A2:()=>s,HU:()=>g,LJ:()=>e,dG:()=>c});const e="[Category tree] GET category tree",c="[Category tree] GET category tree success";class g{constructor(l){this.payload=l,this.type=e}}class s{constructor(l){this.payload=l,this.type=c}}},96848:(R,h,o)=>{o.d(h,{N:()=>L});var e=o(60177),c=o(41635),g=o(76965),s=o(27974),f=o(36588),l=o(14421),n=o(15539),_=o(49090),D=o(95006),O=o(83921),G=o(918),F=o(41986),v=o(76613),E=o(54438);let P=(()=>{class b extends F.T{constructor(){super(...arguments),this.getCategoryTree=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.LJ),(0,n.M)(()=>this.loaderService.show()),(0,_.n)(M=>this.dataService.getCategoryTree(M.payload.id).pipe((0,D.T)(i=>new G.A2({item:i.item})),(0,O.W)(i=>(0,l.of)(new v.Rn(i))))))),this.getCategoryTreeSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.dG),(0,n.M)(()=>this.loaderService.hide())),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let M;return function(m){return(M||(M=E.xGo(b)))(m||b)}})();static#e=this.\u0275prov=E.jDH({token:b,factory:b.\u0275fac})}return b})(),L=(()=>{class b{static#t=this.\u0275fac=function(i){return new(i||b)};static#e=this.\u0275mod=E.$C({type:b});static#o=this.\u0275inj=E.G2t({imports:[e.MD,f.r,g.md.forFeature
1(s.qx,s.Ff),c.Vm.forFeature([P])]})}return b})()},27974:(R,h,o)=>{o.d(h,{Ff:()=>s,qx:()=>g,tG:()=>f});var e=o(918);const c={category_tree:null},g="categoryTree";function s(l=c,n){return n.type===e.dG?{...l,category_tree:n.payload.item}:l}const f=l=>l[g].category_tree},17903:(R,h,o)=>{o.d(h,{AQ:()=>c,I$:()=>g,Qx:()=>s,m7:()=>e,v4:()=>f});const e="[Category trees] GET category trees",c="[Category trees] GET category trees success",g="[Category trees] SET filter";class s{constructor(_){this.payload=_,this.type=e}}class f{constructor(_){this.payload=_,this.type=c}}},39996:(R,h,o)=>{o.d(h,{E:()=>b});var e=o(60177),c=o(41635),g=o(76965),s=o(46389),f=o(36588),l=o(14421),n=o(15539),_=o(57421),D=o(18456),O=o(95006),G=o(83921),F=o(17903),v=o(41986),E=o(76613),P=o(54438);let L=(()=>{class C extends v.T{constructor(){super(...arguments),this.getCategoryTrees=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(F.m7),(0,n.M)(()=>this.loaderService.show()),(0,_.E)(this.store.select(s.dx)),(0,D.ZZ)(([i,m])=>this.dataService.getCategoryTrees(i.payload.page,m.get(i.payload.id)).pipe((0,O.T)(d=>new F.v4({id:i.payload.id,items:d})),(0,G.W)(d=>(0,l.of)(new E.Rn(d))))))),this.getCategoryTreesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(F.AQ),(0,n.M)(()=>this.loaderService.hide())),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let i;return function(d){return(i||(i=P.xGo(C)))(d||C)}})();static#e=this.\u0275prov=P.jDH({token:C,factory:C.\u0275fac})}return C})(),b=(()=>{class C{static#t=this.\u0275fac=function(m){return new(m||C)};static#e=this.\u0275mod=P.$C({type:C});static#o=this.\u0275inj=P.G2t({imports:[e.MD,f.r,g.md.forFeature(s.qx,s.Ff),c.Vm.forFeature([L])]})}return C})()},46389:(R,h,o)=>{o.d(h,{Ff:()=>f,dx:()=>n,gk:()=>l,lU:()=>F,qx:()=>s});var e=o(20039),c=o(17903);const g={category_trees:(0,e.T5)(),filter:(0,e.T5)(),page:1,curr_id:""},s="categoryTrees";function f(v=g,E){switch(E.type){case c.m7:return{...v,page:E.payload.page};case c.AQ:return{...v,category_trees:v.category_trees.set(E.payload.id,E.payload.items),curr_id:E.payload.id};case c.I$:return{...v,filter:v.filter.set(E.payload.id,E.payload.filter),curr_id:E.payload.id};default:return v}}const l=v=>v[s].category_trees,n=v=>v[s].filter,F=v=>{const E=v[s];return{filter:E.filter.get(E.curr_id),page:E.page}}},86057:(R,h,o)=>{o.r(h),o.d(h,{CategoryTreesModule:()=>Ee});var e=o(60177),c=o(89417),g=o(76965);const s="[Category tree] TOGGLE category tree",f="[Category tree] UNSELECT all";class l{constructor(y){this.payload=y,this.type=s}}class n{constructor(){this.type=f}}var _=o(20832);const D={selectedCategoryTrees:[]},O="aegisxCategoryTrees";function G(r=D,y){switch(y.type){case s:return{...r,selectedCategoryTrees:(0,_.g)(r.selectedCategoryTrees,y.payload.item)};case f:return D;default:return r}}const F=r=>r[O].selectedCategoryTrees;var v=o(63040),E=o(45286),P=o(7605),L=o(95006),b=o(58728);const C="[Category tree] CREATE category tree",M="[Category tree] CREATE category tree success";class i{constructor(y){this.payload=y,this.type=C}}class m{constructor(y){this.payload=y,this.type=M}}var d=o(52693),T=o(52570),t=o(54438),x=o(29262),pt=o(31992),mt=o(46346),ht=o(94300),_t=o(54444),j=o(63649),Z=o(97519);let Ct=(()=>{class r{get controls(){return this.form.controls}constructor(a,u,p){this.builder=a,this.store=u,this.modalService=p,this.destroy=new E.B7,this.LET=T.s.LET,this.ERRORS={name:{required:"Strom kategori\xed mus\xed m\xedt n\xe1zev"},order:{pattern:"Po\u0159ad\xed mus\xed b\xfdt cel\xe9 \u010d\xedslo"}},this.buildForm()}ngOnInit(){}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}buildForm(){this.form=this.builder.group({name:[null,c.k0.required],order:[null,c.k0.pattern(d.Ie)]})}isAddButtonDisabled(){return this.form.invalid}add(){this.isAddButtonDisabled()||(this.store.dispatch(new i({id:"",body:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(u){return new(u||r)(t.rXU(c.ze),t.rXU(g.il),t.rXU(x.mO))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-add-category-tree-modal"]],decls:13,vars:6,consts:[[3,"formGroup"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","Po\u0159ad\xed",3,"control","errors"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(u,p){1&u&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xfd strom kategori\xed"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"mcrai-input",1)(7,"mcrai-input",2),t.k0s()(),t.j41(8,"mcrai-modal-actions")(9,"button",3),t.bIt("click",function(){return p.close()}),t.EFF(10,"Zav\u0159\xedt "),t.k0s(),t.j41(11,"button",4),t.bIt("click",function(){return p.add()}),t.EFF(12,"Vytvo\u0159it "),t.k0s()()()),2&u&&(t.R7$(5),t.Y8G("formGroup",p.form),t.R7$(),t.Y8G("control",p.controls.name)("errors",p.ERRORS.name),t.R7$(),t.Y8G("control",p.controls.order)("errors",p.ERRORS.order),t.R7$(4),t.Y8G("disabled",p.isAddButtonDisabled()))},dependencies:[c.qT,c.cb,c.j4,pt.h,mt.l,ht.J,_t.f,j.Q,Z.N]})}return r})();var A=o(1173),w=o(17903),X=o(46389);
1const J="[Category trees] DELETE category trees",q="[Category trees] DELETE category trees success";class yt{constructor(y){this.payload=y,this.type=J}}class Tt{constructor(y){this.payload=y,this.type=q}}var ft=o(71829),I=o(65382),tt=o(77617),et=o(70014),ot=o(52699),N=o(23509),k=o(90113),rt=o(92721),$=o(36001),vt=o(48390),Et=o(64204),Rt=o(95466),Dt=o(7306),bt=o(7622),xt=o(57382),Mt=o(65208),Ot=o(21336),Pt=o(30127),Ft=o(49451);const St=r=>["/aegisx/category-trees/",r];function Gt(r,y){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"N\xe1zev"),t.k0s())}function Lt(r,y){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const a=y.$implicit;t.R7$(),t.JRh(a.name)}}function Bt(r,y){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Po\u0159ad\xed"),t.k0s())}function At(r,y){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const a=y.$implicit;t.R7$(),t.JRh(a.order)}}function Ut(r,y){1&r&&t.nrm(0,"mcrai-th")}function jt(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){t.eBV(a);const p=t.XpG().$implicit,B=t.XpG(2);return t.Njj(B.toggleCategoryTree(p))}),t.EFF(1,"Vybrat "),t.k0s()}}function It(r,y){if(1&r&&(t.j41(0,"mcrai-td",9),t.DNE(1,jt,2,0,"button",10),t.j41(2,"a",11),t.EFF(3,"Detail "),t.k0s()()),2&r){const a=y.$implicit,u=t.XpG(2);t.R7$(),t.vxM(1,u.toolbarService.isDeleteMode()?1:-1),t.R7$(),t.Y8G("routerLink",t.eq3(2,St,a.id))}}function Vt(r,y){1&r&&t.nrm(0,"mcrai-tr")}function wt(r,y){if(1&r&&t.nrm(0,"mcrai-tr"),2&r){const a=y.$implicit,u=t.XpG(2);t.AVh("mcrai-tr--highlight",u.isSelected(a))}}function Xt(r,y){if(1&r&&(t.j41(0,"mcrai-table",0),t.qex(1,1),t.DNE(2,Gt,2,0,"mcrai-th",2)(3,Lt,2,1,"mcrai-td",3),t.bVm(),t.qex(4,4),t.DNE(5,Bt,2,0,"mcrai-th",2)(6,At,2,1,"mcrai-td",3),t.bVm(),t.qex(7,5),t.DNE(8,Ut,1,0,"mcrai-th",2)(9,It,4,4,"mcrai-td",6),t.bVm(),t.DNE(10,Vt,1,0,"mcrai-tr",7)(11,wt,1,2,"mcrai-tr",8),t.k0s()),2&r){const a=t.XpG();t.Y8G("container",a.categoryTrees),t.R7$(10),t.Y8G("mcraiHeaderRowDef",a.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",a.columns)}}let Nt=(()=>{class r{get columns(){return["name","order","actions"]}constructor(a){this.toolbarService=a,this.categoryTreeToggle=new t.bkB}ngOnInit(){}toggleCategoryTree(a){this.categoryTreeToggle.emit(a)}isSelected(a){return!!this.selectedCategoryTrees.find(u=>u.id===a.id)}static#t=this.\u0275fac=function(u){return new(u||r)(t.rXU(I.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-category-tree-list"]],inputs:{categoryTrees:"categoryTrees",selectedCategoryTrees:"selectedCategoryTrees"},outputs:{categoryTreeToggle:"categoryTreeToggle"},decls:1,vars:1,consts:[[3,"container"],["mcraiColumnDef","name"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","order"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"routerLink"],["mcrai-button","neutral",3,"click"]],template:function(u,p){1&u&&t.DNE(0,Xt,12,3,"mcrai-table",0),2&u&&t.vxM(0,p.categoryTrees?0:-1)},dependencies:[v.Wk,j.Q,Et.n,Rt.q,Dt.B,bt.K,xt.D,Mt.Q,Ot.V,Pt.e,Ft.O]})}return r})();function kt(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(a);const p=t.XpG();return t.Njj(p.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s()}if(2&r){const a=t.XpG();t.Y8G("disabled",a.isDeleteButtonDisabled())}}function $t(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(a);const p=t.XpG();return t.Njj(p.deleteCategoryTrees())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const a=t.XpG();t.Y8G("disabled",a.isDeleteButtonDisabled())}}function Wt(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(a);const p=t.XpG();return t.Njj(p.showAddCategoryTreeModal())}),t.EFF(1,"P\u0159idat strom "),t.k0s()}}function Kt(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(a);const p=t.XpG();return t.Njj(p.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s()}if(2&r){const a=t.XpG();t.Y8G("disabled",a.isDeleteButtonDisabled())}}function Ht(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(a);const p=t.XpG();
1return t.Njj(p.deleteCategoryTrees())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const a=t.XpG();t.Y8G("disabled",a.isDeleteButtonDisabled())}}function Yt(r,y){if(1&r){const a=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(a);const p=t.XpG();return t.Njj(p.showAddCategoryTreeModal())}),t.EFF(1,"P\u0159idat strom "),t.k0s()}}let Qt=(()=>{class r{constructor(a,u,p,B){this.store=a,this.modalService=u,this.permissionService=p,this.toolbarService=B,this.destroy=new E.B7}ngOnInit(){this.setToolbarModes(),this.getCategoryTrees(),this.selectCategoryTrees(),this.selectSelectedCategoryTrees()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([A.H.View,A.H.Edit,A.H.Delete])}getCategoryTrees(a=1){this.store.dispatch(new w.Qx({id:"",page:a}))}selectCategoryTrees(){this.store.pipe((0,g.Lt)(X.gk),(0,P.Q)(this.destroy),(0,L.T)(a=>a.get("")),(0,b.p)(a=>!!a)).subscribe(a=>this.categoryTrees=a)}selectSelectedCategoryTrees(){this.store.pipe((0,g.Lt)(F),(0,P.Q)(this.destroy)).subscribe(a=>this.selectedCategoryTrees=a)}onPageChange(a){this.getCategoryTrees(a)}showAddCategoryTreeModal(){const a=new x.m_("800px","600px");this.modalService.open(Ct,a)}isDeleteButtonDisabled(){return!this.selectedCategoryTrees||!this.selectedCategoryTrees.length}deleteCategoryTrees(){this.isDeleteButtonDisabled()||this.store.dispatch(new yt({id:"",items:this.selectedCategoryTrees}))}toggleCategoryTree(a){this.store.dispatch(new l({item:a}))}unselectAll(){this.store.dispatch(new n)}static#t=this.\u0275fac=function(u){return new(u||r)(t.rXU(g.il),t.rXU(x.mO),t.rXU(ft.n),t.rXU(I.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-category-tree-overview"]],decls:18,vars:9,consts:[[3,"categoryTreeToggle","categoryTrees","selectedCategoryTrees"],["top",""],["mcrai-button","neutral",3,"disabled"],["mcrai-button","negative",3,"disabled"],["mcrai-button","positive"],[1,"pull-left",3,"page","paginator"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"],["mcrai-button","positive",3,"click"]],template:function(u,p){1&u&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h1"),t.EFF(5,"Stromy kategori\xed"),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"aegisx-category-tree-list",0),t.bIt("categoryTreeToggle",function(z){return p.toggleCategoryTree(z)}),t.k0s()(),t.j41(8,"mcrai-panel-actions",1),t.DNE(9,kt,2,1,"button",2)(10,$t,2,1,"button",3)(11,Wt,2,0,"button",4),t.k0s(),t.j41(12,"mcrai-panel-actions")(13,"mcrai-paginator",5),t.bIt("page",function(z){return p.onPageChange(z)}),t.k0s(),t.DNE(14,Kt,2,1,"button",2)(15,Ht,2,1,"button",3)(16,Yt,2,0,"button",4),t.k0s()()(),t.nrm(17,"aegisx-toolbar")),2&u&&(t.R7$(7),t.Y8G("categoryTrees",p.categoryTrees)("selectedCategoryTrees",p.selectedCategoryTrees),t.R7$(2),t.vxM(9,p.toolbarService.isDeleteMode()?9:-1),t.R7$(),t.vxM(10,p.toolbarService.isDeleteMode()?10:-1),t.R7$(),t.vxM(11,p.toolbarService.isDeleteMode()?-1:11),t.R7$(2),t.Y8G("paginator",null==p.categoryTrees?null:p.categoryTrees.paginator),t.R7$(),t.vxM(14,p.toolbarService.isDeleteMode()?14:-1),t.R7$(),t.vxM(15,p.toolbarService.isDeleteMode()?15:-1),t.R7$(),t.vxM(16,p.toolbarService.isDeleteMode()?-1:16))},dependencies:[tt.I,et.I,ot.H,j.Q,N.g,k.l,rt.h,$.B,vt.h,Nt]})}return r})();var nt=o(97309),at=o(918),zt=o(27974),it=o(33579),st=o(33555);const ct="[Category tree] PATCH category tree",lt="[Category tree] PATCH category tree success";class Zt{constructor(y){this.payload=y,this.type=ct}}class Jt{constructor(y){this.payload=y,this.type=lt}}var qt=o(41819),te=o(62523),ee=o(39103);function oe(r,y){if(1&r&&(t.j41(0,"mcrai-dl")(1,"mcrai-dt"),t.EFF(2,"N\xe1zev *"),t.k0s(),t.j41(3,"mcrai-dd"),t.EFF(4),t.k0s(),t.j41(5,"mcrai-dt"),t.EFF(6,"Po\u0159ad\xed"),t.k0s(),t.j41(7,"mcrai-dd"),t.EFF(8),t.nI1(9,"notSet"),t.k0s()()),2&r){const a=t.XpG(2);t.R7$(4),t.JRh(a.categoryTree.name),t.R7$(4),t.JRh(t.i5U(9,2,a.categoryTree.order,a.LET.ZERO))}}function re(r,y){if(1&r&&(t.j41(0,"form",1),t.nrm(1,"mcrai-input",2)(2,"mcrai-input",3),t.k0s()),2&r){const a=t.XpG(2);t.Y8G("formGroup",a.form),t.R7$(),t.Y8G("control",a.controls.name)("errors",a.ERRORS.name),t.R7$(),t.Y8G("control",a.controls.order)("errors",a.ERRORS.order)}}function ne(r,y){if(1&r){const a=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",4),t.bIt("click",function(){t.eBV(a);const p=t.XpG(2);return t.Njj(p.patch())}
1),t.EFF(2," Ulo\u017eit zm\u011bny "),t.k0s()()}if(2&r){const a=t.XpG(2);t.R7$(),t.Y8G("disabled",a.isPatchButtonDisabled())}}function ae(r,y){if(1&r&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel",0)(3,"mcrai-panel-header")(4,"h2"),t.EFF(5,"Z\xe1kladn\xed informace"),t.k0s()(),t.j41(6,"mcrai-panel-content"),t.DNE(7,oe,10,5,"mcrai-dl")(8,re,3,5,"form",1),t.k0s(),t.DNE(9,ne,3,1,"mcrai-panel-actions"),t.k0s()()()),2&r){const a=t.XpG();t.R7$(7),t.vxM(7,a.toolbarService.isEditMode()?-1:7),t.R7$(),t.vxM(8,a.toolbarService.isEditMode()?8:-1),t.R7$(),t.vxM(9,a.toolbarService.isEditMode()?9:-1)}}let ie=(()=>{class r{set categoryTree(a){this._categoryTree=a,this.form.patchValue({name:a.name,order:a.order})}get categoryTree(){return this._categoryTree}get controls(){return this.form.controls}constructor(a,u,p){this.builder=a,this.store=u,this.toolbarService=p,this.destroy=new E.B7,this.LET=T.s.LET,this.ERRORS={name:{required:"Strom kategori\xed mus\xed m\xedt n\xe1zev"},order:{pattern:"Po\u0159ad\xed mus\xed b\xfdt cel\xe9 \u010d\xedslo"}},this.buildForm()}ngOnInit(){}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}buildForm(){this.form=this.builder.group({name:[null,c.k0.required],order:[null,c.k0.pattern(d.Ie)]})}isPatchButtonDisabled(){return this.form.invalid}patch(){this.isPatchButtonDisabled()||this.store.dispatch(new Zt({category_tree_id:this._categoryTree.id,body:this.form.value}))}static#t=this.\u0275fac=function(u){return new(u||r)(t.rXU(c.ze),t.rXU(g.il),t.rXU(I.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-category-tree-detail"]],inputs:{categoryTree:"categoryTree"},decls:1,vars:1,consts:[["color","secondary"],[3,"formGroup"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","Po\u0159ad\xed",3,"control","errors"],["mcrai-button","positive",3,"click","disabled"]],template:function(u,p){1&u&&t.DNE(0,ae,10,3,"mcrai-row"),2&u&&t.vxM(0,p.categoryTree?0:-1)},dependencies:[c.qT,c.cb,c.j4,it.o,st.g,j.Q,N.g,k.l,rt.h,$.B,Z.N,qt.p,te.L,ee.Z,T.s]})}return r})();const se=()=>["/aegisx/category-trees"];function ce(r,y){if(1&r&&(t.j41(0,"mcrai-panel")(1,"mcrai-panel-header")(2,"h1"),t.EFF(3),t.k0s()(),t.j41(4,"mcrai-panel-content"),t.nrm(5,"aegisx-category-tree-detail",1),t.k0s()()),2&r){const a=t.XpG();t.R7$(3),t.JRh(a.categoryTree.name),t.R7$(2),t.Y8G("categoryTree",a.categoryTree)}}const de=[{path:"",component:Qt,canActivate:[nt.J]},{path:":category_tree_id",component:(()=>{class r{constructor(a,u,p){this.store=a,this.activatedRoute=u,this.toolbarService=p,this.destroy=new E.B7,u.params.subscribe(B=>{this.id=B.category_tree_id,this.getCategoryTree(this.id)})}ngOnInit(){this.setToolbarModes(),this.selectCategoryTree()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([A.H.View,A.H.Edit,A.H.Delete])}getCategoryTree(a){this.store.dispatch(new at.HU({id:a}))}selectCategoryTree(){this.store.pipe((0,g.Lt)(zt.tG),(0,P.Q)(this.destroy),(0,b.p)(a=>!!a)).subscribe(a=>this.categoryTree=a)}static#t=this.\u0275fac=function(u){return new(u||r)(t.rXU(g.il),t.rXU(v.nX),t.rXU(I.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["app-detail"]],decls:10,vars:3,consts:[["mcrai-button","neutral",3,"routerLink"],[3,"categoryTree"]],template:function(u,p){1&u&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-row")(3,"mcrai-col")(4,"a",0),t.EFF(5,"Zp\xe1tky na p\u0159ehled"),t.k0s()()(),t.j41(6,"mcrai-row")(7,"mcrai-col"),t.DNE(8,ce,6,2,"mcrai-panel"),t.k0s()()(),t.nrm(9,"aegisx-toolbar")),2&u&&(t.R7$(4),t.Y8G("routerLink",t.lJ4(2,se)),t.R7$(4),t.vxM(8,p.categoryTree?8:-1))},dependencies:[v.Wk,tt.I,et.I,it.o,st.g,ot.H,j.Q,N.g,k.l,$.B,ie],styles:[".header--image[_ngcontent-%COMP%]{margin-right:1rem}"]})}return r})(),canActivate:[nt.J]}];let ue=(()=>{class r{static#t=this.\u0275fac=function(u){return new(u||r)};static#e=this.\u0275mod=t.$C({type:r});static#o=this.\u0275inj=t.G2t({imports:[v.iI.forChild(de),v.iI]})}return r})();var W=o(39996),dt=o(96848),S=o(41635),K=o(14421),U=o(15539),ut=o(57421),gt=o(18456),H=o(83921),V=o(49090),Y=o(41986),Q=o(76613);let ge=(()=>{class r extends Y.T{constructor(){super(...arguments),this.createCategoryTree=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(C),(0,U.M)(()=>this.loaderService.show()),(0,ut.E)(this.store.select(X.lU)),(0,gt.ZZ)(([a,u])=>this.dataService.createCategoryTree(a.payload.body,u.page,u.filter).pipe((0,L.T)(p=>new m({id:a.payload.id,items:p})),(0,H.W)(p=>(0,K.of)(new Q.Rn(p))))))),this.createCategoryTreeSuccess=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(M),(0,U.M)(a=>{this.toastService.makeToast(a.payload.items.message,x.Ck.Success),this.loaderService.hide()}),(0,V.n)(a=>[new w.v4({id:a.payload.id,items:a.payload.items})])))}static#t=this.\u0275fac=(()=>{let a;return function(p){return(a||(a=t.xGo(r)))(p||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),pe=(()=>{class r{static#t=this.\u0275fac=function(u){return new(u||r)};static#e=this.\u0275mod=t.$C({type:r});static#o=this.\u0275inj=t.G2t({imports:[e.MD,W.E,S.Vm.forFeature
1([ge])]})}return r})(),me=(()=>{class r extends Y.T{constructor(){super(...arguments),this.patchCategoryTree=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(ct),(0,U.M)(()=>this.loaderService.show()),(0,V.n)(a=>this.dataService.patchCategoryTree(a.payload.category_tree_id,a.payload.body).pipe((0,L.T)(u=>new Jt(u)),(0,H.W)(u=>(0,K.of)(new Q.Rn(u))))))),this.patchCategoryTreeSuccess=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(lt),(0,U.M)(a=>this.toastService.makeToast(a.payload.message,x.Ck.Success)),(0,V.n)(a=>[new at.A2({item:a.payload.item})])))}static#t=this.\u0275fac=(()=>{let a;return function(p){return(a||(a=t.xGo(r)))(p||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),he=(()=>{class r{static#t=this.\u0275fac=function(u){return new(u||r)};static#e=this.\u0275mod=t.$C({type:r});static#o=this.\u0275inj=t.G2t({imports:[e.MD,dt.N,S.Vm.forFeature([me])]})}return r})(),_e=(()=>{class r extends Y.T{constructor(){super(...arguments),this.deleteCategoryTrees=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(J),(0,U.M)(()=>this.loaderService.show()),(0,ut.E)(this.store.select(X.lU)),(0,gt.ZZ)(([a,u])=>this.dataService.deleteCategoryTrees(a.payload.items,u.page,u.filter).pipe((0,L.T)(p=>new Tt({id:a.payload.id,items:p})),(0,H.W)(p=>(0,K.of)(new Q.Rn(p))))))),this.deleteCategoryTreesSuccess=(0,S.EH)(()=>this.actions.pipe((0,S.gp)(q),(0,U.M)(a=>this.toastService.makeToast(a.payload.items.message,x.Ck.Success)),(0,V.n)(a=>[new w.v4({id:a.payload.id,items:a.payload.items})])))}static#t=this.\u0275fac=(()=>{let a;return function(p){return(a||(a=t.xGo(r)))(p||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Ce=(()=>{class r{static#t=this.\u0275fac=function(u){return new(u||r)};static#e=this.\u0275mod=t.$C({type:r});static#o=this.\u0275inj=t.G2t({imports:[e.MD,W.E,S.Vm.forFeature([_e])]})}return r})();var ye=o(93578),Te=o(91316),fe=o(291),ve=o(50289);let Ee=(()=>{class r{static#t=this.\u0275fac=function(u){return new(u||r)};static#e=this.\u0275mod=t.$C({type:r});static#o=this.\u0275inj=t.G2t({imports:[e.MD,ue,g.md.forFeature(O,G),ye.m,fe.G,Te.U,c.X1,W.E,dt.N,pe,he,Ce,x.LU,x.oP,x.xT,x.Zg,x.pj,x.B4,x.SD,x.F8,x.Tm,ve.G]})}return r})()},20832:(R,h,o)=>{function e(c,g){const s=c.filter(f=>f.id!==g.id);return s.length<c.length?s:c.concat(g)}o.d(h,{g:()=>e})},52570:(R,h,o)=>{o.d(h,{s:()=>c});var e=o(54438);let c=(()=>{class g{static#t=this.LET={ZERO:1,EMPTY_STR:2,FALSE:4,NAN:8};transform(f,l=0){return l&g.LET.ZERO&&0===f||l&g.LET.EMPTY_STR&&""===f||l&g.LET.FALSE&&!1===f||l&g.LET.NAN&&isNaN(f)?f:f||"-"}static#e=this.\u0275fac=function(l){return new(l||g)};static#o=this.\u0275pipe=e.EJ8({name:"notSet",type:g,pure:!0})}return g})()},39103:(R,h,o)=>{o.d(h,{Z:()=>g});var e=o(54438);const c=["*"];let g=(()=>{class s{constructor(l,n){this._renderer=l,this._elRef=n,this.DESC_LIST_DATA_CLASS="mcrai-dd"}ngOnInit(){this._renderer.addClass(this._elRef.nativeElement,this.DESC_LIST_DATA_CLASS)}static#t=this.\u0275fac=function(n){return new(n||s)(e.rXU(e.sFG),e.rXU(e.aKT))};static#e=this.\u0275cmp=e.VBU({type:s,selectors:[["mcrai-dd"]],ngContentSelectors:c,decls:1,vars:0,template:function(n,_){1&n&&(e.NAR(),e.SdG(0))},styles:[".mcrai-dd{display:block;line-height:17px;font-weight:400;font-size:14px}\n"],encapsulation:2,changeDetection:0})}return s})()},62523:(R,h,o)=>{o.d(h,{L:()=>g});var e=o(54438);const c=["*"];let g=(()=>{class s{constructor(l,n){this._renderer=l,this._elRef=n,this.DESC_LIST_TERM_CLASS="mcrai-dt"}ngOnInit(){this._renderer.addClass(this._elRef.nativeElement,this.DESC_LIST_TERM_CLASS)}static#t=this.\u0275fac=function(n){return new(n||s)(e.rXU(e.sFG),e.rXU(e.aKT))};static#e=this.\u0275cmp=e.VBU({type:s,selectors:[["mcrai-dt"]],ngContentSelectors:c,decls:1,vars:0,template:function(n,_){1&n&&(e.NAR(),e.SdG(0))},styles:[".mcrai-dt{display:block;font-weight:400;font-size:13px;color:#8792a1}\n"],encapsulation:2,changeDetection:0})}return s})()},41819:(R,h,o)=>{o.d(h,{p:()=>g});var e=o(54438);const c=["*"];let g=(()=>{class s{constructor(l,n){this._renderer=l,this._elRef=n,this.DESC_LIST_CLASS="mcrai-dl"}ngOnInit(){this._renderer.addClass(this._elRef.nativeElement,this.DESC_LIST_CLASS)}static#t=this.\u0275fac=function(n){return new(n||s)(e.rXU(e.sFG),e.rXU(e.aKT))};static#e=this.\u0275cmp=e.VBU({type:s,selectors:[["mcrai-dl"]],ngContentSelectors:c,decls:1,vars:0,template:function(n,_){1&n&&(e.NAR(),e.SdG(0))},encapsulation:2,changeDetection:0})}return s})()},48390:(R,h,o)=>{o.d(h,{h:()=>b});var e=o(54438),c=o(7605),g=o(45286),s=o(63040),f=o(63649),l=o(4379),n=o(26588),_=o(32350);const D=["showMoreBtnWrapper"];function O(C,M){if(1&C){const i=e.RV6();e.j41(0,"button",11),e.bIt("click",function(){e.eBV(i);const d=e.XpG(2);return e.Njj(d.appendPage())}),e.EFF(1,"Na\u010d\xedst dal\u0161\xed "),e.k0s()}if(2&C){const i=e.XpG(2);e.Y8G("disabled",i.isLastPage())}}function G(C,M){1&C&&e.nrm(0,"mcrai-loader",4)}function F(C,M){if(1&C){const i=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){e.eBV(i);const d=e.XpG(2);return e.Njj(d.goToPage(1))}),e.j41(1,"mcrai-icon",8),e.EFF(2,"double_arrow_left"),e.k0s()()}if(2&C){const i=e.XpG(2);e.Y8G("disabled",i.isFirstPage())}}function v(C,M){if(1&C){const i=e.RV6();e.j41(0,"button",13),e.bIt("click",function(){const d=e.eBV(i).$implicit,T=e.XpG(2);return e.Njj(T.goToPage(d))}),e.EFF(1),e.k0s()}if(2&C){const i=M.$implicit,m=e.XpG(2);e.AVh("mcrai-paginator__button--active",m.isActualPage(i)),e.R7$(),e.SpI(" ",i," ")}}function E(C,M){if(1&C){const i=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){e.eBV(i);const d=e.XpG(2);return e.Njj(d.goToPage(d.lastPage))}),e.j41(1,"mcrai-icon",8),e.EFF(2,"double_arrow_right"),e.k0s()()}if(2&C){const i=e.XpG(2);e.Y8G("disabled",i.isLastPage())}}function P(C,M){if(1&C){const i=e.RV6();e.j41(0,"div",1),e.EFF(1),e.k0s(),e.j41(2,"div",2,0),e.DNE(4,O,2,1,"button",3)(5,G,1,0,"mcrai-loader",4),e.k0s(),e.j41(6,"div",5),e.DNE(7,F,3,1,"button",6),e.j41(8,"button",7),e.bIt("click",function(){e.eBV(i);const d=e.XpG();return e.Njj(d.prevPage())}),e.j41(9,"mcrai-icon",8),e.EFF(10,"arrow_left"),e.k0s()(),e.Z7z(11,v,2,3,"button",9,e.fX1),e.j41(13,"button",10),e.bIt("click",function(){e.eBV(i);const d=e.XpG();return e.Njj(d.nextPage())}),e.j41(14,"mcrai-icon",8),e.EFF(15,"arrow_right"),e.k0s()(),e.DNE(16,E,3,1,"button",6),e.k0s()}if(2&C){const i=e.XpG();e.R7$(),e.E5c(" ",i.getRange()," ",i.getPreposition()," ",i.getCount()," "),e.R7$(3),e.vxM(4,!i.showMoreBtn||i.loading||i.isLastPage()?-1:4),e.R7$(),e.vxM(5,i.loading?5:-1),e.R7$(2),e.vxM(7,i.doubleArrow?7:-1),e.R7$(),e.Y8G("disabled",i.isFirstPage()),e.R7$(3),e.Dyx(i.arrayOfPageLinks),e.R7$(2),e.Y8G("disabled",i.isLastPage()),e.R7$(3),e.vxM(16,i.doubleArrow?16:-1)}}function L(C,M){if(1&C&&(e.j41(0,"div",1),e.EFF(1),e.k0s()),2&C){const i=e.XpG();e.R7$(),e.SpI(" ",i.getCount()," ")}}let b=(()=>{class C{constructor(i,m,d,T){this.activatedRoute=i,this.router=m,this.renderer=d,this.elRef=T,this.destroy=new g.B7,this.PAGINATOR_CLASS="mcrai-paginator",this.skipNextUrlLoad=!1,this.appendInitPage=0,this.showCount=!1,this.pageLinksCount=0,this.doubleArrow=!1,this.showMoreBtn=!1,this.readUrl=!1,this.writeUrl=!1,this.scrollUp=!0,this.loading=!1,this.prev=new e.bkB,this.next=new e.bkB,this.append=new e.bkB,this.page=new e.bkB,this.get
1ScreenWidth()}ngOnInit(){this.renderer.addClass(this.elRef.nativeElement,this.PAGINATOR_CLASS),this.lastUrl=this.getCurrentUrl(),this.readUrl&&this.activatedRoute.queryParams.pipe((0,c.Q)(this.destroy)).subscribe(i=>{if(this.skipNextUrlLoad)this.skipNextUrlLoad=!1;else{const m=i.page?+i.page:1;m>0&&m<=this.paginator.page_count&&m!==this.paginator.page&&this.getCurrentUrl()===this.lastUrl&&this.goToPage(m)}}),this.createObserver()}ngOnDestroy(){this.destroy.next(),this.destroy.complete(),this.unobserveTarget()}ngOnChanges(i){if(i.hasOwnProperty("paginator")){if(!i.paginator.firstChange){const m=this.getCurrentUrl();m!==this.lastUrl&&(this.lastUrl=m)}this.showPaginator()&&this.showMoreBtn&&!this.isLastPage()?setTimeout(()=>this.observeTarget(),0):this.unobserveTarget()}}getScreenWidth(){this.screenWidth=window.innerWidth}getCurrentUrl(){return this.router.url.split("?")[0]}showPaginator(){return this.paginator&&this.paginator.page_count>1}showCountOnPage(){return this.showCount&&this.paginator&&1===this.paginator.page_count&&this.paginator.count>0}getRange(){const i=this.paginator.count>0?1:0,m=this.paginator.ipp*(this.getPage()-1)+i;let d=this.paginator.ipp*this.paginator.page;return d>this.paginator.count&&(d=this.paginator.count),m+" - "+d}appendPage(){this.appendInitPage=this.getPage();const i=this.paginator.page+1;this.skipNextUrlLoad=!0,this.append.emit(i),this.upsertQueryParams(i)}nextPage(){const i=this.paginator.page+1;this.scrollUp&&window.scrollTo(0,0),this.skipNextUrlLoad=!0,this.appendInitPage=0,this.next.emit(i),this.page.emit(i),this.upsertQueryParams(i)}prevPage(){const i=this.paginator.page-1;this.scrollUp&&window.scrollTo(0,0),this.skipNextUrlLoad=!0,this.appendInitPage=0,this.prev.emit(i),this.page.emit(i),this.upsertQueryParams(i)}goToPage(i){this.scrollUp&&window.scrollTo(0,0),this.skipNextUrlLoad=!0,this.appendInitPage=0,this.page.emit(i),this.upsertQueryParams(i)}upsertQueryParams(i){if(this.writeUrl){const m=Object.assign({},this.activatedRoute.snapshot.queryParams);i>1?m.page=i:delete m.page,this.router.navigate([],{queryParams:m,relativeTo:this.activatedRoute})}}isFirstPage(){return 1===this.paginator.page}isLastPage(){return this.paginator.page===this.paginator.page_count}isActualPage(i){return this.paginator.page===i}getCount(){return this.paginator.count.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")}get lastPage(){return this.paginator.page_count}get pageLinksCountRecalc(){let i;return i=this.screenWidth<768&&this.pageLinksCount>5?5:this.pageLinksCount,i>this.paginator.page_count?this.paginator.page_count:i}get arrayOfPageLinks(){const i=this.paginator.page,m=Math.round(this.pageLinksCountRecalc/2);switch(!0){case i>m&&i<=this.paginator.page_count-m:return this.makeArrayOfPageLinks(i-m);case i>this.paginator.page_count-m:return this.makeArrayOfPageLinks(this.paginator.page_count-this.pageLinksCountRecalc);default:return this.makeArrayOfPageLinks()}}makeArrayOfPageLinks(i=0){return Array.from(Array(this.pageLinksCountRecalc).keys()).map(m=>m+i+1)}getPreposition(){return[2,3,4,17].indexOf(this.paginator.count)>=0||"7"===this.getCount()[0]?"ze":"z"}getPage(){return 0===this.appendInitPage?this.paginator.page:this.appendInitPage}createObserver(){this.showMoreBtnObserver||(this.showMoreBtnObserver=new IntersectionObserver(i=>{i[0].isIntersecting&&!this.loading&&!this.isLastPage()&&this.appendPage()}))}observeTarget(){this.showMoreBtnWrapper&&this.showMoreBtnObserver&&this.showMoreBtnObserver.observe(this.showMoreBtnWrapper.nativeElement)}unobserveTarget(){this.showMoreBtnWrapper&&this.showMoreBtnObserver&&this.showMoreBtnObserver.unobserve(this.showMoreBtnWrapper.nativeElement)}static#t=this.\u0275fac=function(m){return new(m||C)(e.rXU(s.nX),e.rXU(s.Ix),e.rXU(e.sFG),e.rXU(e.aKT))};static#e=this.\u0275cmp=e.VBU({type:C,selectors:[["mcrai-paginator"]],viewQuery:function(m,d){if(1&m&&e.GBs(D,5,e.aKT),2&m){let T;e.mGM(T=e.lsd())&&(d.showMoreBtnWrapper=T.first)}},hostBindings:function(m,d){1&m&&e.bIt("resize",function(){return d.getScreenWidth()},!1,e.tSv)},inputs:{paginator:"paginator",showCount:"showCount",pageLinksCount:"pageLinksCount",doubleArrow:"doubleArrow",showMoreBtn:"showMoreBtn",readUrl:"readUrl",writeUrl:"writeUrl",scrollUp:"scrollUp",loading:"loading"},outputs:{prev:"prev",next:"next",append:"append",page:"page"},features:[e.OA$],decls:2,vars:2,consts:[["showMoreBtnWrapper",""],[1,"mcrai-paginator__range"],[1,"mcrai-paginator__show-more"],["mcrai-button","positive",1,"mcrai-paginator__button","mcrai-paginator__append-button",3,"disabled"],[1,"mcrai-paginator__loader"],[1,"mcrai-paginator__buttons"],["mcrai-icon-button","transparent",1,"mcrai-paginator__button","mcrai-paginator__button--double-arrow",3,"disabled"],["mcrai-icon-button","transparent",1,"mcrai-paginator__button","mcrai-paginator__button--arrow",3,"click","disabled"],["color","secondary"],["color","transparent","mcrai-button","transparent",1,"mcrai-paginator__button","mcrai-paginator__button--number",3,"mcrai-paginator__button--active"],["mcrai-icon-button","transparent",1,"mcrai-paginator__button",3,"click","disabled"],["mcrai-button","positive",1,"mcrai-paginator__button","mcrai-paginator__append-button",3,"click","disabled"],["mcrai-icon-button","transparent",1,"mcrai-paginator__button","mcrai-paginator__button--double-arrow",3,"click","disabled"],["color","transparent","mcrai-button","transparent",1,"mcrai-paginator__button","mcrai-paginator__button--number",3,"click"]],template:function(m,d){1&m&&e.DNE(0,P,17,9)(1,L,2,1,"div",1),2&m&&(e.vxM(0,d.showPaginator()?0:-1),e.R7$(),e.vxM(1,d.showCountOnPage()?1:-1))},dependencies:[f.Q,l.x,n.R,_.V],styles:[".mcrai-paginator{display:flex;align-items:center;margin:8px 0}.mcrai-paginator__range{display:flex;justify-content:flex-end;align-items:center;white-space:nowrap;font-size:14px}.mcrai-paginator__show-more{margin-left:auto}.mcrai-paginator__buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:stretch;margin-left:auto}.mcrai-paginator__loader{min-width:70px}.mcrai-paginator__button--active{background-color:#0000001a!important}.admin .mcrai-paginator__button{padding:0 10px}:host .mcrai-paginator__button{min-width:0}:host .mcrai-icon-button--disabled{display:none}\n"],encapsulation:2,changeDetection:0})}return C})()},30127:(R,h,o)=>{o.d(h,{e:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.hc{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275cmp=c.VBU({type:s,selectors:[["mcrai-tr"],["a",8,"mcrai-tr"]],hostVars:2,hostBindings:function(n,_){2&n&&c.AVh("mcrai-tr",!0)},features:[c.Vt3],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,_){1&n&&c.eu8(0,0)},dependencies:[e.I8],styles:[".mcrai-tr{display:flex;align-items:stretch;text-decoration:none;color:inherit}\n"],encapsulation:2,changeDetection:0})}return s})()},7306:(R,h,o)=>{o.d(h,{B:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.cO{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["","mcraiCellDef",""]],features:[c.Jv_([{provide:e.cO,useExisting:s}]),c.Vt3]})}return s})()},65208:(R,h,o)=>{o.d(h,{Q:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.VP{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["mcrai-td"]],hostVars:2,hostBindings:function(n,_){2&n&&c.AVh("mcrai-td",!0)},features:[c.Vt3]})}return s})()},95466:(R,h,o)=>{o.d(h,{q:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.n5{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["","mcraiHeaderCellDef",""]],features:[c.Jv_([{provide:e.n5,useExisting:s}]),c.Vt3]})}return s})()},21336:(R,h,o)=>{o.d(h,{V:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.sY{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["mcrai-th"]],hostVars:2,hostBindings:function(n,_){2&n&&c.AVh("mcrai-th",!0)},features:[c.Vt3]})}return s})()},7622:(R,h,o)=>{o.d(h,{K:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.hi{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["","mcraiHeaderRowDef",""]],inputs:{columns:[c.Mj6.None,"mcraiHeaderRowDef","columns"]},features:[c.Jv_([{provide:e.hi,useExisting:s}]),c.Vt3]})}return s})()},57382:(R,h,o)=>{o.d(h,{D:()=>g});var e=o(45887),c=o(54438);let g=(()=>{class s extends e.oh{static#t=this.\u0275fac=(()=>{let l;return function(_){return(l||(l=c.xGo(s)))(_||s)}})();static#e=this.\u0275dir=c.FsC({type:s,selectors:[["","mcraiRowDef",""]],inputs:{columns:[c.Mj6.None,"mcraiRowDefColumns","columns"],when:[c.Mj6.None,"mcraiRowDefWhen","when"]},features:[c.Jv_([{provide:e.oh,useExisting:s}]),c.Vt3]})}return s})()}}]);
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.