1try{let e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="66904da3-4306-4b9c-b4f5-0a5058189406",e._sentryDebugIdIdentifier="sentry-dbid-66904da3-4306-4b9c-b4f5-0a5058189406")}catch(e){}"use strict";(self.webpackChunkbayut_bh=self.webpackChunkbayut_bh||[]).push([["2263"],{9089(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==v(e)&&"function"!=typeof e)return{default:e};var t=o(void 0);if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var a=r?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}(n(63696)),u=["placeholder","separator","isLastChild","inputStyle","focus","isDisabled","hasErrored","errorStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure"];function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function a(){return(a=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 l(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 i(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function c(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&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("u"<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,u,o=y(e);return u=t?Reflect.construct(o,arguments,y(this).constructor):o.apply(this,arguments),n=this,(r=u)&&("object"===v(r)||"function"==typeof r)?r:d(n)}}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=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)},g=function(e){c(n,e);var t=f(n);function n(e){var u;return s(this,n),h(d(u=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(d(u),"getType",function(){var e=u.props,t=e.isInputSecure,n=e.isInputNum;return t?"password":n?"tel":"text"}),u.input=r.default.createRef(),u}return i(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,o=e.isLastChild,s=e.inputStyle,l=e.focus,i=e.isDisabled,c=e.hasErrored,p=e.errorStyle,f=e.focusStyle,d=e.disabledStyle,y=(e.shouldAutoFocus,e.isInputNum),h=e.index,v=e.value,g=e.className,I=(e.isInputSecure,function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,u));return r.default.createElement("div",{className:g,style:{display:"flex",alignItems:"center"}},r.default.createElement("input",a({"aria-label":"".concat(0===h?"Please enter verification code. ":"").concat(y?"Digit":"Character"," ").concat(h+1),autoComplete:"off",style:Object.assign({width:"1em",textAlign:"center"},b(s)&&s,l&&b(f)&&f,i&&b(d)&&d,c&&b(p)&&p),placeholder:t,className:this.getClasses(s,l&&f,i&&d,c&&p),type:this.getType(),maxLength:"1",ref:this.input,disabled:i,value:v||""},I)),!o&&n)}}]),n}(r.PureComponent),I=function(e){c(n,e);var t=f(n);function n(){var e;s(this,n);for(var u=arguments.length,o=Array(u),a=0;a<u;a++)o[a]=arguments[a];return h(d(e=t.call.apply(t,[this].concat(o))),"state",{activeInput:0}),h(d(e),"getOtpValue",function(){return e.props.value?e.props.value.toString().split(""):[]}),h(d(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(d(e),"handleOtpChange",function(t){(0,e.props.onChange)(t.join(""))}),h(d(e),"isInputValueValid",function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"==typeof t)&&1===t.trim().length}),h(d(e),"focusInput",function(t){var n=Math.max(Math.min(e.props.numInputs-1,t),0);e.setState({activeInput:n})}),h(d(e),"focusNextInput",function(){var t=e.state.activeInput;e.focusInput(t+1)}),h(d(e),"focusPrevInput",function(){var t=e.state.activeInput;e.focusInput(t-1)}),h(d(e),"changeCodeAtFocus",function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)}),h(d(e),"handleOnPaste",function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,u=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),a=n,s=t.clipboardData.getData("text/plain").slice(0,u-n).split(""),l=0;l<u;++l)l>=n&&s.length>0&&(o[l]=s.shift(),a++);e.setState({activeInput:a},function(){e.focusInput(a),e.handleOtpChange(o)})}}),h(d(e),"handleOnChange",function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)}),h(d(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(d(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(d(e),"renderInputs",function(){for(var t=e.state.activeInput,n=e.props,u=n.numInputs,o=n.inputStyle,a=n.focusStyle,s=n.separator,l=n.isDisabled,i=n.disabledStyle,c=n.hasErrored,p=n.errorStyle,f=n.shouldAutoFocus,d=n.isInputNum,y=n.isInputSecure,h=n.className,v=[],b=e.getOtpValue(),I=e.getPlaceholderValue(),m=function(n){v.push(r.default.createElement(g,{placeholder:I&&I[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:o,focusStyle:a,isLastChild:n===u-1,isDisabled:l,disabledStyle:i,hasErrored:c,errorStyle:p,shouldAutoFocus:f,isInputNum:d,isInputSecure:y,className:h}))},O=0;O<u;O++)m(O);return v}),e}return i(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(I,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1}),t.default=I}}]); 2//# sourceMappingURL=otpInput.ba78c70648882469.4bef0f2f6e5daed5.js.map
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.