PageSourceSearch

https://www.gap.at/_next/static/chunks/791.f5ea7912e02ecacb.js

js gap.at collected 2026-10-06 13:18:52 UTC 7,558 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[791],{8741:(e,t,r)=>{r.r(t),r.d(t,{LayoutMainProfile:()=>L,MyMenu:()=>w});var s=r(26514),n=r(96456),i=r.n(n),l=r(55047),a=r(75834),u=r(46225),c=r(52566),o=r(52661),d=r(59429),f=r(58245),h=r.n(f),m=r(80254),x=r(31950),p=r(49421),g=r(41246),j=r(81586),v=r(75406),b=r(45640);let P=e=>{switch(e){case"my-account":return m.Q.UserProfileMyAccountLink;case"my-orders":return m.Q.UserProfileMyOrdersLink;case"vouchers":return m.Q.UserProfileVouchersLink;case"personal":return m.Q.UserProfilePersonalLink;case"address":return m.Q.UserProfileAddressLink;case"preferences":return m.Q.UserProfilePreferencesLink;case"change-password":return m.Q.UserProfileChangePasswordLink;default:return}},y=(0,d.PA)(({title:e})=>{let{user:t}=(0,j.Pj)(),{t:r}=(0,l.Bd)("common");return"my-account"===e&&"number"==typeof t.clubPoints?.activePoints&&t.clubPoints.activePoints>0?(0,s.jsxs)(s.Fragment,{children:[r(e)," (",(0,s.jsx)(l.x6,{i18nKey:"club-points",values:{count:t.clubPoints.activePoints}}),")"]}):"vouchers"===e&&t.clubVouchers.length>0?(0,s.jsxs)(s.Fragment,{children:[r(e)," (",(0,b.Z)(t.clubVouchers.length),")"]}):(0,s.jsx)(s.Fragment,{children:r(e)})}),k=({menuItems:e})=>{let{user:t}=(0,j.Pj)(),{t:r}=(0,l.Bd)("common");return(0,s.jsxs)("aside",{className:"text-base","data-testid":m.Q.UserProfileMenuDesktopAside,children:[e?.map((e,t)=>(0,s.jsx)("div",{className:"my-4",children:(0,s.jsx)(N,{href:e.slug,className:(0,v.cn)({"underline underline-offset-2":!0,"font-bold":e.active}),"data-testid":P(e.title),"data-title":e.title,children:(0,s.jsx)(y,{title:e.title})})},`item-${t}`)),(0,s.jsx)("div",{className:"my-4",children:(0,s.jsx)("button",{type:"button",className:"underline underline-offset-2 text-gray-700",onClick:()=>{(0,o.h5)(()=>{t.signOut()})},"data-testid":m.Q.UserProfileSignOutButton,children:r("sign-out")})})]})},N=({href:e,children:t,ref:r,...n})=>(0,s.jsx)(i(),{href:e,prefetch:!1,ref:r,...n,children:t}),_=({menuItems:e})=>{let{user:t}=(0,j.Pj)(),{t:r}=(0,l.Bd)("common");return(0,s.jsx)("div",{className:"text-lg",children:(0,s.jsxs)(c.W1,{children:[(0,s.jsxs)(c.IU,{className:"inline-flex justify-center font-semibold w-screen py-4 relative z-10 bg-white -ml-6 border-b items-center drop-shadow-[0_0_20px_rgba(0,0,0,0.09)]","data-testid":m.Q.UserProfileMobileMenuButton,children:[e.filter(e=>e.active).map((e,t)=>(0,s.jsx)("span",{children:(0,s.jsx)(y,{title:e.title})},`item-${t}`)),(0,s.jsx)(h(),{src:"/images/icons/chevron-right.svg",className:"ml-1 pl-2.5 h-7 w-7 rotate-90",width:20,height:20,alt:r("menu-mobile__toggle-menu__alt")})]}),(0,s.jsxs)(c.c,{className:"absolute w-screen bg-white -ml-6 z-20 drop-shadow-[0_2px_10px__rgba(0,0,0,0.15)] py-2",children:[e?.map((e,t)=>(0,s.jsx)(c.Dr,{children:(0,s.jsx)(N,{href:e.slug,className:(0,v.cn)({"text-lg flex w-full items-center last:mb-0 hover:font-bold px-6 py-3":!0,"font-bold":e.active}),"data-testid":P(e.title),children:(0,s.jsx)(y,{title:e.title})})},`item-${t}`)),(0,s.jsx)("div",{className:"px-6",children:(0,s.jsx)("button",{type:"button",className:"py-3 text-gray-700",onClick:()=>{t.signOut()},"data-testid":m.Q.UserProfileSignOutButton,children:r("sign-out")})})]})]})})},w=(0,d.PA)(({menuData:e})=>{let t=(0,u.useRouter)(),[r,n]=(0,a.useState)(e),{user:i,settings:l}=(0,j.Pj)();return(0,a.useEffect)(()=>{(0,o.h5)(()=>{let r=[];e.forEach(e=>{"address"!==e.title&&(i?.user?.hasPassword===!1&&e.slug===l.routes.userChangePassword&&(e.slug=l.routes.userForgottenPassword||"#"),r.push({...e,active:t.asPath===e.slug||e.forceActive}))}),n(r)})},[t,i?.user?.hasPassword]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"hidden lg:block",children:(0,s.jsx)(k,{menuItems:r})}),(0,s.jsx)("div",{className:"lg:hidden block",children:(0,s.jsx)(_,{menuItems:r})})]})}),L=(0,d.PA)(({children:e,layoutData:t})=>{let{user:r,settings:n}=(0,j.Pj)(),i=(0,u.useRouter)();return(0,a.useEffect)(()=>{(0,o.h5)(()=>{r.fetched&&!r.user?n.routes.userLogin&&i.push(n.routes.userLogin):r.setIsLoading(!1)}),r.setIsLoading(!1)},[r.fetched]),(0,s.jsx)(g.m,{maxW:"xl",variant:"no-padding",className:"px-5",children:(0,s.jsxs)("div",{className:"lg:py-16 lg:grid lg:grid-cols-[164px_195px_1fr]",children:[t?.profile?.menuItems?.length>0&&(0,s.jsx)(w,{menuData:t.profile.menuItems}),(0,s.jsx)("div",{}),(0,s.jsxs)("div",{className:"pt-5 lg:pt-0 relative","data-testid":m.Q.MainProfileDiv,children:[(0,s.jsx)(x.e,{isOpen:!r.fetched||!r.isLoggedIn,children:(0,s.jsx)(p.a,{isActive:!0})}),(0,s.jsx)(x.e,{isOpen:r.fetched&&r.isLoggedIn,children:e})]})]})})})},31950:(e,t,r)=>{r.d(t,{e:()=>l});var s=r(26514),n=r(61450),i=r(75834);let l=({children:e,isOpen:t,...r})=>{let[n,l]=(0,i.useState)(t);return((0,i.useEffect)(()=>{t&&l(!0)},[t]),n)?(0,s.jsx)(a,{isOpen:t,onClose:()=>{l(!1)},...r,children:e}):null},a=({children:e,isOpen:t,onClose:r,...l})=>{let a=(0,i.useRef)(null),{handleEnter:u,handleLeave:c}=(0,n.F)({ref:a,transitionEnter:"transition duration-300 ease",transitionEnterFrom:"opacity-0",transitionEnterTo:"opacity-100",transitionLeave:"transition duration-200 ease",transitionLeaveFrom:"opacity-100",transitionLeaveTo:"opacity-0"});return(0,i.useEffect)(()=>{a.current&&(t?u():c().then(()=>{r?.()}))},[u,c,t,r]),(0,s.jsx)("div",{ref:a,...l,children:e})}},45640:(e,t,r)=>{r.d(t,{Z:()=>s});let s=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"\xa0")},52566:(e,t,r)=>{r.d(t,{Dr:()=>d,IU:()=>c,W1:()=>u,c:()=>o});var s=r(26514),n=r(75834),i=r(75406);let l=(0,n.createContext)(void 0),a=()=>{let e=(0,n.useContext)(l);if(!e)throw Error("useMenu must be used within a MenuProvider");return e},u=({className:e,children:t,...r})=>
1{let[a,u]=(0,n.useState)(!1),c=(0,n.useRef)(null),o=(0,n.useCallback)(()=>u(e=>!e),[]),d=(0,n.useCallback)(()=>u(!1),[]);return(0,n.useEffect)(()=>{if(!a)return;let e=e=>{!c.current||c.current.contains(e.target)||d()};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[c,d,a]),(0,s.jsx)(l.Provider,{value:{isOpen:a,toggleMenu:o,closeMenu:d},children:(0,s.jsx)("div",{ref:c,className:(0,i.cn)({menu:!0,[`${e}`]:e}),onClick:e=>e.stopPropagation(),...r,children:t})})},c=({className:e,children:t,...r})=>{let{isOpen:n,toggleMenu:l}=a();return(0,s.jsx)("button",{className:(0,i.cn)({"menu-button":!0,[`${e}`]:e}),onClick:l,"aria-expanded":n,"aria-haspopup":"menu",...r,children:t})},o=({as:e,className:t,children:r,...n})=>{let{isOpen:l}=a();return(0,s.jsx)(e||"div",{className:(0,i.cn)({"menu-items":!0,hidden:!l,block:l,[`${t}`]:t}),role:"menu","aria-orientation":"vertical",...n,children:r})},d=({as:e,className:t,children:r,onClick:n,...l})=>{let{closeMenu:u}=a();return(0,s.jsx)(e||"div",{className:(0,i.cn)({"menu-item":!0,[`${t}`]:t}),role:"menuitem",onClick:e=>{n&&n(e),u()},...l,children:r})}},74595:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=r(75834);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=i(e,s)),t&&(n.current=i(t,s))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);

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.