(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6803],{22490:function(e,t,n){"use strict";n.d(t,{Z:function(){return src_Image}});var r=n(95235),i=n(22970),a=n(2784),o=n(81333),s=n(97704),c=n(35505),d=n(93673),l=n(52322);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=c.default.img.withConfig({displayName:"Image__ServerImageSC",componentId:"sc-1262bpq-0"})(["max-width:100%;visibility:",";"],function(e){return e.loaded?"":"hidden"}),Image_Image=function(e){var t=e.isPlpImage,n=e.isNewPLP,r=e.src,c=e.size,p=e.alt,g=e.deferImage,m=void 0!==g&&g,I=(0,i._T)(e,["isPlpImage","isNewPLP","src","size","alt","deferImage"]),f=(0,s.YD)({threshold:.1,triggerOnce:!0}),h=(0,o.Z)(f,3),v=h[0],b=h[1],y=h[2],x=(0,a.useMemo)(function(){var e=m?"":(0,d.zQ)({image:r,size:c});return b&&(e=(0,d.zQ)({image:r,size:c})),e},[y,r,I,m,c,b,n]),w=(0,a.useState)(!1),M=w[0],j=w[1],C=(null==p?void 0:p.length)?p.replace(/"/g,"""):p;return(0,l.jsx)(u,_objectSpread(_objectSpread({},I),{},{ref:v,onLoad:function(){j(!0)},src:n?x.replace("/prodmedia",",e_bgremoval:white/prodmedia"):x,alt:C,loaded:!t||M}))},p=n(96577),g=n.n(p);function NextImage_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NextImage_objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NextImage_ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NextImage_ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var m=(0,c.default)(g()).withConfig({displayName:"NextImage__ImageSC",componentId:"sc-x7xgc7-0"})(["width:100%;height:auto;",""],function(e){return e.$fitImageToContainer&&(0,c.css)(["object-fit:cover;object-position:center center;"])}),NextImage=function(e){var t=e.src,n=void 0===t?"":t,r=e.size,o=void 0===r?"":r,s=e.alt,c=e.deferImage,u=e.width,p=void 0===u?1:u,g=e.height,I=void 0===g?1:g,f=e.fitImageToContainer,h=e.onLoadingComplete,v=(e.layout,(0,i._T)(e,["src","size","alt","deferImage","width","height","fitImageToContainer","onLoadingComplete","layout"])),b=(0,a.useMemo)(function(){return(0,d.zQ)({image:n,size:o})},[n,v,void 0!==c&&c,o]),y=p||I?{width:p||0,height:I||0}:{};return(0,l.jsx)(m,NextImage_objectSpread(NextImage_objectSpread(NextImage_objectSpread({},v),y),{},{loader:function(e){var t=e.src;return(0,d.zQ)({image:t,size:o})},src:b,alt:void 0===s?"":s,$fitImageToContainer:void 0!==f&&f,onLoadingComplete:void 0===h?void 0:h}))};function Image_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Image_objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Image_ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Image_ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var src_Image=function(e){var t=e.type,n=(0,i._T)(e,["type"]);return(void 0===t?"old":t)==="next"?(0,l.jsx)(NextImage,Image_objectSpread({},n)):(0,l.jsx)(Image_Image,Image_objectSpread({},n))}},39879:function(e,t,n){"use strict";var r=n(95922),i=n(16760),a=n.n(i),o=n(2784);t.Z=function(e){return(0,o.useMemo)(function(){var t,n,i=a()(e,function(e,t){return e.length>0&&{brands:e,letter:t}}),o=null===(n=null===(t=null==i?void 0:i.reverse())||void 0===t?void 0:t.map(function(e){return null==e?void 0:e.letter}))||void 0===n?void 0:n.slice(0,3),s=(0,r.Z)(o);return{isLast:function(e){return null==i?void 0:i.slice(0,3).find(function(t){return e===t.letter})},reversedBrands:(s[0],s.slice(1))}},[e])}},25564:function(e,t,n){"use strict";var r=n(3746),i=n.n(r),a=n(2784);t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.list,n=void 0===t?[]:t,r=e.searchString,o=void 0===r?[]:r,s=e.options,c=e.transformResults,d=void 0===c?function(e){return e}:c,l=(0,a.useMemo)(function(){return new(i())(n,s)},[n,s]);return{results:(0,a.useMemo)(function(){return d(l.search(o),[l,o])}),fuse:l}}},93673:function(e,t,n){"use strict";n.d(t,{AJ:function(){return launchesImageUrlsResized},K2:function(){return prismicImageUrlsResized},zQ:function(){return cloudinaryImageSize}});var r=n(48627),i=n(22091),a={small:"w_150,h_150/",medium:"w_600,h_600/",large:"w_800,h_800/"},o="media/",cloudinaryImageSize=function(e){var t=e.image,n=e.size,r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(r&&(null==t?void 0:t.includes(o))){var i=a[n];if(!i)return t;var s=t.split(o);return s[0]+="media/f_auto,","".concat(s[0]).concat(i,"prodmedia/media/").concat(s[3])}return t},calcImageSize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e<i.I.breakpoints.small?i.I.breakpoints.small/t:e<i.I.breakpoints.medium?i.I.breakpoints.medium/t:e<i.I.breakpoints.desktop?i.I.breakpoints.desktop/t:e>=i.I.breakpoints.desktop?i.I.breakpoints.xLarge/t:null},launchesImageUrlsResized=function(e,t,n){var i=r.ZP.LAUNCHES_MEDIA_ENV,a=new URL(e),o=a.host,s=a.origin,c=a.pathname,d=calcImageSize(t,n);return"launches-media.endclothing.com"===o&&d?"".concat(s,"/f_auto,q_auto,w_").concat(Math.ceil(d),"/").concat("".concat(i,"launchesmedia")).concat(c):e},prismicImageUrlsResized=function(e,t,n){var r=e,i="end-cms",a=calcImageSize(t,n);if(a&&r){var o,s="https://images.prismic.io/".concat(i),c="https://media.endclothing.com/".concat(i,"/f_auto,q_auto:eco,w_").concat(Math.ceil(a),"/").concat("prodcms");decodeURI(o=r)!==decodeURIComponent(o)&&(r=decodeURIComponent(r));var d=new URL(r.replace(s,c));return d.href.replace(d.search,"")}return e}},9703:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return q},sortBrandsByLetter:function(){return sortBrandsByLetter}});var r,i=n(7328),a=n(28526),o=n.n(a),s=n(22970),c=n(2784),d=n(99776),l=n(38451),u=n(58554),p=n(50171),compareValues=function(e){return function(t,n){return("string"==typeof t[e]?t[e].toUpperCase():t[e])>("string"==typeof n[e]?n[e].toUpperCase():n[e])?1:-1}},dataMutator=function(e){return(0,s.mG)(void 0,void 0,void 0,o().mark(function _callee(){var t,n,r,i,a,s;return o().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return a=(i=null!=e?e:{}).featured_brand,s=i.featured_brand_image,o.abrupt("return",{brands:null===(t=e.children_data)||void 0===t?void 0:t.filter(function(e){return e.is_active&&!e.is_column_header}).map(function(e){return(0,u.e)(e,["url_path","name","featured_brand_image"])}).sort(compareValues("name")),pageGender:null==e?void 0:e.root_id,featuredBrand:{name:a,img:s,url:null===(r=null===(n=null==e?void 0:e.children_data)||void 0===n?void 0:n.find(function(e){return e.name===a}))||void 0===r?void 0:r.url_path}});case 2:case"end":return o.stop()}},_callee)}))},getBrands=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"gb",t=arguments.length>1?arguments[1]:void 0;return(0,s.mG)(void 0,void 0,void 0,o().mark(function _callee2(){var n,r,i,a;return o().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.hi)({baseUrl:"".concat(l.Z.link,"/").concat(e,"/catalog/link?link=").concat(t,"&context=web&relative=true")});case 2:return i=o.sent,o.next=5,(0,d.hi)({path:"".concat(e,"/").concat(p.b6),queryParams:{rootCategoryId:null===(r=null===(n=null==i?void 0:i.body)||void 0===n?void 0:n.category)||void 0===r?void 0:r.id,depth:20,addTopMenu:!0}});case 5:return a=o.sent,o.abrupt("return",dataMutator(a));case 7:case"end":return o.stop()}},_callee2)}))},g=n(53710),m=n(54343),I=n(25564),f=n(83382),h=n(35880),v=n(80668),b=n(71342),y=n(59868),x=n(16760),w=n.n(x),M=n(35505),j=n(39879),C=n(22091),L=n(81333),N=n(97704),A=n(87583),S=n(21691),_=n(52322),D=M.default.li.withConfig({displayName:"LetterBrandsSection__LetterBrandsListSC",componentId:"sc-1hk2oim-0"})(["position:relative;&:not(:last-child){padding-bottom:70px;}@media all and (min-width:","px){padding:56px 0;border-bottom:1px solid ",";opacity:",";transition:opacity 0.3s ease 0s;}ul{margin-top:24px;@media screen and (min-width:","px){column-count:2;}@media screen and (min-width:1280px){column-count:3;}@media all and (min-width:","px){column-count:3;column-gap:60px;}}"],C.I.breakpoints.desktop,C.I.colours.grey.silver,function(e){return!e.isSelected&&e.aLetterIsSelected?.5:1},C.I.breakpoints.medium,C.I.breakpoints.xLarge),k=M.default.li.withConfig({displayName:"LetterBrandsSection__BrandListItemSC",componentId:"sc-1hk2oim-1"})(["margin:8px 0;height:fit-content;line-height:initial;&:first-child{margin-top:0;}a{",";}"],(0,S.LZ)(14)),z=M.default.h2.withConfig({displayName:"LetterBrandsSection__HeadingSC",componentId:"sc-1hk2oim-2"})(["position:",";top:",";",";background:white;padding:14px 0 8px;border-bottom:1px solid ",";z-index:80;user-select:none;@media all and (min-width:","px){top:0;position:relative;height:73px;margin-bottom:23px;",";padding:0;border-bottom:none;}"],function(e){return e.isLast?"relative":"sticky"},function(e){return e.isLast?"auto":"47px"},(0,S.LZ)(46,{type:"semi-bold",uppercase:!0}),C.I.colours.grey.silver,C.I.breakpoints.desktop,(0,S.LZ)(60,{type:"semi-bold",uppercase:!0})),B=M.default.div.withConfig({displayName:"LetterBrandsSection__ViewMarker",componentId:"sc-1hk2oim-3"})(["position:absolute;top:50%;left:0;height:1px;"]),Z=(0,M.default)(A.r).withConfig({displayName:"LetterBrandsSection__BrandLinkSC",componentId:"sc-1hk2oim-4"})(["&:hover{opacity:0.5;}"]),brands_LetterBrandsSection=function(e){var t=e.letter,n=e.brands,r=e.selectedLetter,i=e.letterIsSelected,a=e.setSelectedLetter,o=e.setHoveredBrand,s=e.isLast,d=(0,N.YD)(),l=(0,L.Z)(d,2),u=l[0],p=l[1],g=r===t,m=(0,c.useRef)(),I=(0,f.H)().isMobile;(0,c.useEffect)(function(){g&&!p&&a("")},[p]);var BrandLink=function(e){var _onMouseOver=function(){(null==e?void 0:e.featured_brand_image)&&o(e)};return(0,_.jsx)(Z,{isSelected:g,aLetterIsSelected:i,href:"/".concat(null==e?void 0:e.url_path),onMouseOver:function(){I||_onMouseOver()},children:null==e?void 0:e.name})};return(null==n?void 0:n.length)<1?null:(0,_.jsxs)(D,{id:"letter-".concat(t),isSelected:g,aLetterIsSelected:i,ref:m,onMouseEnter:function(){return!g&&a("")},children:[(0,_.jsx)(z,{isSelected:g,aLetterIsSelected:i,isLast:s,children:t}),(0,_.jsx)(B,{ref:u}),(0,_.jsx)("ul",{children:null==n?void 0:n.map(function(e){return(0,_.jsx)(k,{children:BrandLink(e)},null==e?void 0:e.name)})})]},null==t?void 0:t.letter)},O=M.default.ul.withConfig({displayName:"BrandsList__CompleteBrandsListSC",componentId:"sc-119n13o-0"})(["& > li:last-of-type{h2{position:relative;top:auto;}}@media all and (min-width:","px){& > li:last-of-type{border:none;","}}@media all and (min-width:","px) and (min-height:950px){margin:0 64px 0 20px;}@media screen and (min-width:768px){margin:0;}@media screen and (min-width:992px){margin:-48px 0 0;}"],C.I.breakpoints.desktop,function(e){return!e.isResults&&"min-height: calc(60vh - 160px);"},C.I.breakpoints.small),BrandsList_BrandsList=function(e){var t=e.brandsByLetter,n=e.selectedLetter,r=void 0===n?null:n,i=e.setSelectedLetter,a=e.setHoveredBrand,o=e.isResults,s=!!r,c=(0,j.Z)(t).isLast,d=w()(t,function(e,t){return(0,_.jsx)(brands_LetterBrandsSection,{setSelectedLetter:i,selectedLetter:r,letterIsSelected:s,isLast:c(t),letter:t,brands:e,"data-test-id":"BrandsList__LetterBrandsSection",setHoveredBrand:a},t)});return(0,_.jsx)(O,{isResults:void 0===o?null:o,children:d})},T=n(22490),P=(0,M.default)(T.Z).withConfig({displayName:"FeaturedBrands__FeaturedBrandImgSC",componentId:"sc-1ta3avn-0"})(["width:100%;height:auto;margin-top:35px;min-height:200px;@media screen and (min-width:","px){margin-top:51px;}"],C.I.breakpoints.xLarge),E=M.default.p.withConfig({displayName:"FeaturedBrands__FeaturedBrandTitleSC",componentId:"sc-1ta3avn-1"})(["height:16px;margin-top:12px;color:",";",";"],C.I.colours.grey.dustygrey,(0,S.LZ)(14)),G=M.default.h4.withConfig({displayName:"FeaturedBrands__FeaturedBrandNameSC",componentId:"sc-1ta3avn-2"})(["margin-top:2px;font-weight:400;",";"],(0,S.LZ)(16)),LinkWrapper=function(e){var t=e.children,n=e.url;return n?(0,_.jsx)(A.Z,{href:"/".concat(n),children:t}):(0,_.jsx)("div",{children:t})},brands_FeaturedBrands=function(e){var t=e.featuredBrand,n=e.hoveredBrand,r=(null==n?void 0:n.name)||(null==t?void 0:t.name),i=(null==n?void 0:n.featured_brand_image)||(null==t?void 0:t.img),a=(null==n?void 0:n.url_path)||(null==t?void 0:t.url);return r&&i?(0,_.jsxs)(LinkWrapper,{url:a,children:[(0,_.jsx)(P,{src:i,name:r,alt:r}),!n&&(0,_.jsx)(E,{children:"Featured Brand"}),(0,_.jsx)(G,{children:r})]}):null},U=n(25237),Q=n.n(U)()(function(){return n.e(3135).then(n.bind(n,63135))},{ssr:!1,loadableGenerated:{webpack:function(){return[63135]}}}),Y=n(23528),R=M.default.div.withConfig({displayName:"styles__BrandsSC",componentId:"sc-s8rcck-0"})(["max-width:1376px;min-height:100vh;margin:20px "," 0 16px;user-select:none;@media screen and (min-width:","px){margin:78px 43px 0;}@media screen and (min-width:768px){margin:24px "," 0 30px;}@media screen and (min-width:1028px){margin:48px 32px 0;}@media screen and (min-width:","px){margin:48px auto 0;}@media all and (min-width:","px){margin:48px auto 0;ul{width:100%;}}",";"],function(e){return e.displayingLetterSelector?"75px":"16px"},C.I.breakpoints.desktop,function(e){return e.displayingLetterSelector?"118px":"30px"},C.I.breakpoints.new.pageGridWidth,C.I.breakpoints.xLarge,(0,S.LZ)(14)),W=M.default.div.withConfig({displayName:"styles__WrapperSC",componentId:"sc-s8rcck-1"})(["@media screen and (min-width:","px){display:grid;grid-template-columns:220px 1fr;column-gap:100px;}@media screen and (min-width:","px){grid-template-columns:340px 1fr;margin:0;column-gap:80px;}"],C.I.breakpoints.desktop,C.I.breakpoints.xLarge),K=M.default.div.withConfig({displayName:"styles__AbsoluteDivSc",componentId:"sc-s8rcck-2"})(["position:absolute;top:60px;right:10px;z-index:",";display:flex;align-items:start;justify-content:center;width:40px;height:100%;@media all and (min-width:","px) and (min-height:950px){width:64px;}@media screen and (min-width:","px){position:relative;top:0;left:0;}"],(0,Y.W)("upper-mid"),C.I.breakpoints.small,C.I.breakpoints.desktop),H=M.default.div.withConfig({displayName:"styles__StickyDivSC",componentId:"sc-s8rcck-3"})(["position:sticky;transition:top 0.3s ease-in-out 0.05s;top:40px;"]),J=M.default.div.withConfig({displayName:"styles__InputWrapperSC",componentId:"sc-s8rcck-4"})(["padding:0 0 32px;display:flex;justify-content:center;align-items:center;position:relative;@media screen and (max-width:","px){padding-top:30px;}input{height:40px;width:100%;padding:8px 40px 8px 12px;box-sizing:border-box;-webkit-appearance:none;color:",";",";border-radius:0;border:1px solid ",";&::-ms-clear{display:none;}@media screen and (device-aspect-ratio:2/3){",";}@media screen and (device-aspect-ratio:40/71){",";}@media screen and (device-aspect-ratio:375/667){",";}@media screen and (device-aspect-ratio:9/16){",";}&::placeholder{",";color:",";}@media (min-width:","px){",";margin:0px;height:auto;&:hover{border:1px solid ",";}}}"],C.I.breakpoints.desktop,C.I.colours.grey.black,(0,S.LZ)(14),function(e){return e.searchActive?"".concat(C.I.colours.grey.black):"".concat(C.I.colours.grey.concrete)},(0,S.LZ)(16),(0,S.LZ)(16),(0,S.LZ)(16),(0,S.LZ)(16),(0,S.LZ)(14),C.I.colours.grey.silver,C.I.breakpoints.desktop,(0,S.LZ)(14),C.I.colours.grey.black),F=M.default.div.withConfig({displayName:"styles__NoResultsSC",componentId:"sc-s8rcck-5"})(["h4{",";strong{",";}}@media screen and (min-width:","px){h4{",";strong{",";}}}"],(0,S.LZ)(18,{type:"regular"}),(0,S.LZ)(18,{type:"semi-bold"}),C.I.breakpoints.desktop,(0,S.LZ)(24,{type:"regular"}),(0,S.LZ)(24,{type:"semi-bold"})),V=m.zo.button(r||(r=(0,i.Z)(["\n position: absolute;\n right: 13px;\n\n display: block;\n\n background: url(",");\n\n ",";\n border: none;\n -webkit-appearance: none;\n @media (min-width: ","px) {\n top: ",";\n }\n @supports (-ms-ime-align: auto) {\n @media (min-width: ","px) {\n top: ",";\n }\n }\n"])),function(e){return e.searchString?"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlc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NDQgMS43Nzc3Nzc3OCw5LjY1ODY2MDY3IDEuNzc3Nzc3NzgsNi4yMjIyMjIyMiBDMS43Nzc3Nzc3OCwyLjc4NTc4Mzc4IDQuNTYzNTYxNTYsMCA4LDAgWiBNOCwwLjg4ODg4ODg4OSBDNS4wNTQ0ODEzMywwLjg4ODg4ODg4OSAyLjY2NjY2NjY3LDMuMjc2NzAzNTYgMi42NjY2NjY2Nyw2LjIyMjIyMjIyIEMyLjY2NjY2NjY3LDkuMTY3NzQwODkgNS4wNTQ0ODEzMywxMS41NTU1NTU2IDgsMTEuNTU1NTU1NiBDMTAuOTQ1NTE4NywxMS41NTU1NTU2IDEzLjMzMzMzMzMsOS4xNjc3NDA4OSAxMy4zMzMzMzMzLDYuMjIyMjIyMjIgQzEzLjMzMzMzMzMsMy4yNzY3MDM1NiAxMC45NDU1MTg3LDAuODg4ODg4ODg5IDgsMC44ODg4ODg4ODkgWiIgaWQ9IlNoYXBlIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},function(e){return e.searchString?"width: 12px; height: 12px;":"width: 14px; height: 16px;"},m.IS.breakpoints.desktop,function(e){return e.searchString?"14px":"12px"},m.IS.breakpoints.desktop,function(e){return e.searchString?"14px":"11px"}),sortBrandsByLetter=function(e){var t=["#","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],n={};return t.forEach(function(e){n[e]=[]}),e.forEach(function(e){var r=e.name.charAt(0).toLowerCase();t.includes(r)?n[r].push(e):n["#"].push(e)}),n},X=c.memo(function(e){var t=e.featuredBrand,n=e.activeBrands;(0,s._T)(e,["featuredBrand","activeBrands"]);var r=(0,f.H)().isMobile,i=(0,c.useState)(""),a=i[0],o=i[1],d=(0,c.useState)(!1),l=d[0],u=d[1],p=(0,c.useState)(""),m=p[0],v=p[1],y=(0,c.useContext)(g.p),x=y.cartOpen,w=y.menuOpen,M=x||w,j=(0,c.useState)(),C=j[0],L=j[1],N=(0,h.Z)().t,A=(0,I.Z)({list:n,searchString:a,options:{keys:["name"],threshold:.3,distance:50},transformResults:function(e){return e.map(function(e){return e.item})}}).results,S=(0,c.useMemo)(function(){return sortBrandsByLetter(n)},[n]),D=(0,c.useMemo)(function(){return sortBrandsByLetter(A)},[a]),k=(0,c.useRef)(),focusInput=function(e){k.current.focus(),e.preventDefault()},handleClick=function(e){var t;(null===(t=null==k?void 0:k.current)||void 0===t?void 0:t.contains(e.target))||u(!1)};(0,c.useEffect)(function(){return document.addEventListener("mousedown",handleClick),function(){document.removeEventListener("mousedown",handleClick)}},[]),(0,c.useEffect)(function(){window.scrollTo(0,1)},[2===a.length]);var z=0===A.length?(0,_.jsx)(F,{"data-test-id":"brands_noResults",children:(0,_.jsxs)("h4",{children:["No results for",(0,_.jsx)("strong",{children:" '".concat(a,"'")})]})}):(0,_.jsx)(BrandsList_BrandsList,{brandsByLetter:D,selectedLetter:m,setSelectedLetter:v,setHoveredBrand:L,isResults:!0}),B=(0,_.jsxs)(J,{searchString:a,searchActive:l,children:[(0,_.jsx)("input",{onChange:function(e){o(e.target.value)},"data-test-id":"Search_Input",placeholder:N("brands.search"),onClick:function(){return u(!0)},value:a,ref:k}),(0,_.jsx)(V,{searchString:a,onClick:a?function(e){o(""),focusInput(e)}:focusInput})]});return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b.Z,{title:"Brands"}),(0,_.jsx)(R,{displayingLetterSelector:r,children:(0,_.jsxs)(W,{children:[!r&&(0,_.jsx)("div",{children:(0,_.jsxs)(H,{children:[B,(0,_.jsx)(Q,{brandsByLetter:S,setSelectedLetter:v,selectedLetter:m}),(0,_.jsx)(brands_FeaturedBrands,{hoveredBrand:C,featuredBrand:t})]})}),r&&B,a.length>=2?z:(0,_.jsxs)(_.Fragment,{children:[r&&(0,_.jsx)(function(){return(0,_.jsx)(K,{children:(0,_.jsx)(Q,{hideLetterSelector:M,setSelectedLetter:v,selectedLetter:m,brandsByLetter:S})})},{}),(0,_.jsx)(BrandsList_BrandsList,{brandsByLetter:S,selectedLetter:m,setSelectedLetter:v,setHoveredBrand:L})]})]})})]})});X.getInitialProps=function(e){var t=e.store,n=e.query;return(0,s.mG)(void 0,void 0,void 0,o().mark(function _callee(){var e,r,i,a,s,c,d,l,u,p,g;return o().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return s=(0,v.fs)(null===(e=null==t?void 0:t.getState)||void 0===e?void 0:e.call(t)),d=null==(c=null!==(a=null===(i=null===(r=null==n?void 0:n.brandsRoute)||void 0===r?void 0:r.join)||void 0===i?void 0:i.call(r,"/"))&&void 0!==a?a:null==n?void 0:n.brandsRoute)?void 0:c.replace("/".concat(null==n?void 0:n.countryCode,"/"),""),o.next=5,getBrands(s,d);case 5:return u=(l=o.sent).brands,p=l.pageGender,g=l.featuredBrand,o.abrupt("return",{activeBrands:u,featuredBrand:g,pageGender:p,showPageTitleSansCrumbs:!0,breadcrumb:{type:"brands",link:d,data:[{href:d,title:(0,y.Z)("meta.brands")}]}});case 11:case"end":return o.stop()}},_callee)}))},X.getMeta=function(e){var t=e.featuredBrand;return(0,s.mG)(void 0,void 0,void 0,o().mark(function _callee2(){var e;return o().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=[{name:"description",metaKey:(0,y.Z)("meta.brandsDescriptionKey"),content:(0,y.Z)("meta.branddescription")},{name:"og:description",metaKey:(0,y.Z)("meta.ogBrandsDescriptionKey"),content:(0,y.Z)("meta.branddescription")},{property:"og:title",metaKey:(0,y.Z)("meta.ogBrandsDescriptionKey"),content:"".concat((0,y.Z)("meta.brands")," | END.")},{property:"twitter:title",metaKey:(0,y.Z)("meta.brandsTwitterTitleKey"),content:"".concat((0,y.Z)("meta.brands")," | END.")},{property:"twitter:card",metaKey:(0,y.Z)("meta.brandsTwitterTitleKey"),content:(0,y.Z)("meta.brandsSummary")},{property:"og:image",metaKey:(0,y.Z)("meta.ogBrandsTwitterImageKey"),content:null==t?void 0:t.img},{property:"twitter:site",metaKey:(0,y.Z)("meta.brandsTwitterHandleKey"),content:"@endclothing"},{name:"twitter:description",metaKey:(0,y.Z)("meta.brandsTwitterDescriptionKey"),content:(0,y.Z)("meta.branddescription")}],n.abrupt("return",{meta:e});case 2:case"end":return n.stop()}},_callee2)}))};var q=X},9685:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/brands",function(){return n(9703)}])},95922:function(e,t,n){"use strict";n.d(t,{Z:function(){return _toArray}});var r=n(64034),i=n(17602),a=n(57211),o=n(42330);function _toArray(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,o.Z)()}}},function(e){e.O(0,[6577,3746,9774,2888,179],function(){return e(e.s=9685)}),_N_E=e.O()}]);