PageSourceSearch

https://www.ttbbank.com/_next/static/chunks/pages/e-ncb/otp-build-1789371932-eb5d89bc85df7ff6.js

js ttbbank.com collected 2026-09-24 09:12:27 UTC 24,876 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82281],{11303:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/e-ncb/otp",function(){return n(21521)}])},69621:function(e,t,n){"use strict";var r=n(85893);n(67294);var a=n(13426),i=n.n(a);t.Z=e=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"".concat(i().layout),children:(0,r.jsx)("div",{className:"".concat(i().content),children:e.children})})})},55695:function(e,t,n){"use strict";var r=n(87462),a=n(45987),i=n(67294),o=n(86010),s=n(21540),c=n(53676),l=i.forwardRef(function(e,t){var n=e.classes,s=e.className,l=e.color,u=void 0===l?"primary":l,d=e.disableShrink,p=e.size,f=void 0===p?40:p,m=e.style,h=e.thickness,v=void 0===h?3.6:h,b=e.value,y=void 0===b?0:b,_=e.variant,g=void 0===_?"indeterminate":_,x=(0,a.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),S={},k={},N={};if("determinate"===g||"static"===g){var I=2*Math.PI*((44-v)/2);S.strokeDasharray=I.toFixed(3),N["aria-valuenow"]=Math.round(y),S.strokeDashoffset="".concat(((100-y)/100*I).toFixed(3),"px"),k.transform="rotate(-90deg)"}return i.createElement("div",(0,r.Z)({className:(0,o.Z)(n.root,s,"inherit"!==u&&n["color".concat((0,c.Z)(u))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[g]),style:(0,r.Z)({width:f,height:f},k,m),ref:t,role:"progressbar"},N,x),i.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},i.createElement("circle",{className:(0,o.Z)(n.circle,void 0!==d&&d&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[g]),style:S,cx:44,cy:44,r:(44-v)/2,fill:"none",strokeWidth:v})))});t.Z=(0,s.Z)(function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},{name:"MuiCircularProgress",flip:!1})(l)},29187:function(e,t,n){"use strict";var r=n(87462),a=n(45987),i=n(67294),o=n(86010),s=n(89253),c=n(21540),l=n(53676),u=n(46387),d=n(42890),p=i.forwardRef(function(e,t){var n,c=e.children,p=e.classes,f=e.className,m=e.color,h=e.component,v=e.disabled,b=void 0!==v&&v,y=e.error,_=e.fullWidth,g=void 0!==_&&_,x=e.focused,S=e.hiddenLabel,k=e.margin,N=void 0===k?"none":k,I=e.required,j=e.size,O=e.variant,w=(0,a.Z)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),P=i.useState(function(){var e=!1;return c&&i.Children.forEach(c,function(t){if((0,u.Z)(t,["Input","Select"])){var n=(0,u.Z)(t,["Select"])?t.props.input:t;n&&(0,s.B7)(n.props)&&(e=!0)}}),e}),C=P[0],D=P[1],Z=i.useState(function(){var e=!1;return c&&i.Children.forEach(c,function(t){(0,u.Z)(t,["Input","Select"])&&(0,s.vd)(t.props,!0)&&(e=!0)}),e}),E=Z[0],T=Z[1],A=i.useState(!1),F=A[0],V=A[1],R=void 0!==x?x:F;b&&R&&V(!1);var M=i.useCallback(function(){T(!0)},[]),W=i.useCallback(function(){T(!1)},[]);return i.createElement(d.Z.Provider,{value:{adornedStart:C,setAdornedStart:D,color:void 0===m?"primary":m,disabled:b,error:void 0!==y&&y,filled:E,focused:R,fullWidth:g,hiddenLabel:void 0!==S&&S,margin:("small"===j?"dense":void 0)||N,onBlur:function(){V(!1)},onEmpty:W,onFilled:M,onFocus:function(){V(!0)},registerEffect:n,required:void 0!==I&&I,variant:void 0===O?"standard":O}},i.createElement(void 0===h?"div":h,(0,r.Z)({className:(0,o.Z)(p.root,f,"none"!==N&&p["margin".concat((0,l.Z)(N))],g&&p.fullWidth),ref:t},w),c))});t.Z=(0,c.Z)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(p)}
1,42890:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(67294),a=r.createContext();function i(){return r.useContext(a)}t.Z=a},89253:function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{B7:function(){return i},vd:function(){return a}})},22224:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(87462),a=n(67294),i=n(98615);function o(e,t){var n=function(t,n){return a.createElement(i.Z,(0,r.Z)({ref:n},t),e)};return n.muiName=i.Z.muiName,a.memo(a.forwardRef(n))}},46387:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(67294);function a(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},46807:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(67294);function a(e){var t=e.controlled,n=e.default;e.name,e.state;var a=r.useRef(void 0!==t).current,i=r.useState(n),o=i[0],s=i[1],c=r.useCallback(function(e){a||s(e)},[]);return[a?t:o,c]}},92900:function(e,t,n){"use strict";var r=n(64836),a=n(75263);t.Z=void 0;var i=a(n(67294)),o=(0,r(n(14547)).default)(i.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");t.Z=o},21521:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return k},default:function(){return N}});var r=n(85893),a=n(5152),i=n.n(a),o=n(11163),s=n(67294),c=n(55695),l=n(79722),u=n(92900),d=n(71470),p=n(24895),f=n.n(p),m=n(29187),h=n(41852),v=e=>{let{title:t,description:n,close:a}=e,{locale:i="th"}=(0,o.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"row mb-4 ".concat(f()["encb-div-main"]),children:[(0,r.jsx)("div",{className:"pb-4",children:(0,r.jsx)("img",{src:"https://media.ttbbank.com/1/e-ncb/warning_blue.svg"})}),(0,r.jsx)("div",{className:"".concat(f()["encb-title"]," pb-3"),children:t}),(0,r.jsx)("div",{className:"".concat(f()["encb-description"]),children:n}),(0,r.jsx)("div",{className:f()["encb-form"],children:(0,r.jsx)(m.Z,{className:f()["encb-btn-wrapper"],children:(0,r.jsx)(h.Z,{variant:"contained",className:f()["encb-btn"],type:"submit",disableRipple:!0,onClick:a,children:"th"===i?"กลับ":"Back"})})})]})})},b=n(69621),y=n(370),_=n(55135),g=n(94806),x=n.n(g);let S=i()(()=>n.e(26311).then(n.bind(n,64858)),{loadableGenerated:{webpack:()=>[64858]},ssr:!1});var k=!0;function N(e){let{phone:t,isValid:n,isHaveEmail:a}=e.data,i=(0,o.useRouter)(),{locale:p="th"}=i,[f,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[k,N]=(0,s.useState)(""),[I,j]=(0,s.useState)(0),[O,w]=(0,s.useState)(""),[P,C]=(0,s.useState)(""),[D,Z]=(0,s.use
1State)(0),[E,T]=(0,s.useState)(!1),[A,F]=(0,s.useState)("email_confirm"),V={title:"th"===p?"สมัครรับหนังสือแจ้งข้อมูลเครดิต":"Received e-NCB letter",description:{msg1:"th"===p?"ยืนยันเบอร์มือถือ":"Verify mobile number",msg2:"th"===p?"รหัส OTP ถูกส่งไปยัง":"OTP code is sent to",msg3:"th"===p?"รหัสอ้างอิง OTP:":"OTP Ref:"},msgErrorOtp:"th"===p?"รหัส OTP ไม่ถูกต้อง ลองใหม่อีกครั้ง":"Incorrect OTP, please try again",msgWrongOtp:"th"===p?"คุณใส่รหัส OTP ไม่ถูกต้องเกินที่กำหนด โปรดรอ 3 นาที เพื่อขอรหัส OTP ใหม่อีกครั้ง":"Your OTP limit has been reached. \nPlease wait for 3 minutes before requesting new OTP.",titleResend:"th"===p?"ส่ง OTP ใหม่อีกครั้ง":"Resend OTP",alert:"th"===p?"คุณสามารถเปลี่ยนเบอร์มือถือได้ที่ ทีทีบี ทัช หรือติดต่อสาขา ทีทีบี":"You may change your mobile no. at ttb touch or contact ttb branch.",warning:{email_confirm:{title:"th"===p?"โปรดยืนยันอีเมล":"Email Address Not Verified",description:"th"===p?"คุณสามารถยืนยันอีเมลผ่าน ทีทีบี ทัช \nเพื่อสมัครรับหนังสือแจ้งข้อมูลเครดิตทางอีเมล":"Please verify your email address on ttb touch to proceed further."},email_notfound:{title:"th"===p?"ไม่พบอีเมลในระบบ":"Email Address Not Found",description:"th"===p?"คุณสามารถอัปเดตอีเมลผ่าน ทีทีบี ทัช \nเพื่อสมัครรับหนังสือแจ้งข้อมูลเครดิตทางอีเมล":"Please verify your email address on ttb touch to proceed further."}}};(0,s.useEffect)(()=>{var e,t,r;let a=sessionStorage.getItem(y.Ge);if(a&&Z(Number(a)),!n){(0,_.Z)(),W();return}let o=null!==(e=sessionStorage.getItem(y.UJ))&&void 0!==e?e:"";if(o&&n){if(0>=Math.trunc((new Date(o).getTime()-new Date().getTime())/1e3)&&"Y"!==sessionStorage.getItem(y.br))R();else{j(Math.trunc((new Date(o).getTime()-new Date().getTime())/1e3));let e=null!==(t=sessionStorage.getItem(y.YQ))&&void 0!==t?t:"";e&&w(e);let n=null!==(r=sessionStorage.getItem(y.Pk))&&void 0!==r?r:"";n&&C(n)}}else n&&"Y"!==sessionStorage.getItem(y.br)&&R();let s=setTimeout(()=>{(0,_.Z)(),i.push({pathname:"/".concat(p,"/e-ncb")})},y.Qm);return()=>clearTimeout(s)},[]),(0,s.useEffect)(()=>{let e=setInterval(()=>{I>0?j(I-1):(clearInterval(e),C(""),(0,_.Z)("otp"))},1e3);return()=>clearInterval(e)},[I]),(0,s.useEffect)(()=>{6===k.length&&P?M(k):m(!1)},[k]);let R=async()=>{if(n){let n=await fetch("/api/encb/request-otp",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"}}),{body:i}=await n.json();if((null==i?void 0:i.status)===200&&(null==i?void 0:i.expiryDateTime)){var e,t,r,a;Z(0),N(""),j(Math.trunc((new Date(i.expiryDateTime).getTime()-new Date().getTime())/1e3)),w(null!==(e=i.referenceCode)&&void 0!==e?e:""),C(null!==(t=i.token)&&void 0!==t?t:""),sessionStorage.setItem(y.UJ,i.expiryDateTime),sessionStorage.setItem(y.YQ,null!==(r=i.referenceCode)&&void 0!==r?r:""),sessionStorage.setItem(y.Pk,null!==(a=i.token)&&void 0!==a?a:"")}else(0,_.Z)("otp")}};(0,s.useEffect)(()=>{sessionStorage.setItem(y.Ge,D.toString())},[D]);let M=async e=>{try{g(!0);let r=await fetch("/api/encb/verify-otp",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({token:P,otp:e})}),{body:o}=await r.json();if((null==o?void 0:o.status)===200&&(null==o?void 0:o.codeApi)==="0000"&&(null==o?void 0:o.statusOTP)==="Activated"){var t,n;(0,_.Z)("otp");let e=null!==(t=sessionStorage.getItem(y.w7))&&void 0!==t?t:"",r=null!==(n=sessionStorage.getItem(y.KN))&&void 0!==n?n:"";if("N"===e){if(a){if("Y"===r){sessionStorage.setItem(y.br,"Y"),i.push({pathname:"/".concat(p,"/e-ncb/check-email")});return}F("email_confirm"),T(!0)}else F("email_notfound"),T(!0)}else{sessionStorage.setItem(y.br,"Y"),i.push({pathname:"/".concat(p,"/e-ncb/check-email-confirm")});return}}else m(!0),Z(D+1)}finally{g(!1)}},W=()=>{(0,_.Z)(),i.push({pathname:"/".concat(p,"/e-ncb")})};return E?(0,r.jsx)(b.Z,{children:(0,r.jsx)("div",{className:"container px-4",children:(0,r.jsx)(v,{title:V.warning[A].title,de
1scription:V.warning[A].description,close:()=>{(0,_.Z)(),i.push({pathname:"/".concat(p,"/e-ncb")})}})})}):(0,r.jsx)(b.Z,{children:(0,r.jsxs)("div",{className:"container px-4 ".concat(x()["encb-div-container"]),children:[(0,r.jsxs)("div",{className:"mb-4 ".concat(x()["encb-group-title"]),children:[(0,r.jsx)("div",{className:"".concat(x()["encb-icon-back"]),onClick:W,children:(0,r.jsx)(l.Z,{})}),(0,r.jsx)("div",{className:"".concat(x()["encb-title-div"]),children:(0,r.jsx)("h1",{className:"".concat(x()["encb-title"]),children:V.title})})]}),(0,r.jsxs)("section",{children:[(0,r.jsx)("div",{className:"".concat(x()["encb-description"]),children:V.description.msg1}),(0,r.jsxs)("div",{className:"".concat(x()["encb-description"]),children:[V.description.msg2," \xa0"," ",(0,r.jsx)("span",{className:"".concat(x()["encb-word-primary"]),children:"XXX-XXXX-".concat(t)})]}),(0,r.jsxs)("div",{className:"".concat(x()["encb-description"]),children:[V.description.msg3," ",O||"-"]})]}),(0,r.jsxs)("section",{children:[(0,r.jsx)("div",{className:"row ".concat(x()["encb-div-input-otp"]),children:(0,r.jsx)(d.Z,{value:k,onChange:e=>N(e),numInputs:6,separator:(0,r.jsx)("span",{children:"\xa0"}),inputStyle:"".concat(x()["encb-input-otp"]),shouldAutoFocus:!0,isInputNum:!0,focusStyle:"".concat(x()["encb-input-otp__focus"]),isDisabled:I<=0||D>=3})}),(0,r.jsx)("div",{className:"row ".concat(x()["encb-otp-div-error-message"]),children:D>=3?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{className:"".concat(x()["encb-otp-error-message"])}),V.msgWrongOtp]}):f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{className:"".concat(x()["encb-otp-error-message"])}),V.msgErrorOtp]})}),h&&(0,r.jsx)("div",{className:"row ".concat(x()["encb-loading-wrapper"]),children:(0,r.jsxs)("div",{className:x()["encb-loading"],children:[(0,r.jsx)(c.Z,{variant:"determinate",size:32,className:x()["encb-loading__filled"],value:100,thickness:4}),(0,r.jsx)(c.Z,{variant:"indeterminate",size:32,className:x()["encb-loading__line"],thickness:4,disableShrink:!0})]})})]}),(0,r.jsx)("div",{className:"row ".concat(x()["otp-resend"]," ").concat(I<=0&&x()["otp-resend__ready"]),onClick:()=>{I<=0&&R()},children:V.titleResend}),(0,r.jsx)("div",{className:"row ".concat(x()["otp-resend"]," ").concat(x()["otp-resend__time"]),children:I>0&&"(".concat(I,")")}),(0,r.jsx)("div",{className:x()["encb-div-alert"],children:(0,r.jsx)(S,{severity:"info",variant:"outlined",className:x()["encb-alert-info"],children:V.alert})})]})})}},24895:function(e){e.exports={"encb-div-main":"style_encb-div-main__aTbx3","encb-icon-back":"style_encb-icon-back__Iu_Xz","encb-title":"style_encb-title__166rV","encb-description":"style_encb-description__kSvhA","encb-group-mail":"style_encb-group-mail__kdb3z","encb-info-email":"style_encb-info-email__EwFiO","encb-email-title":"style_encb-email-title__d2s0W","encb-email-word":"style_encb-email-word__D0VQm","encb-form":"style_encb-form__syipK","encb-form__divider":"style_encb-form__divider__e1dMl","encb-btn-wrapper":"style_encb-btn-wrapper__Wr2h4","encb-btn":"style_encb-btn__6aU47","encb-btn__close":"style_encb-btn__close__WaUKG"}},13426:function(e){e.exports={layout:"style_layout__yA_Wx",content:"style_content__TVGmS"}},94806:function(e){e.exports={"encb-group-title":"style_encb-group-title__mcMRk","encb-title-div":"style_encb-title-div__V7Qe5","encb-title":"style_encb-title__F_DVq","encb-icon-back":"style_encb-icon-back__c4mKP","encb-description":"style_encb-description__w1xIt","encb-word-primary":"style_encb-word-primary__QRrrF","encb-div-input-otp":"style_encb-div-input-otp__HQYY8","encb-input-otp":"style_encb-input-otp__t6CFP","encb-input-otp__focus":"style_encb-input-otp__focus__MkxtN","otp-resend":"style_otp-resend__j5mUW","otp-resend__ready":"style_otp-resend__ready__rt_Nz","otp-resend__time":"style_otp-resend__time__HlFXn","encb-loading-wrapper":"style_encb-loading-wrapper__GQkxP","encb-loading":"style_encb-loading__QjtYJ","encb-loading__filled":"style_encb-loading__filled__0VmG4","encb-loading__line":"style_encb-loading__line__0qRLB","encb-otp-div-error-message":"style_encb-otp-div-error-message__l16zV","encb-otp-error-message":"style_encb-otp-error-message__uh_PL","encb-alert-info":"style_encb-alert-info__mAK_P","encb-div-container":"style_encb-div-container___M_qZ","encb-div-alert":"style_encb-div-alert__OlZdR"}},71470:function(e,t,n){"use strict";t.Z=void 0;
1var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==v(e)&&"function"!=typeof e)return{default:e};var n=i(void 0);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(67294)),a=["placeholder","separator","isLastChild","inputStyle","focus","isDisabled","hasErrored","errorStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure"];function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=m(e);return n=t?Reflect.construct(r,arguments,m(this).constructor):r.apply(this,arguments),n&&("object"===v(n)||"function"==typeof n)?n:f(this)}}function f(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b=function(e){return"object"===v(e)},y=function(e){u(n,e);var t=p(n);function n(e){var a;return s(this,n),h(f(a=t.call(this,e)),"getClasses",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return!b(e)&&!1!==e}).join(" ")}),h(f(a),"getType",function(){var e=a.props,t=e.isInputSecure,n=e.isInputNum;return t?"password":n?"tel":"text"}),a.input=r.default.createRef(),a}return l(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.focus,n=e.shouldAutoFocus,r=this.input.current;r&&t&&n&&r.focus()}},{key:"componentDidUpdate",value:function(e){var t=this.props.focus,n=this.input.current;e.focus!==t&&n&&t&&(n.focus(),n.select())}},{key:"render",value:function(){var e=this.props,t=e.placeholder,n=e.separator,i=e.isLastChild,s=e.inputStyle,c=e.focus,l=e.isDisabled,u=e.hasErrored,d=e.errorStyle,p=e.focusStyle,f=e.disabledStyle,m=(e.shouldAutoFocus,e.isInputNum),h=e.index,v=e.value,y=e.className,_=(e.isInputSecure,function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,a));return r.default.createElement("div",{className:y,style:{display:"flex",alignItems:"center"}},r.default.createElement("input",o({"aria-label":"".concat(0===h?"Please enter verification code. ":"").concat(m?"Digit":"Character"," ").concat(h+1),autoComplete:"off",style:Object.assign({width:"1em",textAlign:"center"},b(s)&&s,c&&b(p)&&p,l&&b(f)&&f,u&&b(d)&&d),placeholder:t,className:this.getClasses(s,c&&p,l&&f,u&&d),type:this.getType(),maxLength:"1",ref:this.input,disabled:l,value:v||""},_)),!i&&n)}}]),n}(r.PureComponent),_=function(e){u(n,e);var t=p(n);function n(){var e;s(this,n);for(var a=arguments.length,i=Array(a),o=0;o<a;o++)i[o]=arguments[o];return h(f(e=t.call.apply(t,[this].concat(i))),"state",{activeInput:0}),h(f(e),"getOtpValue",function(){return e.props.value?e.props.value.toString().split(""):[]}),h(f(e),"getPlaceholderValue",function(){var t=e.props,n=t.placeholder,r=t.numInputs;if("string"==typeof n){if(n.length===r)return n;n.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}}),h(f(e),"handleOtpChange",function(t){(0,e.props.onChange)(t.join(""))}),h(f(e),"isInputValueValid",function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"==typeof t)&&1===t.trim().length}),h(f(e),"focusInput",function(t){var n=e.props.numInputs;e.setState({activeInput:Math.max(Math.min(n-1,t),0)})}),h(f(e),"focusNextInput",function(){var t=e.state.activeInput;e.focusInput(t+1)}),h(f(e),"focusPrevInput",function(){var t=e.state.activeInput;e.focusInput(t-1)}),h(f(e),"changeCodeAtFocus",function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)}),h(f(e),"handleOnPaste",function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var i=e.getOtpValue(),o=n,s=t.clipboardData.getData("text/plain").slice(0,a-n).split(""),c=0;c<a;++c)c>=n&&s.length>0&&(i[c]=s.shift(),o++);e.setState({activeInput:o},function(){e.focusInput(o),e.handleOtpChange(i)})}}),h(f(e),"handleOnChange",function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)}),h(f(e),"handleOnKeyDown",function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput()):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):(32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key)&&t.preventDefault()}),h(f(e),"handleOnInput",function(t){if(e.isInputValueValid(t.target.value))e.focu
1sNextInput();else if(!e.props.isInputNum){var n=t.nativeEvent;null===n.data&&"deleteContentBackward"===n.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}}),h(f(e),"renderInputs",function(){for(var t=e.state.activeInput,n=e.props,a=n.numInputs,i=n.inputStyle,o=n.focusStyle,s=n.separator,c=n.isDisabled,l=n.disabledStyle,u=n.hasErrored,d=n.errorStyle,p=n.shouldAutoFocus,f=n.isInputNum,m=n.isInputSecure,h=n.className,v=[],b=e.getOtpValue(),_=e.getPlaceholderValue(),g=e.props["data-cy"],x=e.props["data-testid"],S=function(n){v.push(r.default.createElement(y,{placeholder:_&&_[n],key:n,index:n,focus:t===n,value:b&&b[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:s,inputStyle:i,focusStyle:o,isLastChild:n===a-1,isDisabled:c,disabledStyle:l,hasErrored:u,errorStyle:d,shouldAutoFocus:p,isInputNum:f,isInputSecure:m,className:h,"data-cy":g&&"".concat(g,"-").concat(n),"data-testid":x&&"".concat(x,"-").concat(n)}))},k=0;k<a;k++)S(k);return v}),e}return l(n,[{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},b(e)&&e),className:b(e)?"":e},this.renderInputs())}}]),n}(r.Component);h(_,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1}),t.Z=_}},function(e){e.O(0,[40744,94050,92888,49774,40179],function(){return e(e.s=11303)}),_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.