PageSourceSearch

https://www.karmanow.com/static/js/GlobalSearchResultsPage.ff103f1b.chunk.js

js karmanow.com collected 2026-10-01 14:08:12 UTC 10,942 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend_v3=self.webpackChunkfrontend_v3||[]).push([[8699],{97939:function(e,i,t){var n=t(1413),r=t(45987),a=t(6431),l=t(50221),o=t(2538),s=t(841),d=t(92766),u=t(29343),c=["children","fetchMore","isFetching","left","buttonProps"],h=function(e){var i=e.children,t=e.fetchMore,h=e.isFetching,p=e.left,f=e.buttonProps,v=(0,r.Z)(e,c),g=(0,a.$)().t,x=s.Z.useContextDataAttrs(),Z=(0,n.Z)({type:"primary",size:"medium",fullWidth:!1,loading:h},f);return(0,u.jsxs)(o.Kq,(0,n.Z)((0,n.Z)({spacing:38,direction:"column"},v),{},{children:[i,p&&(0,u.jsx)(l.Z,(0,n.Z)((0,n.Z)((0,n.Z)({onClick:function(){h||t()}},x),{},{"data-alooma-element":d.D8.VIEW_MORE},Z),{},{children:g("app:viewMore")}))]}))};h.defaultProps={buttonProps:{}},i.Z=h},20482:function(e,i,t){t.r(i),t.d(i,{default:function(){return me}});var n=t(28381),r=t(29445),a=t(57145),l=t(65239),o=t(72524),s=t(69877),d=t(26285),u=t(48253),c=t(7855),h=t(74165),p=t(15861),f=t(70885),v=t(74394),g=t(45986),x=t(33448),Z=function(e){var i=(0,n.useState)(void 0),t=(0,f.Z)(i,2),a=t[0],l=t[1],o=(0,n.useContext)(v.Y),u=(0,r.v9)(g.Zl),c=(0,d.Z)(x.EB),Z=(0,d.Z)(s.kY);return(0,n.useEffect)((function(){u||c()}),[u]),(0,n.useEffect)((function(){var i=function(){var i=(0,p.Z)((0,h.Z)().mark((function i(){var t;return(0,h.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!o.isConfigured||!u){i.next=9;break}return i.next=3,o.getRetailersOrderedByDistanceToQuery(e);case 3:if(i.t0=i.sent,i.t0){i.next=6;break}i.t0=[];case 6:null!==(t=i.t0)&&void 0!==t&&t.length&&Z(e),l(t);case 9:case"end":return i.stop()}}),i)})));return function(){return i.apply(this,arguments)}}();i()}),[e,u,o]),{retailers:a,isLoaded:void 0!==a&&o.isConfigured}},m=t(63583),j=t(10234),S=function(){var e=(0,r.v9)(m.t9),i=(0,d.Z)(j.gv);(0,n.useEffect)((function(){e||i()}),[])},C=t(75509),P=t(44498),b=t(4942),E=t(6431),y=t(2538),w=t(63089),_=t(97939),T=t(29343),R=function(e){var i=e.children,t=e.group,r=e.fetchParams,a=t.isFetching,l=t.tagsLeft,o=(0,d.Z)(s.iQ),u=(0,n.useCallback)((function(){o(r)}),[o,r]);return(0,T.jsx)(_.Z,{fetchMore:u,isFetching:a,left:l,fullWidth:!0,buttonProps:{size:"small"},children:i})},L=t(841),k=t(17889),A=t(24907),I=t(40908),M=t(13781),N=t(52403),O=t(20154),W=t(90818),z=W.ZP.div.withConfig({displayName:"Wrapper"})(["width:100%;height:100%;display:grid;position:relative;"]),H=W.ZP.div.withConfig({displayName:"SaveButtonContainer"})(["position:absolute;z-index:1000;top:12px;right:12px;"]),F=function(e){var i=e.tag;return(0,T.jsxs)(z,{children:[(0,T.jsx)(H,{children:(0,T.jsx)(N.Z,{tag:i,buttonStyled:!1})}),(0,T.jsx)(O.Z,{group:M.NH,tag:i,isObjectFitContain:14699===(null===i||void 0===i?void 0:i.rule_id)})]})},V=t(70558),q=t(4194),D=function(e){var i=e.myItems,t=(0,I.S)(),a=(0,r.v9)(o._U),l=(0,A.Z)(i,t,a.tagsLeft),s=l.items,d=l.slidesPerView,u=(0,n.useCallback)((function(){var e=2*d;if(s.length>e){var i=s.slice(0,e),t=s.slice(e,s.length);return(0,T.jsxs)(T.Fragment,{children:[i.map((function(e){return(0,T.jsx)(L.Z.TagIdContext.Provider,{value:e.id,children:(0,T.jsx)(L.Z.RuleIdContext.Provider,{value:e.rule_id,children:(0,T.jsx)(F,{tag:e})})},e.id)})),(0,T.jsx)(q.Z,{page:"search"}),t.map((function(e){return(0,T.jsx)(L.Z.TagIdContext.Provider,{value:e.id,children:(0,T.jsx)(L.Z.RuleIdContext.Provider,{value:e.rule_id,children:(0,T.jsx)(F,{tag:e})})},e.id)}))]})}return s.map((function(e){return(0,T.jsx)(L.Z.TagIdContext.Provider,{value:e.id,children:(0,T.jsx)(L.Z.RuleIdContext.Provider,{value:e.rule_id,children:(0,T.jsx)(F,{tag:e})})},e.id)}))}),[s,d]);if(null===s||void 0===s||!s.length)return null;var c={page:a.page+1,includeGlobal:!0,includeUser:!1,per_page:k.iB};return(0,T.jsx)(R,{group:a,fetchParams:c,children:(0,T.jsx)(V.Z,{columns:d,children:u()})})},K=t(53158),U=t(54614),B=t(79),G=function(){var e=(0,U.o)(),i=(0,r.v9)(o.Lo),t=i.tags,a=i.page,l=i.tagsLeft,u=(0,n.useRef)({page:a,tagsLeft:l}),c=(0,d.Z)(s.iQ),h=(0,n.useCallback)((function(){u.current.tagsLeft&&c({includeGlobal:!1,includeUser:!0,page:u.current.page+1})}),[c]),p=(0,n.useMemo)((function(){return{breakpoints:e,on:{reachEnd:h}}}),[e,h]);return(0,n.useEffect)((function(){u.current={page:a,tagsLeft:l}}),[a,l]),(0,T.jsx)(B.Z,{v2:!0,sliderSettings:p,children:t.map((function(e){return(0,T.jsx)("div",{children:(0,T.jsx)(L.Z.TagIdContext.Provider,{value:e.id,children:(0,T.jsx)(L.Z.RuleIdContext.Provider,{value:e.rule_id,children:(0,T.jsx)(K.Z,{group:M.gR,tag:e})})})},e.id)}))})},$=t(92766),Y=t(90570),Q=t(1413),X=t(85701),J=t(51308),ee=t(96290),ie=(0,W.ZP)(y.Kq).withConfig({displayName:"HoverContainer"})(["visibility:hidden;z-index:-1;position:absolute;width:100%;height:100%;background:",";padding:8px;& > *{min-width:92px;padding-right:10px;padding-left:10px;}"],(0,ee.L)("neutral5")),te=W.ZP.div.withConfig({displayName:"Wrapper"})(["display:flex;width:100%;overflow:hidden;border-radius:10px;position:relative;background:",";",";&:hover{","{visibility:visible;z-index:10;}}"],(0,ee.L)("neutral5"),(function(e){var i=e.$height;return i&&(0,W.iv)(["height:","px;"],i)}
1),ie),ne=(0,W.ZP)(y.Kq).withConfig({displayName:"CardContent"})(["padding:0 8px;"]),re=(0,W.ZP)(y.ZT).withConfig({displayName:"Name"})(["-webkit-line-clamp:",";display:",";-webkit-box-orient:vertical;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:pre-line;word-break:break-word;",""],(function(e){return e.isNameMultipleWords?2:1}),(function(e){return e.isNameMultipleWords?"-webkit-box":"block"}),(function(e){return"column"===e.direction&&(0,W.iv)(["max-width:calc(100% - 20px);margin-top:65px;"])})),ae=(0,W.ZP)(y.Xv).withConfig({displayName:"StyledStoreLogo"})(["",""],(function(e){return"column"===e.direction&&(0,W.iv)(["position:absolute;top:30px;"])})),le=function(e){var i=e.retailer,t=(0,E.$)().t,n=L.Z.useContextDataAttrs(),r=(0,d.Z)(X.tg),a=(0,Y.y)(),l=(null===a||void 0===a?void 0:a.content)||{},o=l.direction,s=l.logoSize,u=l.fontValiant,c=l.spacing,h=i.name.trim().split(/\s+/).length>1;return(0,T.jsxs)(te,{$height:null===a||void 0===a?void 0:a.itemAbsoluteHeight,children:[(0,T.jsxs)(ne,{direction:o,spacing:c,fullWidth:!0,children:[(0,T.jsx)(ae,{src:i.logo_image_uri,alt:i.name,size:s,direction:o}),(0,T.jsx)(re,{variant:u,isNameMultipleWords:h,direction:o,children:i.name})]}),(0,T.jsxs)(ie,{direction:"column",spacing:6,fullWidth:!0,children:[(0,T.jsx)(J.Z,{retailer:i,buttonProps:{size:"verySmall",type:"primary"}}),(0,T.jsx)(y.zx,(0,Q.Z)((0,Q.Z)({onClick:function(){return r({retailer:i})},size:"verySmall",type:"outline"},n),{},{"data-alooma-element":$.D8.VIEW_STORE_INFO,"data-alooma-retailer-id":i.self_id,children:t("app:storeInfo")}))]})]})},oe=function(e){var i=e.retailers,t=(0,Y.o)();return(0,T.jsx)(B.Z,{breakpoints:t,v2:!0,children:i.map((function(e){return(0,T.jsx)("div",{children:(0,T.jsx)(L.Z.RetailerIdContext.Provider,{value:e.self_id,children:(0,T.jsx)(le,{retailer:e})})},e.self_id)}))})},se=function(e){var i=e.retailers,t=(0,E.$)().t,n=(0,u.Ph)(c.T.query),a=(0,r.v9)(o._U),l=(0,r.v9)(o.Lo),s=l.totalCount,d=l.tags,h=a.tags,p=!(null===h||void 0===h||!h.length),f=!(null===d||void 0===d||!d.length);return L.Z.usePageViewTracker(),(0,T.jsxs)(y.Kq,{spacing:32,fullWidth:!0,direction:"column",alignItems:"flex-start",children:[(0,T.jsxs)(y.ZT,{variant:"h4",children:[t("app:youSearchedFor")," ",(0,T.jsxs)("span",{style:{fontWeight:600},children:["\u201c",n,"\u201d"]})]}),f&&(0,T.jsx)(L.Z.SectionContext.Provider,{value:$.SA.SAVED_ITEMS,children:(0,T.jsx)(w.Z,{title:t("app:yourSavedItems"),subtitle:t("app:itemFound",{count:s}),children:(0,T.jsx)(G,{})})}),!(null===i||void 0===i||!i.length)&&(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(L.Z.SectionContext.Provider,{value:$.SA.STORES,children:(0,T.jsx)(w.Z,{title:t("app:stores"),subtitle:t("app:storeFound",{count:i.length}),children:(0,T.jsx)(oe,{retailers:i})})})}),p&&(0,T.jsx)(L.Z.SectionContext.Provider,{value:$.SA.OTHER_ITEMS,children:(0,T.jsx)(w.Z,{title:t("app:itemsTitle"),children:(0,T.jsx)(D,{myItems:h})})})]})},de=function(e){var i=e.retailers,t=(0,u.Ph)(c.T.query),a=(0,r.v9)(o._U),l=(0,r.v9)(o.Lo),s=(0,n.useMemo)((function(){var e,n,r,o;return o={},(0,b.Z)(o,$.zK.SEARCH_PHRASE,t),(0,b.Z)(o,$.zK.SEARCH_RESULTS,(r={},(0,b.Z)(r,$.SA.STORES,null===i||void 0===i?void 0:i.map((function(e){return e.self_id}))),(0,b.Z)(r,$.SA.SAVED_ITEMS,null===l||void 0===l||null===(e=l.tags)||void 0===e?void 0:e.map((function(e){return e.id}))),(0,b.Z)(r,$.SA.OTHER_ITEMS,null===a||void 0===a||null===(n=a.tags)||void 0===n?void 0:n.map((function(e){return e.id}))),r)),o}),[]);return(0,T.jsx)(L.Z.NonStandardDataContext.Provider,{value:s,children:(0,T.jsx)(se,{retailers:i})})},ue=t(9044),ce=(0,W.ZP)(y.Kq).withConfig({displayName:"Container"})(["max-width:1170px;margin:0 auto;padding-top:80px;padding-bottom:60px;"]),he=function(){var e=(0,E.$)().t,i=(0,u.Ph)(c.T.query);return L.Z.usePageViewTracker(),(0,T.jsx)(ce,{direction:"column",fullWidth:!0,children:(0,T.jsxs)(y.Kq,{direction:"column",fullWidth:!0,children:[(0,T.jsx)(ue.fhz,{width:60,height:60}),(0,T.jsxs)(y.ZT,{variant:"h3",tMargin:32,bMargin:20,children:[e("app:noResultsFoundFor")," \u201c",i,"\u201d"]}),(0,T.jsx)(y.ZT,{variant:"paragraphLarge",children:e("app:pleaseReviewYourSpellingOrTryDifferentKeyword")})]})})},pe=function(){var e=(0,u.Ph)(c.T.query),i=(0,n.useMemo)((function(){var i;return i={},(0,b.Z)(i,$.zK.SEARCH_PHRASE,e),(0,b.Z)(i,$.zK.ERROR_MESSAGE,$.D8.NO_RESULTS_FOUND),i}),[]);return(0,T.jsx)(L.Z.NonStandardDataContext.Provider,{value:i,children:(0,T.jsx)(he,{})})},fe=t(31018),ve=t(40101),ge=t(68044),xe=t(61855),Ze=function(){return(0,T.jsxs)(y.Kq,{spacing:32,fullWidth:!0,direction:"column",alignItems:"flex-start",children:[(0,T.jsx)(ge.Z.TITLE_GLOBAL_SEARCH,{}),(0,T.jsx)(xe.Z.GLOBAL_SEARCH_MY_ITEMS,{}),(0,T.jsx)(xe.Z.GLOBAL_SEARCH_RETAILERS,{}),(0,T.jsx)(xe.Z.GLOBAL_SEARCH_ITEMS,{})]})},me=(0,fe.Wk)(ve.$.globalSearch)((function(){var e=(0,u.Ph)(c.T.query),i=(0,a.k6)(),t=(0,d.Z)(s.so),h=Z(e),p=h.retailers,f=h.isLoaded,v=(0,r.v9)(o._U),g=(0,r.v9)(o.Lo),x=g.tags,m=v.tags,j=!!(v.loaded&&g.loaded&&f),b=!(null!==x&&void 0!==x&&x.length||null!==m&&void 0!==m&&m.length||null!==p&&void 0!==p&&p.length),E=!j,y=j&&b,w=j&&!b;return S(),(0,n.useEffect)((function(){(0,P.Z)(e)&&t()}),[e]),(0,n.useEffect)((function(){(0,P.Z)(e)||i.push(C.yy.HOME)}),[]),(0,T.jsxs)(l.Z,{title:"app:headerGlobalSearch",titleProps:{query:e},sendPageView:!1,children:[E&&(0,T.jsx)(Ze,{}),y&&(0,T.jsx)(pe,{}),w&&(0,T.jsx)(de,{retailers:p})]})}))},24907:function(e,i,t){var n=t(28381),r=t(25052),a=4;i.Z=function(e,i,t){var l=(0,r.Z)(i);return(0,n.useMemo)((function(){if(!l)return{items:e,slidesPerView:a};var n=(i[l]||{slidesPerView:a}).slidesPerView;if(!t)return{items:e,slidesPerView:n};var r=e.length%n;return{items:e.slice(0,e.length-r),slidesPerView:n}}),[l,e,i,t])}},50221:function(e,i,t){t.d(i,{Z:function(){return n.Z}});var n=t(99632)}}]);
2//# sourceMappingURL=GlobalSearchResultsPage.ff103f1b.chunk.js.map

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.