PageSourceSearch

https://www.123buch.net/static/account-e92b6358499258b1cfd7.js

js 123buch.net collected 2026-09-26 17:03:00 UTC 30,484 bytes, 89 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8644],{48515:(e,s,t)=>{t.r(s),t.d(s,{default:()=>H})
2t(39155),t(98357),t(76881)
3var n=t(84507),a=t(48431),l=t(95110),i=t(91121),r=t(85019),o=t(4470),c=t(85968),d=t(43585),u=t(557),m=t(57381),h=t(61085),p=t(12086),b=t(64866),g=t(51249),x=t(42295)
4function j({show:e,onClose:s}){const t=(0,u.WD)("shop"),i=(e,s)=>t(`views.storefrontView.customerAccountSection.settingsTab.deleteProfileSection.confirmationModal.${e}`,s),r=(0,n.wA)(),c=(0,n.wA)(),[d,j]=(0,a.useState)(!1),f=(0,l.zy)(),N=(0,l.Zp)()
5async function w(){j(!0)
6try{await c((0,p.w0W)()),r((0,p.$_s)({id:(0,h.A)("customer-deleted-success-"),message:(0,x.jsx)("span",{children:t("notifications.customerProfileDeleted")}),type:"success"})),await c((0,p.bcB)()),N((0,m.GE)((0,o.j_)(),f))}catch{}finally{j(!1)}}return(0,x.jsx)(g.A,{children:(0,x.jsx)(b.A,{show:e,onClose:s,lightboxClassName:"lightbox-modal",children:({close:e})=>(0,x.jsxs)("div",{className:"lightbox-modal-form account-delete-form",children:[(0,x.jsxs)("div",{className:"inner-content",children:[(0,x.jsx)("h2",{className:"title",children:i("title")}),(0,x.jsx)("p",{className:"description",children:i("description")})]}),(0,x.jsxs)("div",{className:"button-wrapper",children:[(0,x.jsx)("button",{type:"submit",onClick:w,className:"button button-delete button-pending-state pending",disabled:d,children:i("deleteButton.label")}),(0,x.jsx)("button",{type:"button",onClick:e,className:"button button-outline",children:i("backButton.label")})]})]})})})}var f=t(10579),N=(t(76672),t(10313))
7const w=["firstName","lastName"]
8function v({countries:e,scopeName:s,address:t,tFormField:l,t:i}){const[r,o]=(0,a.useState)(t.country||""),c=e?.toJS()||[]
9r||c.unshift({value:"",label:i("countryInputField.placeholder")})
10const d=(0,n.d4)((e=>e.getIn(["tax","country"]))),u=r?e=>!e.hide:({name:e})=>w.includes(e),m="billingAddress"===s?(0,N.qz)(r,d).filter(u):(0,N.TB)(r).filter(u)
11return(0,x.jsxs)(x.Fragment,{children:[m.map(((e,s)=>(0,x.jsxs)("label",{children:[l((0,N.UP)(e.name,d,r)),e.required&&"*",(0,x.jsx)("input",{defaultValue:t[e.name]||"",name:e.name,required:e.required,type:"text",autoFocus:2===s})]},e.name))),(0,x.jsxs)("label",{children:[l("country"),"*",(0,x.jsx)("div",{className:"dropdown",children:(0,x.jsx)("select",{name:"country",value:r,required:!0,onChange:e=>{o(e.target.value)},children:c.map((({value:e,label:s})=>(0,x.jsx)("option",{value:e,children:s},s)))})})]})]})}var y=t(39312)
12function A({t:e,onClose:s,billingAddress:t,shippingAddress:l,scopeName:i}){const o=(0,n.wA)(),[d,u]=(0,a.useState)(!1),m=(0,c.r)((0,n.d4)((e=>e.get("cart",null)))),h=(0,n.d4)((e=>e.getIn(["checkout","all-countries"]))),b="billingAddress"===i?t:l;(0,a.useEffect)((()=>{h||o((0,p.ssT)())}),[])
13const g=(0,a.useRef)((0,f.UN)(t,l)),j=(0,a.useRef)(null)
14return(0,y.A)(j),(0,x.jsxs)("form",{ref:j,onSubmit:async function(e){e.preventDefault(),u(!0)
15try{const t={}
16new FormData(e.target).forEach(((e,s)=>{""!==e&&(t[s]=e)}
16)),t.email=b.email,t.phone=b.phone,"billingAddress"===i?(await o((0,p.$Zh)(t)),g.current&&await o((0,p.KX4)(t))):await o((0,p.KX4)(t)),m?.productLineItems?.length&&await o((0,p.pvu)()),s()}catch{}finally{u(!1)}},onInvalid:(0,r.toggleLabelInvalidClass)(!0),onInput:(0,r.toggleLabelInvalidClass)(!1),className:"lightbox-modal-form",children:[(0,x.jsxs)("div",{className:"inner-content",children:[(0,x.jsx)("h2",{className:"title",children:e("title")}),(0,x.jsx)(v,{address:b,countries:h,scopeName:i,t:e,tFormField:s=>e(`${s}InputField.label`)}),"billingAddress"===i&&(0,x.jsxs)("label",{className:"checkbox-wrapper",children:[(0,x.jsx)("input",{name:"useTheSameBillingAddress",type:"checkbox",defaultChecked:g.current,onChange:({target:e})=>g.current=e.checked}),(0,x.jsx)("div",{children:e("shippingAddressIsTheSameAsBillingAddress")})]})]}),(0,x.jsxs)("div",{className:"button-wrapper",children:[(0,x.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:d,children:e("saveButton.label")}),(0,x.jsx)("button",{type:"button",onClick:s,className:"button button-outline",children:e("cancelButton.label")})]})]})}var k,C,S,I=t(89213)
17function L(){const e=(0,n.d4)((e=>e.getIn(["shop","href"]))),s=(0,u.WD)("shop","views.storefrontView.customerAccountSection.orderOverview.emptyState")
18return(0,x.jsxs)("section",{className:"subpage orders-empty",children:[(0,x.jsx)("p",{className:"orders-empty-text",children:s("explanation")}),(0,x.jsx)(I.A,{className:"button button-primary",to:e,children:s("continueShoppingLink")})]})}var E,D,B,P,F,T,W,V,_,q,$=t(30851)
19function M({onClose:e}){const s=(0,n.wA)(),[t,l]=(0,a.useState)(null),[i,o]=(0,a.useState)(!1),c=(0,u.WD)("shop","views.storefrontView.customerAccountSection.profileTab.emailSection.editModal")
20const d=(0,a.useRef)(null)
21return(0,y.A)(d),(0,x.jsxs)("form",{ref:d,onSubmit:async function(t){t.preventDefault(),o(!0)
22try{l(null)
23const n=t.target.elements.currentPassword.value,a=t.target.elements.newEmail.value
24await s((0,p.ccm)({currentPassword:n,newEmail:a},{showErrorNotification:!1})),e()}catch(e){d.current?.scrollIntoView(!0),/current password.*not match/.test(e.message)?(l(c("errors.currentPasswordDoesNotMatch")),(0,r.toggleLabelInvalidClass)(!0)(d.current?.currentPassword)):/The new email address .* is already used/.test(e.message)?(l(c("errors.emailAlreadyRegistered")),(0,r.toggleLabelInvalidClass)(!0)(d.current?.newEmail)):l(c("errors.genericServerError"))}finally{o(!1)}},onInvalid:(0,r.toggleLabelInvalidClass)(!0),onInput:(0,r.toggleLabelInvalidClass)(!1),autoComplete:"on",className:"lightbox-modal-form",children:[(0,x.jsxs)("div",{className:"inner-content",children:[(0,x.jsx)("h2",{className:"title",children:c("title")}),t?(0,x.jsx)("p",{className:"error-message",children:t}):(0,x.jsx)("p",{children:c("explanation")}),(0,x.jsxs)("label",{children:[c("newEmailField.label"),"*",E||(E=(0,x.jsx)("input",{type:"email",name:"newEmail",required:!0}))]}),(0,x.jsxs)("label",{children:[c("currentPasswordField.label"),"*",D||(D=(0,x.jsx)($.A,{autoFocus:!0,name:"currentPassword",autoComplete:"password",required:!0}))]})]}),(0,x.jsxs)("div",{className:"button-wrapper",children:[(0,x.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:i,children:c("saveButton.label")}),(0,x.jsx)("button",{className:"button button-outline",type:"button",onClick:e,children:c("cancelButton.label")})]})]})}function R({onClose:e,billingAddress:s}){const t=(0,n.wA)(),l=(0,c.r)((0,n.d4)((e=>e.get("cart",null)))),[i,o]=(0,a.useState)(!1),m=(0,u.WD)("shop","views.storefrontView.customerAccountSection.profileTab.masterDataSection.editModal")
25const h=(0,a.useRef)(null)
26return(0,y.A)(h),(0,x.jsxs)("form",{ref:h,onSubmit:async function(n){n.preventDefault(),o(!0)
27try{const e=n.target.elements.firstName.value,a=n.target.elements.lastName.value,i=n.target.elements.phone.value||null
28await t((0,d.$Z)({...s,firstName:e,lastName:a,phone:i})),l?.productLineItems?.length&&await t((0,p.pvu)())}catch{}finally{o(!1)}e()},onInvalid:(0,r.toggleLabelInvalidClass)(!0),onInput:(0,r.toggleLabelInvalidClass)(!1),className:"lightbox-modal-form",children:[(0,x.jsxs)("div",{className:"inner
28-content",children:[(0,x.jsx)("h2",{className:"title",children:m("title")}),(0,x.jsxs)("label",{children:[m("firstNameInputField.label"),"*",(0,x.jsx)("input",{defaultValue:s.firstName,name:"firstName",type:"text",required:!0})]}),(0,x.jsxs)("label",{children:[m("lastNameInputField.label"),"*",(0,x.jsx)("input",{defaultValue:s.lastName,name:"lastName",type:"text",required:!0})]}),(0,x.jsxs)("label",{children:[m("phoneInputField.label"),(0,x.jsx)("input",{defaultValue:s.phone||"",name:"phone",type:"tel"})]})]}),(0,x.jsxs)("div",{className:"button-wrapper",children:[(0,x.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:i,children:m("saveButton.label")}),(0,x.jsx)("button",{className:"button button-outline",type:"button",onClick:e,children:m("cancelButton.label")})]})]})}function z({onClose:e}){const s=(0,n.wA)(),[t,l]=(0,a.useState)(null),[i,o]=(0,a.useState)(!1),c=(0,u.WD)("shop","views.storefrontView.customerAccountSection.profileTab.passwordSection.editModal")
29const d=(0,a.useRef)(null)
30return(0,y.A)(d),(0,x.jsxs)("form",{ref:d,onSubmit:async function(t){t.preventDefault(),o(!0)
31try{l(null)
32const n=t.target.elements.currentPassword.value,a=t.target.elements.newPassword.value
33await s((0,p.ecw)({currentPassword:n,newPassword:a},{showErrorNotification:!1})),e()}catch(e){d.current?.scrollIntoView(!0),/current password.*not match/.test(e.message)?(l(c("errors.currentPasswordDoesNotMatch")),(0,r.toggleLabelInvalidClass)(!0)(d.current?.currentPassword)):l(c("errors.genericServerError"))}finally{o(!1)}},onInvalid:(0,r.toggleLabelInvalidClass)(!0),onInput:(0,r.toggleLabelInvalidClass)(!1),autoComplete:"on",className:"lightbox-modal-form",children:[(0,x.jsxs)("div",{className:"inner-content",children:[(0,x.jsx)("h2",{className:"title",children:c("title")}),t&&(0,x.jsx)("p",{className:"error-message",children:t}),(0,x.jsxs)("label",{children:[c("currentPasswordField.label"),"*",B||(B=(0,x.jsx)($.A,{autoFocus:!0,name:"currentPassword",autoComplete:"password",required:!0}))]}),(0,x.jsxs)("label",{children:[c("newPasswordField.label"),"*",P||(P=(0,x.jsx)($.A,{name:"newPassword",autoComplete:"new-password",minLength:8,required:!0}))]})]}),(0,x.jsxs)("div",{className:"button-wrapper",children:[(0,x.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:i,children:c("saveButton.label")}),(0,x.jsx)("button",{className:"button button-outline",type:"button",onClick:e,children:c("cancelButton.label")})]})]})}const G={orders:function(){const e=(0,l.zy)(),s=(0,l.Zp)(),[t]=(0,l.ok)(),i="string"==typeof t.get("page")&&Math.max(1,parseInt(t.get("page")))||1,r=(0,n.wA)(),[o,c]=(0,a.useState)(!0),[h,p]=(0,a.useState)(!1),[b,g]=(0,a.useState)([]),[j,f]=(0,a.useState)(0),N=(0,u.WD)("shop","views.storefrontView.customerAccountSection.orderOverview"),w=(0,a.useRef)(null)
34function v({page:t,size:n}){return r((0,d.MV)({page:t,size:n})).then((n=>{g(b.concat(n.orders)),j||f(n.totalNumberOfOrders),1!==t&&s((0,m.GE)({pathname:e.pathname,search:`?page=${t}`},e),{replace:!0})})).catch((()=>null)).finally((()=>{c(!1),p(!1)
35const e=window.innerWidth-document.body.clientWidth
36w.current?.parentElement?.style.setProperty("--scrollbarWidth",`${e}px`)}))}(0,a.useEffect)((()=>{v({page:1,size:10*i})}),[])
37const y={year:"numeric",month:"2-digit",day:"2-digit"},A={year:"numeric",month:"long"},E=function(){const e=(0,n.d4)((e=>e.getIn(["shop","locale"]))),s=e?.replace(/_/,"-")
38return(0,a.useCallback)(((e="",t={year:"numeric",day:"numeric",month:"long"})=>{const n=Date.parse(e.endsWith("Z")?e:e+"Z")
39return Number.isNaN(n)?"":new Intl.DateTimeFormat(s,t).format(n)}),[s])}(),D={"invoice-pdf":"invoiceDownloadPdfLink","invoice-correction-pdf":"invoiceCorrectionDownloadPdfLink","invoice-cancelation-pdf":"invoiceCancelationDownloadPdfLink"}
40let B=""
41function P(e){const s=E(e.orderDate.toString(),A),t=s!==B
42return B=s,t}return o||0!==b.length?(0,x.jsx)("section",{className:"subpage orders",ref:w,children:o?C||(C=(0,x.jsx)("span",{className:"spinner"})):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("ol",{className:"orders-list",children:b.map(((e,s)=>(0,x.jsxs)("li",{className:"orders-list-item",children:[0===s?(0,x.jsxs)("h2",{className:"orders-date-title",children:[N("latest.label")," "]}):P(e)&&(0,x.jsx)("h2",{className:"orders-date-title",children:E(e.orderDate.toString(),A)}),(0,x.jsxs)("div",{className:"orders-order",children:[(0,x.jsxs)("div",{className:"orders-order-row",children:[(0,x.jsxs)("dl",{className:`orders-order-status icomoon-${e.shippingStatus.toLowerCase()}`,children:[(0,x.jsx)("dt",{className:"orders-order-status-key visually-hidden",children:N("shippingStatus.accessibilityLabel")}),(0,x.jsx)("dd",{className:"orders-order-status-value",children:N("shippingStatus."+e.shippingStatus)})]}),(0,x.jsx)("time",{children:E(e.orderDate.toString(),y)})]}),(0,x.jsxs)("div",{className:"orders-order-row",children:[(0,x.jsxs)("dl",{className:"orders-order-data",children:[(0,x.jsx)("dt",{className:"orders-order-data-key",children:N("grandTotal")}),(0,x.jsx)("dd",{className:"orders-order-data-value",children:e.grandTotal.formatted})]}),e.documents?.length>0&&(0,x.jsx)("ul",{className:"orders-order-invoice-link-list",children:e.documents.map((e=>(0,x.jsx)("li",{children:(0,x.jsx)(I.A,{className:"orders-order-invoice-link",href:e.href,target:"_blank",children:N("documentSection."+D[e.label]+".label",{number:e.invoiceNumber})})},e.invoiceNumber)))})]}),(0,x.jsxs)("div",{className:"orders-order-row",children:[(0,x.jsxs)("dl",{className:"orders-order-data",children:[(0,x.jsx)("dt",{className:"orders-order-data-key",children:N("orderNumber")}),(0,x.jsx)("dd",{className:"orders-order-data-value",children:e.orderNumber})]}),e.trackingLinks?.length>0&&(0,x.jsx)("ul",{className:"orders-order-tracking-link-list",children:e.trackingLinks.map((e=>(0,x.jsx)("li",{children:(0,x.jsx)(I.A,{className:"orders-order-tracking-link",href:e.href,target:"_blank",children:N("trackingLink.label")})},e.href)))})]})]})]},e.orderNumber)))}),h?S||(S=(0,x.jsx)("span",{className:"spinner"})):b.length<j&&(0,x.jsx)("button",{className:"button button-primary orders-load-more",type:"button",onClick:()=>async function(){p(!0),await v({page:i+1,size:10}),p(!1)}(),children:N("loadMoreButton.label")})]})}):k||(k=(0,x.jsx)(L,{}))},profile:function(){const e=(0,c.r)((0,n.d4)((e=>e.getIn(["customer","billingAddress"],{})))),s=(0,u.WD)("shop","views.storefrontView.customerAccountSection.profileTab"),t=[e.firstName,e.lastName].filter(
42Boolean).join(" "),[l,i]=(0,a.useState)(null)
43return(0,x.jsxs)("section",{className:"subpage",children:[(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsxs)("div",{className:"subpage-item-headline",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:s("masterDataSection.title")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>i("master-data"),children:(0,x.jsx)("span",{className:"button-link-text",children:s("masterDataSection.editButton.label")})})]}),(0,x.jsx)("p",{children:t}),e.phone&&(0,x.jsx)("p",{children:e.phone})]}),(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsxs)("div",{className:"subpage-item-headline",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:s("emailSection.title")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>i("email"),children:(0,x.jsx)("span",{className:"button-link-text",children:s("emailSection.editButton.label")})})]}),(0,x.jsx)("p",{children:e.email})]}),(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsxs)("div",{className:"subpage-item-headline",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:s("passwordSection.title")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>i("password"),children:(0,x.jsx)("span",{className:"button-link-text",children:s("passwordSection.editButton.label")})})]}),F||(F=(0,x.jsx)("p",{children:"*****************"}))]}),(0,x.jsx)(g.A,{children:(0,x.jsx)(b.A,{show:Boolean(l),onClose:()=>i(null),lightboxClassName:"lightbox-modal",children:({close:s})=>(0,x.jsxs)(x.Fragment,{children:["master-data"===l&&(0,x.jsx)(R,{onClose:s,billingAddress:e}),"email"===l&&(0,x.jsx)(M,{onClose:s}),"password"===l&&(0,x.jsx)(z,{onClose:s})]})})})]})},address:function(){const e=e=>i(`shippingAddressSection.editModal.${e}`),s=e=>i(`billingAddressSection.editModal.${e}`),t=(0,c.r)((0,n.d4)((e=>e.getIn(["customer","billingAddress"],{})))),l=(0,c.r)((0,n.d4)((e=>e.getIn(["customer","shippingAddress"],{})))),i=(0,u.WD)("shop","views.storefrontView.customerAccountSection.addressTab"),[r,o]=(0,a.useState)(null)
44return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("section",{className:"subpage subpage-address",children:[(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsxs)("div",{className:"subpage-item-headline",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:i("billingAddressSection.title")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>o("billing-address-data"),children:(0,x.jsx)("span",{className:"button-link-text",children:i("editButton.label")})})]}),(0,x.jsx)("p",{children:t.displayAddressLines?.length>0?(0,f.ER)(t,((e,...s)=>i(`billingAddressSection.${e}`,...s))):i("billingAddressSection.emptyState.explanation")})]}),(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsxs)("div",{className:"subpage-item-headline",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:i("shippingAddressSection.title")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>o("shipping-address-data"),children:(0,x.jsx)("span",{className:"button-link-text",children:i("editButton.label")})})]}),(0,x.jsx)("p",{children:l.displayAddressLines?.length>0?(0,f.UN)(t,l)?i("shippingAddressSection.theSameAsBillingAddress"):(0,f.f)(l):i("shippingAddressSection.emptyState.explanation")})]})]}),(0,x.jsx)(g.A,{children:(0,x.jsx)(b.A,{show:Boolean(r),onClose:()=>o(null),lightboxClassName:"lightbox-modal",children:({close:n})=>(0,x.jsxs)(x.Fragment,{children:["billing-address-data"===r&&(0,x.jsx)(A,{t:s,onClose:n,billingAddress:t,shippingAddress:l,scopeName:"billingAddress"}),"shipping-address-data"===r&&(0,x.jsx)(A,{t:e,onClose:n,billingAddress:t,shippingAddress:l,scopeName:"shippingAddress"})]})})})]})},settings:function(){const[e,s]=(0,a.useState)(!1),t=(0,u.WD)("shop","views.storefrontView.customerAccountSection.settingsTab")
45return(0,x.jsxs)("section",{className:"subpage subpage-settings",children:[(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:t("dataPrivacySection.title")}),q||(q=(0,x.jsx)(r.LegalPageLink,{slug:"privacy"}))]}),(0,x.jsxs)("div",{className:"subpage-item",children:[(0,x.jsx)("h2",{className:"subpage-item-headline-title",children:t("deleteProfileSection.title")}),(0,x.jsx)("p",{children:t("deleteProfileSection.explanation")}),(0,x.jsx)("button",{className:"button-link",onClick:()=>s(!0),children:t("deleteProfileSection.deleteProfileButton.label")})]}),(0,x.jsx)(j,{show:e,onClose:()=>s(!1)})]})}},U=["orders","profile"],Z=Object.keys(G).filter((e=>"orders"!==e)),O=(0,o.ow)(),K=(0,o.Ww)()
46function H({section:e="profile"}){const s=(0,n.wA)(),t=(0,l.zy)(),{loggedIn:r=!1,requestedNewEmail:h}=(0,c.r)((0,n.d4)((e=>e.get("customer"))))||{},{firstName:p,lastName:b,email:g}=(0,c.r)((0,n.d4)((e=>e.getIn(["customer","billingAddress"],{}
46)))),j=[p,b].filter(Boolean).join(" "),f=G[e]||G.profile,N=(0,u.WD)("shop","views.storefrontView.customerAccountSection"),w=(0,l.Zp)()
47return(0,a.useEffect)((()=>{G[e]||w(O,{replace:!0})}),[e,w]),(0,x.jsx)("section",{className:(0,i.A)(["section account",{"account-orders":"orders"===e,"logging-out":!r}]),children:(0,x.jsxs)("div",{className:"wrapper",children:[(0,x.jsx)("div",{className:"mobile-orders-back-link-wrapper",children:(0,x.jsx)(I.A,{className:"mobile-orders-back-link",to:O,children:N("backButton.label")})}),T||(T=(0,x.jsx)("div",{className:"shadow"})),(0,x.jsxs)("div",{className:"mobile-orders-heading-wrapper",children:[W||(W=(0,x.jsx)("div",{className:"shadow-cover"})),(0,x.jsx)("h1",{className:"mobile-orders-heading",children:N("ordersTab.menu.title")})]}),(0,x.jsx)("h1",{className:"heading",children:N("welcomeMessage",{name:j})}),(0,x.jsx)("button",{className:"button-link logout-link",onClick:async function(){try{await s((0,d.bc)()),w((0,m.GE)((0,o.j_)(),t))}catch{}},children:N("logoutButton.label")}),h&&h!==g&&(0,x.jsx)("div",{className:"warning-message",children:N("notifications.requestedNewEmail",{newEmail:h})}),V||(V=(0,x.jsx)(I.A,{className:"mobile-orders-link",to:K,children:"Orders"})),(0,x.jsx)("nav",{className:"account-menu",children:(0,x.jsx)("ul",{children:U.map((s=>{const t="profile"!==s&&s,n=N(`${s}Tab.menu.title`)
48return a=s,("orders"===e?e===a:"profile"===a)?(0,x.jsx)("li",{className:"active-item",children:(0,x.jsx)("span",{children:n})},s):(0,x.jsx)("li",{children:(0,x.jsx)(I.A,{to:[O,t].filter(Boolean).join("/"),children:n})},s)
49var a}))})}),"orders"!==e&&(0,x.jsx)(X,{t:N,section:e}),(0,x.jsx)(f,{})]})})}function X({t:e,section:s}){return(0,x.jsx)("nav",{className:"subpage-nav",children:(0,x.jsxs)("ul",{children:[Z.map((t=>{const n="profile"!==t&&t,a=e(`${t}Tab.title`)
50return s===t?(0,x.jsx)("li",{className:"active-item",children:(0,x.jsx)("span",{children:a})},t):(0,x.jsx)("li",{children:(0,x.jsx)(I.A,{to:[O,n].filter(Boolean).join("/"),state:{scrollToTop:!1},children:a})},t)})),_||(_=(0,x.jsx)("div",{className:"active-item-indicator"}))]})})}},85019:(e,s,t)=>{t.r(s),t.d(s,{LegalPageLink:()=>P,default:()=>B,toggleLabelInvalidClass:()=>F})
51t(39155),t(98456)
52var n,a,l,i,r,o,c,d,u,m,h,p=t(84507),b=t(48431),g=t(95110),x=t(12086),j=t(4470),f=t(85968),N=t(35856),w=t(557),v=t(57381),y=t(48276),A=t(64866),k=t(89213),C=t(30851),S=t(51249),I=t(39312),L=t(42295)
53const E=(0,j.ow)(),D=(0,j.Ww)()
54function B(){const e=(0,p.wA)(),s=(0,w.WD)("shop","components.accountMenuComponent"),t=(0,p.d4)((e=>e.getIn(["customer","loggedIn"],!1))),[l]=(0,g.ok)(),i=(0,g.zy)(),r=(0,g.Zp)(),[o,c]=(0,b.useState)(null),d=()=>c(null)
55async function u(){try{await e((0,x.bcB)()),x.QBG.test(i.pathname)&&r((0,v.GE)((0,j.j_)(),i))}catch{}}return(0,b.useEffect)((()=>{l.has("login")&&c("login"),new URL(window.location.href).hash.includes("showLoginForm")&&c("login")}),[]),(0,L.jsxs)("div",{className:"header-account-login",children:[(0,L.jsx)(y.A,{ariaId:"account-dropdown",ariaLabel:s("accountIcon.accessibilityLabel"),buttonLabel:n||(n=(0,L.jsx)("span",{className:"header-account-icon"})),children:e=>t?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("li",{children:(0,L.jsx)(k.A,{to:E,onClick:e,activeClassName:"popover-item-active",children:s("accountLink.label")})}),(0,L.jsx)("li",{children:(0,L.jsx)(k.A,{to:D,onClick:e,activeClassName:"popover-item-active",children:s("ordersLink.label")})}),a||(a=(0,L.jsx)("hr",{})),(0,L.jsx)("li",{children:(0,L.jsx)("button",{onClick:u,className:"logout-button",children:s("logoutButton.label")})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("li",{children:(0,L.jsx)("button",{onClick:()=>c("login"),children:s("loginButton.label")})}),(0,L.jsx)("li",{children:(0,L.jsx)("button",{onClick:()=>c("signup"),children:s("signupButton.label")})})]})}),(0,L.jsx)(S.A,{children:(0,L.jsxs)(A.A,{show:Boolean(o),onClose:d,lightboxClassName:"lightbox-modal",children:["login"===o&&(0,L.jsx)(T,{onClose:d,onGoToSignup:()=>c("signup")}),"signup"===o&&(0,L.jsx)(W,{onClose:d,onGoToLogin:()=>c("login")})]})})]})}function P({slug:e,newTab:s}){const t=(0,f.r)((0,p.d4)((e=>e.get("legalPages")))),n=(0,g.zy)(),a=(0,w.WD)("shop"),{href:l,title:i}=t.find((({slug:s})=>s===e))
56return(0,L.jsx)(k.A,{href:(0,v.GE)(l,n),...s?{target:"_blank"}:{},children:a(i)})}const F=e=>s=>{const t=s?.target||s
57t?.closest("label")?.classList[e?"add":"remove"]("form-element-invalid")}
58function T({onClose:e,onGoToSignup:s}){const t=(0,f.r)((0,p.d4)((e=>e.get("cart",null)))),{confirmedNewEmail:n}=(0,f.r)((0,p.d4)((e=>e.get("customer"))))||{},a=(0,g.zy)(),o=(0,p.wA)(),c=(0,w.WD)("shop","components.accountMenuComponent.loginModal"),[d,u]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),j=(0,b.useRef)(null),y=(0,g.Zp)()
59return(0,I.A)(j),(0,L.jsxs)("form",{ref:j,className:"lightbox-modal-form account-login-form",onInvalid:F(!0),onInput:F(!1),name:"customerLogin",onSubmit:async function(s){s.preventDefault(),h(!0)
60const n=s.target.elements.email.value,l=s.target.elements.password.value
61try{u(null),await o((0,x.ShE)({email:n,password:l},{showErrorNotification:!1})),t?.productLineItems?.length?await o((0,x.pvu)()):await o((0,x.Bbc)()),h(!1),e(),(0,N.u4)("customer:signIn",{customer:{email:n}})
62const s=new URL(window.location.href).searchParams.get("redirect")||"",i=decodeURIComponent(s)||E
63y((0,v.GE)(i,a))}
63catch(e){j.current?.scrollIntoView(!0),["unauthorized","invalid_grant"].includes(e.message)?(u(c("errors.credentialsInvalid")),h(!1),F(!0)(j.current?.email),F(!0)(j.current?.password)):u(c("errors.genericServerError"))}},autoComplete:"on",children:[(0,L.jsxs)("div",{className:"inner-content",children:[(0,L.jsx)("h2",{className:"title",children:c("title")}),(0,L.jsx)("p",{className:"description",children:c("explanation")}),d&&(0,L.jsx)("p",{className:"error-message",children:d}),n&&(0,L.jsx)("p",{className:"warning-message",children:c("notifications.confirmedNewEmail")}),(0,L.jsxs)("label",{children:[c("emailInputField.label"),"*",(0,L.jsx)("input",{name:"email",autoComplete:"email",defaultValue:n,type:"email",required:!0})]}),(0,L.jsxs)("label",{children:[c("passwordInputField.label"),"*",l||(l=(0,L.jsx)(C.A,{name:"password",autoComplete:"password",required:!0}))]}),(0,L.jsx)(k.A,{className:"forgot-password-link",to:"/forgot-password",children:c("resetPasswordLink.label")})]}),(0,L.jsxs)("div",{className:"button-wrapper",children:[(0,L.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:m,children:c("continueButton.label")}),(0,L.jsx)("button",{className:"button button-outline",type:"button",onClick:()=>s(),children:c("signupButton.label")})]}),(0,L.jsx)("aside",{children:(0,w.fN)(c)("legalPageLinks",{tac:i||(i=(0,L.jsx)(P,{newTab:!0,slug:"tac"})),privacy:r||(r=(0,L.jsx)(P,{newTab:!0,slug:"privacy"}))})})]})}function W({onClose:e,onGoToLogin:s}){const t=(0,g.zy)(),n=(0,f.r)((0,p.d4)((e=>e.get("cart",null)))),a=(0,p.wA)(),l=(0,w.WD)("shop","components.accountMenuComponent.signupModal"),[i,r]=(0,b.useState)(null),[j,y]=(0,b.useState)(!1),A=(0,b.useRef)(null),k=(0,g.Zp)()
64return(0,I.A)(A),(0,L.jsxs)("form",{ref:A,className:"lightbox-modal-form account-signup-form",onInvalid:F(!0),onInput:F(!1),name:"customerSignup",onSubmit:async function(s){s.preventDefault(),y(!0)
65const i=s.target.elements.firstName.value,o=s.target.elements.lastName.value,c=s.target.elements.email.value,d=s.target.elements.initialPassword.value
66try{r(null),await a((0,x.pyL)({firstName:i,lastName:o,email:c,initialPassword:d},{showErrorNotification:!1})),n?.productLineItems?.length&&await a((0,x.pvu)()),y(!1),e(),(0,N.u4)("customer:signUp",{customer:{email:c,firstName:i,lastName:o}}),k((0,v.GE)(E,t))}catch(e){A.current?.scrollIntoView(!0),/validation failed/.test(e.message)?r(l("errors.emailAlreadyRegistered")):r(l("errors.genericServerError")),y(!1)}},autoComplete:"on",children:[(0,L.jsx)("a",{href:"#",onClick:()=>s(),className:"nav-link",children:l("backToLogin")}),(0,L.jsxs)("div",{className:"inner-content",children:[(0,L.jsx)("h2",{className:"title",children:l("title")}),i&&(0,L.jsx)("p",{className:"error-message",children:i}),(0,L.jsxs)("label",{children:[l("firstNameInputField.label"),"*",o||(o=(0,L.jsx)("input",{name:"firstName",autoComplete:"given-name",type:"text",required:!0}))]}),(0,L.jsxs)("label",{children:[l("lastNameInputField.label"),"*",c||(c=(0,L.jsx)("input",{name:"lastName",autoComplete:"family-name",type:"text",required:!0}))]}),(0,L.jsxs)("label",{children:[l("emailInputField.label"),"*",d||(d=(0,L.jsx)("input",{name:"email",autoComplete:"email",type:"email",required:!0}))]}),(0,L.jsxs)("label",{children:[l("passwordInputField.label"),"*",(0,L.jsx)(C.A,{name:"initialPassword",autoComplete:"new-password",placeholder:l("passwordInputField.hintText"),minLength:8,required:!0})]}),(0,L.jsxs)("label",{className:"checkbox-wrapper",children:[u||(u=(0,L.jsx)("input",{type:"checkbox",required:!0})),(0,L.jsxs)("div",{children:[(0,w.fN)(l)("conditionsAcceptedCheckbox.label",{tac:m||(m=(0,L.jsx)(P,{newTab:!0,slug:"tac"})),privacy:h||(h=(0,L.jsx)(P,{newTab:!0,slug:"privacy"}))})," ","*"]})]})]}),(0,L.jsx)("div",{className:"button-wrapper",children:(0,L.jsx)("button",{className:"button button-primary button-pending-state pending",type:"submit",disabled:j,children:l("createAccountButton.label")})})]})}},30851:(e,s,t)=>{t.d(s,{A:()=>l})
67var n=t(48431),a=t(42295)
68function l(e){const[s,t]=(0,n.useState)(!1)
69return(0,a.jsxs)("div",{className:"password-input-line",children:[(0,a.jsx)("input",{...e,type:s?"text":"password"}),(0,a.jsx)("button",{className:s?"hide-password-icon":"show-password-icon",type:"button",onClick:()=>t((e=>!e))})]})}},39312:(e,s,t)=>{t.d(s,{A:()=>a})
70t(39155),t(98456)
71var n=t(48431)
72function a(e){(0,n.useEffect)((()=>{const s=Array.from(e?.current?.elements||[]).find((e=>"FIELDSET"!==e.tagName))
73s?.focus&&s.focus()}),[])}},87111:(e,s,t)=>{t.r(s),t.d(s,{default:()=>g})
74t(7121),t(39155),t(98357)
75var n=t(66153),a=t(48431),l=t(84507),i=t(95110),r=t(80238),o=t(43585),c=t(4470),d=t(557),u=t(57381),m=t(51627),h=t(90700),p=t(42295)
76function b(){const{section:e}=(0,i.g)(),s=(0,l.wA)(),t=(0,i.zy)(),b=(0,i.Zp)(),[g]=(0,i.ok)(),x=(0,l.d4)((e=>e.getIn(["shop","title"]))),j=(0,d.WD)("shop","views.storefrontView.customerAccountSection"),f=(0,a.useCallback)((()=>{const s=encodeURIComponent([(0,c.ow)(),e].filter(Boolean).join("/"))
77b((0,u.GE)(`${(0,c.j_)()}?login=1&redirect=${s}`,t))}),[t,e,b]);(0,a.useEffect)((function(){t.pathname.endsWith("confirm-email-change")&&"string"==typeof g.get("tkn")&&(async()=>{const e=g.get("tkn")
78if("string"==typeof e)try{await s((0,o.$p)(e)),await s((0,o.bc)()),b((0,u.GE)((0,c.ow)(),t),{replace:!0})}catch{N||f()}})()}),[])
79const N=(0,l.d4)((e=>e.getIn(["customer","loggedIn"]))),w=(0,h.A)(t.key);(0,a.useEffect)((function(){!N&&t.key!==w&&t.pathname.startsWith("/customer-account")&&f()}),[N,e,t,w,f])
80const v=(0,l.d4)((e=>e.getIn(["view","error"])));(0,a.useEffect)((()=>{v&&s((0,o.bc)())}),[s,v])
81let y=j("profileTab.title")
82return e&&"confirm-email-change"!==e&&(y=j(`${(0,n.A)(e)}Tab.title`)),v?(0,p.jsx)(m.A,{withLayout:!0,error:v,currentView:"Account"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.l,{title:`${y} - ${x}`,meta:[{name:"robots",content:"noindex, follow"}]}),(0,p.jsx)(m.A,{withLayout:!0,currentView:"Account",children:(s,t)=>s("Account",{...t,section:e})})]})}b.storeUpdate=(e,s)=>{const t=[]
83return!("PUSH"===e.location.action)&&s.getIn(["customer","billingAddress"])||!s.getIn(["customer","loggedIn"])||t.push((0,o.tr)()),t},b.contentCreationDisabled=()=>!0
84const g=b},61085:(e,s,t)=>{t.d(s,{A:()=>l})
85var n=t(87771),a=0
86const l=function(e){var s=++a
87return(0,n.A)(e)+s}}}])
88
89//# sourceMappingURL=account-e92b6358499258b1cfd7.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.