1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7123,3423,6067,7302,4708],{25805:function(e,r,t){t.d(r,{Z:function(){return v}});var n=t(57437),a=t(2265),i=t(43949),o=t(32175),s=t(55447),l=t(19902),u=t(46387),c=t(73126),d=t(1899),p=t(44811);function v(e){let{siteKey:r="0b66a2cc-2420-41c6-9e3c-18d696fcd79c",onVerify:t,onExpire:v,onError:h,theme:f="light",size:m="normal",buttonText:x="Submit",title:g="register.verifyHuman"}=e,[y,b]=(0,a.useState)(null),[C,j]=(0,a.useState)(!1),{t:Z}=(0,i.$G)(),P=(0,a.useRef)(null),w=async e=>{b(null);try{var r,n,a;let i=await s.ZP.post("https://api.xyes.com/api/v1"+s.Hv.auth.verifyCaptcha,{captcha:e});(null===(r=i.data)||void 0===r?void 0:r.data)&&(null===(a=i.data)||void 0===a?void 0:null===(n=a.data)||void 0===n?void 0:n.success)?(j(!0),t&&t(e)):(b("Failed to verify captcha. Please try again."),j(!1))}catch(e){b("Failed to verify captcha. Please try again."),j(!1)}};return(0,n.jsxs)(l.Z,{elevation:3,sx:{p:3,maxWidth:500,mx:"auto"},children:[(0,n.jsx)(u.Z,{variant:"h6",gutterBottom:!0,children:Z(g)}),y&&(0,n.jsx)(c.Z,{severity:"error",sx:{mb:2},children:y}),C&&(0,n.jsx)(c.Z,{severity:"success",sx:{mb:2},children:Z("register.verificationSuccess")}),(0,n.jsxs)(d.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[(0,n.jsx)(o.Z,{sitekey:r,onVerify:w,onExpire:()=>{j(!1),v&&v()},onError:e=>{b("Error verifying captcha. Please try again."),j(!1),h&&h(e)},ref:P,theme:f,size:m}),"invisible"!==m&&(0,n.jsx)(d.Z,{sx:{display:"flex",gap:2,mt:2},children:(0,n.jsx)(p.Z,{variant:"outlined",onClick:()=>{P.current&&P.current.resetCaptcha(),j(!1),b(null)},children:Z("register.reset")})})]})]})}},47302:function(e,r,t){t.r(r),t.d(r,{default:function(){return i}});var n=t(57437),a=t(29501);function i(e){let{children:r,onSubmit:t,methods:i}=e;return(0,n.jsx)(a.RV,{...i,children:(0,n.jsx)("form",{onSubmit:t,children:r})})}},11417:function(e,r,t){t.d(r,{a:function(){return u},Z:function(){return n.default}});var n=t(47302),a=t(57437);t(2265);var i=t(29501),o=t(1899),s=t(89051),l=t(12713);function u(e){let{name:r,helperText:t,type:n,tooltip:u,handleTooltipClose:c,open:d,labelInput:p,boxStyles:v,maxLength:h,...f}=e,{control:m}=(0,i.Gc)(),x=v||{width:"100%"};return(0,a.jsx)(i.Qr,{name:r,control:m,render:e=>{let{field:i,fieldState:{error:v}}=e,m={...f.inputProps,autoComplete:"new-password",...h?{maxLength:h}:{}},g=p?(0,a.jsxs)(o.Z,{sx:x,children:[p,(0,a.jsx)(l.Z,{...i,id:r,fullWidth:!0,type:n,value:"number"===n&&0===i.value?"":i.value,onChange:e=>{"number"===n?i.onChange(Number(e.target.value)):i.onChange(e.target.value)},error:!!v,helperText:v?v.message:t,...f,inputProps:m})]}):(0,a.jsx)(l.Z,{...i,id:r,fullWidth:!0,type:n,value:"number"===n&&0===i.value?"":i.value,onChange:e=>{"number"===n?i.onChange(Number(e.target.value)):i.onChange(e.target.value)},error:!!v,helperText:v?v.message:t,...f,inputProps:{...f.inputProps,autoComplete:"new-password"}});return u?(0,a.jsx)(s.Z,{placement:"top-start",title:u,PopperProps:{disablePortal:!0},onClose:c,open:d,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,children:g}):g}})}},79953:function(e,r,t){t.d(r,{H:function(){return d}});var n=t(60033),a=t(83464),i=t(43577),o=t(55447),s=t(66274),l=t(21770),u=t(36067);let c=async e=>{let{contact:r,isPhone:t,captcha:n}=e;return await a.default.post("https://api.xyes.com/api/v1"+o.Hv.auth.recovery,{[t?"phone":"email"]:r,captcha:n})},d=e=>{let{setRecoveryContact:r,setIsPhoneNumber:t}=e,a=(0,s.tv)(),{showMessage:o}=(0,u.useSnackbar)(),{t:d}=(0,n.i)(),p=(0,l.D)({mutationKey:["password-recovery"],mutationFn:c,onSuccess:(e,n)=>{204===e.status&&(r(n.contact),t(n.isPhone),a.replace("?modal=reset-password&step=code"))},onError:e=>{if(e instanceof i.d7){var r,t;o((null===(t=e.response)||void 0===t?void 0:null===(r=t.data)||void 0===r?void 0:r.message)||e.message,"error")}else o(e.message||d("errors.anErrorOccurred"),"error")}}),v=async e=>{p.mutate(e)};return{isLoading:p.isPending,handleSubmit:v}}},36067:function(e,r,t){t.r(r),t.d(r,{SnackbarProvider:function(){return c},useSnackbar:function(){return d}});var n=t(57437),a=t(2265),i=t(60033),o=t(73986),s=t(73126);let l=a.createContext(void 0),u=a.forwardRef((e,r)=>(0,n.jsx)(s.Z,{elevation:6,ref:r,variant:"filled",...e})),c=e=>{let{children:r}=e,[t,s]=a.useState({open:!1,message:"",type:"success",position:{vertical:"top",horizontal:"center"},autoHideDuration:3e3}),{t:c}=(0,i.i)(),d=a.useCallback(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{vertical:"top",horizontal:"center"},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3e3;s({open:!0,message:e,type:r,position:t,autoHideDuration:n})},[]),p=()=>{s(e=>({...e,open:!1}))},v=a.useMemo(()=>({showMessage:d}),[d]);return(0,n.jsxs)(l.Provider,{value:v,children:[r,(0,n.jsx)(o.Z,{open:t.open,autoHideDuration:t.autoHideDuration,onClose:p,anchorOrigin:t.position,children:(0,n.jsx)(u,{onClose:p,severity:t.type,sx:{backgroundColor:"info"===t.type?"#2196F3":void 0},children:c(t.message)})})]})},d=()=>{let e=a.useContext(l);if(!e)throw Error("useSnackbar must be used within a SnackbarProvider");return e}}}]);
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.