PageSourceSearch

https://www.boxeurdesrues.com/_next/static/chunks/pages/user-53e5a5b7f164ed3f.js

js boxeurdesrues.com collected 2026-09-30 18:53:15 UTC 31,393 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4235],{6415:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user",function(){return n(5691)}])},3698:function(e,s){"use strict";s.Z={src:"/_next/static/media/fallback.87901dc1.jpg",height:558,width:377,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAIAAUDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAXEAEAAwAAAAAAAAAAAAAAAAAAASFR/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AK9ewAD/2Q==",blurWidth:5,blurHeight:8}},4740:function(e,s,n){"use strict";var t=n(5893);n(7294);var r=n(4710),a=n.n(r);let i=()=>(0,t.jsxs)("div",{className:a().loading,children:[(0,t.jsx)("span",{className:a().dots}),(0,t.jsx)("span",{className:a().dots}),(0,t.jsx)("span",{className:a().dots})]});s.Z=i},5691:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return V},default:function(){return K}});var t=n(5893),r=n(7294),a=n(3148),i=n(3299),d=n(3753),l=n(7561),o=n(7988),c=n.n(o),u=n(2294),h=n(2175),p=n(6310),x=n(1765),_=n.n(x);let m=e=>{let{setModalChangePassword:s}=e,{t:n}=(0,l.$G)("common"),[i,d]=(0,r.useState)(""),o=n("error.requiredField"),c=n("error.passwordNumber"),u=n("error.passwordLength"),x=n("error.passwordLowercase"),m=n("error.passwordCapital"),j=n("error.passwordSpecial"),v=n("error.passwordMatch"),g=(0,h.TA)({initialValues:{old_password:"",new_password:"",confirm_password:""},validationSchema:p.Ry({old_password:p.Z_().required(o),new_password:p.Z_().required(o).min(8,u).matches(/[0-9]/,c).matches(/[a-z]/,x).matches(/[A-Z]/,m).matches(/[^\w]/,j),confirm_password:p.Z_().oneOf([p.iH("new_password")],v)}),onSubmit:async e=>{d(""),(0,a.Cp)(e.old_password,e.new_password).then(e=>{200===e.status&&(g.resetForm(),d(e.data.message))}).catch(e=>{var s;d((null===(s=e.response.data)||void 0===s?void 0:s.message)||n("error.invalidPassword"))})}});return(0,t.jsxs)("div",{className:_().change_password_container,children:[(0,t.jsxs)("div",{className:_().insert_password,children:[(0,t.jsxs)("h1",{children:[n("edit")," PASSWORD"]}),(0,t.jsxs)("form",{onSubmit:g.handleSubmit,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"old_password",children:n("user.oldPAssword")}),(0,t.jsx)("input",{id:"old_password",name:"old_password",type:"password",onChange:g.handleChange,onBlur:g.handleBlur,value:g.values.old_password}),g.touched.old_password&&g.errors.old_password?(0,t.jsx)("div",{className:_().error_component,children:g.errors.old_password}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"new_password",children:n("user.newPassword")}),(0,t.jsx)("input",{id:"new_password",name:"new_password",type:"password",onChange:g.handleChange,onBlur:g.handleBlur,value:g.values.new_password}),g.touched.new_password&&g.errors.new_password?(0,t.jsx)("div",{className:_().error_component,children:g.errors.new_password}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"confirm_password",children:n("user.confirmNewPassword")}),(0,t.jsx)("input",{id:"confirm_password",name:"confirm_password",type:"password",onChange:g.handleChange,onBlur:g.handleBlur,value:g.values.confirm_password}),g.touched.confirm_password&&g.errors.confirm_password?(0,t.jsx)("div",{className:_().error_component,children:g.errors.confirm_password}):null]}),(0,t.jsxs)("div",{className:_().btn_container,children:[(0,t.jsx)("button",{type:"submit",children:n("user.confirm")}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),s(!1)},children:n("user.close")})]})]})]}),(0,t.jsx)("div",{children:i?(0,t.jsx)("p",{children:i}):""})]})};var j=n(4740),v=n(598),g=n.n(v);let b=e=>{let{setModalChangeInfo:s,birthDate:n}=e,{t:i}=(0,l.$G)("common"),{user:d,getUser:o}=(0,u.Z)(),[c,h]=(0,r.useState)(!1),[p,x]=(0,r.useState)(""),[_,m]=(0,r.useState)((null==d?void 0:d.first_name)||""),[v,b]=(0,r.useState)((null==d?void 0:d.last_name)||""),[f,A]=(0,r.useState)((null==d?void 0:d.phone)||""),[w,N]=(0,r.useState)(n||"");return(0,r.useEffect)(()=>{o()},[]),(0,t.jsxs)("div",{children:[d&&!c&&(0,t.jsxs)("div",{className:g().updateInfo_container,children:[(0,t.jsx)("h1",{children:i("user.edit-info")}),(0,t.jsxs)("div",{className:g().name,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"name",children:i("user.name").toUpperCase()}),(0,t.jsx)("input",{type:"text",name:"name",id:"name",value:_,onCh
1ange:e=>m(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"last_name",children:i("user.lastName").toUpperCase()})," ",(0,t.jsx)("input",{type:"text",name:"last_name",id:"last_name",value:v,onChange:e=>b(e.target.value)})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"birthday",children:i("user.birthday").toUpperCase()}),(0,t.jsx)("input",{type:"date",name:"birthday",id:"birthday",value:w,onChange:e=>N(e.target.value),style:{width:"100%"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",children:i("user.phone").toUpperCase()}),(0,t.jsx)("input",{type:"tel",name:"phone",id:"phone",value:f,onChange:e=>A(e.target.value),style:{width:"100%"}})]}),(0,t.jsxs)("div",{className:g().btn_container,children:[(0,t.jsx)("button",{onClick:function(){x(""),h(!0),(0,a.gS)({first_name:_,last_name:v,phone:f,birthDate:w}).then(e=>{x(e.data.message),o(),s(!1),h(!1)}).catch(e=>{h(!1),s(!1),console.log(e)})},children:i("edit")}),(0,t.jsx)("button",{onClick:()=>s(!1),children:i("user.cancel")})]})]}),c&&(0,t.jsx)(j.Z,{}),p?(0,t.jsx)("p",{children:p}):""]})};var f=n(1190);let A=()=>{let{t:e}=(0,l.$G)("common"),{user:s,getUser:n}=(0,u.Z)(),[i,d]=(0,r.useState)("-"),[o,h]=(0,r.useState)(!1),[p,x]=(0,r.useState)(!1),[_,j]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(0,a.iH)().then(e=>{var s,n;let t=null===(s=e.data.find(e=>"user.CustomAttribute.IsNewsletterSubscriber"===e.name))||void 0===s?void 0:s.value,r=null===(n=e.data.find(e=>"user.DateOfBirth"===e.name))||void 0===n?void 0:n.value;d(r||"-"),j(!!Number(t))}).catch(e=>{d("-"),j(!1)})},[p]),(0,r.useEffect)(()=>{n()},[p,o]),(0,r.useEffect)(()=>{n()},[]);let v=(0,r.useMemo)(()=>{if("-"!==i){let e=new Date(i),s=e.getDate(),n=e.getMonth()+1,t=e.getFullYear();return"".concat(s,"/").concat(n,"/").concat(t)}return"-"},[i]),g=()=>{(0,a.rD)().then(e=>{202===e.status&&j(!0)}).catch(e=>{})},A=()=>{(0,a.SR)().then(e=>{202===e.status&&j(!1)}).catch(e=>{})};return(0,t.jsxs)("div",{className:c().navtab_item,children:[s&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{children:e("user.contactInformations")}),(0,t.jsxs)("div",{className:c().user_info,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("user.name")}),(0,t.jsxs)("span",{children:[null==s?void 0:s.first_name," "]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("user.lastName")}),(0,t.jsx)("span",{children:null==s?void 0:s.last_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("user.phone")}),(0,t.jsx)("span",{children:(null==s?void 0:s.phone)?s.phone:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("user.birthday")}),(0,t.jsx)("span",{children:v})]}),(0,t.jsxs)("button",{onClick:()=>x(!0),children:[(0,t.jsx)("i",{className:"bx bx-pencil"})," ",e("edit")]})]}),(0,t.jsx)("div",{className:c().user_email,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"email"}),(0,t.jsx)("span",{children:null==s?void 0:s.email})]})}),(0,t.jsxs)("div",{className:c().user_email,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"password"}),(0,t.jsx)("span",{children:"**********"})]}),(0,t.jsxs)("button",{onClick:()=>h(!0),children:[(0,t.jsx)("i",{className:"bx bx-pencil"})," ",e("edit")]})]}),(0,t.jsxs)("div",{className:c().user_email,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"newsletter"}),_?(0,t.jsx)("span",{children:e("user.unsubscribeText")}):(0,t.jsx)("span",{children:e("user.subscribeText")})]}),_?(0,t.jsx)("button",{onClick:A,children:e("user.unsubscribe")}):(0,t.jsx)("button",{onClick:g,children:e("user.subscribe")})]}),(0,t.jsxs)("p",{className:c().logout,children:[(0,t.jsx)("i",{className:"bx bx-arrow-back"}),e("auth.signOut")]})]}),(0,t.jsx)(f.u,{open:p,onClose:function(){x(!1)},center:!0,styles:{modal:{padding:"48px 32px"}},children:(0,t.jsx)(b,{setModalChangeInfo:x,birthDate:i})}),(0,t.jsx)(f.u,{open:o,onClose:function(){h(!1)},center:!0,styles:{modal:{padding:"48px 32px"}},children:(0,t.jsx)(m,{user:s,setModalChangePassword:h})})]})};var w=n(7435),N=n.n(w),y=n(9991),S=n.n(y);let C=e=>{let{address:s,setModalUpdateAddress:n}=e,{t:i}=(0,l.$G)("common"),[d,o]=(0,r.useState)([]),[c,u]=(0,r.useState)(!1),[h,p]=(0,r.useState)(s.first_name),[x,_]=(0,r.useState)(s.last_name),[m,j]=(0,r.useState)(s.address1),[v,g]=(0,r.useState)(s.address2),[b,f]=(0,r.useState)(s.company),[A,
1w]=(0,r.useState)(s.city),[N,y]=(0,r.useState)(s.state_or_province),[C,F]=(0,r.useState)(s.postal_code),[P,O]=(0,r.useState)(s.country_code),[z,I]=(0,r.useState)(s.phone);return(0,r.useEffect)(()=>{u(!0),(0,a.v9)().then(e=>{o(e.data),u(!1)}).catch(e=>{console.log(e),u(!1)})},[]),(0,t.jsx)(t.Fragment,{children:!c&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{children:"Modifica Indirizzo"}),(0,t.jsxs)("div",{className:S().form_container,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"firstName",children:i("user.address.firstName")}),(0,t.jsx)("input",{type:"text",name:"firstName",id:"firstName",value:h,onChange:e=>p(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"lastaName",children:i("user.address.lastName")}),(0,t.jsx)("input",{type:"text",name:"lastaName",id:"lastName",value:x,onChange:e=>_(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"country",children:i("user.address.country")}),(0,t.jsx)("select",{name:"country",id:"country",onChange:e=>O(e.target.value),value:P,children:d.map(e=>(0,t.jsx)("option",{value:e.country_iso2,children:e.country},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"state",children:i("user.address.stateOrProvince")}),(0,t.jsx)("input",{type:"text",name:"state",id:"state",value:N,onChange:e=>y(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"city",children:i("user.address.city")}),(0,t.jsx)("input",{type:"text",name:"city",id:"city",value:A,onChange:e=>w(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"zipCode",children:i("user.address.postalCode")}),(0,t.jsx)("input",{type:"text",name:"zipCode",id:"zipCode",value:C,onChange:e=>F(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"street",children:i("user.address.address")}),(0,t.jsx)("input",{type:"text",name:"street",id:"street",value:m,onChange:e=>j(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"street2",children:[i("user.address.address2")," ",(0,t.jsxs)("small",{children:["(",i("optional"),")"]})]}),(0,t.jsx)("input",{type:"text",name:"street2",id:"street2",value:v,onChange:e=>g(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"company",children:[i("user.address.company")," ",(0,t.jsxs)("small",{children:["(",i("optional"),")"]})]}),(0,t.jsx)("input",{type:"text",name:"company",id:"company",value:b,onChange:e=>f(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",children:i("user.address.phoneNumber")}),(0,t.jsx)("input",{type:"text",name:"phone",id:"phone",value:z,onChange:e=>I(e.target.value)})]})]}),(0,t.jsxs)("div",{className:S().btn_container,children:[(0,t.jsx)("button",{type:"button",onClick:function(){let e=[{id:s.id,first_name:h,last_name:x,company:b,address1:m,address2:v,city:A,state_or_province:N,postal_code:C,country_code:P,phone:z}];(0,a.y3)(e).then(e=>{console.log("Indirizzo aggiunto correttamente"),n(!1)}).catch(e=>console.log(e))},children:i("user.confirm")}),(0,t.jsxs)("button",{type:"button",onClick:function(){n(!1),window.scrollTo(0,0)},children:[(0,t.jsx)("i",{className:"bx bx-chevron-left"})," ",i("user.turnBack")]})]})]})})},F=e=>{let{setModalAddAddress:s}=e,{t:n}=(0,l.$G)("common"),[i,d]=(0,r.useState)([]),[o,c]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),[p,x]=(0,r.useState)(""),[_,m]=(0,r.useState)(""),[v,g]=(0,r.useState)(""),[b,f]=(0,r.useState)(""),[A,w]=(0,r.useState)(""),[N,y]=(0,r.useState)(""),[C,F]=(0,r.useState)(""),[P,O]=(0,r.useState)(""),[z,I]=(0,r.useState)("");return(0,r.useEffect)(()=>{c(!0),(0,a.v9)().then(e=>{d(e.data),c(!1)}).catch(e=>{console.log(e),c(!1)})},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{children:n("user.addNewAddress")}),o?(0,t.jsx)(j.Z,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:S().form_container,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"",children:[n("user.address.firstName")," "]}),(0,t.jsx)("input",{type:"text",name:"name",id:"name",onChange:e=>h(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"",children:[n("user.address.lastName")," "]}),(0,t.jsx)("input",{type:"text",name:"lastName",id:"lastName",onChange:e=>x(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.country")}
1),(0,t.jsx)("select",{name:"",id:"",onChange:e=>O(e.target.value),children:i.map(e=>(0,t.jsx)("option",{value:e.country_iso2,children:e.country},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.stateOrProvince")})," ",(0,t.jsx)("input",{type:"text",onChange:e=>y(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.city")})," ",(0,t.jsx)("input",{type:"text",onChange:e=>w(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.postalCode")})," ",(0,t.jsx)("input",{type:"text",onChange:e=>F(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.address")})," ",(0,t.jsx)("input",{type:"text",onChange:e=>m(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"",children:[n("user.address.address2")," ",(0,t.jsxs)("small",{children:["(",n("optional"),")"]})]}),(0,t.jsx)("input",{type:"text",onChange:e=>g(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"",children:[n("user.address.company")," ",(0,t.jsxs)("small",{children:["(",n("optional"),")"]})]}),(0,t.jsx)("input",{type:"text",onChange:e=>f(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"",children:n("user.address.phoneNumber")})," ",(0,t.jsx)("input",{type:"text",onChange:e=>I(e.target.value)})]})]}),(0,t.jsxs)("div",{className:S().btn_container,children:[(0,t.jsx)("button",{onClick:function(){(0,a.p6)([{first_name:u,last_name:p,company:b,address1:_,address2:v,city:A,state_or_province:N,postal_code:C,country_code:P,phone:z}]).then(e=>{200===e.status&&console.log("Indirizzo aggiunto correttamente"),422===e.status&&console.log("Impossibile aggiungere indirizzo, dati mancanti o non validi"),s(!1)}).catch(e=>console.log(e))},children:n("user.confirm")}),(0,t.jsxs)("button",{onClick:function(){s(!1),window.scrollTo(0,0)},children:[(0,t.jsx)("i",{className:"bx bx-chevron-left"}),n("user.turnBack")]})]})]})]})},P=()=>{let{t:e}=(0,l.$G)("common"),[s,n]=(0,r.useState)([]),[i,d]=(0,r.useState)(!1),[o,c]=(0,r.useState)(!1),[u,h]=(0,r.useState)(!1),[p,x]=(0,r.useState)();function _(){(0,a.te)().then(e=>{d(!1),n(e.data.data)}).catch(e=>{d(!1),console.log(e)})}return(0,r.useEffect)(()=>{d(!0),_()},[o,u]),(0,t.jsxs)("div",{className:N().navtab_item,children:[(0,t.jsxs)("div",{children:[!o&&!u&&(0,t.jsx)("h1",{children:e("user.addresses")}),i?(0,t.jsx)(j.Z,{}):"",!o&&!u&&(0,t.jsxs)("div",{className:N().user_addresses,children:[!i&&s.length>0&&s.map((s,n)=>(0,t.jsxs)("div",{className:N().card_address,children:[(0,t.jsxs)("p",{children:[s.first_name," ",s.last_name]}),(0,t.jsx)("p",{children:s.address1}),(0,t.jsx)("p",{children:s.address2}),(0,t.jsx)("p",{children:s.city}),(0,t.jsx)("p",{children:s.country}),(0,t.jsx)("p",{children:s.postal_code}),(0,t.jsx)("p",{children:s.state_or_province}),(0,t.jsx)("p",{children:s.company}),(0,t.jsxs)("p",{children:[e("user.phone"),": ",s.phone]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>{h(!0),x(s)},children:[(0,t.jsx)("i",{className:"bx bxs-pencil"}),e("edit")]}),(0,t.jsx)("button",{onClick:()=>(function(e){(0,a._N)(e).then(e=>{console.log("Indirizzo eliminato con successo"),_()}).catch(e=>console.log(e))})(s.id),children:(0,t.jsx)("i",{className:"bx bxs-trash-alt"})})]})]},n)),!i&&0==s.length&&(0,t.jsx)("p",{children:e("user.noAddresses")}),!i&&(0,t.jsxs)("div",{className:N().new_address,onClick:()=>c(!0),children:[(0,t.jsx)("p",{children:"+"}),(0,t.jsx)("p",{children:e("user.addNewAddress")})]})]})]}),u&&(0,t.jsx)(C,{address:p,setModalUpdateAddress:h}),o&&(0,t.jsx)(F,{setModalAddAddress:c})]})};var O=n(6854),z=n.n(O),I=n(1163);let D=(e,s)=>{let n=new Date(Date.parse(e)),t="";switch(s){case"it":t=n.toLocaleDateString("it-IT",{day:"numeric",month:"long",year:"numeric"});break;case"en":t=n.toLocaleDateString("en-us",{day:"numeric",month:"long",year:"numeric"})}return t};var k=n(5675),E=n.n(k),R=n(3196),B=n.n(R),Z=n(3698),L=function(e){let{product:s,showOptions:n=!0}=e,[i,d]=(0,r.useState)(null),[l,o]=(0,r.useState)(),[c,u]=(0,r.useState)(0);return(0,r.useEffect)(()=>{o(!0),(0,a.GS)(s.sku,200,200).then(e=>{let s=e.data.find(e=>!0===e.is_thumbnail);d(s),o(!1)}).catch(e=>{console.log(e),o(!1)}),(0,a.Pr)(s.product_id,s.variant_id).then(e=>{var n,t,r,a,i,d,l,o;u((null===(n=null===(t=e.data.data)||void 0===t?void 0:null===(r=t.site)||void 0===r?void 0:null===(a=r.product)||void 0===a?void 0:null===(i=a.variants)||void 0===i?void 0:i.edges[0])||void 0===n?void 0:null===(d=n.node)||void 0===d?void 0:null===(l=d.prices)||void 0===l?void 0:null===(o=l.basePrice)||void 0===o?void 0:o.value)||s.base_price)}).catch(e=>{console.log(e)})},[]),(0,t.jsxs)("div",{className:B().productRow,children:[l?(0,t.jsx)(j.Z,{}):(0,t.jsx)(E(),{src:(null==i?void 0:i.url)||Z.Z,alt:(null==i?void 0:i.description)||s.name,height:200,width:150}),(0,t.jsx)("div",{className:B().productName,children:(0,t.jsxs)("p",{children:[s.name," ",(0,t.jsxs)("span",{children:["x",s.quantity]})]})}),n&&s.product_options.length>0?(0,t.jsx)("div",{className:B().productOptions,children:s.product_options.map((e,s)=>(0,t.jsxs)("p",{children:[e.display_name,": ",(0,t.jsx)("span",{children:e.display_value})]},e.id))}):"",(0,t.jsxs)("div",{className:B().productPrice,children:[Number(c)>0&&Number(c)!==Number(s.price_inc_tax)?(0,t.jsx)("div",{style:{textDecoration:"line-through",color:"#808080"},children:(0,t.jsxs)("span",{children:[Number(c).toFixed(2),"€"]})}):"",(0,t.jsx)("div",{children:Number(s.price_inc_tax)>0&&(0,t.jsxs)("span",{children:[Number(s.price_inc_tax).toFixed(2),"€"]})})]})]},s.id)},M=function(e){let{orderId:s,showOptions:n}=e,[i,d]=(0,r.useState)([]),[l,o]=(0,r.useState)();return(0,r.useEffect)(()=>{o(!0),s&&(0,a.Lp)(s).then(e=>{d(e.data),o(!1)}).catch(e=>{console.log(e),o(!1)})},[s]),(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(j.Z,{}):"",!l&&i.length<1?(0,t.jsx)("p",{children:"Non sono presenti prodotti"}):"",!l&&i.length>0?(0,t.jsx)("div",{className:B().sigleProducts_container,children:i.map(e=>(0,t.jsx)(L,{product:e,showOptions:n},e.id))}):""]})}
1,U=function(e){let{order:s,setOrderId:n,setModalDetail:r}=e,a=(0,I.useRouter)(),{locale:i}=a,{t:d}=(0,l.$G)("common"),o=D(null==s?void 0:s.date_created,i),c=()=>{n(s.id),r(!0),window.scrollTo(0,0)};return(0,t.jsxs)("div",{className:z().order,children:[(0,t.jsxs)("div",{className:z().order_number,children:[(0,t.jsxs)("p",{children:[d("user.ordersSection.number")," "]}),(0,t.jsxs)("span",{children:["#",s.id]})]}),(0,t.jsxs)("div",{className:z().order_info_container,children:[(0,t.jsxs)("div",{className:z().order_info,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:d("user.ordersSection.date")}),(0,t.jsx)("span",{children:o})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:d("user.ordersSection.total")}),(0,t.jsxs)("span",{children:[Number(s.total_inc_tax).toFixed(2),"€"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:d("user.ordersSection.shipping")}),(0,t.jsxs)("span",{children:[Number(s.shipping_cost_inc_tax).toFixed(2),"€"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:d("user.ordersSection.status")}),"en"==i&&(0,t.jsx)("span",{children:s.status}),"it"==i&&(null==s?void 0:s.status)=="Shipped"?(0,t.jsx)("span",{children:"Spedito"}):(null==s?void 0:s.status)=="Pending"?(0,t.jsx)("span",{children:"Sospeso"}):(null==s?void 0:s.status)=="Awaiting Payment"?(0,t.jsx)("span",{children:"In attesa di pagamento"}):(null==s?void 0:s.status)=="Awaiting Fulfillment"?(0,t.jsx)("span",{children:"In attesa di evasione"}):(null==s?void 0:s.status)=="Awaiting Shipment"?(0,t.jsx)("span",{children:"In attesa di spedizione"}):(null==s?void 0:s.status)=="Awaiting Pickup"?(0,t.jsx)("span",{children:"In attesa di ritiro"}):(null==s?void 0:s.status)=="Partially Shipped"?(0,t.jsx)("span",{children:"Parzialmente spedito"}):(null==s?void 0:s.status)=="Completed"?(0,t.jsx)("span",{children:"Completato"}):(null==s?void 0:s.status)=="Declined"?(0,t.jsx)("span",{children:"Rifiutato"}):(null==s?void 0:s.status)=="Cancelled"?(0,t.jsx)("span",{children:"Annullato"}):(null==s?void 0:s.status)=="Refunded"?(0,t.jsx)("span",{children:"Rimborsato"}):(null==s?void 0:s.status)=="Disputed"?(0,t.jsx)("span",{children:"Contestato"}):(null==s?void 0:s.status)=="Manual Verification Required"?(0,t.jsx)("span",{children:"In attesa di verifica manuale"}):(null==s?void 0:s.status)=="Partially Refunded"?(0,t.jsx)("span",{children:"Parzialmente rimborsato"}):""]})]}),(0,t.jsx)("button",{onClick:c,children:d("user.ordersSection.details")})]}),(0,t.jsx)(M,{orderId:s.id,showOptions:!1})]})},G=n(3409),Q=n.n(G),T=n(1664),q=n.n(T),$=function(e){let{orderId:s,orders:n,setModalDetail:i}=e,{t:d}=(0,l.$G)("common"),o=(0,I.useRouter)(),{locale:c}=o,[u,h]=(0,r.useState)([]),p=n.find(e=>e.id===s),x=D(null==p?void 0:p.date_created,c),_=Number(null==p?void 0:p.subtotal_inc_tax).toFixed(2);Number(null==p?void 0:p.subtotal_tax).toFixed(2);let m=Number(null==p?void 0:p.shipping_cost_inc_tax).toFixed(2);Number(null==p?void 0:p.shipping_cost_tax).toFixed(2);let j=Number(null==p?void 0:p.total_inc_tax).toFixed(2),v=Number(null==p?void 0:p.total_tax).toFixed(2);return(0,r.useEffect)(()=>{s&&(0,a.b9)(s).then(e=>h(e.data))},[s]),(0,t.jsxs)("div",{className:Q().detail_container,children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsxs)("h1",{children:[d("user.order")," #",null==p?void 0:p.id]}),(0,t.jsxs)("button",{onClick:()=>i(!1),children:[(0,t.jsx)("i",{className:"bx bx-chevron-left"})," ",d("back")]})]}),(0,t.jsxs)("div",{className:Q().info_container,children:[(0,t.jsxs)("div",{className:Q().order_group_info,children:[(0,t.jsx)("h2",{children:d("details")}),(0,t.jsxs)("p",{children:[d("user.dateOrder"),": ",(0,t.jsx)("span",{children:x})]}),(0,t.jsxs)("p",{children:[d("user.orderStatus"),":  ","en"==c&&(0,t.jsx)("span",{children:null==p?void 0:p.status}),"it"==c&&(null==p?void 0:p.status)=="Shipped"?(0,t.jsx)("span",{children:"Spedito"}):(null==p?void 0:p.status)=="Pending"?(0,t.jsx)("span",{children:"Sospeso"}):(null==p?void 0:p.status)=="Awaiting Payment"?(0,t.jsx)("span",{children:"In attesa di pagamento"}):(null==p?void 0:p.status)=="Awaiting Fulfillment"?(0,t.jsx)("span",{children:"In attesa di evasione"}):(null==p?void 0:p.status)=="Awaiting Shipment"?(0,t.jsx)("span",{children:"In attesa di spedizione"}):(null==p?void 0:p.status)=="Awaiting Pickup"?(0,t.jsx)("span",{children:"In attesa di ritiro"}
1):(null==p?void 0:p.status)=="Partially Shipped"?(0,t.jsx)("span",{children:"Parzialmente spedito"}):(null==p?void 0:p.status)=="Completed"?(0,t.jsx)("span",{children:"Completato"}):(null==p?void 0:p.status)=="Declined"?(0,t.jsx)("span",{children:"Rifiutato"}):(null==p?void 0:p.status)=="Cancelled"?(0,t.jsx)("span",{children:"Annullato"}):(null==p?void 0:p.status)=="Refunded"?(0,t.jsx)("span",{children:"Rimborsato"}):(null==p?void 0:p.status)=="Disputed"?(0,t.jsx)("span",{children:"Contestato"}):(null==p?void 0:p.status)=="Manual Verification Required"?(0,t.jsx)("span",{children:"In attesa di verifica manuale"}):(null==p?void 0:p.status)=="Partially Refunded"?(0,t.jsx)("span",{children:"Parzialmente rimborsato"}):""]}),(0,t.jsxs)("p",{children:[d("user.notes"),":  ",(0,t.jsx)("span",{children:null==p?void 0:p.customer_message})]})]}),(0,t.jsxs)("div",{className:Q().order_group_info,children:[(0,t.jsx)("h2",{children:d("user.paymentInfo")}),(0,t.jsxs)("p",{children:[d("user.subTotal"),":  ",(0,t.jsxs)("span",{children:[_,"€  "]})]}),(0,t.jsxs)("p",{children:[d("user.shippingCost"),":  ",(0,t.jsxs)("span",{children:[" ",m,"€ "]})]}),u.length>0&&u.map(e=>(0,t.jsxs)("p",{children:[d("user.couponCode")," (",(0,t.jsx)("b",{children:e.code}),"):",(0,t.jsxs)("span",{children:[" -",Number(e.discount).toFixed(2),"€ "]})]},e.id)),Number(null==p?void 0:p.discount_amount)?(0,t.jsxs)("p",{children:[d("user.discountApplied"),":  ",(0,t.jsxs)("span",{children:[" -",Number(null==p?void 0:p.discount_amount).toFixed(2),"€  "]})]}):"",(0,t.jsxs)("p",{children:[d("user.total"),":  ",(0,t.jsxs)("span",{children:[" ",j,"€  "]})]}),(0,t.jsxs)("p",{children:[d("user.tax"),":  ",(0,t.jsxs)("span",{children:[" ",v,"€  "]})]}),(0,t.jsxs)("p",{children:[d("user.paymentMethod"),":  ",(0,t.jsx)("span",{children:null==p?void 0:p.payment_method})]})]}),(0,t.jsxs)("div",{className:Q().order_address,children:[(0,t.jsx)("h2",{children:d("user.billingAddress")}),(0,t.jsxs)("p",{children:[null==p?void 0:p.billing_address.first_name," ",null==p?void 0:p.billing_address.last_name]}),(null==p?void 0:p.billing_address.company)&&(0,t.jsxs)("p",{children:[d("user.address.company"),": ",null==p?void 0:p.billing_address.company]}),(0,t.jsx)("p",{children:null==p?void 0:p.billing_address.street_1}),(null==p?void 0:p.billing_address.street_2)&&(0,t.jsxs)("p",{children:[d("user.address.address2"),": ",null==p?void 0:p.billing_address.street_2]}),(0,t.jsxs)("p",{children:[" ",null==p?void 0:p.billing_address.zip," ",null==p?void 0:p.billing_address.city," ",null==p?void 0:p.billing_address.state," "]}),(0,t.jsx)("p",{children:null==p?void 0:p.billing_address.country}),(null==p?void 0:p.billing_address.phone)&&(0,t.jsx)("p",{children:null==p?void 0:p.billing_address.phone}),(0,t.jsx)("p",{children:null==p?void 0:p.billing_address.email})]})]}),(0,t.jsx)("div",{className:Q().returnButton,children:(0,t.jsx)("button",{children:(0,t.jsx)(q(),{href:"https://www.shippypro.com/return-form.html?return_form_id=6495",target:"_blank",children:d("user.makeReturn")})})}),(0,t.jsxs)("div",{className:Q().order_group_info,children:[(0,t.jsx)("h2",{children:d("purchase")}),(0,t.jsx)(M,{orderId:s})]})]})};n(1275);let X=()=>{let{t:e}=(0,l.$G)("common"),[s,n]=(0,r.useState)([]),[i,d]=(0,r.useState)(1),[o,c]=(0,r.useState)(!1),[u,h]=(0,r.useState)(!1),[p,x]=(0,r.useState)(!1),[_,m]=(0,r.useState)(null);return(0,r.useEffect)(()=>{h(!0),(0,a.AU)({page:i}).then(e=>{n(e.data.orders),c(e.data.hasNextPage),h(!1)}).catch(e=>{console.log(e),h(!1)})},[i]),(0,t.jsxs)("div",{className:z().orders_container,children:[u?(0,t.jsx)(j.Z,{}):"",u||!((null==s?void 0:s.length)<1)&&s?"":(0,t.jsx)("p",{children:e("user.noOrders")}),u||p||!((null==s?void 0:s.length)>0)?"":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{children:e("user.myOrders")}),null==s?void 0:s.map(e=>(0,t.jsx)(U,{order:e,setOrderId:m,setModalDetail:x},e.id)),(0,t.jsxs)("div",{className:z().ordersPagination,children:[(0,t.jsx)("div",{className:z().prevPageButton,children:i>1&&(0,t.jsx)("button",{onClick:()=>d(e=>e-1),children:e("user.previous")})}),(0,t.jsx)("div",{className:z().nextPageButton,children:o&&(0,t.jsx)("button",{onClick:()=>d(e=>e+1),children:e("user.next")})})]})]}
1),p&&(0,t.jsx)($,{orders:s,orderId:_,setModalDetail:x})]})},H=e=>{let{categoriesTree:s}=e,{t:n}=(0,l.$G)("common"),o=[{name:n("user.myAccount"),component:(0,t.jsx)(A,{})},{name:n("user.myaddresses"),component:(0,t.jsx)(P,{})},{name:n("user.myOrders"),component:(0,t.jsx)(X,{})}],[u,h]=(0,r.useState)(0),[p,x]=(0,r.useState)(o[0].component),_=e=>{h(e),x(o[e].component)},m=()=>{(0,a.J0)().then(e=>{var s,n,t;((null==e?void 0:null===(s=e.data)||void 0===s?void 0:null===(n=s.data)||void 0===n?void 0:null===(t=n.logout)||void 0===t?void 0:t.result)==="success"||null===e.data.data)&&(console.log("logout effettuato con successo"),(0,i.signOut)())})};return(0,t.jsx)(d.Z,{title:n("user.userPage"),description:n("user.userPage"),categoriesTree:s,children:(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("div",{className:c().navtab_container,children:[(0,t.jsxs)("ul",{children:[o.map((e,s)=>(0,t.jsx)("li",{onClick:()=>_(s),children:(0,t.jsx)("p",{className:u===s?c().active:"",children:e.name})},e.name)),(0,t.jsxs)("li",{children:[(0,t.jsxs)("p",{onClick:m,children:[(0,t.jsx)("i",{className:"bx bx-arrow-back"}),n("auth.signOut")]})," "]})]}),p]})})})};var V=!0,K=H},4710:function(e){e.exports={loading:"DotsLoader_loading__MLj_N",dots:"DotsLoader_dots__jmq59"}},7435:function(e){e.exports={navtab_item:"Address_navtab_item__wlEgq",user_addresses:"Address_user_addresses__hVfBC",card_address:"Address_card_address__j03pr",new_address:"Address_new_address__qrDZ7",add_address:"Address_add_address__XbWzG",btn_container:"Address_btn_container__P5ayo"}},1765:function(e){e.exports={change_password_container:"ChangePassword_change_password_container__2B21W",error_component:"ChangePassword_error_component__Y4_ZI",btn_container:"ChangePassword_btn_container__DROjC"}},3409:function(e){e.exports={detail_container:"OrderDetail_detail_container__MpzXM",order_group_info:"OrderDetail_order_group_info__jYrUZ",order_address:"OrderDetail_order_address__Ns1bL",info_container:"OrderDetail_info_container__yZfSz"}},6854:function(e){e.exports={orders_container:"OrderList_orders_container__nlTS5",ordersPagination:"OrderList_ordersPagination__Im6aQ",order:"OrderList_order__TKvIB",order_number:"OrderList_order_number__VQaCu",order_info_container:"OrderList_order_info_container__3AXWd",order_info:"OrderList_order_info__JSoVb"}},3196:function(e){e.exports={productRow:"OrderProducts_productRow__7qwjs",productName:"OrderProducts_productName__zj2AC",productOptions:"OrderProducts_productOptions__G_A00",sigleProducts_container:"OrderProducts_sigleProducts_container__CX_Q9",productPrice:"OrderProducts_productPrice__9tk_X"}},9991:function(e){e.exports={form_container:"UpdateAddress_form_container__WL0NG",btn_container:"UpdateAddress_btn_container__qfHlC"}},598:function(e){e.exports={updateInfo_container:"UpdateUserInfo_updateInfo_container__evIX7",btn_container:"UpdateUserInfo_btn_container__7ERl0",name:"UpdateUserInfo_name__nvtpg"}},7988:function(e){e.exports={navtab_container:"user_navtab_container__83Gv5",active:"user_active___wQUZ",navtab_item:"user_navtab_item__SSmq6",user_info:"user_user_info__s9FPF",logout:"user_logout__eR8Hd",user_email:"user_user_email___bjoK"}}},function(e){e.O(0,[2742,3753,9774,2888,179],function(){return e(e.s=6415)}),_N_E=e.O()}]);

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.