@nutui/nutui-react 3.0.8 → 3.0.9-beta.1

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 (141) hide show
  1. package/CHANGELOG.md +13 -14
  2. package/dist/cjs/hooks/index.d.ts +12 -0
  3. package/dist/cjs/hooks/index.js +17 -0
  4. package/dist/cjs/hooks/index.taro.js +19 -0
  5. package/dist/cjs/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  6. package/dist/cjs/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  7. package/dist/cjs/hooks/use-memo.d.ts +1 -1
  8. package/dist/cjs/hooks/use-memo.js +1 -1
  9. package/dist/cjs/hooks/use-refs.d.ts +1 -1
  10. package/dist/cjs/hooks/use-refs.js +1 -1
  11. package/dist/cjs/hooks/use-uuid.d.ts +1 -1
  12. package/dist/cjs/hooks/use-uuid.js +1 -1
  13. package/dist/cjs/hooks/use-watch.d.ts +2 -2
  14. package/dist/cjs/hooks/use-watch.js +2 -3
  15. package/dist/cjs/packages/avatarcropper/avatarcropper.js +2 -2
  16. package/dist/cjs/packages/configprovider/configprovider.js +4 -4
  17. package/dist/cjs/packages/noticebar/noticebar.js +4 -4
  18. package/dist/cjs/packages/nutui.react.build.d.ts +2 -0
  19. package/dist/cjs/packages/nutui.react.build.js +2 -0
  20. package/dist/cjs/packages/nutui.react.d.ts +2 -0
  21. package/dist/cjs/packages/nutui.react.js +2 -0
  22. package/dist/cjs/packages/picker/picker.js +2 -2
  23. package/dist/cjs/packages/popover/popover.js +2 -2
  24. package/dist/cjs/packages/range/range.js +3 -3
  25. package/dist/cjs/packages/rate/rate.js +4 -4
  26. package/dist/cjs/packages/sticky/sticky.js +9 -9
  27. package/dist/cjs/packages/swipe/swipe.js +2 -2
  28. package/dist/cjs/packages/tour/tour.js +2 -2
  29. package/dist/cjs/utils/clamp.d.ts +1 -0
  30. package/dist/cjs/utils/clamp.js +13 -0
  31. package/dist/cjs/utils/index.d.ts +28 -6
  32. package/dist/cjs/utils/index.js +29 -54
  33. package/dist/cjs/utils/index.taro.js +39 -0
  34. package/dist/cjs/utils/interceptor.js +2 -2
  35. package/dist/cjs/utils/is-function.d.ts +1 -0
  36. package/dist/cjs/utils/is-function.js +14 -0
  37. package/dist/cjs/utils/is-object.d.ts +1 -0
  38. package/dist/cjs/utils/is-object.js +14 -0
  39. package/dist/cjs/utils/is-promise.d.ts +1 -0
  40. package/dist/cjs/utils/is-promise.js +15 -0
  41. package/dist/cjs/utils/lru.d.ts +1 -1
  42. package/dist/cjs/utils/lru.js +1 -1
  43. package/dist/cjs/utils/merge.d.ts +0 -1
  44. package/dist/cjs/utils/merge.js +0 -4
  45. package/dist/cjs/utils/prevent-default.d.ts +1 -0
  46. package/dist/cjs/utils/prevent-default.js +18 -0
  47. package/dist/cjs/utils/raf.d.ts +0 -1
  48. package/dist/cjs/utils/raf.js +3 -6
  49. package/dist/{es/utils → cjs/utils/taro}/add-color-for-harmony.d.ts +1 -2
  50. package/dist/cjs/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +5 -11
  51. package/dist/cjs/utils/taro/get-rect-by-id.d.ts +1 -0
  52. package/dist/cjs/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +3 -3
  53. package/dist/cjs/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  54. package/dist/cjs/utils/{get-rect-by-taro.js → taro/get-rect.js} +9 -10
  55. package/dist/cjs/utils/taro/px-transform.d.ts +1 -0
  56. package/dist/cjs/utils/{px-transform.js → taro/px-transform.js} +3 -3
  57. package/dist/cjs/utils/upper-case-first.d.ts +1 -0
  58. package/dist/cjs/utils/upper-case-first.js +17 -0
  59. package/dist/es/hooks/index.d.ts +12 -0
  60. package/dist/es/hooks/index.js +12 -0
  61. package/dist/es/hooks/index.taro.js +14 -0
  62. package/dist/es/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  63. package/dist/es/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  64. package/dist/es/hooks/use-memo.d.ts +1 -1
  65. package/dist/es/hooks/use-memo.js +1 -1
  66. package/dist/es/hooks/use-refs.d.ts +1 -1
  67. package/dist/es/hooks/use-refs.js +1 -1
  68. package/dist/es/hooks/use-uuid.d.ts +1 -1
  69. package/dist/es/hooks/use-uuid.js +1 -1
  70. package/dist/es/hooks/use-watch.d.ts +2 -2
  71. package/dist/es/hooks/use-watch.js +1 -2
  72. package/dist/es/packages/avatarcropper/avatarcropper.js +1 -1
  73. package/dist/es/packages/configprovider/configprovider.js +2 -2
  74. package/dist/es/packages/noticebar/noticebar.js +1 -1
  75. package/dist/es/packages/nutui.react.build.d.ts +2 -0
  76. package/dist/es/packages/nutui.react.build.js +2 -0
  77. package/dist/es/packages/picker/picker.js +1 -1
  78. package/dist/es/packages/popover/popover.js +1 -1
  79. package/dist/es/packages/range/range.js +1 -1
  80. package/dist/es/packages/rate/rate.js +2 -2
  81. package/dist/es/packages/sticky/sticky.js +2 -2
  82. package/dist/es/packages/swipe/swipe.js +1 -1
  83. package/dist/es/packages/tour/tour.js +1 -1
  84. package/dist/es/utils/clamp.d.ts +1 -0
  85. package/dist/es/utils/clamp.js +3 -0
  86. package/dist/es/utils/index.d.ts +28 -6
  87. package/dist/es/utils/index.js +28 -29
  88. package/dist/es/utils/index.taro.js +34 -0
  89. package/dist/es/utils/interceptor.js +1 -1
  90. package/dist/es/utils/is-function.d.ts +1 -0
  91. package/dist/es/utils/is-function.js +4 -0
  92. package/dist/es/utils/is-object.d.ts +1 -0
  93. package/dist/es/utils/is-object.js +4 -0
  94. package/dist/es/utils/is-promise.d.ts +1 -0
  95. package/dist/es/utils/is-promise.js +5 -0
  96. package/dist/es/utils/lru.d.ts +1 -1
  97. package/dist/es/utils/lru.js +1 -2
  98. package/dist/es/utils/merge.d.ts +0 -1
  99. package/dist/es/utils/merge.js +0 -1
  100. package/dist/es/utils/prevent-default.d.ts +1 -0
  101. package/dist/es/utils/prevent-default.js +8 -0
  102. package/dist/es/utils/raf.d.ts +0 -1
  103. package/dist/es/utils/raf.js +1 -1
  104. package/dist/{cjs/utils → es/utils/taro}/add-color-for-harmony.d.ts +1 -2
  105. package/dist/es/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +2 -3
  106. package/dist/es/utils/taro/get-rect-by-id.d.ts +1 -0
  107. package/dist/es/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +1 -1
  108. package/dist/es/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  109. package/dist/es/utils/{get-rect-by-taro.js → taro/get-rect.js} +4 -4
  110. package/dist/es/utils/taro/px-transform.d.ts +1 -0
  111. package/dist/es/utils/{px-transform.js → taro/px-transform.js} +2 -2
  112. package/dist/es/utils/upper-case-first.d.ts +1 -0
  113. package/dist/es/utils/upper-case-first.js +7 -0
  114. package/dist/nutui.react.umd.js +961 -724
  115. package/dist/style.css +1 -1
  116. package/dist/style.scss +33 -33
  117. package/package.json +1 -1
  118. package/dist/cjs/hooks/use-taro-rect.d.ts +0 -1
  119. package/dist/cjs/utils/px-transform.d.ts +0 -1
  120. package/dist/es/hooks/use-taro-rect.d.ts +0 -1
  121. package/dist/es/utils/px-transform.d.ts +0 -1
  122. /package/dist/cjs/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  123. /package/dist/cjs/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  124. /package/dist/cjs/utils/{test/event.d.ts → event-mocker.d.ts} +0 -0
  125. /package/dist/cjs/utils/{test/event.js → event-mocker.js} +0 -0
  126. /package/dist/cjs/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  127. /package/dist/cjs/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  128. /package/dist/cjs/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  129. /package/dist/cjs/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  130. /package/dist/cjs/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  131. /package/dist/cjs/utils/{platform-taro.js → taro/platform.js} +0 -0
  132. /package/dist/es/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  133. /package/dist/es/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  134. /package/dist/es/utils/{test/event.d.ts → event-mocker.d.ts} +0 -0
  135. /package/dist/es/utils/{test/event.js → event-mocker.js} +0 -0
  136. /package/dist/es/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  137. /package/dist/es/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  138. /package/dist/es/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  139. /package/dist/es/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  140. /package/dist/es/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  141. /package/dist/es/utils/{platform-taro.js → taro/platform.js} +0 -0
@@ -1812,7 +1812,663 @@ Check the top-level render call using <` + t + ">.");
1812
1812
  errorCanvasTips: "当前环境不支持Canvas"
1813
1813
  }
1814
1814
  };
1815
- var inBrowser = typeof window !== "undefined";
1815
+ function bound(position2, min, max) {
1816
+ var ret = position2;
1817
+ if (min !== void 0) {
1818
+ ret = Math.max(position2, min);
1819
+ }
1820
+ if (max !== void 0) {
1821
+ ret = Math.min(ret, max);
1822
+ }
1823
+ return ret;
1824
+ }
1825
+ var UPPERCASE = RegExp("[\\p{Lu}]", "u");
1826
+ var LOWERCASE = RegExp("[\\p{Ll}]", "u");
1827
+ var LEADING_CAPITAL = RegExp("^[\\p{Lu}](?![\\p{Lu}])", "gu");
1828
+ var IDENTIFIER = RegExp("([\\p{Alpha}\\p{N}_]|$)", "u");
1829
+ var SEPARATORS = /[_.\- ]+/;
1830
+ var LEADING_SEPARATORS = new RegExp("^".concat(SEPARATORS.source));
1831
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1832
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+".concat(IDENTIFIER.source), "gu");
1833
+ var preserveCamelCase = function(string2, toLowerCase, toUpperCase) {
1834
+ var isLastCharLower = false;
1835
+ var isLastCharUpper = false;
1836
+ var isLastLastCharUpper = false;
1837
+ for (var index2 = 0; index2 < string2.length; index2++) {
1838
+ var character = string2[index2];
1839
+ if (isLastCharLower && UPPERCASE.test(character)) {
1840
+ string2 = "".concat(string2.slice(0, index2), "-").concat(string2.slice(index2));
1841
+ isLastCharLower = false;
1842
+ isLastLastCharUpper = isLastCharUpper;
1843
+ isLastCharUpper = true;
1844
+ index2++;
1845
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
1846
+ string2 = "".concat(string2.slice(0, index2 - 1), "-").concat(string2.slice(index2 - 1));
1847
+ isLastLastCharUpper = isLastCharUpper;
1848
+ isLastCharUpper = false;
1849
+ isLastCharLower = true;
1850
+ } else {
1851
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
1852
+ isLastLastCharUpper = isLastCharUpper;
1853
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
1854
+ }
1855
+ }
1856
+ return string2;
1857
+ };
1858
+ var preserveConsecutiveUppercase = function(input, toLowerCase) {
1859
+ LEADING_CAPITAL.lastIndex = 0;
1860
+ return input.replace(LEADING_CAPITAL, function(m1) {
1861
+ return toLowerCase(m1);
1862
+ });
1863
+ };
1864
+ var postProcess = function(input, toUpperCase) {
1865
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
1866
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
1867
+ return input.replace(SEPARATORS_AND_IDENTIFIER, function(_, identifier) {
1868
+ return toUpperCase(identifier);
1869
+ }).replace(NUMBERS_AND_IDENTIFIER, function(m2) {
1870
+ return toUpperCase(m2);
1871
+ });
1872
+ };
1873
+ var camelCase = function(input, options2) {
1874
+ if (!(typeof input === "string" || Array.isArray(input))) {
1875
+ throw new TypeError("Expected the input to be `string | string[]`");
1876
+ }
1877
+ options2 = _object_spread({
1878
+ pascalCase: false,
1879
+ preserveConsecutiveUppercase: false
1880
+ }, options2);
1881
+ if (Array.isArray(input)) {
1882
+ input = input.map(function(x) {
1883
+ return x.trim();
1884
+ }).filter(function(x) {
1885
+ return x.length;
1886
+ }).join("-");
1887
+ } else {
1888
+ input = input.trim();
1889
+ }
1890
+ if (input.length === 0) {
1891
+ return "";
1892
+ }
1893
+ var toLowerCase = options2.locale === false ? function(string2) {
1894
+ return string2.toLowerCase();
1895
+ } : function(string2) {
1896
+ return string2.toLocaleLowerCase(options2.locale);
1897
+ };
1898
+ var toUpperCase = options2.locale === false ? function(string2) {
1899
+ return string2.toUpperCase();
1900
+ } : function(string2) {
1901
+ return string2.toLocaleUpperCase(options2.locale);
1902
+ };
1903
+ if (input.length === 1) {
1904
+ if (SEPARATORS.test(input)) {
1905
+ return "";
1906
+ }
1907
+ return options2.pascalCase ? toUpperCase(input) : toLowerCase(input);
1908
+ }
1909
+ var hasUpperCase = input !== toLowerCase(input);
1910
+ if (hasUpperCase) {
1911
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
1912
+ }
1913
+ input = input.replace(LEADING_SEPARATORS, "");
1914
+ input = options2.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
1915
+ if (options2.pascalCase) {
1916
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
1917
+ }
1918
+ return postProcess(input, toUpperCase);
1919
+ };
1920
+ var canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
1921
+ var clamp$2 = function(num, min, max) {
1922
+ return Math.min(Math.max(num, min), max);
1923
+ };
1924
+ function _array_like_to_array(arr, len) {
1925
+ if (len == null || len > arr.length) len = arr.length;
1926
+ for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) arr2[i2] = arr[i2];
1927
+ return arr2;
1928
+ }
1929
+ function _array_without_holes(arr) {
1930
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
1931
+ }
1932
+ function _iterable_to_array(iter) {
1933
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
1934
+ return Array.from(iter);
1935
+ }
1936
+ }
1937
+ function _non_iterable_spread() {
1938
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1939
+ }
1940
+ function _unsupported_iterable_to_array(o, minLen) {
1941
+ if (!o) return;
1942
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1943
+ var n2 = Object.prototype.toString.call(o).slice(8, -1);
1944
+ if (n2 === "Object" && o.constructor) n2 = o.constructor.name;
1945
+ if (n2 === "Map" || n2 === "Set") return Array.from(n2);
1946
+ if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _array_like_to_array(o, minLen);
1947
+ }
1948
+ function _to_consumable_array(arr) {
1949
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1950
+ }
1951
+ var Utils = {
1952
+ /**
1953
+ * 是否为闫年
1954
+ * @return {Boolse} true|false
1955
+ */
1956
+ isLeapYear: function isLeapYear(y) {
1957
+ return y % 4 === 0 && y % 100 !== 0 || y % 400 === 0;
1958
+ },
1959
+ /**
1960
+ * 返回星期数
1961
+ * @return {String}
1962
+ */
1963
+ getWhatDay: function getWhatDay(year, month, day) {
1964
+ var date2 = new Date("".concat(year, "/").concat(month, "/").concat(day));
1965
+ var index2 = date2.getDay();
1966
+ var dayNames = [
1967
+ "星期日",
1968
+ "星期一",
1969
+ "星期二",
1970
+ "星期三",
1971
+ "星期四",
1972
+ "星期五",
1973
+ "星期六"
1974
+ ];
1975
+ return dayNames[index2];
1976
+ },
1977
+ /**
1978
+ * 返回上一个月在当前面板中的天数
1979
+ * @return {Number}
1980
+ */
1981
+ getMonthPreDay: function getMonthPreDay(year, month) {
1982
+ var date2 = new Date("".concat(year, "/").concat(month, "/01"));
1983
+ var day = date2.getDay();
1984
+ if (day === 0) {
1985
+ day = 7;
1986
+ }
1987
+ return day;
1988
+ },
1989
+ /**
1990
+ * 返回月份天数
1991
+ * @return {Number}
1992
+ */
1993
+ getMonthDays: function getMonthDays(year, month) {
1994
+ if (/^0/.test(month)) {
1995
+ month = month.split("")[1];
1996
+ }
1997
+ return [
1998
+ 0,
1999
+ 31,
2000
+ this.isLeapYear(Number(year)) ? 29 : 28,
2001
+ 31,
2002
+ 30,
2003
+ 31,
2004
+ 30,
2005
+ 31,
2006
+ 31,
2007
+ 30,
2008
+ 31,
2009
+ 30,
2010
+ 31
2011
+ ][month];
2012
+ },
2013
+ /**
2014
+ * 补齐数字位数
2015
+ * @return {string}
2016
+ */
2017
+ getNumTwoBit: function getNumTwoBit(n2) {
2018
+ n2 = Number(n2);
2019
+ return (n2 > 9 ? "" : "0") + n2;
2020
+ },
2021
+ /**
2022
+ * 日期对象转成字符串
2023
+ * @return {string}
2024
+ */
2025
+ date2Str: function date2Str(date2, split) {
2026
+ split = split || "-";
2027
+ var y = date2.getFullYear();
2028
+ var m2 = this.getNumTwoBit(date2.getMonth() + 1);
2029
+ var d2 = this.getNumTwoBit(date2.getDate());
2030
+ return [
2031
+ y,
2032
+ m2,
2033
+ d2
2034
+ ].join(split);
2035
+ },
2036
+ /**
2037
+ * 返回日期格式字符串
2038
+ * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
2039
+ * @return {string} '2014-12-31'
2040
+ */
2041
+ getDay: function getDay(i2) {
2042
+ i2 = i2 || 0;
2043
+ var date2 = /* @__PURE__ */ new Date();
2044
+ var diff = i2 * (1e3 * 60 * 60 * 24);
2045
+ date2 = new Date(date2.getTime() + diff);
2046
+ return this.date2Str(date2);
2047
+ },
2048
+ /**
2049
+ * 时间比较
2050
+ * @return {Boolean}
2051
+ */
2052
+ compareDate: function compareDate(date1, date2) {
2053
+ var startTime = new Date(date1.replace("-", "/").replace("-", "/"));
2054
+ var endTime = new Date(date2.replace("-", "/").replace("-", "/"));
2055
+ if (startTime >= endTime) {
2056
+ return false;
2057
+ }
2058
+ return true;
2059
+ },
2060
+ /**
2061
+ * 时间是否相等
2062
+ * @return {Boolean}
2063
+ */
2064
+ isEqual: function isEqual2(date1, date2) {
2065
+ var startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
2066
+ var endTime = new Date(date2.replace(/-/g, "/")).getTime();
2067
+ if (startTime === endTime) {
2068
+ return true;
2069
+ }
2070
+ return false;
2071
+ },
2072
+ getMonthWeek: function getMonthWeek(year, month, date2) {
2073
+ var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
2074
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2075
+ var w = dateNow.getDay();
2076
+ var d2 = dateNow.getDate();
2077
+ var remainder = 6 - w;
2078
+ if (firstDayOfWeek !== 0) {
2079
+ w = w === 0 ? 7 : w;
2080
+ remainder = 7 - w;
2081
+ }
2082
+ return Math.ceil((d2 + remainder) / 7);
2083
+ },
2084
+ getYearWeek: function getYearWeek(year, month, date2) {
2085
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2086
+ var dateFirst = new Date(Number(year), 0, 1);
2087
+ var dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 864e5);
2088
+ return Math.ceil((dataNumber + (dateFirst.getDay() + 1 - 1)) / 7);
2089
+ },
2090
+ getWeekDate: function getWeekDate(year, month, date2) {
2091
+ var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
2092
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2093
+ var nowTime = dateNow.getTime();
2094
+ var day = dateNow.getDay();
2095
+ if (firstDayOfWeek === 0) {
2096
+ var oneDayTime = 24 * 60 * 60 * 1e3;
2097
+ var SundayTime = nowTime - day * oneDayTime;
2098
+ var SaturdayTime = nowTime + (6 - day) * oneDayTime;
2099
+ var sunday = this.date2Str(new Date(SundayTime));
2100
+ var saturday = this.date2Str(new Date(SaturdayTime));
2101
+ return [
2102
+ sunday,
2103
+ saturday
2104
+ ];
2105
+ }
2106
+ day = day === 0 ? 7 : day;
2107
+ var oneDayTime1 = 24 * 60 * 60 * 1e3;
2108
+ var MondayTime = nowTime - (day - 1) * oneDayTime1;
2109
+ var SundayTime1 = nowTime + (7 - day) * oneDayTime1;
2110
+ var monday = this.date2Str(new Date(MondayTime));
2111
+ var sunday1 = this.date2Str(new Date(SundayTime1));
2112
+ return [
2113
+ monday,
2114
+ sunday1
2115
+ ];
2116
+ },
2117
+ formatResultDate: function formatResultDate(date2) {
2118
+ var days = _to_consumable_array(date2.split("-"));
2119
+ days[2] = Utils.getNumTwoBit(Number(days[2]));
2120
+ days[3] = "".concat(days[0], "-").concat(days[1], "-").concat(days[2]);
2121
+ days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
2122
+ return days;
2123
+ }
2124
+ };
2125
+ var getCurrMonthData = function(type2, year, month) {
2126
+ switch (type2) {
2127
+ case "prev":
2128
+ month === 1 && (year -= 1);
2129
+ month = month === 1 ? 12 : --month;
2130
+ break;
2131
+ case "next":
2132
+ month === 12 && (year += 1);
2133
+ month = month === 12 ? 1 : ++month;
2134
+ break;
2135
+ }
2136
+ return [
2137
+ year,
2138
+ Utils.getNumTwoBit(month),
2139
+ Utils.getMonthDays(String(year), String(month))
2140
+ ];
2141
+ };
2142
+ var getDaysStatus = function(type2, year, month) {
2143
+ var days = Utils.getMonthDays("".concat(year), "".concat(month));
2144
+ if (type2 === "prev" && days >= 7) {
2145
+ days -= 7;
2146
+ }
2147
+ return Array.from(Array(days), function(v, k) {
2148
+ return {
2149
+ day: k + 1,
2150
+ type: type2,
2151
+ year,
2152
+ month
2153
+ };
2154
+ });
2155
+ };
2156
+ var getPreMonthDates = function(type2, year, month, firstDayOfWeek) {
2157
+ var preMonth = +month - 1;
2158
+ var preYear = year;
2159
+ if (preMonth <= 0) {
2160
+ preMonth = 12;
2161
+ preYear += 1;
2162
+ }
2163
+ var days = Utils.getMonthPreDay(+year, +month);
2164
+ days -= firstDayOfWeek;
2165
+ if (type2 === "prev" && days >= 7) {
2166
+ days -= 7;
2167
+ }
2168
+ var preDates = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
2169
+ var months = Array.from(Array(preDates), function(v, k) {
2170
+ return {
2171
+ day: k + 1,
2172
+ type: type2,
2173
+ preYear,
2174
+ preMonth
2175
+ };
2176
+ });
2177
+ return months.slice(preDates - days);
2178
+ };
2179
+ var inBrowser = typeof document !== "undefined" && !!document.scripts;
2180
+ function isWindow(val2) {
2181
+ return val2 === window;
2182
+ }
2183
+ var getRect = function(elementRef) {
2184
+ var element = elementRef;
2185
+ if (isWindow(element)) {
2186
+ var width2 = element.innerWidth;
2187
+ var height2 = element.innerHeight;
2188
+ return {
2189
+ top: 0,
2190
+ left: 0,
2191
+ right: width2,
2192
+ bottom: height2,
2193
+ width: width2,
2194
+ height: height2
2195
+ };
2196
+ }
2197
+ if (element && element.getBoundingClientRect) {
2198
+ console.log(element, element.getBoundingClientRect());
2199
+ return element.getBoundingClientRect();
2200
+ }
2201
+ return {
2202
+ top: 0,
2203
+ left: 0,
2204
+ right: 0,
2205
+ bottom: 0,
2206
+ width: 0,
2207
+ height: 0
2208
+ };
2209
+ };
2210
+ var defaultRoot = canUseDom ? window : void 0;
2211
+ var overflowStylePatterns = [
2212
+ "scroll",
2213
+ "auto",
2214
+ "overlay"
2215
+ ];
2216
+ function isElement(node) {
2217
+ var ELEMENT_NODE_TYPE = 1;
2218
+ return node.nodeType === ELEMENT_NODE_TYPE;
2219
+ }
2220
+ function getScrollParent(el) {
2221
+ var root2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultRoot;
2222
+ var node = el;
2223
+ while (node && node !== root2 && isElement(node)) {
2224
+ if (node === document.body) {
2225
+ return root2;
2226
+ }
2227
+ var overflowY = window.getComputedStyle(node).overflowY;
2228
+ if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
2229
+ return node;
2230
+ }
2231
+ node = node.parentNode;
2232
+ }
2233
+ return root2;
2234
+ }
2235
+ function getAllScrollableParents(element) {
2236
+ var scrollableParents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2237
+ if (!element) {
2238
+ return scrollableParents;
2239
+ }
2240
+ var isScrollable = element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
2241
+ if (isScrollable) {
2242
+ if (element.nodeName === "HTML") {
2243
+ scrollableParents.push(document);
2244
+ } else {
2245
+ scrollableParents.push(element);
2246
+ }
2247
+ }
2248
+ return getAllScrollableParents(element.parentElement, scrollableParents);
2249
+ }
2250
+ function _type_of(obj) {
2251
+ "@swc/helpers - typeof";
2252
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2253
+ }
2254
+ var isObject = function(val2) {
2255
+ return val2 !== null && (typeof val2 === "undefined" ? "undefined" : _type_of(val2)) === "object";
2256
+ };
2257
+ var isFunction = function(val2) {
2258
+ return typeof val2 === "function";
2259
+ };
2260
+ var isPromise = function(val2) {
2261
+ return isObject(val2) && isFunction(val2.then) && isFunction(val2.catch);
2262
+ };
2263
+ var funcInterceptor = function(interceptor, param) {
2264
+ var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
2265
+ if (interceptor) {
2266
+ var returnVal = interceptor.apply(null, args);
2267
+ if (isPromise(returnVal)) {
2268
+ returnVal.then(function(value2) {
2269
+ if (value2) {
2270
+ done(value2);
2271
+ } else if (canceled) {
2272
+ canceled();
2273
+ }
2274
+ }).catch(function() {
2275
+ });
2276
+ } else if (returnVal) {
2277
+ done();
2278
+ } else if (canceled) {
2279
+ canceled();
2280
+ }
2281
+ } else {
2282
+ done();
2283
+ }
2284
+ };
2285
+ var isDate = function(val2) {
2286
+ return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
2287
+ };
2288
+ var isEmpty = function(p2) {
2289
+ if (p2 === null || p2 === void 0) return true;
2290
+ if ((typeof p2 === "undefined" ? "undefined" : _type_of(p2)) === "object" && Object.keys(p2).length === 0) return true;
2291
+ if (Array.isArray(p2) && p2.length === 0) return true;
2292
+ return false;
2293
+ };
2294
+ function isForwardRefComponent(component) {
2295
+ return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
2296
+ React.forwardRef(
2297
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2298
+ // @ts-ignore
2299
+ function() {
2300
+ }
2301
+ ).$$typeof === component.type.$$typeof;
2302
+ }
2303
+ function _class_call_check(instance, Constructor) {
2304
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
2305
+ }
2306
+ function _defineProperties(target, props) {
2307
+ for (var i2 = 0; i2 < props.length; i2++) {
2308
+ var descriptor = props[i2];
2309
+ descriptor.enumerable = descriptor.enumerable || false;
2310
+ descriptor.configurable = true;
2311
+ if ("value" in descriptor) descriptor.writable = true;
2312
+ Object.defineProperty(target, descriptor.key, descriptor);
2313
+ }
2314
+ }
2315
+ function _create_class(Constructor, protoProps, staticProps) {
2316
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2317
+ return Constructor;
2318
+ }
2319
+ var MiniLru = /* @__PURE__ */ function() {
2320
+ function MiniLru2(capacity) {
2321
+ _class_call_check(this, MiniLru2);
2322
+ _define_property(this, "cache", void 0);
2323
+ _define_property(this, "capacity", void 0);
2324
+ if (capacity <= 0) {
2325
+ throw new Error("Cache capacity must be a positive number");
2326
+ }
2327
+ this.cache = /* @__PURE__ */ new Map();
2328
+ this.capacity = capacity;
2329
+ }
2330
+ _create_class(MiniLru2, [
2331
+ {
2332
+ key: "get",
2333
+ value: function get(key2) {
2334
+ if (this.cache.has(key2)) {
2335
+ var value2 = this.cache.get(key2);
2336
+ this.cache.delete(key2);
2337
+ this.cache.set(key2, value2);
2338
+ return value2;
2339
+ }
2340
+ return null;
2341
+ }
2342
+ },
2343
+ {
2344
+ key: "set",
2345
+ value: function set(key2, value2) {
2346
+ if (this.cache.has(key2)) {
2347
+ this.cache.delete(key2);
2348
+ } else if (this.cache.size >= this.capacity) {
2349
+ this.cache.delete(this.cache.keys().next().value);
2350
+ }
2351
+ this.cache.set(key2, value2);
2352
+ }
2353
+ },
2354
+ {
2355
+ key: "has",
2356
+ value: function has2(key2) {
2357
+ return this.cache.has(key2);
2358
+ }
2359
+ }
2360
+ ]);
2361
+ return MiniLru2;
2362
+ }();
2363
+ function main() {
2364
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2365
+ items[_key] = arguments[_key];
2366
+ }
2367
+ return merge.apply(void 0, _to_consumable_array(items));
2368
+ }
2369
+ main.clone = clone;
2370
+ main.isPlainObject = isPlainObject;
2371
+ main.recursive = recursive;
2372
+ function merge() {
2373
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2374
+ items[_key] = arguments[_key];
2375
+ }
2376
+ return _merge(items[0] === true, false, items);
2377
+ }
2378
+ function recursive() {
2379
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2380
+ items[_key] = arguments[_key];
2381
+ }
2382
+ return _merge(items[0] === true, true, items);
2383
+ }
2384
+ function clone(input) {
2385
+ if (Array.isArray(input)) {
2386
+ var output = [];
2387
+ for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
2388
+ return output;
2389
+ }
2390
+ if (isPlainObject(input)) {
2391
+ var output1 = {};
2392
+ for (var index1 in input) output1[index1] = clone(input[index1]);
2393
+ return output1;
2394
+ }
2395
+ return input;
2396
+ }
2397
+ function isPlainObject(input) {
2398
+ if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
2399
+ if (Object.getPrototypeOf(input) === null) return true;
2400
+ var ref = input;
2401
+ while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
2402
+ return Object.getPrototypeOf(input) === ref;
2403
+ }
2404
+ function _recursiveMerge(base, extend) {
2405
+ if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
2406
+ for (var key2 in extend) {
2407
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
2408
+ base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
2409
+ }
2410
+ return base;
2411
+ }
2412
+ function _merge(isClone, isRecursive, items) {
2413
+ var result;
2414
+ if (isClone || !isPlainObject(result = items.shift())) result = {};
2415
+ for (var index2 = 0; index2 < items.length; ++index2) {
2416
+ var item = items[index2];
2417
+ if (!isPlainObject(item)) continue;
2418
+ for (var key2 in item) {
2419
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
2420
+ var value2 = isClone ? clone(item[key2]) : item[key2];
2421
+ result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
2422
+ }
2423
+ }
2424
+ return result;
2425
+ }
2426
+ function mergeProps() {
2427
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2428
+ items[_key] = arguments[_key];
2429
+ }
2430
+ var ret = {};
2431
+ items.forEach(function(item) {
2432
+ if (item) {
2433
+ Object.keys(item).forEach(function(key2) {
2434
+ if (item[key2] !== void 0) {
2435
+ ret[key2] = item[key2];
2436
+ }
2437
+ });
2438
+ }
2439
+ });
2440
+ return ret;
2441
+ }
2442
+ function mergeProp(defaultProp) {
2443
+ for (var _len = arguments.length, propList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2444
+ propList[_key - 1] = arguments[_key];
2445
+ }
2446
+ for (var i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
2447
+ if (propList[i2] !== void 0) {
2448
+ return propList[i2];
2449
+ }
2450
+ }
2451
+ return defaultProp;
2452
+ }
2453
+ var padZero = function(num) {
2454
+ var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
2455
+ var str = "".concat(num);
2456
+ while (str.length < targetLength) {
2457
+ str = "0".concat(str);
2458
+ }
2459
+ return str;
2460
+ };
2461
+ function preventDefault$1(event, isStopPropagation) {
2462
+ if (typeof event.cancelable !== "boolean" || event.cancelable) {
2463
+ event.preventDefault();
2464
+ }
2465
+ if (isStopPropagation) {
2466
+ event.stopPropagation();
2467
+ }
2468
+ }
2469
+ var pxCheck = function(value2) {
2470
+ return parseFloat(value2.toString());
2471
+ };
1816
2472
  function requestAniFrame() {
1817
2473
  if (inBrowser) {
1818
2474
  var _window = window;
@@ -1833,6 +2489,209 @@ Check the top-level render call using <` + t + ">.");
1833
2489
  }
1834
2490
  }
1835
2491
  const requestAniFrame$1 = requestAniFrame();
2492
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
2493
+ try {
2494
+ var info = gen[key2](arg);
2495
+ var value2 = info.value;
2496
+ } catch (error) {
2497
+ reject(error);
2498
+ return;
2499
+ }
2500
+ if (info.done) resolve(value2);
2501
+ else Promise.resolve(value2).then(_next, _throw);
2502
+ }
2503
+ function _async_to_generator(fn) {
2504
+ return function() {
2505
+ var self2 = this, args = arguments;
2506
+ return new Promise(function(resolve, reject) {
2507
+ var gen = fn.apply(self2, args);
2508
+ function _next(value2) {
2509
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
2510
+ }
2511
+ function _throw(err) {
2512
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
2513
+ }
2514
+ _next(void 0);
2515
+ });
2516
+ };
2517
+ }
2518
+ function __generator(thisArg, body) {
2519
+ var _ = { label: 0, sent: function() {
2520
+ if (t[0] & 1) throw t[1];
2521
+ return t[1];
2522
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
2523
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
2524
+ return this;
2525
+ }), g;
2526
+ function verb(n2) {
2527
+ return function(v) {
2528
+ return step([n2, v]);
2529
+ };
2530
+ }
2531
+ function step(op) {
2532
+ if (f) throw new TypeError("Generator is already executing.");
2533
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
2534
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2535
+ if (y = 0, t) op = [op[0] & 2, t.value];
2536
+ switch (op[0]) {
2537
+ case 0:
2538
+ case 1:
2539
+ t = op;
2540
+ break;
2541
+ case 4:
2542
+ _.label++;
2543
+ return { value: op[1], done: false };
2544
+ case 5:
2545
+ _.label++;
2546
+ y = op[1];
2547
+ op = [0];
2548
+ continue;
2549
+ case 7:
2550
+ op = _.ops.pop();
2551
+ _.trys.pop();
2552
+ continue;
2553
+ default:
2554
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2555
+ _ = 0;
2556
+ continue;
2557
+ }
2558
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2559
+ _.label = op[1];
2560
+ break;
2561
+ }
2562
+ if (op[0] === 6 && _.label < t[1]) {
2563
+ _.label = t[1];
2564
+ t = op;
2565
+ break;
2566
+ }
2567
+ if (t && _.label < t[2]) {
2568
+ _.label = t[2];
2569
+ _.ops.push(op);
2570
+ break;
2571
+ }
2572
+ if (t[2]) _.ops.pop();
2573
+ _.trys.pop();
2574
+ continue;
2575
+ }
2576
+ op = body.call(thisArg, _);
2577
+ } catch (e2) {
2578
+ op = [6, e2];
2579
+ y = 0;
2580
+ } finally {
2581
+ f = t = 0;
2582
+ }
2583
+ if (op[0] & 5) throw op[1];
2584
+ return { value: op[0] ? op[1] : void 0, done: true };
2585
+ }
2586
+ }
2587
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
2588
+ var e2 = new Error(message);
2589
+ return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
2590
+ };
2591
+ var fullClone = _object_spread({}, ReactDOM__namespace);
2592
+ var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
2593
+ var createRoot;
2594
+ try {
2595
+ var mainVersion = Number((version || "").split(".")[0]);
2596
+ if (mainVersion >= 18 && fullClone.createRoot) {
2597
+ createRoot = fullClone.createRoot;
2598
+ }
2599
+ } catch (e2) {
2600
+ }
2601
+ function toggleWarning(skip) {
2602
+ var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2603
+ if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === "undefined" ? "undefined" : _type_of(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) === "object") {
2604
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
2605
+ }
2606
+ }
2607
+ var MARK = "__nutui_react_root__";
2608
+ function legacyRender(node, container) {
2609
+ reactRender(node, container);
2610
+ }
2611
+ function concurrentRender(node, container) {
2612
+ toggleWarning(true);
2613
+ var root2 = container[MARK] || createRoot(container);
2614
+ toggleWarning(false);
2615
+ root2.render(node);
2616
+ container[MARK] = root2;
2617
+ }
2618
+ function render(node, container) {
2619
+ if (createRoot) {
2620
+ concurrentRender(node, container);
2621
+ return;
2622
+ }
2623
+ legacyRender(node, container);
2624
+ }
2625
+ function legacyUnmount(container) {
2626
+ return unmountComponentAtNode(container);
2627
+ }
2628
+ function concurrentUnmount(container) {
2629
+ return _concurrentUnmount.apply(this, arguments);
2630
+ }
2631
+ function _concurrentUnmount() {
2632
+ _concurrentUnmount = _async_to_generator(function(container) {
2633
+ return __generator(this, function(_state) {
2634
+ return [
2635
+ 2,
2636
+ Promise.resolve().then(function() {
2637
+ var _container_MARK;
2638
+ (_container_MARK = container[MARK]) === null || _container_MARK === void 0 ? void 0 : _container_MARK.unmount();
2639
+ delete container[MARK];
2640
+ })
2641
+ ];
2642
+ });
2643
+ });
2644
+ return _concurrentUnmount.apply(this, arguments);
2645
+ }
2646
+ function unmount(container) {
2647
+ if (createRoot) {
2648
+ return concurrentUnmount(container);
2649
+ }
2650
+ return legacyUnmount(container);
2651
+ }
2652
+ function rubberband$1(distance, dimension, constant) {
2653
+ return distance * dimension * constant / (dimension + constant * distance);
2654
+ }
2655
+ function rubberbandIfOutOfBounds$1(position2, min, max, dimension) {
2656
+ var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
2657
+ if (constant === 0) return bound(position2, min, max);
2658
+ if (position2 < min) return -rubberband$1(min - position2, dimension, constant) + min;
2659
+ if (position2 > max) return +rubberband$1(position2 - max, dimension, constant) + max;
2660
+ return position2;
2661
+ }
2662
+ var sleep = function(time2) {
2663
+ return new Promise(function(resolve) {
2664
+ return setTimeout(resolve, time2);
2665
+ });
2666
+ };
2667
+ exports.passiveSupported = false;
2668
+ if (canUseDom) {
2669
+ try {
2670
+ var opts = Object.defineProperty({}, "passive", {
2671
+ get: function get() {
2672
+ exports.passiveSupported = true;
2673
+ }
2674
+ });
2675
+ window.addEventListener("test-passive-supported", null, opts);
2676
+ } catch (e2) {
2677
+ console.log(e2);
2678
+ }
2679
+ }
2680
+ function toArray$1(value2) {
2681
+ if (value2 === void 0 || value2 === null) {
2682
+ return [];
2683
+ }
2684
+ return Array.isArray(value2) ? value2 : [
2685
+ value2
2686
+ ];
2687
+ }
2688
+ var upperCaseFirst = function(str) {
2689
+ str = str.toLowerCase();
2690
+ str = str.replace(/\b\w+\b/g, function(word) {
2691
+ return word.substring(0, 1).toUpperCase() + word.substring(1);
2692
+ });
2693
+ return str;
2694
+ };
1836
2695
  var classPrefix$u = "nut-configprovider";
1837
2696
  var defaultConfigRef = {
1838
2697
  current: {
@@ -1994,19 +2853,6 @@ Check the top-level render call using <` + t + ">.");
1994
2853
  function _non_iterable_rest() {
1995
2854
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1996
2855
  }
1997
- function _array_like_to_array(arr, len) {
1998
- if (len == null || len > arr.length) len = arr.length;
1999
- for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) arr2[i2] = arr[i2];
2000
- return arr2;
2001
- }
2002
- function _unsupported_iterable_to_array(o, minLen) {
2003
- if (!o) return;
2004
- if (typeof o === "string") return _array_like_to_array(o, minLen);
2005
- var n2 = Object.prototype.toString.call(o).slice(8, -1);
2006
- if (n2 === "Object" && o.constructor) n2 = o.constructor.name;
2007
- if (n2 === "Map" || n2 === "Set") return Array.from(n2);
2008
- if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _array_like_to_array(o, minLen);
2009
- }
2010
2856
  function _sliced_to_array(arr, i2) {
2011
2857
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i2) || _unsupported_iterable_to_array(arr, i2) || _non_iterable_rest();
2012
2858
  }
@@ -3960,60 +4806,6 @@ Check the top-level render call using <` + t + ">.");
3960
4806
  last
3961
4807
  };
3962
4808
  }
3963
- var canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
3964
- var defaultRoot = canUseDom ? window : void 0;
3965
- var overflowStylePatterns = [
3966
- "scroll",
3967
- "auto",
3968
- "overlay"
3969
- ];
3970
- function isElement(node) {
3971
- var ELEMENT_NODE_TYPE = 1;
3972
- return node.nodeType === ELEMENT_NODE_TYPE;
3973
- }
3974
- function getScrollParent(el) {
3975
- var root2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultRoot;
3976
- var node = el;
3977
- while (node && node !== root2 && isElement(node)) {
3978
- if (node === document.body) {
3979
- return root2;
3980
- }
3981
- var overflowY = window.getComputedStyle(node).overflowY;
3982
- if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
3983
- return node;
3984
- }
3985
- node = node.parentNode;
3986
- }
3987
- return root2;
3988
- }
3989
- function getAllScrollableParents(element) {
3990
- var scrollableParents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
3991
- if (!element) {
3992
- return scrollableParents;
3993
- }
3994
- var isScrollable = element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
3995
- if (isScrollable) {
3996
- if (element.nodeName === "HTML") {
3997
- scrollableParents.push(document);
3998
- } else {
3999
- scrollableParents.push(element);
4000
- }
4001
- }
4002
- return getAllScrollableParents(element.parentElement, scrollableParents);
4003
- }
4004
- var passiveSupported = false;
4005
- if (canUseDom) {
4006
- try {
4007
- var opts = Object.defineProperty({}, "passive", {
4008
- get: function get() {
4009
- passiveSupported = true;
4010
- }
4011
- });
4012
- window.addEventListener("test-passive-supported", null, opts);
4013
- } catch (e2) {
4014
- console.log(e2);
4015
- }
4016
- }
4017
4809
  var totalLockCount = 0;
4018
4810
  var BODY_LOCK_CLASS = "nut-overflow-hidden";
4019
4811
  function getScrollableElement(el) {
@@ -4055,7 +4847,7 @@ Check the top-level render call using <` + t + ">.");
4055
4847
  };
4056
4848
  var lock = function() {
4057
4849
  document.addEventListener("touchstart", touch.start);
4058
- document.addEventListener("touchmove", onTouchMove, passiveSupported ? {
4850
+ document.addEventListener("touchmove", onTouchMove, exports.passiveSupported ? {
4059
4851
  passive: false
4060
4852
  } : false);
4061
4853
  if (!totalLockCount) {
@@ -4188,9 +4980,6 @@ Check the top-level render call using <` + t + ">.");
4188
4980
  }
4189
4981
  };
4190
4982
  const GridContext = React.createContext(context);
4191
- var pxCheck = function(value2) {
4192
- return parseFloat(value2.toString());
4193
- };
4194
4983
  var defaultProps$1v = {
4195
4984
  text: "",
4196
4985
  columns: 4,
@@ -4443,36 +5232,6 @@ Check the top-level render call using <` + t + ">.");
4443
5232
  }));
4444
5233
  };
4445
5234
  Space.displayName = "NutSpace";
4446
- function isWindow(val2) {
4447
- return val2 === window;
4448
- }
4449
- var getRect = function(elementRef) {
4450
- var element = elementRef;
4451
- if (isWindow(element)) {
4452
- var width2 = element.innerWidth;
4453
- var height2 = element.innerHeight;
4454
- return {
4455
- top: 0,
4456
- left: 0,
4457
- right: width2,
4458
- bottom: height2,
4459
- width: width2,
4460
- height: height2
4461
- };
4462
- }
4463
- if (element && element.getBoundingClientRect) {
4464
- console.log(element, element.getBoundingClientRect());
4465
- return element.getBoundingClientRect();
4466
- }
4467
- return {
4468
- top: 0,
4469
- left: 0,
4470
- right: 0,
4471
- bottom: 0,
4472
- width: 0,
4473
- height: 0
4474
- };
4475
- };
4476
5235
  function useWatch$1(dep, callback) {
4477
5236
  var config2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
4478
5237
  immediate: false
@@ -4825,7 +5584,7 @@ Check the top-level render call using <` + t + ">.");
4825
5584
  }, children));
4826
5585
  };
4827
5586
  BackTop.displayName = "NutBackTop";
4828
- function clamp$2(v, min, max) {
5587
+ function clamp$1(v, min, max) {
4829
5588
  return Math.max(min, Math.min(v, max));
4830
5589
  }
4831
5590
  const V = {
@@ -4848,19 +5607,19 @@ Check the top-level render call using <` + t + ">.");
4848
5607
  v1[1] -= v2[1];
4849
5608
  }
4850
5609
  };
4851
- function rubberband$1(distance, dimension, constant) {
5610
+ function rubberband(distance, dimension, constant) {
4852
5611
  if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5);
4853
5612
  return distance * dimension * constant / (dimension + constant * distance);
4854
5613
  }
4855
- function rubberbandIfOutOfBounds$1(position2, min, max, constant = 0.15) {
4856
- if (constant === 0) return clamp$2(position2, min, max);
4857
- if (position2 < min) return -rubberband$1(min - position2, max - min, constant) + min;
4858
- if (position2 > max) return +rubberband$1(position2 - max, max - min, constant) + max;
5614
+ function rubberbandIfOutOfBounds(position2, min, max, constant = 0.15) {
5615
+ if (constant === 0) return clamp$1(position2, min, max);
5616
+ if (position2 < min) return -rubberband(min - position2, max - min, constant) + min;
5617
+ if (position2 > max) return +rubberband(position2 - max, max - min, constant) + max;
4859
5618
  return position2;
4860
5619
  }
4861
5620
  function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
4862
5621
  const [[X0, X1], [Y0, Y1]] = bounds;
4863
- return [rubberbandIfOutOfBounds$1(Vx, X0, X1, Rx), rubberbandIfOutOfBounds$1(Vy, Y0, Y1, Ry)];
5622
+ return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];
4864
5623
  }
4865
5624
  function _defineProperty$1(obj, key2, value2) {
4866
5625
  if (key2 in obj) {
@@ -6834,7 +7593,7 @@ Please add \`${key2}Action\` when creating your handler.`);
6834
7593
  }
6835
7594
  }
6836
7595
  }
6837
- const toArray$1 = (a) => is.und(a) ? [] : is.arr(a) ? a : [a];
7596
+ const toArray = (a) => is.und(a) ? [] : is.arr(a) ? a : [a];
6838
7597
  function flush(queue, iterator) {
6839
7598
  if (queue.size) {
6840
7599
  const items = Array.from(queue);
@@ -6947,7 +7706,7 @@ Please add \`${key2}Action\` when creating your handler.`);
6947
7706
  const index2 = arr.findIndex(test);
6948
7707
  return index2 < 0 ? arr.length : index2;
6949
7708
  }
6950
- const clamp$1 = (min, max, v) => Math.min(Math.max(v, min), max);
7709
+ const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
6951
7710
  const colors = {
6952
7711
  transparent: 0,
6953
7712
  aliceblue: 4042850303,
@@ -7245,7 +8004,7 @@ Please add \`${key2}Action\` when creating your handler.`);
7245
8004
  progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
7246
8005
  const expanded = progress * steps2;
7247
8006
  const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
7248
- return clamp$1(0, 1, rounded / steps2);
8007
+ return clamp(0, 1, rounded / steps2);
7249
8008
  };
7250
8009
  const c1 = 1.70158;
7251
8010
  const c2 = c1 * 1.525;
@@ -7842,7 +8601,7 @@ Please add \`${key2}Action\` when creating your handler.`);
7842
8601
  function callProp(value2, ...args) {
7843
8602
  return is.fun(value2) ? value2(...args) : value2;
7844
8603
  }
7845
- const matchProp = (value2, key2) => value2 === true || !!(key2 && value2 && (is.fun(value2) ? value2(key2) : toArray$1(value2).includes(key2)));
8604
+ const matchProp = (value2, key2) => value2 === true || !!(key2 && value2 && (is.fun(value2) ? value2(key2) : toArray(value2).includes(key2)));
7846
8605
  const resolveProp = (prop, key2) => is.obj(prop) ? key2 && prop[key2] : prop;
7847
8606
  const getDefaultProp = (props, key2) => props.default === true ? props[key2] : props.default ? props.default[key2] : void 0;
7848
8607
  const noopTransform = (value2) => value2;
@@ -8384,7 +9143,7 @@ Please add \`${key2}Action\` when creating your handler.`);
8384
9143
  } = anim;
8385
9144
  const payload = getPayload(anim.to);
8386
9145
  if (!payload && hasFluidValue(anim.to)) {
8387
- toValues = toArray$1(getFluidValue(anim.to));
9146
+ toValues = toArray(getFluidValue(anim.to));
8388
9147
  }
8389
9148
  anim.values.forEach((node2, i2) => {
8390
9149
  if (node2.done) return;
@@ -8737,7 +9496,7 @@ Please add \`${key2}Action\` when creating your handler.`);
8737
9496
  if (!hasAsyncTo) {
8738
9497
  if (started || hasFluidValue(prevTo)) {
8739
9498
  anim.values = node.getPayload();
8740
- anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray$1(goal);
9499
+ anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal);
8741
9500
  }
8742
9501
  if (anim.immediate != immediate) {
8743
9502
  anim.immediate = immediate;
@@ -9010,7 +9769,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9010
9769
  queue
9011
9770
  } = this;
9012
9771
  if (props) {
9013
- queue = toArray$1(props).map(createUpdate);
9772
+ queue = toArray(props).map(createUpdate);
9014
9773
  } else {
9015
9774
  this.queue = [];
9016
9775
  }
@@ -9026,7 +9785,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9026
9785
  }
9027
9786
  if (keys) {
9028
9787
  const springs = this.springs;
9029
- each(toArray$1(keys), (key2) => springs[key2].stop(!!arg));
9788
+ each(toArray(keys), (key2) => springs[key2].stop(!!arg));
9030
9789
  } else {
9031
9790
  stopAsync(this._state, this._lastAsyncId);
9032
9791
  this.each((spring) => spring.stop(!!arg));
@@ -9040,7 +9799,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9040
9799
  });
9041
9800
  } else {
9042
9801
  const springs = this.springs;
9043
- each(toArray$1(keys), (key2) => springs[key2].pause());
9802
+ each(toArray(keys), (key2) => springs[key2].pause());
9044
9803
  }
9045
9804
  return this;
9046
9805
  }
@@ -9051,7 +9810,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9051
9810
  });
9052
9811
  } else {
9053
9812
  const springs = this.springs;
9054
- each(toArray$1(keys), (key2) => springs[key2].resume());
9813
+ each(toArray(keys), (key2) => springs[key2].resume());
9055
9814
  }
9056
9815
  return this;
9057
9816
  }
@@ -9202,7 +9961,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9202
9961
  function getSprings(ctrl, props) {
9203
9962
  const springs = _extends$1({}, ctrl.springs);
9204
9963
  if (props) {
9205
- each(toArray$1(props), (props2) => {
9964
+ each(toArray(props), (props2) => {
9206
9965
  if (is.und(props2.keys)) {
9207
9966
  props2 = createUpdate(props2);
9208
9967
  }
@@ -9474,7 +10233,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9474
10233
  }
9475
10234
  }
9476
10235
  _get() {
9477
- const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray$1(getFluidValue(this.source));
10236
+ const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));
9478
10237
  return this.calc(...inputs);
9479
10238
  }
9480
10239
  _start() {
@@ -9493,7 +10252,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9493
10252
  }
9494
10253
  _attach() {
9495
10254
  let priority2 = 1;
9496
- each(toArray$1(this.source), (source) => {
10255
+ each(toArray(this.source), (source) => {
9497
10256
  if (hasFluidValue(source)) {
9498
10257
  addFluidObserver(source, this);
9499
10258
  }
@@ -9508,7 +10267,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9508
10267
  this._start();
9509
10268
  }
9510
10269
  _detach() {
9511
- each(toArray$1(this.source), (source) => {
10270
+ each(toArray(this.source), (source) => {
9512
10271
  if (hasFluidValue(source)) {
9513
10272
  removeFluidObserver(source, this);
9514
10273
  }
@@ -9527,7 +10286,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9527
10286
  } else if (event.type == "idle") {
9528
10287
  this._active.delete(event.parent);
9529
10288
  } else if (event.type == "priority") {
9530
- this.priority = toArray$1(this.source).reduce((highest, parent2) => Math.max(highest, (isFrameValue(parent2) ? parent2.priority : 0) + 1), 0);
10289
+ this.priority = toArray(this.source).reduce((highest, parent2) => Math.max(highest, (isFrameValue(parent2) ? parent2.priority : 0) + 1), 0);
9531
10290
  }
9532
10291
  }
9533
10292
  }
@@ -9689,7 +10448,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9689
10448
  delete style[key2];
9690
10449
  if (is.und(value2)) return;
9691
10450
  const unit = pxTransforms.test(key2) ? "px" : degTransforms.test(key2) ? "deg" : "";
9692
- inputs.push(toArray$1(value2));
10451
+ inputs.push(toArray(value2));
9693
10452
  transforms.push(key2 === "rotate3d" ? ([x2, y2, z2, deg]) => [`rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key2}(${input.map((v) => addUnit(v, unit)).join(",")})`, isValueIdentity(input, key2.startsWith("scale") ? 1 : 0)]);
9694
10453
  }
9695
10454
  });
@@ -9956,10 +10715,6 @@ Please add \`${key2}Action\` when creating your handler.`);
9956
10715
  };
9957
10716
  Elevator.displayName = "NutElevator";
9958
10717
  Elevator.Context = elevatorContext;
9959
- function _type_of(obj) {
9960
- "@swc/helpers - typeof";
9961
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9962
- }
9963
10718
  var defaultProps$1l = _object_spread_props(_object_spread({}, ComponentDefaults), {
9964
10719
  value: "",
9965
10720
  dot: false,
@@ -10156,22 +10911,6 @@ Please add \`${key2}Action\` when creating your handler.`);
10156
10911
  }, renderWrapper()) : renderWrapper());
10157
10912
  };
10158
10913
  NavBar.displayName = "NutNavBar";
10159
- function mergeProps() {
10160
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
10161
- items[_key] = arguments[_key];
10162
- }
10163
- var ret = {};
10164
- items.forEach(function(item) {
10165
- if (item) {
10166
- Object.keys(item).forEach(function(key2) {
10167
- if (item[key2] !== void 0) {
10168
- ret[key2] = item[key2];
10169
- }
10170
- });
10171
- }
10172
- });
10173
- return ret;
10174
- }
10175
10914
  var defaultProps$1i = {
10176
10915
  title: "",
10177
10916
  value: "",
@@ -10835,105 +11574,6 @@ Please add \`${key2}Action\` when creating your handler.`);
10835
11574
  return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
10836
11575
  };
10837
11576
  Popup.displayName = "NutPopup";
10838
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
10839
- try {
10840
- var info = gen[key2](arg);
10841
- var value2 = info.value;
10842
- } catch (error) {
10843
- reject(error);
10844
- return;
10845
- }
10846
- if (info.done) resolve(value2);
10847
- else Promise.resolve(value2).then(_next, _throw);
10848
- }
10849
- function _async_to_generator(fn) {
10850
- return function() {
10851
- var self2 = this, args = arguments;
10852
- return new Promise(function(resolve, reject) {
10853
- var gen = fn.apply(self2, args);
10854
- function _next(value2) {
10855
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
10856
- }
10857
- function _throw(err) {
10858
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
10859
- }
10860
- _next(void 0);
10861
- });
10862
- };
10863
- }
10864
- function __generator(thisArg, body) {
10865
- var _ = { label: 0, sent: function() {
10866
- if (t[0] & 1) throw t[1];
10867
- return t[1];
10868
- }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
10869
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
10870
- return this;
10871
- }), g;
10872
- function verb(n2) {
10873
- return function(v) {
10874
- return step([n2, v]);
10875
- };
10876
- }
10877
- function step(op) {
10878
- if (f) throw new TypeError("Generator is already executing.");
10879
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
10880
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
10881
- if (y = 0, t) op = [op[0] & 2, t.value];
10882
- switch (op[0]) {
10883
- case 0:
10884
- case 1:
10885
- t = op;
10886
- break;
10887
- case 4:
10888
- _.label++;
10889
- return { value: op[1], done: false };
10890
- case 5:
10891
- _.label++;
10892
- y = op[1];
10893
- op = [0];
10894
- continue;
10895
- case 7:
10896
- op = _.ops.pop();
10897
- _.trys.pop();
10898
- continue;
10899
- default:
10900
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
10901
- _ = 0;
10902
- continue;
10903
- }
10904
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
10905
- _.label = op[1];
10906
- break;
10907
- }
10908
- if (op[0] === 6 && _.label < t[1]) {
10909
- _.label = t[1];
10910
- t = op;
10911
- break;
10912
- }
10913
- if (t && _.label < t[2]) {
10914
- _.label = t[2];
10915
- _.ops.push(op);
10916
- break;
10917
- }
10918
- if (t[2]) _.ops.pop();
10919
- _.trys.pop();
10920
- continue;
10921
- }
10922
- op = body.call(thisArg, _);
10923
- } catch (e2) {
10924
- op = [6, e2];
10925
- y = 0;
10926
- } finally {
10927
- f = t = 0;
10928
- }
10929
- if (op[0] & 5) throw op[1];
10930
- return { value: op[0] ? op[1] : void 0, done: true };
10931
- }
10932
- }
10933
- typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
10934
- var e2 = new Error(message);
10935
- return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
10936
- };
10937
11577
  function _to_primitive(input, hint) {
10938
11578
  if (_type_of(input) !== "object" || input === null) return input;
10939
11579
  var prim = input[Symbol.toPrimitive];
@@ -11003,12 +11643,6 @@ Please add \`${key2}Action\` when creating your handler.`);
11003
11643
  }
11004
11644
  return map[topId];
11005
11645
  };
11006
- var isEmpty = function(p2) {
11007
- if (p2 === null || p2 === void 0) return true;
11008
- if ((typeof p2 === "undefined" ? "undefined" : _type_of(p2)) === "object" && Object.keys(p2).length === 0) return true;
11009
- if (Array.isArray(p2) && p2.length === 0) return true;
11010
- return false;
11011
- };
11012
11646
  var getRefValue = function(ref) {
11013
11647
  return ref.current;
11014
11648
  };
@@ -11649,245 +12283,6 @@ Please add \`${key2}Action\` when creating your handler.`);
11649
12283
  };
11650
12284
  var Address = /* @__PURE__ */ React.forwardRef(InternalAddress);
11651
12285
  Address.displayName = "NutAddress";
11652
- function _array_without_holes(arr) {
11653
- if (Array.isArray(arr)) return _array_like_to_array(arr);
11654
- }
11655
- function _iterable_to_array(iter) {
11656
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
11657
- return Array.from(iter);
11658
- }
11659
- }
11660
- function _non_iterable_spread() {
11661
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11662
- }
11663
- function _to_consumable_array(arr) {
11664
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
11665
- }
11666
- var Utils = {
11667
- /**
11668
- * 是否为闫年
11669
- * @return {Boolse} true|false
11670
- */
11671
- isLeapYear: function isLeapYear(y) {
11672
- return y % 4 === 0 && y % 100 !== 0 || y % 400 === 0;
11673
- },
11674
- /**
11675
- * 返回星期数
11676
- * @return {String}
11677
- */
11678
- getWhatDay: function getWhatDay(year, month, day) {
11679
- var date2 = new Date("".concat(year, "/").concat(month, "/").concat(day));
11680
- var index2 = date2.getDay();
11681
- var dayNames = [
11682
- "星期日",
11683
- "星期一",
11684
- "星期二",
11685
- "星期三",
11686
- "星期四",
11687
- "星期五",
11688
- "星期六"
11689
- ];
11690
- return dayNames[index2];
11691
- },
11692
- /**
11693
- * 返回上一个月在当前面板中的天数
11694
- * @return {Number}
11695
- */
11696
- getMonthPreDay: function getMonthPreDay(year, month) {
11697
- var date2 = new Date("".concat(year, "/").concat(month, "/01"));
11698
- var day = date2.getDay();
11699
- if (day === 0) {
11700
- day = 7;
11701
- }
11702
- return day;
11703
- },
11704
- /**
11705
- * 返回月份天数
11706
- * @return {Number}
11707
- */
11708
- getMonthDays: function getMonthDays(year, month) {
11709
- if (/^0/.test(month)) {
11710
- month = month.split("")[1];
11711
- }
11712
- return [
11713
- 0,
11714
- 31,
11715
- this.isLeapYear(Number(year)) ? 29 : 28,
11716
- 31,
11717
- 30,
11718
- 31,
11719
- 30,
11720
- 31,
11721
- 31,
11722
- 30,
11723
- 31,
11724
- 30,
11725
- 31
11726
- ][month];
11727
- },
11728
- /**
11729
- * 补齐数字位数
11730
- * @return {string}
11731
- */
11732
- getNumTwoBit: function getNumTwoBit(n2) {
11733
- n2 = Number(n2);
11734
- return (n2 > 9 ? "" : "0") + n2;
11735
- },
11736
- /**
11737
- * 日期对象转成字符串
11738
- * @return {string}
11739
- */
11740
- date2Str: function date2Str(date2, split) {
11741
- split = split || "-";
11742
- var y = date2.getFullYear();
11743
- var m2 = this.getNumTwoBit(date2.getMonth() + 1);
11744
- var d2 = this.getNumTwoBit(date2.getDate());
11745
- return [
11746
- y,
11747
- m2,
11748
- d2
11749
- ].join(split);
11750
- },
11751
- /**
11752
- * 返回日期格式字符串
11753
- * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
11754
- * @return {string} '2014-12-31'
11755
- */
11756
- getDay: function getDay(i2) {
11757
- i2 = i2 || 0;
11758
- var date2 = /* @__PURE__ */ new Date();
11759
- var diff = i2 * (1e3 * 60 * 60 * 24);
11760
- date2 = new Date(date2.getTime() + diff);
11761
- return this.date2Str(date2);
11762
- },
11763
- /**
11764
- * 时间比较
11765
- * @return {Boolean}
11766
- */
11767
- compareDate: function compareDate(date1, date2) {
11768
- var startTime = new Date(date1.replace("-", "/").replace("-", "/"));
11769
- var endTime = new Date(date2.replace("-", "/").replace("-", "/"));
11770
- if (startTime >= endTime) {
11771
- return false;
11772
- }
11773
- return true;
11774
- },
11775
- /**
11776
- * 时间是否相等
11777
- * @return {Boolean}
11778
- */
11779
- isEqual: function isEqual2(date1, date2) {
11780
- var startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
11781
- var endTime = new Date(date2.replace(/-/g, "/")).getTime();
11782
- if (startTime === endTime) {
11783
- return true;
11784
- }
11785
- return false;
11786
- },
11787
- getMonthWeek: function getMonthWeek(year, month, date2) {
11788
- var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
11789
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11790
- var w = dateNow.getDay();
11791
- var d2 = dateNow.getDate();
11792
- var remainder = 6 - w;
11793
- if (firstDayOfWeek !== 0) {
11794
- w = w === 0 ? 7 : w;
11795
- remainder = 7 - w;
11796
- }
11797
- return Math.ceil((d2 + remainder) / 7);
11798
- },
11799
- getYearWeek: function getYearWeek(year, month, date2) {
11800
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11801
- var dateFirst = new Date(Number(year), 0, 1);
11802
- var dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 864e5);
11803
- return Math.ceil((dataNumber + (dateFirst.getDay() + 1 - 1)) / 7);
11804
- },
11805
- getWeekDate: function getWeekDate(year, month, date2) {
11806
- var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
11807
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11808
- var nowTime = dateNow.getTime();
11809
- var day = dateNow.getDay();
11810
- if (firstDayOfWeek === 0) {
11811
- var oneDayTime = 24 * 60 * 60 * 1e3;
11812
- var SundayTime = nowTime - day * oneDayTime;
11813
- var SaturdayTime = nowTime + (6 - day) * oneDayTime;
11814
- var sunday = this.date2Str(new Date(SundayTime));
11815
- var saturday = this.date2Str(new Date(SaturdayTime));
11816
- return [
11817
- sunday,
11818
- saturday
11819
- ];
11820
- }
11821
- day = day === 0 ? 7 : day;
11822
- var oneDayTime1 = 24 * 60 * 60 * 1e3;
11823
- var MondayTime = nowTime - (day - 1) * oneDayTime1;
11824
- var SundayTime1 = nowTime + (7 - day) * oneDayTime1;
11825
- var monday = this.date2Str(new Date(MondayTime));
11826
- var sunday1 = this.date2Str(new Date(SundayTime1));
11827
- return [
11828
- monday,
11829
- sunday1
11830
- ];
11831
- },
11832
- formatResultDate: function formatResultDate(date2) {
11833
- var days = _to_consumable_array(date2.split("-"));
11834
- days[2] = Utils.getNumTwoBit(Number(days[2]));
11835
- days[3] = "".concat(days[0], "-").concat(days[1], "-").concat(days[2]);
11836
- days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
11837
- return days;
11838
- }
11839
- };
11840
- var getCurrMonthData = function(type2, year, month) {
11841
- switch (type2) {
11842
- case "prev":
11843
- month === 1 && (year -= 1);
11844
- month = month === 1 ? 12 : --month;
11845
- break;
11846
- case "next":
11847
- month === 12 && (year += 1);
11848
- month = month === 12 ? 1 : ++month;
11849
- break;
11850
- }
11851
- return [
11852
- year,
11853
- Utils.getNumTwoBit(month),
11854
- Utils.getMonthDays(String(year), String(month))
11855
- ];
11856
- };
11857
- var getDaysStatus = function(type2, year, month) {
11858
- var days = Utils.getMonthDays("".concat(year), "".concat(month));
11859
- return Array.from(Array(days), function(v, k) {
11860
- return {
11861
- day: k + 1,
11862
- type: type2,
11863
- year,
11864
- month
11865
- };
11866
- });
11867
- };
11868
- var getPreMonthDates = function(type2, year, month, firstDayOfWeek) {
11869
- var preMonth = +month - 1;
11870
- var preYear = year;
11871
- if (preMonth <= 0) {
11872
- preMonth = 12;
11873
- preYear += 1;
11874
- }
11875
- var days = Utils.getMonthPreDay(+year, +month);
11876
- days -= firstDayOfWeek;
11877
- if (days >= 7) {
11878
- days -= 7;
11879
- }
11880
- var preDates = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
11881
- var months = Array.from(Array(preDates), function(v, k) {
11882
- return {
11883
- day: k + 1,
11884
- type: type2,
11885
- preYear,
11886
- preMonth
11887
- };
11888
- });
11889
- return months.slice(preDates - days);
11890
- };
11891
12286
  var splitDate = function(date2) {
11892
12287
  var split = date2.indexOf("-") !== -1 ? "-" : "/";
11893
12288
  return date2.split(split);
@@ -13369,26 +13764,6 @@ Please add \`${key2}Action\` when creating your handler.`);
13369
13764
  CheckboxGroup.displayName = "NutCheckboxGroup";
13370
13765
  var InnerCheckbox = Checkbox;
13371
13766
  InnerCheckbox.Group = CheckboxGroup;
13372
- var isObject = function(val2) {
13373
- return val2 !== null && (typeof val2 === "undefined" ? "undefined" : _type_of(val2)) === "object";
13374
- };
13375
- var isFunction = function(val2) {
13376
- return typeof val2 === "function";
13377
- };
13378
- var isPromise = function(val2) {
13379
- return isObject(val2) && isFunction(val2.then) && isFunction(val2.catch);
13380
- };
13381
- var clamp = function(num, min, max) {
13382
- return Math.min(Math.max(num, min), max);
13383
- };
13384
- function preventDefault$1(event, isStopPropagation) {
13385
- if (typeof event.cancelable !== "boolean" || event.cancelable) {
13386
- event.preventDefault();
13387
- }
13388
- if (isStopPropagation) {
13389
- event.stopPropagation();
13390
- }
13391
- }
13392
13767
  var momentum = function(distance, duration) {
13393
13768
  var speed = Math.abs(distance / duration);
13394
13769
  return speed / 3e-3 * (distance < 0 ? -1 : 1);
@@ -13538,7 +13913,7 @@ Please add \`${key2}Action\` when creating your handler.`);
13538
13913
  });
13539
13914
  React.useEffect(function() {
13540
13915
  var _pickerRollerRef_current, _pickerRollerRef_current1, _pickerRollerRef_current2;
13541
- var options3 = passiveSupported ? {
13916
+ var options3 = exports.passiveSupported ? {
13542
13917
  passive: false
13543
13918
  } : false;
13544
13919
  (_pickerRollerRef_current = pickerRollerRef.current) === null || _pickerRollerRef_current === void 0 ? void 0 : _pickerRollerRef_current.addEventListener("touchstart", handleTouchStart, options3);
@@ -13928,17 +14303,6 @@ Please add \`${key2}Action\` when creating your handler.`);
13928
14303
  })));
13929
14304
  };
13930
14305
  var Picker = /* @__PURE__ */ React.forwardRef(InternalPicker$1);
13931
- var isDate = function(val2) {
13932
- return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
13933
- };
13934
- var padZero = function(num) {
13935
- var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
13936
- var str = "".concat(num);
13937
- while (str.length < targetLength) {
13938
- str = "0".concat(str);
13939
- }
13940
- return str;
13941
- };
13942
14306
  function getLastDayOfMonth(year, month) {
13943
14307
  return new Date(year, month, 0).getDate();
13944
14308
  }
@@ -14380,22 +14744,6 @@ Please add \`${key2}Action\` when creating your handler.`);
14380
14744
  };
14381
14745
  DatePickerView.displayName = "NutDatePickerView";
14382
14746
  var Context = React.createContext({});
14383
- function _class_call_check(instance, Constructor) {
14384
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
14385
- }
14386
- function _defineProperties(target, props) {
14387
- for (var i2 = 0; i2 < props.length; i2++) {
14388
- var descriptor = props[i2];
14389
- descriptor.enumerable = descriptor.enumerable || false;
14390
- descriptor.configurable = true;
14391
- if ("value" in descriptor) descriptor.writable = true;
14392
- Object.defineProperty(target, descriptor.key, descriptor);
14393
- }
14394
- }
14395
- function _create_class(Constructor, protoProps, staticProps) {
14396
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
14397
- return Constructor;
14398
- }
14399
14747
  function _extends() {
14400
14748
  _extends = Object.assign ? Object.assign.bind() : function(target) {
14401
14749
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15442,60 +15790,6 @@ Please add \`${key2}Action\` when creating your handler.`);
15442
15790
  Schema.warning = warning;
15443
15791
  Schema.messages = messages;
15444
15792
  Schema.validators = validators;
15445
- function merge() {
15446
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
15447
- items[_key] = arguments[_key];
15448
- }
15449
- return _merge(items[0] === true, false, items);
15450
- }
15451
- function recursive() {
15452
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
15453
- items[_key] = arguments[_key];
15454
- }
15455
- return _merge(items[0] === true, true, items);
15456
- }
15457
- function clone(input) {
15458
- if (Array.isArray(input)) {
15459
- var output = [];
15460
- for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
15461
- return output;
15462
- }
15463
- if (isPlainObject(input)) {
15464
- var output1 = {};
15465
- for (var index1 in input) output1[index1] = clone(input[index1]);
15466
- return output1;
15467
- }
15468
- return input;
15469
- }
15470
- function isPlainObject(input) {
15471
- if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
15472
- if (Object.getPrototypeOf(input) === null) return true;
15473
- var ref = input;
15474
- while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
15475
- return Object.getPrototypeOf(input) === ref;
15476
- }
15477
- function _recursiveMerge(base, extend) {
15478
- if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
15479
- for (var key2 in extend) {
15480
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
15481
- base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
15482
- }
15483
- return base;
15484
- }
15485
- function _merge(isClone, isRecursive, items) {
15486
- var result;
15487
- if (isClone || !isPlainObject(result = items.shift())) result = {};
15488
- for (var index2 = 0; index2 < items.length; ++index2) {
15489
- var item = items[index2];
15490
- if (!isPlainObject(item)) continue;
15491
- for (var key2 in item) {
15492
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
15493
- var value2 = isClone ? clone(item[key2]) : item[key2];
15494
- result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
15495
- }
15496
- }
15497
- return result;
15498
- }
15499
15793
  var SECRET = "NUT_FORM_INTERNAL";
15500
15794
  var FormStore = /* @__PURE__ */ function() {
15501
15795
  function FormStore2() {
@@ -15974,23 +16268,6 @@ Please add \`${key2}Action\` when creating your handler.`);
15974
16268
  subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
15975
16269
  if (superClass) _set_prototype_of(subClass, superClass);
15976
16270
  }
15977
- function isForwardRefComponent(component) {
15978
- return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
15979
- React.forwardRef(
15980
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15981
- // @ts-ignore
15982
- function() {
15983
- }
15984
- ).$$typeof === component.type.$$typeof;
15985
- }
15986
- function toArray(value2) {
15987
- if (value2 === void 0 || value2 === null) {
15988
- return [];
15989
- }
15990
- return Array.isArray(value2) ? value2 : [
15991
- value2
15992
- ];
15993
- }
15994
16271
  var defaultProps$Z = _object_spread_props(_object_spread({}, ComponentDefaults), {
15995
16272
  required: false,
15996
16273
  name: "",
@@ -16044,7 +16321,7 @@ Please add \`${key2}Action\` when creating your handler.`);
16044
16321
  }), _obj));
16045
16322
  var validateTrigger = _this.props.validateTrigger;
16046
16323
  var mergedValidateTrigger = validateTrigger || _this.context.validateTrigger;
16047
- var validateTriggers = toArray(mergedValidateTrigger);
16324
+ var validateTriggers = toArray$1(mergedValidateTrigger);
16048
16325
  validateTriggers.forEach(function(trigger) {
16049
16326
  var originTrigger = controlled[trigger];
16050
16327
  controlled[trigger] = function() {
@@ -16382,16 +16659,6 @@ Please add \`${key2}Action\` when creating your handler.`);
16382
16659
  })));
16383
16660
  });
16384
16661
  Input.displayName = "NutInput";
16385
- function bound(position2, min, max) {
16386
- var ret = position2;
16387
- if (min !== void 0) {
16388
- ret = Math.max(position2, min);
16389
- }
16390
- if (max !== void 0) {
16391
- ret = Math.min(ret, max);
16392
- }
16393
- return ret;
16394
- }
16395
16662
  var defaultProps$X = _object_spread_props(_object_spread({}, ComponentDefaults), {
16396
16663
  disabled: false,
16397
16664
  readOnly: false,
@@ -18688,28 +18955,6 @@ Please add \`${key2}Action\` when creating your handler.`);
18688
18955
  }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)));
18689
18956
  };
18690
18957
  TextArea.displayName = "NutTextArea";
18691
- var funcInterceptor = function(interceptor, param) {
18692
- var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
18693
- if (interceptor) {
18694
- var returnVal = interceptor.apply(null, args);
18695
- if (isPromise(returnVal)) {
18696
- returnVal.then(function(value2) {
18697
- if (value2) {
18698
- done(value2);
18699
- } else if (canceled) {
18700
- canceled();
18701
- }
18702
- }).catch(function() {
18703
- });
18704
- } else if (returnVal) {
18705
- done();
18706
- } else if (canceled) {
18707
- canceled();
18708
- }
18709
- } else {
18710
- done();
18711
- }
18712
- };
18713
18958
  var defaultProps$K = _object_spread_props(_object_spread({}, ComponentDefaults), {
18714
18959
  percent: 0,
18715
18960
  showText: false,
@@ -19361,67 +19606,6 @@ Please add \`${key2}Action\` when creating your handler.`);
19361
19606
  };
19362
19607
  ActionSheet.displayName = "NutActionSheet";
19363
19608
  var destroyList = [];
19364
- var fullClone = _object_spread({}, ReactDOM__namespace);
19365
- var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
19366
- var createRoot;
19367
- try {
19368
- var mainVersion = Number((version || "").split(".")[0]);
19369
- if (mainVersion >= 18 && fullClone.createRoot) {
19370
- createRoot = fullClone.createRoot;
19371
- }
19372
- } catch (e2) {
19373
- }
19374
- function toggleWarning(skip) {
19375
- var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19376
- if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === "undefined" ? "undefined" : _type_of(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) === "object") {
19377
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
19378
- }
19379
- }
19380
- var MARK = "__nutui_react_root__";
19381
- function legacyRender(node, container) {
19382
- reactRender(node, container);
19383
- }
19384
- function concurrentRender(node, container) {
19385
- toggleWarning(true);
19386
- var root2 = container[MARK] || createRoot(container);
19387
- toggleWarning(false);
19388
- root2.render(node);
19389
- container[MARK] = root2;
19390
- }
19391
- function render(node, container) {
19392
- if (createRoot) {
19393
- concurrentRender(node, container);
19394
- return;
19395
- }
19396
- legacyRender(node, container);
19397
- }
19398
- function legacyUnmount(container) {
19399
- return unmountComponentAtNode(container);
19400
- }
19401
- function concurrentUnmount(container) {
19402
- return _concurrentUnmount.apply(this, arguments);
19403
- }
19404
- function _concurrentUnmount() {
19405
- _concurrentUnmount = _async_to_generator(function(container) {
19406
- return __generator(this, function(_state) {
19407
- return [
19408
- 2,
19409
- Promise.resolve().then(function() {
19410
- var _container_MARK;
19411
- (_container_MARK = container[MARK]) === null || _container_MARK === void 0 ? void 0 : _container_MARK.unmount();
19412
- delete container[MARK];
19413
- })
19414
- ];
19415
- });
19416
- });
19417
- return _concurrentUnmount.apply(this, arguments);
19418
- }
19419
- function unmount(container) {
19420
- if (createRoot) {
19421
- return concurrentUnmount(container);
19422
- }
19423
- return legacyUnmount(container);
19424
- }
19425
19609
  function ConfirmDialog(props) {
19426
19610
  return /* @__PURE__ */ React.createElement(Dialog, props, props.content);
19427
19611
  }
@@ -37882,21 +38066,6 @@ Please add \`${key2}Action\` when creating your handler.`);
37882
38066
  })))), document.body));
37883
38067
  };
37884
38068
  Popover.displayName = "NutPopover";
37885
- function rubberband(distance, dimension, constant) {
37886
- return distance * dimension * constant / (dimension + constant * distance);
37887
- }
37888
- function rubberbandIfOutOfBounds(position2, min, max, dimension) {
37889
- var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
37890
- if (constant === 0) return bound(position2, min, max);
37891
- if (position2 < min) return -rubberband(min - position2, dimension, constant) + min;
37892
- if (position2 > max) return +rubberband(position2 - max, dimension, constant) + max;
37893
- return position2;
37894
- }
37895
- var sleep = function(time2) {
37896
- return new Promise(function(resolve) {
37897
- return setTimeout(resolve, time2);
37898
- });
37899
- };
37900
38069
  var defaultProps$A = _object_spread_props(_object_spread({}, ComponentDefaults), {
37901
38070
  type: "default",
37902
38071
  pullingText: "",
@@ -38090,7 +38259,7 @@ Please add \`${key2}Action\` when creating your handler.`);
38090
38259
  event.preventDefault();
38091
38260
  }
38092
38261
  event.stopPropagation();
38093
- var height2 = Math.max(rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5), 0);
38262
+ var height2 = Math.max(rubberbandIfOutOfBounds$1(y, 0, 0, headHeight * 5, 0.5), 0);
38094
38263
  api.start({
38095
38264
  height: height2
38096
38265
  });
@@ -38102,7 +38271,7 @@ Please add \`${key2}Action\` when creating your handler.`);
38102
38271
  axis: "y",
38103
38272
  target: elementRef,
38104
38273
  enabled: !props.disabled,
38105
- eventOptions: passiveSupported ? {
38274
+ eventOptions: exports.passiveSupported ? {
38106
38275
  passive: false
38107
38276
  } : false
38108
38277
  });
@@ -42083,7 +42252,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42083
42252
  }));
42084
42253
  };
42085
42254
  var setScale = function(scale2) {
42086
- scale2 = clamp(scale2, 0.3, +maxZoom + 1);
42255
+ scale2 = clamp$2(scale2, 0.3, +maxZoom + 1);
42087
42256
  if (scale2 !== state.scale) {
42088
42257
  setState(_object_spread_props(_object_spread({}, state), {
42089
42258
  scale: scale2
@@ -42129,8 +42298,8 @@ Please add \`${key2}Action\` when creating your handler.`);
42129
42298
  var moveX = deltaX.current * state.scale + startMoveX;
42130
42299
  var moveY = deltaY.current * state.scale + startMoveY;
42131
42300
  setState(_object_spread_props(_object_spread({}, state), {
42132
- moveX: clamp(moveX, -maxMoveX, maxMoveX),
42133
- moveY: clamp(moveY, -maxMoveY, maxMoveY)
42301
+ moveX: clamp$2(moveX, -maxMoveX, maxMoveX),
42302
+ moveY: clamp$2(moveY, -maxMoveY, maxMoveY)
42134
42303
  }));
42135
42304
  }
42136
42305
  if (zooming && touches.length === 2) {
@@ -42146,8 +42315,8 @@ Please add \`${key2}Action\` when creating your handler.`);
42146
42315
  if (!event.touches.length) {
42147
42316
  if (zooming) {
42148
42317
  setState(_object_spread_props(_object_spread({}, state), {
42149
- moveX: clamp(state.moveX, -maxMoveX, maxMoveX),
42150
- moveY: clamp(state.moveY, -maxMoveY, maxMoveY)
42318
+ moveX: clamp$2(state.moveX, -maxMoveX, maxMoveX),
42319
+ moveY: clamp$2(state.moveY, -maxMoveY, maxMoveY)
42151
42320
  }));
42152
42321
  setZooming(false);
42153
42322
  }
@@ -42778,6 +42947,22 @@ Please add \`${key2}Action\` when creating your handler.`);
42778
42947
  });
42779
42948
  };
42780
42949
  WaterMark.displayName = "NutWaterMark";
42950
+ var idCounter = {};
42951
+ function uniqueId() {
42952
+ var prefix2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$nut$";
42953
+ if (!idCounter[prefix2]) {
42954
+ idCounter[prefix2] = 0;
42955
+ }
42956
+ var id = ++idCounter[prefix2];
42957
+ if (prefix2 === "$nut$") {
42958
+ return "".concat(id);
42959
+ }
42960
+ return "".concat(prefix2).concat(id);
42961
+ }
42962
+ function useUuid() {
42963
+ var idRef = React.useRef(uniqueId());
42964
+ return idRef.current;
42965
+ }
42781
42966
  exports.ActionSheet = ActionSheet;
42782
42967
  exports.Address = Address;
42783
42968
  exports.Animate = Animate;
@@ -42803,6 +42988,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42803
42988
  exports.Col = Col;
42804
42989
  exports.Collapse = Collapse;
42805
42990
  exports.CollapseItem = CollapseItem;
42991
+ exports.ComponentDefaults = ComponentDefaults;
42806
42992
  exports.ConfigProvider = ConfigProvider;
42807
42993
  exports.CountDown = CountDown;
42808
42994
  exports.DatePicker = DatePicker;
@@ -42831,6 +43017,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42831
43017
  exports.Lottie = Lottie;
42832
43018
  exports.Menu = Menu;
42833
43019
  exports.MenuItem = MenuItem;
43020
+ exports.MiniLru = MiniLru;
42834
43021
  exports.NavBar = NavBar;
42835
43022
  exports.NoticeBar = NoticeBar;
42836
43023
  exports.Notify = Notify;
@@ -42879,13 +43066,63 @@ Please add \`${key2}Action\` when creating your handler.`);
42879
43066
  exports.Tour = Tour;
42880
43067
  exports.TrendArrow = TrendArrow;
42881
43068
  exports.Uploader = Uploader;
43069
+ exports.Utils = Utils;
42882
43070
  exports.Video = Video;
42883
43071
  exports.VirtualList = VirtualList;
42884
43072
  exports.WaterMark = WaterMark;
43073
+ exports.bound = bound;
43074
+ exports.camelCase = camelCase;
43075
+ exports.canUseDom = canUseDom;
43076
+ exports.cancelRaf = cancelRaf;
43077
+ exports.clamp = clamp$2;
43078
+ exports.clone = clone;
42885
43079
  exports.destroyList = destroyList;
43080
+ exports.funcInterceptor = funcInterceptor;
43081
+ exports.getAllScrollableParents = getAllScrollableParents;
43082
+ exports.getCurrMonthData = getCurrMonthData;
43083
+ exports.getDaysStatus = getDaysStatus;
42886
43084
  exports.getDefaultConfig = getDefaultConfig;
43085
+ exports.getPreMonthDates = getPreMonthDates;
43086
+ exports.getRect = getRect;
43087
+ exports.getRefValue = getRefValue;
43088
+ exports.getScrollParent = getScrollParent;
43089
+ exports.inBrowser = inBrowser;
43090
+ exports.isDate = isDate;
43091
+ exports.isEmpty = isEmpty;
43092
+ exports.isForwardRefComponent = isForwardRefComponent;
43093
+ exports.isFunction = isFunction;
43094
+ exports.isObject = isObject;
43095
+ exports.isPlainObject = isPlainObject;
43096
+ exports.isPromise = isPromise;
43097
+ exports.isWindow = isWindow;
43098
+ exports.main = main;
43099
+ exports.merge = merge;
43100
+ exports.mergeProp = mergeProp;
43101
+ exports.mergeProps = mergeProps;
43102
+ exports.padZero = padZero;
43103
+ exports.preventDefault = preventDefault$1;
43104
+ exports.pxCheck = pxCheck;
43105
+ exports.recursive = recursive;
43106
+ exports.render = render;
43107
+ exports.rubberband = rubberband$1;
43108
+ exports.rubberbandIfOutOfBounds = rubberbandIfOutOfBounds$1;
42887
43109
  exports.setDefaultConfig = setDefaultConfig;
43110
+ exports.sleep = sleep;
43111
+ exports.toArray = toArray$1;
43112
+ exports.unmount = unmount;
43113
+ exports.upperCaseFirst = upperCaseFirst;
42888
43114
  exports.useConfig = useConfig;
43115
+ exports.useForceUpdate = useForceUpdate;
43116
+ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
43117
+ exports.useLockScroll = useLockScroll;
43118
+ exports.useMemo = useMemo;
43119
+ exports.usePagination = usePagination;
43120
+ exports.usePropsValue = usePropsValue;
43121
+ exports.useRefState = useRefState;
43122
+ exports.useRefs = useRefs;
42889
43123
  exports.useRtl = useRtl;
43124
+ exports.useTouch = useTouch;
43125
+ exports.useUuid = useUuid;
43126
+ exports.useWatch = useWatch$1;
42890
43127
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
42891
43128
  });