PageSourceSearch

https://www.energytcm.cz/2051.7548322a51ea378a.js

js energytcm.cz collected 2026-10-07 20:05:42 UTC 12,737 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkenergy_tcm=self.webpackChunkenergy_tcm||[]).push([[2051],{32051:(zt,E,r)=>{r.r(E),r.d(E,{SearchModule:()=>Wt});var T=r(60177),l=r(76965),h=r(41635),f=r(63040),O=r(45286),d=r(7605),y=r(58728),m=r(95006),V=r(20522),D=r(19493),H=r(31113);const F="[Search] SEARCH products",C="[Search] SEARCH products success",x="[Search] SEARCH products error",G="[Search] GET filter",I="[Search] GET filter success",M="[Search] GET filter error",U="[Search] GET param values success";class b{constructor(a){this.payload=a,this.type=F}}class P{constructor(a){this.payload=a,this.type=C}}class ${constructor(a){this.payload=a,this.type=x}}class j{constructor(a){this.payload=a,this.type=G}}class N{constructor(a){this.payload=a,this.type=I}}class B{constructor(a){this.payload=a,this.type=M}}class W{constructor(a){this.payload=a,this.type=U}}class Y{constructor(a){this.payload=a,this.type="[Search] GET param values error"}}const Q={filter:null,products:null,activeParam:null};function K(s=Q,a){switch(a.type){case I:const e=a.payload.filter?a.payload.filter.params[0]:null;return{...s,filter:a.payload.filter,activeParam:e};case C:return{...s,products:a.payload};case U:return{...s,activeParam:a.payload};default:return s}}const R=(0,l.UX)("shopSearch"),J=(0,l.Mz)(R,s=>s.products),Z=(0,l.Mz)(R,s=>s.filter),w=(0,l.Mz)(R,s=>s.activeParam);var q=r(85483),k=r(57736),_=r(39902),tt=r(79341),et=r(88354),t=r(54438),L=r(345),st=r(73524),rt=r(13007),ot=r(22474),at=r(82318),it=r(22193),nt=r(61136),ct=r(32350),lt=r(48033),ht=r(82372),pt=r(11856),ut=r(65388),dt=r(73955);const mt=s=>({query:s});function ft(s,a){1&s&&t.nrm(0,"shop-header")}function gt(s,a){1&s&&(t.nrm(0,"mcrai-breadcrumbs",1),t.nI1(1,"translate")),2&s&&t.Y8G("current",t.bMT(1,1,"search.searching"))}function vt(s,a){if(1&s){const e=t.RV6();t.j41(0,"shop-filter",12),t.nI1(1,"async"),t.bIt("refresh",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n.onActiveTabChange(i))})("apply",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n.fetchProducts(1,0,!0,i.currentFilter))}),t.k0s()}if(2&s){const e=t.XpG(2);t.Y8G("activeParam",t.bMT(1,3,e.activeParam))("filter",e.filter)("fetchFull",!0)}}function yt(s,a){if(1&s&&(t.j41(0,"div")(1,"strong"),t.EFF(2),t.k0s(),t.EFF(3),t.nI1(4,"translate"),t.j41(5,"strong"),t.EFF(6),t.k0s()()),2&s){const e=t.XpG(2);t.R7$(2),t.JRh(null==e.products||null==e.products.paginator?null:e.products.paginator.count),t.R7$(),t.SpI(" ",t.bMT(4,3,"search.results")," "),t.R7$(3),t.JRh(e.query)}}function Ct(s,a){if(1&s){const e=t.RV6();t.j41(0,"shop-filter",13),t.nI1(1,"async"),t.bIt("refresh",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n.onActiveTabChange(i))})("apply",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n.fetchProducts(1,0,!0,i.currentFilter))}),t.k0s()}if(2&s){const e=t.XpG(2);t.Y8G("activeParam",t.bMT(1,5,e.activeParam))("filter",e.filter)("isFilterInPanel",!0)("fetchFull",!0)("loadData",!1)}}function Pt(s,a){if(1&s){const e=t.RV6();t.j41(0,"shop-product-list",14),t.nI1(1,"async"),t.bIt("pageChange",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n.changeProductsPage(i))}),t.k0s()}if(2&s){const e=t.XpG(2);t.Y8G("products",e.products)("productsInComparator",e.productsInComparator)("productsInWishlist",null==e.activeWishlist?null:e.activeWishlist.items)("variables",t.bMT(1,5,e.variables))("layout",e.productLayout)}}function Rt(s,a){1&s&&(t.j41(0,"div",10),t.nrm(1,"mcrai-loader"),t.k0s())}function St(s,a){if(1&s&&(t.nrm(0,"h1",11),t.nI1(1,"translate")),2&s){const e=t.XpG(2);t.Y8G("innerHTML",t.i5U(1,1,"search.no_results",t.eq3(4,mt,e.query)),t.npT)}}function Et(s,a){if(1&s&&(t.j41(0,"div",2)(1,"aside",3),t.nrm(2,"shop-categories-nav",4),t.DNE(3,vt,2,5,"shop-filter",5),t.k0s(),t.j41(4,"div",6),t.nrm(5,"shop-banner",7),t.DNE(6,yt,7,5,"div")(7,Ct,2,7,"shop-filter",8)(8,Pt,2,7,"shop-product-list",9)(9,Rt,2,0,"div",10)(10,St,2,6,"h1",11),t.k0s()()),2&s){const e=t.XpG();t.R7$(2),t.AVh("side-nav-opened",!0),t.R7$(),t.vxM(3,e.showFilter()&&e.hasFilter()?3:-1),t.R7$(2),t.Y8G("category",e.category)("groupID","hlavni"),t.R7$(),t.vxM(6,null!=e.products&&null!=e.products.paginator&&e.products.paginator.count&&e.query?6:-1),t.R7$(),t.vxM(7,e.showFilter()&&e.hasFilter()?7:-1),t.R7$(),t.vxM(8,!e.productsLoading&&e.hasProducts()?8:-1),t.R7$(),t.vxM(9,e.productsLoading?9:-1),t.R7$(),t.vxM(10,e.hasProducts()?-1:10)}}function Tt(s,a){1&s&&t.nrm(0,"shop-footer")}const Ft=[{path:"",component:(()=>{class s{constructor(e,o,i,n,c,p,Yt,Qt){this.store=e,this.activatedRoute=o,this.titleService=i,this.metaService=n,this.userChangeService=c,this.fbqService=p,this.router=Yt,this.mobileAp
1p=Qt,this.destroy=new O.B7,this.SEARCH_CATEGORY_ID="search",this.productLayout=0,this.productsLoading=!1,this.productsPage=1,this.acceptApplyFromFilter=!1,this.newUrlParams=null}ngOnInit(){this.activatedRoute.queryParams.pipe((0,d.Q)(this.destroy),(0,y.p)(e=>e.hasOwnProperty("q")),(0,m.T)(e=>e.q),(0,V.F)()).subscribe(e=>{this.filter=null,this.acceptApplyFromFilter=!1,this.query=e,this.saveSearchHistory(e),this.fetchFilter(),this.fetchProducts()}),this.store.pipe((0,l.Lt)(H.N2),(0,m.T)(e=>e.get(this.SEARCH_CATEGORY_ID)),(0,y.p)(e=>!!e),(0,D.s)(1)).subscribe(e=>{this.category=e,this.productLayout=e.products_layout,this.updateSEO(this.category.info[0])}),this.store.pipe((0,l.Lt)(J),(0,d.Q)(this.destroy),(0,y.p)(e=>!!e)).subscribe(e=>{this.products=e,this.productsLoading=!1,this.newUrlParams&&(this.upsertQueryParams(this.getNewQueryParams(this.newUrlParams)),this.newUrlParams=null)}),this.store.pipe((0,l.Lt)(q.lq),(0,d.Q)(this.destroy)).subscribe(e=>{this.productsInComparator=e}),this.store.pipe((0,l.Lt)(Z),(0,d.Q)(this.destroy)).subscribe(e=>this.filter=e),this.store.pipe((0,l.Lt)(k.A9),(0,d.Q)(this.destroy)).subscribe(e=>{this.activeWishlist=e}),this.fetchCategory(),this.variables=this.store.pipe((0,l.Lt)(tt.Ys)),this.activeParam=this.store.pipe((0,l.Lt)(w)),this.userChangeService.addCallback("search",()=>{this.fetchProducts(this.productsPage,this.productLayout)}),this.fbqService.track("Search")}ngOnDestroy(){this.userChangeService.removeCallback("search"),this.destroy.next(),this.destroy.complete()}fetchCategory(){this.store.dispatch(new _.zS({id:this.SEARCH_CATEGORY_ID}))}upsertQueryParams(e={}){this.router.navigate([],{queryParams:e,relativeTo:this.activatedRoute})}getNewQueryParams(e={}){const o=Object.assign({q:this.query},e);return this.productsPage>1?o.page=this.productsPage:delete o.page,o}fetchProducts(e=1,o=0,i=!1,n=this.activatedRoute.snapshot.queryParams){!this.prevFilter&&n.hasOwnProperty("page")&&(e=n.page),(n!==this.prevFilter&&!i||i&&this.acceptApplyFromFilter)&&(this.newUrlParams=n,this.productsPage=e,this.productsLoading=!0,this.store.dispatch(new b({q:this.query,page:e,filter:this.getFilterParams(n)}))),i&&(this.acceptApplyFromFilter=!0),this.prevFilter=n}fetchFilter(){this.store.dispatch(new j({q:this.query,filter:this.getFilterParams(this.activatedRoute.snapshot.queryParams)}))}onLayoutChange(e){this.productLayout=e,this.fetchProducts(1,e)}hasFilter(){return!!this.filter}showFilter(){return this.category.enable_filter}onActiveTabChange(e){e.currentActiveParam&&this.store.dispatch(new j({q:this.query,filter:e.currentFilter}))}updateSEO(e){e&&(e.seo_title&&this.titleService.setTitle(e.seo_title),e.seo_description&&this.metaService.updateTag({name:"description",content:e.seo_description}))}changeProductsPage(e){this.productsPage=e,this.fetchProducts(e,this.productLayout,!0)}saveSearchHistory(e){this.store.dispatch(new et.Hp({search:e}))}hasProducts(){return this.products&&this.products.paginator.count&&this.products.paginator.count>0}getFilterParams(e){return Object.keys(e).filter(o=>-1===["q","page"].indexOf(o)).reduce((o,i)=>(o[i]=e[i],o),{})}static#t=this.\u0275fac=function(o){return new(o||s)(t.rXU(l.il),t.rXU(f.nX),t.rXU(L.hE),t.rXU(L.W8),t.rXU(st.p),t.rXU(rt.F),t.rXU(f.Ix),t.rXU("MOBILE_APP"))};static#e=this.\u0275cmp=t.VBU({type:s,selectors:[["shop-search"]],decls:6,vars:4,consts:[["centering-container",""],[3,"current"],["flex","","centering-container",""],["visible-block-m","","hidden","",1,"aside"],[1,"categories-nav"],["visible-block-m","","hidden","",3,"activeParam","filter","fetchFull"],[1,"page-content"],[3,"category","groupID"],[3,"activeParam","filter","isFilterInPanel","fetchFull","loadData"],[3,"products","productsInComparator","productsInWishlist","variables","layout"],["flex","","center-xy","",1,"pt32","pb32"],[1,"products-not-found",3,"innerHTML"],["visible-block-m","","hidden","",3,"refresh","apply","activeParam","filter","fetchFull"],[3,"refresh","apply","activeParam","filter","isFilterInPanel","fetchFull","loadData"],[3,"pageChange","products","productsInComparator","productsInWishlist","variables","layout"]],template:function(o,i){1&o&&(t.DNE(0,ft,1,0,"shop-header"),t.j41(1,"shop-content")(2,"div",0),t.DNE(3,gt,2,3,"mcrai-breadcrumbs",1),t.k0s(),t.DNE(4,Et,11,10,"div",2),t.k0s(),t.DNE(5,Tt,1,0,"shop-footer")),2&o&&(t.vxM(0,i.mobileAp
1p?-1:0),t.R7$(3),t.vxM(3,i.mobileApp?-1:3),t.R7$(),t.vxM(4,i.category?4:-1),t.R7$(),t.vxM(5,i.mobileApp?-1:5))},dependencies:[ot.I,at.I,it.B,nt.Z,ct.V,lt.m,ht.t,pt.i,ut.K,T.Jj,dt.D9],styles:[".aside[_ngcontent-%COMP%]{position:relative;margin-top:39px;margin-right:16px;width:100%;min-width:314px;max-width:314px}.page-content[_ngcontent-%COMP%]{flex-grow:1;margin-top:39px;min-height:240px}@media (max-width: 839px){.page-content[_ngcontent-%COMP%]{width:100%!important}}@media (max-width: 767px){.page-content[_ngcontent-%COMP%]{margin-top:16px}}[_nghost-%COMP%]     .mcrai-loader__bounce{background-color:#a1135e}.products-not-found[_ngcontent-%COMP%]{padding:0 32px 40px;font-size:22px;font-weight:300}"]})}return s})()}];let xt=(()=>{class s{static#t=this.\u0275fac=function(o){return new(o||s)};static#e=this.\u0275mod=t.$C({type:s});static#s=this.\u0275inj=t.G2t({imports:[f.iI.forChild(Ft),f.iI]})}return s})();var Gt=r(50289),It=r(70842),Mt=r(68339),At=r(94831),u=r(29262),g=r(14421),v=r(49090),S=r(83921),Ut=r(15539),jt=r(41523),Lt=r(12906);let Ot=(()=>{class s extends Lt.d{searchProducts(e,o,i){const n=this.buildUrl(["shop","search"],{page:e,q:o,...i});return this.get(n)}getFilter(e,o){const i=this.buildUrl(["shop","search","filter"],{q:e,...this.objProc.deleteEmptyKeys(o)});return this.get(i)}getParamValues(e,o,i){const c=this.buildUrl(["shop","search","filter",o],{q:e,...this.objProc.deleteEmptyKeys(i)});return this.get(c)}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(s)))(i||s)}})();static#e=this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Vt=(()=>{class s{constructor(e,o,i,n){this.store=e,this.actions=o,this.searchService=i,this.toastService=n,this.hitman2=void 0,this.searchProducts=(0,h.EH)(()=>this.actions.pipe((0,h.gp)(F),(0,v.n)(c=>(this.hitman2||(this.hitman2=setTimeout(()=>{this.hitman2=void 0,this.store.dispatch(new jt.IL({log_msg:"search page",filter:{query:{filter:{$text:{$search:null}}}}})),this.store.dispatch(new P({paginator:{page:0,ipp:0,page_count:0,count:0},items:[]}))},3e4)),this.searchService.searchProducts(c.payload.page,c.payload.q,c.payload.filter).pipe((0,m.T)(p=>(clearTimeout(this.hitman2),this.hitman2=void 0,new P(p))),(0,S.W)(p=>(clearTimeout(this.hitman2),this.hitman2=void 0,(0,g.of)(new $(p))))))))),this.searchProductsSuccess=(0,h.EH)(()=>this.actions.pipe((0,h.gp)(C)),{dispatch:!1}),this.searchProductsError=(0,h.EH)(()=>this.actions.pipe((0,h.gp)(x),(0,Ut.M)(c=>{this.toastService.makeToast(c.payload.error.message,u.Ck.Error,1e4)}),(0,v.n)(()=>(0,g.of)(new P({paginator:{page:0,ipp:0,page_count:0,count:0},items:[]}))))),this.getFilter=(0,h.EH)(()=>this.actions.pipe((0,h.gp)(G),(0,v.n)(c=>this.searchService.getFilter(c.payload.q,c.payload.filter).pipe((0,m.T)(p=>new N(p)),(0,S.W)(p=>(0,g.of)(new B(p))))))),this.getFilterError=(0,h.EH)(()=>this.actions.pipe((0,h.gp)(M)),{dispatch:!1}),this.getParamValues=(0,h.EH)(()=>this.actions.pipe((0,h.gp)("[Search] GET param values"),(0,v.n)(c=>this.searchService.getParamValues(c.payload.q,c.payload.param_name,c.payload.filter).pipe((0,m.T)(p=>new W(p.filter.params[0])),(0,S.W)(p=>(0,g.of)(new Y(p)))))))}static#t=this.\u0275fac=function(o){return new(o||s)(t.KVO(l.il),t.KVO(h.En),t.KVO(Ot),t.KVO(u.FS))};static#e=this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac})}return s})();var Dt=r(6560),Ht=r(46271),Xt=r(68098),bt=r(86464),$t=r(9990),Nt=r(93444),Bt=r(27403);let Wt=(()=>{class s{static#t=this.\u0275fac=function(o){return new(o||s)};static#e=this.\u0275mod=t.$C({type:s});static#s=this.\u0275inj=t.G2t({imports:[T.MD,xt,Gt.G,It.G,Mt.k,At.f,u.LU,u.wl,u.DJ,bt.X,Ht.z,Dt.j,Xt.j,u.Tm,l.md.forFeature("shopSearch",K),h.Vm.forFeature([Vt]),$t.H,Nt.M,Bt.z]})}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.