PageSourceSearch

https://www.energytcm.cz/6915.01a7f654322407bf.js

js energytcm.cz collected 2026-10-07 20:06:55 UTC 80,124 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkenergy_tcm=self.webpackChunkenergy_tcm||[]).push([[6915],{86915:(Pn,ht,a)=>{a.r(ht),a.d(ht,{TransportsModule:()=>Gn});var h=a(60177),c=a(89417),f=a(76965);const ft="[Transports] TOGGLE transport",_t="[Transports] UNSELECT all";class Ce{constructor(n){this.payload=n,this.type=ft}}class ve{constructor(){this.type=_t}}var O=a(20832);const Tt={selectedTransports:[]},yt="aegisxTransports";function ge(r=Tt,n){switch(n.type){case ft:return{...r,selectedTransports:(0,O.g)(r.selectedTransports,n.payload.item)};case _t:return Tt;default:return r}}const De=r=>r[yt].selectedTransports;var P=a(63040),F=a(45286),w=a(7605),_=a(95006),$=a(58728),G=a(52693);const Ct="[Transport] CREATE transport",vt="[Transport] CREATE transport success";class Ee{constructor(n){this.payload=n,this.type=Ct}}class be{constructor(n){this.payload=n,this.type=vt}}const gt="[Stores] GET stores personal collection",rt="[Stores] GET stores personal collection success",Dt="[Stores] GET stores personal collection error";class Et{constructor(){this.type=gt}}class Fe{constructor(n){this.payload=n,this.type=rt}}class Se{constructor(n){this.payload=n,this.type=Dt}}const Re={stores:null},bt="storesPersonalCol";function xe(r=Re,n){return n.type===rt?{...r,stores:n.payload}:r}const Ft=r=>r[bt].stores;var t=a(54438),l=a(29262),B=a(33579),N=a(33555),X=a(31992),V=a(46346),U=a(94300),H=a(54444),E=a(63649),S=a(23509),R=a(90113),x=a(36001),j=a(97519),St=a(28520),ke=a(59788),je=a(83891);function Me(r,n){1&r&&t.nrm(0,"mcrai-option",1),2&r&&t.Y8G("value",null)}function Ge(r,n){if(1&r&&(t.j41(0,"mcrai-option",2),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.Y8G("value",e.code)("title",e.name),t.R7$(),t.SpI(" ",e.name," ")}}let Rt=(()=>{class r{get control(){return this._control}set control(e){this._control=e}constructor(){this.destroy=new F.B7,this.required=!1,this.nullable=!0,this.placeholder="Sklad"}ngOnInit(){}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-select-store"]],inputs:{control:"control",required:"required",nullable:"nullable",stores:"stores",placeholder:"placeholder"},decls:4,vars:3,consts:[[3,"placeholder","control"],[3,"value"],[3,"value","title"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-select",0),t.DNE(1,Me,1,1,"mcrai-option",1),t.Z7z(2,Ge,2,3,"mcrai-option",2,t.fX1),t.k0s()),2&o&&(t.Y8G("placeholder",s.placeholder+(s.required?" *":""))("control",s.control),t.R7$(),t.vxM(1,s.nullable?1:-1),t.R7$(),t.Dyx(null==s.stores?null:s.stores.items))},dependencies:[ke.w,je.P]})}return r})();var xt=a(35904),kt=a(75483),ot=a(84426);const Pe=()=>["info",0,"language"],we=()=>["info",0,"name"],Ie=()=>["prices",0,"currency"],$e=()=>["prices",0,"price"];let Ne=(()=>{class r{get controls(){return this.form.controls}constructor(e,o,s){this.builder=e,this.store=o,this.modalService=s,this.destroy=new F.B7,this.ERRORS={order:{pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 cel\xe9 \u010d\xedslo"},name:{required:"Doprava mus\xed m\xedt n\xe1zev"},price:{required:"Doprava mus\xed m\xedt cenu",pattern:"Mus\xed b\xfdt nez\xe1porn\xe1 cena"}},this.buildForm()}ngOnInit(){this.store.pipe((0,f.Lt)(Ft),(0,w.Q)(this.destroy),(0,$.p)(e=>!!e&&e.items.length>0)).subscribe(e=>this.storesPersonalCol=e),this.fetchStoresPersonalCol()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}fetchStoresPersonalCol(){this.store.dispatch(new Et)}buildForm(){this.form=this.builder.group({info:this.builder.array([this.builder.group({language:["CZ",c.k0.required],name:["",c.k0.required]})]),prices:this.builder.array([this.builder.group({currency:["CZK",c.k0.required],price:[0,[c.k0.required,
1c.k0.pattern(G.Q6)]]})]),domains:[null],order:[null,c.k0.pattern(G.j8)],code:[null],store:[null],icon:[null]})}isAddButtonDisabled(){return this.form.invalid}add(){if(!this.isAddButtonDisabled()){const e=this.form.value;e.domains=this.form.value.domains?this.form.value.domains.map(o=>({id:o})):null,this.store.dispatch(new Ee({body:e})),this.close()}}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(c.ze),t.rXU(f.il),t.rXU(l.mO))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-add-transport-modal"]],decls:50,vars:26,consts:[[3,"formGroup"],["collapsable",""],[3,"control","required","nullable"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","Cena *",3,"control","errors"],[3,"control","multiple","nullable"],["type","text","placeholder","Po\u0159ad\xed",3,"control","errors"],["type","text","placeholder","K\xf3d",3,"control"],[3,"control","stores","placeholder"],["type","file",3,"control"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xe1 doprava"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0)(6,"mcrai-row")(7,"mcrai-col")(8,"mcrai-panel",1)(9,"mcrai-panel-header")(10,"h2"),t.EFF(11,"Prvn\xed jazykov\xe1 mutace"),t.k0s()(),t.j41(12,"mcrai-panel-content"),t.nrm(13,"aegisx-select-language",2)(14,"mcrai-input",3),t.k0s()()()(),t.j41(15,"mcrai-row")(16,"mcrai-col")(17,"mcrai-panel",1)(18,"mcrai-panel-header")(19,"h2"),t.EFF(20,"Prvn\xed cena"),t.k0s()(),t.j41(21,"mcrai-panel-content"),t.nrm(22,"aegisx-select-currency",2)(23,"mcrai-input",4),t.k0s()()()(),t.j41(24,"mcrai-row")(25,"mcrai-col")(26,"mcrai-panel",1)(27,"mcrai-panel-header")(28,"h2"),t.EFF(29,"Dom\xe9ny"),t.k0s()(),t.j41(30,"mcrai-panel-content"),t.nrm(31,"aegisx-select-domains",5),t.k0s()()()(),t.j41(32,"mcrai-row")(33,"mcrai-col")(34,"mcrai-panel",1)(35,"mcrai-panel-header")(36,"h2"),t.EFF(37,"Nastaven\xed a k\xf3dy"),t.k0s()(),t.j41(38,"mcrai-panel-content"),t.nrm(39,"mcrai-input",6)(40,"mcrai-input",7)(41,"aegisx-select-store",8)(42,"br")(43,"br")(44,"mcrai-input",9),t.k0s()()()()()(),t.j41(45,"mcrai-modal-actions")(46,"button",10),t.bIt("click",function(){return s.close()}),t.EFF(47,"Zav\u0159\xedt "),t.k0s(),t.j41(48,"button",11),t.bIt("click",function(){return s.add()}
1),t.EFF(49,"Vytvo\u0159it "),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(8),t.Y8G("control",s.form.get(t.lJ4(22,Pe)))("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",s.form.get(t.lJ4(23,we)))("errors",s.ERRORS.name),t.R7$(8),t.Y8G("control",s.form.get(t.lJ4(24,Ie)))("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",s.form.get(t.lJ4(25,$e)))("errors",s.ERRORS.price),t.R7$(8),t.Y8G("control",s.form.controls.domains)("multiple",!0)("nullable",!1),t.R7$(8),t.Y8G("control",s.controls.order)("errors",s.ERRORS.order),t.R7$(),t.Y8G("control",s.controls.code),t.R7$(),t.Y8G("control",s.controls.store)("stores",s.storesPersonalCol)("placeholder","Prodejna pro osobn\xed odb\u011br"),t.R7$(3),t.Y8G("control",s.controls.icon),t.R7$(4),t.Y8G("disabled",s.isAddButtonDisabled()))},dependencies:[c.qT,c.cb,c.j4,B.o,N.g,X.h,V.l,U.J,H.f,E.Q,S.g,R.l,x.B,j.N,St.e,Rt,xt.b,kt.Q,ot.h]})}return r})();const jt="[Transports] GET transports",st="[Transports] GET transports success";class Le{constructor(n){this.payload=n,this.type=jt}}class nt{constructor(n){this.payload=n,this.type=st}}var I=a(1173);const Gt="[Transports] DELETE transports",Pt="[Transports] DELETE transports success";class Ae{constructor(n){this.payload=n,this.type=Gt}}class Oe{constructor(n){this.payload=n,this.type=Pt}}var wt=a(20039);const Be={transports:(0,wt.T5)(),filter:(0,wt.T5)()},it="transports";function Xe(r=Be,n){switch(n.type){case st:return{...r,transports:r.transports.set(n.payload.id,n.payload.items)};case"[Transports] SET filter":return{...r,filter:r.filter.set(n.payload.id,n.payload.filter)};default:return r}}const Ve=r=>r[it].transports,Ue=r=>r[it].filter;var L=a(71829),k=a(65382),It=a(77617),$t=a(70014),Nt=a(52699),M=a(92721),He=a(48390),Y=a(64204),z=a(95466),Q=a(7306),J=a(7622),W=a(57382),Z=a(65208),K=a(21336),q=a(30127),tt=a(49451),at=a(7887),ct=a(18227);const Ye=r=>["/aegisx/settings/transports/",r];function ze(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Po\u0159ad\xed"),t.k0s())}function Qe(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.JRh(e.order)}}function Je(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"N\xe1zev"),t.k0s())}function We(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.JRh(e.info[0].name)}}function Ze(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Cena"),t.k0s())}function Ke(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.nI1(2,"currency"),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.JRh(t.ii3(2,1,e.prices[0].price,2,2,e.prices[0].currency))}}function qe(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"K\xf3d"),t.k0s())}function tr(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.JRh(e.code)}}function er(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Obr\xe1zek"),t.k0s())}function rr(r,n){if(1&r&&t.nrm(0,"mcrai-media",12),2&r){const e=t.XpG().$implicit;t.Y8G("data",null==e.icon?null:e.icon.thumbnail)}}function or(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.DNE(1,rr,1,1,"mcrai-media",12),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.vxM(1,e.icon?1:-1)}}function sr(r,n){1&r&&t.nrm(0,"mcrai-th")}function nr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",16),t.bIt("click",function(){t.eBV(e);const s=t.XpG().$implicit,p=t.XpG(2);return t.Njj(p.toggleTransport(s))}),t.EFF(1,"Vybrat "),t.k0s()}}function ir(r,n){if(1&r&&(t.j41(0,"mcrai-td",13),t.DNE(1,nr,2,0,"button",14),t.j41(2,"a",15),t.EFF(3,"Detail "),t.k0s()()),2&r){const e=n.$implicit,o=t.XpG(2);t.R7$(),t.vxM(1,o.toolbarService.isDeleteMode()?1:-1),t.R7$(),t.Y8G("routerLink",t.eq3(2,Ye,e.id))}}function ar(r,n){1&r&&t.nrm(0,"mcrai-tr")}function cr(r,n){if(1&r&&t.nrm(0,"mcrai-tr"),2&r){const e=n.$implicit,o=t.XpG(2);t.AVh("mcrai-tr--highlight",o.isSelected(e))}}function lr(r,n){if(1&r&&(t.j41(0,"mcrai-table",0),t.qex(1,1),t.DNE(2,ze,2,0,"mcrai-th",2)(3,Qe,2,1,"mcrai-td",3),t.bVm(),t.qex(4,4),t.DNE(5,Je,2,0,"mcrai-th",2)(6,We,2,1,"mcrai-td",3),t.bVm(),t.qex(7,5),t.DNE(8,Ze,2,0,"mcrai-th",2)(9,Ke,3,6,"mcrai-td",3),t.bVm(),t.qex(10,6),t.DNE(11,qe,2,0,"mcrai-th",2)(12,tr,2,1,"mcrai-td",3),t.bVm(),t.qex(13,7),t.DNE(14,er,2,0,"mcrai-th",2)(15,or,2,1,"mcrai-td",3),t.bVm(),t.qex(16,8),t.DNE(17,sr,1,0,"mcrai-th",2)(18,ir,4,4,"mcrai-td",9),t.bVm(),t.DNE(19,ar,1,0,"mcrai-tr",10)(20,cr,1,2,"mcrai-tr",11),t.k0s()),2&r){const e=t.XpG();t.Y8G("container",e.transports),t.R7$(19),t.Y8G("mcraiHeaderRowDef",e.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",e.columns)}}let pr=(()=>{class r{get columns(){return["icon","order","name","price","code","actions"]}constructor(e){this.toolbarService=e,this.onTransportToggle=new t.bkB}ngOnInit(){}toggleTransport(e){this.onTransportToggle.emit(e)}isSelected(e){return!!this.selectedTransports.find(o=>o.id===e.id)}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-list"]],inputs:{transports:"transports",selectedTransports:"selectedTransports"},outputs:{onTransportToggle:"onTransportToggle"},decls:1,vars:1,consts:[[3,"container"],["mcraiColumnDef","order"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","name"],["mcraiColumnDef","price"],["mcraiColumnDef","code"],["mcraiColumnDef","icon"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["type","image","width","50","height","50",3,"data"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"routerLink"],["mcrai-button","neutral",3,"click"]],template:function(o,s){1&o&&t.DNE(0,lr,21,3,"mcrai-table",0),2&o&&t.vxM(0,s.transports?0:-1)},dependencies:[P.Wk,E.Q,Y.n,z.q,Q.B,J.K,W.D,Z.Q,K.V,q.e,tt.O,at.h,ct.o]})}return r})();function mr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s()}if(2&r){const e=t.XpG();t.Y8G("disabled",e.isDeleteButtonDisabled())}}function dr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const s=t.XpG();
1return t.Njj(s.deleteTransports())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const e=t.XpG();t.Y8G("disabled",e.isDeleteButtonDisabled())}}function ur(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.showAddTransportModal())}),t.EFF(1,"P\u0159idat dopravu "),t.k0s()}}function hr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s()}if(2&r){const e=t.XpG();t.Y8G("disabled",e.isDeleteButtonDisabled())}}function fr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.deleteTransports())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const e=t.XpG();t.Y8G("disabled",e.isDeleteButtonDisabled())}}function _r(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.showAddTransportModal())}),t.EFF(1,"P\u0159idat dopravu "),t.k0s()}}let Tr=(()=>{class r{constructor(e,o,s,p){this.store=e,this.modalService=o,this.permissionService=s,this.toolbarService=p,this.destroy=new F.B7}ngOnInit(){this.setToolbarModes(),this.getTransports(),this.selectTrans
1ports(),this.selectSelectedTransports()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([I.H.View,I.H.Edit,I.H.Delete])}getTransports(e=1){this.store.dispatch(new Le({id:"",page:e}))}selectTransports(){this.store.pipe((0,f.Lt)(Ve),(0,w.Q)(this.destroy),(0,_.T)(e=>e.get("")),(0,$.p)(e=>!!e)).subscribe(e=>this.transports=e)}selectSelectedTransports(){this.store.pipe((0,f.Lt)(De),(0,w.Q)(this.destroy)).subscribe(e=>this.selectedTransports=e)}onPageChange(e){this.getTransports(e)}showAddTransportModal(){const e=new l.m_("800px","600px");this.modalService.open(Ne,e)}isDeleteButtonDisabled(){return!this.selectedTransports||!this.selectedTransports.length}deleteTransports(){this.isDeleteButtonDisabled()||this.store.dispatch(new Ae({id:"",items:this.selectedTransports}))}toggleTransport(e){this.store.dispatch(new Ce({item:e}))}unselectAll(){this.store.dispatch(new ve)}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(L.n),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-overview"]],decls:18,vars:9,consts:[[3,"onTransportToggle","transports","selectedTransports"],["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(o,s){1&o&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h1"),t.EFF(5,"Nastaven\xed doprav"),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"aegisx-transport-list",0),t.bIt("onTransportToggle",function(b){return s.toggleTransport(b)}),t.k0s()(),t.j41(8,"mcrai-panel-actions",1),t.DNE(9,mr,2,1,"button",2)(10,dr,2,1,"button",3)(11,ur,2,0,"button",4),t.k0s(),t.j41(12,"mcrai-panel-actions")(13,"mcrai-paginator",5),t.bIt("page",function(b){return s.onPageChange(b)}),t.k0s(),t.DNE(14,hr,2,1,"button",2)(15,fr,2,1,"button",3)(16,_r,2,0,"button",4),t.k0s()()(),t.nrm(17,"aegisx-toolbar")),2&o&&(t.R7$(7),t.Y8G("transports",s.transports)("selectedTransports",s.selectedTransports),t.R7$(2),t.vxM(9,s.toolbarService.isDeleteMode()?9:-1),t.R7$(),t.vxM(10,s.toolbarService.isDeleteMode()?10:-1),t.R7$(),t.vxM(11,s.toolbarService.isDeleteMode()?-1:11),t.R7$(2),t.Y8G("paginator",null==s.transports?null:s.transports.paginator),t.R7$(),t.vxM(14,s.toolbarService.isDeleteMode()?14:-1),t.R7$(),t.vxM(15,s.toolbarService.isDeleteMode()?15:-1),t.R7$(),t.vxM(16,s.toolbarService.isDeleteMode()?-1:16))},dependencies:[It.I,$t.I,Nt.H,E.Q,S.g,R.l,M.h,x.B,He.h,pr]})}return r})();var Lt=a(97309),D=a(8118),yr=a(68614),At=a(71845);const Ot="[Transport] PATCH transport",Bt="[Transport] PATCH transport success";class Cr{constructor(n){this.payload=n,this.type=Ot}}class vr{constructor(n){this.payload=n,this.type=Bt}}var gr=a(52570),Xt=a(11815),lt=a(41819),pt=a(62523),mt=a(39103),Dr=a(19493),Er=a(77312),br=a(42781),Fr=a(63791),et=a(37036),Vt=a(99138);function Sr(r,n){if(1&r&&(t.j41(0,"mcrai-dt"),t.EFF(1),t.k0s(),t.j41(2,"mcrai-dd"),t.EFF(3),t.nI1(4,"booleanToString"),t.k0s()),2&r){const e=n.$index,o=t.XpG(2);t.R7$(),t.JRh(null==o.paymentsData[e]?null:o.paymentsData[e].name),t.R7$(2),t.JRh(t.bMT(4,2,null==o.paymentsData[e]?null:o.paymentsData[e].isActive))}}function Rr(r,n){if(1&r&&(t.j41(0,"mcrai-dl"),t.Z7z(1,Sr,5,4,null,null,t.fX1),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.Dyx(null==e.form?null:e.form.controls)}}function xr(r,n){if(1&r){const e=t.RV6();t.j41(0,"label")(1,"mcrai-input",1),t.bIt("change",function(s){const p=t.eBV(e).$index,b=t.XpG(2);return t.Njj(b.updatePaymentsData(p,s))}),t.EFF(2),t.k0s()()}if(2&r){const e=n.$implicit,o=n.$index,s=t.XpG(2);t.R7$(),t.Y8G("control",e[o])("checked",null==s.paymentsData[o]?null:s.paymentsData[o].isActive),t.R7$(),t.JRh(s.paymentsData[o].name)}}function kr(r,n){if(1&r&&(t.j41(0,"form"),t.Z7z(1,xr,3,3,"label",null,t.fX1),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.Dyx(null==e.form?null:e.form.controls)}}function jr(r,n){if(1&r){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",2),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.patchPayments())}
1),t.EFF(2,"Ulo\u017eit zm\u011bny "),t.k0s()()}}let Mr=(()=>{class r{constructor(e,o,s){this.store=e,this.builder=o,this.toolbarService=s,this.destroy=new F.B7,this.paymentsData=[]}buildForm(){this.form=this.builder.array([]),this.paymentsData.forEach(e=>{this.form.push(this.builder.control(new c.hs(e.isActive)))})}ngOnChanges(e){e.hasOwnProperty("transport")&&(this.payments=null,this.paymentsData=[],this.getPayments(),this.selectPayments())}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}patchPayments(){const e=[];this.paymentsData.forEach(o=>{o.isActive&&e.push(o.id)}),this.store.dispatch(new et.pn({id:this.transport.id,payments:e}))}updatePaymentsData(e,o){this.paymentsData[e].isActive=o.target.checked}getPayments(e=1){this.store.dispatch(new br.AX({id:"",page:e}))}selectPayments(){this.store.select(Fr.uH).pipe((0,w.Q)(this.destroy),(0,_.T)(e=>e.get("")),(0,$.p)(e=>!!e),(0,Dr.s)(1),(0,Er.j)(()=>this.setPaymentsFormData())).subscribe(e=>this.payments=e)}setPaymentsFormData(){this.payments.items.forEach(e=>{let o=!1;this.transport.payments.forEach(s=>{s.id===e.id&&(o=!0)}),this.paymentsData.push({id:e.id,name:e.info[0].name,isActive:o})}),this.buildForm()}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(c.ze),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-payments"]],inputs:{transport:"transport"},features:[t.OA$],decls:9,vars:3,consts:[["color","secondary"],["type","checkbox",3,"change","control","checked"],["mcrai-button","positive",3,"click"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-col")(1,"mcrai-panel",0)(2,"mcrai-panel-header")(3,"h2"),t.EFF(4,"Platby"),t.k0s()(),t.j41(5,"mcrai-panel-content"),t.DNE(6,Rr,3,0,"mcrai-dl")(7,kr,3,0,"form"),t.k0s(),t.DNE(8,jr,3,0,"mcrai-panel-actions"),t.k0s()()),2&o&&(t.R
17$(6),t.vxM(6,!s.toolbarService.isEditMode()&&s.form?6:-1),t.R7$(),t.vxM(7,s.toolbarService.isEditMode()?7:-1),t.R7$(),t.vxM(8,s.toolbarService.isEditMode()?8:-1))},dependencies:[c.qT,c.cb,N.g,E.Q,S.g,R.l,M.h,x.B,Xt.u,lt.p,pt.L,mt.Z,Vt.Z]})}return r})();const Ut="[Transports] DELETE transport domains",Ht="[Transports] DELETE transport domains success";class Gr{constructor(n){this.payload=n,this.type=Ut}}class Pr{constructor(n){this.payload=n,this.type=Ht}}const Yt="[Transports] ADD transport domains",zt="[Transports] ADD transport domains success";class wr{constructor(n){this.payload=n,this.type=Yt}}class Ir{constructor(n){this.payload=n,this.type=zt}}var $r=a(27354),dt=a(26588);function Nr(r,n){if(1&r){const e=t.RV6();t.j41(0,"div",1)(1,"div",12),t.nrm(2,"aegisx-select-domains",13),t.k0s(),t.j41(3,"div",14)(4,"button",15),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.addDomains())}),t.EFF(5,"P\u0159idat "),t.k0s()()()}if(2&r){const e=t.XpG();t.R7$(2),t.Y8G("control",e.form.controls.domains)("multiple",!0)("nullable",!1)("excludeIds",e.currentDomainIds),t.R7$(2),t.Y8G("disabled",e.isAddButtonDisabled())}}function Lr(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"N\xe1zev"),t.k0s())}function Ar(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.name," ")}}function Or(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Hostname"),t.k0s())}function Br(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.hostname," ")}}function Xr(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"Hostname SSR"),t.k0s())}function Vr(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.hostname_ssr," ")}}function Ur(r,n){1&r&&t.nrm(0,"mcrai-th")}function Hr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",18),t.bIt("click",function(){t.eBV(e);const s=t.XpG().$implicit,p=t.XpG();return t.Njj(p.toggleDomain(s))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function Yr(r,n){if(1&r&&(t.j41(0,"mcrai-td",16),t.DNE(1,Hr,3,0,"button",17),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}function zr(r,n){1&r&&t.nrm(0,"mcrai-tr")}function Qr(r,n){if(1&r&&t.nrm(0,"mcrai-tr"),2&r){const e=n.$implicit,o=t.XpG();t.AVh("mcrai-tr--highlight",o.isSelectedDomain(e))}}function Jr(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.unselectDomains())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",20),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.deleteDomain())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteDomainButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeleteDomainButtonDisabled())}}function Wr(r,n){if(1&r&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,Jr,4,2),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}let Zr=(()=>{class r{get columns(){return["name","hostname","hostname_ssr","actions"]}get currentDomainIds(){return this.transport.domains.map(e=>e.id)}constructor(e,o,s){this.store=e,this.toolbarService=o,this.permissionService=s,this.form=new c.gE({domains:new c.MJ([])}),this.selectedDomains=[]}ngOnInit(){}isAddButtonDisabled(){const e=this.form.controls.domains.value;return!e||(0,$r.c)(e)&&!e.length}addDomains(){this.isAddButtonDisabled()||(this.store.dispatch(new wr({id:this.transport.id,body:this.form.value})),this.form.reset())}isSelectedDomain(e){return!!e&&!!this.selectedDomains.find(o=>o.id===e.id)}toggleDomain(e){this.selectedDomains=(0,O.g)(this.selectedDomains,e)}unselectDomains(){this.selectedDomains=[]}isDeleteDomainButtonDisabled(){return!this.selectedDomains.length}deleteDomain(){this.isDeleteDomainButtonDisabled()||(this.store.dispatch(new Gr({id:this.transport.id,domains:this.selectedDomains})),this.unselectDomains())}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(k.h),t.rXU(L.n))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-domains"]],inputs:{transport:"transport"},decls:22,vars:5,consts:[["color","secondary"],[1,"flex-row-select-domain"],[3,"items"],["mcraiColumnDef","name"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","hostname"],["mcraiColumnDef","hostname_ssr"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],[1,"flex-item-sd-selectbox"],[3,"control","multiple","nullable","excludeIds"],[1,"flex-item-sd-button"],["mcrai-button","positive",3,"click","disabled"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"click"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Dom\xe9ny"),t.k0s()(),t.j41(4,"mcrai-panel-content"),t.DNE(5,Nr,6,5,"div",1),t.j41(6,"mcrai-table",2),t.qex(7,3),t.DNE(8,Lr,2,0,"mcrai-th",4)(9,Ar,2,1,"mcrai-td",5),t.bVm(),t.qex(10,6),t.DNE(11,Or,2,0,"mcrai-th",4)(12,Br,2,1,"mcrai-td",5),t.bVm(),t.qex(13,7),t.DNE(14,Xr,2,0,"mcrai-th",4)(15,Vr,2,1,"mcrai-td",5),t.bVm(),t.qex(16,8),t.DNE(17,Ur,1,0,"mcrai-th",4)(18,Yr,2,1,"mcrai-td",9),t.bVm(),t.DNE(19,zr,1,0,"mcrai-tr",10)(20,Qr,1,2,"mcrai-tr",11),t.k0s()(),t.DNE(21,Wr,2,1,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.vxM(5,s.toolbarService.isEditMode()?5:-1),t.R7$(),t.Y8G("items",s.transport.domains),t.R7$(13),t.Y8G("mcraiHeaderRowDef",s.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",s.columns),t.R7$(),t.vxM(21,s.permissionService.canWrite()?21:-1))},dependencies:[E.Q,Y.n,z.q,Q.B,J.K,W.D,Z.Q,K.V,q.e,tt.O,S.g,R.l,M.h,x.B,dt.R,xt.b],styles:[".flex-row-select-domain[_ngcontent-%COMP%]{display:flex;padding:10px 15px;gap:15px}.flex-item-sd-selectbox[_ngcontent-%COMP%]{flex-grow:1}"]})}return r})();const Qt="[Transports] UPLOAD transport image",Jt="[Transports] UPLOAD transport image success";class Kr{constructor(n){this.payload=n,this.type=Qt}}class qr{constructor(n){this.payload=n,this.type=Jt}}const Wt="[Transports] DELETE transport image",Zt="[Transports] DELETE transport image success";class to{constructor(n){this.payload=n,this.type=Wt}}class eo{constructor(n){this.payload=n,this.type=Zt}}function ro(r,n){if(1&r&&(t.j41(0,"mcrai-row")(1,"mcrai-col"),t.nrm(2,"mcrai-media",2),t.k0s()()),2&r){const e=t.XpG();t.R7$(2),t.Y8G("data",null==e.transport||null==e.transport.icon?null:e.transport.icon.thumbnail)("mcraiImageDetail",null==e.transport||null==e.transport.icon?null:e.transport.icon.original)}}function oo(r,n){if(1&r&&(t.j41(0,"form",1),t.nrm(1,"mcrai-input",3),t.k0s()),2&r){const e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(),t.Y8G("control",e.controls.image)}}function so(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.uploadImage())}),t.EFF(1,"Nahr\xe1t "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isUploadButtonDisabled())}}function no(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.deleteImage())}),t.EFF(1,"Smazat obr\xe1zek "),t.k0s()}}function io(r,n){if(1&r&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,so,2,1,"button",4)(2,no,2,0,"button",5),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()&&e.hasImage()?2:-1)}}let ao=(()=>{class r{get controls(){return this.form.controls}constructor(e,o){this.store=e,this.toolbarService=o,this.destroy=new F.B7,this.form=new c.J3({image:new c.hs(null,c.k0.required)})}ngOnInit(){}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}isUploadButtonDisabled(){return!this.form.valid}uploadImage(){this.isUploadButtonDisabled()?console.error("upload transport image invalid",this.form.value):this.store.dispatch(new Kr({transport_id:this.transport.id,image:this.form.value.image}))}deleteImage(){this.store.dispatch(new to({transport_id:this.transport.id}))}hasImage(){return!!this.transport&&!!this.transport.icon}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-image"]],inputs:{transport:"transport"},decls:10,vars:3,consts:[["color","secondary"],[3,"formGroup"],["type","image","width","auto","height","40",1,"transport-image__icon",3,"data","mcraiImageDetail"],["type","file",3,"control"],["mcrai-button","positive",3,"disabled"],["mcrai-button","negative"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","negative",3,"click"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Obr\xe1zek"),t.k0s()(),t.j41(4,"mcrai-panel-content"),t.DNE(5,ro,3,2,"mcrai-row"),t.j41(6,"mcrai-row")(7,"mcrai-col"),t.DNE(8,oo,2,2,"form",1),t.k0s()()(),t.DNE(9,io,3,2,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.vxM(5,s.transport.icon?5:-1),t.R7$(3),t.vxM(8,s.toolbarService.isEditMode()?8:-1),t.R7$(),t.vxM(9,s.toolbarService.isViewMode()?-1:9))},dependencies:[c.qT,c.cb,c.j4,B.o,N.g,E.Q,S.g,R.l,M.h,x.B,St.e,at.h,At.U],styles:[".transport-image__icon[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;max-width:100px}"]})}return r})();const Kt="[Transports] PATCH transport infos",qt="[Transports] PATCH transport infos success";class co{constructor(n){this.payload=n,this.type=Kt}}class lo{constructor(n){this.payload=n,this.type=qt}}const te="[Transports] ADD transport info",ee="[Transports] ADD transport info success";class po{constructor(n){this.payload=n,this.type=te}}class mo{constructor(n){this.payload=n,this.type=ee}}let uo=(()=>{class r{get controls(){return this.form.controls}constructor(e,o,s,p){this.store=e,this.modalService=o,this.builder=s,this.data=p,this.ERRORS={name:{required:"N\xe1zev mus\xed b\xfdt vypln\u011bn"}},this.buildForm()}buildForm(){this.form=this.builder.group({language:["CZ",c.k0.required],name:[null,c.k0.required]})}ngOnInit(){}isAddButtonDisabled(){return this.form.invalid}add(){this.isAddButtonDisabled()||(this.store.dispatch(new po({id:this.data.transport.id,info:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(c.ok),t.rXU(l._P))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-add-transport-info-modal"]],decls:13,vars:7,consts:[["id","info",3,"formGroup"],[3,"control","required","nullable"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["mcrai-button","negative",3,"click"],["mcrai-button","positive","form","info",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xe1 jazykov\xe1 mutace"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"aegisx-select-language",1)(7,"mcrai-input",2),t.k0s()(),t.j41(8,"mcrai-modal-actions")(9,"button",3),t.bIt("click",function(){return s.close()}),t.EFF(10,"Zav\u0159\xedt"),t.k0s(),t.j41(11,"button",4),t.bIt("click",function(){return s.add()}
1),t.EFF(12,"Vytvo\u0159it "),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(),t.Y8G("control",s.controls.language)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",s.controls.name)("errors",s.ERRORS.name),t.R7$(4),t.Y8G("disabled",s.isAddButtonDisabled()))},dependencies:[c.qT,c.cb,c.j4,X.h,V.l,U.J,H.f,E.Q,j.N,kt.Q]})}return r})();const re="[Transports] DELETE transport info",oe="[Transports] DELETE transport info success";class ho{constructor(n){this.payload=n,this.type=re}}class fo{constructor(n){this.payload=n,this.type=oe}}var _o=a(57864),se=a(44010),ne=a(33804);const To=r=>[r,"name"];function yo(r,n){if(1&r&&(t.j41(0,"h3"),t.EFF(1),t.k0s()),2&r){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.language)}}function Co(r,n){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.nI1(5,"notSet"),t.k0s()()),2&r){const e=t.XpG().$implicit;t.R7$(4),t.JRh(t.bMT(5,1,e.name))}}function vo(r,n){if(1&r&&t.nrm(0,"mcrai-input",4),2&r){const e=t.XpG().$implicit,o=t.XpG();t.Y8G("control",o.form.get(t.eq3(2,To,e.language)))("errors",o.ERRORS.name)}}function go(r,n){if(1&r&&(t.j41(0,"mcrai-tab"),t.DNE(1,yo,2,1,"ng-template",3)(2,Co,6,3,"mcrai-dl")(3,vo,1,4,"mcrai-input",4),t.k0s()),2&r){const e=t.XpG();t.R7$(2),t.vxM(2,e.toolbarService.isEditMode()?-1:2),t.R7$(),t.vxM(3,e.toolbarService.isEditMode()?3:-1)}}function Do(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.patch())}),t.EFF(1," Ulo\u017eit zm\u011bny "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isPatchButtonDisabled())}}function Eo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.add())}),t.EFF(1," P\u0159idat jazykovou mutaci "),t.k0s()}}function bo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",10),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.delete())}),t.EFF(1," Smazat mutaci "),t.k0s()}}function Fo(r,n){if(1&r&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,Do,2,1,"button",5)(2,Eo,2,0,"button",6)(3,bo,2,0,"button",7),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?-1:2),t.R7$(),t.vxM(3,e.toolbarService.isDeleteMode()?3:-1)}}let So=(()=>{class r{get controls(){return this.form.controls}constructor(e,o,s,p){this.store=e,this.modalService=o,this.permissionService=s,this.toolbarService=p,this.destroy=new F.B7,this.ERRORS={name:{required:"N\xe1zev mus\xed b\xfdt vypln\u011bn"}},this.form=new c.gE({}),this.selectedIndex=0,this.prevInfoLength=null}ngOnInit(){}ngOnChanges(e){e.hasOwnProperty("transport")&&(this.updateForm(this.transport.info),this.hydrateForm(this.transport.info),null!==this.prevInfoLength&&(this.transport.info.length>this.prevInfoLength?setTimeout(()=>this.selectedIndex=this.transport.info.length-1,0):this.transport.info.length<this.prevInfoLength&&setTimeout(()=>this.selectedIndex=0,0)),this.prevInfoLength=this.transport.info.length)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}infoDiff(e,o){return e.filter(s=>!o.includes(s.language))}updateForm(e=[]){const o=Object.keys(this.form.value);this.infoDiff(e,o).forEach(u=>{const A=this.buildForm(u);this.form.addControl(u.language,A)});const p=e.map(u=>u.language);o.filter(u=>!p.includes(u)).forEach(u=>this.form.removeControl(u))}buildForm(e){const o=new c.gE({}),s={name:c.k0.required};return Object.keys(e).forEach(p=>{o.addControl(p,new c.MJ(null,s[p]))}),o}hydrateForm(e){e.forEach(o=>{const s=this.form.controls[o.language];s&&s.patchValue(o)})}isPatchButtonDisabled(){return this.form.invalid||this.form.pristine}patch(){if(this.isPatchButtonDisabled())return;const e=this.form.controls,o=[];Object.keys(e).forEach(s=>{e[s].dirty&&o.push({language:s,...e[s].value})}),o.length&&this.store.dispatch(new co({infos:o,transport:this.transport}))}add(){const e=new l.m_("1200px","800px",{transport:this.transport});this.modalService.open(uo,e)}delete(){this.store.dispatch(new ho({language_code:this.transport.info[this.selectedIndex].language,transport:this.transport}))}showActions(){return!0}selectIndex(e){this.selectedIndex=e.selectedIndex}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(L.n),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-info"]],inputs:{transport:"transport"},features:[t.OA$],decls:10,vars:3,consts:[["color","secondary"],["id","info",3,"formGroup"],[3,"selectionChange","selectedIndex"],["mcraiTabLabel",""],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["form","info","mcrai-button","positive",3,"disabled"],["mcrai-button","positive"],["mcrai-button","negative"],["form","info","mcrai-button","positive",3,"click","disabled"],["mcrai-button","positive",3,"click"],["mcrai-button","negative",3,"click"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Jazykov\xe9 mutace"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"form",1)(6,"mcrai-horizontal-tabs",2),t.bIt("selectionChange",function(b){return s.selectIndex(b)}),t.Z7z(7,go,4,2,"mcrai-tab",null,t.fX1),t.k0s()()(),t.DNE(9,Fo,4,3,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.Y8G("formGroup",s.form),t.R7$(),t.Y8G("selectedIndex",s.selectedIndex),t.R7$(),t.Dyx(s.transport.info),t.R7$(2),t.vxM(9,s.permissionService.canWrite()&&s.showActions()?9:-1))},dependencies:[c.qT,c.cb,c.j4,E.Q,S.g,R.l,M.h,x.B,j.N,lt.p,pt.L,mt.Z,_o.y,se.qv,se.p$,ne.s],styles:[".flex[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.flex--item[_ngcontent-%COMP%]{flex:1 0 25%}.mcrai-tabs[_ngcontent-%COMP%]{background-color:#fff!important}"]})}return r})();const ie="[Transports] DELETE transport prices",ae="[Transports] DELETE transport prices success";class Ro{constructor(n){this.payload=n,this.type=ie}}class xo{constructor(n){this.payload=n,this.type=ae}}const ce="[Transports] ADD transport price",le="[Transports] ADD transport price success";class ko{constructor(n){this.payload=n,this.type=ce}}class jo{constructor(n){this.payload=n,this.type=le}}let Mo=(()=>{class r{get controls(){return this.form.controls}constructor(e,o,s){this.store=e,this.modalService=o,this.data=s,this.destroy=new F.B7,this.ERRORS={price:{required:"Cena mus\xed b\xfdt vypln\u011bna",pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.DEFAULT_CURRENCY="CZK"}ngOnInit(){this.createForm()}createForm(){this.form=new c.gE({currency:new c.MJ(this.DEFAULT_CURRENCY,c.k0.required),price:new c.MJ("0",[c.k0.required,
1c.k0.pattern(G.Q6)])})}isAddButtonDisabled(){return!this.form||!this.form.valid}createTransportPrice(){this.isAddButtonDisabled()?console.log("add transport price not valid",this.form):(this.store.dispatch(new ko({id:this.data.transport.id,price:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(l._P))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-add-transport-price-modal"]],decls:13,vars:7,consts:[["id","addForm",3,"formGroup"],[3,"control","required","nullable"],["type","text","placeholder","Cena *",3,"control","errors"],["mcrai-button","negative",3,"click"],["mcrai-button","positive","form","addForm",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xe1 cena"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"aegisx-select-currency",1)(7,"mcrai-input",2),t.k0s()(),t.j41(8,"mcrai-modal-actions")(9,"button",3),t.bIt("click",function(){return s.close()}),t.EFF(10,"Zav\u0159\xedt "),t.k0s(),t.j41(11,"button",4),t.bIt("click",function(){return s.createTransportPrice()}
1),t.EFF(12,"Vytvo\u0159it "),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(),t.Y8G("control",s.controls.currency)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",s.controls.price)("errors",s.ERRORS.price),t.R7$(4),t.Y8G("disabled",s.isAddButtonDisabled()))},dependencies:[c.qT,c.cb,c.j4,X.h,V.l,U.J,H.f,E.Q,j.N,ot.h]})}return r})();const pe="[Transports] PATCH transport prices",me="[Transports] PATCH transport prices success";class Go{constructor(n){this.payload=n,this.type=pe}}class Po{constructor(n){this.payload=n,this.type=me}}const wo=r=>[r,"price"];function Io(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"M\u011bna"),t.k0s())}function $o(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.currency," ")}}function No(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"\u010c\xe1stka"),t.k0s())}function Lo(r,n){if(1&r&&(t.EFF(0),t.nI1(1,"currency")),2&r){const e=t.XpG().$implicit;t.SpI(" ",t.ii3(1,1,null==e?null:e.price,2,2,e.currency)," ")}}function Ao(r,n){if(1&r&&t.nrm(0,"mcrai-input",10),2&r){const e=t.XpG().$implicit,o=t.XpG();t.Y8G("control",o.form.get(t.eq3(2,wo,e.id)))("errors",o.ERRORS.price)}}function Oo(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.DNE(1,Lo,2,6)(2,Ao,1,4,"mcrai-input",10),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1)}}function Bo(r,n){1&r&&t.nrm(0,"mcrai-th")}function Xo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){t.eBV(e);const s=t.XpG().$implicit,p=t.XpG();return t.Njj(p.togglePrice(s))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function Vo(r,n){if(1&r&&(t.j41(0,"mcrai-td",11),t.DNE(1,Xo,3,0,"button",12),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}function Uo(r,n){1&r&&t.nrm(0,"mcrai-tr")}function Ho(r,n){if(1&r&&t.nrm(0,"mcrai-tr"),2&r){const e=n.$implicit,o=t.XpG();t.AVh("mcrai-tr--highlight",o.isSelectedPrice(e))}}function Yo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",16),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.patchTransportPrices())}),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isPatchButtonDisabled())}}function zo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",17),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.addPrice())}),t.EFF(1,"P\u0159idat cenu "),t.k0s()}}function Qo(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",18),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.unselectPrices())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",19),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.deleteDomain())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isDeletePricesButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeletePricesButtonDisabled())}}function Jo(r,n){if(1&r&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,Yo,2,1,"button",14)(2,zo,2,0,"button",15)(3,Qo,4,2),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?-1:2),t.R7$(),t.vxM(3,e.toolbarService.isDeleteMode()?3:-1)}}let Wo=(()=>{class r{set transport(e){this._transport=e,this.updateForm(e.prices),this.hydrateForm(e.prices)}get transport(){return this._transport}get controls(){return this.form.controls}constructor(e,o,s,p){this.store=e,this.modalService=o,this.toolbarService=s,this.permissionService=p,this.columns=["currency","price","actions"],this.ERRORS={price:{required:"Cena mus\xed b\xfdt vypln\u011bna",pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.form=new c.gE({}),this.selectedPrices=[]}ngOnInit(){}addPrice(){const e=new l.m_("1200px","800px",{transport:this.transport});this.modalService.open(Mo,e)}updateForm(e){const o=Object.keys(this.form.value);this.pricesDiff(e,o).forEach(u=>{const A=this.createPriceForm(u);this.form.addControl(u.id,A)});const p=e.map(u=>u.id);o.filter(u=>!p.includes(u)).forEach(u=>this.form.removeControl(u))}pricesDiff(e,o){return e.filter(s=>
1!o.includes(s.id))}createPriceForm(e){return new c.gE({id:new c.MJ(e.id),currency:new c.MJ(e.currency,c.k0.required),price:new c.MJ(e.price,[c.k0.required,c.k0.pattern(G.Q6)])})}hydrateForm(e){e.forEach(o=>{const s=this.form.controls[o.id];s&&s.patchValue(o)})}isPatchButtonDisabled(){return this.form.invalid||this.form.pristine}patchTransportPrices(){if(!this.isPatchButtonDisabled()){const e=[];Object.keys(this.form.controls).forEach(o=>{const s=this.form.controls[o];s.valid&&s.touched&&e.push(s.value)}),this.store.dispatch(new Go({id:this._transport.id,prices:e})),this.form.markAsPristine()}}isSelectedPrice(e){return!!e&&!!this.selectedPrices.find(o=>o.id===e.id)}togglePrice(e){this.selectedPrices=(0,O.g)(this.selectedPrices,e)}unselectPrices(){this.selectedPrices=[]}isDeletePricesButtonDisabled(){return!this.selectedPrices.length}deleteDomain(){this.isDeletePricesButtonDisabled()||(this.store.dispatch(new Ro({id:this.transport.id,prices:this.selectedPrices})),this.unselectPrices())}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(k.h),t.rXU(L.n))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-prices"]],inputs:{transport:"transport"},decls:18,vars:4,consts:[["color","secondary"],[3,"items"],["mcraiColumnDef","currency"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","price"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["type","text","placeholder","\u010c\xe1stka *",3,"control","errors"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"click"],["mcrai-button","positive",3,"disabled"],["mcrai-button","positive"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","positive",3,"click"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Ceny"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"mcrai-table",1),t.qex(6,2),t.DNE(7,Io,2,0,"mcrai-th",3)(8,$o,2,1,"mcrai-td",4),t.bVm(),t.qex(9,5),t.DNE(10,No,2,0,"mcrai-th",3)(11,Oo,3,2,"mcrai-td",4),t.bVm(),t.qex(12,6),t.DNE(13,Bo,1,0,"mcrai-th",3)(14,Vo,2,1,"mcrai-td",7),t.bVm(),t.DNE(15,Uo,1,0,"mcrai-tr",8)(16,Ho,1,2,"mcrai-tr",9),t.k0s()(),t.DNE(17,Jo,4,3,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.Y8G("items",s.transport.prices),t.R7$(10),t.Y8G("mcraiHeaderRowDef",s.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",s.columns),t.R7$(),t.vxM(17,s.permissionService.canWrite()?17:-1))},dependencies:[E.Q,Y.n,z.q,Q.B,J.K,W.D,Z.Q,K.V,q.e,tt.O,S.g,R.l,M.h,x.B,j.N,dt.R,ct.o]})}return r})();const de="[Transports] PATCH transport free limits",ue="[Transports] PATCH transport free limits success";class Zo{constructor(n){this.payload=n,this.type=de}}class Ko{constructor(n){this.payload=n,this.type=ue}}const he="[Transports] DELETE transport free limits",fe="[Transports] DELETE transport free limits success";class qo{constructor(n){this.payload=n,this.type=he}}class ts{constructor(n){this.payload=n,this.type=fe}}const _e="[Transports] ADD transport free limit",Te="[Transports] ADD transport free limit success";class es{constructor(n){this.payload=n,this.type=_e}}class rs{constructor(n){this.payload=n,this.type=Te}}let os=(()=>{class r{get controls(){return this.form.controls}constructor(e,o,s){this.store=e,this.modalService=o,this.data=s,this.destroy=new F.B7,this.ERRORS={price:{required:"Cena mus\xed b\xfdt vypln\u011bna",pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.DEFAULT_CURRENCY="CZK"}ngOnInit(){this.createForm()}createForm(){this.form=new c.gE({currency:new c.MJ(this.DEFAULT_CURRENCY,c.k0.required),price:new c.MJ(0,[c.k0.required,
1c.k0.pattern(G.Q6)])})}isAddButtonDisabled(){return!this.form||!this.form.valid}createTransportPrice(){this.isAddButtonDisabled()||(this.store.dispatch(new es({id:this.data.transport.id,free_limit:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(l._P))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-add-transport-free-limit-modal"]],decls:13,vars:7,consts:[["id","addForm",3,"formGroup"],[3,"control","required","nullable"],["type","text","placeholder","Cena *",3,"control","errors"],["mcrai-button","negative",3,"click"],["mcrai-button","positive","form","addForm",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xfd limit pro dopravu zdarma"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"aegisx-select-currency",1)(7,"mcrai-input",2),t.k0s()(),t.j41(8,"mcrai-modal-actions")(9,"button",3),t.bIt("click",function(){return s.close()}),t.EFF(10,"Zav\u0159\xedt "),t.k0s(),t.j41(11,"button",4),t.bIt("click",function(){return s.createTransportPrice()}
1),t.EFF(12,"Vytvo\u0159it "),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(),t.Y8G("control",s.controls.currency)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",s.controls.price)("errors",s.ERRORS.price),t.R7$(4),t.Y8G("disabled",s.isAddButtonDisabled()))},dependencies:[c.qT,c.cb,c.j4,X.h,V.l,U.J,H.f,E.Q,j.N,ot.h]})}return r})();const ss=r=>[r,"price"];function ns(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"M\u011bna"),t.k0s())}function is(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&r){const e=n.$implicit;t.R7$(),t.SpI(" ",null==e?null:e.currency," ")}}function as(r,n){1&r&&(t.j41(0,"mcrai-th"),t.EFF(1,"\u010c\xe1stka"),t.k0s())}function cs(r,n){if(1&r&&(t.EFF(0),t.nI1(1,"currency")),2&r){const e=t.XpG().$implicit;t.SpI(" ",t.ii3(1,1,null==e?null:e.price,2,2,e.currency)," ")}}function ls(r,n){if(1&r&&t.nrm(0,"mcrai-input",10),2&r){const e=t.XpG().$implicit,o=t.XpG();t.Y8G("control",o.form.get(t.eq3(2,ss,e.id)))("errors",o.ERRORS.price)}}function ps(r,n){if(1&r&&(t.j41(0,"mcrai-td"),t.DNE(1,cs,2,6)(2,ls,1,4),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?2:1)}}function ms(r,n){1&r&&t.nrm(0,"mcrai-th")}function ds(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){t.eBV(e);const s=t.XpG().$implicit,p=t.XpG();return t.Njj(p.toggleFreeLimit(s))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function us(r,n){if(1&r&&(t.j41(0,"mcrai-td",11),t.DNE(1,ds,3,0,"button",12),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}function hs(r,n){1&r&&t.nrm(0,"mcrai-tr")}function fs(r,n){if(1&r&&t.nrm(0,"mcrai-tr"),2&r){const e=n.$implicit,o=t.XpG();t.AVh("mcrai-tr--highlight",o.isSelectedFreeLimit(e))}}function _s(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",16),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.patchTransportFreeLimits())}),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isPatchButtonDisabled())}}function Ts(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",17),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.addFreeLimit())}),t.EFF(1,"P\u0159idat limit "),t.k0s()}}function ys(r,n){if(1&r){const e=t.RV6();t.j41(0,"button",18),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.unselectFreeLimits())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",19),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.deleteDomain())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&r){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteFreeLimitsButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeleteFreeLimitsButtonDisabled())}}function Cs(r,n){if(1&r&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,_s,2,1,"button",14)(2,Ts,2,0,"button",15)(3,ys,4,2),t.k0s()),2&r){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?3:2)}}let vs=(()=>{class r{set transport(e){this._transport=e,this.updateForm(e.free_limits),this.hydrateForm(e.free_limits)}get transport(){return this._transport}get controls(){return this.form.controls}constructor(e,o,s,p){this.store=e,this.modalService=o,this.toolbarService=s,this.permissionService=p,this.columns=["currency","price","actions"],this.ERRORS={price:{required:"Cena mus\xed b\xfdt vypln\u011bna",pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.form=new c.gE({}),this.selectedFreeLimits=[]}ngOnInit(){}addFreeLimit(){const e=new l.m_("1200px","800px",{transport:this.transport});this.modalService.open(os,e)}updateForm(e){const o=Object.keys(this.form.value);this.freeLimitsDiff(e,o).forEach(u=>{const A=this.createFreeLimitForm(u);this.form.addControl(u.id,A)});const p=e.map(u=>u.id);o.filter(u=>!p.includes(u)).forEach(u=>this.form.removeControl(u))}freeLimitsDiff(e,o){return e.filter(s=>!o.includes(s.id))}createFreeLimitForm(e){return new c.gE({id:new c.MJ(e.id),currency:new c.MJ(e.currency,c.k0.required),price:new c.MJ(e.price,[c.k0.required,
1c.k0.pattern(G.Q6)])})}hydrateForm(e){e.forEach(o=>{const s=this.form.controls[o.id];s&&s.patchValue(o)})}isPatchButtonDisabled(){return this.form.invalid||this.form.pristine}patchTransportFreeLimits(){if(!this.isPatchButtonDisabled()){const e=[];Object.keys(this.form.controls).forEach(o=>{const s=this.form.controls[o];s.valid&&s.touched&&e.push(s.value)}),this.store.dispatch(new Zo({id:this._transport.id,free_limits:e})),this.form.markAsPristine()}}isSelectedFreeLimit(e){return!!e&&!!this.selectedFreeLimits.find(o=>o.id===e.id)}toggleFreeLimit(e){this.selectedFreeLimits=(0,O.g)(this.selectedFreeLimits,e)}unselectFreeLimits(){this.selectedFreeLimits=[]}isDeleteFreeLimitsButtonDisabled(){return!this.selectedFreeLimits.length}deleteDomain(){this.isDeleteFreeLimitsButtonDisabled()||(this.store.dispatch(new qo({id:this.transport.id,free_limits:this.selectedFreeLimits})),this.unselectFreeLimits())}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(l.mO),t.rXU(k.h),t.rXU(L.n))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-free-limits"]],inputs:{transport:"transport"},decls:18,vars:4,consts:[["color","secondary"],[3,"items"],["mcraiColumnDef","currency"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","price"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["type","text","placeholder","\u010c\xe1stka *",3,"control","errors"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"click"],["mcrai-button","positive",3,"disabled"],["mcrai-button","positive"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","positive",3,"click"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(o,s){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Limity pro dopravu zdarma"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"mcrai-table",1),t.qex(6,2),t.DNE(7,ns,2,0,"mcrai-th",3)(8,is,2,1,"mcrai-td",4),t.bVm(),t.qex(9,5),t.DNE(10,as,2,0,"mcrai-th",3)(11,ps,3,1,"mcrai-td",4),t.bVm(),t.qex(12,6),t.DNE(13,ms,1,0,"mcrai-th",3)(14,us,2,1,"mcrai-td",7),t.bVm(),t.DNE(15,hs,1,0,"mcrai-tr",8)(16,fs,1,2,"mcrai-tr",9),t.k0s()(),t.DNE(17,Cs,4,2,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.Y8G("items",s.transport.free_limits),t.R7$(10),t.Y8G("mcraiHeaderRowDef",s.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",s.columns),t.R7$(),t.vxM(17,s.permissionService.canWrite()?17:-1))},dependencies:[E.Q,Y.n,z.q,Q.B,J.K,W.D,Z.Q,K.V,q.e,tt.O,S.g,R.l,M.h,x.B,j.N,dt.R,ct.o]})}return r})();function gs(r,n){if(1&r&&(t.j41(0,"mcrai-dl")(1,"mcrai-dt"),t.EFF(2,"Po\u0159ad\xed"),t.k0s(),t.j41(3,"mcrai-dd"),t.EFF(4),t.nI1(5,"notSet"),t.k0s(),t.j41(6,"mcrai-dt"),t.EFF(7,"K\xf3d"),t.k0s(),t.j41(8,"mcrai-dd"),t.EFF(9),t.nI1(10,"notSet"),t.k0s(),t.j41(11,"mcrai-dt"),t.EFF(12,"Je osobn\xed odb\u011br"),t.k0s(),t.j41(13,"mcrai-dd"),t.EFF(14),t.nI1(15,"booleanToString"),t.k0s(),t.j41(16,"mcrai-dt"),t.EFF(17,"Prodejna pro osobn\xed odb\u011br"),t.k0s(),t.j41(18,"mcrai-dd"),t.EFF(19),t.nI1(20,"notSet"),t.k0s()()),2&r){const e=t.XpG(2);t.R7$(4),t.JRh(t.bMT(5,4,e.transport.order)),t.R7$(5),t.JRh(t.bMT(10,6,e.transport.code)),t.R7$(5),t.JRh(t.bMT(15,8,e.transport.is_personal_pickup)),t.R7$(5),t.JRh(t.bMT(20,10,null==e.transport.store?null:e.transport.store.name))}}function Ds(r,n){if(1&r&&(t.j41(0,"form",2),t.nrm(1,"mcrai-input",3)(2,"mcrai-input",4)(3,"br"),t.j41(4,"mcrai-input",5),t.EFF(5,"Je osobn\xed odb\u011br "),t.k0s(),t.nrm(6,"aegisx-select-store",6),t.k0s()),2&r){const e=t.XpG(2);t.Y8G("formGroup",e.form),t.R7$(),t.Y8G("control",e.controls.order)("errors",e.ERRORS.order),t.R7$(),t.Y8G("control",e.controls.code),t.R7$(2),t.Y8G("control",e.controls.is_personal_pickup)("value",!0),t.R7$(2),t.Y8G("control",e.controls.store)("stores",e.storesPersonalCol)("placeholder","Prodejna pro osobn\xed odb\u011br")}}function Es(r,n){if(1&r){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",7),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.patch())}),t.EFF(2,"Ulo\u017eit zm\u011bny "),t.k0s()()}if(2&r){const e=t.XpG(2);t.R7$(),t.Y8G("disabled",e.isPatchButtonDisabled())}}function bs(r,n){if(1&r&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel",1)(3,"mcrai-panel-header")(4,"h2"),t.EFF(5,"Z\xe1kladn\xed informace"),t.k0s()(),t.j41(6,"mcrai-panel-content"),t.DNE(7,gs,21,12,"mcrai-dl")(8,Ds,7,9,"form",2),t.k0s(),t.DNE(9,Es,3,1,"mcrai-panel-actions"),t.k0s()(),t.j41(10,"mcrai-col"),t.nrm(11,"aegisx-transport-info",0),t.k0s()()),2&r){const e=t.XpG();t.R7$(7),t.vxM(7,e.toolbarService.isEditMode()?-1:7),t.R7$(),t.vxM(8,e.toolbarService.isEditMode()?8:-1),t.R7$(),t.vxM(9,e.toolbarService.isEditMode()?9:-1),t.R7$(2),t.Y8G("transport",e.transport)}}let Fs=(()=>{class r{set transport(e){this._transport=e,this.form.patchValue({order:e.order,code:e.code,is_personal_pickup:e.is_personal_pickup,store:e.store?e.store.code:null})}get controls(){return this.form.controls}get transport(){return this._transport}constructor(e,o,s){this.builder=e,this.store=o,this.toolbarService=s,this.destroy=new F.B7,this.LET=gr.s.LET,this.ERRORS={order:{pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 cel\xe9 \u010d\xedslo"}},this.buildForm()}ngOnInit(){this.store.pipe((0,f.Lt)(Ft),(0,w.Q)(this.destroy),(0,$.p)(e=>!!e&&e.items.length>0)).subscribe(e=>this.storesPersonalCol=e),this.fetchStoresPersonalCol()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}fetchStoresPersonalCol(){this.store.dispatch(new Et)}buildForm(){this.form=this.builder.group({order:[null,c.k0.pattern(G.j8)],code:[null],is_personal_pickup:[null],store:[null]})}isPatchButtonDisabled(){return this.form.invalid||!this.form.dirty}patch(){this.isPatchButtonDisabled()||this.store.dispatch(new Cr({transport_id:this._transport.id,body:this.form.value}))}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(c.ze),t.rXU(f.il),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["aegisx-transport-detail"]],inputs:{transport:"transport"},decls:15,vars:6,consts:[[3,"transport"],["color","secondary"],[3,"formGroup"],["type","text","placeholder","Po\u0159ad\xed",3,"control","errors"],["type","text","placeholder","K\xf3d",3,"control"],["type","checkbox",3,"control","value"],[3,"control","stores","placeholder"],["mcrai-button","positive",3,"click","disabled"]],template:function(o,s){1&o&&(t.DNE(0,bs,12,4,"mcrai-row"),t.j41(1,"mcrai-row")(2,"mcrai-col"),t.nrm(3,"aegisx-transport-domains",0),t.k0s(),t.j41(4,"mcrai-col"),t.nrm(5,"aegisx-transport-prices",0),t.k0s()(),t.j41(6,"mcrai-row")(7,"mcrai-col"),t.nrm(8,"aegisx-transport-payments",0),t.k0s(),t.j41(9,"mcrai-col"),t.nrm(10,"aegisx-transport-free-limits",0),t.k0s()(),t.j41(11,"mcrai-row")(12,"mcrai-col"),t.nrm(13,"aegisx-transport-image",0),t.k0s(),t.nrm(14,"mcrai-col"),t.k0s()),2&o&&(t.vxM(0,s.transport?0:-1),t.R7$(3),t.Y8G("transport",s.transport),t.R7$(2),t.Y8G("transport",s.transport),t.R7$(3),t.Y8G("transport",s.transport),t.R7$(2),t.Y8G("transport",s.transport),t.R7$(3),t.Y8G("transport",s.transport))},dependencies:[c.qT,c.cb,c.j4,B.o,N.g,E.Q,S.g,R.l,M.h,x.B,j.N,Xt.u,lt.p,pt.L,mt.Z,Rt,Mr,Zr,ao,So,Wo,vs,Vt.Z,ne.s],styles:["mcrai-input[type=checkbox][_ngcontent-%COMP%]{margin-bottom:10px}"]})}return r})();const Ss=()=>
1["/aegisx/settings/transports"];function Rs(r,n){if(1&r&&t.nrm(0,"mcrai-media",1),2&r){const e=t.XpG(2);t.Y8G("data",null==e.transport||null==e.transport.icon?null:e.transport.icon.thumbnail)("mcraiImageDetail",null==e.transport||null==e.transport.icon?null:e.transport.icon.original)}}function xs(r,n){if(1&r&&(t.j41(0,"mcrai-panel")(1,"mcrai-panel-header"),t.DNE(2,Rs,1,2,"mcrai-media",1),t.j41(3,"h1"),t.EFF(4),t.k0s()(),t.j41(5,"mcrai-panel-content"),t.nrm(6,"aegisx-transport-detail",2),t.k0s()()),2&r){const e=t.XpG();t.R7$(2),t.vxM(2,e.transport.icon?2:-1),t.R7$(2),t.JRh(e.transport.info[0].name),t.R7$(2),t.Y8G("transport",e.transport)}}const js=[{path:"",component:Tr,canActivate:[Lt.J]},{path:":transport_id",component:(()=>{class r{constructor(e,o,s){this.store=e,this.activatedRoute=o,this.toolbarService=s,this.destroy=new F.B7,o.params.subscribe(p=>{this.id=p.transport_id,this.getTransport(this.id)})}ngOnInit(){this.setToolbarModes(),this.selectTransport()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([I.H.View,I.H.Edit,I.H.Delete])}getTransport(e){this.store.dispatch(new D.em({id:e}))}selectTransport(){this.store.pipe((0,f.Lt)(yr.sk),(0,w.Q)(this.destroy),(0,_.T)(e=>e.get(this.id)),(0,$.p)(e=>!!e)).subscribe(e=>this.transport=e)}static#t=this.\u0275fac=function(o){return new(o||r)(t.rXU(f.il),t.rXU(P.nX),t.rXU(k.h))};static#e=this.\u0275cmp=t.VBU({type:r,selectors:[["app-detail"]],decls:10,vars:3,consts:[["mcrai-button","neutral",3,"routerLink"],["type","image","width","auto","height","40",1,"header--image",3,"data","mcraiImageDetail"],[3,"transport"]],template:function(o,s){1&o&&(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,xs,7,3,"mcrai-panel"),t.k0s()()(),t.nrm(9,"aegisx-toolbar")),2&o&&(t.R7$(4),t.Y8G("routerLink",t.lJ4(2,Ss)),t.R7$(4),t.vxM(8,s.transport?8:-1))},dependencies:[P.Wk,It.I,$t.I,B.o,N.g,Nt.H,E.Q,S.g,R.l,x.B,at.h,At.U,Fs],styles:[".header--image[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;max-width:100px;margin-right:10px}"]})}return r})(),canActivate:[Lt.J]}];let Ms=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[P.iI.forChild(js),P.iI]})}return r})();var Gs=a(93578),i=a(41635),Ps=a(80954),T=a(14421),m=a(15539),ws=a(57421),ye=a(18456),y=a(83921),C=a(34900),v=a(76613);let Is=(()=>{class r extends C.Q{constructor(){super(...arguments),this.getTransports=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(jt),(0,m.M)(()=>this.loaderService.show()),(0,ws.E)(this.store.select(Ue)),(0,ye.ZZ)(([e,o])=>this.dataService.getTransports(e.payload.page,o.get(e.payload.id)).pipe((0,_.T)(s=>new nt({id:e.payload.id,items:s})),(0,y.W)(s=>(0,T.of)(new v.Rn(s))))))),this.getTransportsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(st),(0,m.M)(()=>{this.loaderService.hide()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),ut=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,Ps.I,f.md.forFeature(it,Xe),i.Vm.forFeature([Is])]})}return r})();var g=a(24182),$s=a(91316),Ns=a(291),d=a(49090);let Ls=(()=>{class r extends C.Q{constructor(){super(...arguments),this.createTransport=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Ct),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.createTransport(e.payload.body).pipe((0,_.T)(o=>new be(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.createTransportSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(vt),(0,m.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,d.n)(e=>[new nt({id:"",items:e.payload})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),As=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});
1static#r=this.\u0275inj=t.G2t({imports:[h.MD,ut,i.Vm.forFeature([Ls])]})}return r})(),Os=(()=>{class r extends C.Q{constructor(){super(...arguments),this.patchTransport=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Ot),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.patchTransport(e.payload.transport_id,e.payload.body).pipe((0,_.T)(o=>new vr(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.patchTransportSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Bt),(0,m.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Bs=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([Os])]})}return r})(),Xs=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransports=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Gt),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.deleteTransports(e.payload.items).pipe((0,_.T)(o=>new Oe({id:e.payload.id,items:o})),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.deleteTransportsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Pt),(0,m.M)(e=>{this.toastService.makeToast(e.payload.items.message,l.Ck.Success)}),(0,d.n)(e=>[new nt({id:e.payload.id,items:e.payload.items})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Vs=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,ut,i.Vm.forFeature([Xs])]})}return r})();var Us=a(50289);let Hs=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,l.DJ,l.wl]})}return r})();var Ys=a(12906);let zs=(()=>{class r extends Ys.d{getPersonalCollectionStores(){const e=this.buildUrl(["stores","personal_collection"]);return this.get(e)}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),Qs=(()=>{class r{constructor(e,o,s,p,b,u){this.dataService=e,this.actions=o,this.store=s,this.router=p,this.toastService=b,this.loaderService=u}static#t=this.\u0275fac=function(o){return new(o||r)(t.KVO(zs),t.KVO(i.En),t.KVO(f.il),t.KVO(P.Ix),t.KVO(l.FS),t.KVO(l.wA))};static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Js=(()=>{class r extends Qs{constructor(){super(...arguments),this.getStoresPersonalCol=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(gt),(0,m.M)(()=>this.loaderService.show()),(0,ye.ZZ)(()=>this.dataService.getPersonalCollectionStores().pipe((0,_.T)(e=>new Fe(e)),(0,y.W)(e=>(0,T.of)(new Se(e))))))),this.getStoresPersonalColSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(rt),(0,m.M)(()=>this.loaderService.hide())),{dispatch:!1}),this.getStoresPersonalColError=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Dt),(0,m.M)(()=>this.loaderService.hide())),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Ws=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,Hs,f.md.forFeature(bt,xe),i.Vm.forFeature([Js])]})}return r})(),Zs=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,c.X1,l.ni]})}return r})();var Ks=a(84624);let qs=(()=>{class r extends C.Q{constructor(){super(...arguments),this.setTransportPayments=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(et.F6),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.patchTransportPayments(e.payload.id,e.payload.payments).pipe((0,_.T)(o=>new et.E8(o)),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.setTransportPaymentsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(et.vx),(0,m.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),tn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature
1([qs])]})}return r})();var en=a(26556);let rn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.addTransportDomains=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Yt),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.addTransportDomains(e.payload.id,e.payload.body).pipe((0,_.T)(o=>new Ir(o)),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.addTransportDomainsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(zt),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),on=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([rn])]})}return r})(),sn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransportDomains=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Ut),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>{const o=e.payload;return this.dataService.deleteTransportDomains(o.id,o.domains).pipe((0,_.T)(s=>new Pr(s)),(0,y.W)(s=>(0,T.of)(new v.Rn(s))))}))),this.deleteTransportDomainsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Ht),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),nn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([sn])]})}return r})(),an=(()=>{class r extends C.Q{constructor(){super(...arguments),this.patchTransportInfos=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Kt),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.patchTransportInfos(e.payload.transport.id,e.payload.infos).pipe((0,_.T)(o=>new lo(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.patchTransportInfosSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(qt),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),cn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([an])]})}return r})(),ln=(()=>{class r extends C.Q{constructor(){super(...arguments),this.addTransportInfo=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(te),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.postTransportInfo(e.payload.id,e.payload.info).pipe((0,_.T)(o=>new mo(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.addTransportInfoSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(ee),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),pn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([ln])]})}return r})();var mn=a(55951);let dn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransportInfo=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(re),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.deleteTransportInfo(e.payload.transport.id,e.payload.language_code).pipe((0,_.T)(o=>new fo(o)),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.deleteTransportInfoSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(oe),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),un=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature
1([dn])]})}return r})();var hn=a(12741);let fn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.addTransportPrice=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(ce),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.postTransportPrice(e.payload.id,e.payload.price).pipe((0,_.T)(o=>new jo(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.addTransportInfoSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(le),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),_n=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([fn])]})}return r})(),Tn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.patchTransportPrices=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(pe),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.patchTransportPrices(e.payload.id,e.payload.prices).pipe((0,_.T)(o=>new Po(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.patchTransportPricesSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(me),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),yn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([Tn])]})}return r})(),Cn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransportPrices=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(ie),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>{const o=e.payload;return this.dataService.deleteTransportPrices(o.id,o.prices).pipe((0,_.T)(s=>new xo(s)),(0,y.W)(s=>(0,T.of)(new v.Rn(s))))}))),this.deleteTransportPricesSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(ae),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),vn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([Cn])]})}return r})();var gn=a(79194);let Dn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.uploadTransportImage=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Qt),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.uploadTransportImage(e.payload.transport_id,e.payload.image).pipe((0,_.T)(o=>new qr(o)),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.uploadTransportImageSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Jt),(0,m.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),En=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([Dn])]})}return r})(),bn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransportImage=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Wt),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.deleteTransportImage(e.payload.transport_id).pipe((0,_.T)(o=>new eo(o)),(0,y.W)(o=>(0,T.of)(new v.Rn(o))))))),this.deleteTransportImageSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Zt),(0,m.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Fn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature
1([bn])]})}return r})(),Sn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.addTransportFreeLimit=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(_e),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.postTransportFreeLimit(e.payload.id,e.payload.free_limit).pipe((0,_.T)(o=>new rs(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.addTransportInfoSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(Te),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Rn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([Sn])]})}return r})(),xn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.patchTransportFreeLimits=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(de),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>this.dataService.patchTransportFreeLimits(e.payload.id,e.payload.free_limits).pipe((0,_.T)(o=>new Ko(o)),(0,y.W)(o=>(0,T.of)(new v.uD(o))))))),this.patchTransportFreeLimitsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(ue),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),kn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([xn])]})}return r})(),jn=(()=>{class r extends C.Q{constructor(){super(...arguments),this.deleteTransportFreeLimits=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(he),(0,m.M)(()=>this.loaderService.show()),(0,d.n)(e=>{const o=e.payload;return this.dataService.deleteTransportFreeLimits(o.id,o.free_limits).pipe((0,_.T)(s=>new ts(s)),(0,y.W)(s=>(0,T.of)(new v.Rn(s))))}))),this.deleteTransportFreeLimitsSuccess=(0,i.EH)(()=>this.actions.pipe((0,i.gp)(fe),(0,m.M)(e=>this.toastService.makeToast(e.payload.message,l.Ck.Success)),(0,d.n)(e=>[new D.hb({id:e.payload.item.id,item:e.payload.item})])))}static#t=this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(r)))(s||r)}})();static#e=this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}return r})(),Mn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,g.W,i.Vm.forFeature([jn])]})}return r})(),Gn=(()=>{class r{static#t=this.\u0275fac=function(o){return new(o||r)};static#e=this.\u0275mod=t.$C({type:r});static#r=this.\u0275inj=t.G2t({imports:[h.MD,Ms,f.md.forFeature(yt,ge),Gs.m,Ns.G,$s.U,c.X1,ut,g.W,As,Bs,Vs,l.LU,l.oP,l.xT,l.Zg,l.pj,l.B4,l.SD,l.F8,l.Tm,l.hv,Us.G,Ws,Zs,Ks.s,tn,en.K,on,nn,mn.R,pn,cn,un,hn.Y,_n,yn,vn,gn.w,En,Fn,Rn,kn,Mn]})}return r})()}}]);

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.