You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/31795.async.js

1987 lines
68 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[31795],{
/***/ 48115:
/*!***************************************************************************!*\
!*** ./node_modules/@ant-design/icons/es/icons/UpOutlined.js + 1 modules ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ icons_UpOutlined; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js
// This icon file is generated automatically.
var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
/* harmony default export */ var asn_UpOutlined = (UpOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
var AntdIcon = __webpack_require__(74643);
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/UpOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var UpOutlined_UpOutlined = function UpOutlined(props, ref) {
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_UpOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_UpOutlined = (/*#__PURE__*/react.forwardRef(UpOutlined_UpOutlined));
/***/ }),
/***/ 31795:
/*!*****************************************************************!*\
!*** ./node_modules/antd/es/input-number/index.js + 21 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ input_number; }
});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownOutlined.js + 1 modules
var DownOutlined = __webpack_require__(80882);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/UpOutlined.js + 1 modules
var UpOutlined = __webpack_require__(48115);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4942);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(71002);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(97685);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(45987);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__(15671);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__(43144);
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/supportUtil.js
function supportBigInt() {
return typeof BigInt === 'function';
}
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/numberUtil.js
function isEmpty(value) {
return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
}
/**
* Format string number to readable number
*/
function trimNumber(numStr) {
var str = numStr.trim();
var negative = str.startsWith('-');
if (negative) {
str = str.slice(1);
}
str = str
// Remove decimal 0. `1.000` => `1.`, `1.100` => `1.1`
.replace(/(\.\d*[^0])0*$/, '$1')
// Remove useless decimal. `1.` => `1`
.replace(/\.0*$/, '')
// Remove integer 0. `0001` => `1`, 000.1' => `.1`
.replace(/^0+/, '');
if (str.startsWith('.')) {
str = "0".concat(str);
}
var trimStr = str || '0';
var splitNumber = trimStr.split('.');
var integerStr = splitNumber[0] || '0';
var decimalStr = splitNumber[1] || '0';
if (integerStr === '0' && decimalStr === '0') {
negative = false;
}
var negativeStr = negative ? '-' : '';
return {
negative: negative,
negativeStr: negativeStr,
trimStr: trimStr,
integerStr: integerStr,
decimalStr: decimalStr,
fullStr: "".concat(negativeStr).concat(trimStr)
};
}
function isE(number) {
var str = String(number);
return !Number.isNaN(Number(str)) && str.includes('e');
}
/**
* [Legacy] Convert 1e-9 to 0.000000001.
* This may lose some precision if user really want 1e-9.
*/
function getNumberPrecision(number) {
var numStr = String(number);
if (isE(number)) {
var precision = Number(numStr.slice(numStr.indexOf('e-') + 2));
var decimalMatch = numStr.match(/\.(\d+)/);
if (decimalMatch !== null && decimalMatch !== void 0 && decimalMatch[1]) {
precision += decimalMatch[1].length;
}
return precision;
}
return numStr.includes('.') && validateNumber(numStr) ? numStr.length - numStr.indexOf('.') - 1 : 0;
}
/**
* Convert number (includes scientific notation) to -xxx.yyy format
*/
function num2str(number) {
var numStr = String(number);
if (isE(number)) {
if (number > Number.MAX_SAFE_INTEGER) {
return String(supportBigInt() ? BigInt(number).toString() : Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return String(supportBigInt() ? BigInt(number).toString() : Number.MIN_SAFE_INTEGER);
}
numStr = number.toFixed(getNumberPrecision(numStr));
}
return trimNumber(numStr).fullStr;
}
function validateNumber(num) {
if (typeof num === 'number') {
return !Number.isNaN(num);
}
// Empty
if (!num) {
return false;
}
return (
// Normal type: 11.28
/^\s*-?\d+(\.\d+)?\s*$/.test(num) ||
// Pre-number: 1.
/^\s*-?\d+\.\s*$/.test(num) ||
// Post-number: .1
/^\s*-?\.\d+\s*$/.test(num)
);
}
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/BigIntDecimal.js
var BigIntDecimal = /*#__PURE__*/function () {
/** BigInt will convert `0009` to `9`. We need record the len of decimal */
function BigIntDecimal(value) {
(0,classCallCheck/* default */.Z)(this, BigIntDecimal);
(0,defineProperty/* default */.Z)(this, "origin", '');
(0,defineProperty/* default */.Z)(this, "negative", void 0);
(0,defineProperty/* default */.Z)(this, "integer", void 0);
(0,defineProperty/* default */.Z)(this, "decimal", void 0);
(0,defineProperty/* default */.Z)(this, "decimalLen", void 0);
(0,defineProperty/* default */.Z)(this, "empty", void 0);
(0,defineProperty/* default */.Z)(this, "nan", void 0);
if (isEmpty(value)) {
this.empty = true;
return;
}
this.origin = String(value);
// Act like Number convert
if (value === '-' || Number.isNaN(value)) {
this.nan = true;
return;
}
var mergedValue = value;
// We need convert back to Number since it require `toFixed` to handle this
if (isE(mergedValue)) {
mergedValue = Number(mergedValue);
}
mergedValue = typeof mergedValue === 'string' ? mergedValue : num2str(mergedValue);
if (validateNumber(mergedValue)) {
var trimRet = trimNumber(mergedValue);
this.negative = trimRet.negative;
var numbers = trimRet.trimStr.split('.');
this.integer = BigInt(numbers[0]);
var decimalStr = numbers[1] || '0';
this.decimal = BigInt(decimalStr);
this.decimalLen = decimalStr.length;
} else {
this.nan = true;
}
}
(0,createClass/* default */.Z)(BigIntDecimal, [{
key: "getMark",
value: function getMark() {
return this.negative ? '-' : '';
}
}, {
key: "getIntegerStr",
value: function getIntegerStr() {
return this.integer.toString();
}
/**
* @private get decimal string
*/
}, {
key: "getDecimalStr",
value: function getDecimalStr() {
return this.decimal.toString().padStart(this.decimalLen, '0');
}
/**
* @private Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
* This is used for add function only.
*/
}, {
key: "alignDecimal",
value: function alignDecimal(decimalLength) {
var str = "".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, '0'));
return BigInt(str);
}
}, {
key: "negate",
value: function negate() {
var clone = new BigIntDecimal(this.toString());
clone.negative = !clone.negative;
return clone;
}
}, {
key: "cal",
value: function cal(offset, calculator, calDecimalLen) {
var maxDecimalLength = Math.max(this.getDecimalStr().length, offset.getDecimalStr().length);
var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
var offsetAlignedDecimal = offset.alignDecimal(maxDecimalLength);
var valueStr = calculator(myAlignedDecimal, offsetAlignedDecimal).toString();
var nextDecimalLength = calDecimalLen(maxDecimalLength);
// We need fill string length back to `maxDecimalLength` to avoid parser failed
var _trimNumber = trimNumber(valueStr),
negativeStr = _trimNumber.negativeStr,
trimStr = _trimNumber.trimStr;
var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(nextDecimalLength + 1, '0'));
return new BigIntDecimal("".concat(hydrateValueStr.slice(0, -nextDecimalLength), ".").concat(hydrateValueStr.slice(-nextDecimalLength)));
}
}, {
key: "add",
value: function add(value) {
if (this.isInvalidate()) {
return new BigIntDecimal(value);
}
var offset = new BigIntDecimal(value);
if (offset.isInvalidate()) {
return this;
}
return this.cal(offset, function (num1, num2) {
return num1 + num2;
}, function (len) {
return len;
});
}
}, {
key: "multi",
value: function multi(value) {
var target = new BigIntDecimal(value);
if (this.isInvalidate() || target.isInvalidate()) {
return new BigIntDecimal(NaN);
}
return this.cal(target, function (num1, num2) {
return num1 * num2;
}, function (len) {
return len * 2;
});
}
}, {
key: "isEmpty",
value: function isEmpty() {
return this.empty;
}
}, {
key: "isNaN",
value: function isNaN() {
return this.nan;
}
}, {
key: "isInvalidate",
value: function isInvalidate() {
return this.isEmpty() || this.isNaN();
}
}, {
key: "equals",
value: function equals(target) {
return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());
}
}, {
key: "lessEquals",
value: function lessEquals(target) {
return this.add(target.negate().toString()).toNumber() <= 0;
}
}, {
key: "toNumber",
value: function toNumber() {
if (this.isNaN()) {
return NaN;
}
return Number(this.toString());
}
}, {
key: "toString",
value: function toString() {
var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (!safe) {
return this.origin;
}
if (this.isInvalidate()) {
return '';
}
return trimNumber("".concat(this.getMark()).concat(this.getIntegerStr(), ".").concat(this.getDecimalStr())).fullStr;
}
}]);
return BigIntDecimal;
}();
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/NumberDecimal.js
/**
* We can remove this when IE not support anymore
*/
var NumberDecimal = /*#__PURE__*/function () {
function NumberDecimal(value) {
(0,classCallCheck/* default */.Z)(this, NumberDecimal);
(0,defineProperty/* default */.Z)(this, "origin", '');
(0,defineProperty/* default */.Z)(this, "number", void 0);
(0,defineProperty/* default */.Z)(this, "empty", void 0);
if (isEmpty(value)) {
this.empty = true;
return;
}
this.origin = String(value);
this.number = Number(value);
}
(0,createClass/* default */.Z)(NumberDecimal, [{
key: "negate",
value: function negate() {
return new NumberDecimal(-this.toNumber());
}
}, {
key: "add",
value: function add(value) {
if (this.isInvalidate()) {
return new NumberDecimal(value);
}
var target = Number(value);
if (Number.isNaN(target)) {
return this;
}
var number = this.number + target;
// [Legacy] Back to safe integer
if (number > Number.MAX_SAFE_INTEGER) {
return new NumberDecimal(Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return new NumberDecimal(Number.MIN_SAFE_INTEGER);
}
var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
return new NumberDecimal(number.toFixed(maxPrecision));
}
}, {
key: "multi",
value: function multi(value) {
var target = Number(value);
if (this.isInvalidate() || Number.isNaN(target)) {
return new NumberDecimal(NaN);
}
var number = this.number * target;
// [Legacy] Back to safe integer
if (number > Number.MAX_SAFE_INTEGER) {
return new NumberDecimal(Number.MAX_SAFE_INTEGER);
}
if (number < Number.MIN_SAFE_INTEGER) {
return new NumberDecimal(Number.MIN_SAFE_INTEGER);
}
var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
return new NumberDecimal(number.toFixed(maxPrecision));
}
}, {
key: "isEmpty",
value: function isEmpty() {
return this.empty;
}
}, {
key: "isNaN",
value: function isNaN() {
return Number.isNaN(this.number);
}
}, {
key: "isInvalidate",
value: function isInvalidate() {
return this.isEmpty() || this.isNaN();
}
}, {
key: "equals",
value: function equals(target) {
return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
}
}, {
key: "lessEquals",
value: function lessEquals(target) {
return this.add(target.negate().toString()).toNumber() <= 0;
}
}, {
key: "toNumber",
value: function toNumber() {
return this.number;
}
}, {
key: "toString",
value: function toString() {
var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (!safe) {
return this.origin;
}
if (this.isInvalidate()) {
return '';
}
return num2str(this.number);
}
}]);
return NumberDecimal;
}();
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/MiniDecimal.js
/* eslint-disable max-classes-per-file */
// Still support origin export
function getMiniDecimal(value) {
// We use BigInt here.
// Will fallback to Number if not support.
if (supportBigInt()) {
return new BigIntDecimal(value);
}
return new NumberDecimal(value);
}
/**
* Align the logic of toFixed to around like 1.5 => 2.
* If set `cutOnly`, will just remove the over decimal part.
*/
function toFixed(numStr, separatorStr, precision) {
var cutOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
if (numStr === '') {
return '';
}
var _trimNumber = trimNumber(numStr),
negativeStr = _trimNumber.negativeStr,
integerStr = _trimNumber.integerStr,
decimalStr = _trimNumber.decimalStr;
var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
if (precision >= 0) {
// We will get last + 1 number to check if need advanced number
var advancedNum = Number(decimalStr[precision]);
if (advancedNum >= 5 && !cutOnly) {
var advancedDecimal = getMiniDecimal(numStr).add("".concat(negativeStr, "0.").concat('0'.repeat(precision)).concat(10 - advancedNum));
return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);
}
if (precision === 0) {
return numberWithoutDecimal;
}
return "".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, '0').slice(0, precision));
}
if (precisionDecimalStr === '.0') {
return numberWithoutDecimal;
}
return "".concat(numberWithoutDecimal).concat(precisionDecimalStr);
}
;// CONCATENATED MODULE: ./node_modules/@rc-component/mini-decimal/es/index.js
/* harmony default export */ var es = (getMiniDecimal);
// EXTERNAL MODULE: ./node_modules/rc-input/es/index.js + 2 modules
var rc_input_es = __webpack_require__(67656);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/Dom/canUseDom.js
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js
/**
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
*/
var useInternalLayoutEffect = true && canUseDom() ? react.useLayoutEffect : react.useEffect;
var useLayoutEffect = function useLayoutEffect(callback, deps) {
var firstMountRef = react.useRef(true);
useInternalLayoutEffect(function () {
return callback(firstMountRef.current);
}, deps);
// We tell react that first mount has passed
useInternalLayoutEffect(function () {
firstMountRef.current = false;
return function () {
firstMountRef.current = true;
};
}, []);
};
var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
useLayoutEffect(function (firstMount) {
if (!firstMount) {
return callback();
}
}, deps);
};
/* harmony default export */ var hooks_useLayoutEffect = (useLayoutEffect);
// EXTERNAL MODULE: ./node_modules/react-is/index.js
var react_is = __webpack_require__(59864);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMemo.js
function useMemo_useMemo(getValue, condition, shouldUpdate) {
var cacheRef = React.useRef({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/ref.js
/* eslint-disable no-param-reassign */
function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if ((0,esm_typeof/* default */.Z)(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
}
/**
* Merge refs into one ref function to support ref passing.
*/
function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
var refList = refs.filter(function (ref) {
return ref;
});
if (refList.length <= 1) {
return refList[0];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
}
function useComposeRef() {
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
refs[_key2] = arguments[_key2];
}
return useMemo(function () {
return composeRef.apply(void 0, refs);
}, refs, function (prev, next) {
return prev.length === next.length && prev.every(function (ref, i) {
return ref === next[i];
});
});
}
function supportRef(nodeOrComponent) {
var _type$prototype, _nodeOrComponent$prot;
var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
// Function component node
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {
return false;
}
// Class component
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {
return false;
}
return true;
}
/* eslint-enable */
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/warning.js
/* eslint-disable no-console */
var warned = {};
var preWarningFns = [];
/**
* Pre warning enable you to parse content before console.error.
* Modify to null will prevent warning.
*/
var preMessage = function preMessage(fn) {
preWarningFns.push(fn);
};
function warning(valid, message) {
// Support uglify
if (false) { var finalMessage; }
}
function note(valid, message) {
// Support uglify
if (false) { var finalMessage; }
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
function warningOnce(valid, message) {
call(warning, valid, message);
}
function noteOnce(valid, message) {
call(note, valid, message);
}
warningOnce.preMessage = preMessage;
warningOnce.resetWarned = resetWarned;
warningOnce.noteOnce = noteOnce;
/* harmony default export */ var es_warning = (warningOnce);
/* eslint-enable */
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/hooks/useCursor.js
/**
* Keep input cursor in the correct position if possible.
* Is this necessary since we have `formatter` which may mass the content?
*/
function useCursor(input, focused) {
var selectionRef = (0,react.useRef)(null);
function recordCursor() {
// Record position
try {
var start = input.selectionStart,
end = input.selectionEnd,
value = input.value;
var beforeTxt = value.substring(0, start);
var afterTxt = value.substring(end);
selectionRef.current = {
start: start,
end: end,
value: value,
beforeTxt: beforeTxt,
afterTxt: afterTxt
};
} catch (e) {
// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
/**
* Restore logic:
* 1. back string same
* 2. start string same
*/
function restoreCursor() {
if (input && selectionRef.current && focused) {
try {
var value = input.value;
var _selectionRef$current = selectionRef.current,
beforeTxt = _selectionRef$current.beforeTxt,
afterTxt = _selectionRef$current.afterTxt,
start = _selectionRef$current.start;
var startPos = value.length;
if (value.endsWith(afterTxt)) {
startPos = value.length - selectionRef.current.afterTxt.length;
} else if (value.startsWith(beforeTxt)) {
startPos = beforeTxt.length;
} else {
var beforeLastChar = beforeTxt[start - 1];
var newIndex = value.indexOf(beforeLastChar, start - 1);
if (newIndex !== -1) {
startPos = newIndex + 1;
}
}
input.setSelectionRange(startPos, startPos);
} catch (e) {
es_warning(false, "Something warning of cursor restore. Please fire issue about this: ".concat(e.message));
}
}
}
return [recordCursor, restoreCursor];
}
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/isMobile.js
/* harmony default export */ var isMobile = (function () {
if (typeof navigator === 'undefined' || typeof window === 'undefined') {
return false;
}
var agent = navigator.userAgent || navigator.vendor || window.opera;
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));
});
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMobile.js
/**
* Hook to detect if the user is on a mobile device
* Notice that this hook will only detect the device type in effect, so it will always be false in server side
*/
var useMobile = function useMobile() {
var _useState = (0,react.useState)(false),
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
mobile = _useState2[0],
setMobile = _useState2[1];
hooks_useLayoutEffect(function () {
setMobile(isMobile());
}, []);
return mobile;
};
/* harmony default export */ var hooks_useMobile = (useMobile);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/node_modules/rc-util/es/raf.js
var raf = function raf(callback) {
return +setTimeout(callback, 16);
};
var caf = function caf(num) {
return clearTimeout(num);
};
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
raf = function raf(callback) {
return window.requestAnimationFrame(callback);
};
caf = function caf(handle) {
return window.cancelAnimationFrame(handle);
};
}
var rafUUID = 0;
var rafIds = new Map();
function cleanup(id) {
rafIds.delete(id);
}
var wrapperRaf = function wrapperRaf(callback) {
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
rafUUID += 1;
var id = rafUUID;
function callRef(leftTimes) {
if (leftTimes === 0) {
// Clean up
cleanup(id);
// Trigger
callback();
} else {
// Next raf
var realId = raf(function () {
callRef(leftTimes - 1);
});
// Bind real raf id
rafIds.set(id, realId);
}
}
callRef(times);
return id;
};
wrapperRaf.cancel = function (id) {
var realId = rafIds.get(id);
cleanup(realId);
return caf(realId);
};
/* harmony default export */ var es_raf = (wrapperRaf);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/StepHandler.js
/* eslint-disable react/no-unknown-property */
/**
* When click and hold on a button - the speed of auto changing the value.
*/
var STEP_INTERVAL = 200;
/**
* When click and hold on a button - the delay before auto changing the value.
*/
var STEP_DELAY = 600;
function StepHandler(_ref) {
var prefixCls = _ref.prefixCls,
upNode = _ref.upNode,
downNode = _ref.downNode,
upDisabled = _ref.upDisabled,
downDisabled = _ref.downDisabled,
onStep = _ref.onStep;
// ======================== Step ========================
var stepTimeoutRef = react.useRef();
var frameIds = react.useRef([]);
var onStepRef = react.useRef();
onStepRef.current = onStep;
var onStopStep = function onStopStep() {
clearTimeout(stepTimeoutRef.current);
};
// We will interval update step when hold mouse down
var onStepMouseDown = function onStepMouseDown(e, up) {
e.preventDefault();
onStopStep();
onStepRef.current(up);
// Loop step for interval
function loopStep() {
onStepRef.current(up);
stepTimeoutRef.current = setTimeout(loopStep, STEP_INTERVAL);
}
// First time press will wait some time to trigger loop step update
stepTimeoutRef.current = setTimeout(loopStep, STEP_DELAY);
};
react.useEffect(function () {
return function () {
onStopStep();
frameIds.current.forEach(function (id) {
return es_raf.cancel(id);
});
};
}, []);
// ======================= Render =======================
var isMobile = hooks_useMobile();
if (isMobile) {
return null;
}
var handlerClassName = "".concat(prefixCls, "-handler");
var upClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-up"), (0,defineProperty/* default */.Z)({}, "".concat(handlerClassName, "-up-disabled"), upDisabled));
var downClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-down"), (0,defineProperty/* default */.Z)({}, "".concat(handlerClassName, "-down-disabled"), downDisabled));
// fix: https://github.com/ant-design/ant-design/issues/43088
// In Safari, When we fire onmousedown and onmouseup events in quick succession,
// there may be a problem that the onmouseup events are executed first,
// resulting in a disordered program execution.
// So, we need to use requestAnimationFrame to ensure that the onmouseup event is executed after the onmousedown event.
var safeOnStopStep = function safeOnStopStep() {
return frameIds.current.push(es_raf(onStopStep));
};
var sharedHandlerProps = {
unselectable: 'on',
role: 'button',
onMouseUp: safeOnStopStep,
onMouseLeave: safeOnStopStep
};
return /*#__PURE__*/react.createElement("div", {
className: "".concat(handlerClassName, "-wrap")
}, /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({}, sharedHandlerProps, {
onMouseDown: function onMouseDown(e) {
onStepMouseDown(e, true);
},
"aria-label": "Increase Value",
"aria-disabled": upDisabled,
className: upClassName
}), upNode || /*#__PURE__*/react.createElement("span", {
unselectable: "on",
className: "".concat(prefixCls, "-handler-up-inner")
})), /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({}, sharedHandlerProps, {
onMouseDown: function onMouseDown(e) {
onStepMouseDown(e, false);
},
"aria-label": "Decrease Value",
"aria-disabled": downDisabled,
className: downClassName
}), downNode || /*#__PURE__*/react.createElement("span", {
unselectable: "on",
className: "".concat(prefixCls, "-handler-down-inner")
})));
}
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/utils/numberUtil.js
function getDecupleSteps(step) {
var stepStr = typeof step === 'number' ? num2str(step) : trimNumber(step).fullStr;
var hasPoint = stepStr.includes('.');
if (!hasPoint) {
return step + '0';
}
return trimNumber(stepStr.replace(/(\d)\.(\d)/g, '$1$2.')).fullStr;
}
// EXTERNAL MODULE: ./node_modules/rc-input/es/utils/commonUtils.js
var commonUtils = __webpack_require__(87887);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/hooks/useFrame.js
/**
* Always trigger latest once when call multiple time
*/
/* harmony default export */ var useFrame = (function () {
var idRef = (0,react.useRef)(0);
var cleanUp = function cleanUp() {
es_raf.cancel(idRef.current);
};
(0,react.useEffect)(function () {
return cleanUp;
}, []);
return function (callback) {
cleanUp();
idRef.current = es_raf(function () {
callback();
});
};
});
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/InputNumber.js
var _excluded = ["prefixCls", "className", "style", "min", "max", "step", "defaultValue", "value", "disabled", "readOnly", "upHandler", "downHandler", "keyboard", "controls", "classNames", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep"],
_excluded2 = ["disabled", "style", "prefixCls", "value", "prefix", "suffix", "addonBefore", "addonAfter", "classes", "className", "classNames"];
/**
* We support `stringMode` which need handle correct type when user call in onChange
* format max or min value
* 1. if isInvalid return null
* 2. if precision is undefined, return decimal
* 3. format with precision
* I. if max > 0, round down with precision. Example: max= 3.5, precision=0 afterFormat: 3
* II. if max < 0, round up with precision. Example: max= -3.5, precision=0 afterFormat: -4
* III. if min > 0, round up with precision. Example: min= 3.5, precision=0 afterFormat: 4
* IV. if min < 0, round down with precision. Example: max= -3.5, precision=0 afterFormat: -3
*/
var getDecimalValue = function getDecimalValue(stringMode, decimalValue) {
if (stringMode || decimalValue.isEmpty()) {
return decimalValue.toString();
}
return decimalValue.toNumber();
};
var getDecimalIfValidate = function getDecimalIfValidate(value) {
var decimal = es(value);
return decimal.isInvalidate() ? null : decimal;
};
var InternalInputNumber = /*#__PURE__*/react.forwardRef(function (props, ref) {
var _clsx;
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-input-number' : _props$prefixCls,
className = props.className,
style = props.style,
min = props.min,
max = props.max,
_props$step = props.step,
step = _props$step === void 0 ? 1 : _props$step,
defaultValue = props.defaultValue,
value = props.value,
disabled = props.disabled,
readOnly = props.readOnly,
upHandler = props.upHandler,
downHandler = props.downHandler,
keyboard = props.keyboard,
_props$controls = props.controls,
controls = _props$controls === void 0 ? true : _props$controls,
classNames = props.classNames,
stringMode = props.stringMode,
parser = props.parser,
formatter = props.formatter,
precision = props.precision,
decimalSeparator = props.decimalSeparator,
onChange = props.onChange,
onInput = props.onInput,
onPressEnter = props.onPressEnter,
onStep = props.onStep,
inputProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
var inputClassName = "".concat(prefixCls, "-input");
var inputRef = react.useRef(null);
var _React$useState = react.useState(false),
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
focus = _React$useState2[0],
setFocus = _React$useState2[1];
var userTypingRef = react.useRef(false);
var compositionRef = react.useRef(false);
var shiftKeyRef = react.useRef(false);
// ============================ Value =============================
// Real value control
var _React$useState3 = react.useState(function () {
return es(value !== null && value !== void 0 ? value : defaultValue);
}),
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
decimalValue = _React$useState4[0],
setDecimalValue = _React$useState4[1];
function setUncontrolledDecimalValue(newDecimal) {
if (value === undefined) {
setDecimalValue(newDecimal);
}
}
// ====================== Parser & Formatter ======================
/**
* `precision` is used for formatter & onChange.
* It will auto generate by `value` & `step`.
* But it will not block user typing.
*
* Note: Auto generate `precision` is used for legacy logic.
* We should remove this since we already support high precision with BigInt.
*
* @param number Provide which number should calculate precision
* @param userTyping Change by user typing
*/
var getPrecision = react.useCallback(function (numStr, userTyping) {
if (userTyping) {
return undefined;
}
if (precision >= 0) {
return precision;
}
return Math.max(getNumberPrecision(numStr), getNumberPrecision(step));
}, [precision, step]);
// >>> Parser
var mergedParser = react.useCallback(function (num) {
var numStr = String(num);
if (parser) {
return parser(numStr);
}
var parsedStr = numStr;
if (decimalSeparator) {
parsedStr = parsedStr.replace(decimalSeparator, '.');
}
// [Legacy] We still support auto convert `$ 123,456` to `123456`
return parsedStr.replace(/[^\w.-]+/g, '');
}, [parser, decimalSeparator]);
// >>> Formatter
var inputValueRef = react.useRef('');
var mergedFormatter = react.useCallback(function (number, userTyping) {
if (formatter) {
return formatter(number, {
userTyping: userTyping,
input: String(inputValueRef.current)
});
}
var str = typeof number === 'number' ? num2str(number) : number;
// User typing will not auto format with precision directly
if (!userTyping) {
var mergedPrecision = getPrecision(str, userTyping);
if (validateNumber(str) && (decimalSeparator || mergedPrecision >= 0)) {
// Separator
var separatorStr = decimalSeparator || '.';
str = toFixed(str, separatorStr, mergedPrecision);
}
}
return str;
}, [formatter, getPrecision, decimalSeparator]);
// ========================== InputValue ==========================
/**
* Input text value control
*
* User can not update input content directly. It updates with follow rules by priority:
* 1. controlled `value` changed
* * [SPECIAL] Typing like `1.` should not immediately convert to `1`
* 2. User typing with format (not precision)
* 3. Blur or Enter trigger revalidate
*/
var _React$useState5 = react.useState(function () {
var initValue = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
if (decimalValue.isInvalidate() && ['string', 'number'].includes((0,esm_typeof/* default */.Z)(initValue))) {
return Number.isNaN(initValue) ? '' : initValue;
}
return mergedFormatter(decimalValue.toString(), false);
}),
_React$useState6 = (0,slicedToArray/* default */.Z)(_React$useState5, 2),
inputValue = _React$useState6[0],
setInternalInputValue = _React$useState6[1];
inputValueRef.current = inputValue;
// Should always be string
function setInputValue(newValue, userTyping) {
setInternalInputValue(mergedFormatter(
// Invalidate number is sometime passed by external control, we should let it go
// Otherwise is controlled by internal interactive logic which check by userTyping
// You can ref 'show limited value when input is not focused' test for more info.
newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping));
}
// >>> Max & Min limit
var maxDecimal = react.useMemo(function () {
return getDecimalIfValidate(max);
}, [max, precision]);
var minDecimal = react.useMemo(function () {
return getDecimalIfValidate(min);
}, [min, precision]);
var upDisabled = react.useMemo(function () {
if (!maxDecimal || !decimalValue || decimalValue.isInvalidate()) {
return false;
}
return maxDecimal.lessEquals(decimalValue);
}, [maxDecimal, decimalValue]);
var downDisabled = react.useMemo(function () {
if (!minDecimal || !decimalValue || decimalValue.isInvalidate()) {
return false;
}
return decimalValue.lessEquals(minDecimal);
}, [minDecimal, decimalValue]);
// Cursor controller
var _useCursor = useCursor(inputRef.current, focus),
_useCursor2 = (0,slicedToArray/* default */.Z)(_useCursor, 2),
recordCursor = _useCursor2[0],
restoreCursor = _useCursor2[1];
// ============================= Data =============================
/**
* Find target value closet within range.
* e.g. [11, 28]:
* 3 => 11
* 23 => 23
* 99 => 28
*/
var getRangeValue = function getRangeValue(target) {
// target > max
if (maxDecimal && !target.lessEquals(maxDecimal)) {
return maxDecimal;
}
// target < min
if (minDecimal && !minDecimal.lessEquals(target)) {
return minDecimal;
}
return null;
};
/**
* Check value is in [min, max] range
*/
var isInRange = function isInRange(target) {
return !getRangeValue(target);
};
/**
* Trigger `onChange` if value validated and not equals of origin.
* Return the value that re-align in range.
*/
var triggerValueUpdate = function triggerValueUpdate(newValue, userTyping) {
var updateValue = newValue;
var isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();
// Skip align value when trigger value is empty.
// We just trigger onChange(null)
// This should not block user typing
if (!updateValue.isEmpty() && !userTyping) {
// Revert value in range if needed
updateValue = getRangeValue(updateValue) || updateValue;
isRangeValidate = true;
}
if (!readOnly && !disabled && isRangeValidate) {
var numStr = updateValue.toString();
var mergedPrecision = getPrecision(numStr, userTyping);
if (mergedPrecision >= 0) {
updateValue = es(toFixed(numStr, '.', mergedPrecision));
// When to fixed. The value may out of min & max range.
// 4 in [0, 3.8] => 3.8 => 4 (toFixed)
if (!isInRange(updateValue)) {
updateValue = es(toFixed(numStr, '.', mergedPrecision, true));
}
}
// Trigger event
if (!updateValue.equals(decimalValue)) {
setUncontrolledDecimalValue(updateValue);
onChange === null || onChange === void 0 ? void 0 : onChange(updateValue.isEmpty() ? null : getDecimalValue(stringMode, updateValue));
// Reformat input if value is not controlled
if (value === undefined) {
setInputValue(updateValue, userTyping);
}
}
return updateValue;
}
return decimalValue;
};
// ========================== User Input ==========================
var onNextPromise = useFrame();
// >>> Collect input value
var collectInputValue = function collectInputValue(inputStr) {
recordCursor();
// Update inputValue in case input can not parse as number
// Refresh ref value immediately since it may used by formatter
inputValueRef.current = inputStr;
setInternalInputValue(inputStr);
// Parse number
if (!compositionRef.current) {
var finalValue = mergedParser(inputStr);
var finalDecimal = es(finalValue);
if (!finalDecimal.isNaN()) {
triggerValueUpdate(finalDecimal, true);
}
}
// Trigger onInput later to let user customize value if they want to handle something after onChange
onInput === null || onInput === void 0 ? void 0 : onInput(inputStr);
// optimize for chinese input experience
// https://github.com/ant-design/ant-design/issues/8196
onNextPromise(function () {
var nextInputStr = inputStr;
if (!parser) {
nextInputStr = inputStr.replace(/。/g, '.');
}
if (nextInputStr !== inputStr) {
collectInputValue(nextInputStr);
}
});
};
// >>> Composition
var onCompositionStart = function onCompositionStart() {
compositionRef.current = true;
};
var onCompositionEnd = function onCompositionEnd() {
compositionRef.current = false;
collectInputValue(inputRef.current.value);
};
// >>> Input
var onInternalInput = function onInternalInput(e) {
collectInputValue(e.target.value);
};
// ============================= Step =============================
var onInternalStep = function onInternalStep(up) {
var _inputRef$current;
// Ignore step since out of range
if (up && upDisabled || !up && downDisabled) {
return;
}
// Clear typing status since it may be caused by up & down key.
// We should sync with input value.
userTypingRef.current = false;
var stepDecimal = es(shiftKeyRef.current ? getDecupleSteps(step) : step);
if (!up) {
stepDecimal = stepDecimal.negate();
}
var target = (decimalValue || es(0)).add(stepDecimal.toString());
var updatedValue = triggerValueUpdate(target, false);
onStep === null || onStep === void 0 ? void 0 : onStep(getDecimalValue(stringMode, updatedValue), {
offset: shiftKeyRef.current ? getDecupleSteps(step) : step,
type: up ? 'up' : 'down'
});
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
};
// ============================ Flush =============================
/**
* Flush current input content to trigger value change & re-formatter input if needed
*/
var flushInputValue = function flushInputValue(userTyping) {
var parsedValue = es(mergedParser(inputValue));
var formatValue = parsedValue;
if (!parsedValue.isNaN()) {
// Only validate value or empty value can be re-fill to inputValue
// Reassign the formatValue within ranged of trigger control
formatValue = triggerValueUpdate(parsedValue, userTyping);
} else {
formatValue = decimalValue;
}
if (value !== undefined) {
// Reset back with controlled value first
setInputValue(decimalValue, false);
} else if (!formatValue.isNaN()) {
// Reset input back since no validate value
setInputValue(formatValue, false);
}
};
// Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)
var onBeforeInput = function onBeforeInput() {
userTypingRef.current = true;
};
var onKeyDown = function onKeyDown(event) {
var key = event.key,
shiftKey = event.shiftKey;
userTypingRef.current = true;
shiftKeyRef.current = shiftKey;
if (key === 'Enter') {
if (!compositionRef.current) {
userTypingRef.current = false;
}
flushInputValue(false);
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event);
}
if (keyboard === false) {
return;
}
// Do step
if (!compositionRef.current && ['Up', 'ArrowUp', 'Down', 'ArrowDown'].includes(key)) {
onInternalStep(key === 'Up' || key === 'ArrowUp');
event.preventDefault();
}
};
var onKeyUp = function onKeyUp() {
userTypingRef.current = false;
shiftKeyRef.current = false;
};
// >>> Focus & Blur
var onBlur = function onBlur() {
flushInputValue(false);
setFocus(false);
userTypingRef.current = false;
};
// ========================== Controlled ==========================
// Input by precision
useLayoutUpdateEffect(function () {
if (!decimalValue.isInvalidate()) {
setInputValue(decimalValue, false);
}
}, [precision]);
// Input by value
useLayoutUpdateEffect(function () {
var newValue = es(value);
setDecimalValue(newValue);
var currentParsedValue = es(mergedParser(inputValue));
// When user typing from `1.2` to `1.`, we should not convert to `1` immediately.
// But let it go if user set `formatter`
if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {
// Update value as effect
setInputValue(newValue, userTypingRef.current);
}
}, [value]);
// ============================ Cursor ============================
useLayoutUpdateEffect(function () {
if (formatter) {
restoreCursor();
}
}, [inputValue]);
// ============================ Render ============================
return /*#__PURE__*/react.createElement("div", {
className: classnames_default()(prefixCls, classNames === null || classNames === void 0 ? void 0 : classNames.input, className, (_clsx = {}, (0,defineProperty/* default */.Z)(_clsx, "".concat(prefixCls, "-focused"), focus), (0,defineProperty/* default */.Z)(_clsx, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_clsx, "".concat(prefixCls, "-readonly"), readOnly), (0,defineProperty/* default */.Z)(_clsx, "".concat(prefixCls, "-not-a-number"), decimalValue.isNaN()), (0,defineProperty/* default */.Z)(_clsx, "".concat(prefixCls, "-out-of-range"), !decimalValue.isInvalidate() && !isInRange(decimalValue)), _clsx)),
style: style,
onFocus: function onFocus() {
setFocus(true);
},
onBlur: onBlur,
onKeyDown: onKeyDown,
onKeyUp: onKeyUp,
onCompositionStart: onCompositionStart,
onCompositionEnd: onCompositionEnd,
onBeforeInput: onBeforeInput
}, controls && /*#__PURE__*/react.createElement(StepHandler, {
prefixCls: prefixCls,
upNode: upHandler,
downNode: downHandler,
upDisabled: upDisabled,
downDisabled: downDisabled,
onStep: onInternalStep
}), /*#__PURE__*/react.createElement("div", {
className: "".concat(inputClassName, "-wrap")
}, /*#__PURE__*/react.createElement("input", (0,esm_extends/* default */.Z)({
autoComplete: "off",
role: "spinbutton",
"aria-valuemin": min,
"aria-valuemax": max,
"aria-valuenow": decimalValue.isInvalidate() ? null : decimalValue.toString(),
step: step
}, inputProps, {
ref: composeRef(inputRef, ref),
className: inputClassName,
value: inputValue,
onChange: onInternalInput,
disabled: disabled,
readOnly: readOnly
}))));
});
var InputNumber = /*#__PURE__*/react.forwardRef(function (props, ref) {
var disabled = props.disabled,
style = props.style,
prefixCls = props.prefixCls,
value = props.value,
prefix = props.prefix,
suffix = props.suffix,
addonBefore = props.addonBefore,
addonAfter = props.addonAfter,
classes = props.classes,
className = props.className,
classNames = props.classNames,
rest = (0,objectWithoutProperties/* default */.Z)(props, _excluded2);
var inputFocusRef = react.useRef(null);
var focus = function focus(option) {
if (inputFocusRef.current) {
(0,commonUtils/* triggerFocus */.nH)(inputFocusRef.current, option);
}
};
return /*#__PURE__*/react.createElement(rc_input_es.BaseInput, {
inputElement: /*#__PURE__*/react.createElement(InternalInputNumber, (0,esm_extends/* default */.Z)({
prefixCls: prefixCls,
disabled: disabled,
classNames: classNames,
ref: composeRef(inputFocusRef, ref)
}, rest)),
className: className,
triggerFocus: focus,
prefixCls: prefixCls,
value: value,
disabled: disabled,
style: style,
prefix: prefix,
suffix: suffix,
addonAfter: addonAfter,
addonBefore: addonBefore,
classes: classes,
classNames: classNames,
components: {
affixWrapper: 'div',
groupWrapper: 'div',
wrapper: 'div',
groupAddon: 'div'
}
});
});
InputNumber.displayName = 'InputNumber';
/* harmony default export */ var es_InputNumber = (InputNumber);
;// CONCATENATED MODULE: ./node_modules/rc-input-number/es/index.js
/* harmony default export */ var rc_input_number_es = (es_InputNumber);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/statusUtils.js
var statusUtils = __webpack_require__(9708);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/index.js + 6 modules
var config_provider = __webpack_require__(17093);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(98866);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
var useSize = __webpack_require__(98675);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var form_context = __webpack_require__(65223);
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
var Compact = __webpack_require__(4173);
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
var style = __webpack_require__(47673);
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
var es_style = __webpack_require__(14747);
// EXTERNAL MODULE: ./node_modules/antd/es/style/compact-item.js
var compact_item = __webpack_require__(80110);
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(67968);
;// CONCATENATED MODULE: ./node_modules/antd/es/input-number/style/index.js
const genInputNumberStyles = token => {
const {
componentCls,
lineWidth,
lineType,
colorBorder,
borderRadius,
fontSizeLG,
controlHeightLG,
controlHeightSM,
colorError,
inputPaddingHorizontalSM,
colorTextDescription,
motionDurationMid,
colorPrimary,
controlHeight,
inputPaddingHorizontal,
colorBgContainer,
colorTextDisabled,
borderRadiusSM,
borderRadiusLG,
controlWidth,
handleVisible
} = token;
return [{
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,es_style/* resetComponent */.Wf)(token)), (0,style/* genBasicInputStyle */.ik)(token)), (0,style/* genStatusStyle */.bi)(token, componentCls)), {
display: 'inline-block',
width: controlWidth,
margin: 0,
padding: 0,
border: `${lineWidth}px ${lineType} ${colorBorder}`,
borderRadius,
'&-rtl': {
direction: 'rtl',
[`${componentCls}-input`]: {
direction: 'rtl'
}
},
'&-lg': {
padding: 0,
fontSize: fontSizeLG,
borderRadius: borderRadiusLG,
[`input${componentCls}-input`]: {
height: controlHeightLG - 2 * lineWidth
}
},
'&-sm': {
padding: 0,
borderRadius: borderRadiusSM,
[`input${componentCls}-input`]: {
height: controlHeightSM - 2 * lineWidth,
padding: `0 ${inputPaddingHorizontalSM}px`
}
},
'&:hover': Object.assign({}, (0,style/* genHoverStyle */.pU)(token)),
'&-focused': Object.assign({}, (0,style/* genActiveStyle */.M1)(token)),
// ===================== Out Of Range =====================
'&-out-of-range': {
[`${componentCls}-input-wrap`]: {
input: {
color: colorError
}
}
},
// Style for input-group: input with label, with button or dropdown...
'&-group': Object.assign(Object.assign(Object.assign({}, (0,es_style/* resetComponent */.Wf)(token)), (0,style/* genInputGroupStyle */.s7)(token)), {
'&-wrapper': {
display: 'inline-block',
textAlign: 'start',
verticalAlign: 'top',
[`${componentCls}-affix-wrapper`]: {
width: '100%'
},
// Size
'&-lg': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusLG
}
},
'&-sm': {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusSM
}
},
[`${componentCls}-wrapper-disabled > ${componentCls}-group-addon`]: Object.assign({}, (0,style/* genDisabledStyle */.Xy)(token))
}
}),
[`&-disabled ${componentCls}-input`]: {
cursor: 'not-allowed'
},
[componentCls]: {
'&-input': Object.assign(Object.assign(Object.assign(Object.assign({}, (0,es_style/* resetComponent */.Wf)(token)), {
width: '100%',
height: controlHeight - 2 * lineWidth,
padding: `0 ${inputPaddingHorizontal}px`,
textAlign: 'start',
backgroundColor: 'transparent',
border: 0,
borderRadius,
outline: 0,
transition: `all ${motionDurationMid} linear`,
appearance: 'textfield',
fontSize: 'inherit'
}), (0,style/* genPlaceholderStyle */.nz)(token.colorTextPlaceholder)), {
'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
margin: 0,
/* stylelint-disable-next-line property-no-vendor-prefix */
webkitAppearance: 'none',
appearance: 'none'
}
})
}
})
},
// Handler
{
[componentCls]: {
[`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
opacity: 1
},
[`${componentCls}-handler-wrap`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineEnd: 0,
width: token.handleWidth,
height: '100%',
background: colorBgContainer,
borderStartStartRadius: 0,
borderStartEndRadius: borderRadius,
borderEndEndRadius: borderRadius,
borderEndStartRadius: 0,
opacity: handleVisible === true ? 1 : 0,
display: 'flex',
flexDirection: 'column',
alignItems: 'stretch',
transition: `opacity ${motionDurationMid} linear ${motionDurationMid}`,
// Fix input number inside Menu makes icon too large
// We arise the selector priority by nest selector here
// https://github.com/ant-design/ant-design/issues/14367
[`${componentCls}-handler`]: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flex: 'auto',
height: '40%',
[`
${componentCls}-handler-up-inner,
${componentCls}-handler-down-inner
`]: {
marginInlineEnd: 0,
fontSize: token.handleFontSize
}
}
},
[`${componentCls}-handler`]: {
height: '50%',
overflow: 'hidden',
color: colorTextDescription,
fontWeight: 'bold',
lineHeight: 0,
textAlign: 'center',
cursor: 'pointer',
borderInlineStart: `${lineWidth}px ${lineType} ${colorBorder}`,
transition: `all ${motionDurationMid} linear`,
'&:active': {
background: token.colorFillAlter
},
// Hover
'&:hover': {
height: `60%`,
[`
${componentCls}-handler-up-inner,
${componentCls}-handler-down-inner
`]: {
color: colorPrimary
}
},
'&-up-inner, &-down-inner': Object.assign(Object.assign({}, (0,es_style/* resetIcon */.Ro)()), {
color: colorTextDescription,
transition: `all ${motionDurationMid} linear`,
userSelect: 'none'
})
},
[`${componentCls}-handler-up`]: {
borderStartEndRadius: borderRadius
},
[`${componentCls}-handler-down`]: {
borderBlockStart: `${lineWidth}px ${lineType} ${colorBorder}`,
borderEndEndRadius: borderRadius
},
// Disabled
'&-disabled, &-readonly': {
[`${componentCls}-handler-wrap`]: {
display: 'none'
},
[`${componentCls}-input`]: {
color: 'inherit'
}
},
[`
${componentCls}-handler-up-disabled,
${componentCls}-handler-down-disabled
`]: {
cursor: 'not-allowed'
},
[`
${componentCls}-handler-up-disabled:hover &-handler-up-inner,
${componentCls}-handler-down-disabled:hover &-handler-down-inner
`]: {
color: colorTextDisabled
}
}
},
// Border-less
{
[`${componentCls}-borderless`]: {
borderColor: 'transparent',
boxShadow: 'none',
[`${componentCls}-handler-down`]: {
borderBlockStartWidth: 0
}
}
}];
};
const genAffixWrapperStyles = token => {
const {
componentCls,
inputPaddingHorizontal,
inputAffixPadding,
controlWidth,
borderRadiusLG,
borderRadiusSM
} = token;
return {
[`${componentCls}-affix-wrapper`]: Object.assign(Object.assign(Object.assign({}, (0,style/* genBasicInputStyle */.ik)(token)), (0,style/* genStatusStyle */.bi)(token, `${componentCls}-affix-wrapper`)), {
// or number handler will cover form status
position: 'relative',
display: 'inline-flex',
width: controlWidth,
padding: 0,
paddingInlineStart: inputPaddingHorizontal,
'&-lg': {
borderRadius: borderRadiusLG
},
'&-sm': {
borderRadius: borderRadiusSM
},
[`&:not(${componentCls}-affix-wrapper-disabled):hover`]: Object.assign(Object.assign({}, (0,style/* genHoverStyle */.pU)(token)), {
zIndex: 1
}),
'&-focused, &:focus': {
zIndex: 1
},
[`&-disabled > ${componentCls}-disabled`]: {
background: 'transparent'
},
[`> div${componentCls}`]: {
width: '100%',
border: 'none',
outline: 'none',
[`&${componentCls}-focused`]: {
boxShadow: 'none !important'
}
},
[`input${componentCls}-input`]: {
padding: 0
},
'&::before': {
display: 'inline-block',
width: 0,
visibility: 'hidden',
content: '"\\a0"'
},
[`${componentCls}-handler-wrap`]: {
zIndex: 2
},
[componentCls]: {
'&-prefix, &-suffix': {
display: 'flex',
flex: 'none',
alignItems: 'center',
pointerEvents: 'none'
},
'&-prefix': {
marginInlineEnd: inputAffixPadding
},
'&-suffix': {
position: 'absolute',
insetBlockStart: 0,
insetInlineEnd: 0,
zIndex: 1,
height: '100%',
marginInlineEnd: inputPaddingHorizontal,
marginInlineStart: inputAffixPadding
}
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var input_number_style = ((0,genComponentStyleHook/* default */.Z)('InputNumber', token => {
const inputNumberToken = (0,style/* initInputToken */.e5)(token);
return [genInputNumberStyles(inputNumberToken), genAffixWrapperStyles(inputNumberToken),
// =====================================================
// == Space Compact ==
// =====================================================
(0,compact_item/* genCompactItemStyle */.c)(inputNumberToken)];
}, token => ({
controlWidth: 90,
handleWidth: token.controlHeightSM - token.lineWidth * 2,
handleFontSize: token.fontSize / 2,
handleVisible: 'auto'
})));
;// CONCATENATED MODULE: ./node_modules/antd/es/input-number/index.js
'use client';
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const input_number_InputNumber = /*#__PURE__*/react.forwardRef((props, ref) => {
const {
getPrefixCls,
direction
} = react.useContext(context/* ConfigContext */.E_);
const inputRef = react.useRef(null);
react.useImperativeHandle(ref, () => inputRef.current);
const {
className,
rootClassName,
size: customizeSize,
disabled: customDisabled,
prefixCls: customizePrefixCls,
addonBefore,
addonAfter,
prefix,
bordered = true,
readOnly,
status: customStatus,
controls
} = props,
others = __rest(props, ["className", "rootClassName", "size", "disabled", "prefixCls", "addonBefore", "addonAfter", "prefix", "bordered", "readOnly", "status", "controls"]);
const prefixCls = getPrefixCls('input-number', customizePrefixCls);
// Style
const [wrapSSR, hashId] = input_number_style(prefixCls);
const {
compactSize,
compactItemClassnames
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
let upIcon = /*#__PURE__*/react.createElement(UpOutlined/* default */.Z, {
className: `${prefixCls}-handler-up-inner`
});
let downIcon = /*#__PURE__*/react.createElement(DownOutlined/* default */.Z, {
className: `${prefixCls}-handler-down-inner`
});
const controlsTemp = typeof controls === 'boolean' ? controls : undefined;
if (typeof controls === 'object') {
upIcon = typeof controls.upIcon === 'undefined' ? upIcon : /*#__PURE__*/react.createElement("span", {
className: `${prefixCls}-handler-up-inner`
}, controls.upIcon);
downIcon = typeof controls.downIcon === 'undefined' ? downIcon : /*#__PURE__*/react.createElement("span", {
className: `${prefixCls}-handler-down-inner`
}, controls.downIcon);
}
const {
hasFeedback,
status: contextStatus,
isFormItemInput,
feedbackIcon
} = react.useContext(form_context/* FormItemInputContext */.aM);
const mergedStatus = (0,statusUtils/* getMergedStatus */.F)(contextStatus, customStatus);
const mergedSize = (0,useSize/* default */.Z)(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = react.useContext(DisabledContext/* default */.Z);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const inputNumberClass = classnames_default()({
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-borderless`]: !bordered,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, (0,statusUtils/* getStatusClassNames */.Z)(prefixCls, mergedStatus), compactItemClassnames, hashId);
const wrapperClassName = `${prefixCls}-group`;
const element = /*#__PURE__*/react.createElement(rc_input_number_es, Object.assign({
ref: inputRef,
disabled: mergedDisabled,
className: classnames_default()(className, rootClassName),
upHandler: upIcon,
downHandler: downIcon,
prefixCls: prefixCls,
readOnly: readOnly,
controls: controlsTemp,
prefix: prefix,
suffix: hasFeedback && feedbackIcon,
addonAfter: addonAfter && /*#__PURE__*/react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/react.createElement(form_context/* NoFormStyle */.Ux, {
override: true,
status: true
}, addonAfter)),
addonBefore: addonBefore && /*#__PURE__*/react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/react.createElement(form_context/* NoFormStyle */.Ux, {
override: true,
status: true
}, addonBefore)),
classNames: {
input: inputNumberClass
},
classes: {
affixWrapper: classnames_default()((0,statusUtils/* getStatusClassNames */.Z)(`${prefixCls}-affix-wrapper`, mergedStatus, hasFeedback), {
[`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-affix-wrapper-borderless`]: !bordered
}, hashId),
wrapper: classnames_default()({
[`${wrapperClassName}-rtl`]: direction === 'rtl',
[`${prefixCls}-wrapper-disabled`]: mergedDisabled
}, hashId),
group: classnames_default()({
[`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
[`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl'
}, (0,statusUtils/* getStatusClassNames */.Z)(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
}
}, others));
return wrapSSR(element);
});
const TypedInputNumber = input_number_InputNumber;
const PureInputNumber = props => /*#__PURE__*/react.createElement(config_provider/* default */.ZP, {
theme: {
components: {
InputNumber: {
handleVisible: true
}
}
}
}, /*#__PURE__*/react.createElement(input_number_InputNumber, Object.assign({}, props)));
if (false) {}
TypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber;
/* harmony default export */ var input_number = (TypedInputNumber);
/***/ })
}]);