PageSourceSearch

https://app.manydial.com/_next/static/chunks/pages/otp-da1454345b6d6e95.js

js manydial.com collected 2026-10-02 01:37:54 UTC 5,907 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[451],{67911:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/otp",function(){return n(8083)}])},37857:function(e,t,n){"use strict";var r=n(85893),o=n(44192),l=n(11163);n(67294),t.Z=()=>{let e=(0,l.useRouter)();return(0,r.jsx)("div",{className:"absolute top-7 left-5",children:(0,r.jsxs)("div",{onClick:()=>e.back(),className:"flex gap-[12px] items-center text-medium select-none cursor-pointer hover:text-primary",children:[(0,r.jsx)(o.Z,{}),"Back"]})})}},8083:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var r=n(85893),o=n(67294),l=n(37857),i=n(40987),a=n(9008),c=n.n(a),u=n(25675),s=n.n(u),f=n(11163),p=function(e){return"object"==typeof e&&null!==e},d=function(e){var t=e.value,n=void 0===t?"":t,r=e.numInputs,l=void 0===r?4:r,i=e.onChange,a=e.onPaste,c=e.renderInput,u=e.shouldAutoFocus,s=void 0!==u&&u,f=e.inputType,d=void 0===f?"text":f,v=e.renderSeparator,x=e.placeholder,m=e.containerStyle,h=e.inputStyle,g=e.skipDefaultStyles,y=void 0!==g&&g,w=o.useState(0),b=w[0],j=w[1],N=o.useRef([]),k=function(){return n?n.toString().split(""):[]},D="number"===d||"tel"===d;o.useEffect(function(){N.current=N.current.slice(0,l)},[l]),o.useEffect(function(){var e;s&&(null===(e=N.current[0])||void 0===e||e.focus())},[s]);var S=function(){if("string"==typeof x){if(x.length===l)return x;x.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},_=function(e){return(D?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},P=function(e){var t=e.target.value;_(t)&&(O(t),I(b+1))},A=function(e){var t=e.nativeEvent,n=e.target.value;_(n)||(n.length!==l||n.split("").some(function(e){return!_(e)})||(T(n.split("")),I(l-1)),null===t.data&&"deleteContentBackward"===t.inputType&&(e.preventDefault(),O(""),I(b-1)),e.target.value="")},C=function(){j(b-1)},E=function(e){var t=k();[e.code,e.key].includes("Backspace")?(e.preventDefault(),O(""),I(b-1)):"Delete"===e.code?(e.preventDefault(),O("")):"ArrowLeft"===e.code?(e.preventDefault(),I(b-1)):"ArrowRight"===e.code?(e.preventDefault(),I(b+1)):e.key===t[b]?(e.preventDefault(),I(b+1)):("Spacebar"===e.code||"Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code)&&e.preventDefault()},I=function(e){var t,n,r=Math.max(Math.min(l-1,e),0);N.current[r]&&(null===(t=N.current[r])||void 0===t||t.focus(),null===(n=N.current[r])||void 0===n||n.select(),j(r))},O=function(e){var t=k();t[b]=e[0],T(t)},T=function(e){i(e.join(""))},F=function(e){e.preventDefault();var t,n=k(),r=b,o=e.clipboardData.getData("text/plain").slice(0,l-b).split("");if(!(D&&o.some(function(e){return isNaN(Number(e))}))){for(var i=0;i<l;++i)i>=b&&o.length>0&&(n[i]=null!==(t=o.shift())&&void 0!==t?t:"",r++);I(r),T(n)}};return o.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},p(m)&&m),className:"string"==typeof m?m:void 0,onPaste:a},Array.from({length:l},function(e,t){return t}).map(function(e){var t,n,r;return o.createElement(o.Fragment,{key:e},c({value:null!==(t=k()[e])&&void 0!==t?t:"",placeholder:null!==(r=null===(n=S())||void 0===n?void 0:n[e])&&void 0!==r?r:void 0,ref:function(t){return N.current[e]=t},onChange:P,onFocus:function(t){j(e),t.target.select()},onBlur:C,onKeyDown:E,onPaste:F,autoComplete:"off","aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign(y?{}:{width:"1em",textAlign:"center"},p(h)?h:{}),className:"string"==typeof h?h:void 0,type:d,inputMode:D?"numeric":"text",onInput:A},e),e<l-1&&("function"==typeof v?v(e):v))}))},v=n(2947),x=n(20079),m=n(97554),h=()=>{let e=(0,f.useRouter)(),[t,n]=(0,o.useState)(""),[a,{isLoading:u}]=(0,i.vp)(),p=(0,o.useRef)(null),h=async()=>{try{let n=localStorage.getItem("user_otp_email");(null==t?void 0:t.length)===4&&n?(await a({email:n,otp:t}).unwrap(),v.Am.success("OTP verified!"),null==e||e.push("/reset-password")):v.Am.error("Invalid OTP!")}catch(e){var n;console.error(e),v.Am.error((null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.message)||(null==e?void 0:e.message)||"Something went wrong!")}};return(0,r.jsxs)("div",{className:"relative h-screen w-screen flex justify-center items-center",style:{backgroundImage:"url('/background.svg')",backgroundSize:"cover",backgroundPosition:"center center",backgroundRepeat:"no-repeat"},children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"OTP | ManyDial"})}),(0,r.jsx)(l.Z,{}),(0,r.jsx)(x.Z,{height:2,color:"#293261",ref:p}),(0,r.jsx)("div",{className:"w-full sm:w-[400px] flex flex-col items-center",children:(0,r.jsxs)("div",{className:"w-full h-full px-[20px] md:px-[40px] py-[20px] flex flex-col gap-[30px] overflow-y-auto custom-scrollbar",children:[(0,r.jsx)("div",{className:"h-[40px] w-full flex items-center justify-center",children:(0,r.jsx)(s(),{src:m.Z,alt:"logo",width:190})}
1),(0,r.jsxs)("div",{className:"h-[calc(100%-80px)] flex flex-col justify-center",children:[(0,r.jsx)(d,{value:t,onChange:n,numInputs:4,containerStyle:{display:"flex",justifyContent:"space-between",alignItems:"center"},renderInput:(e,t)=>(0,o.createElement)("input",{...e,maxLength:1,key:t,style:{width:"48px",height:"48px",fontSize:"20px",textAlign:"center",borderRadius:"6px",border:"1px solid #c4c4c4",color:"#4F4F4F"}})}),(0,r.jsx)("div",{onClick:()=>{u||h()},className:"mt-[20px] h-[48px] w-full flex items-center justify-center text-center text-white text-[16px] font-medium  ".concat(u?"cursor-wait bg-primary/80":"bg-primary hover:bg-primary/80 cursor-pointer"),children:u?"Loading...":"Confirm OTP"})]}),(0,r.jsx)("div",{className:"py-[18px] px-[12px] text-justify text-small text-gray-200 border-[1px] border-stroke bg-neutral-900 mt-[30px]",children:"Follow the OTP sent to your inbox within the next 10 minutes to easily set a new password and regain access to your account."})]})})]})}}},function(e){e.O(0,[888,774,179],function(){return e(e.s=67911)}),_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.