PageSourceSearch

https://aloomelk.ir/_next/static/chunks/app/signin/page-4aea1dec08c8dc12.js

js aloomelk.ir collected 2026-10-03 00:42:29 UTC 5,057 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4281],{66446:function(e,t,l){Promise.resolve().then(l.t.bind(l,65878,23)),Promise.resolve().then(l.bind(l,99432)),Promise.resolve().then(l.bind(l,55134)),Promise.resolve().then(l.bind(l,45326))},55134:function(e,t,l){"use strict";var i=l(57437),a=l(95015),s=l(51936),r=l(55818),n=l(45478),o=l(13907),c=l(73842),u=l(99376),m=l(2265),d=l(29501),h=l(34422),x=l(57336);let f=h.Ry().shape({mobile:h.Z_().matches(s.qC,s.fp).length(11,s.Lu).test({name:"mobile",exclusive:!0,message:s.hJ,test:e=>null==e?void 0:e.startsWith("0")}).required(s._e),type:h.Z_(),key:h.Z_().when("mode",(e,t)=>"key"===e[0]?t.length(4,s.Bg).required(s.jg):t.notRequired()),isNewUser:h.O7()}),w=h.Ry().shape({full_name:h.Z_().required(s.OH)});t.default=()=>{let e=(0,u.useSearchParams)(),{setProfile:t,login:l,profileLoading:s,isLoggedIn:h}=(0,n.E)(),[b,p]=(0,m.useState)(120),[g,y]=(0,m.useState)(null);(0,m.useEffect)(()=>{let t=e.get("ut"),l=e.get("returnUrl");if(t){y(t);return}if((0,o.aZ)()){y((0,o.aZ)());return}if(l){let e=new URLSearchParams(decodeURIComponent(l)).get("ut");e&&(y(e),(0,o.Iy)(e));return}},[e]);let j=(0,d.cI)({resolver:(0,c.X)(f),defaultValues:{mobile:"",key:"",type:"mobile",isNewUser:!1}}),v=(0,d.cI)({resolver:(0,c.X)(w),defaultValues:{full_name:""}}),{isSubmitting:N}=v.formState,{isSubmitting:_}=j.formState,U=j.watch("type"),k=j.watch("isNewUser");(0,m.useEffect)(()=>{if(!h||j.watch("isNewUser")||e.get("returnUrl")){if(h&&!j.watch("isNewUser")&&e.get("returnUrl")){var t;window.location.replace(null!==(t=e.get("returnUrl"))&&void 0!==t?t:"/panel")}}else window.location.replace("/panel")},[s]);let S=async()=>{await (0,a.hh)(j.watch("mobile"))&&p(120)};(0,m.useEffect)(()=>{if(b>0){let e=setTimeout(()=>{p(b-1)},1e3);return()=>clearTimeout(e)}},[b]),(0,m.useEffect)(()=>{p(120)},[U]);let I=b%120,R=async e=>{if("mobile"===U){let t=await (0,a.G6)(e.mobile);null!==t&&(j.setValue("isNewUser",t),j.setValue("type","key"))}else{var t;let l=await (0,a.aV)({key:null!==(t=e.key)&&void 0!==t?t:"",mobile:e.mobile});null!==l&&V(l)}},z=()=>{let t=e.get("returnUrl");if(!t){window.location.replace("/");return}try{let e=decodeURIComponent(t);if(e.startsWith("/")&&!e.includes(":")&&!e.includes("//")){let[t,l]=e.split("?"),i=t.split("/").filter(Boolean),a=i.length>0&&i.every(e=>/^[a-zA-Z0-9_-]+$/.test(e)),s=!l||/^[a-zA-Z0-9=&_\-\.]+$/.test(l);if(a&&s){let t=window.location.origin,l=new URL(e,t);if(l.origin===t){window.location.replace(l.pathname+l.search);return}}}window.location.replace("/")}catch(e){console.error("Redirect error:",e),window.location.replace("/")}},V=e=>{let{user:i}=e;t(i),l(),k?j.setValue("type","information"):z()},Z=async()=>{await (0,a.Nq)(v.watch("full_name"))&&z()};return g?(0,i.jsx)(x.Z,{handleRedirect:z}):(0,i.jsxs)(i.Fragment,{children:["information"!==U&&(0,i.jsx)(d.RV,{...j,children:(0,i.jsxs)("form",{className:"flex w-full flex-col gap-5",onSubmit:j.handleSubmit(R),children:["mobile"===U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"mb-1 text-l-700 text-cgray-900 lg:text-xl-700",children:"ورود یا ثبت نام"}),(0,i.jsx)("div",{className:"text-m-400 text-cgray-900",children:"برای استفاده از خدمات الوملک، ابتدا وارد شوید."})]}),(0,i.jsx)(r.II,{label:"شماره موبایل",name:"mobile",className:"w-full",type:"tel",maxLength:11,autoFocus:!0}),(0,i.jsx)(r.zx,{type:"submit",loading:_,children:"ورود به الوملک"})]}),"key"===U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,i.jsx)(r.zx,{variant:"border",size:"small",startIcon:"edit",onClick:()=>j.setValue("type","mobile"),children:"تغییر شماره"}),(0,i.jsx)(r.zx,{variant:"border",size:"small",disabled:b>0||_,onClick:S,children:b>0?"ارسال مجدد (".concat("".concat(I.toString().padStart(2,"0"))," ثانیه دیگر)"):"ارسال مجدد"})]}),(0,i.jsxs)("div",{className:"text-m-400",children:["کد احراز هویت که به شماره ",j.watch("mobile")," پیامک شده است را وارد کنید:"]}),(0,i.jsx)(r.II,{label:"کد ۴ رقمی احراز هویت",name:"key",type:"tel",maxLength:4,autoF
1ocus:!0}),(0,i.jsx)(r.zx,{loading:_,type:"submit",children:"تایید"})]})]})}),"information"===U&&(0,i.jsx)(d.RV,{...v,children:(0,i.jsxs)("form",{className:"flex w-full flex-col gap-6 p-8",onSubmit:v.handleSubmit(Z),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"mb-3 text-l-700 text-cgray-900 lg:text-xl-700",children:"تکمیل اطلاعات"}),(0,i.jsx)("div",{className:"text-m-400 text-cgray-900",children:"لطفا نام و نام خانوادگی خود را وارد کنید."})]}),(0,i.jsx)(r.II,{label:"نام و نام خانوادگی",name:"full_name"}),(0,i.jsx)(r.zx,{loading:N,type:"submit",children:"تایید"})]})})]})}}},function(e){e.O(0,[6633,6990,1866,7674,4438,4681,7746,7353,776,3160,5818,2971,2117,1744],function(){return e(e.s=66446)}),_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.