1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6338],{620:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/support/rma",function(){return n(20364)}])},28787:function(e,r,n){"use strict";var t=n(24246),l=n(87685),i=n(76387),o=n(46197),a=n(27378),d=n(13377),s=n(83941),u=n(22052),c=n(37235);r.Z=e=>{let{children:r,items:n,setCaptcha:m,newIconText:h,_selectProps:x,...p}=e,[v]=(0,l.zf)(),[j,f]=(0,a.useState)(null),[b,g]=(0,a.useState)(!1),{general:y,stringify:w}=(0,s.$Y)(),N=(0,i.Fg)(),[_]=(0,d.a)("(min-width: ".concat(N.breakpoints.md,")")),I=(0,a.useMemo)(()=>null==v?void 0:v.filter(e=>e.content).map(e=>({label:w(e.name),value:e.id})),[v,w]),C=(0,a.useMemo)(()=>n.filter(e=>I.find(r=>{var n,t;return null===(t=e.subCategories)||void 0===t?void 0:null===(n=t["product-type"])||void 0===n?void 0:n.find(e=>e.id===r.value)})),[I,n]),Z=(0,a.useMemo)(()=>C[Math.floor(Math.random()*C.length)],[C]);return(0,a.useEffect)(()=>{if(null!==j){var e,r;if(Array.isArray(null==Z?void 0:null===(e=Z.subCategories)||void 0===e?void 0:e["product-type"])&&(null==Z?void 0:null===(r=Z.subCategories)||void 0===r?void 0:r["product-type"].map(e=>e.id).includes(j))){g(!1),null==m||m("correct");return}g(!0),null==m||m("wrong")}},[j]),(0,t.jsxs)(i.Kq,{"data-testid":"captcha-card",...p,direction:{_:"column",sm:"row"},gap:"3rem",justifyContent:"space-between",children:[(0,t.jsxs)(i.Kq,{id:"captcha-wrapper",position:"relative",direction:"column",gap:"2rem",wrapItems:!0,children:[(0,t.jsx)(i.xu,{children:(0,t.jsx)(u.nv,{maxWidth:"41rem",children:w(y.values.captchaInfo)})}),Z&&(0,t.jsx)("div",{"data-testid":"captcha-product",style:{display:_?"none":"block"},children:(0,t.jsx)(l._3,{content:Z,variant:"simple",overflow:"hidden",target:"_blank",children:(0,t.jsx)(c.Z,{product:Z,width:"100%",maxWidth:"30rem"})})}),(0,t.jsx)(i.xu,{position:"relative",...b&&{border:"1px solid red"},width:"100%",maxWidth:"41rem",children:(0,t.jsx)(o.Z,{options:I,isDisabled:!!j&&!b,onChange:e=>f(e.value),menuPortalTarget:document.getElementById("captcha-wrapper"),styles:{menuPortal:e=>({...e,zIndex:999999,top:_?"16rem":"49rem",left:"2px"})},...x})}),(0,t.jsx)("div",{style:{visibility:b?"visible":"hidden"},children:(0,t.jsx)(i.ZT,{variant:"h5",alignSelf:"center",...b&&{color:"#e13030"},fontWeight:"bold",children:w(y.values.captchaError)})}),(0,t.jsx)(i.xu,{maxWidth:"41rem",children:r})]}),Z&&(0,t.jsx)("div",{"data-testid":"captcha-product",style:{display:_?"block":"none"},children:(0,t.jsx)(l._3,{content:Z,variant:"simple",overflow:"hidden",target:"_blank",children:(0,t.jsx)(c.Z,{newIconText:h,product:Z,width:"100%",maxWidth:"30rem"})})})]})}},20364:function(e,r,n){"use strict";n.r(r),n.d(r,{__N_SSG:function(){return _}});var t=n(24246),l=n(18869),i=n(76387),o=n(3755),a=n(38331),d=n(34090),s=n(27378),u=n(9756),c=n(83941),m=n(45495),h=n(89293),x=n(28787),p=n(68301),v=n(67921),j=n.n(v),f=n(81628),b=n(60639),g=n(86677),y=n(31153),w=n(46737);let N=()=>{var e,r,n,o,v,N,_;let I=(0,l.lt)(),{general:{values:{validEmail:C,cannotContainSpaces:Z,tooLong:S}},stringify:q}=(0,c.$Y)(),{locale:T}=(0,g.useRouter)(),{user:R}=(0,u.a)(),{values:k}
1=(0,l.bL)(),[E]=(0,l.CT)(),[W,M]=(0,s.useState)(!1),[A,V]=(0,s.useState)(!1),[P,D]=(0,s.useState)(null),[F,K]=(0,s.useState)("null"),[z,O]=(0,s.useState)("null"),[B,X]=(0,s.useState)(null),[$,J]=(0,s.useState)(null);(0,s.useEffect)(()=>{null===B&&X(E)},[E,B]),(0,s.useEffect)(()=>{let e=j().getJSON(f.ti.userData);e&&D(e)},[]);let L=(0,p.Ry)().shape({company:(0,p.Z_)().required(),fullname:(0,p.Z_)().required(),email:(0,p.Z_)().email(q(C)).required(),phone:(0,p.Z_)().required(),productName:(0,p.Z_)().required(),serialNumber:(0,p.Z_)().required().max(12,q(S)).test("",q(null!=Z?Z:""),e=>!/(\s+)/.test(null!=e?e:"")),comment:(0,p.Z_)().required()}),Q={company:null!==(r=null!==(e=null==R?void 0:R.company)&&void 0!==e?e:null==P?void 0:P.company)&&void 0!==r?r:"",fullname:(null==R?void 0:R.firstName)&&(null==R?void 0:R.lastName)?"".concat(R.firstName," ").concat(R.lastName):null!==(n=null==P?void 0:P.name)&&void 0!==n?n:"",email:null!==(v=null!==(o=null==R?void 0:R.email)&&void 0!==o?o:null==P?void 0:P.email)&&void 0!==v?v:"",phone:null!==(_=null!==(N=null==R?void 0:R.phone)&&void 0!==N?N:null==P?void 0:P.phone)&&void 0!==_?_:"",productName:"",serialNumber:"",comment:""};return"success"===z||"error"===z?(window.scrollTo(0,0),setTimeout(()=>O("null"),4e3),(0,t.jsx)(i.W2,{flexDirection:"column",paddingTop:{_:"3rem",sm:"5rem"},paddingBottom:{_:"6rem",sm:"10rem"},children:(0,t.jsx)(i.xu,{width:"85rem",maxWidth:"100%",margin:"auto",textAlign:"center",children:(0,t.jsxs)(i.Kq,{direction:"column",gap:{_:"2rem",sm:"3rem"},wrapItems:!0,children:[(0,t.jsx)(a.Z,{children:(0,t.jsx)(l.CR,{value:q(k.title)})}),"success"===z?(0,t.jsx)(b.O,{}):(0,t.jsx)(b.MQ,{}),(0,t.jsx)(i.ZT,{mt:"6rem",variant:"h3",fontWeight:"bold",alignSelf:"center",children:q("success"===z?k.formSubmitCorrect:k.formSubmitError)})]})})})):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Z,{paddingTop:{_:"3rem",sm:"5rem"},children:(0,t.jsx)(l.CR,{value:q(k.title)})}),(0,t.jsx)(d.J9,{enableReinitialize:!0,initialValues:null!=$?$:Q,validationSchema:L,onSubmit:e=>{V(!0),I.web.postRmaEmail({serialNumber:e.serialNumber.padStart(12,"0"),productName:e.productName,company:e.company,fullname:e.fullname,email:e.email,comment:e.comment,phone:e.phone,locale:null!=T?T:"en"},(0,y.I)(null!=T?T:"en")).then(r=>{var n,t,l,i,o,a,d,s,u,c,m;V(!1);let h=(null==R?void 0:R.firstName)&&(null==R?void 0:R.lastName)?"".concat(R.firstName," ").concat(R.lastName):null!==(n=null==P?void 0:P.name)&&void 0!==n?n:"";if(J({company:null!==(i=null!==(l=null!==(t=null==e?void 0:e.company)&&void 0!==t?t:null==R?void 0:R.company)&&void 0!==l?l:null==P?void 0:P.company)&&void 0!==i?i:"",fullname:null!==(o=null==e?void 0:e.fullname)&&void 0!==o?o:h,email:null!==(s=null!==(d=null!==(a=null==e?void 0:e.email)&&void 0!==a?a:null==R?void 0:R.email)&&void 0!==d?d:null==P?void 0:P.email)&&void 0!==s?s:"",phone:null!==(m=null!==(c=null!==(u=null==e?void 0:e.phone)&&void 0!==u?u:null==R?void 0:R.phone)&&void 0!==c?c:null==P?void 0:P.phone)&&void 0!==m?m:"",productName:"",serialNumber:"",comment:""}),!r.ok){O("error");return}O("success"),!R&&(0,f.o)().includes(f.FD.Functionality)&&j().set(f.ti.userData,{email:e.email,fullname:e.fullname,company:e.company,phone:e.phone},{sameSite:"Strict",expires:f.Qv})},e=>{O("error"),V(!1),(0,w.Mr)({error:e,message:"Unexpected error occurred while submitting support RMA form"})}).catch(e=>{V(!1),O("error"),(0,w.Mr)({error:e,message:"Unexpected error occurred while submitting support RMA form"})})},children:e=>{let{errors:r}=e;return(0,t.jsx)(d.l0,{children:(0,t.jsxs)(i.W2,{display:"flex",alignItems:{md:"center"},flexDirection:"column",width:{_:"90%"},maxWidth:"85rem",mb:"8rem",children:[(0,t.jsxs)("div",{"data-testid":"support-form-content",style:{width:"100%"},children:[(null==k?void 0:k.desc)&&(0,t.jsx)(i.ZT,{variant:"h2",mt:"3rem",mb:"3rem",children:(0,t.jsx)(h.Z,{value:k.desc})}),(0,t.jsxs)(i.Kq,{direction:{_:"column",md:"row"},gap:{_:"1.5rem",sm:"3rem"},width:"100%",mt:"3rem",children:[(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"company",children:e=>{let{field:r,meta:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.company),context:"isRequired",errorContext:n.error&&n.touched?"isInvalid":"normal",...n.touched&&{error:n.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...r})})}})}),(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"fullname",children:e=>{let{field:r,meta:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.name),context:"isRequired",errorContext:n.error&&n.touched?"isInvalid":"normal",...n.touched&&{error:n.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...r})})}})})]}),(0,t.jsxs)(i.Kq,{direction:{_:"column",md:"row"},gap:{_:"1.5rem",sm:"3rem"},width:"100%",mt:"3rem",children:[(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"email",children:e=>{let{field:r,meta:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.email),context:"isRequired",errorContext:n.error&&n.touched?"isInvalid":"normal",...n.touched&&{error:n.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...r})})}})}),(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"phone",children:e=>{let{field:r,meta:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.phone),context:"isRequired",errorContext:n.error&&n.touched?"isInvalid":"normal",...n.touched&&{error:n.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...r})})}})})]}),(0,t.jsxs)(i.Kq,{direction:{_:"column",md:"row"},gap:{_:"1.5rem",sm:"3rem"},width:"100%",mt:"3rem",children:[(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"productName",children:e=>{let{meta:r,field:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.product),context:"isRequired",errorContext:r.error&&r.touched?"isInvalid":"normal",...r.touched&&{error:r.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...n})})}})}),(0,t.jsx)(i.xu,{width:"100%",children:(0,t.jsx)(d.gN,{name:"serialNumber",children:e=>{let{field:r,meta:n}=e;return(0,t.jsx)(m.NI,{labelText:q(k.serial),context:"isRequired",errorContext:n.error&&n.touched?"isInvalid":"normal",...n.touched&&{error:n.error},children:(0,t.jsx)(m.II,{inputVariant:"outline",...r})})}})})]}),(0,t.jsx)(d.gN,{name:"comment",pb:"2rem",children:e=>{let{field:r}=e;return(0,t.jsx)(m.NI,{labelText:q(k.comment),width:"100%",mt:"3rem",context:"isRequired",children:(0,t.jsx)(m.gx,{inputVariant:"outline",...r})})}})]}),(0,t.jsx)(i.xu,{mt:"3rem",width:"100%",children:R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.NI,{width:"100%",children:(0,t.jsx)(m.XZ,{checked:W,onChange:()=>M(e=>!e),children:(0,t.jsx)(h.Z,{value:k.privacyPolicyConsent})})}),(0,t.jsx)(i.kC,{justifyContent:{_:"center",md:"flex-start"},children:(0,t.jsxs)(i.zx,{type:"submit",mt:"5rem",disabled:!W||A,children:[q(k.submitBtn),A&&(0,t.jsx)(i.$j,{display:"flex",borderRadius:"100%",ml:"1rem"})]})})]}):B&&Array.isArray(B)&&(0,t.jsx)("div",{"data-testid":"support-captcha",children:(0,t.jsx)(x.Z,{items:B,setCaptcha:K,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.NI,{width:"100%",children:(0,t.jsx)(m.XZ,{checked:W,onChange:()=>M(e=>!e),children:(0,t.jsx)(h.Z,{value:k.privacyPolicyConsent})})}),(0,t.jsx)(i.kC,{justifyContent:{_:"center",md:"flex-start"},children:(0,t.jsxs)(i.zx,{type:"submit",mt:"5rem",disabled:!W||"correct"!==F||Object.keys(r).length>0,children:[q(k.submitBtn),A&&(0,t.jsx)(i.$j,{display:"flex",borderRadius:"100%",ml:"1rem"})]})})]})})})})]})})}})]})};N.Layout=o.ZP;var _=!0;r.default=N},31153:function(e,r,n){"use strict";n.d(r,{I:function(){return t}});let t=e=>"en-SEA"===e?3e4:1e4}},function(e){e.O(0,[7182,9170,2888,9774,179],function(){return e(e.s=620)}),_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.