@nutui/nutui-react 1.3.11 → 1.3.12-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/esm/Cell.js +7 -108
  3. package/dist/esm/CellGroup.js +4 -34
  4. package/dist/esm/Form/style/index.js +2 -0
  5. package/dist/esm/Form.js +188 -0
  6. package/dist/esm/FormItem/style/index.js +2 -0
  7. package/dist/esm/FormItem.js +9 -0
  8. package/dist/esm/Range.js +8 -5
  9. package/dist/esm/TextArea.js +7 -8
  10. package/dist/esm/cell-c8781626.js +108 -0
  11. package/dist/esm/cellgroup-3402f96c.js +34 -0
  12. package/dist/esm/formitem-46d4aca3.js +136 -0
  13. package/dist/esm/nutui-react.es.js +2 -0
  14. package/dist/esm/types/src/packages/form/demo.d.ts +3 -0
  15. package/dist/esm/types/src/packages/form/form.d.ts +9 -0
  16. package/dist/esm/types/src/packages/form/index.d.ts +2 -0
  17. package/dist/esm/types/src/packages/form/index.taro.d.ts +2 -0
  18. package/dist/esm/types/src/packages/form/types.d.ts +82 -0
  19. package/dist/esm/types/src/packages/form/useForm.d.ts +2 -0
  20. package/dist/esm/types/src/packages/formitem/formitem.d.ts +30 -0
  21. package/dist/esm/types/src/packages/formitem/formitemcontext.d.ts +6 -0
  22. package/dist/esm/types/src/packages/formitem/index.d.ts +2 -0
  23. package/dist/esm/types/src/packages/formitem/types.d.ts +82 -0
  24. package/dist/esm/types/src/packages/formitem/useForm.d.ts +2 -0
  25. package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -1
  26. package/dist/esm/types/src/packages/nutui.react.d.ts +5 -1
  27. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +2 -0
  28. package/dist/esm/types/src/packages/range/range.d.ts +3 -0
  29. package/dist/locales/base.js +1 -1
  30. package/dist/locales/en-US.js +1 -1
  31. package/dist/locales/id-ID.js +1 -1
  32. package/dist/locales/zh-CN.js +1 -1
  33. package/dist/locales/zh-TW.js +1 -1
  34. package/dist/nutui.react.es.js +1785 -480
  35. package/dist/nutui.react.umd.js +1821 -514
  36. package/dist/packages/checkbox/checkbox.scss +1 -1
  37. package/dist/packages/form/form.scss +27 -0
  38. package/dist/packages/formitem/formitem.scss +87 -0
  39. package/dist/style.css +1 -1
  40. package/dist/style.es.js +1 -1
  41. package/dist/styles/themes/default.scss +2 -0
  42. package/dist/styles/variables.scss +77 -26
  43. package/dist/types/index.d.ts +94 -1
  44. package/dist/types/nutui.react.build.ts +5 -1
  45. package/package.json +6 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.3.11 Wed Nov 16 2022 13:46:28 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.3.12-beta.0 Wed Nov 23 2022 14:51:03 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -72,7 +72,7 @@
72
72
  classname.exports = classname_production_min;
73
73
  }
74
74
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
75
- const defaultProps$1l = {
75
+ const defaultProps$1n = {
76
76
  name: "",
77
77
  size: "",
78
78
  classPrefix: "nut-icon",
@@ -100,11 +100,11 @@
100
100
  onClick,
101
101
  ...rest
102
102
  } = {
103
- ...defaultProps$1l,
103
+ ...defaultProps$1n,
104
104
  ...props
105
105
  };
106
106
  const isImage = name ? name.indexOf("/") !== -1 : false;
107
- const type = isImage ? "img" : tag;
107
+ const type2 = isImage ? "img" : tag;
108
108
  const b2 = cn("icon");
109
109
  const handleClick2 = (e2) => {
110
110
  if (onClick) {
@@ -117,7 +117,7 @@
117
117
  return {};
118
118
  };
119
119
  return React__default["default"].createElement(
120
- type,
120
+ type2,
121
121
  {
122
122
  className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
123
123
  style: {
@@ -134,13 +134,13 @@
134
134
  children
135
135
  );
136
136
  }
137
- Icon$1.defaultProps = defaultProps$1l;
137
+ Icon$1.defaultProps = defaultProps$1n;
138
138
  Icon$1.displayName = "NutIcon";
139
139
  const ComponentDefaults = {
140
140
  iconClassPrefix: "nut-icon",
141
141
  iconFontClassName: "nutui-iconfont"
142
142
  };
143
- const defaultProps$1k = {
143
+ const defaultProps$1m = {
144
144
  ...ComponentDefaults,
145
145
  className: "",
146
146
  color: "",
@@ -164,7 +164,7 @@
164
164
  plain,
165
165
  loading,
166
166
  disabled,
167
- type,
167
+ type: type2,
168
168
  size,
169
169
  block,
170
170
  icon,
@@ -176,7 +176,7 @@
176
176
  iconFontClassName,
177
177
  ...rest
178
178
  } = {
179
- ...defaultProps$1k,
179
+ ...defaultProps$1m,
180
180
  ...props
181
181
  };
182
182
  const getStyle = React.useCallback(() => {
@@ -199,7 +199,7 @@
199
199
  const prefixCls = "nut-button";
200
200
  return [
201
201
  prefixCls,
202
- `${type ? `${prefixCls}--${type}` : ""}`,
202
+ `${type2 ? `${prefixCls}--${type2}` : ""}`,
203
203
  `${size ? `${prefixCls}--${size}` : ""}`,
204
204
  `${shape ? `${prefixCls}--${shape}` : ""}`,
205
205
  `${plain ? `${prefixCls}--plain` : ""}`,
@@ -207,7 +207,7 @@
207
207
  `${disabled ? `${prefixCls}--disabled` : ""}`,
208
208
  `${loading ? `${prefixCls}--loading` : ""}`
209
209
  ].filter(Boolean).join(" ");
210
- }, [block, disabled, loading, plain, shape, size, type]);
210
+ }, [block, disabled, loading, plain, shape, size, type2]);
211
211
  const [btnName, setBtnName] = React.useState(classes());
212
212
  const [btnStyle, setBtnStyle] = React.useState(getStyle());
213
213
  React.useEffect(() => {
@@ -221,7 +221,7 @@
221
221
  loading,
222
222
  disabled,
223
223
  style,
224
- type,
224
+ type2,
225
225
  size,
226
226
  block,
227
227
  icon,
@@ -254,19 +254,19 @@
254
254
  className: icon || loading ? "text" : ""
255
255
  }, children)));
256
256
  };
257
- Button.defaultProps = defaultProps$1k;
257
+ Button.defaultProps = defaultProps$1m;
258
258
  Button.displayName = "NutButton";
259
- function _setPrototypeOf(o, p2) {
260
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
259
+ function _setPrototypeOf$1(o, p2) {
260
+ _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
261
261
  o2.__proto__ = p3;
262
262
  return o2;
263
263
  };
264
- return _setPrototypeOf(o, p2);
264
+ return _setPrototypeOf$1(o, p2);
265
265
  }
266
- function _inheritsLoose(subClass, superClass) {
266
+ function _inheritsLoose$1(subClass, superClass) {
267
267
  subClass.prototype = Object.create(superClass.prototype);
268
268
  subClass.prototype.constructor = subClass;
269
- _setPrototypeOf(subClass, superClass);
269
+ _setPrototypeOf$1(subClass, superClass);
270
270
  }
271
271
  var propTypes = { exports: {} };
272
272
  var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
@@ -322,8 +322,8 @@
322
322
  propTypes.exports = factoryWithThrowingShims();
323
323
  }
324
324
  var PropTypes = propTypes.exports;
325
- function _extends$3() {
326
- _extends$3 = Object.assign ? Object.assign.bind() : function(target) {
325
+ function _extends$4() {
326
+ _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
327
327
  for (var i = 1; i < arguments.length; i++) {
328
328
  var source = arguments[i];
329
329
  for (var key in source) {
@@ -334,7 +334,7 @@
334
334
  }
335
335
  return target;
336
336
  };
337
- return _extends$3.apply(this, arguments);
337
+ return _extends$4.apply(this, arguments);
338
338
  }
339
339
  function isAbsolute(pathname) {
340
340
  return pathname.charAt(0) === "/";
@@ -439,7 +439,7 @@
439
439
  location = parsePath(path);
440
440
  location.state = state;
441
441
  } else {
442
- location = _extends$3({}, path);
442
+ location = _extends$4({}, path);
443
443
  if (location.pathname === void 0)
444
444
  location.pathname = "";
445
445
  if (location.search) {
@@ -546,7 +546,7 @@
546
546
  var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ["/"] : _props$initialEntries, _props$initialIndex = _props.initialIndex, initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
547
547
  var transitionManager = createTransitionManager();
548
548
  function setState(nextState) {
549
- _extends$3(history, nextState);
549
+ _extends$4(history, nextState);
550
550
  history.length = history.entries.length;
551
551
  transitionManager.notifyListeners(history.location, history.action);
552
552
  }
@@ -692,7 +692,7 @@
692
692
  var repeat = modifier === "+" || modifier === "*";
693
693
  var optional = modifier === "?" || modifier === "*";
694
694
  var delimiter = res[2] || defaultDelimiter;
695
- var pattern = capture || group;
695
+ var pattern2 = capture || group;
696
696
  tokens.push({
697
697
  name: name || key++,
698
698
  prefix: prefix2 || "",
@@ -701,7 +701,7 @@
701
701
  repeat,
702
702
  partial,
703
703
  asterisk: !!asterisk,
704
- pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
704
+ pattern: pattern2 ? escapeGroup(pattern2) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
705
705
  });
706
706
  }
707
707
  if (index < str.length) {
@@ -820,8 +820,8 @@
820
820
  for (var i = 0; i < path.length; i++) {
821
821
  parts.push(pathToRegexp(path[i], keys, options2).source);
822
822
  }
823
- var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options2));
824
- return attachKeys(regexp, keys);
823
+ var regexp2 = new RegExp("(?:" + parts.join("|") + ")", flags(options2));
824
+ return attachKeys(regexp2, keys);
825
825
  }
826
826
  function stringToRegexp(path, keys, options2) {
827
827
  return tokensToRegExp(parse$1(path, options2), keys, options2);
@@ -1061,7 +1061,7 @@
1061
1061
  var _Provider$childContex, _Consumer$contextType;
1062
1062
  var contextProp = "__create-react-context-" + getUniqueId() + "__";
1063
1063
  var Provider = /* @__PURE__ */ function(_React$Component) {
1064
- _inheritsLoose(Provider2, _React$Component);
1064
+ _inheritsLoose$1(Provider2, _React$Component);
1065
1065
  function Provider2() {
1066
1066
  var _this;
1067
1067
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -1099,7 +1099,7 @@
1099
1099
  }(React__default["default"].Component);
1100
1100
  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
1101
1101
  var Consumer = /* @__PURE__ */ function(_React$Component2) {
1102
- _inheritsLoose(Consumer2, _React$Component2);
1102
+ _inheritsLoose$1(Consumer2, _React$Component2);
1103
1103
  function Consumer2() {
1104
1104
  var _this2;
1105
1105
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
@@ -1137,7 +1137,7 @@
1137
1137
  this.context[contextProp].off(this.onUpdate);
1138
1138
  }
1139
1139
  };
1140
- _proto2.getValue = function getValue() {
1140
+ _proto2.getValue = function getValue2() {
1141
1141
  if (this.context[contextProp]) {
1142
1142
  return this.context[contextProp].get();
1143
1143
  } else {
@@ -1164,7 +1164,7 @@
1164
1164
  var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
1165
1165
  var context = /* @__PURE__ */ createNamedContext("Router");
1166
1166
  var Router = /* @__PURE__ */ function(_React$Component) {
1167
- _inheritsLoose(Router2, _React$Component);
1167
+ _inheritsLoose$1(Router2, _React$Component);
1168
1168
  Router2.computeRootMatch = function computeRootMatch(pathname) {
1169
1169
  return {
1170
1170
  path: "/",
@@ -1233,7 +1233,7 @@
1233
1233
  return Router2;
1234
1234
  }(React__default["default"].Component);
1235
1235
  /* @__PURE__ */ (function(_React$Component) {
1236
- _inheritsLoose(MemoryRouter, _React$Component);
1236
+ _inheritsLoose$1(MemoryRouter, _React$Component);
1237
1237
  function MemoryRouter() {
1238
1238
  var _this;
1239
1239
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -1253,7 +1253,7 @@
1253
1253
  return MemoryRouter;
1254
1254
  })(React__default["default"].Component);
1255
1255
  /* @__PURE__ */ (function(_React$Component) {
1256
- _inheritsLoose(Lifecycle, _React$Component);
1256
+ _inheritsLoose$1(Lifecycle, _React$Component);
1257
1257
  function Lifecycle() {
1258
1258
  return _React$Component.apply(this, arguments) || this;
1259
1259
  }
@@ -1284,9 +1284,9 @@
1284
1284
  if (pathCache[path])
1285
1285
  return pathCache[path];
1286
1286
  var keys = [];
1287
- var regexp = pathToRegexp$1(path, keys, options2);
1287
+ var regexp2 = pathToRegexp$1(path, keys, options2);
1288
1288
  var result = {
1289
- regexp,
1289
+ regexp: regexp2,
1290
1290
  keys
1291
1291
  };
1292
1292
  if (cacheCount$1 < cacheLimit$1) {
@@ -1315,8 +1315,8 @@
1315
1315
  end: exact,
1316
1316
  strict,
1317
1317
  sensitive
1318
- }), regexp = _compilePath.regexp, keys = _compilePath.keys;
1319
- var match = regexp.exec(pathname);
1318
+ }), regexp2 = _compilePath.regexp, keys = _compilePath.keys;
1319
+ var match = regexp2.exec(pathname);
1320
1320
  if (!match)
1321
1321
  return null;
1322
1322
  var url = match[0], values = match.slice(1);
@@ -1338,7 +1338,7 @@
1338
1338
  return React__default["default"].Children.count(children) === 0;
1339
1339
  }
1340
1340
  /* @__PURE__ */ (function(_React$Component) {
1341
- _inheritsLoose(Route, _React$Component);
1341
+ _inheritsLoose$1(Route, _React$Component);
1342
1342
  function Route() {
1343
1343
  return _React$Component.apply(this, arguments) || this;
1344
1344
  }
@@ -1349,7 +1349,7 @@
1349
1349
  !context$1 ? invariant(false) : void 0;
1350
1350
  var location = _this.props.location || context$1.location;
1351
1351
  var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
1352
- var props = _extends$3({}, context$1, {
1352
+ var props = _extends$4({}, context$1, {
1353
1353
  location,
1354
1354
  match
1355
1355
  });
@@ -1370,7 +1370,7 @@
1370
1370
  function addBasename(basename, location) {
1371
1371
  if (!basename)
1372
1372
  return location;
1373
- return _extends$3({}, location, {
1373
+ return _extends$4({}, location, {
1374
1374
  pathname: addLeadingSlash(basename) + location.pathname
1375
1375
  });
1376
1376
  }
@@ -1380,7 +1380,7 @@
1380
1380
  var base = addLeadingSlash(basename);
1381
1381
  if (location.pathname.indexOf(base) !== 0)
1382
1382
  return location;
1383
- return _extends$3({}, location, {
1383
+ return _extends$4({}, location, {
1384
1384
  pathname: location.pathname.substr(base.length)
1385
1385
  });
1386
1386
  }
@@ -1395,7 +1395,7 @@
1395
1395
  function noop$3() {
1396
1396
  }
1397
1397
  /* @__PURE__ */ (function(_React$Component) {
1398
- _inheritsLoose(StaticRouter, _React$Component);
1398
+ _inheritsLoose$1(StaticRouter, _React$Component);
1399
1399
  function StaticRouter() {
1400
1400
  var _this;
1401
1401
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -1439,7 +1439,7 @@
1439
1439
  listen: this.handleListen,
1440
1440
  block: this.handleBlock
1441
1441
  };
1442
- return /* @__PURE__ */ React__default["default"].createElement(Router, _extends$3({}, rest, {
1442
+ return /* @__PURE__ */ React__default["default"].createElement(Router, _extends$4({}, rest, {
1443
1443
  history,
1444
1444
  staticContext: context2
1445
1445
  }));
@@ -1447,7 +1447,7 @@
1447
1447
  return StaticRouter;
1448
1448
  })(React__default["default"].Component);
1449
1449
  /* @__PURE__ */ (function(_React$Component) {
1450
- _inheritsLoose(Switch2, _React$Component);
1450
+ _inheritsLoose$1(Switch2, _React$Component);
1451
1451
  function Switch2() {
1452
1452
  return _React$Component.apply(this, arguments) || this;
1453
1453
  }
@@ -1462,7 +1462,7 @@
1462
1462
  if (match == null && /* @__PURE__ */ React__default["default"].isValidElement(child)) {
1463
1463
  element = child;
1464
1464
  var path = child.props.path || child.props.from;
1465
- match = path ? matchPath(location.pathname, _extends$3({}, child.props, {
1465
+ match = path ? matchPath(location.pathname, _extends$4({}, child.props, {
1466
1466
  path
1467
1467
  })) : context2.match;
1468
1468
  }
@@ -1479,7 +1479,7 @@
1479
1479
  function useHistory() {
1480
1480
  return useContext(historyContext);
1481
1481
  }
1482
- const defaultProps$1j = {
1482
+ const defaultProps$1l = {
1483
1483
  ...ComponentDefaults,
1484
1484
  title: null,
1485
1485
  subTitle: null,
@@ -1525,7 +1525,7 @@
1525
1525
  iconFontClassName,
1526
1526
  ...rest
1527
1527
  } = {
1528
- ...defaultProps$1j,
1528
+ ...defaultProps$1l,
1529
1529
  ...props
1530
1530
  };
1531
1531
  const b2 = cn("cell");
@@ -1579,9 +1579,9 @@
1579
1579
  className: b2("link")
1580
1580
  }) : linkSlot));
1581
1581
  };
1582
- Cell.defaultProps = defaultProps$1j;
1582
+ Cell.defaultProps = defaultProps$1l;
1583
1583
  Cell.displayName = "NutCell";
1584
- const defaultProps$1i = {
1584
+ const defaultProps$1k = {
1585
1585
  title: "",
1586
1586
  desc: "",
1587
1587
  className: "",
@@ -1590,7 +1590,7 @@
1590
1590
  };
1591
1591
  const CellGroup = (props) => {
1592
1592
  const { children, className, title, desc, titleSlot, descSlot } = {
1593
- ...defaultProps$1i,
1593
+ ...defaultProps$1k,
1594
1594
  ...props
1595
1595
  };
1596
1596
  const b2 = cn("cell-group");
@@ -1604,7 +1604,7 @@
1604
1604
  className: b2("wrap")
1605
1605
  }, children));
1606
1606
  };
1607
- CellGroup.defaultProps = defaultProps$1i;
1607
+ CellGroup.defaultProps = defaultProps$1k;
1608
1608
  CellGroup.displayName = "NutCellGroup";
1609
1609
  var classnames = { exports: {} };
1610
1610
  /*!
@@ -1772,7 +1772,7 @@
1772
1772
  var ENTERED = "entered";
1773
1773
  var EXITING = "exiting";
1774
1774
  var Transition = /* @__PURE__ */ function(_React$Component) {
1775
- _inheritsLoose(Transition2, _React$Component);
1775
+ _inheritsLoose$1(Transition2, _React$Component);
1776
1776
  function Transition2(props, context2) {
1777
1777
  var _this;
1778
1778
  _this = _React$Component.call(this, props, context2) || this;
@@ -2029,7 +2029,7 @@
2029
2029
  });
2030
2030
  };
2031
2031
  var CSSTransition = /* @__PURE__ */ function(_React$Component) {
2032
- _inheritsLoose(CSSTransition2, _React$Component);
2032
+ _inheritsLoose$1(CSSTransition2, _React$Component);
2033
2033
  function CSSTransition2() {
2034
2034
  var _this;
2035
2035
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -2051,17 +2051,17 @@
2051
2051
  };
2052
2052
  _this.onEntering = function(maybeNode, maybeAppearing) {
2053
2053
  var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument2[0], appearing = _this$resolveArgument2[1];
2054
- var type = appearing ? "appear" : "enter";
2055
- _this.addClass(node, type, "active");
2054
+ var type2 = appearing ? "appear" : "enter";
2055
+ _this.addClass(node, type2, "active");
2056
2056
  if (_this.props.onEntering) {
2057
2057
  _this.props.onEntering(maybeNode, maybeAppearing);
2058
2058
  }
2059
2059
  };
2060
2060
  _this.onEntered = function(maybeNode, maybeAppearing) {
2061
2061
  var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), node = _this$resolveArgument3[0], appearing = _this$resolveArgument3[1];
2062
- var type = appearing ? "appear" : "enter";
2063
- _this.removeClasses(node, type);
2064
- _this.addClass(node, type, "done");
2062
+ var type2 = appearing ? "appear" : "enter";
2063
+ _this.removeClasses(node, type2);
2064
+ _this.addClass(node, type2, "done");
2065
2065
  if (_this.props.onEntered) {
2066
2066
  _this.props.onEntered(maybeNode, maybeAppearing);
2067
2067
  }
@@ -2093,13 +2093,13 @@
2093
2093
  _this.resolveArguments = function(maybeNode, maybeAppearing) {
2094
2094
  return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] : [maybeNode, maybeAppearing];
2095
2095
  };
2096
- _this.getClassNames = function(type) {
2096
+ _this.getClassNames = function(type2) {
2097
2097
  var classNames2 = _this.props.classNames;
2098
2098
  var isStringClassNames = typeof classNames2 === "string";
2099
2099
  var prefix2 = isStringClassNames && classNames2 ? classNames2 + "-" : "";
2100
- var baseClassName = isStringClassNames ? "" + prefix2 + type : classNames2[type];
2101
- var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames2[type + "Active"];
2102
- var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames2[type + "Done"];
2100
+ var baseClassName = isStringClassNames ? "" + prefix2 + type2 : classNames2[type2];
2101
+ var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames2[type2 + "Active"];
2102
+ var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames2[type2 + "Done"];
2103
2103
  return {
2104
2104
  baseClassName,
2105
2105
  activeClassName,
@@ -2109,10 +2109,10 @@
2109
2109
  return _this;
2110
2110
  }
2111
2111
  var _proto = CSSTransition2.prototype;
2112
- _proto.addClass = function addClass2(node, type, phase) {
2113
- var className = this.getClassNames(type)[phase + "ClassName"];
2112
+ _proto.addClass = function addClass2(node, type2, phase) {
2113
+ var className = this.getClassNames(type2)[phase + "ClassName"];
2114
2114
  var _this$getClassNames = this.getClassNames("enter"), doneClassName = _this$getClassNames.doneClassName;
2115
- if (type === "appear" && phase === "done" && doneClassName) {
2115
+ if (type2 === "appear" && phase === "done" && doneClassName) {
2116
2116
  className += " " + doneClassName;
2117
2117
  }
2118
2118
  if (phase === "active") {
@@ -2120,13 +2120,13 @@
2120
2120
  forceReflow(node);
2121
2121
  }
2122
2122
  if (className) {
2123
- this.appliedClasses[type][phase] = className;
2123
+ this.appliedClasses[type2][phase] = className;
2124
2124
  _addClass(node, className);
2125
2125
  }
2126
2126
  };
2127
- _proto.removeClasses = function removeClasses(node, type) {
2128
- var _this$appliedClasses$ = this.appliedClasses[type], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
2129
- this.appliedClasses[type] = {};
2127
+ _proto.removeClasses = function removeClasses(node, type2) {
2128
+ var _this$appliedClasses$ = this.appliedClasses[type2], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
2129
+ this.appliedClasses[type2] = {};
2130
2130
  if (baseClassName) {
2131
2131
  removeClass(node, baseClassName);
2132
2132
  }
@@ -2141,7 +2141,7 @@
2141
2141
  var _this$props = this.props;
2142
2142
  _this$props.classNames;
2143
2143
  var props = _objectWithoutPropertiesLoose$3(_this$props, ["classNames"]);
2144
- return /* @__PURE__ */ React__default["default"].createElement(Transition$1, _extends$3({}, props, {
2144
+ return /* @__PURE__ */ React__default["default"].createElement(Transition$1, _extends$4({}, props, {
2145
2145
  onEnter: this.onEnter,
2146
2146
  onEntered: this.onEntered,
2147
2147
  onEntering: this.onEntering,
@@ -2157,7 +2157,7 @@
2157
2157
  };
2158
2158
  CSSTransition.propTypes = {};
2159
2159
  var CSSTransition$1 = CSSTransition;
2160
- const defaultProps$1h = {
2160
+ const defaultProps$1j = {
2161
2161
  ...ComponentDefaults,
2162
2162
  position: "center",
2163
2163
  transition: "",
@@ -2343,7 +2343,7 @@
2343
2343
  }, [position]);
2344
2344
  return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
2345
2345
  };
2346
- Popup.defaultProps = defaultProps$1h;
2346
+ Popup.defaultProps = defaultProps$1j;
2347
2347
  Popup.displayName = "NutPopup";
2348
2348
  const zhCN = {
2349
2349
  save: "\u4FDD\u5B58",
@@ -2470,7 +2470,7 @@
2470
2470
  completeText: "\u5237\u65B0\u6210\u529F"
2471
2471
  }
2472
2472
  };
2473
- const defaultProps$1g = {
2473
+ const defaultProps$1i = {
2474
2474
  locale: zhCN
2475
2475
  };
2476
2476
  const defaultConfigRef = {
@@ -2487,7 +2487,7 @@
2487
2487
  };
2488
2488
  const ConfigContext = React.createContext(null);
2489
2489
  const ConfigProvider = (props) => {
2490
- const { children, ...config2 } = { ...defaultProps$1g, ...props };
2490
+ const { children, ...config2 } = { ...defaultProps$1i, ...props };
2491
2491
  const parentConfig = useConfig();
2492
2492
  return /* @__PURE__ */ React__default["default"].createElement(ConfigContext.Provider, {
2493
2493
  value: {
@@ -2496,19 +2496,19 @@
2496
2496
  }
2497
2497
  }, children);
2498
2498
  };
2499
- ConfigProvider.defaultProps = defaultProps$1g;
2499
+ ConfigProvider.defaultProps = defaultProps$1i;
2500
2500
  ConfigProvider.displayName = "NutConfigProvider";
2501
- const defaultProps$1f = {};
2501
+ const defaultProps$1h = {};
2502
2502
  const Layout = (props) => {
2503
- ({ ...defaultProps$1f, ...props });
2503
+ ({ ...defaultProps$1h, ...props });
2504
2504
  return /* @__PURE__ */ React__default["default"].createElement("div", {
2505
2505
  className: "nut-layout"
2506
2506
  }, "Layout");
2507
2507
  };
2508
- Layout.defaultProps = defaultProps$1f;
2508
+ Layout.defaultProps = defaultProps$1h;
2509
2509
  Layout.displayName = "NutLayout";
2510
2510
  const DataContext$2 = React.createContext({});
2511
- const defaultProps$1e = {
2511
+ const defaultProps$1g = {
2512
2512
  span: "24",
2513
2513
  offset: "0",
2514
2514
  gutter: "0"
@@ -2521,7 +2521,7 @@
2521
2521
  offset,
2522
2522
  children,
2523
2523
  onClick
2524
- } = { ...defaultProps$1e, ...props };
2524
+ } = { ...defaultProps$1g, ...props };
2525
2525
  const [colName, setColName] = React.useState("");
2526
2526
  const [colStyle, setColStyle] = React.useState({});
2527
2527
  const { gutter } = React.useContext(DataContext$2);
@@ -2547,9 +2547,9 @@
2547
2547
  }
2548
2548
  }, children);
2549
2549
  };
2550
- Col.defaultProps = defaultProps$1e;
2550
+ Col.defaultProps = defaultProps$1g;
2551
2551
  Col.displayName = "NutCol";
2552
- const defaultProps$1d = {
2552
+ const defaultProps$1f = {
2553
2553
  type: "",
2554
2554
  justify: "start",
2555
2555
  align: "flex-start",
@@ -2561,25 +2561,25 @@
2561
2561
  className,
2562
2562
  style = {},
2563
2563
  children,
2564
- type,
2564
+ type: type2,
2565
2565
  justify,
2566
2566
  align,
2567
2567
  wrap,
2568
2568
  gutter,
2569
2569
  onClick
2570
2570
  } = {
2571
- ...defaultProps$1d,
2571
+ ...defaultProps$1f,
2572
2572
  ...props
2573
2573
  };
2574
2574
  const prefixCls = "nut-row";
2575
- const getClass = (prefix2, type2) => {
2576
- const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
2577
- const className2 = prefix2 ? classType : `nut-row-${type2}`;
2575
+ const getClass = (prefix2, type22) => {
2576
+ const classType = type22 ? `nut-row-${prefix2}-${type22}` : "";
2577
+ const className2 = prefix2 ? classType : `nut-row-${type22}`;
2578
2578
  return className2;
2579
2579
  };
2580
2580
  const getClasses = () => {
2581
2581
  return `
2582
- ${getClass("", type)}
2582
+ ${getClass("", type2)}
2583
2583
  ${getClass("justify", justify)}
2584
2584
  ${getClass("align", align)}
2585
2585
  ${getClass("flex", wrap)}
@@ -2603,9 +2603,9 @@
2603
2603
  children
2604
2604
  ));
2605
2605
  };
2606
- Row.defaultProps = defaultProps$1d;
2606
+ Row.defaultProps = defaultProps$1f;
2607
2607
  Row.displayName = "NutRow";
2608
- const defaultProps$1c = {
2608
+ const defaultProps$1e = {
2609
2609
  contentPosition: "center",
2610
2610
  dashed: false,
2611
2611
  hairline: true,
@@ -2622,7 +2622,7 @@
2622
2622
  direction,
2623
2623
  ...rest
2624
2624
  } = {
2625
- ...defaultProps$1c,
2625
+ ...defaultProps$1e,
2626
2626
  ...props
2627
2627
  };
2628
2628
  const dividerBem = cn("divider");
@@ -2643,9 +2643,9 @@
2643
2643
  ...rest
2644
2644
  }, children);
2645
2645
  };
2646
- Divider.defaultProps = defaultProps$1c;
2646
+ Divider.defaultProps = defaultProps$1e;
2647
2647
  Divider.displayName = "NutDivider";
2648
- const defaultProps$1b = {
2648
+ const defaultProps$1d = {
2649
2649
  columnNum: 4,
2650
2650
  border: true,
2651
2651
  gutter: 0,
@@ -2672,7 +2672,7 @@
2672
2672
  iconColor,
2673
2673
  className,
2674
2674
  ...rest
2675
- } = { ...defaultProps$1b, ...props };
2675
+ } = { ...defaultProps$1d, ...props };
2676
2676
  const childrenDom = React__default["default"].Children.toArray(children);
2677
2677
  const pxCheck2 = (value) => {
2678
2678
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -2711,9 +2711,9 @@
2711
2711
  });
2712
2712
  }));
2713
2713
  };
2714
- Grid.defaultProps = defaultProps$1b;
2714
+ Grid.defaultProps = defaultProps$1d;
2715
2715
  Grid.displayName = "NutGrid";
2716
- const defaultProps$1a = {
2716
+ const defaultProps$1c = {
2717
2717
  ...ComponentDefaults,
2718
2718
  text: "",
2719
2719
  icon: "",
@@ -2752,7 +2752,7 @@
2752
2752
  onClick,
2753
2753
  ...rest
2754
2754
  } = {
2755
- ...defaultProps$1a,
2755
+ ...defaultProps$1c,
2756
2756
  ...props
2757
2757
  };
2758
2758
  const b2 = cn("grid-item");
@@ -2800,7 +2800,7 @@
2800
2800
  className: "nut-grid-item__text"
2801
2801
  }, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
2802
2802
  };
2803
- GridItem.defaultProps = defaultProps$1a;
2803
+ GridItem.defaultProps = defaultProps$1c;
2804
2804
  GridItem.displayName = "NutGridItem";
2805
2805
  const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2806
2806
  const defaultRoot = canUseDom ? window : void 0;
@@ -3014,7 +3014,7 @@
3014
3014
  }, children));
3015
3015
  };
3016
3016
  Sticky.displayName = "NutSticky";
3017
- const defaultProps$19 = {
3017
+ const defaultProps$1b = {
3018
3018
  ...ComponentDefaults,
3019
3019
  title: "",
3020
3020
  desc: "",
@@ -3050,7 +3050,7 @@
3050
3050
  iconClassPrefix,
3051
3051
  iconFontClassName
3052
3052
  } = {
3053
- ...defaultProps$19,
3053
+ ...defaultProps$1b,
3054
3054
  ...props
3055
3055
  };
3056
3056
  const b2 = cn("navbar");
@@ -3119,9 +3119,9 @@
3119
3119
  className: `${b2("")}--placeholder`
3120
3120
  }, renderWrapper()) : renderWrapper());
3121
3121
  };
3122
- NavBar.defaultProps = defaultProps$19;
3122
+ NavBar.defaultProps = defaultProps$1b;
3123
3123
  NavBar.displayName = "NutNavBar";
3124
- const defaultProps$18 = {
3124
+ const defaultProps$1a = {
3125
3125
  ...ComponentDefaults,
3126
3126
  fixednavClass: "nut-fixednav",
3127
3127
  activeText: "",
@@ -3144,14 +3144,14 @@
3144
3144
  position,
3145
3145
  onChange,
3146
3146
  onSelected,
3147
- type,
3147
+ type: type2,
3148
3148
  slotList,
3149
3149
  slotBtn,
3150
3150
  iconClassPrefix,
3151
3151
  iconFontClassName,
3152
3152
  ...rest
3153
3153
  } = {
3154
- ...defaultProps$18,
3154
+ ...defaultProps$1a,
3155
3155
  ...props
3156
3156
  };
3157
3157
  const b2 = cn("fixednav");
@@ -3159,7 +3159,7 @@
3159
3159
  {
3160
3160
  active: visible
3161
3161
  },
3162
- type,
3162
+ type2,
3163
3163
  fixednavClass,
3164
3164
  b2("")
3165
3165
  );
@@ -3206,9 +3206,9 @@
3206
3206
  className: "text"
3207
3207
  }, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
3208
3208
  };
3209
- FixedNav.defaultProps = defaultProps$18;
3209
+ FixedNav.defaultProps = defaultProps$1a;
3210
3210
  FixedNav.displayName = "NutFixedNav";
3211
- const defaultProps$17 = {
3211
+ const defaultProps$19 = {
3212
3212
  visible: 0,
3213
3213
  bottom: false,
3214
3214
  size: 20,
@@ -3236,7 +3236,7 @@
3236
3236
  tabSwitch,
3237
3237
  onSwitch
3238
3238
  } = {
3239
- ...defaultProps$17,
3239
+ ...defaultProps$19,
3240
3240
  ...props
3241
3241
  };
3242
3242
  const b2 = cn("tabbar");
@@ -3272,9 +3272,9 @@
3272
3272
  return React__default["default"].cloneElement(child, childProps);
3273
3273
  }));
3274
3274
  };
3275
- Tabbar.defaultProps = defaultProps$17;
3275
+ Tabbar.defaultProps = defaultProps$19;
3276
3276
  Tabbar.displayName = "NutTabbar";
3277
- const defaultProps$16 = {
3277
+ const defaultProps$18 = {
3278
3278
  ...ComponentDefaults,
3279
3279
  dot: false,
3280
3280
  size: "",
@@ -3310,7 +3310,7 @@
3310
3310
  iconClassPrefix,
3311
3311
  iconFontClassName
3312
3312
  } = {
3313
- ...defaultProps$16,
3313
+ ...defaultProps$18,
3314
3314
  ...props
3315
3315
  };
3316
3316
  const b2 = cn("tabbar-item");
@@ -3408,12 +3408,12 @@
3408
3408
  }
3409
3409
  return obj;
3410
3410
  }
3411
- function ownKeys(object, enumerableOnly) {
3412
- var keys = Object.keys(object);
3411
+ function ownKeys(object2, enumerableOnly) {
3412
+ var keys = Object.keys(object2);
3413
3413
  if (Object.getOwnPropertySymbols) {
3414
- var symbols = Object.getOwnPropertySymbols(object);
3414
+ var symbols = Object.getOwnPropertySymbols(object2);
3415
3415
  enumerableOnly && (symbols = symbols.filter(function(sym) {
3416
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3416
+ return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
3417
3417
  })), keys.push.apply(keys, symbols);
3418
3418
  }
3419
3419
  return keys;
@@ -3451,10 +3451,10 @@
3451
3451
  end: "end"
3452
3452
  }
3453
3453
  };
3454
- function capitalize(string) {
3455
- if (!string)
3454
+ function capitalize(string2) {
3455
+ if (!string2)
3456
3456
  return "";
3457
- return string[0].toUpperCase() + string.slice(1);
3457
+ return string2[0].toUpperCase() + string2.slice(1);
3458
3458
  }
3459
3459
  const actionsWithoutCaptureSupported = ["enter", "leave"];
3460
3460
  function hasCapture(capture = false, actionKey) {
@@ -4353,11 +4353,11 @@
4353
4353
  }
4354
4354
  computeOffset() {
4355
4355
  const {
4356
- type,
4356
+ type: type2,
4357
4357
  movement,
4358
4358
  lastOffset
4359
4359
  } = this.state;
4360
- if (type === "wheel") {
4360
+ if (type2 === "wheel") {
4361
4361
  this.state.offset = V.add(movement, lastOffset);
4362
4362
  } else {
4363
4363
  this.state.offset = [(1 + movement[0]) * lastOffset[0], movement[1] + lastOffset[1]];
@@ -4943,12 +4943,12 @@
4943
4943
  }
4944
4944
  add(element, device, action, handler, options2) {
4945
4945
  const listeners = this._listeners;
4946
- const type = toDomEventType(device, action);
4946
+ const type2 = toDomEventType(device, action);
4947
4947
  const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
4948
4948
  const eventOptions = _objectSpread2(_objectSpread2({}, _options), options2);
4949
- element.addEventListener(type, handler, eventOptions);
4949
+ element.addEventListener(type2, handler, eventOptions);
4950
4950
  const remove = () => {
4951
- element.removeEventListener(type, handler, eventOptions);
4951
+ element.removeEventListener(type2, handler, eventOptions);
4952
4952
  listeners.delete(remove);
4953
4953
  };
4954
4954
  listeners.add(remove);
@@ -5768,29 +5768,29 @@
5768
5768
  let a = (int32Color & 255) / 255;
5769
5769
  return `rgba(${r2}, ${g2}, ${b2}, ${a})`;
5770
5770
  }
5771
- const createInterpolator = (range, output, extrapolate) => {
5772
- if (is.fun(range)) {
5773
- return range;
5771
+ const createInterpolator = (range2, output, extrapolate) => {
5772
+ if (is.fun(range2)) {
5773
+ return range2;
5774
5774
  }
5775
- if (is.arr(range)) {
5775
+ if (is.arr(range2)) {
5776
5776
  return createInterpolator({
5777
- range,
5777
+ range: range2,
5778
5778
  output,
5779
5779
  extrapolate
5780
5780
  });
5781
5781
  }
5782
- if (is.str(range.output[0])) {
5783
- return createStringInterpolator$1(range);
5782
+ if (is.str(range2.output[0])) {
5783
+ return createStringInterpolator$1(range2);
5784
5784
  }
5785
- const config2 = range;
5785
+ const config2 = range2;
5786
5786
  const outputRange = config2.output;
5787
5787
  const inputRange = config2.range || [0, 1];
5788
5788
  const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
5789
5789
  const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
5790
5790
  const easing = config2.easing || ((t2) => t2);
5791
5791
  return (input) => {
5792
- const range2 = findRange(input, inputRange);
5793
- return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
5792
+ const range3 = findRange(input, inputRange);
5793
+ return interpolate(input, inputRange[range3], inputRange[range3 + 1], outputRange[range3], outputRange[range3 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
5794
5794
  };
5795
5795
  };
5796
5796
  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
@@ -5832,8 +5832,8 @@
5832
5832
  break;
5833
5833
  return i - 1;
5834
5834
  }
5835
- function _extends$2() {
5836
- _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
5835
+ function _extends$3() {
5836
+ _extends$3 = Object.assign ? Object.assign.bind() : function(target) {
5837
5837
  for (var i = 1; i < arguments.length; i++) {
5838
5838
  var source = arguments[i];
5839
5839
  for (var key in source) {
@@ -5844,7 +5844,7 @@
5844
5844
  }
5845
5845
  return target;
5846
5846
  };
5847
- return _extends$2.apply(this, arguments);
5847
+ return _extends$3.apply(this, arguments);
5848
5848
  }
5849
5849
  const $get = Symbol.for("FluidValue.get");
5850
5850
  const $observers = Symbol.for("FluidValue.observers");
@@ -5960,7 +5960,7 @@
5960
5960
  }
5961
5961
  return values[i];
5962
5962
  }));
5963
- const interpolators = outputRanges.map((output2) => createInterpolator(_extends$2({}, config2, {
5963
+ const interpolators = outputRanges.map((output2) => createInterpolator(_extends$3({}, config2, {
5964
5964
  output: output2
5965
5965
  })));
5966
5966
  return (input) => {
@@ -6245,8 +6245,8 @@
6245
6245
  const parentNode = getAnimated(value);
6246
6246
  return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
6247
6247
  }
6248
- function _extends$1() {
6249
- _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
6248
+ function _extends$2() {
6249
+ _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
6250
6250
  for (var i = 1; i < arguments.length; i++) {
6251
6251
  var source = arguments[i];
6252
6252
  for (var key in source) {
@@ -6257,7 +6257,7 @@
6257
6257
  }
6258
6258
  return target;
6259
6259
  };
6260
- return _extends$1.apply(this, arguments);
6260
+ return _extends$2.apply(this, arguments);
6261
6261
  }
6262
6262
  const withAnimated = (Component, host2) => {
6263
6263
  const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;
@@ -6296,7 +6296,7 @@
6296
6296
  each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
6297
6297
  });
6298
6298
  const usedProps = host2.getComponentProps(props.getValue());
6299
- return React__namespace.createElement(Component, _extends$1({}, usedProps, {
6299
+ return React__namespace.createElement(Component, _extends$2({}, usedProps, {
6300
6300
  ref
6301
6301
  }));
6302
6302
  });
@@ -6316,7 +6316,7 @@
6316
6316
  const dependencies = /* @__PURE__ */ new Set();
6317
6317
  TreeContext.dependencies = dependencies;
6318
6318
  if (props.style)
6319
- props = _extends$1({}, props, {
6319
+ props = _extends$2({}, props, {
6320
6320
  style: host2.createAnimatedStyle(props.style)
6321
6321
  });
6322
6322
  props = new AnimatedObject(props);
@@ -6364,8 +6364,8 @@
6364
6364
  };
6365
6365
  };
6366
6366
  const getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;
6367
- function _extends() {
6368
- _extends = Object.assign ? Object.assign.bind() : function(target) {
6367
+ function _extends$1() {
6368
+ _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
6369
6369
  for (var i = 1; i < arguments.length; i++) {
6370
6370
  var source = arguments[i];
6371
6371
  for (var key in source) {
@@ -6376,7 +6376,7 @@
6376
6376
  }
6377
6377
  return target;
6378
6378
  };
6379
- return _extends.apply(this, arguments);
6379
+ return _extends$1.apply(this, arguments);
6380
6380
  }
6381
6381
  function callProp(value, ...args) {
6382
6382
  return is.fun(value) ? value(...args) : value;
@@ -6457,7 +6457,7 @@
6457
6457
  eachProp(props, (val, key) => key in to2 || (out[key] = val));
6458
6458
  return out;
6459
6459
  }
6460
- return _extends({}, props);
6460
+ return _extends$1({}, props);
6461
6461
  }
6462
6462
  function computeGoal(value) {
6463
6463
  value = getFluidValue(value);
@@ -6564,7 +6564,7 @@
6564
6564
  easeOutBounce: bounceOut,
6565
6565
  easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
6566
6566
  };
6567
- const defaults = _extends({}, config.default, {
6567
+ const defaults = _extends$1({}, config.default, {
6568
6568
  mass: 1,
6569
6569
  damping: 1,
6570
6570
  easing: easings.linear,
@@ -6592,9 +6592,9 @@
6592
6592
  }
6593
6593
  function mergeConfig(config2, newConfig, defaultConfig) {
6594
6594
  if (defaultConfig) {
6595
- defaultConfig = _extends({}, defaultConfig);
6595
+ defaultConfig = _extends$1({}, defaultConfig);
6596
6596
  sanitizeConfig(defaultConfig, newConfig);
6597
- newConfig = _extends({}, defaultConfig, newConfig);
6597
+ newConfig = _extends$1({}, defaultConfig, newConfig);
6598
6598
  }
6599
6599
  sanitizeConfig(config2, newConfig);
6600
6600
  Object.assign(config2, newConfig);
@@ -6702,7 +6702,7 @@
6702
6702
  cancel = true;
6703
6703
  }
6704
6704
  try {
6705
- actions.start(_extends({}, props, {
6705
+ actions.start(_extends$1({}, props, {
6706
6706
  callId,
6707
6707
  cancel
6708
6708
  }), resolve);
@@ -6768,7 +6768,7 @@
6768
6768
  throw skipAnimationSignal;
6769
6769
  }
6770
6770
  bailIfEnded(bailSignal);
6771
- const props2 = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {
6771
+ const props2 = is.obj(arg1) ? _extends$1({}, arg1) : _extends$1({}, arg2, {
6772
6772
  to: arg1
6773
6773
  });
6774
6774
  props2.parentId = callId;
@@ -6939,7 +6939,7 @@
6939
6939
  this._lastToId = 0;
6940
6940
  this._memoizedDuration = 0;
6941
6941
  if (!is.und(arg1) || !is.und(arg2)) {
6942
- const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {
6942
+ const props = is.obj(arg1) ? _extends$1({}, arg1) : _extends$1({}, arg2, {
6943
6943
  from: arg1
6944
6944
  });
6945
6945
  if (is.und(props.default)) {
@@ -7129,7 +7129,7 @@
7129
7129
  start(to2, arg2) {
7130
7130
  let queue;
7131
7131
  if (!is.und(to2)) {
7132
- queue = [is.obj(to2) ? to2 : _extends({}, arg2, {
7132
+ queue = [is.obj(to2) ? to2 : _extends$1({}, arg2, {
7133
7133
  to: to2
7134
7134
  })];
7135
7135
  } else {
@@ -7176,7 +7176,7 @@
7176
7176
  if (from == null) {
7177
7177
  from = void 0;
7178
7178
  }
7179
- const range = {
7179
+ const range2 = {
7180
7180
  to: to2,
7181
7181
  from
7182
7182
  };
@@ -7190,10 +7190,10 @@
7190
7190
  this._set(to2);
7191
7191
  }
7192
7192
  }
7193
- return range;
7193
+ return range2;
7194
7194
  }
7195
7195
  _update(_ref, isLoop) {
7196
- let props = _extends({}, _ref);
7196
+ let props = _extends$1({}, _ref);
7197
7197
  const {
7198
7198
  key,
7199
7199
  defaultProps: defaultProps2
@@ -7202,7 +7202,7 @@
7202
7202
  Object.assign(defaultProps2, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));
7203
7203
  mergeActiveFn(this, props, "onProps");
7204
7204
  sendEvent(this, "onProps", props, this);
7205
- const range = this._prepareNode(props);
7205
+ const range2 = this._prepareNode(props);
7206
7206
  if (Object.isFrozen(this)) {
7207
7207
  throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");
7208
7208
  }
@@ -7230,7 +7230,7 @@
7230
7230
  sendEvent(this, "onResume", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
7231
7231
  }
7232
7232
  },
7233
- start: this._merge.bind(this, range)
7233
+ start: this._merge.bind(this, range2)
7234
7234
  }
7235
7235
  }).then((result) => {
7236
7236
  if (props.loop && result.finished && !(isLoop && result.noop)) {
@@ -7242,13 +7242,13 @@
7242
7242
  return result;
7243
7243
  });
7244
7244
  }
7245
- _merge(range, props, resolve) {
7245
+ _merge(range2, props, resolve) {
7246
7246
  if (props.cancel) {
7247
7247
  this.stop(true);
7248
7248
  return resolve(getCancelledResult(this));
7249
7249
  }
7250
- const hasToProp = !is.und(range.to);
7251
- const hasFromProp = !is.und(range.from);
7250
+ const hasToProp = !is.und(range2.to);
7251
+ const hasFromProp = !is.und(range2.from);
7252
7252
  if (hasToProp || hasFromProp) {
7253
7253
  if (props.callId > this._lastToId) {
7254
7254
  this._lastToId = props.callId;
@@ -7268,7 +7268,7 @@
7268
7268
  let {
7269
7269
  to: to2 = prevTo,
7270
7270
  from = prevFrom
7271
- } = range;
7271
+ } = range2;
7272
7272
  if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) {
7273
7273
  to2 = from;
7274
7274
  }
@@ -7350,7 +7350,7 @@
7350
7350
  const {
7351
7351
  onRest
7352
7352
  } = anim;
7353
- each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type));
7353
+ each(ACTIVE_EVENTS, (type2) => mergeActiveFn(this, props, type2));
7354
7354
  const result = getFinishedResult(this, checkFinished(this, prevTo));
7355
7355
  flushCalls(this._pendingCalls, result);
7356
7356
  this._pendingCalls.add(resolve);
@@ -7501,7 +7501,7 @@
7501
7501
  const overrides = loopRet !== true && inferTo(loopRet);
7502
7502
  const reverse = (overrides || props).reverse;
7503
7503
  const reset = !overrides || overrides.reset;
7504
- return createUpdate(_extends({}, props, {
7504
+ return createUpdate(_extends$1({}, props, {
7505
7505
  loop: loop2,
7506
7506
  default: false,
7507
7507
  pause: void 0,
@@ -7535,13 +7535,13 @@
7535
7535
  eachProp(values, (value, key) => value != null && keys.add(key));
7536
7536
  }
7537
7537
  const ACTIVE_EVENTS = ["onStart", "onRest", "onChange", "onPause", "onResume"];
7538
- function mergeActiveFn(target, props, type) {
7539
- target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0;
7538
+ function mergeActiveFn(target, props, type2) {
7539
+ target.animation[type2] = props[type2] !== getDefaultProp(props, type2) ? resolveProp(props[type2], target.key) : void 0;
7540
7540
  }
7541
- function sendEvent(target, type, ...args) {
7541
+ function sendEvent(target, type2, ...args) {
7542
7542
  var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;
7543
- (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);
7544
- (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);
7543
+ (_target$animation$typ = (_target$animation = target.animation)[type2]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);
7544
+ (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type2]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);
7545
7545
  }
7546
7546
  const BATCHED_EVENTS = ["onStart", "onChange", "onRest"];
7547
7547
  let nextId = 1;
@@ -7574,7 +7574,7 @@
7574
7574
  this._flush = flush2;
7575
7575
  }
7576
7576
  if (props) {
7577
- this.start(_extends({
7577
+ this.start(_extends$1({
7578
7578
  default: true
7579
7579
  }, props));
7580
7580
  }
@@ -7809,14 +7809,14 @@
7809
7809
  return result;
7810
7810
  }
7811
7811
  function getSprings(ctrl, props) {
7812
- const springs = _extends({}, ctrl.springs);
7812
+ const springs = _extends$1({}, ctrl.springs);
7813
7813
  if (props) {
7814
7814
  each(toArray(props), (props2) => {
7815
7815
  if (is.und(props2.keys)) {
7816
7816
  props2 = createUpdate(props2);
7817
7817
  }
7818
7818
  if (!is.obj(props2.to)) {
7819
- props2 = _extends({}, props2, {
7819
+ props2 = _extends$1({}, props2, {
7820
7820
  to: void 0
7821
7821
  });
7822
7822
  }
@@ -8047,7 +8047,7 @@
8047
8047
  useOnce(() => () => {
8048
8048
  each(state.ctrls, (ctrl) => ctrl.stop(true));
8049
8049
  });
8050
- const values = springs.map((x2) => _extends({}, x2));
8050
+ const values = springs.map((x2) => _extends$1({}, x2));
8051
8051
  return ref ? [values, ref] : values;
8052
8052
  }
8053
8053
  function useSpring(props, deps) {
@@ -8366,7 +8366,7 @@
8366
8366
  });
8367
8367
  const animated = host.animated;
8368
8368
  const elevatorContext = React.createContext({});
8369
- const defaultProps$15 = {
8369
+ const defaultProps$17 = {
8370
8370
  height: "200px",
8371
8371
  acceptKey: "title",
8372
8372
  indexList: [],
@@ -8389,7 +8389,7 @@
8389
8389
  children,
8390
8390
  ...rest
8391
8391
  } = {
8392
- ...defaultProps$15,
8392
+ ...defaultProps$17,
8393
8393
  ...props
8394
8394
  };
8395
8395
  const b2 = cn("elevator");
@@ -8576,9 +8576,9 @@
8576
8576
  }, item[acceptKey]);
8577
8577
  }))));
8578
8578
  };
8579
- Elevator.defaultProps = defaultProps$15;
8579
+ Elevator.defaultProps = defaultProps$17;
8580
8580
  Elevator.displayName = "NutElevator";
8581
- const defaultProps$14 = {
8581
+ const defaultProps$16 = {
8582
8582
  defaultValue: 1,
8583
8583
  mode: "multi",
8584
8584
  prevText: "",
@@ -8595,7 +8595,7 @@
8595
8595
  };
8596
8596
  const Pagination = (props) => {
8597
8597
  const { locale } = useConfig();
8598
- ({ ...defaultProps$14, ...props });
8598
+ ({ ...defaultProps$16, ...props });
8599
8599
  const {
8600
8600
  modelValue,
8601
8601
  mode,
@@ -8670,8 +8670,8 @@
8670
8670
  if (isSelect)
8671
8671
  onChange && onChange(curPage);
8672
8672
  };
8673
- const setPage = (number, text, active) => {
8674
- return { number, text, active };
8673
+ const setPage = (number2, text, active) => {
8674
+ return { number: number2, text, active };
8675
8675
  };
8676
8676
  React.useEffect(() => {
8677
8677
  let currentValue2 = props.defaultValue || 1;
@@ -8712,7 +8712,7 @@
8712
8712
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
8713
8713
  }, nextText || locale.pagination.next));
8714
8714
  };
8715
- Pagination.defaultProps = defaultProps$14;
8715
+ Pagination.defaultProps = defaultProps$16;
8716
8716
  Pagination.displayName = "NutPagination";
8717
8717
  class Title {
8718
8718
  constructor() {
@@ -8722,7 +8722,7 @@
8722
8722
  this.index = 0;
8723
8723
  }
8724
8724
  }
8725
- const defaultProps$13 = {
8725
+ const defaultProps$15 = {
8726
8726
  ...ComponentDefaults,
8727
8727
  tabStyle: {},
8728
8728
  value: 0,
@@ -8747,7 +8747,7 @@
8747
8747
  tabStyle,
8748
8748
  background,
8749
8749
  direction,
8750
- type,
8750
+ type: type2,
8751
8751
  titleScroll,
8752
8752
  ellipsis,
8753
8753
  animatedTime,
@@ -8763,7 +8763,7 @@
8763
8763
  iconFontClassName,
8764
8764
  ...rest
8765
8765
  } = {
8766
- ...defaultProps$13,
8766
+ ...defaultProps$15,
8767
8767
  ...props
8768
8768
  };
8769
8769
  const [currentItem, setCurrentItem] = React.useState({ index: 0 });
@@ -8794,7 +8794,7 @@
8794
8794
  const classes = classNames(direction, b2(""), className);
8795
8795
  const classesTitle = classNames(
8796
8796
  {
8797
- [type]: type,
8797
+ [type2]: type2,
8798
8798
  scrollable: titleScroll,
8799
8799
  [size]: size
8800
8800
  },
@@ -8805,8 +8805,8 @@
8805
8805
  marginRight: pxCheck$2(titleGutter)
8806
8806
  };
8807
8807
  const tabsActiveStyle = {
8808
- color: type === "smile" ? color : "",
8809
- background: type === "line" ? color : ""
8808
+ color: type2 === "smile" ? color : "",
8809
+ background: type2 === "line" ? color : ""
8810
8810
  };
8811
8811
  const index = titles.current.findIndex((t2) => t2.paneKey === value);
8812
8812
  const contentStyle = {
@@ -8839,10 +8839,10 @@
8839
8839
  `${b2("")}__titles-item`
8840
8840
  ),
8841
8841
  key: item.paneKey
8842
- }, type === "line" && /* @__PURE__ */ React__default["default"].createElement("div", {
8842
+ }, type2 === "line" && /* @__PURE__ */ React__default["default"].createElement("div", {
8843
8843
  className: `${b2("")}__titles-item__line`,
8844
8844
  style: tabsActiveStyle
8845
- }), type === "smile" && /* @__PURE__ */ React__default["default"].createElement("div", {
8845
+ }), type2 === "smile" && /* @__PURE__ */ React__default["default"].createElement("div", {
8846
8846
  className: `${b2("")}__titles-item__smile`,
8847
8847
  style: tabsActiveStyle
8848
8848
  }, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
@@ -8881,9 +8881,9 @@
8881
8881
  return React__default["default"].cloneElement(child, childProps);
8882
8882
  }))));
8883
8883
  };
8884
- Tabs.defaultProps = defaultProps$13;
8884
+ Tabs.defaultProps = defaultProps$15;
8885
8885
  Tabs.displayName = "NutTabs";
8886
- const defaultProps$12 = {
8886
+ const defaultProps$14 = {
8887
8887
  title: "",
8888
8888
  paneKey: "",
8889
8889
  activeKey: "",
@@ -8891,7 +8891,7 @@
8891
8891
  };
8892
8892
  const TabPane = (props) => {
8893
8893
  const { children, paneKey, activeKey, autoHeightClassName, className } = {
8894
- ...defaultProps$12,
8894
+ ...defaultProps$14,
8895
8895
  ...props
8896
8896
  };
8897
8897
  const b2 = cn("tabpane");
@@ -8907,7 +8907,7 @@
8907
8907
  className: classes
8908
8908
  }, children);
8909
8909
  };
8910
- const defaultProps$11 = {
8910
+ const defaultProps$13 = {
8911
8911
  size: 3,
8912
8912
  current: 1,
8913
8913
  block: false,
@@ -8927,7 +8927,7 @@
8927
8927
  vertical,
8928
8928
  ...rest
8929
8929
  } = {
8930
- ...defaultProps$11,
8930
+ ...defaultProps$13,
8931
8931
  ...props
8932
8932
  };
8933
8933
  const b2 = cn("indicator");
@@ -8961,7 +8961,7 @@
8961
8961
  ...rest
8962
8962
  }, renderEles());
8963
8963
  };
8964
- Indicator.defaultProps = defaultProps$11;
8964
+ Indicator.defaultProps = defaultProps$13;
8965
8965
  Indicator.displayName = "NutIndicator";
8966
8966
  const handleClick = (e2) => {
8967
8967
  e2.stopPropagation();
@@ -8977,7 +8977,7 @@
8977
8977
  }
8978
8978
  };
8979
8979
  const OffsetContext = React.createContext(20);
8980
- const defaultProps$10 = {
8980
+ const defaultProps$12 = {
8981
8981
  showhead: false,
8982
8982
  position: "left",
8983
8983
  width: "80%"
@@ -8995,7 +8995,7 @@
8995
8995
  onClose,
8996
8996
  ...rest
8997
8997
  } = {
8998
- ...defaultProps$10,
8998
+ ...defaultProps$12,
8999
8999
  ...props
9000
9000
  };
9001
9001
  const offset = props.offset ? Number(props.offset) : 20;
@@ -9023,14 +9023,14 @@
9023
9023
  className: "nut-sidenavbar__content"
9024
9024
  }, children))))));
9025
9025
  };
9026
- SideNavBar.defaultProps = defaultProps$10;
9026
+ SideNavBar.defaultProps = defaultProps$12;
9027
9027
  SideNavBar.displayName = "NutSideNavBar";
9028
- const defaultProps$$ = {
9028
+ const defaultProps$11 = {
9029
9029
  open: true
9030
9030
  };
9031
9031
  const SubSideNavBar = (props) => {
9032
9032
  const { title, ikey, children, onClick, open, ...rest } = {
9033
- ...defaultProps$$,
9033
+ ...defaultProps$11,
9034
9034
  ...props
9035
9035
  };
9036
9036
  const offset = React.useContext(OffsetContext);
@@ -9101,7 +9101,7 @@
9101
9101
  ...rest
9102
9102
  }, title);
9103
9103
  };
9104
- const defaultProps$_ = {
9104
+ const defaultProps$10 = {
9105
9105
  ...ComponentDefaults,
9106
9106
  className: "",
9107
9107
  style: {},
@@ -9124,7 +9124,7 @@
9124
9124
  iconFontClassName,
9125
9125
  ...rest
9126
9126
  } = {
9127
- ...defaultProps$_,
9127
+ ...defaultProps$10,
9128
9128
  ...props
9129
9129
  };
9130
9130
  const parentRef = React.useRef(null);
@@ -9229,9 +9229,9 @@
9229
9229
  })));
9230
9230
  })), cloneChildren()));
9231
9231
  };
9232
- Menu.defaultProps = defaultProps$_;
9232
+ Menu.defaultProps = defaultProps$10;
9233
9233
  Menu.displayName = "NutMenu";
9234
- const defaultProps$Z = {
9234
+ const defaultProps$$ = {
9235
9235
  ...ComponentDefaults,
9236
9236
  className: "",
9237
9237
  style: {},
@@ -9246,7 +9246,7 @@
9246
9246
  };
9247
9247
  const MenuItem = React.forwardRef((props, ref) => {
9248
9248
  useConfig();
9249
- const mergedProps = { ...defaultProps$Z, ...props };
9249
+ const mergedProps = { ...defaultProps$$, ...props };
9250
9250
  const {
9251
9251
  style,
9252
9252
  options: options2,
@@ -9262,7 +9262,7 @@
9262
9262
  iconClassPrefix,
9263
9263
  iconFontClassName
9264
9264
  } = {
9265
- ...defaultProps$Z,
9265
+ ...defaultProps$$,
9266
9266
  ...props
9267
9267
  };
9268
9268
  const { activeColor, showPopup, parent, orderKey } = mergedProps;
@@ -9383,7 +9383,7 @@
9383
9383
  }, item.text));
9384
9384
  }), children))));
9385
9385
  });
9386
- MenuItem.defaultProps = defaultProps$Z;
9386
+ MenuItem.defaultProps = defaultProps$$;
9387
9387
  MenuItem.displayName = "NutMenuItem";
9388
9388
  const MIN_DISTANCE = 10;
9389
9389
  function getDirection(x2, y2) {
@@ -9534,14 +9534,14 @@
9534
9534
  size,
9535
9535
  customClass,
9536
9536
  cover,
9537
- type
9537
+ type: type2
9538
9538
  } = this.props;
9539
9539
  const toastBem = cn("toast");
9540
9540
  const classes = classNames({
9541
9541
  "nut-toast-center": center,
9542
9542
  "nut-toast-has-icon": icon,
9543
9543
  "nut-toast-cover": cover,
9544
- "nut-toast-loading": type === "loading",
9544
+ "nut-toast-loading": type2 === "loading",
9545
9545
  [`${customClass}`]: true,
9546
9546
  [`nut-toast-${size}`]: true
9547
9547
  });
@@ -9681,7 +9681,7 @@
9681
9681
  }
9682
9682
  }
9683
9683
  };
9684
- const defaultProps$Y = {
9684
+ const defaultProps$_ = {
9685
9685
  range: false,
9686
9686
  hiddenRange: false,
9687
9687
  hiddenTag: false,
@@ -9698,7 +9698,7 @@
9698
9698
  const { locale } = useConfig();
9699
9699
  const {
9700
9700
  className,
9701
- range,
9701
+ range: range2,
9702
9702
  disabled,
9703
9703
  activeColor,
9704
9704
  inactiveColor,
@@ -9714,9 +9714,12 @@
9714
9714
  dragEnd,
9715
9715
  onChange,
9716
9716
  onDragStart,
9717
- onDragEnd
9718
- } = { ...defaultProps$Y, ...props };
9719
- let { min, max, step } = { ...defaultProps$Y, ...props };
9717
+ onDragEnd,
9718
+ minDesc,
9719
+ maxDesc,
9720
+ curValueDesc
9721
+ } = { ...defaultProps$_, ...props };
9722
+ let { min, max, step } = { ...defaultProps$_, ...props };
9720
9723
  min = Number(min);
9721
9724
  max = Number(max);
9722
9725
  step = Number(step);
@@ -9728,7 +9731,7 @@
9728
9731
  const [marksList, SetMarksList] = React.useState([]);
9729
9732
  React.useEffect(() => {
9730
9733
  if (modelValue) {
9731
- if (!range && (modelValue < min || modelValue > max)) {
9734
+ if (!range2 && (modelValue < min || modelValue > max)) {
9732
9735
  SetInitValue(0);
9733
9736
  Toast.text(`${modelValue} ${locale.range.rangeText}`);
9734
9737
  return;
@@ -9764,7 +9767,7 @@
9764
9767
  const classPrefix = "nut-range-mark";
9765
9768
  let lowerBound = Number(min);
9766
9769
  let upperBound = Number(max);
9767
- if (range) {
9770
+ if (range2) {
9768
9771
  const [left, right] = modelValue;
9769
9772
  lowerBound = left;
9770
9773
  upperBound = right;
@@ -9777,7 +9780,7 @@
9777
9780
  `${isActive ? `${classPrefix}-text-active` : ""}`
9778
9781
  ].filter(Boolean).join(" ");
9779
9782
  },
9780
- [range, modelValue, min, max]
9783
+ [range2, modelValue, min, max]
9781
9784
  );
9782
9785
  const [rangeName, setRangeName] = React.useState(classes());
9783
9786
  const [containerName, setContainerName] = React.useState(containerClasses());
@@ -9796,7 +9799,7 @@
9796
9799
  };
9797
9800
  };
9798
9801
  const isRange = (val) => {
9799
- return !!range && Array.isArray(val);
9802
+ return !!range2 && Array.isArray(val);
9800
9803
  };
9801
9804
  const calcMainAxis = () => {
9802
9805
  const modelVal = initValue || initValue === 0 ? initValue : modelValue;
@@ -9842,7 +9845,7 @@
9842
9845
  const tickStyle = (mark) => {
9843
9846
  let lowerBound = Number(min);
9844
9847
  let upperBound = Number(max);
9845
- if (range) {
9848
+ if (range2) {
9846
9849
  const [left, right] = modelValue;
9847
9850
  lowerBound = left;
9848
9851
  upperBound = right;
@@ -9853,7 +9856,7 @@
9853
9856
  };
9854
9857
  return style;
9855
9858
  };
9856
- const format = (value) => {
9859
+ const format2 = (value) => {
9857
9860
  value = Math.max(+min, Math.min(value, +max));
9858
9861
  return Math.round(value / +step) * +step;
9859
9862
  };
@@ -9868,9 +9871,9 @@
9868
9871
  };
9869
9872
  const updateValue = (value, end) => {
9870
9873
  if (isRange(value)) {
9871
- value = handleOverlap(value).map(format);
9874
+ value = handleOverlap(value).map(format2);
9872
9875
  } else {
9873
- value = format(value);
9876
+ value = format2(value);
9874
9877
  }
9875
9878
  const modelVal = initValue || initValue === 0 ? initValue : modelValue;
9876
9879
  if (!isSameValue(value, modelVal)) {
@@ -9914,9 +9917,9 @@
9914
9917
  touch.start(event);
9915
9918
  currentValue = initValue || initValue === 0 ? initValue : modelValue;
9916
9919
  if (isRange(currentValue)) {
9917
- startValue = currentValue.map(format);
9920
+ startValue = currentValue.map(format2);
9918
9921
  } else {
9919
- startValue = format(currentValue);
9922
+ startValue = format2(currentValue);
9920
9923
  }
9921
9924
  SetDragStatus("start");
9922
9925
  };
@@ -9966,7 +9969,7 @@
9966
9969
  className: `${containerName}`
9967
9970
  }, !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
9968
9971
  className: "min"
9969
- }, +min) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
9972
+ }, minDesc || +min) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
9970
9973
  ref: root,
9971
9974
  style: wrapperStyle(),
9972
9975
  className: `${rangeName}`,
@@ -9987,7 +9990,7 @@
9987
9990
  })) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
9988
9991
  className: "nut-range-bar",
9989
9992
  style: barStyle()
9990
- }, range ? [0, 1].map((item, index) => {
9993
+ }, range2 ? [0, 1].map((item, index) => {
9991
9994
  return /* @__PURE__ */ React__default["default"].createElement("div", {
9992
9995
  role: "slider",
9993
9996
  key: index,
@@ -10021,7 +10024,7 @@
10021
10024
  style: buttonStyle()
10022
10025
  }, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
10023
10026
  className: "number"
10024
- }, curValue(index)) : null));
10027
+ }, curValueDesc || curValue(index)) : null));
10025
10028
  }) : /* @__PURE__ */ React__default["default"].createElement("div", {
10026
10029
  role: "slider",
10027
10030
  className: "nut-range-button-wrapper",
@@ -10050,19 +10053,19 @@
10050
10053
  style: buttonStyle()
10051
10054
  }, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
10052
10055
  className: "number"
10053
- }, curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
10056
+ }, curValueDesc || curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
10054
10057
  className: "max"
10055
- }, +max) : null);
10058
+ }, maxDesc || +max) : null);
10056
10059
  };
10057
- Range.defaultProps = defaultProps$Y;
10060
+ Range.defaultProps = defaultProps$_;
10058
10061
  Range.displayName = "NutRange";
10059
10062
  const Utils = {
10060
10063
  isLeapYear(y2) {
10061
10064
  return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0;
10062
10065
  },
10063
10066
  getWhatDay(year, month, day) {
10064
- const date = new Date(`${year}/${month}/${day}`);
10065
- const index = date.getDay();
10067
+ const date2 = new Date(`${year}/${month}/${day}`);
10068
+ const index = date2.getDay();
10066
10069
  const dayNames = [
10067
10070
  "\u661F\u671F\u65E5",
10068
10071
  "\u661F\u671F\u4E00",
@@ -10075,8 +10078,8 @@
10075
10078
  return dayNames[index];
10076
10079
  },
10077
10080
  getMonthPreDay(year, month) {
10078
- const date = new Date(`${year}/${month}/01`);
10079
- let day = date.getDay();
10081
+ const date2 = new Date(`${year}/${month}/01`);
10082
+ let day = date2.getDay();
10080
10083
  if (day == 0) {
10081
10084
  day = 7;
10082
10085
  }
@@ -10106,19 +10109,19 @@
10106
10109
  n2 = Number(n2);
10107
10110
  return (n2 > 9 ? "" : "0") + n2;
10108
10111
  },
10109
- date2Str(date, split) {
10112
+ date2Str(date2, split) {
10110
10113
  split = split || "-";
10111
- const y2 = date.getFullYear();
10112
- const m2 = this.getNumTwoBit(date.getMonth() + 1);
10113
- const d2 = this.getNumTwoBit(date.getDate());
10114
+ const y2 = date2.getFullYear();
10115
+ const m2 = this.getNumTwoBit(date2.getMonth() + 1);
10116
+ const d2 = this.getNumTwoBit(date2.getDate());
10114
10117
  return [y2, m2, d2].join(split);
10115
10118
  },
10116
10119
  getDay(i) {
10117
10120
  i = i || 0;
10118
- let date = new Date();
10121
+ let date2 = new Date();
10119
10122
  const diff = i * (1e3 * 60 * 60 * 24);
10120
- date = new Date(date.getTime() + diff);
10121
- return this.date2Str(date);
10123
+ date2 = new Date(date2.getTime() + diff);
10124
+ return this.date2Str(date2);
10122
10125
  },
10123
10126
  compareDate(date1, date2) {
10124
10127
  const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
@@ -10148,7 +10151,7 @@
10148
10151
  };
10149
10152
  }
10150
10153
  var requestAniFrame$1 = requestAniFrame();
10151
- const defaultProps$X = {
10154
+ const defaultProps$Z = {
10152
10155
  type: "one",
10153
10156
  isAutoBackFill: false,
10154
10157
  poppable: true,
@@ -10178,7 +10181,7 @@
10178
10181
  const CalendarItem = React__default["default"].forwardRef((props, ref) => {
10179
10182
  const { locale } = useConfig();
10180
10183
  const {
10181
- type,
10184
+ type: type2,
10182
10185
  isAutoBackFill,
10183
10186
  poppable,
10184
10187
  title,
@@ -10197,7 +10200,7 @@
10197
10200
  onChoose,
10198
10201
  onUpdate,
10199
10202
  onSelected
10200
- } = { ...defaultProps$X, ...props };
10203
+ } = { ...defaultProps$Z, ...props };
10201
10204
  const weeks = locale.calendaritem.weekdays;
10202
10205
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
10203
10206
  const [monthsData, setMonthsData] = React.useState([]);
@@ -10249,10 +10252,10 @@
10249
10252
  });
10250
10253
  const monthitemclasses = classNames({
10251
10254
  "calendar-month-item": true,
10252
- [`${type === "range" ? "month-item-range" : ""}`]: true
10255
+ [`${type2 === "range" ? "month-item-range" : ""}`]: true
10253
10256
  });
10254
- const splitDate = (date) => {
10255
- return date.split("-");
10257
+ const splitDate = (date2) => {
10258
+ return date2.split("-");
10256
10259
  };
10257
10260
  const isStart = (currDate) => {
10258
10261
  return Utils.isEqual(state.currDate[0], currDate);
@@ -10276,13 +10279,13 @@
10276
10279
  const getClass = (day, month) => {
10277
10280
  const currDate = getCurrDate(day, month);
10278
10281
  if (day.type === "curr") {
10279
- if (Utils.isEqual(state.currDate, currDate) || type === "range" && (isStart(currDate) || isEnd(currDate)) || type === "multiple" && isMultiple(currDate)) {
10282
+ if (Utils.isEqual(state.currDate, currDate) || type2 === "range" && (isStart(currDate) || isEnd(currDate)) || type2 === "multiple" && isMultiple(currDate)) {
10280
10283
  return `${state.dayPrefix}-active`;
10281
10284
  }
10282
10285
  if (state.propStartDate && Utils.compareDate(currDate, state.propStartDate) || state.propEndDate && Utils.compareDate(state.propEndDate, currDate)) {
10283
10286
  return `${state.dayPrefix}-disabled`;
10284
10287
  }
10285
- if (type === "range" && Array.isArray(state.currDate) && Object.values(state.currDate).length === 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
10288
+ if (type2 === "range" && Array.isArray(state.currDate) && Object.values(state.currDate).length === 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
10286
10289
  return `${state.dayPrefix}-choose`;
10287
10290
  }
10288
10291
  return null;
@@ -10293,12 +10296,12 @@
10293
10296
  return state.isRange && day.type === "curr" && getClass(day, month) === "calendar-month-day-active";
10294
10297
  };
10295
10298
  const isCurrDay = (month, day) => {
10296
- const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
10297
- return Utils.isEqual(date, Utils.date2Str(new Date()));
10299
+ const date2 = `${month.curData[0]}-${month.curData[1]}-${day}`;
10300
+ return Utils.isEqual(date2, Utils.date2Str(new Date()));
10298
10301
  };
10299
10302
  const confirm2 = () => {
10300
- const { type: type2 } = props;
10301
- if (type2 === "range" && state.chooseData.length === 2 || type2 !== "range") {
10303
+ const { type: type22 } = props;
10304
+ if (type22 === "range" && state.chooseData.length === 2 || type22 !== "range") {
10302
10305
  const chooseData = state.chooseData.slice(0);
10303
10306
  onChoose && onChoose(chooseData);
10304
10307
  if (poppable) {
@@ -10308,12 +10311,12 @@
10308
10311
  };
10309
10312
  const chooseDay = (day, month, isFirst) => {
10310
10313
  if (getClass(day, month) !== `${state.dayPrefix}-disabled`) {
10311
- const { type: type2 } = props;
10314
+ const { type: type22 } = props;
10312
10315
  const days = [...month.curData];
10313
10316
  days[2] = typeof day.day === "number" ? Utils.getNumTwoBit(day.day) : day.day;
10314
10317
  days[3] = `${days[0]}-${days[1]}-${days[2]}`;
10315
10318
  days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
10316
- if (type2 === "multiple") {
10319
+ if (type22 === "multiple") {
10317
10320
  if (state.currDate.length > 0) {
10318
10321
  let hasIndex = "";
10319
10322
  state.currDate.forEach((item, index) => {
@@ -10334,7 +10337,7 @@
10334
10337
  state.currDate = [days[3]];
10335
10338
  state.chooseData = [[...days]];
10336
10339
  }
10337
- } else if (type2 === "range") {
10340
+ } else if (type22 === "range") {
10338
10341
  const curDataLength = Object.values(state.currDate).length;
10339
10342
  if (curDataLength === 2 || curDataLength === 0) {
10340
10343
  state.currDate = [days[3]];
@@ -10378,11 +10381,11 @@
10378
10381
  }
10379
10382
  return false;
10380
10383
  };
10381
- const getCurrData = (type2) => {
10382
- const monthData = type2 === "prev" ? state.monthsData[0] : state.monthsData[state.monthsData.length - 1];
10384
+ const getCurrData = (type22) => {
10385
+ const monthData = type22 === "prev" ? state.monthsData[0] : state.monthsData[state.monthsData.length - 1];
10383
10386
  let year = parseInt(monthData.curData[0]);
10384
10387
  let month = parseInt(monthData.curData[1].toString().replace(/^0/, ""));
10385
- switch (type2) {
10388
+ switch (type22) {
10386
10389
  case "prev":
10387
10390
  month === 1 && (year -= 1);
10388
10391
  month = month === 1 ? 12 : --month;
@@ -10398,36 +10401,36 @@
10398
10401
  Utils.getMonthDays(String(year), String(month))
10399
10402
  ];
10400
10403
  };
10401
- const getDaysStatus = (days, type2, dateInfo) => {
10404
+ const getDaysStatus = (days, type22, dateInfo) => {
10402
10405
  const { year, month } = dateInfo;
10403
- if (type2 === "prev" && days >= 7) {
10406
+ if (type22 === "prev" && days >= 7) {
10404
10407
  days -= 7;
10405
10408
  }
10406
10409
  return Array.from(Array(days), (v2, k2) => {
10407
10410
  return {
10408
10411
  day: k2 + 1,
10409
- type: type2,
10412
+ type: type22,
10410
10413
  year,
10411
10414
  month
10412
10415
  };
10413
10416
  });
10414
10417
  };
10415
- const getPreDaysStatus = (days, type2, dateInfo, preCurrMonthDays) => {
10418
+ const getPreDaysStatus = (days, type22, dateInfo, preCurrMonthDays) => {
10416
10419
  const { year, month } = dateInfo;
10417
- if (type2 === "prev" && days >= 7) {
10420
+ if (type22 === "prev" && days >= 7) {
10418
10421
  days -= 7;
10419
10422
  }
10420
10423
  const months2 = Array.from(Array(preCurrMonthDays), (v2, k2) => {
10421
10424
  return {
10422
10425
  day: k2 + 1,
10423
- type: type2,
10426
+ type: type22,
10424
10427
  year,
10425
10428
  month
10426
10429
  };
10427
10430
  });
10428
10431
  return months2.slice(preCurrMonthDays - days);
10429
10432
  };
10430
- const getMonth = (curData, type2) => {
10433
+ const getMonth = (curData, type22) => {
10431
10434
  const preMonthDays = Utils.getMonthPreDay(+curData[0], +curData[1]);
10432
10435
  let preMonth = +curData[1] - 1;
10433
10436
  let preYear = curData[0];
@@ -10460,7 +10463,7 @@
10460
10463
  cssScrollHeight = state.monthsData[state.monthsData.length - 1].cssScrollHeight + state.monthsData[state.monthsData.length - 1].cssHeight;
10461
10464
  }
10462
10465
  monthInfo.cssScrollHeight = cssScrollHeight;
10463
- if (type2 === "next") {
10466
+ if (type22 === "next") {
10464
10467
  if (!state.endData || !Utils.compareDate(
10465
10468
  `${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(
10466
10469
  state.endData[0],
@@ -10566,7 +10569,7 @@
10566
10569
  getMonth(getCurrData("next"), "next");
10567
10570
  } while (i++ < monthsNum);
10568
10571
  state.monthsNum = monthsNum;
10569
- if (type === "range" && Array.isArray(state.currDate)) {
10572
+ if (type2 === "range" && Array.isArray(state.currDate)) {
10570
10573
  if (state.currDate.length > 0) {
10571
10574
  if (propStartDate && Utils.compareDate(state.currDate[0], propStartDate)) {
10572
10575
  state.currDate.splice(0, 1, propStartDate);
@@ -10626,7 +10629,7 @@
10626
10629
  state.currentIndex = current;
10627
10630
  setYearMonthTitle(state.monthsData[state.currentIndex].title);
10628
10631
  if (state.defaultData.length > 0) {
10629
- if (type === "range") {
10632
+ if (type2 === "range") {
10630
10633
  chooseDay(
10631
10634
  { day: state.defaultData[2], type: "curr" },
10632
10635
  state.monthsData[state.currentIndex],
@@ -10637,7 +10640,7 @@
10637
10640
  state.monthsData[lastCurrent],
10638
10641
  true
10639
10642
  );
10640
- } else if (type === "multiple") {
10643
+ } else if (type2 === "multiple") {
10641
10644
  [...state.currDate].forEach((item) => {
10642
10645
  const dateArr = splitDate(item);
10643
10646
  let current2 = state.currentIndex;
@@ -10676,13 +10679,13 @@
10676
10679
  state.monthsData.splice(0);
10677
10680
  initData();
10678
10681
  };
10679
- const scrollToDate = (date) => {
10680
- if (Utils.compareDate(date, state.propStartDate)) {
10681
- date = state.propStartDate;
10682
- } else if (!Utils.compareDate(date, state.propEndDate)) {
10683
- date = state.propEndDate;
10682
+ const scrollToDate = (date2) => {
10683
+ if (Utils.compareDate(date2, state.propStartDate)) {
10684
+ date2 = state.propStartDate;
10685
+ } else if (!Utils.compareDate(date2, state.propEndDate)) {
10686
+ date2 = state.propEndDate;
10684
10687
  }
10685
- const dateArr = splitDate(date);
10688
+ const dateArr = splitDate(date2);
10686
10689
  state.monthsData.forEach((item, index) => {
10687
10690
  if (item.title === locale.calendaritem.monthTitle(dateArr[0], dateArr[1])) {
10688
10691
  if (months.current) {
@@ -10784,9 +10787,9 @@
10784
10787
  onClick: confirm2
10785
10788
  }, confirmText || locale.confirm)) : ""));
10786
10789
  });
10787
- CalendarItem.defaultProps = defaultProps$X;
10790
+ CalendarItem.defaultProps = defaultProps$Z;
10788
10791
  CalendarItem.displayName = "NutCalendarItem";
10789
- const defaultProps$W = {
10792
+ const defaultProps$Y = {
10790
10793
  type: "one",
10791
10794
  isAutoBackFill: false,
10792
10795
  poppable: true,
@@ -10818,7 +10821,7 @@
10818
10821
  const {
10819
10822
  poppable,
10820
10823
  visible,
10821
- type,
10824
+ type: type2,
10822
10825
  isAutoBackFill,
10823
10826
  title,
10824
10827
  defaultValue,
@@ -10838,7 +10841,7 @@
10838
10841
  onClose,
10839
10842
  onChoose,
10840
10843
  onSelected
10841
- } = { ...defaultProps$W, ...props };
10844
+ } = { ...defaultProps$Y, ...props };
10842
10845
  const calendarRef = React.useRef(null);
10843
10846
  const close = () => {
10844
10847
  onClose && onClose();
@@ -10853,9 +10856,9 @@
10853
10856
  const select = (param) => {
10854
10857
  onSelected && onSelected(param);
10855
10858
  };
10856
- const scrollToDate = (date) => {
10859
+ const scrollToDate = (date2) => {
10857
10860
  var _a;
10858
- (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date);
10861
+ (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date2);
10859
10862
  };
10860
10863
  React__default["default"].useImperativeHandle(ref, () => ({
10861
10864
  scrollToDate
@@ -10863,7 +10866,7 @@
10863
10866
  const renderItem = () => {
10864
10867
  return /* @__PURE__ */ React__default["default"].createElement(CalendarItem, {
10865
10868
  ref: calendarRef,
10866
- type,
10869
+ type: type2,
10867
10870
  isAutoBackFill,
10868
10871
  poppable,
10869
10872
  title: locale.calendaritem.title || title,
@@ -10897,9 +10900,9 @@
10897
10900
  style: { height: "85vh" }
10898
10901
  }, renderItem()) : renderItem());
10899
10902
  });
10900
- Calendar.defaultProps = defaultProps$W;
10903
+ Calendar.defaultProps = defaultProps$Y;
10901
10904
  Calendar.displayName = "NutCalendar";
10902
- const defaultProps$V = {
10905
+ const defaultProps$X = {
10903
10906
  disabled: false,
10904
10907
  checkedValue: [],
10905
10908
  max: void 0,
@@ -10909,7 +10912,7 @@
10909
10912
  };
10910
10913
  const CheckboxGroup = React__default["default"].forwardRef(
10911
10914
  (props, ref) => {
10912
- const { children } = { ...defaultProps$V, ...props };
10915
+ const { children } = { ...defaultProps$X, ...props };
10913
10916
  const b2 = cn("checkboxgroup");
10914
10917
  const {
10915
10918
  className,
@@ -11016,9 +11019,9 @@
11016
11019
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren());
11017
11020
  }
11018
11021
  );
11019
- CheckboxGroup.defaultProps = defaultProps$V;
11022
+ CheckboxGroup.defaultProps = defaultProps$X;
11020
11023
  CheckboxGroup.displayName = "NutCheckboxGroup";
11021
- const defaultProps$U = {
11024
+ const defaultProps$W = {
11022
11025
  ...ComponentDefaults,
11023
11026
  checked: false,
11024
11027
  disabled: false,
@@ -11034,7 +11037,7 @@
11034
11037
  };
11035
11038
  const Checkbox = (props) => {
11036
11039
  const { children } = {
11037
- ...defaultProps$U,
11040
+ ...defaultProps$W,
11038
11041
  ...props
11039
11042
  };
11040
11043
  const b2 = cn("checkbox");
@@ -11116,7 +11119,7 @@
11116
11119
  onClick: handleClick2
11117
11120
  }, renderIcon(), renderLabel());
11118
11121
  };
11119
- Checkbox.defaultProps = defaultProps$U;
11122
+ Checkbox.defaultProps = defaultProps$W;
11120
11123
  Checkbox.displayName = "NutCheckBox";
11121
11124
  Checkbox.Group = CheckboxGroup;
11122
11125
  const InternalPickerSlot = (props, ref) => {
@@ -11152,18 +11155,18 @@
11152
11155
  }
11153
11156
  return false;
11154
11157
  };
11155
- const setTransform = (translateY = 0, type, time = DEFAULT_DURATION, deg) => {
11158
+ const setTransform = (translateY = 0, type2, time = DEFAULT_DURATION, deg) => {
11156
11159
  let nTime = time;
11157
- if (type !== "end") {
11160
+ if (type2 !== "end") {
11158
11161
  nTime = 0;
11159
11162
  }
11160
11163
  setTouchTime(nTime);
11161
11164
  setTouchDeg(deg);
11162
11165
  setScrollDistance(translateY);
11163
11166
  };
11164
- const setMove = (move, type, time) => {
11167
+ const setMove = (move, type2, time) => {
11165
11168
  let updateMove = move + transformY.current;
11166
- if (type === "end") {
11169
+ if (type2 === "end") {
11167
11170
  if (updateMove > 0) {
11168
11171
  updateMove = 0;
11169
11172
  }
@@ -11172,7 +11175,7 @@
11172
11175
  }
11173
11176
  const endMove = Math.round(updateMove / lineSpacing) * lineSpacing;
11174
11177
  const deg = `${(Math.abs(Math.round(endMove / lineSpacing)) + 1) * rotation}deg`;
11175
- setTransform(endMove, type, time, deg);
11178
+ setTransform(endMove, type2, time, deg);
11176
11179
  setCurrIndex(Math.abs(Math.round(endMove / lineSpacing)) + 1);
11177
11180
  } else {
11178
11181
  let deg = 0;
@@ -11225,7 +11228,7 @@
11225
11228
  nDistance = speed / 3e-3 * (nDistance < 0 ? -1 : 1);
11226
11229
  return nDistance;
11227
11230
  };
11228
- const modifyStatus = (type, val) => {
11231
+ const modifyStatus = (type2, val) => {
11229
11232
  const value = val || defaultValue;
11230
11233
  let index = -1;
11231
11234
  if (value) {
@@ -11245,7 +11248,7 @@
11245
11248
  }
11246
11249
  setCurrIndex(index === -1 ? 1 : index + 1);
11247
11250
  const move = index === -1 ? 0 : index * lineSpacing;
11248
- type && setChooseValue(-move);
11251
+ type2 && setChooseValue(-move);
11249
11252
  setMove(-move);
11250
11253
  };
11251
11254
  const stopMomentum = () => {
@@ -11444,8 +11447,8 @@
11444
11447
  }
11445
11448
  };
11446
11449
  const normalListData = () => {
11447
- const type = columnsType();
11448
- switch (type) {
11450
+ const type2 = columnsType();
11451
+ switch (type2) {
11449
11452
  case "multiple":
11450
11453
  return listData;
11451
11454
  case "cascade":
@@ -11541,7 +11544,7 @@
11541
11544
  };
11542
11545
  const Picker = React__default["default"].forwardRef(InternalPicker);
11543
11546
  const currentYear = new Date().getFullYear();
11544
- const defaultProps$T = {
11547
+ const defaultProps$V = {
11545
11548
  modelValue: null,
11546
11549
  visible: false,
11547
11550
  title: "",
@@ -11556,7 +11559,7 @@
11556
11559
  const {
11557
11560
  minDate,
11558
11561
  maxDate,
11559
- type,
11562
+ type: type2,
11560
11563
  isShowChinese,
11561
11564
  minuteStep,
11562
11565
  modelValue,
@@ -11572,7 +11575,7 @@
11572
11575
  style,
11573
11576
  ...rest
11574
11577
  } = {
11575
- ...defaultProps$T,
11578
+ ...defaultProps$V,
11576
11579
  ...props
11577
11580
  };
11578
11581
  const { locale } = useConfig();
@@ -11605,16 +11608,16 @@
11605
11608
  function getMonthEndDay(year, month) {
11606
11609
  return new Date(year, month, 0).getDate();
11607
11610
  }
11608
- const getBoundary = (type2, value) => {
11609
- const boundary = type2 === "min" ? minDate : maxDate;
11611
+ const getBoundary = (type22, value) => {
11612
+ const boundary = type22 === "min" ? minDate : maxDate;
11610
11613
  const year = boundary.getFullYear();
11611
11614
  let month = 1;
11612
- let date = 1;
11615
+ let date2 = 1;
11613
11616
  let hour = 0;
11614
11617
  let minute = 0;
11615
- if (type2 === "max") {
11618
+ if (type22 === "max") {
11616
11619
  month = 12;
11617
- date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
11620
+ date2 = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
11618
11621
  hour = 23;
11619
11622
  minute = 59;
11620
11623
  }
@@ -11622,8 +11625,8 @@
11622
11625
  if (value.getFullYear() === year) {
11623
11626
  month = boundary.getMonth() + 1;
11624
11627
  if (value.getMonth() + 1 === month) {
11625
- date = boundary.getDate();
11626
- if (value.getDate() === date) {
11628
+ date2 = boundary.getDate();
11629
+ if (value.getDate() === date2) {
11627
11630
  hour = boundary.getHours();
11628
11631
  if (value.getHours() === hour) {
11629
11632
  minute = boundary.getMinutes();
@@ -11632,16 +11635,16 @@
11632
11635
  }
11633
11636
  }
11634
11637
  return {
11635
- [`${type2}Year`]: year,
11636
- [`${type2}Month`]: month,
11637
- [`${type2}Date`]: date,
11638
- [`${type2}Hour`]: hour,
11639
- [`${type2}Minute`]: minute,
11640
- [`${type2}Seconds`]: seconds
11638
+ [`${type22}Year`]: year,
11639
+ [`${type22}Month`]: month,
11640
+ [`${type22}Date`]: date2,
11641
+ [`${type22}Hour`]: hour,
11642
+ [`${type22}Minute`]: minute,
11643
+ [`${type22}Seconds`]: seconds
11641
11644
  };
11642
11645
  };
11643
- const ranges = (date) => {
11644
- const curDate = date || currentDate;
11646
+ const ranges = (date2) => {
11647
+ const curDate = date2 || currentDate;
11645
11648
  if (!curDate)
11646
11649
  return [];
11647
11650
  const { maxYear, maxDate: maxDate2, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", curDate);
@@ -11672,7 +11675,7 @@
11672
11675
  range: [minSeconds, maxSeconds]
11673
11676
  }
11674
11677
  ];
11675
- switch (type.toLocaleLowerCase()) {
11678
+ switch (type2.toLocaleLowerCase()) {
11676
11679
  case "date":
11677
11680
  result = result.slice(0, 3);
11678
11681
  break;
@@ -11696,18 +11699,18 @@
11696
11699
  };
11697
11700
  const updateChooseValueCustmer = (index, selectedValue, cacheValueData) => {
11698
11701
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
11699
- type.toLocaleLowerCase()
11702
+ type2.toLocaleLowerCase()
11700
11703
  )) {
11701
11704
  const formatDate = [];
11702
11705
  selectedValue.forEach((item) => {
11703
11706
  formatDate.push(item);
11704
11707
  });
11705
- if (type.toLocaleLowerCase() === "month-day" && formatDate.length < 3) {
11708
+ if (type2.toLocaleLowerCase() === "month-day" && formatDate.length < 3) {
11706
11709
  formatDate.unshift(
11707
11710
  new Date(modelValue || minDate || maxDate).getFullYear()
11708
11711
  );
11709
11712
  }
11710
- if (type.toLocaleLowerCase() === "year-month" && formatDate.length < 3) {
11713
+ if (type2.toLocaleLowerCase() === "year-month" && formatDate.length < 3) {
11711
11714
  formatDate.push(new Date(modelValue || minDate || maxDate).getDate());
11712
11715
  }
11713
11716
  const year = Number(formatDate[0]);
@@ -11716,22 +11719,22 @@
11716
11719
  Number(formatDate[2]),
11717
11720
  getMonthEndDay(Number(formatDate[0]), Number(formatDate[1]))
11718
11721
  );
11719
- let date = null;
11720
- if (type.toLocaleLowerCase() === "date" || type.toLocaleLowerCase() === "month-day" || type.toLocaleLowerCase() === "year-month") {
11721
- date = new Date(year, month, day);
11722
- } else if (type.toLocaleLowerCase() === "datetime") {
11723
- date = new Date(
11722
+ let date2 = null;
11723
+ if (type2.toLocaleLowerCase() === "date" || type2.toLocaleLowerCase() === "month-day" || type2.toLocaleLowerCase() === "year-month") {
11724
+ date2 = new Date(year, month, day);
11725
+ } else if (type2.toLocaleLowerCase() === "datetime") {
11726
+ date2 = new Date(
11724
11727
  year,
11725
11728
  month,
11726
11729
  day,
11727
11730
  Number(formatDate[3]),
11728
11731
  Number(formatDate[4])
11729
11732
  );
11730
- } else if (type.toLocaleLowerCase() === "datehour") {
11731
- date = new Date(year, month, day, Number(formatDate[3]));
11733
+ } else if (type2.toLocaleLowerCase() === "datehour") {
11734
+ date2 = new Date(year, month, day, Number(formatDate[3]));
11732
11735
  }
11733
- const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
11734
- date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
11736
+ const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date2 == null ? void 0 : date2.getTime());
11737
+ date2 && isDate(date2) && !isEqual2 && setCurrentDate(formatValue(date2));
11735
11738
  }
11736
11739
  props.onChange && props.onChange(index, selectedValue, cacheValueData);
11737
11740
  };
@@ -11742,27 +11745,27 @@
11742
11745
  }
11743
11746
  return str;
11744
11747
  };
11745
- const formatterOption = (type2, value) => {
11748
+ const formatterOption = (type22, value) => {
11746
11749
  let fOption = null;
11747
11750
  if (formatter) {
11748
- fOption = formatter(type2, {
11751
+ fOption = formatter(type22, {
11749
11752
  text: padZero(value, 2),
11750
11753
  value: padZero(value, 2)
11751
11754
  });
11752
11755
  } else {
11753
11756
  const padMin = padZero(value, 2);
11754
- const fatter = isShowChinese ? zhCNType[type2] : "";
11757
+ const fatter = isShowChinese ? zhCNType[type22] : "";
11755
11758
  fOption = { text: padMin + fatter, value: padMin };
11756
11759
  }
11757
11760
  return fOption;
11758
11761
  };
11759
- const generateValue = (min, max, val, type2, columnIndex) => {
11762
+ const generateValue = (min, max, val, type22, columnIndex) => {
11760
11763
  let cmin = min;
11761
11764
  const arr = [];
11762
11765
  let index = 0;
11763
11766
  while (cmin <= max) {
11764
- arr.push(formatterOption(type2, cmin));
11765
- if (type2 === "minute") {
11767
+ arr.push(formatterOption(type22, cmin));
11768
+ if (type22 === "minute") {
11766
11769
  cmin += minuteStep;
11767
11770
  } else {
11768
11771
  cmin++;
@@ -11773,32 +11776,32 @@
11773
11776
  }
11774
11777
  defaultValue[columnIndex] = arr[index].value;
11775
11778
  setDefaultValue([...defaultValue]);
11776
- if (props.filter && props.filter(type2, arr)) {
11777
- return props.filter(type2, arr);
11779
+ if (props.filter && props.filter(type22, arr)) {
11780
+ return props.filter(type22, arr);
11778
11781
  }
11779
11782
  return arr;
11780
11783
  };
11781
- const getDateIndex = (type2) => {
11784
+ const getDateIndex = (type22) => {
11782
11785
  if (!currentDate)
11783
11786
  return 0;
11784
11787
  let d2 = 0;
11785
- if (type2 === "year") {
11788
+ if (type22 === "year") {
11786
11789
  d2 = currentDate.getFullYear();
11787
- } else if (type2 === "month") {
11790
+ } else if (type22 === "month") {
11788
11791
  d2 = currentDate.getMonth() + 1;
11789
- } else if (type2 === "day") {
11792
+ } else if (type22 === "day") {
11790
11793
  d2 = currentDate.getDate();
11791
- } else if (type2 === "hour") {
11794
+ } else if (type22 === "hour") {
11792
11795
  d2 = currentDate.getHours();
11793
- } else if (type2 === "minute") {
11796
+ } else if (type22 === "minute") {
11794
11797
  d2 = currentDate.getMinutes();
11795
- } else if (type2 === "seconds") {
11798
+ } else if (type22 === "seconds") {
11796
11799
  d2 = currentDate.getSeconds();
11797
11800
  }
11798
11801
  return d2;
11799
11802
  };
11800
- const columns = (date) => {
11801
- const val = ranges(date).map((res, columnIndex) => {
11803
+ const columns = (date2) => {
11804
+ const val = ranges(date2).map((res, columnIndex) => {
11802
11805
  return generateValue(
11803
11806
  res.range[0],
11804
11807
  res.range[1],
@@ -11838,9 +11841,9 @@
11838
11841
  ref: pickerRef
11839
11842
  }));
11840
11843
  };
11841
- DatePicker.defaultProps = defaultProps$T;
11844
+ DatePicker.defaultProps = defaultProps$V;
11842
11845
  DatePicker.displayName = "NutDatePicker";
11843
- const defaultProps$S = {
11846
+ const defaultProps$U = {
11844
11847
  ...ComponentDefaults,
11845
11848
  disabled: false,
11846
11849
  buttonSize: "",
@@ -11887,7 +11890,7 @@
11887
11890
  iconFontClassName,
11888
11891
  ...restProps
11889
11892
  } = {
11890
- ...defaultProps$S,
11893
+ ...defaultProps$U,
11891
11894
  ...props
11892
11895
  };
11893
11896
  const [inputValue, setInputValue] = React.useState(modelValue);
@@ -12024,7 +12027,7 @@
12024
12027
  onClick: addNumber
12025
12028
  }));
12026
12029
  };
12027
- InputNumber.defaultProps = defaultProps$S;
12030
+ InputNumber.defaultProps = defaultProps$U;
12028
12031
  InputNumber.displayName = "NutInputNumber";
12029
12032
  function trimExtraChar(value, char, regExp) {
12030
12033
  const index = value.indexOf(char);
@@ -12050,7 +12053,7 @@
12050
12053
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
12051
12054
  return value.replace(regExp, "");
12052
12055
  }
12053
- const defaultProps$R = {
12056
+ const defaultProps$T = {
12054
12057
  ...ComponentDefaults,
12055
12058
  type: "text",
12056
12059
  name: "",
@@ -12090,7 +12093,7 @@
12090
12093
  const { locale } = useConfig();
12091
12094
  const {
12092
12095
  children,
12093
- type,
12096
+ type: type2,
12094
12097
  name,
12095
12098
  defaultValue,
12096
12099
  placeholder,
@@ -12101,7 +12104,7 @@
12101
12104
  colon,
12102
12105
  inputAlign,
12103
12106
  center,
12104
- required,
12107
+ required: required2,
12105
12108
  disabled,
12106
12109
  readonly,
12107
12110
  error,
@@ -12115,7 +12118,7 @@
12115
12118
  clearSize,
12116
12119
  border,
12117
12120
  formatTrigger,
12118
- rules,
12121
+ rules: rules2,
12119
12122
  errorMessage,
12120
12123
  errorMessageAlign,
12121
12124
  showWordLimit,
@@ -12147,7 +12150,7 @@
12147
12150
  iconFontClassName,
12148
12151
  ...rest
12149
12152
  } = {
12150
- ...defaultProps$R,
12153
+ ...defaultProps$T,
12151
12154
  ...props
12152
12155
  };
12153
12156
  locale.placeholder = placeholder || locale.placeholder;
@@ -12178,21 +12181,21 @@
12178
12181
  prefixCls,
12179
12182
  `${center ? "center" : ""}`,
12180
12183
  `${disabled ? `${prefixCls}-disabled` : ""}`,
12181
- `${required ? `${prefixCls}-required` : ""}`,
12184
+ `${required2 ? `${prefixCls}-required` : ""}`,
12182
12185
  `${error ? `${prefixCls}-error` : ""}`,
12183
12186
  `${border ? `${prefixCls}-border` : ""}`
12184
12187
  ].filter(Boolean).join(" ");
12185
- }, [disabled, required, error, border]);
12188
+ }, [disabled, required2, error, border]);
12186
12189
  const updateValue = (value, trigger = "onChange") => {
12187
12190
  var _a;
12188
12191
  let val = value;
12189
- if (type === "digit" || type === "tel") {
12192
+ if (type2 === "digit" || type2 === "tel") {
12190
12193
  val = formatNumber(val, false, false);
12191
12194
  }
12192
- if (type === "number") {
12195
+ if (type2 === "number") {
12193
12196
  val = formatNumber(val, true, true);
12194
12197
  }
12195
- if (type === "tel" && !formatter) {
12198
+ if (type2 === "tel" && !formatter) {
12196
12199
  const regTel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
12197
12200
  const regNumber = /[^-0-9]/g;
12198
12201
  val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
@@ -12246,14 +12249,14 @@
12246
12249
  };
12247
12250
  const resetValidation = () => {
12248
12251
  };
12249
- const inputType = (type2) => {
12250
- if (type2 === "number") {
12252
+ const inputType = (type22) => {
12253
+ if (type22 === "number") {
12251
12254
  return "text";
12252
12255
  }
12253
- if (type2 === "digit") {
12256
+ if (type22 === "digit") {
12254
12257
  return "tel";
12255
12258
  }
12256
- return type2;
12259
+ return type22;
12257
12260
  };
12258
12261
  const handleClear = (event) => {
12259
12262
  updateValue("");
@@ -12302,7 +12305,7 @@
12302
12305
  onClick: (e2) => {
12303
12306
  handleClickInput(e2);
12304
12307
  }
12305
- }, type === "textarea" ? /* @__PURE__ */ React__default["default"].createElement("textarea", {
12308
+ }, type2 === "textarea" ? /* @__PURE__ */ React__default["default"].createElement("textarea", {
12306
12309
  name,
12307
12310
  className: "input-text",
12308
12311
  ref: inputRef,
@@ -12330,7 +12333,7 @@
12330
12333
  className: "input-text",
12331
12334
  ref: inputRef,
12332
12335
  style: { textAlign: inputAlign },
12333
- type: inputType(type),
12336
+ type: inputType(type2),
12334
12337
  maxLength: maxlength,
12335
12338
  placeholder: placeholder || locale.placeholder,
12336
12339
  disabled,
@@ -12378,14 +12381,14 @@
12378
12381
  }
12379
12382
  }, errorMessage) : null)));
12380
12383
  });
12381
- Input.defaultProps = defaultProps$R;
12384
+ Input.defaultProps = defaultProps$T;
12382
12385
  Input.displayName = "NutInput";
12383
12386
  const radioContext = {
12384
12387
  onChange: (val) => {
12385
12388
  }
12386
12389
  };
12387
12390
  var RadioContext = React__default["default"].createContext(radioContext);
12388
- const defaultProps$Q = {
12391
+ const defaultProps$S = {
12389
12392
  value: null,
12390
12393
  textPosition: "right",
12391
12394
  onChange: (value) => {
@@ -12395,7 +12398,7 @@
12395
12398
  };
12396
12399
  const RadioGroup = React__default["default"].forwardRef(
12397
12400
  (props, ref) => {
12398
- const { children } = { ...defaultProps$Q, ...props };
12401
+ const { children } = { ...defaultProps$S, ...props };
12399
12402
  cn("RadioGroup");
12400
12403
  const {
12401
12404
  className,
@@ -12460,9 +12463,9 @@
12460
12463
  }, (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren()));
12461
12464
  }
12462
12465
  );
12463
- RadioGroup.defaultProps = defaultProps$Q;
12466
+ RadioGroup.defaultProps = defaultProps$S;
12464
12467
  RadioGroup.displayName = "NutRadioGroup";
12465
- const defaultProps$P = {
12468
+ const defaultProps$R = {
12466
12469
  ...ComponentDefaults,
12467
12470
  className: "",
12468
12471
  style: {},
@@ -12479,7 +12482,7 @@
12479
12482
  };
12480
12483
  const Radio = (props) => {
12481
12484
  const { children } = {
12482
- ...defaultProps$P,
12485
+ ...defaultProps$R,
12483
12486
  ...props
12484
12487
  };
12485
12488
  const {
@@ -12559,10 +12562,10 @@
12559
12562
  ...rest
12560
12563
  }, renderRadioItem());
12561
12564
  };
12562
- Radio.defaultProps = defaultProps$P;
12565
+ Radio.defaultProps = defaultProps$R;
12563
12566
  Radio.displayName = "NutRadio";
12564
12567
  Radio.RadioGroup = RadioGroup;
12565
- const defaultProps$O = {
12568
+ const defaultProps$Q = {
12566
12569
  ...ComponentDefaults,
12567
12570
  count: 5,
12568
12571
  modelValue: 0,
@@ -12597,7 +12600,7 @@
12597
12600
  iconClassPrefix,
12598
12601
  iconFontClassName
12599
12602
  } = {
12600
- ...defaultProps$O,
12603
+ ...defaultProps$Q,
12601
12604
  ...props
12602
12605
  };
12603
12606
  const b2 = cn("rate");
@@ -12670,9 +12673,9 @@
12670
12673
  }));
12671
12674
  }));
12672
12675
  };
12673
- Rate.defaultProps = defaultProps$O;
12676
+ Rate.defaultProps = defaultProps$Q;
12674
12677
  Rate.displayName = "NutRate";
12675
- const defaultProps$N = {
12678
+ const defaultProps$P = {
12676
12679
  ...ComponentDefaults,
12677
12680
  title: "",
12678
12681
  desc: "",
@@ -12723,11 +12726,11 @@
12723
12726
  } = props;
12724
12727
  const b2 = cn("shortpassword");
12725
12728
  const textInput = React.useRef(null);
12726
- const range = (val) => {
12729
+ const range2 = (val) => {
12727
12730
  return Math.min(Math.max(4, val), 6);
12728
12731
  };
12729
12732
  const [innerVisible, setInnerVisible] = React.useState(visible);
12730
- const [comLen, setComLen] = React.useState(range(Number(length)));
12733
+ const [comLen, setComLen] = React.useState(range2(Number(length)));
12731
12734
  const [inputValue, setInputValue] = React.useState("");
12732
12735
  React.useEffect(() => {
12733
12736
  setInnerVisible(visible);
@@ -12840,9 +12843,9 @@
12840
12843
  onClick: () => sure()
12841
12844
  }, locale.confirm)) : null)));
12842
12845
  };
12843
- ShortPassword.defaultProps = defaultProps$N;
12846
+ ShortPassword.defaultProps = defaultProps$P;
12844
12847
  ShortPassword.displayName = "NutShortPassword";
12845
- const defaultProps$M = {
12848
+ const defaultProps$O = {
12846
12849
  defaultValue: "",
12847
12850
  textAlign: "left",
12848
12851
  limitshow: false,
@@ -12870,18 +12873,16 @@
12870
12873
  onChange,
12871
12874
  onBlur,
12872
12875
  onFocus
12873
- } = { ...defaultProps$M, ...props };
12876
+ } = { ...defaultProps$O, ...props };
12874
12877
  const textareaBem = cn("textarea");
12875
12878
  const [inputValue, SetInputValue] = React.useState("");
12876
12879
  const textareaRef = React.useRef(null);
12877
12880
  React.useEffect(() => {
12878
- if (defaultValue) {
12879
- let initValue = defaultValue;
12880
- if (maxlength && initValue.length > Number(maxlength)) {
12881
- initValue = initValue.substring(0, Number(maxlength));
12882
- }
12883
- SetInputValue(initValue);
12881
+ let initValue = defaultValue;
12882
+ if (initValue && maxlength && [...initValue].length > Number(maxlength)) {
12883
+ initValue = initValue.substring(0, Number(maxlength));
12884
12884
  }
12885
+ SetInputValue(initValue);
12885
12886
  if (autosize) {
12886
12887
  setTimeout(() => {
12887
12888
  setContentHeight();
@@ -12916,7 +12917,7 @@
12916
12917
  };
12917
12918
  const textChange = (event) => {
12918
12919
  const text = event.target;
12919
- if (maxlength && text.value.length > Number(maxlength)) {
12920
+ if (maxlength && [...text.value].length > Number(maxlength)) {
12920
12921
  text.value = text.value.substring(0, Number(maxlength));
12921
12922
  }
12922
12923
  SetInputValue(text.value);
@@ -12967,11 +12968,11 @@
12967
12968
  placeholder: placeholder || locale.placeholder
12968
12969
  }), limitshow ? /* @__PURE__ */ React__default["default"].createElement("div", {
12969
12970
  className: textareaBem("limit")
12970
- }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
12971
+ }, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
12971
12972
  };
12972
- TextArea.defaultProps = defaultProps$M;
12973
+ TextArea.defaultProps = defaultProps$O;
12973
12974
  TextArea.displayName = "NutTextArea";
12974
- const defaultProps$L = {
12975
+ const defaultProps$N = {
12975
12976
  name: "",
12976
12977
  size: "",
12977
12978
  classPrefix: "nut-icon",
@@ -12999,11 +13000,11 @@
12999
13000
  onClick,
13000
13001
  ...rest
13001
13002
  } = {
13002
- ...defaultProps$L,
13003
+ ...defaultProps$N,
13003
13004
  ...props
13004
13005
  };
13005
13006
  const isImage = name ? name.indexOf("/") !== -1 : false;
13006
- const type = isImage ? "img" : tag;
13007
+ const type2 = isImage ? "img" : tag;
13007
13008
  const b2 = cn("icon");
13008
13009
  const handleClick2 = (e2) => {
13009
13010
  if (onClick) {
@@ -13016,7 +13017,7 @@
13016
13017
  return {};
13017
13018
  };
13018
13019
  return React__default["default"].createElement(
13019
- type,
13020
+ type2,
13020
13021
  {
13021
13022
  className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
13022
13023
  style: {
@@ -13033,9 +13034,9 @@
13033
13034
  children
13034
13035
  );
13035
13036
  }
13036
- Icon.defaultProps = defaultProps$L;
13037
+ Icon.defaultProps = defaultProps$N;
13037
13038
  Icon.displayName = "NutIcon";
13038
- const defaultProps$K = {
13039
+ const defaultProps$M = {
13039
13040
  ...ComponentDefaults,
13040
13041
  className: "",
13041
13042
  style: {},
@@ -13083,7 +13084,7 @@
13083
13084
  iconFontClassName,
13084
13085
  ...rest
13085
13086
  } = {
13086
- ...defaultProps$K,
13087
+ ...defaultProps$M,
13087
13088
  ...props
13088
13089
  };
13089
13090
  const b2 = cn("progress");
@@ -13161,7 +13162,7 @@
13161
13162
  color: iconColor
13162
13163
  })));
13163
13164
  };
13164
- Progress.defaultProps = defaultProps$K;
13165
+ Progress.defaultProps = defaultProps$M;
13165
13166
  Progress.displayName = "NutProgress";
13166
13167
  class UploadOptions {
13167
13168
  constructor() {
@@ -13259,7 +13260,7 @@
13259
13260
  }
13260
13261
  }
13261
13262
  }
13262
- const defaultProps$J = {
13263
+ const defaultProps$L = {
13263
13264
  ...ComponentDefaults,
13264
13265
  url: "",
13265
13266
  maximum: 1,
@@ -13312,7 +13313,7 @@
13312
13313
  defaultImg,
13313
13314
  headers,
13314
13315
  timeout,
13315
- method,
13316
+ method: method2,
13316
13317
  xhrState,
13317
13318
  withCredentials,
13318
13319
  data,
@@ -13339,7 +13340,7 @@
13339
13340
  onBeforeXhrUpload,
13340
13341
  onBeforeDelete,
13341
13342
  ...restProps
13342
- } = { ...defaultProps$J, ...props };
13343
+ } = { ...defaultProps$L, ...props };
13343
13344
  const [fileList, setFileList] = React.useState([]);
13344
13345
  const [uploadQueue, setUploadQueue] = React.useState([]);
13345
13346
  React.useEffect(() => {
@@ -13375,7 +13376,7 @@
13375
13376
  }
13376
13377
  uploadOption.formData = fileItem.formData;
13377
13378
  uploadOption.timeout = timeout * 1;
13378
- uploadOption.method = method;
13379
+ uploadOption.method = method2;
13379
13380
  uploadOption.xhrState = xhrState;
13380
13381
  uploadOption.headers = headers;
13381
13382
  uploadOption.withCredentials = withCredentials;
@@ -13660,9 +13661,9 @@
13660
13661
  })));
13661
13662
  };
13662
13663
  const Uploader = React__default["default"].forwardRef(InternalUploader);
13663
- Uploader.defaultProps = defaultProps$J;
13664
+ Uploader.defaultProps = defaultProps$L;
13664
13665
  Uploader.displayName = "NutUploader";
13665
- const defaultProps$I = {
13666
+ const defaultProps$K = {
13666
13667
  data: {
13667
13668
  text: "",
13668
13669
  value: "",
@@ -13677,7 +13678,7 @@
13677
13678
  };
13678
13679
  const InternalCascaderItem = (props) => {
13679
13680
  const { data, checked, chooseItem } = {
13680
- ...defaultProps$I,
13681
+ ...defaultProps$K,
13681
13682
  ...props
13682
13683
  };
13683
13684
  const b2 = cn("cascader-item");
@@ -13713,7 +13714,7 @@
13713
13714
  }));
13714
13715
  };
13715
13716
  const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
13716
- CascaderItem.defaultProps = defaultProps$I;
13717
+ CascaderItem.defaultProps = defaultProps$K;
13717
13718
  CascaderItem.displayName = "NutCascaderItem";
13718
13719
  const formatTree = (tree, parent, config2) => tree.map((node) => {
13719
13720
  const {
@@ -13847,7 +13848,7 @@
13847
13848
  return pathNodes;
13848
13849
  }
13849
13850
  }
13850
- const defaultProps$H = {
13851
+ const defaultProps$J = {
13851
13852
  className: "",
13852
13853
  style: {},
13853
13854
  poppable: true,
@@ -13894,7 +13895,7 @@
13894
13895
  onClose,
13895
13896
  onChange,
13896
13897
  onPathChange
13897
- } = { ...defaultProps$H, ...props };
13898
+ } = { ...defaultProps$J, ...props };
13898
13899
  const [tabvalue, setTabvalue] = React.useState("c1");
13899
13900
  const [optiosData, setOptiosData] = React.useState([]);
13900
13901
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -14049,15 +14050,15 @@
14049
14050
  const closePopup = () => {
14050
14051
  close();
14051
14052
  };
14052
- const chooseItem = async (node, type) => {
14053
- if (!type && node.disabled || !state.panes[state.tabsCursor]) {
14053
+ const chooseItem = async (node, type2) => {
14054
+ if (!type2 && node.disabled || !state.panes[state.tabsCursor]) {
14054
14055
  return;
14055
14056
  }
14056
14057
  if (state.tree.isLeaf(node, isLazy())) {
14057
14058
  node.leaf = true;
14058
14059
  state.panes[state.tabsCursor].selectedNode = node;
14059
14060
  state.panes = state.panes.slice(0, node.level + 1);
14060
- if (!type) {
14061
+ if (!type2) {
14061
14062
  const pathNodes = state.panes.map((item) => item.selectedNode);
14062
14063
  const optionParams = pathNodes.map((item) => item.value);
14063
14064
  onChange(optionParams, pathNodes);
@@ -14079,7 +14080,7 @@
14079
14080
  });
14080
14081
  setTabvalue(`c${state.tabsCursor + 1}`);
14081
14082
  setOptiosData(state.panes);
14082
- if (!type) {
14083
+ if (!type2) {
14083
14084
  const pathNodes = state.panes.map((item) => item.selectedNode);
14084
14085
  const optionParams = pathNodes.map((item) => item == null ? void 0 : item.value);
14085
14086
  onPathChange(optionParams, pathNodes);
@@ -14093,7 +14094,7 @@
14093
14094
  await invokeLazyLoad(node);
14094
14095
  if (state.currentProcessNode === node) {
14095
14096
  state.panes[state.tabsCursor].selectedNode = node;
14096
- chooseItem(node, type);
14097
+ chooseItem(node, type2);
14097
14098
  }
14098
14099
  setOptiosData(state.panes);
14099
14100
  };
@@ -14153,9 +14154,9 @@
14153
14154
  }, renderItem()) : renderItem());
14154
14155
  };
14155
14156
  const Cascader = React__default["default"].forwardRef(InternalCascader);
14156
- Cascader.defaultProps = defaultProps$H;
14157
+ Cascader.defaultProps = defaultProps$J;
14157
14158
  Cascader.displayName = "NutCascader";
14158
- const defaultProps$G = {
14159
+ const defaultProps$I = {
14159
14160
  ...ComponentDefaults,
14160
14161
  placeholder: "",
14161
14162
  shape: "square",
@@ -14206,7 +14207,7 @@
14206
14207
  iconClassPrefix,
14207
14208
  iconFontClassName
14208
14209
  } = {
14209
- ...defaultProps$G,
14210
+ ...defaultProps$I,
14210
14211
  ...props
14211
14212
  };
14212
14213
  const alignClass = `${align}`;
@@ -14355,9 +14356,9 @@
14355
14356
  className: `${searchbarBem("content")}`
14356
14357
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
14357
14358
  };
14358
- SearchBar.defaultProps = defaultProps$G;
14359
+ SearchBar.defaultProps = defaultProps$I;
14359
14360
  SearchBar.displayName = "NutSearchBar";
14360
- const defaultProps$F = {
14361
+ const defaultProps$H = {
14361
14362
  confirmText: "",
14362
14363
  title: "",
14363
14364
  visible: false,
@@ -14375,7 +14376,7 @@
14375
14376
  title,
14376
14377
  confirmText,
14377
14378
  visible,
14378
- type,
14379
+ type: type2,
14379
14380
  customKey,
14380
14381
  randomKeys,
14381
14382
  popClass,
@@ -14498,7 +14499,7 @@
14498
14499
  className: b2("header")
14499
14500
  }, /* @__PURE__ */ React__default["default"].createElement("h3", {
14500
14501
  className: b2("header__tit")
14501
- }, title), type === "default" ? /* @__PURE__ */ React__default["default"].createElement("span", {
14502
+ }, title), type2 === "default" ? /* @__PURE__ */ React__default["default"].createElement("span", {
14502
14503
  className: b2("header__close"),
14503
14504
  onClick: onClose
14504
14505
  }, locale.done) : null) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -14510,7 +14511,7 @@
14510
14511
  key: index,
14511
14512
  className: classNames({
14512
14513
  "key-board-wrapper": true,
14513
- "key-board-wrapper-large": item.id === 0 && type === "rightColumn" && Array.isArray(customKey) && customKey.length === 1
14514
+ "key-board-wrapper-large": item.id === 0 && type2 === "rightColumn" && Array.isArray(customKey) && customKey.length === 1
14514
14515
  })
14515
14516
  }, /* @__PURE__ */ React__default["default"].createElement("div", {
14516
14517
  className: classNames({
@@ -14529,7 +14530,7 @@
14529
14530
  src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png",
14530
14531
  alt: ""
14531
14532
  }) : null));
14532
- })), type === "rightColumn" ? /* @__PURE__ */ React__default["default"].createElement("div", {
14533
+ })), type2 === "rightColumn" ? /* @__PURE__ */ React__default["default"].createElement("div", {
14533
14534
  className: b2("sidebar")
14534
14535
  }, /* @__PURE__ */ React__default["default"].createElement("div", {
14535
14536
  className: "key-board-wrapper"
@@ -14555,65 +14556,1369 @@
14555
14556
  })
14556
14557
  }, confirmText || locale.done))) : null))));
14557
14558
  };
14558
- NumberKeyboard.defaultProps = defaultProps$F;
14559
+ NumberKeyboard.defaultProps = defaultProps$H;
14559
14560
  NumberKeyboard.displayName = "NutNumberKeyboard";
14560
- const defaultProps$E = {
14561
- cancelTxt: "",
14562
- optionTag: "name",
14563
- optionSubTag: "subname",
14564
- chooseTagValue: "",
14565
- title: "",
14566
- color: "#ee0a24",
14567
- description: "",
14568
- menuItems: [],
14569
- onCancel: () => {
14570
- },
14571
- onChoose: () => {
14572
- },
14573
- visible: false,
14574
- className: "",
14575
- style: {}
14576
- };
14577
- const ActionSheet = (props) => {
14578
- const {
14579
- children,
14580
- cancelTxt,
14581
- optionTag,
14582
- optionSubTag,
14583
- chooseTagValue,
14584
- title,
14585
- color,
14586
- description,
14587
- menuItems,
14588
- onCancel,
14589
- onChoose,
14590
- visible,
14591
- className,
14592
- style,
14593
- ...rest
14594
- } = { ...defaultProps$E, ...props };
14595
- const b2 = cn("actionsheet");
14596
- const isHighlight = (item) => {
14597
- return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
14561
+ const FormItemContext = React.createContext({});
14562
+ function _extends() {
14563
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
14564
+ for (var i = 1; i < arguments.length; i++) {
14565
+ var source = arguments[i];
14566
+ for (var key in source) {
14567
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
14568
+ target[key] = source[key];
14569
+ }
14570
+ }
14571
+ }
14572
+ return target;
14598
14573
  };
14599
- const cancelActionSheet = () => {
14600
- onCancel && onCancel();
14574
+ return _extends.apply(this, arguments);
14575
+ }
14576
+ function _inheritsLoose(subClass, superClass) {
14577
+ subClass.prototype = Object.create(superClass.prototype);
14578
+ subClass.prototype.constructor = subClass;
14579
+ _setPrototypeOf(subClass, superClass);
14580
+ }
14581
+ function _getPrototypeOf(o) {
14582
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
14583
+ return o2.__proto__ || Object.getPrototypeOf(o2);
14601
14584
  };
14602
- const chooseItem = (item, index) => {
14603
- if (!item.disable) {
14604
- onChoose && onChoose(item, index);
14585
+ return _getPrototypeOf(o);
14586
+ }
14587
+ function _setPrototypeOf(o, p2) {
14588
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
14589
+ o2.__proto__ = p3;
14590
+ return o2;
14591
+ };
14592
+ return _setPrototypeOf(o, p2);
14593
+ }
14594
+ function _isNativeReflectConstruct() {
14595
+ if (typeof Reflect === "undefined" || !Reflect.construct)
14596
+ return false;
14597
+ if (Reflect.construct.sham)
14598
+ return false;
14599
+ if (typeof Proxy === "function")
14600
+ return true;
14601
+ try {
14602
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14603
+ }));
14604
+ return true;
14605
+ } catch (e2) {
14606
+ return false;
14607
+ }
14608
+ }
14609
+ function _construct(Parent, args, Class) {
14610
+ if (_isNativeReflectConstruct()) {
14611
+ _construct = Reflect.construct.bind();
14612
+ } else {
14613
+ _construct = function _construct2(Parent2, args2, Class2) {
14614
+ var a = [null];
14615
+ a.push.apply(a, args2);
14616
+ var Constructor = Function.bind.apply(Parent2, a);
14617
+ var instance = new Constructor();
14618
+ if (Class2)
14619
+ _setPrototypeOf(instance, Class2.prototype);
14620
+ return instance;
14621
+ };
14622
+ }
14623
+ return _construct.apply(null, arguments);
14624
+ }
14625
+ function _isNativeFunction(fn) {
14626
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
14627
+ }
14628
+ function _wrapNativeSuper(Class) {
14629
+ var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
14630
+ _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
14631
+ if (Class2 === null || !_isNativeFunction(Class2))
14632
+ return Class2;
14633
+ if (typeof Class2 !== "function") {
14634
+ throw new TypeError("Super expression must either be null or a function");
14635
+ }
14636
+ if (typeof _cache !== "undefined") {
14637
+ if (_cache.has(Class2))
14638
+ return _cache.get(Class2);
14639
+ _cache.set(Class2, Wrapper);
14605
14640
  }
14641
+ function Wrapper() {
14642
+ return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
14643
+ }
14644
+ Wrapper.prototype = Object.create(Class2.prototype, {
14645
+ constructor: {
14646
+ value: Wrapper,
14647
+ enumerable: false,
14648
+ writable: true,
14649
+ configurable: true
14650
+ }
14651
+ });
14652
+ return _setPrototypeOf(Wrapper, Class2);
14606
14653
  };
14607
- return /* @__PURE__ */ React__default["default"].createElement(Popup, {
14608
- round: true,
14609
- visible,
14610
- position: "bottom",
14611
- onClose: () => {
14612
- onCancel && onCancel();
14654
+ return _wrapNativeSuper(Class);
14655
+ }
14656
+ var formatRegExp = /%[sdj%]/g;
14657
+ var warning = function warning2() {
14658
+ };
14659
+ if (typeof process !== "undefined" && process.env && false) {
14660
+ warning = function warning2(type2, errors) {
14661
+ if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
14662
+ if (errors.every(function(e2) {
14663
+ return typeof e2 === "string";
14664
+ })) {
14665
+ console.warn(type2, errors);
14666
+ }
14613
14667
  }
14614
- }, /* @__PURE__ */ React__default["default"].createElement("div", {
14615
- className: `${b2()} ${className}`,
14616
- style,
14668
+ };
14669
+ }
14670
+ function convertFieldsError(errors) {
14671
+ if (!errors || !errors.length)
14672
+ return null;
14673
+ var fields = {};
14674
+ errors.forEach(function(error) {
14675
+ var field = error.field;
14676
+ fields[field] = fields[field] || [];
14677
+ fields[field].push(error);
14678
+ });
14679
+ return fields;
14680
+ }
14681
+ function format(template) {
14682
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14683
+ args[_key - 1] = arguments[_key];
14684
+ }
14685
+ var i = 0;
14686
+ var len = args.length;
14687
+ if (typeof template === "function") {
14688
+ return template.apply(null, args);
14689
+ }
14690
+ if (typeof template === "string") {
14691
+ var str = template.replace(formatRegExp, function(x2) {
14692
+ if (x2 === "%%") {
14693
+ return "%";
14694
+ }
14695
+ if (i >= len) {
14696
+ return x2;
14697
+ }
14698
+ switch (x2) {
14699
+ case "%s":
14700
+ return String(args[i++]);
14701
+ case "%d":
14702
+ return Number(args[i++]);
14703
+ case "%j":
14704
+ try {
14705
+ return JSON.stringify(args[i++]);
14706
+ } catch (_) {
14707
+ return "[Circular]";
14708
+ }
14709
+ break;
14710
+ default:
14711
+ return x2;
14712
+ }
14713
+ });
14714
+ return str;
14715
+ }
14716
+ return template;
14717
+ }
14718
+ function isNativeStringType(type2) {
14719
+ return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "date" || type2 === "pattern";
14720
+ }
14721
+ function isEmptyValue(value, type2) {
14722
+ if (value === void 0 || value === null) {
14723
+ return true;
14724
+ }
14725
+ if (type2 === "array" && Array.isArray(value) && !value.length) {
14726
+ return true;
14727
+ }
14728
+ if (isNativeStringType(type2) && typeof value === "string" && !value) {
14729
+ return true;
14730
+ }
14731
+ return false;
14732
+ }
14733
+ function asyncParallelArray(arr, func, callback) {
14734
+ var results = [];
14735
+ var total = 0;
14736
+ var arrLength = arr.length;
14737
+ function count(errors) {
14738
+ results.push.apply(results, errors || []);
14739
+ total++;
14740
+ if (total === arrLength) {
14741
+ callback(results);
14742
+ }
14743
+ }
14744
+ arr.forEach(function(a) {
14745
+ func(a, count);
14746
+ });
14747
+ }
14748
+ function asyncSerialArray(arr, func, callback) {
14749
+ var index = 0;
14750
+ var arrLength = arr.length;
14751
+ function next(errors) {
14752
+ if (errors && errors.length) {
14753
+ callback(errors);
14754
+ return;
14755
+ }
14756
+ var original = index;
14757
+ index = index + 1;
14758
+ if (original < arrLength) {
14759
+ func(arr[original], next);
14760
+ } else {
14761
+ callback([]);
14762
+ }
14763
+ }
14764
+ next([]);
14765
+ }
14766
+ function flattenObjArr(objArr) {
14767
+ var ret = [];
14768
+ Object.keys(objArr).forEach(function(k2) {
14769
+ ret.push.apply(ret, objArr[k2] || []);
14770
+ });
14771
+ return ret;
14772
+ }
14773
+ var AsyncValidationError = /* @__PURE__ */ function(_Error) {
14774
+ _inheritsLoose(AsyncValidationError2, _Error);
14775
+ function AsyncValidationError2(errors, fields) {
14776
+ var _this;
14777
+ _this = _Error.call(this, "Async Validation Error") || this;
14778
+ _this.errors = errors;
14779
+ _this.fields = fields;
14780
+ return _this;
14781
+ }
14782
+ return AsyncValidationError2;
14783
+ }(/* @__PURE__ */ _wrapNativeSuper(Error));
14784
+ function asyncMap(objArr, option, func, callback, source) {
14785
+ if (option.first) {
14786
+ var _pending = new Promise(function(resolve, reject) {
14787
+ var next = function next2(errors) {
14788
+ callback(errors);
14789
+ return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
14790
+ };
14791
+ var flattenArr = flattenObjArr(objArr);
14792
+ asyncSerialArray(flattenArr, func, next);
14793
+ });
14794
+ _pending["catch"](function(e2) {
14795
+ return e2;
14796
+ });
14797
+ return _pending;
14798
+ }
14799
+ var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
14800
+ var objArrKeys = Object.keys(objArr);
14801
+ var objArrLength = objArrKeys.length;
14802
+ var total = 0;
14803
+ var results = [];
14804
+ var pending = new Promise(function(resolve, reject) {
14805
+ var next = function next2(errors) {
14806
+ results.push.apply(results, errors);
14807
+ total++;
14808
+ if (total === objArrLength) {
14809
+ callback(results);
14810
+ return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
14811
+ }
14812
+ };
14813
+ if (!objArrKeys.length) {
14814
+ callback(results);
14815
+ resolve(source);
14816
+ }
14817
+ objArrKeys.forEach(function(key) {
14818
+ var arr = objArr[key];
14819
+ if (firstFields.indexOf(key) !== -1) {
14820
+ asyncSerialArray(arr, func, next);
14821
+ } else {
14822
+ asyncParallelArray(arr, func, next);
14823
+ }
14824
+ });
14825
+ });
14826
+ pending["catch"](function(e2) {
14827
+ return e2;
14828
+ });
14829
+ return pending;
14830
+ }
14831
+ function isErrorObj(obj) {
14832
+ return !!(obj && obj.message !== void 0);
14833
+ }
14834
+ function getValue(value, path) {
14835
+ var v2 = value;
14836
+ for (var i = 0; i < path.length; i++) {
14837
+ if (v2 == void 0) {
14838
+ return v2;
14839
+ }
14840
+ v2 = v2[path[i]];
14841
+ }
14842
+ return v2;
14843
+ }
14844
+ function complementError(rule, source) {
14845
+ return function(oe) {
14846
+ var fieldValue;
14847
+ if (rule.fullFields) {
14848
+ fieldValue = getValue(source, rule.fullFields);
14849
+ } else {
14850
+ fieldValue = source[oe.field || rule.fullField];
14851
+ }
14852
+ if (isErrorObj(oe)) {
14853
+ oe.field = oe.field || rule.fullField;
14854
+ oe.fieldValue = fieldValue;
14855
+ return oe;
14856
+ }
14857
+ return {
14858
+ message: typeof oe === "function" ? oe() : oe,
14859
+ fieldValue,
14860
+ field: oe.field || rule.fullField
14861
+ };
14862
+ };
14863
+ }
14864
+ function deepMerge(target, source) {
14865
+ if (source) {
14866
+ for (var s in source) {
14867
+ if (source.hasOwnProperty(s)) {
14868
+ var value = source[s];
14869
+ if (typeof value === "object" && typeof target[s] === "object") {
14870
+ target[s] = _extends({}, target[s], value);
14871
+ } else {
14872
+ target[s] = value;
14873
+ }
14874
+ }
14875
+ }
14876
+ }
14877
+ return target;
14878
+ }
14879
+ var required$1 = function required2(rule, value, source, errors, options2, type2) {
14880
+ if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type2 || rule.type))) {
14881
+ errors.push(format(options2.messages.required, rule.fullField));
14882
+ }
14883
+ };
14884
+ var whitespace = function whitespace2(rule, value, source, errors, options2) {
14885
+ if (/^\s+$/.test(value) || value === "") {
14886
+ errors.push(format(options2.messages.whitespace, rule.fullField));
14887
+ }
14888
+ };
14889
+ var urlReg;
14890
+ var getUrlRegex = function() {
14891
+ if (urlReg) {
14892
+ return urlReg;
14893
+ }
14894
+ var word = "[a-fA-F\\d:]";
14895
+ var b2 = function b3(options2) {
14896
+ return options2 && options2.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
14897
+ };
14898
+ var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
14899
+ var v6seg = "[a-fA-F\\d]{1,4}";
14900
+ var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
14901
+ var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
14902
+ var v4exact = new RegExp("^" + v4 + "$");
14903
+ var v6exact = new RegExp("^" + v6 + "$");
14904
+ var ip = function ip2(options2) {
14905
+ return options2 && options2.exact ? v46Exact : new RegExp("(?:" + b2(options2) + v4 + b2(options2) + ")|(?:" + b2(options2) + v6 + b2(options2) + ")", "g");
14906
+ };
14907
+ ip.v4 = function(options2) {
14908
+ return options2 && options2.exact ? v4exact : new RegExp("" + b2(options2) + v4 + b2(options2), "g");
14909
+ };
14910
+ ip.v6 = function(options2) {
14911
+ return options2 && options2.exact ? v6exact : new RegExp("" + b2(options2) + v6 + b2(options2), "g");
14912
+ };
14913
+ var protocol = "(?:(?:[a-z]+:)?//)";
14914
+ var auth = "(?:\\S+(?::\\S*)?@)?";
14915
+ var ipv4 = ip.v4().source;
14916
+ var ipv6 = ip.v6().source;
14917
+ var host2 = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
14918
+ var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
14919
+ var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
14920
+ var port = "(?::\\d{2,5})?";
14921
+ var path = '(?:[/?#][^\\s"]*)?';
14922
+ var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host2 + domain + tld + ")" + port + path;
14923
+ urlReg = new RegExp("(?:^" + regex + "$)", "i");
14924
+ return urlReg;
14925
+ };
14926
+ var pattern$2 = {
14927
+ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
14928
+ hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
14929
+ };
14930
+ var types = {
14931
+ integer: function integer2(value) {
14932
+ return types.number(value) && parseInt(value, 10) === value;
14933
+ },
14934
+ "float": function float(value) {
14935
+ return types.number(value) && !types.integer(value);
14936
+ },
14937
+ array: function array2(value) {
14938
+ return Array.isArray(value);
14939
+ },
14940
+ regexp: function regexp2(value) {
14941
+ if (value instanceof RegExp) {
14942
+ return true;
14943
+ }
14944
+ try {
14945
+ return !!new RegExp(value);
14946
+ } catch (e2) {
14947
+ return false;
14948
+ }
14949
+ },
14950
+ date: function date2(value) {
14951
+ return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
14952
+ },
14953
+ number: function number2(value) {
14954
+ if (isNaN(value)) {
14955
+ return false;
14956
+ }
14957
+ return typeof value === "number";
14958
+ },
14959
+ object: function object2(value) {
14960
+ return typeof value === "object" && !types.array(value);
14961
+ },
14962
+ method: function method2(value) {
14963
+ return typeof value === "function";
14964
+ },
14965
+ email: function email(value) {
14966
+ return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
14967
+ },
14968
+ url: function url(value) {
14969
+ return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
14970
+ },
14971
+ hex: function hex(value) {
14972
+ return typeof value === "string" && !!value.match(pattern$2.hex);
14973
+ }
14974
+ };
14975
+ var type$1 = function type2(rule, value, source, errors, options2) {
14976
+ if (rule.required && value === void 0) {
14977
+ required$1(rule, value, source, errors, options2);
14978
+ return;
14979
+ }
14980
+ var custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
14981
+ var ruleType = rule.type;
14982
+ if (custom.indexOf(ruleType) > -1) {
14983
+ if (!types[ruleType](value)) {
14984
+ errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type));
14985
+ }
14986
+ } else if (ruleType && typeof value !== rule.type) {
14987
+ errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type));
14988
+ }
14989
+ };
14990
+ var range = function range2(rule, value, source, errors, options2) {
14991
+ var len = typeof rule.len === "number";
14992
+ var min = typeof rule.min === "number";
14993
+ var max = typeof rule.max === "number";
14994
+ var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
14995
+ var val = value;
14996
+ var key = null;
14997
+ var num = typeof value === "number";
14998
+ var str = typeof value === "string";
14999
+ var arr = Array.isArray(value);
15000
+ if (num) {
15001
+ key = "number";
15002
+ } else if (str) {
15003
+ key = "string";
15004
+ } else if (arr) {
15005
+ key = "array";
15006
+ }
15007
+ if (!key) {
15008
+ return false;
15009
+ }
15010
+ if (arr) {
15011
+ val = value.length;
15012
+ }
15013
+ if (str) {
15014
+ val = value.replace(spRegexp, "_").length;
15015
+ }
15016
+ if (len) {
15017
+ if (val !== rule.len) {
15018
+ errors.push(format(options2.messages[key].len, rule.fullField, rule.len));
15019
+ }
15020
+ } else if (min && !max && val < rule.min) {
15021
+ errors.push(format(options2.messages[key].min, rule.fullField, rule.min));
15022
+ } else if (max && !min && val > rule.max) {
15023
+ errors.push(format(options2.messages[key].max, rule.fullField, rule.max));
15024
+ } else if (min && max && (val < rule.min || val > rule.max)) {
15025
+ errors.push(format(options2.messages[key].range, rule.fullField, rule.min, rule.max));
15026
+ }
15027
+ };
15028
+ var ENUM$1 = "enum";
15029
+ var enumerable$1 = function enumerable2(rule, value, source, errors, options2) {
15030
+ rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
15031
+ if (rule[ENUM$1].indexOf(value) === -1) {
15032
+ errors.push(format(options2.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
15033
+ }
15034
+ };
15035
+ var pattern$1 = function pattern2(rule, value, source, errors, options2) {
15036
+ if (rule.pattern) {
15037
+ if (rule.pattern instanceof RegExp) {
15038
+ rule.pattern.lastIndex = 0;
15039
+ if (!rule.pattern.test(value)) {
15040
+ errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
15041
+ }
15042
+ } else if (typeof rule.pattern === "string") {
15043
+ var _pattern = new RegExp(rule.pattern);
15044
+ if (!_pattern.test(value)) {
15045
+ errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
15046
+ }
15047
+ }
15048
+ }
15049
+ };
15050
+ var rules = {
15051
+ required: required$1,
15052
+ whitespace,
15053
+ type: type$1,
15054
+ range,
15055
+ "enum": enumerable$1,
15056
+ pattern: pattern$1
15057
+ };
15058
+ var string = function string2(rule, value, callback, source, options2) {
15059
+ var errors = [];
15060
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15061
+ if (validate) {
15062
+ if (isEmptyValue(value, "string") && !rule.required) {
15063
+ return callback();
15064
+ }
15065
+ rules.required(rule, value, source, errors, options2, "string");
15066
+ if (!isEmptyValue(value, "string")) {
15067
+ rules.type(rule, value, source, errors, options2);
15068
+ rules.range(rule, value, source, errors, options2);
15069
+ rules.pattern(rule, value, source, errors, options2);
15070
+ if (rule.whitespace === true) {
15071
+ rules.whitespace(rule, value, source, errors, options2);
15072
+ }
15073
+ }
15074
+ }
15075
+ callback(errors);
15076
+ };
15077
+ var method = function method2(rule, value, callback, source, options2) {
15078
+ var errors = [];
15079
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15080
+ if (validate) {
15081
+ if (isEmptyValue(value) && !rule.required) {
15082
+ return callback();
15083
+ }
15084
+ rules.required(rule, value, source, errors, options2);
15085
+ if (value !== void 0) {
15086
+ rules.type(rule, value, source, errors, options2);
15087
+ }
15088
+ }
15089
+ callback(errors);
15090
+ };
15091
+ var number = function number2(rule, value, callback, source, options2) {
15092
+ var errors = [];
15093
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15094
+ if (validate) {
15095
+ if (value === "") {
15096
+ value = void 0;
15097
+ }
15098
+ if (isEmptyValue(value) && !rule.required) {
15099
+ return callback();
15100
+ }
15101
+ rules.required(rule, value, source, errors, options2);
15102
+ if (value !== void 0) {
15103
+ rules.type(rule, value, source, errors, options2);
15104
+ rules.range(rule, value, source, errors, options2);
15105
+ }
15106
+ }
15107
+ callback(errors);
15108
+ };
15109
+ var _boolean = function _boolean2(rule, value, callback, source, options2) {
15110
+ var errors = [];
15111
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15112
+ if (validate) {
15113
+ if (isEmptyValue(value) && !rule.required) {
15114
+ return callback();
15115
+ }
15116
+ rules.required(rule, value, source, errors, options2);
15117
+ if (value !== void 0) {
15118
+ rules.type(rule, value, source, errors, options2);
15119
+ }
15120
+ }
15121
+ callback(errors);
15122
+ };
15123
+ var regexp = function regexp2(rule, value, callback, source, options2) {
15124
+ var errors = [];
15125
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15126
+ if (validate) {
15127
+ if (isEmptyValue(value) && !rule.required) {
15128
+ return callback();
15129
+ }
15130
+ rules.required(rule, value, source, errors, options2);
15131
+ if (!isEmptyValue(value)) {
15132
+ rules.type(rule, value, source, errors, options2);
15133
+ }
15134
+ }
15135
+ callback(errors);
15136
+ };
15137
+ var integer = function integer2(rule, value, callback, source, options2) {
15138
+ var errors = [];
15139
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15140
+ if (validate) {
15141
+ if (isEmptyValue(value) && !rule.required) {
15142
+ return callback();
15143
+ }
15144
+ rules.required(rule, value, source, errors, options2);
15145
+ if (value !== void 0) {
15146
+ rules.type(rule, value, source, errors, options2);
15147
+ rules.range(rule, value, source, errors, options2);
15148
+ }
15149
+ }
15150
+ callback(errors);
15151
+ };
15152
+ var floatFn = function floatFn2(rule, value, callback, source, options2) {
15153
+ var errors = [];
15154
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15155
+ if (validate) {
15156
+ if (isEmptyValue(value) && !rule.required) {
15157
+ return callback();
15158
+ }
15159
+ rules.required(rule, value, source, errors, options2);
15160
+ if (value !== void 0) {
15161
+ rules.type(rule, value, source, errors, options2);
15162
+ rules.range(rule, value, source, errors, options2);
15163
+ }
15164
+ }
15165
+ callback(errors);
15166
+ };
15167
+ var array = function array2(rule, value, callback, source, options2) {
15168
+ var errors = [];
15169
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15170
+ if (validate) {
15171
+ if ((value === void 0 || value === null) && !rule.required) {
15172
+ return callback();
15173
+ }
15174
+ rules.required(rule, value, source, errors, options2, "array");
15175
+ if (value !== void 0 && value !== null) {
15176
+ rules.type(rule, value, source, errors, options2);
15177
+ rules.range(rule, value, source, errors, options2);
15178
+ }
15179
+ }
15180
+ callback(errors);
15181
+ };
15182
+ var object = function object2(rule, value, callback, source, options2) {
15183
+ var errors = [];
15184
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15185
+ if (validate) {
15186
+ if (isEmptyValue(value) && !rule.required) {
15187
+ return callback();
15188
+ }
15189
+ rules.required(rule, value, source, errors, options2);
15190
+ if (value !== void 0) {
15191
+ rules.type(rule, value, source, errors, options2);
15192
+ }
15193
+ }
15194
+ callback(errors);
15195
+ };
15196
+ var ENUM = "enum";
15197
+ var enumerable = function enumerable2(rule, value, callback, source, options2) {
15198
+ var errors = [];
15199
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15200
+ if (validate) {
15201
+ if (isEmptyValue(value) && !rule.required) {
15202
+ return callback();
15203
+ }
15204
+ rules.required(rule, value, source, errors, options2);
15205
+ if (value !== void 0) {
15206
+ rules[ENUM](rule, value, source, errors, options2);
15207
+ }
15208
+ }
15209
+ callback(errors);
15210
+ };
15211
+ var pattern = function pattern2(rule, value, callback, source, options2) {
15212
+ var errors = [];
15213
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15214
+ if (validate) {
15215
+ if (isEmptyValue(value, "string") && !rule.required) {
15216
+ return callback();
15217
+ }
15218
+ rules.required(rule, value, source, errors, options2);
15219
+ if (!isEmptyValue(value, "string")) {
15220
+ rules.pattern(rule, value, source, errors, options2);
15221
+ }
15222
+ }
15223
+ callback(errors);
15224
+ };
15225
+ var date = function date2(rule, value, callback, source, options2) {
15226
+ var errors = [];
15227
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15228
+ if (validate) {
15229
+ if (isEmptyValue(value, "date") && !rule.required) {
15230
+ return callback();
15231
+ }
15232
+ rules.required(rule, value, source, errors, options2);
15233
+ if (!isEmptyValue(value, "date")) {
15234
+ var dateObject;
15235
+ if (value instanceof Date) {
15236
+ dateObject = value;
15237
+ } else {
15238
+ dateObject = new Date(value);
15239
+ }
15240
+ rules.type(rule, dateObject, source, errors, options2);
15241
+ if (dateObject) {
15242
+ rules.range(rule, dateObject.getTime(), source, errors, options2);
15243
+ }
15244
+ }
15245
+ }
15246
+ callback(errors);
15247
+ };
15248
+ var required = function required2(rule, value, callback, source, options2) {
15249
+ var errors = [];
15250
+ var type2 = Array.isArray(value) ? "array" : typeof value;
15251
+ rules.required(rule, value, source, errors, options2, type2);
15252
+ callback(errors);
15253
+ };
15254
+ var type = function type2(rule, value, callback, source, options2) {
15255
+ var ruleType = rule.type;
15256
+ var errors = [];
15257
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15258
+ if (validate) {
15259
+ if (isEmptyValue(value, ruleType) && !rule.required) {
15260
+ return callback();
15261
+ }
15262
+ rules.required(rule, value, source, errors, options2, ruleType);
15263
+ if (!isEmptyValue(value, ruleType)) {
15264
+ rules.type(rule, value, source, errors, options2);
15265
+ }
15266
+ }
15267
+ callback(errors);
15268
+ };
15269
+ var any = function any2(rule, value, callback, source, options2) {
15270
+ var errors = [];
15271
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
15272
+ if (validate) {
15273
+ if (isEmptyValue(value) && !rule.required) {
15274
+ return callback();
15275
+ }
15276
+ rules.required(rule, value, source, errors, options2);
15277
+ }
15278
+ callback(errors);
15279
+ };
15280
+ var validators = {
15281
+ string,
15282
+ method,
15283
+ number,
15284
+ "boolean": _boolean,
15285
+ regexp,
15286
+ integer,
15287
+ "float": floatFn,
15288
+ array,
15289
+ object,
15290
+ "enum": enumerable,
15291
+ pattern,
15292
+ date,
15293
+ url: type,
15294
+ hex: type,
15295
+ email: type,
15296
+ required,
15297
+ any
15298
+ };
15299
+ function newMessages() {
15300
+ return {
15301
+ "default": "Validation error on field %s",
15302
+ required: "%s is required",
15303
+ "enum": "%s must be one of %s",
15304
+ whitespace: "%s cannot be empty",
15305
+ date: {
15306
+ format: "%s date %s is invalid for format %s",
15307
+ parse: "%s date could not be parsed, %s is invalid ",
15308
+ invalid: "%s date %s is invalid"
15309
+ },
15310
+ types: {
15311
+ string: "%s is not a %s",
15312
+ method: "%s is not a %s (function)",
15313
+ array: "%s is not an %s",
15314
+ object: "%s is not an %s",
15315
+ number: "%s is not a %s",
15316
+ date: "%s is not a %s",
15317
+ "boolean": "%s is not a %s",
15318
+ integer: "%s is not an %s",
15319
+ "float": "%s is not a %s",
15320
+ regexp: "%s is not a valid %s",
15321
+ email: "%s is not a valid %s",
15322
+ url: "%s is not a valid %s",
15323
+ hex: "%s is not a valid %s"
15324
+ },
15325
+ string: {
15326
+ len: "%s must be exactly %s characters",
15327
+ min: "%s must be at least %s characters",
15328
+ max: "%s cannot be longer than %s characters",
15329
+ range: "%s must be between %s and %s characters"
15330
+ },
15331
+ number: {
15332
+ len: "%s must equal %s",
15333
+ min: "%s cannot be less than %s",
15334
+ max: "%s cannot be greater than %s",
15335
+ range: "%s must be between %s and %s"
15336
+ },
15337
+ array: {
15338
+ len: "%s must be exactly %s in length",
15339
+ min: "%s cannot be less than %s in length",
15340
+ max: "%s cannot be greater than %s in length",
15341
+ range: "%s must be between %s and %s in length"
15342
+ },
15343
+ pattern: {
15344
+ mismatch: "%s value %s does not match pattern %s"
15345
+ },
15346
+ clone: function clone() {
15347
+ var cloned = JSON.parse(JSON.stringify(this));
15348
+ cloned.clone = this.clone;
15349
+ return cloned;
15350
+ }
15351
+ };
15352
+ }
15353
+ var messages = newMessages();
15354
+ var Schema = /* @__PURE__ */ function() {
15355
+ function Schema2(descriptor) {
15356
+ this.rules = null;
15357
+ this._messages = messages;
15358
+ this.define(descriptor);
15359
+ }
15360
+ var _proto = Schema2.prototype;
15361
+ _proto.define = function define2(rules2) {
15362
+ var _this = this;
15363
+ if (!rules2) {
15364
+ throw new Error("Cannot configure a schema with no rules");
15365
+ }
15366
+ if (typeof rules2 !== "object" || Array.isArray(rules2)) {
15367
+ throw new Error("Rules must be an object");
15368
+ }
15369
+ this.rules = {};
15370
+ Object.keys(rules2).forEach(function(name) {
15371
+ var item = rules2[name];
15372
+ _this.rules[name] = Array.isArray(item) ? item : [item];
15373
+ });
15374
+ };
15375
+ _proto.messages = function messages2(_messages) {
15376
+ if (_messages) {
15377
+ this._messages = deepMerge(newMessages(), _messages);
15378
+ }
15379
+ return this._messages;
15380
+ };
15381
+ _proto.validate = function validate(source_, o, oc) {
15382
+ var _this2 = this;
15383
+ if (o === void 0) {
15384
+ o = {};
15385
+ }
15386
+ if (oc === void 0) {
15387
+ oc = function oc2() {
15388
+ };
15389
+ }
15390
+ var source = source_;
15391
+ var options2 = o;
15392
+ var callback = oc;
15393
+ if (typeof options2 === "function") {
15394
+ callback = options2;
15395
+ options2 = {};
15396
+ }
15397
+ if (!this.rules || Object.keys(this.rules).length === 0) {
15398
+ if (callback) {
15399
+ callback(null, source);
15400
+ }
15401
+ return Promise.resolve(source);
15402
+ }
15403
+ function complete(results) {
15404
+ var errors = [];
15405
+ var fields = {};
15406
+ function add(e2) {
15407
+ if (Array.isArray(e2)) {
15408
+ var _errors;
15409
+ errors = (_errors = errors).concat.apply(_errors, e2);
15410
+ } else {
15411
+ errors.push(e2);
15412
+ }
15413
+ }
15414
+ for (var i = 0; i < results.length; i++) {
15415
+ add(results[i]);
15416
+ }
15417
+ if (!errors.length) {
15418
+ callback(null, source);
15419
+ } else {
15420
+ fields = convertFieldsError(errors);
15421
+ callback(errors, fields);
15422
+ }
15423
+ }
15424
+ if (options2.messages) {
15425
+ var messages$1 = this.messages();
15426
+ if (messages$1 === messages) {
15427
+ messages$1 = newMessages();
15428
+ }
15429
+ deepMerge(messages$1, options2.messages);
15430
+ options2.messages = messages$1;
15431
+ } else {
15432
+ options2.messages = this.messages();
15433
+ }
15434
+ var series = {};
15435
+ var keys = options2.keys || Object.keys(this.rules);
15436
+ keys.forEach(function(z2) {
15437
+ var arr = _this2.rules[z2];
15438
+ var value = source[z2];
15439
+ arr.forEach(function(r2) {
15440
+ var rule = r2;
15441
+ if (typeof rule.transform === "function") {
15442
+ if (source === source_) {
15443
+ source = _extends({}, source);
15444
+ }
15445
+ value = source[z2] = rule.transform(value);
15446
+ }
15447
+ if (typeof rule === "function") {
15448
+ rule = {
15449
+ validator: rule
15450
+ };
15451
+ } else {
15452
+ rule = _extends({}, rule);
15453
+ }
15454
+ rule.validator = _this2.getValidationMethod(rule);
15455
+ if (!rule.validator) {
15456
+ return;
15457
+ }
15458
+ rule.field = z2;
15459
+ rule.fullField = rule.fullField || z2;
15460
+ rule.type = _this2.getType(rule);
15461
+ series[z2] = series[z2] || [];
15462
+ series[z2].push({
15463
+ rule,
15464
+ value,
15465
+ source,
15466
+ field: z2
15467
+ });
15468
+ });
15469
+ });
15470
+ var errorFields = {};
15471
+ return asyncMap(series, options2, function(data, doIt) {
15472
+ var rule = data.rule;
15473
+ var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
15474
+ deep = deep && (rule.required || !rule.required && data.value);
15475
+ rule.field = data.field;
15476
+ function addFullField(key, schema) {
15477
+ return _extends({}, schema, {
15478
+ fullField: rule.fullField + "." + key,
15479
+ fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
15480
+ });
15481
+ }
15482
+ function cb(e2) {
15483
+ if (e2 === void 0) {
15484
+ e2 = [];
15485
+ }
15486
+ var errorList = Array.isArray(e2) ? e2 : [e2];
15487
+ if (!options2.suppressWarning && errorList.length) {
15488
+ Schema2.warning("async-validator:", errorList);
15489
+ }
15490
+ if (errorList.length && rule.message !== void 0) {
15491
+ errorList = [].concat(rule.message);
15492
+ }
15493
+ var filledErrors = errorList.map(complementError(rule, source));
15494
+ if (options2.first && filledErrors.length) {
15495
+ errorFields[rule.field] = 1;
15496
+ return doIt(filledErrors);
15497
+ }
15498
+ if (!deep) {
15499
+ doIt(filledErrors);
15500
+ } else {
15501
+ if (rule.required && !data.value) {
15502
+ if (rule.message !== void 0) {
15503
+ filledErrors = [].concat(rule.message).map(complementError(rule, source));
15504
+ } else if (options2.error) {
15505
+ filledErrors = [options2.error(rule, format(options2.messages.required, rule.field))];
15506
+ }
15507
+ return doIt(filledErrors);
15508
+ }
15509
+ var fieldsSchema = {};
15510
+ if (rule.defaultField) {
15511
+ Object.keys(data.value).map(function(key) {
15512
+ fieldsSchema[key] = rule.defaultField;
15513
+ });
15514
+ }
15515
+ fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
15516
+ var paredFieldsSchema = {};
15517
+ Object.keys(fieldsSchema).forEach(function(field) {
15518
+ var fieldSchema = fieldsSchema[field];
15519
+ var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
15520
+ paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
15521
+ });
15522
+ var schema = new Schema2(paredFieldsSchema);
15523
+ schema.messages(options2.messages);
15524
+ if (data.rule.options) {
15525
+ data.rule.options.messages = options2.messages;
15526
+ data.rule.options.error = options2.error;
15527
+ }
15528
+ schema.validate(data.value, data.rule.options || options2, function(errs) {
15529
+ var finalErrors = [];
15530
+ if (filledErrors && filledErrors.length) {
15531
+ finalErrors.push.apply(finalErrors, filledErrors);
15532
+ }
15533
+ if (errs && errs.length) {
15534
+ finalErrors.push.apply(finalErrors, errs);
15535
+ }
15536
+ doIt(finalErrors.length ? finalErrors : null);
15537
+ });
15538
+ }
15539
+ }
15540
+ var res;
15541
+ if (rule.asyncValidator) {
15542
+ res = rule.asyncValidator(rule, data.value, cb, data.source, options2);
15543
+ } else if (rule.validator) {
15544
+ try {
15545
+ res = rule.validator(rule, data.value, cb, data.source, options2);
15546
+ } catch (error) {
15547
+ console.error == null ? void 0 : console.error(error);
15548
+ if (!options2.suppressValidatorError) {
15549
+ setTimeout(function() {
15550
+ throw error;
15551
+ }, 0);
15552
+ }
15553
+ cb(error.message);
15554
+ }
15555
+ if (res === true) {
15556
+ cb();
15557
+ } else if (res === false) {
15558
+ cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
15559
+ } else if (res instanceof Array) {
15560
+ cb(res);
15561
+ } else if (res instanceof Error) {
15562
+ cb(res.message);
15563
+ }
15564
+ }
15565
+ if (res && res.then) {
15566
+ res.then(function() {
15567
+ return cb();
15568
+ }, function(e2) {
15569
+ return cb(e2);
15570
+ });
15571
+ }
15572
+ }, function(results) {
15573
+ complete(results);
15574
+ }, source);
15575
+ };
15576
+ _proto.getType = function getType(rule) {
15577
+ if (rule.type === void 0 && rule.pattern instanceof RegExp) {
15578
+ rule.type = "pattern";
15579
+ }
15580
+ if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
15581
+ throw new Error(format("Unknown rule type %s", rule.type));
15582
+ }
15583
+ return rule.type || "string";
15584
+ };
15585
+ _proto.getValidationMethod = function getValidationMethod(rule) {
15586
+ if (typeof rule.validator === "function") {
15587
+ return rule.validator;
15588
+ }
15589
+ var keys = Object.keys(rule);
15590
+ var messageIndex = keys.indexOf("message");
15591
+ if (messageIndex !== -1) {
15592
+ keys.splice(messageIndex, 1);
15593
+ }
15594
+ if (keys.length === 1 && keys[0] === "required") {
15595
+ return validators.required;
15596
+ }
15597
+ return validators[this.getType(rule)] || void 0;
15598
+ };
15599
+ return Schema2;
15600
+ }();
15601
+ Schema.register = function register(type2, validator) {
15602
+ if (typeof validator !== "function") {
15603
+ throw new Error("Cannot register a validator by type, validator is not a function");
15604
+ }
15605
+ validators[type2] = validator;
15606
+ };
15607
+ Schema.warning = warning;
15608
+ Schema.messages = messages;
15609
+ Schema.validators = validators;
15610
+ class FormStore {
15611
+ constructor() {
15612
+ this.store = {};
15613
+ this.fieldEntities = [];
15614
+ this.callbacks = {};
15615
+ this.errList = [];
15616
+ this.registerField = (field) => {
15617
+ this.fieldEntities.push(field);
15618
+ return () => {
15619
+ this.fieldEntities = this.fieldEntities.filter((item) => item != field);
15620
+ delete this.store[field.props.name];
15621
+ };
15622
+ };
15623
+ this.getFieldValue = (name) => {
15624
+ return this.store[name];
15625
+ };
15626
+ this.setFieldsValue = (newStore) => {
15627
+ this.store = {
15628
+ ...this.store,
15629
+ ...newStore
15630
+ };
15631
+ this.fieldEntities.forEach((enetity) => {
15632
+ const { name } = enetity.props;
15633
+ Object.keys(newStore).forEach((key) => {
15634
+ if (key === name) {
15635
+ enetity.onStoreChange();
15636
+ }
15637
+ });
15638
+ });
15639
+ };
15640
+ this.validate = () => {
15641
+ const err = [];
15642
+ this.errList.length = 0;
15643
+ this.fieldEntities.forEach((entity) => {
15644
+ const { name, rules: rules2 = [] } = entity.props;
15645
+ const descriptor = {};
15646
+ if (rules2.length) {
15647
+ if (rules2.length > 1) {
15648
+ descriptor[name] = [];
15649
+ rules2.map((v2) => {
15650
+ descriptor[name].push(v2);
15651
+ });
15652
+ } else {
15653
+ descriptor[name] = rules2[0];
15654
+ }
15655
+ }
15656
+ const validator = new Schema(descriptor);
15657
+ validator.validate({ [name]: this.store[name] }, (errors) => {
15658
+ if (errors) {
15659
+ err.push(...errors);
15660
+ this.errList.push(...errors);
15661
+ }
15662
+ entity.onStoreChange();
15663
+ });
15664
+ });
15665
+ return err;
15666
+ };
15667
+ this.setCallback = (callback) => {
15668
+ this.callbacks = {
15669
+ ...this.callbacks,
15670
+ ...callback
15671
+ };
15672
+ };
15673
+ this.submit = () => {
15674
+ var _a, _b, _c, _d;
15675
+ const err = this.validate();
15676
+ if (err.length === 0) {
15677
+ (_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
15678
+ } else if (err.length > 0) {
15679
+ (_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, err);
15680
+ }
15681
+ };
15682
+ this.resetFields = () => {
15683
+ };
15684
+ this.getForm = () => {
15685
+ return {
15686
+ setCallback: this.setCallback,
15687
+ registerField: this.registerField,
15688
+ getFieldValue: this.getFieldValue,
15689
+ setFieldsValue: this.setFieldsValue,
15690
+ submit: this.submit,
15691
+ store: this.store,
15692
+ errList: this.errList,
15693
+ fieldEntities: this.fieldEntities
15694
+ };
15695
+ };
15696
+ this.callbacks = {
15697
+ onFinish: (value) => {
15698
+ },
15699
+ onFinishFailed: () => {
15700
+ }
15701
+ };
15702
+ }
15703
+ }
15704
+ const useForm = (form) => {
15705
+ const formRef = React.useRef();
15706
+ if (!formRef.current) {
15707
+ if (form) {
15708
+ formRef.current = form;
15709
+ } else {
15710
+ const formStore = new FormStore();
15711
+ formRef.current = formStore.getForm();
15712
+ }
15713
+ }
15714
+ return [formRef.current];
15715
+ };
15716
+ const defaultProps$G = {
15717
+ ...ComponentDefaults,
15718
+ name: "",
15719
+ label: "",
15720
+ className: "",
15721
+ rules: [{ required: false, message: "" }],
15722
+ disabled: false,
15723
+ labelWidth: 90,
15724
+ errorMessageAlign: "left",
15725
+ showErrorLine: true,
15726
+ showErrorMessage: true
15727
+ };
15728
+ class FormItem extends React__default["default"].Component {
15729
+ constructor() {
15730
+ super(...arguments);
15731
+ this.getControlled = (children) => {
15732
+ const { getFieldValue, setFieldsValue } = this.context;
15733
+ const { name } = this.props;
15734
+ const type2 = children.type.NAME;
15735
+ return {
15736
+ value: getFieldValue(name),
15737
+ onChange: (event) => {
15738
+ let newValue = event;
15739
+ switch (type2) {
15740
+ case "checkbox":
15741
+ newValue = event.target.value;
15742
+ break;
15743
+ }
15744
+ setFieldsValue({ [name]: newValue });
15745
+ }
15746
+ };
15747
+ };
15748
+ this.onStoreChange = () => {
15749
+ this.forceUpdate();
15750
+ };
15751
+ this.renderLayout = (childNode) => {
15752
+ var _a, _b;
15753
+ const {
15754
+ label,
15755
+ name,
15756
+ rules: rules2 = [{ required: false, message: "" }],
15757
+ className,
15758
+ labelWidth,
15759
+ errorMessageAlign,
15760
+ showErrorLine,
15761
+ showErrorMessage
15762
+ } = {
15763
+ ...defaultProps$G,
15764
+ ...this.props
15765
+ };
15766
+ const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
15767
+ return item2.field === name;
15768
+ }));
15769
+ const { starPositon } = this.context;
15770
+ const renderStar = rules2.length > 0 && rules2[0].required && /* @__PURE__ */ React__default["default"].createElement("i", {
15771
+ className: "required"
15772
+ });
15773
+ const renderLabel = starPositon === "Right" ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, label, renderStar) : /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderStar, label);
15774
+ return /* @__PURE__ */ React__default["default"].createElement(Cell, {
15775
+ className: `nut-form-item ${className}`
15776
+ }, label ? /* @__PURE__ */ React__default["default"].createElement("div", {
15777
+ className: "nut-cell__title nut-form-item__label",
15778
+ style: {
15779
+ width: this.pxCheck(labelWidth)
15780
+ }
15781
+ }, renderLabel) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
15782
+ className: "nut-cell__value nut-form-item__body"
15783
+ }, /* @__PURE__ */ React__default["default"].createElement("div", {
15784
+ className: "nut-form-item__body__slots"
15785
+ }, childNode), item.length > 0 && /* @__PURE__ */ React__default["default"].createElement("div", {
15786
+ className: "nut-form-item__body__tips",
15787
+ style: { textAlign: errorMessageAlign }
15788
+ }, item[0].message)));
15789
+ };
15790
+ this.pxCheck = (value) => {
15791
+ return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
15792
+ };
15793
+ }
15794
+ componentDidMount() {
15795
+ this.cancelRegister = this.context.registerField(this);
15796
+ }
15797
+ componentWillUnmount() {
15798
+ if (this.cancelRegister) {
15799
+ this.cancelRegister();
15800
+ }
15801
+ }
15802
+ render() {
15803
+ const { children } = this.props;
15804
+ const c6 = Array.isArray(children) ? children[0] : children;
15805
+ const returnChildNode = React__default["default"].cloneElement(
15806
+ c6,
15807
+ this.getControlled(c6)
15808
+ );
15809
+ return this.renderLayout(returnChildNode);
15810
+ }
15811
+ }
15812
+ FormItem.defaultProps = defaultProps$G;
15813
+ FormItem.contextType = FormItemContext;
15814
+ const defaultProps$F = {
15815
+ ...ComponentDefaults,
15816
+ className: "",
15817
+ style: void 0,
15818
+ form: {},
15819
+ labelPosition: "Right",
15820
+ formGroupTitle: "",
15821
+ onFinish: (obj) => {
15822
+ },
15823
+ onFinishFailed: (value) => {
15824
+ },
15825
+ starPositon: "Left"
15826
+ };
15827
+ const PositionInfo = {
15828
+ Top: "form-layout-top",
15829
+ Left: "form-layout-left",
15830
+ Right: "form-layout-right"
15831
+ };
15832
+ const Form = (props) => {
15833
+ const {
15834
+ children,
15835
+ onFinish,
15836
+ onFinishFailed,
15837
+ labelPosition,
15838
+ starPositon,
15839
+ ...rest
15840
+ } = {
15841
+ ...defaultProps$F,
15842
+ ...props
15843
+ };
15844
+ const [formInstance] = useForm();
15845
+ formInstance.starPositon = starPositon;
15846
+ const { setCallback, submit } = formInstance;
15847
+ setCallback({
15848
+ onFinish,
15849
+ onFinishFailed
15850
+ });
15851
+ return /* @__PURE__ */ React__default["default"].createElement("form", {
15852
+ className: `nut-form ${PositionInfo[labelPosition]} ${props.className}`,
15853
+ style: props.style,
15854
+ onSubmit: (e2) => {
15855
+ e2.preventDefault();
15856
+ submit();
15857
+ }
15858
+ }, /* @__PURE__ */ React__default["default"].createElement(CellGroup, null, /* @__PURE__ */ React__default["default"].createElement(FormItemContext.Provider, {
15859
+ value: formInstance
15860
+ }, children)));
15861
+ };
15862
+ Form.defaultProps = defaultProps$F;
15863
+ Form.displayName = "NutForm";
15864
+ Form.Item = FormItem;
15865
+ const defaultProps$E = {
15866
+ cancelTxt: "",
15867
+ optionTag: "name",
15868
+ optionSubTag: "subname",
15869
+ chooseTagValue: "",
15870
+ title: "",
15871
+ color: "#ee0a24",
15872
+ description: "",
15873
+ menuItems: [],
15874
+ onCancel: () => {
15875
+ },
15876
+ onChoose: () => {
15877
+ },
15878
+ visible: false,
15879
+ className: "",
15880
+ style: {}
15881
+ };
15882
+ const ActionSheet = (props) => {
15883
+ const {
15884
+ children,
15885
+ cancelTxt,
15886
+ optionTag,
15887
+ optionSubTag,
15888
+ chooseTagValue,
15889
+ title,
15890
+ color,
15891
+ description,
15892
+ menuItems,
15893
+ onCancel,
15894
+ onChoose,
15895
+ visible,
15896
+ className,
15897
+ style,
15898
+ ...rest
15899
+ } = { ...defaultProps$E, ...props };
15900
+ const b2 = cn("actionsheet");
15901
+ const isHighlight = (item) => {
15902
+ return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
15903
+ };
15904
+ const cancelActionSheet = () => {
15905
+ onCancel && onCancel();
15906
+ };
15907
+ const chooseItem = (item, index) => {
15908
+ if (!item.disable) {
15909
+ onChoose && onChoose(item, index);
15910
+ }
15911
+ };
15912
+ return /* @__PURE__ */ React__default["default"].createElement(Popup, {
15913
+ round: true,
15914
+ visible,
15915
+ position: "bottom",
15916
+ onClose: () => {
15917
+ onCancel && onCancel();
15918
+ }
15919
+ }, /* @__PURE__ */ React__default["default"].createElement("div", {
15920
+ className: `${b2()} ${className}`,
15921
+ style,
14617
15922
  ...rest
14618
15923
  }, title && /* @__PURE__ */ React__default["default"].createElement("div", {
14619
15924
  className: b2("title")
@@ -15108,12 +16413,12 @@
15108
16413
  Dialog.confirm = (props) => {
15109
16414
  return confirm(props);
15110
16415
  };
15111
- ["alert"].forEach((type) => {
15112
- Dialog[type] = (props) => {
16416
+ ["alert"].forEach((type2) => {
16417
+ Dialog[type2] = (props) => {
15113
16418
  return confirm({
15114
16419
  ...props,
15115
16420
  isNotice: false,
15116
- noticeType: type
16421
+ noticeType: type2
15117
16422
  });
15118
16423
  };
15119
16424
  });
@@ -15374,7 +16679,7 @@
15374
16679
  msg,
15375
16680
  color,
15376
16681
  background,
15377
- type,
16682
+ type: type2,
15378
16683
  className,
15379
16684
  position,
15380
16685
  isWrapTeleport
@@ -15385,7 +16690,7 @@
15385
16690
  "popup-top": position === "top",
15386
16691
  "popup-bottom": position === "bottom",
15387
16692
  "nut-notify": true,
15388
- [`nut-notify--${type}`]: true
16693
+ [`nut-notify--${type2}`]: true
15389
16694
  });
15390
16695
  return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(CSSTransition$1, {
15391
16696
  in: this.state.show,
@@ -16665,9 +17970,9 @@
16665
17970
  if (pace) {
16666
17971
  const _active = active + pace;
16667
17972
  if (props.loop) {
16668
- return range(_active, -1, childCount);
17973
+ return range2(_active, -1, childCount);
16669
17974
  }
16670
- return range(_active, 0, childCount - 1);
17975
+ return range2(_active, 0, childCount - 1);
16671
17976
  }
16672
17977
  return active;
16673
17978
  };
@@ -16678,14 +17983,14 @@
16678
17983
  }
16679
17984
  let targetOffset = offset2 - currentPosition;
16680
17985
  if (!props.loop) {
16681
- targetOffset = range(targetOffset, minOffset, 0);
17986
+ targetOffset = range2(targetOffset, minOffset, 0);
16682
17987
  }
16683
17988
  return targetOffset;
16684
17989
  };
16685
17990
  const requestFrame = (fn) => {
16686
17991
  window.requestAnimationFrame.call(window, fn);
16687
17992
  };
16688
- const range = (num, min, max) => {
17993
+ const range2 = (num, min, max) => {
16689
17994
  return Math.min(Math.max(num, min), max);
16690
17995
  };
16691
17996
  const getDirection2 = (x2, y2) => {
@@ -17246,7 +18551,7 @@
17246
18551
  style,
17247
18552
  color,
17248
18553
  plain,
17249
- type,
18554
+ type: type2,
17250
18555
  round,
17251
18556
  prefixCls,
17252
18557
  children,
@@ -17266,7 +18571,7 @@
17266
18571
  React.useEffect(() => {
17267
18572
  setBtnName(classes());
17268
18573
  }, [
17269
- type,
18574
+ type2,
17270
18575
  color,
17271
18576
  textColor,
17272
18577
  plain,
@@ -17280,7 +18585,7 @@
17280
18585
  const classes = () => {
17281
18586
  const prefixCls2 = "nut-tag";
17282
18587
  return `${prefixCls2}
17283
- ${type ? `${prefixCls2}--${type}` : ""}
18588
+ ${type2 ? `${prefixCls2}--${type2}` : ""}
17284
18589
  ${plain ? `${prefixCls2}--plain` : ""}
17285
18590
  ${round ? `${prefixCls2}--round` : ""}
17286
18591
  ${mark ? `${prefixCls2}--mark` : ""}
@@ -17349,12 +18654,12 @@
17349
18654
  };
17350
18655
  }
17351
18656
  class Trigger extends React__default["default"].Component {
17352
- fireEvents(type, e2) {
17353
- const childCallback = this.props.children.props[type];
18657
+ fireEvents(type2, e2) {
18658
+ const childCallback = this.props.children.props[type2];
17354
18659
  if (childCallback) {
17355
18660
  childCallback(e2);
17356
18661
  }
17357
- const callback = this.props[type];
18662
+ const callback = this.props[type2];
17358
18663
  if (callback) {
17359
18664
  callback(e2);
17360
18665
  }
@@ -17602,7 +18907,7 @@
17602
18907
  startTime,
17603
18908
  endTime,
17604
18909
  millisecond,
17605
- format,
18910
+ format: format2,
17606
18911
  autoStart,
17607
18912
  time,
17608
18913
  className,
@@ -17662,7 +18967,7 @@
17662
18967
  }
17663
18968
  });
17664
18969
  };
17665
- const formatRemainTime = (t2, type) => {
18970
+ const formatRemainTime = (t2, type2) => {
17666
18971
  const ts2 = t2;
17667
18972
  const rest2 = {
17668
18973
  d: 0,
@@ -17682,12 +18987,12 @@
17682
18987
  rest2.s = Math.floor(ts2 % MINUTE / SECOND);
17683
18988
  rest2.ms = Math.floor(ts2 % SECOND);
17684
18989
  }
17685
- return type === "custom" ? rest2 : parseFormat({ ...rest2 });
18990
+ return type2 === "custom" ? rest2 : parseFormat({ ...rest2 });
17686
18991
  };
17687
18992
  const parseFormat = (time2) => {
17688
18993
  const { d: d2 } = time2;
17689
18994
  let { h: h2, m: m2, s, ms } = time2;
17690
- let formatCache = format;
18995
+ let formatCache = format2;
17691
18996
  if (formatCache.includes("DD")) {
17692
18997
  formatCache = formatCache.replace("DD", padZero(d2));
17693
18998
  } else {
@@ -18098,10 +19403,10 @@
18098
19403
  }, !Number.isNaN(Number(item)) ? /* @__PURE__ */ React__default["default"].createElement("span", {
18099
19404
  className: b2("number"),
18100
19405
  style: numberEaseStyle
18101
- }, [...numbers, ...numbers].map((number, subidx) => {
19406
+ }, [...numbers, ...numbers].map((number2, subidx) => {
18102
19407
  return /* @__PURE__ */ React__default["default"].createElement("span", {
18103
19408
  key: subidx
18104
- }, number);
19409
+ }, number2);
18105
19410
  })) : /* @__PURE__ */ React__default["default"].createElement("span", {
18106
19411
  className: b2("separator")
18107
19412
  }, item));
@@ -18709,7 +20014,7 @@
18709
20014
  autoplay,
18710
20015
  loop: loop2,
18711
20016
  preload,
18712
- type,
20017
+ type: type2,
18713
20018
  onFastBack,
18714
20019
  onForward,
18715
20020
  onPause,
@@ -18868,7 +20173,7 @@
18868
20173
  }, children);
18869
20174
  };
18870
20175
  const renderAudio = () => {
18871
- switch (type) {
20176
+ switch (type2) {
18872
20177
  case "icon":
18873
20178
  return renderIcon();
18874
20179
  case "progress":
@@ -18903,7 +20208,7 @@
18903
20208
  ...rest
18904
20209
  }, renderAudio(), /* @__PURE__ */ React__default["default"].createElement("audio", {
18905
20210
  className: "audioMain",
18906
- controls: type === "controls",
20211
+ controls: type2 === "controls",
18907
20212
  ref: AudioRef,
18908
20213
  src: url,
18909
20214
  muted,
@@ -19125,7 +20430,7 @@
19125
20430
  const { locale } = useConfig();
19126
20431
  const {
19127
20432
  children,
19128
- type,
20433
+ type: type2,
19129
20434
  existAddress,
19130
20435
  selectedIcon,
19131
20436
  defaultIcon,
@@ -19157,7 +20462,7 @@
19157
20462
  onSelected && onSelected(prevExistAdd, item, copyExistAdd);
19158
20463
  };
19159
20464
  const switchModule = () => {
19160
- onSwitchModule && onSwitchModule({ type: type === "exist" ? "custom" : "exist" });
20465
+ onSwitchModule && onSwitchModule({ type: type2 === "exist" ? "custom" : "exist" });
19161
20466
  };
19162
20467
  React.useEffect(() => {
19163
20468
  }, [existAddress]);
@@ -19209,7 +20514,7 @@
19209
20514
  const { locale } = useConfig();
19210
20515
  const {
19211
20516
  children,
19212
- type,
20517
+ type: type2,
19213
20518
  modelValue,
19214
20519
  height,
19215
20520
  province,
@@ -19225,7 +20530,7 @@
19225
20530
  ...props
19226
20531
  };
19227
20532
  const b2 = cn("address");
19228
- const [privateType] = React.useState(type);
20533
+ const [privateType] = React.useState(type2);
19229
20534
  const [tabIndex, setTabIndex] = React.useState(0);
19230
20535
  const [tabName] = React.useState(["province", "city", "country", "town"]);
19231
20536
  const provinceRef = React.useRef(null);
@@ -19234,7 +20539,7 @@
19234
20539
  const townRef = React.useRef(null);
19235
20540
  const regionLine = React.useRef(null);
19236
20541
  const isCustom2 = () => {
19237
- return type === "custom2";
20542
+ return type2 === "custom2";
19238
20543
  };
19239
20544
  const transformData = (data) => {
19240
20545
  if (!Array.isArray(data))
@@ -19498,7 +20803,7 @@
19498
20803
  modelValue,
19499
20804
  modelSelect,
19500
20805
  children,
19501
- type,
20806
+ type: type2,
19502
20807
  height,
19503
20808
  customAddressTitle,
19504
20809
  existAddress,
@@ -19529,7 +20834,7 @@
19529
20834
  ...props
19530
20835
  };
19531
20836
  const b2 = cn("address");
19532
- const [privateType, setPrivateType] = React.useState(type);
20837
+ const [privateType, setPrivateType] = React.useState(type2);
19533
20838
  const [tabName] = React.useState(["province", "city", "country", "town"]);
19534
20839
  const [showPopup, setShowPopup] = React.useState(modelValue);
19535
20840
  const [selectedRegion, setSelectedRegion] = React.useState({
@@ -19666,8 +20971,8 @@
19666
20971
  onNextArea: (cal) => {
19667
20972
  nextAreaList && nextAreaList(cal);
19668
20973
  },
19669
- onTabClick: (type2) => {
19670
- onTabChecked && onTabChecked(type2);
20974
+ onTabClick: (type22) => {
20975
+ onTabChecked && onTabChecked(type22);
19671
20976
  },
19672
20977
  onClose: handClose
19673
20978
  }), privateType === "exist" && /* @__PURE__ */ React__default["default"].createElement(ExistRender, {
@@ -19775,7 +21080,7 @@
19775
21080
  const Signature = (props) => {
19776
21081
  const { locale } = useConfig();
19777
21082
  const {
19778
- type,
21083
+ type: type2,
19779
21084
  lineWidth,
19780
21085
  strokeStyle,
19781
21086
  unSupportTpl,
@@ -19864,7 +21169,7 @@
19864
21169
  };
19865
21170
  const onSave = (canvas) => {
19866
21171
  let dataurl;
19867
- switch (type) {
21172
+ switch (type2) {
19868
21173
  case "png":
19869
21174
  dataurl = canvas.toDataURL("image/png");
19870
21175
  break;
@@ -19965,7 +21270,7 @@
19965
21270
  };
19966
21271
  const TimePannel = (props) => {
19967
21272
  useConfig();
19968
- const { children, className, date, curKey, change } = {
21273
+ const { children, className, date: date2, curKey, change } = {
19969
21274
  ...defaultProps$2,
19970
21275
  ...props
19971
21276
  };
@@ -19973,7 +21278,7 @@
19973
21278
  return /* @__PURE__ */ React__default["default"].createElement("div", {
19974
21279
  className: `${b2()} ${className || ""}`,
19975
21280
  onClick: () => change(curKey)
19976
- }, date);
21281
+ }, date2);
19977
21282
  };
19978
21283
  TimePannel.defaultProps = defaultProps$2;
19979
21284
  TimePannel.displayName = "NutTimePannel";
@@ -20207,6 +21512,8 @@
20207
21512
  exports2.Elevator = Elevator;
20208
21513
  exports2.Empty = Empty;
20209
21514
  exports2.FixedNav = FixedNav;
21515
+ exports2.Form = Form;
21516
+ exports2.FormItem = FormItem;
20210
21517
  exports2.Grid = Grid;
20211
21518
  exports2.GridItem = GridItem;
20212
21519
  exports2.Icon = Icon$1;