PageSourceSearch

https://app.webstatus247.com/_next/static/chunks/pages/delete-account-06497bf99a893a5d.js

js webstatus247.com collected 2026-10-07 22:20:18 UTC 9,042 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5336],{331812:function(t,n,e){"use strict";e.d(n,{Z:function(){return I}});var i=e(263366),o=e(487462),a=e(667294),r=e(375228),s=e(147309),l=e(794780),d=e(189262),c=e(936522),u=e(673173),h=e(726855),g=e(520166),x=e(135971),v=e(34867);function p(t){return(0,v.ZP)("MuiLoadingButton",t)}let Z=(0,e(1588).Z)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var m=e(785893);let f=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],y=t=>{let{loading:n,loadingPosition:e,classes:i}=t,a={root:["root",n&&"loading"],startIcon:[n&&`startIconLoading${(0,r.Z)(e)}`],endIcon:[n&&`endIconLoading${(0,r.Z)(e)}`],loadingIndicator:["loadingIndicator",n&&`loadingIndicator${(0,r.Z)(e)}`]},s=(0,l.Z)(a,p,i);return(0,o.Z)({},i,s)},j=t=>"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t&&"classes"!==t,w=(0,d.ZP)(u.Z,{shouldForwardProp:t=>j(t)||"classes"===t,name:"MuiLoadingButton",slot:"Root",overridesResolver:(t,n)=>[n.root,n.startIconLoadingStart&&{[`& .${Z.startIconLoadingStart}`]:n.startIconLoadingStart},n.endIconLoadingEnd&&{[`& .${Z.endIconLoadingEnd}`]:n.endIconLoadingEnd}]})(({ownerState:t,theme:n})=>(0,o.Z)({[`& .${Z.startIconLoadingStart}, & .${Z.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},"center"===t.loadingPosition&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),[`&.${Z.loading}`]:{color:"transparent"}},"start"===t.loadingPosition&&t.fullWidth&&{[`& .${Z.startIconLoadingStart}, & .${Z.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===t.loadingPosition&&t.fullWidth&&{[`& .${Z.startIconLoadingStart}, & .${Z.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})),b=(0,d.ZP)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(t,n)=>{let{ownerState:e}=t;return[n.loadingIndicator,n[`loadingIndicator${(0,r.Z)(e.loadingPosition)}`]]}})(({theme:t,ownerState:n})=>(0,o.Z)({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10}));var I=a.forwardRef(function(t,n){let e=a.useContext(h.Z),r=(0,x.Z)(e,t),l=(0,c.i)({props:r,name:"MuiLoadingButton"}),{children:d,disabled:u=!1,id:v,loading:p=!1,loadingIndicator:Z,loadingPosition:j="center",variant:I="text"}=l,P=(0,i.Z)(l,f),S=(0,s.Z)(v),_=null!=Z?Z:(0,m.jsx)(g.Z,{"aria-labelledby":S,color:"inherit",size:16}),L=(0,o.Z)({},l,{disabled:u,loading:p,loadingIndicator:_,loadingPosition:j,variant:I}),C=y(L),E=p?(0,m.jsx)(b,{className:C.loadingIndicator,ownerState:L,children:_}):null;return(0,m.jsxs)(w,(0,o.Z)({disabled:u||p,id:S,ref:n},P,{variant:I,classes:C,ownerState:L,children:["end"===L.loadingPosition?d:E,"end"===L.loadingPosition?E:d]}))})},603240:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/delete-account",function(){return e(573794)}])},429658:function(t,n,e){"use strict";var i=e(564836);n.Z=void 0;var o=i(e(47955)),a=e(785893);n.Z=(0,o.default)((0,a.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 12h-2v-2h2zm0-4h-2V6h2z"}),"Feedback")},573794:function(t,n,e){"use strict";e.r(n),e.d(n,{default:function(){return L}});var i=e(785893),o=e(69343),a=e(973390),r=e(138741),s=e(331812),l=e(799514),d=e(158046),c=e(425675),u=e.n(c),h=e(811163),g=e(667294),x=e(286501),v=e(226352),p=e(379367),Z=e(653043),m=e(159505),f=e(460504),y=e(488735),j=e(824562),w=e(551642),b=e(673173),I=e(429658),P=t=>{var n,e,o,a,r;let{open:l,onClose:c,onSurveyComplete:u,user:h}=t,[P,S]=(0,g.useState)([]),[_,L]=(0,g.useState)(0),[C,E]=(0,g.useState)({}),[k,$]=(0,g.useState)(!1);(0,g.useEffect)(()=>{l&&W()},[l]);let W=async()=>{try{let t=await (0,v.OJ4)();S(t.data.questions),L(0),E({})}catch(t){x.ZP.error("Something went. Please try again later.")}},z=(t,n)=>{E(e=>({...e,[t]:{answer:n,is_other:"Other"===n}}))},O=(t,n)=>{E(e=>({...e,[t]:{answer:n,is_other:!0}}
1))},R=async()=>{$(!0);let t=Object.entries(C).map(t=>{let[n,e]=t;return{question_id:n,answer:e.answer,is_other:e.is_other}}),n={user_id:h.uuid,responses:t};try{let t=await (0,v.$h4)(n);console.log("Response Data:",t),x.ZP.success("Survey submitted!"),u()}catch(t){console.error("Submission Error:",t.response?t.response.data:t.message),x.ZP.error("Failed to submit responses.")}$(!1),c()},N=P[_];return N?(0,i.jsx)(p.Z,{open:l,onClose:c,children:(0,i.jsxs)(Z.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,width:400},children:[(0,i.jsxs)(Z.Z,{sx:{display:"flex",alignItems:"center",mb:3},children:[(0,i.jsx)(I.Z,{sx:{fontSize:30,color:"primary.main",mr:1}}),(0,i.jsx)(d.Z,{variant:"h6",children:"Exit Survey"})]}),(0,i.jsx)(m.Z,{sx:{my:2}}),(0,i.jsxs)(Z.Z,{sx:{mt:3},children:[(0,i.jsx)(d.Z,{sx:{mb:2},children:N.question}),"choice"===N.type?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(f.Z,{value:(null===(n=C[N._id])||void 0===n?void 0:n.answer)||"",onChange:t=>z(N._id,t.target.value),children:[N.options.map(t=>(0,i.jsx)(y.Z,{value:t.answer,control:(0,i.jsx)(j.Z,{}),label:t.answer},t.answer)),!N.options.some(t=>"Other"===t.answer)&&(0,i.jsx)(y.Z,{value:"Other",control:(0,i.jsx)(j.Z,{}),label:"Other"})]}),(null===(e=C[N._id])||void 0===e?void 0:e.is_other)&&(0,i.jsx)(w.Z,{fullWidth:!0,sx:{mt:2},value:(null===(o=C[N._id])||void 0===o?void 0:o.answer)||"",onChange:t=>O(N._id,t.target.value),placeholder:"Specify other"})]}):(0,i.jsx)(w.Z,{fullWidth:!0,value:(null===(a=C[N._id])||void 0===a?void 0:a.answer)||"",onChange:t=>O(N._id,t.target.value)})]}),(0,i.jsx)(m.Z,{sx:{my:2}}),(0,i.jsxs)(Z.Z,{sx:{display:"flex",justifyContent:"space-between",mt:3},children:[(0,i.jsx)(b.Z,{variant:"outlined",color:"error",sx:{height:38,width:"48%"},onClick:c,children:"Cancel"}),_<P.length-1?(0,i.jsx)(b.Z,{variant:"contained",onClick:()=>{L(t=>t+1)},sx:{height:38,width:"48%"},disabled:"choice"===N.type&&!(null===(r=C[N._id])||void 0===r?void 0:r.answer),children:"Next"}):(0,i.jsx)(s.Z,{loading:k,onClick:R,variant:"contained",sx:{height:38,width:"48%"},children:"Submit"})]})]})}):null},S=e(502627);let _=()=>{var t;let n=(0,r.u)(),{user:e}=(0,g.useContext)(o.V),c=(0,h.useRouter)(),x=null==c?void 0:null===(t=c.query)||void 0===t?void 0:t.user,[p,Z]=(0,g.useState)(!1),[m,f]=(0,g.useState)(!1),{logout:y}=(0,S.a)(),j=async()=>{console.log("handleSurveyComplete called"),f(!1),await w()},w=async()=>{try{Z(!0),await (0,v.tmw)(x),await y(),null==c||c.push("/login"),Z(!1)}catch(t){Z(!1)}};return(0,g.useEffect)(()=>{e&&x!==(null==e?void 0:e.uuid)&&(null==c||c.push("/dashboard"))},[]),(0,i.jsxs)(l.ZP,{direction:"column",container:!0,spacing:2,justifyContent:"center",alignItems:"center",style:{height:"100vh"},sx:{position:"relative",overflowY:"hidden",background:"radial-gradient(circle, #123C7A, #050E20)"},children:[(0,i.jsxs)(l.ZP,{container:!0,spacing:4,direction:"column",sx:{justifyContent:"center",alignItems:"center"},children:[(0,i.jsx)(l.ZP,{item:!0,sx:12,children:(0,i.jsx)(u(),{src:"/images/logo.png",alt:a.ar.name,height:80,width:260})}),(0,i.jsx)(l.ZP,{item:!0,sx:12,children:(0,i.jsx)(d.Z,{variant:"h3",sx:{fontWeight:500,color:n.palette.text.primary900},children:"Delete Account."})}),(0,i.jsx)(l.ZP,{item:!0,sx:12,children:(0,i.jsx)(d.Z,{variant:"h5",color:"initial",sx:{fontWeight:500,color:n.palette.text.secondary200},children:"Deleting the account will end up in losing all the monitors, alert contacts, settings and any data regarding the account."})}),(0,i.jsx)(l.ZP,{item:!0,sx:12,children:(0,i.jsx)(d.Z,{sx:{fontSize:18,fontWeight:500,color:n.palette.text.secondary200},children:"Do you still want to delete the account?"})}),(0,i.jsx)(l.ZP,{item:!0,sx:12,children:(0,i.jsx)(s.Z,{loading:p,onClick:()=>f(!0),variant:"contained",sx:{fontSize:18,backgroundColor:n.palette.text.primary800,opacity:.7,"&:hover":{backgroundColor:n.palette.text.primary800,opacity:1}},children:"Delete the acount"})})]}),(0,i.jsx)(P,{open:m,onClose:()=>f(!1),onSurveyComplete:j,user:e})]})};_.getLayout=t=>t;var L=_}},function(t){t.O(0,[9514,2909,6861,1642,4902,3768,2888,9774,179],function(){return t(t.s=603240)}),_N_E=t.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.