13f4ab27cca7b434bdfa39549561afa1.json
87.6 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n/* eslint-disable react/prop-types */\n\nimport React from 'react';\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\n\nfunction noop() {}\n\nfunction preventDefault(e) {\n e.preventDefault();\n}\n\nvar defaultParser = function defaultParser(input) {\n return input.replace(/[^\\w.-]+/g, '');\n};\n/**\n * When click and hold on a button - the speed of auto changin the value.\n */\n\n\nvar SPEED = 200;\n/**\n * When click and hold on a button - the delay before auto changin the value.\n */\n\nvar DELAY = 600;\n/**\n * Max Safe Integer -- on IE this is not available, so manually set the number in that case.\n * The reason this is used, instead of Infinity is because numbers above the MSI are unstable\n */\n\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;\n\nvar isValidProps = function isValidProps(value) {\n return value !== undefined && value !== null;\n};\n\nvar isEqual = function isEqual(oldValue, newValue) {\n return newValue === oldValue || typeof newValue === 'number' && typeof oldValue === 'number' && isNaN(newValue) && isNaN(oldValue);\n};\n\nvar InputNumber = /*#__PURE__*/function (_React$Component) {\n _inherits(InputNumber, _React$Component);\n\n var _super = _createSuper(InputNumber);\n\n function InputNumber(props) {\n var _this;\n\n _classCallCheck(this, InputNumber);\n\n _this = _super.call(this, props);\n\n _this.onKeyDown = function (e) {\n var _this$props = _this.props,\n onKeyDown = _this$props.onKeyDown,\n onPressEnter = _this$props.onPressEnter;\n\n if (e.keyCode === KeyCode.UP) {\n var ratio = _this.getRatio(e);\n\n _this.up(e, ratio, null);\n\n _this.stop();\n } else if (e.keyCode === KeyCode.DOWN) {\n var _ratio = _this.getRatio(e);\n\n _this.down(e, _ratio, null);\n\n _this.stop();\n } else if (e.keyCode === KeyCode.ENTER && onPressEnter) {\n onPressEnter(e);\n } // Trigger user key down\n\n\n _this.recordCursorPosition();\n\n _this.lastKeyCode = e.keyCode;\n\n if (onKeyDown) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n onKeyDown.apply(void 0, [e].concat(args));\n }\n };\n\n _this.onKeyUp = function (e) {\n var onKeyUp = _this.props.onKeyUp;\n\n _this.stop();\n\n _this.recordCursorPosition(); // Trigger user key up\n\n\n if (onKeyUp) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n onKeyUp.apply(void 0, [e].concat(args));\n }\n };\n\n _this.onChange = function (e) {\n var onChange = _this.props.onChange;\n\n if (_this.state.focused) {\n _this.inputting = true;\n }\n\n _this.rawInput = _this.props.parser(_this.getValueFromEvent(e));\n\n _this.setState({\n inputValue: _this.rawInput\n });\n\n onChange(_this.toNumber(_this.rawInput)); // valid number or invalid string\n };\n\n _this.onMouseUp = function () {\n var onMouseUp = _this.props.onMouseUp;\n\n _this.recordCursorPosition();\n\n if (onMouseUp) {\n onMouseUp.apply(void 0, arguments);\n }\n };\n\n _this.onFocus = function () {\n var _this$props2;\n\n _this.setState({\n focused: true\n });\n\n (_this$props2 = _this.props).onFocus.apply(_this$props2, arguments);\n };\n\n _this.onBlur = function () {\n var onBlur = _this.props.onBlur;\n _this.inputting = false;\n\n _this.setState({\n focused: false\n });\n\n var value = _this.getCurrentValidValue(_this.state.inputValue);\n\n var newValue = _this.setValue(value, noop);\n\n if (onBlur) {\n var originValue = _this.input.value;\n\n var displayValue = _this.getInputDisplayValue({\n focus: false,\n value: newValue\n });\n\n _this.input.value = displayValue;\n onBlur.apply(void 0, arguments);\n _this.input.value = originValue;\n }\n };\n\n _this.getRatio = function (e) {\n var ratio = 1;\n\n if (e.metaKey || e.ctrlKey) {\n ratio = 0.1;\n } else if (e.shiftKey) {\n ratio = 10;\n }\n\n return ratio;\n };\n\n _this.getFullNum = function (num) {\n if (isNaN(num)) {\n return num;\n }\n\n if (!/e/i.test(String(num))) {\n return num;\n }\n\n return Number(num).toFixed(18).replace(/\\.?0+$/, '');\n };\n\n _this.getPrecision = function (value) {\n if (isValidProps(_this.props.precision)) {\n return _this.props.precision;\n }\n\n var valueString = String(value);\n\n if (valueString.indexOf('e-') >= 0) {\n return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10);\n }\n\n var precision = 0;\n\n if (valueString.indexOf('.') >= 0) {\n precision = valueString.length - valueString.indexOf('.') - 1;\n }\n\n return precision;\n };\n\n _this.getInputDisplayValue = function (state) {\n var _ref = state || _this.state,\n focused = _ref.focused,\n inputValue = _ref.inputValue,\n value = _ref.value;\n\n var inputDisplayValue;\n\n if (focused) {\n inputDisplayValue = inputValue;\n } else {\n inputDisplayValue = _this.toPrecisionAsStep(value);\n }\n\n if (inputDisplayValue === undefined || inputDisplayValue === null) {\n inputDisplayValue = '';\n }\n\n var inputDisplayValueFormat = _this.formatWrapper(inputDisplayValue);\n\n if (isValidProps(_this.props.decimalSeparator)) {\n inputDisplayValueFormat = inputDisplayValueFormat.toString().replace('.', _this.props.decimalSeparator);\n }\n\n return inputDisplayValueFormat;\n };\n\n _this.recordCursorPosition = function () {\n // Record position\n try {\n _this.cursorStart = _this.input.selectionStart;\n _this.cursorEnd = _this.input.selectionEnd;\n _this.currentValue = _this.input.value;\n _this.cursorBefore = _this.input.value.substring(0, _this.cursorStart);\n _this.cursorAfter = _this.input.value.substring(_this.cursorEnd);\n } catch (e) {// Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n };\n\n _this.restoreByAfter = function (str) {\n if (str === undefined) return false;\n var fullStr = _this.input.value;\n var index = fullStr.lastIndexOf(str);\n if (index === -1) return false;\n var prevCursorPos = _this.cursorBefore.length;\n\n if (_this.lastKeyCode === KeyCode.DELETE && _this.cursorBefore.charAt(prevCursorPos - 1) === str[0]) {\n _this.fixCaret(prevCursorPos, prevCursorPos);\n\n return true;\n }\n\n if (index + str.length === fullStr.length) {\n _this.fixCaret(index, index);\n\n return true;\n }\n\n return false;\n };\n\n _this.partRestoreByAfter = function (str) {\n if (str === undefined) return false; // For loop from full str to the str with last char to map. e.g. 123\n // -> 123\n // -> 23\n // -> 3\n\n return Array.prototype.some.call(str, function (_, start) {\n var partStr = str.substring(start);\n return _this.restoreByAfter(partStr);\n });\n }; // '1.' '1x' 'xx' '' => are not complete numbers\n\n\n _this.isNotCompleteNumber = function (num) {\n return isNaN(num) || num === '' || num === null || num && num.toString().indexOf('.') === num.toString().length - 1;\n };\n\n _this.stop = function () {\n if (_this.autoStepTimer) {\n clearTimeout(_this.autoStepTimer);\n }\n };\n\n _this.down = function (e, ratio, recursive) {\n _this.pressingUpOrDown = true;\n\n _this.step('down', e, ratio, recursive);\n };\n\n _this.up = function (e, ratio, recursive) {\n _this.pressingUpOrDown = true;\n\n _this.step('up', e, ratio, recursive);\n };\n\n _this.saveInput = function (node) {\n _this.input = node;\n };\n\n var value = props.value;\n\n if (value === undefined) {\n value = props.defaultValue;\n }\n\n _this.state = {\n focused: props.autoFocus\n };\n\n var validValue = _this.getValidValue(_this.toNumber(value));\n\n _this.state = _objectSpread(_objectSpread({}, _this.state), {}, {\n inputValue: _this.toPrecisionAsStep(validValue),\n value: validValue\n });\n return _this;\n }\n\n _createClass(InputNumber, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate(null);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props3 = this.props,\n value = _this$props3.value,\n onChange = _this$props3.onChange,\n max = _this$props3.max,\n min = _this$props3.min;\n var focused = this.state.focused; // Don't trigger in componentDidMount\n\n if (prevProps) {\n if (!isEqual(prevProps.value, value) || !isEqual(prevProps.max, max) || !isEqual(prevProps.min, min)) {\n var validValue = focused ? value : this.getValidValue(value);\n var nextInputValue;\n\n if (this.pressingUpOrDown) {\n nextInputValue = validValue;\n } else if (this.inputting) {\n nextInputValue = this.rawInput;\n } else {\n nextInputValue = this.toPrecisionAsStep(validValue);\n }\n\n this.setState({\n // eslint-disable-line\n value: validValue,\n inputValue: nextInputValue\n });\n } // Trigger onChange when max or min change\n // https://github.com/ant-design/ant-design/issues/11574\n\n\n var nextValue = 'value' in this.props ? value : this.state.value; // ref: null < 20 === true\n // https://github.com/ant-design/ant-design/issues/14277\n\n if ('max' in this.props && prevProps.max !== max && typeof nextValue === 'number' && nextValue > max && onChange) {\n onChange(max);\n }\n\n if ('min' in this.props && prevProps.min !== min && typeof nextValue === 'number' && nextValue < min && onChange) {\n onChange(min);\n }\n } // Restore cursor\n\n\n try {\n // Firefox set the input cursor after it get focused.\n // This caused that if an input didn't init with the selection,\n // set will cause cursor not correct when first focus.\n // Safari will focus input if set selection. We need skip this.\n if (this.cursorStart !== undefined && this.state.focused) {\n // In most cases, the string after cursor is stable.\n // We can move the cursor before it\n if ( // If not match full str, try to match part of str\n !this.partRestoreByAfter(this.cursorAfter) && this.state.value !== this.props.value) {\n // If not match any of then, let's just keep the position\n // TODO: Logic should not reach here, need check if happens\n var pos = this.cursorStart + 1; // If not have last string, just position to the end\n\n if (!this.cursorAfter) {\n pos = this.input.value.length;\n } else if (this.lastKeyCode === KeyCode.BACKSPACE) {\n pos = this.cursorStart - 1;\n } else if (this.lastKeyCode === KeyCode.DELETE) {\n pos = this.cursorStart;\n }\n\n this.fixCaret(pos, pos);\n } else if (this.currentValue === this.input.value) {\n // Handle some special key code\n switch (this.lastKeyCode) {\n case KeyCode.BACKSPACE:\n this.fixCaret(this.cursorStart - 1, this.cursorStart - 1);\n break;\n\n case KeyCode.DELETE:\n this.fixCaret(this.cursorStart + 1, this.cursorStart + 1);\n break;\n\n default: // Do nothing\n\n }\n }\n }\n } catch (e) {// Do nothing\n } // Reset last key\n\n\n this.lastKeyCode = null; // pressingUpOrDown is true means that someone just click up or down button\n\n if (!this.pressingUpOrDown) {\n return;\n }\n\n if (this.props.focusOnUpDown && this.state.focused) {\n if (document.activeElement !== this.input) {\n this.focus();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.stop();\n }\n }, {\n key: \"getCurrentValidValue\",\n value: function getCurrentValidValue(value) {\n var val = value;\n\n if (val === '') {\n val = '';\n } else if (!this.isNotCompleteNumber(parseFloat(val))) {\n val = this.getValidValue(val);\n } else {\n val = this.state.value;\n }\n\n return this.toNumber(val);\n }\n }, {\n key: \"getValueFromEvent\",\n value: function getValueFromEvent(e) {\n // optimize for chinese input expierence\n // https://github.com/ant-design/ant-design/issues/8196\n var value = e.target.value.trim().replace(/。/g, '.');\n\n if (isValidProps(this.props.decimalSeparator)) {\n value = value.replace(this.props.decimalSeparator, '.');\n }\n\n return value;\n }\n }, {\n key: \"getValidValue\",\n value: function getValidValue(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props.min;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props.max;\n var val = parseFloat(value); // https://github.com/ant-design/ant-design/issues/7358\n\n if (isNaN(val)) {\n return value;\n }\n\n if (val < min) {\n val = min;\n }\n\n if (val > max) {\n val = max;\n }\n\n return val;\n }\n }, {\n key: \"setValue\",\n value: function setValue(v, callback) {\n // trigger onChange\n var precision = this.props.precision;\n var newValue = this.isNotCompleteNumber(parseFloat(v)) ? null : parseFloat(v);\n var _this$state$value = this.state.value,\n value = _this$state$value === void 0 ? null : _this$state$value;\n var _this$state$inputValu = this.state.inputValue,\n inputValue = _this$state$inputValu === void 0 ? null : _this$state$inputValu; // https://github.com/ant-design/ant-design/issues/7363\n // https://github.com/ant-design/ant-design/issues/16622\n\n var newValueInString = typeof newValue === 'number' ? newValue.toFixed(precision) : \"\".concat(newValue);\n var changed = newValue !== value || newValueInString !== \"\".concat(inputValue);\n\n if (!('value' in this.props)) {\n this.setState({\n value: newValue,\n inputValue: this.toPrecisionAsStep(v)\n }, callback);\n } else {\n // always set input value same as value\n inputValue = this.toPrecisionAsStep(this.state.value);\n this.setState({\n inputValue: inputValue\n }, callback);\n }\n\n if (changed) {\n this.props.onChange(newValue);\n }\n\n return newValue;\n } // step={1.0} value={1.51}\n // press +\n // then value should be 2.51, rather than 2.5\n // if this.props.precision is undefined\n // https://github.com/react-component/input-number/issues/39\n\n }, {\n key: \"getMaxPrecision\",\n value: function getMaxPrecision(currentValue) {\n var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var _this$props4 = this.props,\n precision = _this$props4.precision,\n step = _this$props4.step;\n\n if (isValidProps(precision)) {\n return precision;\n }\n\n var ratioPrecision = this.getPrecision(ratio);\n var stepPrecision = this.getPrecision(step);\n var currentValuePrecision = this.getPrecision(currentValue);\n\n if (!currentValue) {\n return ratioPrecision + stepPrecision;\n }\n\n return Math.max(currentValuePrecision, ratioPrecision + stepPrecision);\n }\n }, {\n key: \"getPrecisionFactor\",\n value: function getPrecisionFactor(currentValue) {\n var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var precision = this.getMaxPrecision(currentValue, ratio);\n return Math.pow(10, precision);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.input.focus();\n this.recordCursorPosition();\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.input.blur();\n }\n }, {\n key: \"select\",\n value: function select() {\n this.input.select();\n }\n }, {\n key: \"formatWrapper\",\n value: function formatWrapper(num) {\n // http://2ality.com/2012/03/signedzero.html\n // https://github.com/ant-design/ant-design/issues/9439\n if (this.props.formatter) {\n return this.props.formatter(num);\n }\n\n return num;\n }\n }, {\n key: \"toPrecisionAsStep\",\n value: function toPrecisionAsStep(num) {\n if (this.isNotCompleteNumber(num) || num === '') {\n return num;\n }\n\n var precision = Math.abs(this.getMaxPrecision(num));\n\n if (!isNaN(precision)) {\n return Number(num).toFixed(precision);\n }\n\n return num.toString();\n }\n }, {\n key: \"toNumber\",\n value: function toNumber(num) {\n var precision = this.props.precision;\n var focused = this.state.focused; // num.length > 16 => This is to prevent input of large numbers\n\n var numberIsTooLarge = num && num.length > 16 && focused;\n\n if (this.isNotCompleteNumber(num) || numberIsTooLarge) {\n return num;\n }\n\n if (isValidProps(precision)) {\n return Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision);\n }\n\n return Number(num);\n }\n }, {\n key: \"upStep\",\n value: function upStep(val, rat) {\n var step = this.props.step;\n var precisionFactor = this.getPrecisionFactor(val, rat);\n var precision = Math.abs(this.getMaxPrecision(val, rat));\n var result = ((precisionFactor * val + precisionFactor * step * rat) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n }, {\n key: \"downStep\",\n value: function downStep(val, rat) {\n var step = this.props.step;\n var precisionFactor = this.getPrecisionFactor(val, rat);\n var precision = Math.abs(this.getMaxPrecision(val, rat));\n var result = ((precisionFactor * val - precisionFactor * step * rat) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n }, {\n key: \"step\",\n value: function step(type, e) {\n var _this2 = this;\n\n var ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var recursive = arguments.length > 3 ? arguments[3] : undefined;\n this.stop();\n\n if (e) {\n e.persist();\n e.preventDefault();\n }\n\n var props = this.props;\n\n if (props.disabled) {\n return;\n }\n\n var value = this.getCurrentValidValue(this.state.inputValue) || 0;\n\n if (this.isNotCompleteNumber(value)) {\n return;\n }\n\n var val = this[\"\".concat(type, \"Step\")](value, ratio);\n var outOfRange = val > props.max || val < props.min;\n\n if (val > props.max) {\n val = props.max;\n } else if (val < props.min) {\n val = props.min;\n }\n\n this.setValue(val, null);\n if (props.onStep) props.onStep(val, {\n offset: ratio,\n type: type\n });\n this.setState({\n focused: true\n }, function () {\n _this2.pressingUpOrDown = false;\n });\n\n if (outOfRange) {\n return;\n }\n\n this.autoStepTimer = setTimeout(function () {\n _this2[type](e, ratio, true);\n }, recursive ? SPEED : DELAY);\n }\n }, {\n key: \"fixCaret\",\n value: function fixCaret(start, end) {\n if (start === undefined || end === undefined || !this.input || !this.input.value) {\n return;\n }\n\n try {\n var currentStart = this.input.selectionStart;\n var currentEnd = this.input.selectionEnd;\n\n if (start !== currentStart || end !== currentEnd) {\n this.input.setSelectionRange(start, end);\n }\n } catch (e) {// Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var _this$props5 = this.props,\n prefixCls = _this$props5.prefixCls,\n disabled = _this$props5.disabled,\n readOnly = _this$props5.readOnly,\n useTouch = _this$props5.useTouch,\n autoComplete = _this$props5.autoComplete,\n upHandler = _this$props5.upHandler,\n downHandler = _this$props5.downHandler,\n className = _this$props5.className,\n max = _this$props5.max,\n min = _this$props5.min,\n style = _this$props5.style,\n title = _this$props5.title,\n onMouseEnter = _this$props5.onMouseEnter,\n onMouseLeave = _this$props5.onMouseLeave,\n onMouseOver = _this$props5.onMouseOver,\n onMouseOut = _this$props5.onMouseOut,\n required = _this$props5.required,\n onClick = _this$props5.onClick,\n tabIndex = _this$props5.tabIndex,\n type = _this$props5.type,\n placeholder = _this$props5.placeholder,\n id = _this$props5.id,\n inputMode = _this$props5.inputMode,\n pattern = _this$props5.pattern,\n step = _this$props5.step,\n maxLength = _this$props5.maxLength,\n autoFocus = _this$props5.autoFocus,\n name = _this$props5.name,\n onPaste = _this$props5.onPaste,\n onInput = _this$props5.onInput,\n rest = _objectWithoutProperties(_this$props5, [\"prefixCls\", \"disabled\", \"readOnly\", \"useTouch\", \"autoComplete\", \"upHandler\", \"downHandler\", \"className\", \"max\", \"min\", \"style\", \"title\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOver\", \"onMouseOut\", \"required\", \"onClick\", \"tabIndex\", \"type\", \"placeholder\", \"id\", \"inputMode\", \"pattern\", \"step\", \"maxLength\", \"autoFocus\", \"name\", \"onPaste\", \"onInput\"]);\n\n var _this$state = this.state,\n value = _this$state.value,\n focused = _this$state.focused;\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, className, !!className), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-focused\"), focused), _classNames));\n var dataOrAriaAttributeProps = {};\n Object.keys(rest).forEach(function (key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {\n dataOrAriaAttributeProps[key] = rest[key];\n }\n });\n var editable = !readOnly && !disabled; // focus state, show input value\n // unfocus state, show valid value\n\n var inputDisplayValue = this.getInputDisplayValue(null);\n var upDisabled = (value || value === 0) && (isNaN(value) || Number(value) >= max);\n var downDisabled = (value || value === 0) && (isNaN(value) || Number(value) <= min);\n var isUpDisabled = upDisabled || disabled || readOnly;\n var isDownDisabled = downDisabled || disabled || readOnly;\n var upClassName = classNames(\"\".concat(prefixCls, \"-handler\"), \"\".concat(prefixCls, \"-handler-up\"), _defineProperty({}, \"\".concat(prefixCls, \"-handler-up-disabled\"), isUpDisabled));\n var downClassName = classNames(\"\".concat(prefixCls, \"-handler\"), \"\".concat(prefixCls, \"-handler-down\"), _defineProperty({}, \"\".concat(prefixCls, \"-handler-down-disabled\"), isDownDisabled));\n var upEvents = useTouch ? {\n onTouchStart: isUpDisabled ? noop : this.up,\n onTouchEnd: this.stop\n } : {\n onMouseDown: isUpDisabled ? noop : this.up,\n onMouseUp: this.stop,\n onMouseLeave: this.stop\n };\n var downEvents = useTouch ? {\n onTouchStart: isDownDisabled ? noop : this.down,\n onTouchEnd: this.stop\n } : {\n onMouseDown: isDownDisabled ? noop : this.down,\n onMouseUp: this.stop,\n onMouseLeave: this.stop\n };\n return React.createElement(\"div\", {\n className: classes,\n style: style,\n title: title,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseOver: onMouseOver,\n onMouseOut: onMouseOut,\n onFocus: function onFocus() {\n return null;\n },\n onBlur: function onBlur() {\n return null;\n }\n }, React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-handler-wrap\")\n }, React.createElement(\"span\", Object.assign({\n unselectable: \"on\"\n }, upEvents, {\n role: \"button\",\n \"aria-label\": \"Increase Value\",\n \"aria-disabled\": isUpDisabled,\n className: upClassName\n }), upHandler || React.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-up-inner\"),\n onClick: preventDefault\n })), React.createElement(\"span\", Object.assign({\n unselectable: \"on\"\n }, downEvents, {\n role: \"button\",\n \"aria-label\": \"Decrease Value\",\n \"aria-disabled\": isDownDisabled,\n className: downClassName\n }), downHandler || React.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-down-inner\"),\n onClick: preventDefault\n }))), React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-input-wrap\")\n }, React.createElement(\"input\", Object.assign({\n role: \"spinbutton\",\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": value,\n required: required,\n type: type,\n placeholder: placeholder,\n onPaste: onPaste,\n onClick: onClick,\n onMouseUp: this.onMouseUp,\n className: \"\".concat(prefixCls, \"-input\"),\n tabIndex: tabIndex,\n autoComplete: autoComplete,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: editable ? this.onKeyDown : noop,\n onKeyUp: editable ? this.onKeyUp : noop,\n autoFocus: autoFocus,\n maxLength: maxLength,\n readOnly: readOnly,\n disabled: disabled,\n max: max,\n min: min,\n step: step,\n name: name,\n title: title,\n id: id,\n onChange: this.onChange,\n ref: this.saveInput,\n value: this.getFullNum(inputDisplayValue),\n pattern: pattern,\n inputMode: inputMode,\n onInput: onInput\n }, dataOrAriaAttributeProps))));\n }\n }]);\n\n return InputNumber;\n}(React.Component);\n\nInputNumber.defaultProps = {\n focusOnUpDown: true,\n useTouch: false,\n prefixCls: 'rc-input-number',\n max: MAX_SAFE_INTEGER,\n min: -MAX_SAFE_INTEGER,\n step: 1,\n style: {},\n onChange: noop,\n onKeyDown: noop,\n onPressEnter: noop,\n onFocus: noop,\n onBlur: noop,\n parser: defaultParser,\n required: false,\n autoComplete: 'off'\n};\nexport default InputNumber;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-input-number/es/InputNumber.js"],"names":["_defineProperty","_objectWithoutProperties","_objectSpread","_classCallCheck","_createClass","_inherits","_createSuper","React","classNames","KeyCode","noop","preventDefault","e","defaultParser","input","replace","SPEED","DELAY","MAX_SAFE_INTEGER","Number","Math","pow","isValidProps","value","undefined","isEqual","oldValue","newValue","isNaN","InputNumber","_React$Component","_super","props","_this","call","onKeyDown","_this$props","onPressEnter","keyCode","UP","ratio","getRatio","up","stop","DOWN","_ratio","down","ENTER","recordCursorPosition","lastKeyCode","_len","arguments","length","args","Array","_key","apply","concat","onKeyUp","_len2","_key2","onChange","state","focused","inputting","rawInput","parser","getValueFromEvent","setState","inputValue","toNumber","onMouseUp","onFocus","_this$props2","onBlur","getCurrentValidValue","setValue","originValue","displayValue","getInputDisplayValue","focus","metaKey","ctrlKey","shiftKey","getFullNum","num","test","String","toFixed","getPrecision","precision","valueString","indexOf","parseInt","slice","_ref","inputDisplayValue","toPrecisionAsStep","inputDisplayValueFormat","formatWrapper","decimalSeparator","toString","cursorStart","selectionStart","cursorEnd","selectionEnd","currentValue","cursorBefore","substring","cursorAfter","restoreByAfter","str","fullStr","index","lastIndexOf","prevCursorPos","DELETE","charAt","fixCaret","partRestoreByAfter","prototype","some","_","start","partStr","isNotCompleteNumber","autoStepTimer","clearTimeout","recursive","pressingUpOrDown","step","saveInput","node","defaultValue","autoFocus","validValue","getValidValue","key","componentDidMount","componentDidUpdate","prevProps","_this$props3","max","min","nextInputValue","nextValue","pos","BACKSPACE","focusOnUpDown","document","activeElement","componentWillUnmount","val","parseFloat","target","trim","v","callback","_this$state$value","_this$state$inputValu","newValueInString","changed","getMaxPrecision","_this$props4","ratioPrecision","stepPrecision","currentValuePrecision","getPrecisionFactor","blur","select","formatter","abs","numberIsTooLarge","round","upStep","rat","precisionFactor","result","downStep","type","_this2","persist","disabled","outOfRange","onStep","offset","setTimeout","end","currentStart","currentEnd","setSelectionRange","render","_classNames","_this$props5","prefixCls","readOnly","useTouch","autoComplete","upHandler","downHandler","className","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","placeholder","id","inputMode","pattern","maxLength","name","onPaste","onInput","rest","_this$state","classes","dataOrAriaAttributeProps","Object","keys","forEach","substr","editable","upDisabled","downDisabled","isUpDisabled","isDownDisabled","upClassName","downClassName","upEvents","onTouchStart","onTouchEnd","onMouseDown","downEvents","createElement","assign","unselectable","role","ref","Component","defaultProps"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAOC,aAAP,MAA0B,0CAA1B;AACA,OAAOC,eAAP,MAA4B,2CAA5B;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AACA,OAAOC,SAAP,MAAsB,qCAAtB;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AAEA;;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,oBAApB;;AAEA,SAASC,IAAT,GAAgB,CAAE;;AAElB,SAASC,cAAT,CAAwBC,CAAxB,EAA2B;AACzBA,EAAAA,CAAC,CAACD,cAAF;AACD;;AAED,IAAIE,aAAa,GAAG,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAChD,SAAOA,KAAK,CAACC,OAAN,CAAc,WAAd,EAA2B,EAA3B,CAAP;AACD,CAFD;AAGA;AAC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W;AAWzB8D,EAAAA,OAAO,EAAE9D,IAXgB;AAYzBgE,EAAAA,MAAM,EAAEhE,IAZiB;AAazBwD,EAAAA,MAAM,EAAErD,aAbiB;AAczBkM,EAAAA,QAAQ,EAAE,KAde;AAezBV,EAAAA,YAAY,EAAE;AAfW,CAA3B;AAiBA,eAAexK,WAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\n\nfunction noop() {}\n\nfunction preventDefault(e) {\n e.preventDefault();\n}\n\nvar defaultParser = function defaultParser(input) {\n return input.replace(/[^\\w.-]+/g, '');\n};\n/**\n * When click and hold on a button - the speed of auto changin the value.\n */\n\n\nvar SPEED = 200;\n/**\n * When click and hold on a button - the delay before auto changin the value.\n */\n\nvar DELAY = 600;\n/**\n * Max Safe Integer -- on IE this is not available, so manually set the number in that case.\n * The reason this is used, instead of Infinity is because numbers above the MSI are unstable\n */\n\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;\n\nvar isValidProps = function isValidProps(value) {\n return value !== undefined && value !== null;\n};\n\nvar isEqual = function isEqual(oldValue, newValue) {\n return newValue === oldValue || typeof newValue === 'number' && typeof oldValue === 'number' && isNaN(newValue) && isNaN(oldValue);\n};\n\nvar InputNumber = /*#__PURE__*/function (_React$Component) {\n _inherits(InputNumber, _React$Component);\n\n var _super = _createSuper(InputNumber);\n\n function InputNumber(props) {\n var _this;\n\n _classCallCheck(this, InputNumber);\n\n _this = _super.call(this, props);\n\n _this.onKeyDown = function (e) {\n var _this$props = _this.props,\n onKeyDown = _this$props.onKeyDown,\n onPressEnter = _this$props.onPressEnter;\n\n if (e.keyCode === KeyCode.UP) {\n var ratio = _this.getRatio(e);\n\n _this.up(e, ratio, null);\n\n _this.stop();\n } else if (e.keyCode === KeyCode.DOWN) {\n var _ratio = _this.getRatio(e);\n\n _this.down(e, _ratio, null);\n\n _this.stop();\n } else if (e.keyCode === KeyCode.ENTER && onPressEnter) {\n onPressEnter(e);\n } // Trigger user key down\n\n\n _this.recordCursorPosition();\n\n _this.lastKeyCode = e.keyCode;\n\n if (onKeyDown) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n onKeyDown.apply(void 0, [e].concat(args));\n }\n };\n\n _this.onKeyUp = function (e) {\n var onKeyUp = _this.props.onKeyUp;\n\n _this.stop();\n\n _this.recordCursorPosition(); // Trigger user key up\n\n\n if (onKeyUp) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n onKeyUp.apply(void 0, [e].concat(args));\n }\n };\n\n _this.onChange = function (e) {\n var onChange = _this.props.onChange;\n\n if (_this.state.focused) {\n _this.inputting = true;\n }\n\n _this.rawInput = _this.props.parser(_this.getValueFromEvent(e));\n\n _this.setState({\n inputValue: _this.rawInput\n });\n\n onChange(_this.toNumber(_this.rawInput)); // valid number or invalid string\n };\n\n _this.onMouseUp = function () {\n var onMouseUp = _this.props.onMouseUp;\n\n _this.recordCursorPosition();\n\n if (onMouseUp) {\n onMouseUp.apply(void 0, arguments);\n }\n };\n\n _this.onFocus = function () {\n var _this$props2;\n\n _this.setState({\n focused: true\n });\n\n (_this$props2 = _this.props).onFocus.apply(_this$props2, arguments);\n };\n\n _this.onBlur = function () {\n var onBlur = _this.props.onBlur;\n _this.inputting = false;\n\n _this.setState({\n focused: false\n });\n\n var value = _this.getCurrentValidValue(_this.state.inputValue);\n\n var newValue = _this.setValue(value, noop);\n\n if (onBlur) {\n var originValue = _this.input.value;\n\n var displayValue = _this.getInputDisplayValue({\n focus: false,\n value: newValue\n });\n\n _this.input.value = displayValue;\n onBlur.apply(void 0, arguments);\n _this.input.value = originValue;\n }\n };\n\n _this.getRatio = function (e) {\n var ratio = 1;\n\n if (e.metaKey || e.ctrlKey) {\n ratio = 0.1;\n } else if (e.shiftKey) {\n ratio = 10;\n }\n\n return ratio;\n };\n\n _this.getFullNum = function (num) {\n if (isNaN(num)) {\n return num;\n }\n\n if (!/e/i.test(String(num))) {\n return num;\n }\n\n return Number(num).toFixed(18).replace(/\\.?0+$/, '');\n };\n\n _this.getPrecision = function (value) {\n if (isValidProps(_this.props.precision)) {\n return _this.props.precision;\n }\n\n var valueString = String(value);\n\n if (valueString.indexOf('e-') >= 0) {\n return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10);\n }\n\n var precision = 0;\n\n if (valueString.indexOf('.') >= 0) {\n precision = valueString.length - valueString.indexOf('.') - 1;\n }\n\n return precision;\n };\n\n _this.getInputDisplayValue = function (state) {\n var _ref = state || _this.state,\n focused = _ref.focused,\n inputValue = _ref.inputValue,\n value = _ref.value;\n\n var inputDisplayValue;\n\n if (focused) {\n inputDisplayValue = inputValue;\n } else {\n inputDisplayValue = _this.toPrecisionAsStep(value);\n }\n\n if (inputDisplayValue === undefined || inputDisplayValue === null) {\n inputDisplayValue = '';\n }\n\n var inputDisplayValueFormat = _this.formatWrapper(inputDisplayValue);\n\n if (isValidProps(_this.props.decimalSeparator)) {\n inputDisplayValueFormat = inputDisplayValueFormat.toString().replace('.', _this.props.decimalSeparator);\n }\n\n return inputDisplayValueFormat;\n };\n\n _this.recordCursorPosition = function () {\n // Record position\n try {\n _this.cursorStart = _this.input.selectionStart;\n _this.cursorEnd = _this.input.selectionEnd;\n _this.currentValue = _this.input.value;\n _this.cursorBefore = _this.input.value.substring(0, _this.cursorStart);\n _this.cursorAfter = _this.input.value.substring(_this.cursorEnd);\n } catch (e) {// Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n };\n\n _this.restoreByAfter = function (str) {\n if (str === undefined) return false;\n var fullStr = _this.input.value;\n var index = fullStr.lastIndexOf(str);\n if (index === -1) return false;\n var prevCursorPos = _this.cursorBefore.length;\n\n if (_this.lastKeyCode === KeyCode.DELETE && _this.cursorBefore.charAt(prevCursorPos - 1) === str[0]) {\n _this.fixCaret(prevCursorPos, prevCursorPos);\n\n return true;\n }\n\n if (index + str.length === fullStr.length) {\n _this.fixCaret(index, index);\n\n return true;\n }\n\n return false;\n };\n\n _this.partRestoreByAfter = function (str) {\n if (str === undefined) return false; // For loop from full str to the str with last char to map. e.g. 123\n // -> 123\n // -> 23\n // -> 3\n\n return Array.prototype.some.call(str, function (_, start) {\n var partStr = str.substring(start);\n return _this.restoreByAfter(partStr);\n });\n }; // '1.' '1x' 'xx' '' => are not complete numbers\n\n\n _this.isNotCompleteNumber = function (num) {\n return isNaN(num) || num === '' || num === null || num && num.toString().indexOf('.') === num.toString().length - 1;\n };\n\n _this.stop = function () {\n if (_this.autoStepTimer) {\n clearTimeout(_this.autoStepTimer);\n }\n };\n\n _this.down = function (e, ratio, recursive) {\n _this.pressingUpOrDown = true;\n\n _this.step('down', e, ratio, recursive);\n };\n\n _this.up = function (e, ratio, recursive) {\n _this.pressingUpOrDown = true;\n\n _this.step('up', e, ratio, recursive);\n };\n\n _this.saveInput = function (node) {\n _this.input = node;\n };\n\n var value = props.value;\n\n if (value === undefined) {\n value = props.defaultValue;\n }\n\n _this.state = {\n focused: props.autoFocus\n };\n\n var validValue = _this.getValidValue(_this.toNumber(value));\n\n _this.state = _objectSpread(_objectSpread({}, _this.state), {}, {\n inputValue: _this.toPrecisionAsStep(validValue),\n value: validValue\n });\n return _this;\n }\n\n _createClass(InputNumber, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate(null);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props3 = this.props,\n value = _this$props3.value,\n onChange = _this$props3.onChange,\n max = _this$props3.max,\n min = _this$props3.min;\n var focused = this.state.focused; // Don't trigger in componentDidMount\n\n if (prevProps) {\n if (!isEqual(prevProps.value, value) || !isEqual(prevProps.max, max) || !isEqual(prevProps.min, min)) {\n var validValue = focused ? value : this.getValidValue(value);\n var nextInputValue;\n\n if (this.pressingUpOrDown) {\n nextInputValue = validValue;\n } else if (this.inputting) {\n nextInputValue = this.rawInput;\n } else {\n nextInputValue = this.toPrecisionAsStep(validValue);\n }\n\n this.setState({\n // eslint-disable-line\n value: validValue,\n inputValue: nextInputValue\n });\n } // Trigger onChange when max or min change\n // https://github.com/ant-design/ant-design/issues/11574\n\n\n var nextValue = 'value' in this.props ? value : this.state.value; // ref: null < 20 === true\n // https://github.com/ant-design/ant-design/issues/14277\n\n if ('max' in this.props && prevProps.max !== max && typeof nextValue === 'number' && nextValue > max && onChange) {\n onChange(max);\n }\n\n if ('min' in this.props && prevProps.min !== min && typeof nextValue === 'number' && nextValue < min && onChange) {\n onChange(min);\n }\n } // Restore cursor\n\n\n try {\n // Firefox set the input cursor after it get focused.\n // This caused that if an input didn't init with the selection,\n // set will cause cursor not correct when first focus.\n // Safari will focus input if set selection. We need skip this.\n if (this.cursorStart !== undefined && this.state.focused) {\n // In most cases, the string after cursor is stable.\n // We can move the cursor before it\n if ( // If not match full str, try to match part of str\n !this.partRestoreByAfter(this.cursorAfter) && this.state.value !== this.props.value) {\n // If not match any of then, let's just keep the position\n // TODO: Logic should not reach here, need check if happens\n var pos = this.cursorStart + 1; // If not have last string, just position to the end\n\n if (!this.cursorAfter) {\n pos = this.input.value.length;\n } else if (this.lastKeyCode === KeyCode.BACKSPACE) {\n pos = this.cursorStart - 1;\n } else if (this.lastKeyCode === KeyCode.DELETE) {\n pos = this.cursorStart;\n }\n\n this.fixCaret(pos, pos);\n } else if (this.currentValue === this.input.value) {\n // Handle some special key code\n switch (this.lastKeyCode) {\n case KeyCode.BACKSPACE:\n this.fixCaret(this.cursorStart - 1, this.cursorStart - 1);\n break;\n\n case KeyCode.DELETE:\n this.fixCaret(this.cursorStart + 1, this.cursorStart + 1);\n break;\n\n default: // Do nothing\n\n }\n }\n }\n } catch (e) {// Do nothing\n } // Reset last key\n\n\n this.lastKeyCode = null; // pressingUpOrDown is true means that someone just click up or down button\n\n if (!this.pressingUpOrDown) {\n return;\n }\n\n if (this.props.focusOnUpDown && this.state.focused) {\n if (document.activeElement !== this.input) {\n this.focus();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.stop();\n }\n }, {\n key: \"getCurrentValidValue\",\n value: function getCurrentValidValue(value) {\n var val = value;\n\n if (val === '') {\n val = '';\n } else if (!this.isNotCompleteNumber(parseFloat(val))) {\n val = this.getValidValue(val);\n } else {\n val = this.state.value;\n }\n\n return this.toNumber(val);\n }\n }, {\n key: \"getValueFromEvent\",\n value: function getValueFromEvent(e) {\n // optimize for chinese input expierence\n // https://github.com/ant-design/ant-design/issues/8196\n var value = e.target.value.trim().replace(/。/g, '.');\n\n if (isValidProps(this.props.decimalSeparator)) {\n value = value.replace(this.props.decimalSeparator, '.');\n }\n\n return value;\n }\n }, {\n key: \"getValidValue\",\n value: function getValidValue(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props.min;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props.max;\n var val = parseFloat(value); // https://github.com/ant-design/ant-design/issues/7358\n\n if (isNaN(val)) {\n return value;\n }\n\n if (val < min) {\n val = min;\n }\n\n if (val > max) {\n val = max;\n }\n\n return val;\n }\n }, {\n key: \"setValue\",\n value: function setValue(v, callback) {\n // trigger onChange\n var precision = this.props.precision;\n var newValue = this.isNotCompleteNumber(parseFloat(v)) ? null : parseFloat(v);\n var _this$state$value = this.state.value,\n value = _this$state$value === void 0 ? null : _this$state$value;\n var _this$state$inputValu = this.state.inputValue,\n inputValue = _this$state$inputValu === void 0 ? null : _this$state$inputValu; // https://github.com/ant-design/ant-design/issues/7363\n // https://github.com/ant-design/ant-design/issues/16622\n\n var newValueInString = typeof newValue === 'number' ? newValue.toFixed(precision) : \"\".concat(newValue);\n var changed = newValue !== value || newValueInString !== \"\".concat(inputValue);\n\n if (!('value' in this.props)) {\n this.setState({\n value: newValue,\n inputValue: this.toPrecisionAsStep(v)\n }, callback);\n } else {\n // always set input value same as value\n inputValue = this.toPrecisionAsStep(this.state.value);\n this.setState({\n inputValue: inputValue\n }, callback);\n }\n\n if (changed) {\n this.props.onChange(newValue);\n }\n\n return newValue;\n } // step={1.0} value={1.51}\n // press +\n // then value should be 2.51, rather than 2.5\n // if this.props.precision is undefined\n // https://github.com/react-component/input-number/issues/39\n\n }, {\n key: \"getMaxPrecision\",\n value: function getMaxPrecision(currentValue) {\n var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var _this$props4 = this.props,\n precision = _this$props4.precision,\n step = _this$props4.step;\n\n if (isValidProps(precision)) {\n return precision;\n }\n\n var ratioPrecision = this.getPrecision(ratio);\n var stepPrecision = this.getPrecision(step);\n var currentValuePrecision = this.getPrecision(currentValue);\n\n if (!currentValue) {\n return ratioPrecision + stepPrecision;\n }\n\n return Math.max(currentValuePrecision, ratioPrecision + stepPrecision);\n }\n }, {\n key: \"getPrecisionFactor\",\n value: function getPrecisionFactor(currentValue) {\n var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var precision = this.getMaxPrecision(currentValue, ratio);\n return Math.pow(10, precision);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.input.focus();\n this.recordCursorPosition();\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.input.blur();\n }\n }, {\n key: \"select\",\n value: function select() {\n this.input.select();\n }\n }, {\n key: \"formatWrapper\",\n value: function formatWrapper(num) {\n // http://2ality.com/2012/03/signedzero.html\n // https://github.com/ant-design/ant-design/issues/9439\n if (this.props.formatter) {\n return this.props.formatter(num);\n }\n\n return num;\n }\n }, {\n key: \"toPrecisionAsStep\",\n value: function toPrecisionAsStep(num) {\n if (this.isNotCompleteNumber(num) || num === '') {\n return num;\n }\n\n var precision = Math.abs(this.getMaxPrecision(num));\n\n if (!isNaN(precision)) {\n return Number(num).toFixed(precision);\n }\n\n return num.toString();\n }\n }, {\n key: \"toNumber\",\n value: function toNumber(num) {\n var precision = this.props.precision;\n var focused = this.state.focused; // num.length > 16 => This is to prevent input of large numbers\n\n var numberIsTooLarge = num && num.length > 16 && focused;\n\n if (this.isNotCompleteNumber(num) || numberIsTooLarge) {\n return num;\n }\n\n if (isValidProps(precision)) {\n return Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision);\n }\n\n return Number(num);\n }\n }, {\n key: \"upStep\",\n value: function upStep(val, rat) {\n var step = this.props.step;\n var precisionFactor = this.getPrecisionFactor(val, rat);\n var precision = Math.abs(this.getMaxPrecision(val, rat));\n var result = ((precisionFactor * val + precisionFactor * step * rat) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n }, {\n key: \"downStep\",\n value: function downStep(val, rat) {\n var step = this.props.step;\n var precisionFactor = this.getPrecisionFactor(val, rat);\n var precision = Math.abs(this.getMaxPrecision(val, rat));\n var result = ((precisionFactor * val - precisionFactor * step * rat) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n }, {\n key: \"step\",\n value: function step(type, e) {\n var _this2 = this;\n\n var ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var recursive = arguments.length > 3 ? arguments[3] : undefined;\n this.stop();\n\n if (e) {\n e.persist();\n e.preventDefault();\n }\n\n var props = this.props;\n\n if (props.disabled) {\n return;\n }\n\n var value = this.getCurrentValidValue(this.state.inputValue) || 0;\n\n if (this.isNotCompleteNumber(value)) {\n return;\n }\n\n var val = this[\"\".concat(type, \"Step\")](value, ratio);\n var outOfRange = val > props.max || val < props.min;\n\n if (val > props.max) {\n val = props.max;\n } else if (val < props.min) {\n val = props.min;\n }\n\n this.setValue(val, null);\n if (props.onStep) props.onStep(val, {\n offset: ratio,\n type: type\n });\n this.setState({\n focused: true\n }, function () {\n _this2.pressingUpOrDown = false;\n });\n\n if (outOfRange) {\n return;\n }\n\n this.autoStepTimer = setTimeout(function () {\n _this2[type](e, ratio, true);\n }, recursive ? SPEED : DELAY);\n }\n }, {\n key: \"fixCaret\",\n value: function fixCaret(start, end) {\n if (start === undefined || end === undefined || !this.input || !this.input.value) {\n return;\n }\n\n try {\n var currentStart = this.input.selectionStart;\n var currentEnd = this.input.selectionEnd;\n\n if (start !== currentStart || end !== currentEnd) {\n this.input.setSelectionRange(start, end);\n }\n } catch (e) {// Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var _this$props5 = this.props,\n prefixCls = _this$props5.prefixCls,\n disabled = _this$props5.disabled,\n readOnly = _this$props5.readOnly,\n useTouch = _this$props5.useTouch,\n autoComplete = _this$props5.autoComplete,\n upHandler = _this$props5.upHandler,\n downHandler = _this$props5.downHandler,\n className = _this$props5.className,\n max = _this$props5.max,\n min = _this$props5.min,\n style = _this$props5.style,\n title = _this$props5.title,\n onMouseEnter = _this$props5.onMouseEnter,\n onMouseLeave = _this$props5.onMouseLeave,\n onMouseOver = _this$props5.onMouseOver,\n onMouseOut = _this$props5.onMouseOut,\n required = _this$props5.required,\n onClick = _this$props5.onClick,\n tabIndex = _this$props5.tabIndex,\n type = _this$props5.type,\n placeholder = _this$props5.placeholder,\n id = _this$props5.id,\n inputMode = _this$props5.inputMode,\n pattern = _this$props5.pattern,\n step = _this$props5.step,\n maxLength = _this$props5.maxLength,\n autoFocus = _this$props5.autoFocus,\n name = _this$props5.name,\n onPaste = _this$props5.onPaste,\n onInput = _this$props5.onInput,\n rest = _objectWithoutProperties(_this$props5, [\"prefixCls\", \"disabled\", \"readOnly\", \"useTouch\", \"autoComplete\", \"upHandler\", \"downHandler\", \"className\", \"max\", \"min\", \"style\", \"title\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOver\", \"onMouseOut\", \"required\", \"onClick\", \"tabIndex\", \"type\", \"placeholder\", \"id\", \"inputMode\", \"pattern\", \"step\", \"maxLength\", \"autoFocus\", \"name\", \"onPaste\", \"onInput\"]);\n\n var _this$state = this.state,\n value = _this$state.value,\n focused = _this$state.focused;\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, className, !!className), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-focused\"), focused), _classNames));\n var dataOrAriaAttributeProps = {};\n Object.keys(rest).forEach(function (key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {\n dataOrAriaAttributeProps[key] = rest[key];\n }\n });\n var editable = !readOnly && !disabled; // focus state, show input value\n // unfocus state, show valid value\n\n var inputDisplayValue = this.getInputDisplayValue(null);\n var upDisabled = (value || value === 0) && (isNaN(value) || Number(value) >= max);\n var downDisabled = (value || value === 0) && (isNaN(value) || Number(value) <= min);\n var isUpDisabled = upDisabled || disabled || readOnly;\n var isDownDisabled = downDisabled || disabled || readOnly;\n var upClassName = classNames(\"\".concat(prefixCls, \"-handler\"), \"\".concat(prefixCls, \"-handler-up\"), _defineProperty({}, \"\".concat(prefixCls, \"-handler-up-disabled\"), isUpDisabled));\n var downClassName = classNames(\"\".concat(prefixCls, \"-handler\"), \"\".concat(prefixCls, \"-handler-down\"), _defineProperty({}, \"\".concat(prefixCls, \"-handler-down-disabled\"), isDownDisabled));\n var upEvents = useTouch ? {\n onTouchStart: isUpDisabled ? noop : this.up,\n onTouchEnd: this.stop\n } : {\n onMouseDown: isUpDisabled ? noop : this.up,\n onMouseUp: this.stop,\n onMouseLeave: this.stop\n };\n var downEvents = useTouch ? {\n onTouchStart: isDownDisabled ? noop : this.down,\n onTouchEnd: this.stop\n } : {\n onMouseDown: isDownDisabled ? noop : this.down,\n onMouseUp: this.stop,\n onMouseLeave: this.stop\n };\n return React.createElement(\"div\", {\n className: classes,\n style: style,\n title: title,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseOver: onMouseOver,\n onMouseOut: onMouseOut,\n onFocus: function onFocus() {\n return null;\n },\n onBlur: function onBlur() {\n return null;\n }\n }, React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-handler-wrap\")\n }, React.createElement(\"span\", Object.assign({\n unselectable: \"on\"\n }, upEvents, {\n role: \"button\",\n \"aria-label\": \"Increase Value\",\n \"aria-disabled\": isUpDisabled,\n className: upClassName\n }), upHandler || React.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-up-inner\"),\n onClick: preventDefault\n })), React.createElement(\"span\", Object.assign({\n unselectable: \"on\"\n }, downEvents, {\n role: \"button\",\n \"aria-label\": \"Decrease Value\",\n \"aria-disabled\": isDownDisabled,\n className: downClassName\n }), downHandler || React.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-down-inner\"),\n onClick: preventDefault\n }))), React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-input-wrap\")\n }, React.createElement(\"input\", Object.assign({\n role: \"spinbutton\",\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": value,\n required: required,\n type: type,\n placeholder: placeholder,\n onPaste: onPaste,\n onClick: onClick,\n onMouseUp: this.onMouseUp,\n className: \"\".concat(prefixCls, \"-input\"),\n tabIndex: tabIndex,\n autoComplete: autoComplete,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: editable ? this.onKeyDown : noop,\n onKeyUp: editable ? this.onKeyUp : noop,\n autoFocus: autoFocus,\n maxLength: maxLength,\n readOnly: readOnly,\n disabled: disabled,\n max: max,\n min: min,\n step: step,\n name: name,\n title: title,\n id: id,\n onChange: this.onChange,\n ref: this.saveInput,\n value: this.getFullNum(inputDisplayValue),\n pattern: pattern,\n inputMode: inputMode,\n onInput: onInput\n }, dataOrAriaAttributeProps))));\n }\n }]);\n\n return InputNumber;\n}(React.Component);\n\nInputNumber.defaultProps = {\n focusOnUpDown: true,\n useTouch: false,\n prefixCls: 'rc-input-number',\n max: MAX_SAFE_INTEGER,\n min: -MAX_SAFE_INTEGER,\n step: 1,\n style: {},\n onChange: noop,\n onKeyDown: noop,\n onPressEnter: noop,\n onFocus: noop,\n onBlur: noop,\n parser: defaultParser,\n required: false,\n autoComplete: 'off'\n};\nexport default InputNumber;"]},"metadata":{},"sourceType":"module"}