@nutui/nutui-react-taro 1.4.13 → 1.4.14

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.
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v1.4.13 Wed Mar 29 2023 16:05:15 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v1.4.14 Thu Apr 06 2023 15:50:10 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -3298,6 +3298,7 @@ var __publicField = (obj, key, value) => {
3298
3298
  direction,
3299
3299
  iconClassPrefix,
3300
3300
  iconFontClassName,
3301
+ className,
3301
3302
  onClick,
3302
3303
  ...rest
3303
3304
  } = {
@@ -3305,6 +3306,7 @@ var __publicField = (obj, key, value) => {
3305
3306
  ...props
3306
3307
  };
3307
3308
  const b2 = cn("grid-item");
3309
+ const classes = classNames(b2(), className);
3308
3310
  const context = React.useContext(GridContext);
3309
3311
  const pxCheck2 = (value) => {
3310
3312
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -3360,16 +3362,25 @@ var __publicField = (obj, key, value) => {
3360
3362
  index
3361
3363
  );
3362
3364
  };
3363
- return /* @__PURE__ */ React.createElement("div", { className: b2(), style: rootStyle(), ...rest, onClick: handleClick }, /* @__PURE__ */ React.createElement("div", { className: contentClass() }, icon && isIconName() ? /* @__PURE__ */ React.createElement(
3364
- Icon$1,
3365
+ return /* @__PURE__ */ React.createElement(
3366
+ "div",
3365
3367
  {
3366
- classPrefix: iconClassPrefix,
3367
- fontClassName: iconFontClassName,
3368
- name: icon,
3369
- size: iconSize || parentIconSize,
3370
- color: iconColor || parentIconColor
3371
- }
3372
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null, icon), text && /* @__PURE__ */ React.createElement("div", { className: "nut-grid-item__text", style: { fontSize, color } }, text), children && /* @__PURE__ */ React.createElement(React.Fragment, null, children)));
3368
+ className: classes,
3369
+ style: rootStyle(),
3370
+ ...rest,
3371
+ onClick: handleClick
3372
+ },
3373
+ /* @__PURE__ */ React.createElement("div", { className: contentClass() }, icon && isIconName() ? /* @__PURE__ */ React.createElement(
3374
+ Icon$1,
3375
+ {
3376
+ classPrefix: iconClassPrefix,
3377
+ fontClassName: iconFontClassName,
3378
+ name: icon,
3379
+ size: iconSize || parentIconSize,
3380
+ color: iconColor || parentIconColor
3381
+ }
3382
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, icon), text && /* @__PURE__ */ React.createElement("div", { className: "nut-grid-item__text", style: { fontSize, color } }, text), children && /* @__PURE__ */ React.createElement(React.Fragment, null, children))
3383
+ );
3373
3384
  };
3374
3385
  GridItem.defaultProps = defaultProps$1l;
3375
3386
  GridItem.displayName = "NutGridItem";
@@ -4887,7 +4898,7 @@ var __publicField = (obj, key, value) => {
4887
4898
  const childProps = child == null ? void 0 : child.props;
4888
4899
  if ((childProps == null ? void 0 : childProps.title) || (childProps == null ? void 0 : childProps.paneKey)) {
4889
4900
  title.title = childProps == null ? void 0 : childProps.title;
4890
- title.paneKey = (childProps == null ? void 0 : childProps.paneKey) || idx;
4901
+ title.paneKey = getPaneKey(childProps == null ? void 0 : childProps.paneKey, idx);
4891
4902
  title.disabled = childProps == null ? void 0 : childProps.disabled;
4892
4903
  title.index = idx;
4893
4904
  if (title.paneKey === value) {
@@ -4921,6 +4932,9 @@ var __publicField = (obj, key, value) => {
4921
4932
  transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
4922
4933
  transitionDuration: `${animatedTime}ms`
4923
4934
  };
4935
+ const getPaneKey = (paneKey, index2) => {
4936
+ return typeof paneKey === "string" ? paneKey : String(paneKey || index2);
4937
+ };
4924
4938
  const tabChange = (item, index2) => {
4925
4939
  onClick && onClick(item);
4926
4940
  if (item.disabled) {
@@ -4990,7 +5004,7 @@ var __publicField = (obj, key, value) => {
4990
5004
  ...child.props,
4991
5005
  activeKey: value
4992
5006
  };
4993
- if (String(value) !== String(((_a = child.props) == null ? void 0 : _a.paneKey) || idx) && autoHeight) {
5007
+ if (String(value) !== getPaneKey((_a = child.props) == null ? void 0 : _a.paneKey, idx) && autoHeight) {
4994
5008
  childProps = {
4995
5009
  ...childProps,
4996
5010
  autoHeightClassName: "inactive"
@@ -5015,7 +5029,7 @@ var __publicField = (obj, key, value) => {
5015
5029
  * @return {String}
5016
5030
  */
5017
5031
  getWhatDay(year, month, day) {
5018
- const date = /* @__PURE__ */ new Date(`${year}/${month}/${day}`);
5032
+ const date = new Date(`${year}/${month}/${day}`);
5019
5033
  const index = date.getDay();
5020
5034
  const dayNames = [
5021
5035
  "星期日",
@@ -5033,7 +5047,7 @@ var __publicField = (obj, key, value) => {
5033
5047
  * @return {Number}
5034
5048
  */
5035
5049
  getMonthPreDay(year, month) {
5036
- const date = /* @__PURE__ */ new Date(`${year}/${month}/01`);
5050
+ const date = new Date(`${year}/${month}/01`);
5037
5051
  let day = date.getDay();
5038
5052
  if (day == 0) {
5039
5053
  day = 7;
@@ -5090,7 +5104,7 @@ var __publicField = (obj, key, value) => {
5090
5104
  */
5091
5105
  getDay(i) {
5092
5106
  i = i || 0;
5093
- let date = /* @__PURE__ */ new Date();
5107
+ let date = new Date();
5094
5108
  const diff = i * (1e3 * 60 * 60 * 24);
5095
5109
  date = new Date(date.getTime() + diff);
5096
5110
  return this.date2Str(date);
@@ -5282,7 +5296,7 @@ var __publicField = (obj, key, value) => {
5282
5296
  };
5283
5297
  const isCurrDay = (month, day) => {
5284
5298
  const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
5285
- return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
5299
+ return Utils.isEqual(date, Utils.date2Str(new Date()));
5286
5300
  };
5287
5301
  const confirm = () => {
5288
5302
  const { type: type2 } = props;
@@ -5618,8 +5632,8 @@ var __publicField = (obj, key, value) => {
5618
5632
  }
5619
5633
  });
5620
5634
  } else {
5621
- const currentYear2 = (/* @__PURE__ */ new Date()).getFullYear();
5622
- const currentMonth = (/* @__PURE__ */ new Date()).getMonth() + 1;
5635
+ const currentYear2 = new Date().getFullYear();
5636
+ const currentMonth = new Date().getMonth() + 1;
5623
5637
  const currentYearMonthIndex = state.monthsData.findIndex((item) => {
5624
5638
  return +item.curData[0] === currentYear2 && +item.curData[1] === currentMonth;
5625
5639
  });
@@ -6740,7 +6754,7 @@ var __publicField = (obj, key, value) => {
6740
6754
  const rotation = 20;
6741
6755
  const moving = React.useRef(false);
6742
6756
  let timer;
6743
- const listbox = React.useRef(null);
6757
+ const listRef = React.useRef(null);
6744
6758
  const rollerRef = React.useRef(null);
6745
6759
  const pickerSlotRef = React.useRef(null);
6746
6760
  const [startTime, setStartTime] = React.useState(0);
@@ -6863,7 +6877,7 @@ var __publicField = (obj, key, value) => {
6863
6877
  }
6864
6878
  };
6865
6879
  const getReference = async () => {
6866
- const refe = await getRectByTaro(listbox == null ? void 0 : listbox.current);
6880
+ const refe = await getRectByTaro(listRef == null ? void 0 : listRef.current);
6867
6881
  lineSpacing.current = refe.height ? refe.height : 36;
6868
6882
  modifyStatus(true);
6869
6883
  };
@@ -6946,7 +6960,7 @@ var __publicField = (obj, key, value) => {
6946
6960
  })
6947
6961
  ),
6948
6962
  /* @__PURE__ */ React.createElement("div", { className: "nut-picker-mask" }),
6949
- /* @__PURE__ */ React.createElement("div", { className: "nut-picker-indicator", ref: listbox })
6963
+ /* @__PURE__ */ React.createElement("div", { className: "nut-picker-indicator", ref: listRef })
6950
6964
  );
6951
6965
  };
6952
6966
  const PickerSlot = React.forwardRef(InternalPickerSlot);
@@ -6989,44 +7003,65 @@ var __publicField = (obj, key, value) => {
6989
7003
  const [columnsList, setColumnsList] = React.useState([]);
6990
7004
  const b2 = cn("picker");
6991
7005
  const isConfirmEvent = React.useRef(false);
6992
- React.useEffect(() => {
6993
- if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString()) {
6994
- const data = [...defaultValueData];
6995
- setchooseValueData(data);
6996
- setColumnsList(normalListData());
7006
+ const formatCascade = (columns, values) => {
7007
+ const formatted = [];
7008
+ let cursor = {
7009
+ text: "",
7010
+ value: "",
7011
+ children: columns
7012
+ };
7013
+ let columnIndex2 = 0;
7014
+ while (cursor && cursor.children) {
7015
+ const options = cursor.children;
7016
+ const value = values[columnIndex2];
7017
+ let index = options.findIndex(
7018
+ (columnItem) => columnItem.value === value
7019
+ );
7020
+ if (index === -1)
7021
+ index = 0;
7022
+ cursor = cursor.children[index];
7023
+ columnIndex2++;
7024
+ formatted.push(options);
6997
7025
  }
6998
- }, [defaultValueData]);
6999
- React.useEffect(() => {
7000
- onChange && onChange(columnIndex, chooseValueData, selectedOptions());
7001
- if (isConfirmEvent.current) {
7002
- isConfirmEvent.current = false;
7003
- onConfirm && onConfirm(chooseValueData, selectedOptions());
7026
+ return formatted;
7027
+ };
7028
+ const columnsType = () => {
7029
+ const firstColumn = listData[0];
7030
+ if (firstColumn) {
7031
+ if (Array.isArray(firstColumn)) {
7032
+ return "multiple";
7033
+ }
7034
+ if ("children" in firstColumn) {
7035
+ return "cascade";
7036
+ }
7004
7037
  }
7005
- }, [chooseValueData]);
7038
+ return "single";
7039
+ };
7040
+ const normalListData = () => {
7041
+ const type = columnsType();
7042
+ switch (type) {
7043
+ case "multiple":
7044
+ return listData;
7045
+ case "cascade":
7046
+ return formatCascade(listData, chooseValueData);
7047
+ default:
7048
+ return [listData];
7049
+ }
7050
+ };
7051
+ const init = () => {
7052
+ const normalData = normalListData();
7053
+ setColumnsList(normalData);
7054
+ };
7006
7055
  React.useEffect(() => {
7007
7056
  init();
7008
7057
  }, [listData]);
7009
- const closeActionSheet = () => {
7010
- onClose && onClose(chooseValueData, selectedOptions());
7011
- onCloseUpdate && onCloseUpdate(chooseValueData, selectedOptions(), pickerRef);
7012
- };
7013
- const confirm = () => {
7014
- let movings = false;
7015
- refs.forEach((_ref) => {
7016
- if (_ref.moving)
7017
- movings = true;
7018
- _ref.stopMomentum();
7019
- });
7020
- if (movings) {
7021
- isConfirmEvent.current = true;
7022
- } else {
7023
- onConfirm && onConfirm(chooseValueData, selectedOptions());
7058
+ React.useEffect(() => {
7059
+ if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString() && !currentValue2.length) {
7060
+ const data = [...defaultValueData];
7061
+ setchooseValueData(data);
7062
+ setColumnsList(normalListData());
7024
7063
  }
7025
- onClose && onClose(chooseValueData, selectedOptions());
7026
- setTimeout(() => {
7027
- isConfirmEvent.current = false;
7028
- }, 0);
7029
- };
7064
+ }, [defaultValueData]);
7030
7065
  const selectedOptions = () => {
7031
7066
  const optins = [];
7032
7067
  columnsList.map((column, index) => {
@@ -7043,6 +7078,18 @@ var __publicField = (obj, key, value) => {
7043
7078
  });
7044
7079
  return optins;
7045
7080
  };
7081
+ React.useEffect(() => {
7082
+ Taro.getEnv() !== "WEB" && setCurrentValue(defaultValuesConvert());
7083
+ onChange && onChange(columnIndex, chooseValueData, selectedOptions());
7084
+ if (isConfirmEvent.current) {
7085
+ isConfirmEvent.current = false;
7086
+ onConfirm && onConfirm(chooseValueData, selectedOptions());
7087
+ }
7088
+ }, [chooseValueData]);
7089
+ const closeActionSheet = () => {
7090
+ onClose && onClose(chooseValueData, selectedOptions());
7091
+ onCloseUpdate && onCloseUpdate(chooseValueData, selectedOptions(), pickerRef);
7092
+ };
7046
7093
  const chooseItem = (option, columnIndex2) => {
7047
7094
  if (option && Object.keys(option).length) {
7048
7095
  if (chooseValueData[columnIndex2] !== option.value) {
@@ -7055,8 +7102,7 @@ var __publicField = (obj, key, value) => {
7055
7102
  chooseValueData[index + 1] = cursor.children[0].value;
7056
7103
  setchooseValueData([...chooseValueData]);
7057
7104
  index++;
7058
- const cc = cursor.children[0];
7059
- cursor = cc;
7105
+ cursor = cursor.children[0];
7060
7106
  }
7061
7107
  if (cursor && cursor.children) {
7062
7108
  chooseValueData[index + 1] = "";
@@ -7077,65 +7123,68 @@ var __publicField = (obj, key, value) => {
7077
7123
  }
7078
7124
  }
7079
7125
  };
7080
- const normalListData = () => {
7081
- const type = columnsType();
7082
- switch (type) {
7083
- case "multiple":
7084
- return listData;
7085
- case "cascade":
7086
- return formatCascade(listData, chooseValueData);
7087
- default:
7088
- return [listData];
7126
+ const confirm = () => {
7127
+ let movings = false;
7128
+ refs.forEach((_ref) => {
7129
+ if (_ref.moving)
7130
+ movings = true;
7131
+ _ref.stopMomentum();
7132
+ });
7133
+ if (movings) {
7134
+ isConfirmEvent.current = true;
7135
+ } else {
7136
+ onConfirm && onConfirm(chooseValueData, selectedOptions());
7089
7137
  }
7138
+ onClose && onClose(chooseValueData, selectedOptions());
7139
+ setTimeout(() => {
7140
+ isConfirmEvent.current = false;
7141
+ }, 0);
7090
7142
  };
7091
- const columnsType = () => {
7092
- const firstColumn = listData[0];
7093
- if (firstColumn) {
7094
- if (Array.isArray(firstColumn)) {
7095
- return "multiple";
7096
- }
7097
- if ("children" in firstColumn) {
7098
- return "cascade";
7099
- }
7100
- }
7101
- return "single";
7143
+ const renderToolbar = () => {
7144
+ return /* @__PURE__ */ React.createElement("div", { className: b2("control") }, /* @__PURE__ */ React.createElement("span", { className: b2("cancel-btn"), onClick: () => closeActionSheet() }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: b2("title") }, title || ""), /* @__PURE__ */ React.createElement("span", { className: b2("confirm-btn"), onClick: confirm }, locale.confirm));
7102
7145
  };
7103
- const formatCascade = (columns, defaultValues) => {
7104
- const formatted = [];
7105
- let cursor = {
7106
- text: "",
7107
- value: "",
7108
- children: columns
7109
- };
7110
- let columnIndex2 = 0;
7111
- while (cursor && cursor.children) {
7112
- const options = cursor.children;
7113
- const value = defaultValues[columnIndex2];
7114
- let index = options.findIndex(
7115
- (columnItem) => columnItem.value === value
7116
- );
7117
- if (index === -1)
7118
- index = 0;
7119
- cursor = cursor.children[index];
7120
- columnIndex2++;
7121
- formatted.push(options);
7146
+ const [currentValue2, setCurrentValue] = React.useState([]);
7147
+ const [pickingStatus, setPickingStatus] = React.useState(false);
7148
+ const defaultValuesConvert = () => {
7149
+ const defaultIndexs = [];
7150
+ if (chooseValueData.length > 0) {
7151
+ chooseValueData.forEach((value, index) => {
7152
+ for (let i = 0; i < columnsList[index].length; i++) {
7153
+ if (columnsList[index][i].value === value) {
7154
+ defaultIndexs.push(i);
7155
+ break;
7156
+ }
7157
+ }
7158
+ });
7159
+ } else if (columnsList && columnsList.length > 0) {
7160
+ columnsList.forEach((item) => {
7161
+ defaultIndexs.push(0);
7162
+ item.length > 0 && chooseValueData.push(item[0].value);
7163
+ });
7122
7164
  }
7123
- return formatted;
7165
+ return defaultIndexs;
7124
7166
  };
7125
- const init = () => {
7126
- const data = [];
7127
- const normalData = normalListData();
7128
- setColumnsList(normalData);
7129
- normalData.length > 0 && normalData.map((item) => {
7130
- item[0] && data.push(item[0].value);
7131
- return item;
7132
- });
7133
- if (!defaultValueData && chooseValueData.length === 0) {
7134
- setchooseValueData([...data]);
7135
- }
7167
+ const pickerStart = () => {
7168
+ setPickingStatus(true);
7136
7169
  };
7137
- const renderToolbar = () => {
7138
- return /* @__PURE__ */ React.createElement("div", { className: b2("control") }, /* @__PURE__ */ React.createElement("span", { className: b2("cancel-btn"), onClick: () => closeActionSheet() }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: b2("title") }, title || ""), /* @__PURE__ */ React.createElement("span", { className: b2("confirm-btn"), onClick: confirm }, locale.confirm));
7170
+ const pickerEnd = () => {
7171
+ setPickingStatus(false);
7172
+ };
7173
+ const pickerChange = (data) => {
7174
+ const prevDefaultValue = currentValue2;
7175
+ let changeIndex = 0;
7176
+ console.log("chage", data);
7177
+ const list = data.detail.value;
7178
+ for (let i = 0, len = list.length; i < len; i++) {
7179
+ if (prevDefaultValue[i] !== list[i]) {
7180
+ changeIndex = i;
7181
+ break;
7182
+ }
7183
+ }
7184
+ chooseItem(
7185
+ columnsList[changeIndex][data.detail.value[changeIndex]],
7186
+ changeIndex
7187
+ );
7139
7188
  };
7140
7189
  return /* @__PURE__ */ React.createElement(
7141
7190
  Popup,
@@ -7155,7 +7204,7 @@ var __publicField = (obj, key, value) => {
7155
7204
  catchMove: true
7156
7205
  },
7157
7206
  renderToolbar(),
7158
- /* @__PURE__ */ React.createElement("div", { className: b2("panel"), ref: pickerRef }, columnsList == null ? void 0 : columnsList.map((item, index) => {
7207
+ /* @__PURE__ */ React.createElement("div", { className: b2("panel"), ref: pickerRef }, Taro.getEnv() === "WEB" ? columnsList == null ? void 0 : columnsList.map((item, index) => {
7159
7208
  return /* @__PURE__ */ React.createElement(
7160
7209
  PickerSlot$1,
7161
7210
  {
@@ -7170,7 +7219,30 @@ var __publicField = (obj, key, value) => {
7170
7219
  itemShow: isVisible
7171
7220
  }
7172
7221
  );
7173
- }))
7222
+ }) : /* @__PURE__ */ React.createElement(
7223
+ components.PickerView,
7224
+ {
7225
+ ref: pickerRef,
7226
+ value: currentValue2,
7227
+ immediateChange: true,
7228
+ onPickStart: pickerStart,
7229
+ onChange: pickerChange,
7230
+ onPickEnd: pickerEnd,
7231
+ className: "picker-view-panel"
7232
+ },
7233
+ columnsList == null ? void 0 : columnsList.map((column, index) => {
7234
+ return /* @__PURE__ */ React.createElement(components.PickerViewColumn, { key: `col${index}` }, column.map((item, index2) => {
7235
+ return /* @__PURE__ */ React.createElement(
7236
+ components.View,
7237
+ {
7238
+ key: item.value || index2,
7239
+ className: "nut-picker-roller-item-title"
7240
+ },
7241
+ /* @__PURE__ */ React.createElement(React.Fragment, null, item.text || item)
7242
+ );
7243
+ }));
7244
+ })
7245
+ ))
7174
7246
  )
7175
7247
  );
7176
7248
  };
@@ -7188,7 +7260,7 @@ var __publicField = (obj, key, value) => {
7188
7260
  const useConfig = () => {
7189
7261
  return React.useContext(ConfigContext) ?? getDefaultConfig();
7190
7262
  };
7191
- const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
7263
+ const currentYear = new Date().getFullYear();
7192
7264
  const defaultProps$_ = {
7193
7265
  modelValue: null,
7194
7266
  visible: false,
@@ -7475,11 +7547,12 @@ var __publicField = (obj, key, value) => {
7475
7547
  }
7476
7548
  }, [currentDate]);
7477
7549
  return /* @__PURE__ */ React.createElement(
7478
- "div",
7550
+ components.View,
7479
7551
  {
7480
7552
  className: `nut-datepicker ${className || ""}`,
7481
7553
  style,
7482
- ...rest
7554
+ ...rest,
7555
+ catchMove: true
7483
7556
  },
7484
7557
  listData.length > 0 && /* @__PURE__ */ React.createElement(
7485
7558
  Picker$1,
@@ -7969,7 +8042,7 @@ var __publicField = (obj, key, value) => {
7969
8042
  if (maxlength && val.length > Number(maxlength)) {
7970
8043
  val = val.slice(0, Number(maxlength));
7971
8044
  }
7972
- updateValue(getModelValue(), "onBlur");
8045
+ updateValue(val, "onBlur");
7973
8046
  onBlur && onBlur(val, event);
7974
8047
  };
7975
8048
  const handleClickInput = (event) => {
@@ -9979,6 +10052,7 @@ var __publicField = (obj, key, value) => {
9979
10052
  onCompositionEnd: (e) => endComposing(),
9980
10053
  onCompositionStart: (e) => startComposing(),
9981
10054
  rows,
10055
+ maxLength: maxlength < 0 ? 0 : maxlength,
9982
10056
  placeholder: placeholder || locale.placeholder
9983
10057
  }
9984
10058
  ),
@@ -10277,7 +10351,7 @@ var __publicField = (obj, key, value) => {
10277
10351
  constructor() {
10278
10352
  __publicField(this, "status", "ready");
10279
10353
  __publicField(this, "message", "准备中..");
10280
- __publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
10354
+ __publicField(this, "uid", new Date().getTime().toString());
10281
10355
  __publicField(this, "name");
10282
10356
  __publicField(this, "url");
10283
10357
  __publicField(this, "type");
@@ -18356,7 +18430,7 @@ This message will only show in development mode. It won't appear in production.
18356
18430
  const touches = event.touches;
18357
18431
  const events = touches[0];
18358
18432
  const events2 = touches[1];
18359
- const curTouchTime = (/* @__PURE__ */ new Date()).getTime();
18433
+ const curTouchTime = new Date().getTime();
18360
18434
  if (curTouchTime - lastTouchEndTime < 300) {
18361
18435
  const store12 = store;
18362
18436
  if (store12.scale > 1) {
@@ -18410,7 +18484,7 @@ This message will only show in development mode. It won't appear in production.
18410
18484
  }
18411
18485
  };
18412
18486
  const onTouchEnd = () => {
18413
- setLastTouchEndTime((/* @__PURE__ */ new Date()).getTime());
18487
+ setLastTouchEndTime(new Date().getTime());
18414
18488
  const store1 = store;
18415
18489
  store1.moveable = false;
18416
18490
  if (store1.scale < 1.1 && store1.scale > 1 || store1.scale < 1) {
@@ -20845,7 +20919,7 @@ This message will only show in development mode. It won't appear in production.
20845
20919
  const barrageListSet = React.useRef(barrageList);
20846
20920
  const barrageBody = React.useRef(null);
20847
20921
  const barrageContainer = React.useRef(null);
20848
- const timeId = React.useRef((/* @__PURE__ */ new Date()).getTime());
20922
+ const timeId = React.useRef(new Date().getTime());
20849
20923
  const timer = React.useRef(0);
20850
20924
  React.useRef(0);
20851
20925
  const b2 = cn("barrage");