laif-ds 0.2.21 → 0.2.23

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 (246) hide show
  1. package/dist/_virtual/index4.js +5 -5
  2. package/dist/_virtual/index5.js +5 -5
  3. package/dist/_virtual/index6.js +2 -2
  4. package/dist/_virtual/index7.js +2 -2
  5. package/dist/components/ui/app-select.js +92 -109
  6. package/dist/components/ui/gantt/constants/DimensionsSettings.js +6 -6
  7. package/dist/components/ui/gantt/constants/DragStepOptions.js +9 -9
  8. package/dist/components/ui/message-input.js +23 -23
  9. package/dist/components/ui/sidebar.js +1 -1
  10. package/dist/components/ui/textarea.js +18 -15
  11. package/dist/index.d.ts +6 -7
  12. package/dist/lib/audio-utils.js +2 -2
  13. package/dist/node_modules/@date-fns/tz/date/index.js +2 -7
  14. package/dist/node_modules/@date-fns/tz/date/mini.js +32 -27
  15. package/dist/node_modules/@date-fns/tz/tzName/index.js +12 -0
  16. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +11 -12
  17. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +137 -139
  18. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  19. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  20. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +70 -69
  21. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +13 -13
  22. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +3 -3
  23. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +2 -2
  24. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +9 -9
  25. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +6 -6
  26. package/dist/node_modules/@lexical/list/LexicalList.prod.js +48 -48
  27. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +29 -29
  28. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +1 -1
  29. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +2 -2
  30. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +10 -10
  31. package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +2 -2
  32. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +17 -17
  33. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +4 -4
  34. package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +4 -4
  35. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +5 -5
  36. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +4 -4
  37. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +20 -20
  38. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +7 -7
  39. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +43 -43
  40. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +16 -16
  41. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +3 -3
  42. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +43 -42
  43. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +1 -1
  44. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +2 -2
  45. package/dist/node_modules/@radix-ui/react-select/dist/index.js +2 -2
  46. package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +183 -175
  47. package/dist/node_modules/@shikijs/core/dist/index.js +195 -175
  48. package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -2
  49. package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
  50. package/dist/node_modules/@shikijs/langs/dist/erlang.js +5 -3
  51. package/dist/node_modules/@shikijs/langs/dist/fsharp.js +1 -1
  52. package/dist/node_modules/@shikijs/langs/dist/gdscript.js +1 -1
  53. package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
  54. package/dist/node_modules/@shikijs/langs/dist/haxe.js +1 -1
  55. package/dist/node_modules/@shikijs/langs/dist/julia.js +1 -1
  56. package/dist/node_modules/@shikijs/langs/dist/latex.js +1 -1
  57. package/dist/node_modules/@shikijs/langs/dist/lean.js +1 -1
  58. package/dist/node_modules/@shikijs/langs/dist/markdown.js +1 -1
  59. package/dist/node_modules/@shikijs/langs/dist/marko.js +5 -5
  60. package/dist/node_modules/@shikijs/langs/dist/mermaid.js +1 -1
  61. package/dist/node_modules/@shikijs/langs/dist/nextflow.js +1 -1
  62. package/dist/node_modules/@shikijs/langs/dist/purescript.js +1 -1
  63. package/dist/node_modules/@shikijs/langs/dist/r.js +1 -1
  64. package/dist/node_modules/@shikijs/langs/dist/sql.js +1 -1
  65. package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -2
  66. package/dist/node_modules/@shikijs/langs/dist/templ.js +1 -1
  67. package/dist/node_modules/@shikijs/langs/dist/tex.js +1 -1
  68. package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +21 -0
  69. package/dist/node_modules/@shikijs/langs/dist/vue.js +1 -1
  70. package/dist/node_modules/@shikijs/langs/dist/zig.js +1 -1
  71. package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +1 -1
  72. package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +1 -1
  73. package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +1 -1
  74. package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +1 -1
  75. package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +1 -1
  76. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +1 -1
  77. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +1 -1
  78. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +1 -1
  79. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +1 -1
  80. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +1 -1
  81. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +1 -1
  82. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +215 -208
  83. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +1 -1
  84. package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
  85. package/dist/node_modules/classnames/index.js +2 -2
  86. package/dist/node_modules/d3-interpolate/src/rgb.js +2 -2
  87. package/dist/node_modules/dayjs/dayjs.min.js +14 -14
  88. package/dist/node_modules/dayjs/locale/it.js +4 -4
  89. package/dist/node_modules/dayjs/plugin/isoWeek.js +4 -4
  90. package/dist/node_modules/dayjs/plugin/localizedFormat.js +10 -10
  91. package/dist/node_modules/decimal.js-light/decimal.js +2 -2
  92. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +2 -2
  93. package/dist/node_modules/es-toolkit/dist/array/flatten.js +2 -2
  94. package/dist/node_modules/es-toolkit/dist/array/uniqBy.js +2 -2
  95. package/dist/node_modules/es-toolkit/dist/compat/_internal/compareValues.js +2 -2
  96. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +2 -2
  97. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +2 -2
  98. package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +2 -2
  99. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +2 -2
  100. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.js +2 -2
  101. package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +2 -2
  102. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +2 -2
  103. package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +2 -2
  104. package/dist/node_modules/es-toolkit/dist/compat/array/orderBy.js +2 -2
  105. package/dist/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  106. package/dist/node_modules/es-toolkit/dist/compat/array/uniqBy.js +2 -2
  107. package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +2 -2
  108. package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +14 -15
  109. package/dist/node_modules/es-toolkit/dist/compat/math/range.js +2 -2
  110. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +2 -2
  111. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +11 -11
  112. package/dist/node_modules/es-toolkit/dist/compat/object/get.js +2 -2
  113. package/dist/node_modules/es-toolkit/dist/compat/object/has.js +2 -2
  114. package/dist/node_modules/es-toolkit/dist/compat/object/property.js +2 -2
  115. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +2 -2
  116. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +2 -2
  117. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +2 -2
  118. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +2 -2
  119. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +2 -2
  120. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +2 -2
  121. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +2 -2
  122. package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +2 -2
  123. package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  124. package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  125. package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +2 -2
  126. package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +2 -2
  127. package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +2 -2
  128. package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +2 -2
  129. package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +2 -2
  130. package/dist/node_modules/es-toolkit/dist/function/debounce.js +15 -15
  131. package/dist/node_modules/es-toolkit/dist/function/identity.js +2 -2
  132. package/dist/node_modules/es-toolkit/dist/function/noop.js +2 -10
  133. package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +2 -2
  134. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +3 -3
  135. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +2 -2
  136. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +2 -2
  137. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +2 -2
  138. package/dist/node_modules/eventemitter3/index2.js +3 -3
  139. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  140. package/dist/node_modules/immer/dist/immer.js +213 -216
  141. package/dist/node_modules/lexical/Lexical.prod.js +212 -212
  142. package/dist/node_modules/lodash/_baseCreate.js +2 -2
  143. package/dist/node_modules/lodash/_cloneBuffer.js +2 -2
  144. package/dist/node_modules/lodash/_defineProperty.js +2 -2
  145. package/dist/node_modules/lodash/_isMasked.js +2 -2
  146. package/dist/node_modules/lodash/_nodeUtil.js +4 -4
  147. package/dist/node_modules/lodash/isArguments.js +2 -2
  148. package/dist/node_modules/lodash/isBuffer.js +2 -2
  149. package/dist/node_modules/lodash/lodash.js +16 -16
  150. package/dist/node_modules/prismjs/components/prism-cpp.js +2 -2
  151. package/dist/node_modules/prismjs/components/prism-java.js +2 -2
  152. package/dist/node_modules/prismjs/components/prism-rust.js +2 -2
  153. package/dist/node_modules/prismjs/components/prism-typescript.js +2 -2
  154. package/dist/node_modules/prismjs/prism.js +8 -8
  155. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +183 -164
  156. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +14 -14
  157. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +10 -7
  158. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +6 -6
  159. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +30 -30
  160. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +1 -1
  161. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +5 -5
  162. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +9 -9
  163. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +1 -1
  164. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +11 -11
  165. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +1 -1
  166. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +12 -12
  167. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +19 -19
  168. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +9 -9
  169. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +10 -10
  170. package/dist/node_modules/react-hook-form/dist/index.esm.js +150 -117
  171. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +48 -48
  172. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +9 -9
  173. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +43 -39
  174. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js +95 -94
  175. package/dist/node_modules/react-window/dist/index.esm.js +2 -2
  176. package/dist/node_modules/recharts/es6/animation/AnimationManager.js +14 -14
  177. package/dist/node_modules/recharts/es6/animation/JavascriptAnimate.js +49 -0
  178. package/dist/node_modules/recharts/es6/animation/createDefaultAnimationManager.js +9 -0
  179. package/dist/node_modules/recharts/es6/animation/useAnimationManager.js +12 -0
  180. package/dist/node_modules/recharts/es6/component/Cursor.js +5 -5
  181. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +55 -58
  182. package/dist/node_modules/recharts/es6/component/Legend.js +32 -27
  183. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +44 -40
  184. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +15 -23
  185. package/dist/node_modules/recharts/es6/context/useTooltipAxis.js +8 -7
  186. package/dist/node_modules/recharts/es6/shape/Curve.js +10 -10
  187. package/dist/node_modules/recharts/es6/shape/Rectangle.js +136 -99
  188. package/dist/node_modules/recharts/es6/shape/Symbols.js +55 -53
  189. package/dist/node_modules/recharts/es6/state/legendSlice.js +5 -4
  190. package/dist/node_modules/recharts/es6/state/selectors/axisSelectors.js +352 -307
  191. package/dist/node_modules/recharts/es6/state/selectors/brushSelectors.js +9 -9
  192. package/dist/node_modules/recharts/es6/state/selectors/combiners/combineDisplayedStackedData.js +26 -0
  193. package/dist/node_modules/recharts/es6/state/selectors/combiners/combineTooltipPayload.js +117 -0
  194. package/dist/node_modules/recharts/es6/state/selectors/dataSelectors.js +4 -4
  195. package/dist/node_modules/recharts/es6/state/selectors/legendSelectors.js +10 -4
  196. package/dist/node_modules/recharts/es6/state/selectors/polarAxisSelectors.js +33 -32
  197. package/dist/node_modules/recharts/es6/state/selectors/selectChartOffsetInternal.js +108 -0
  198. package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxis.js +13 -0
  199. package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxisId.js +5 -0
  200. package/dist/node_modules/recharts/es6/state/selectors/selectTooltipAxisType.js +9 -0
  201. package/dist/node_modules/recharts/es6/state/selectors/selectors.js +40 -143
  202. package/dist/node_modules/recharts/es6/state/selectors/tooltipSelectors.js +68 -63
  203. package/dist/node_modules/recharts/es6/state/types/StackedGraphicalItem.js +7 -0
  204. package/dist/node_modules/recharts/es6/util/ChartUtils.js +58 -57
  205. package/dist/node_modules/recharts/es6/util/DataUtils.js +34 -26
  206. package/dist/node_modules/recharts/es6/util/ReactUtils.js +20 -15
  207. package/dist/node_modules/recharts/es6/util/excludeEventProps.js +11 -0
  208. package/dist/node_modules/recharts/es6/util/getSliced.js +7 -0
  209. package/dist/node_modules/recharts/es6/util/scale/getNiceTickValues.js +44 -44
  210. package/dist/node_modules/recharts/es6/util/stacks/getStackSeriesIdentifier.js +7 -0
  211. package/dist/node_modules/recharts/es6/util/svgPropertiesNoEvents.js +328 -0
  212. package/dist/node_modules/recharts/es6/util/types.js +22 -332
  213. package/dist/node_modules/recharts/es6/util/useAnimationId.js +10 -0
  214. package/dist/node_modules/recharts/es6/util/useElementOffset.js +20 -16
  215. package/dist/node_modules/remeda/dist/hasAtLeast-F1Oj_xBB.js +9 -0
  216. package/dist/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js +8 -0
  217. package/dist/node_modules/remeda/dist/omit-HZOiLuMO.js +19 -0
  218. package/dist/node_modules/remeda/dist/purry-DH9cw9sy.js +11 -0
  219. package/dist/node_modules/shiki/dist/langs.js +225 -220
  220. package/dist/node_modules/shiki/dist/themes.js +60 -60
  221. package/dist/node_modules/sonner/dist/index.js +309 -305
  222. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  223. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +169 -168
  224. package/dist/node_modules/unified/lib/callable-instance.js +2 -2
  225. package/dist/node_modules/unified/lib/index.js +1 -1
  226. package/dist/node_modules/unist-util-is/lib/index.js +2 -2
  227. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +2 -2
  228. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -2
  229. package/dist/node_modules/vfile-message/lib/index.js +1 -1
  230. package/dist/styles.v3.css +1 -1
  231. package/package.json +1 -1
  232. package/dist/_virtual/isEqual.js +0 -8
  233. package/dist/_virtual/isEqual2.js +0 -5
  234. package/dist/_virtual/isEqualWith.js +0 -5
  235. package/dist/_virtual/isPlainObject.js +0 -5
  236. package/dist/_virtual/noop.js +0 -5
  237. package/dist/node_modules/es-toolkit/compat/isEqual.js +0 -9
  238. package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +0 -18
  239. package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +0 -139
  240. package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +0 -18
  241. package/dist/node_modules/recharts/es6/animation/Animate.js +0 -270
  242. package/dist/node_modules/recharts/es6/state/selectors/selectChartOffset.js +0 -98
  243. package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +0 -9
  244. package/dist/node_modules/remeda/dist/chunk-D6FCK2GA.js +0 -8
  245. package/dist/node_modules/remeda/dist/chunk-KI5X74E2.js +0 -19
  246. package/dist/node_modules/remeda/dist/chunk-WIMGWYZL.js +0 -11
@@ -1,96 +1,96 @@
1
1
  "use client";
2
- import { memo as f, notUndefined as v, approxEqual as M, debounce as y } from "./utils.js";
2
+ import { memo as f, notUndefined as v, approxEqual as M, debounce as z } from "./utils.js";
3
3
  const b = (r) => {
4
- const { offsetWidth: h, offsetHeight: t } = r;
5
- return { width: h, height: t };
6
- }, z = (r) => r, w = (r) => {
7
- const h = Math.max(r.startIndex - r.overscan, 0), t = Math.min(r.endIndex + r.overscan, r.count - 1), s = [];
8
- for (let e = h; e <= t; e++)
9
- s.push(e);
4
+ const { offsetWidth: a, offsetHeight: e } = r;
5
+ return { width: a, height: e };
6
+ }, w = (r) => r, I = (r) => {
7
+ const a = Math.max(r.startIndex - r.overscan, 0), e = Math.min(r.endIndex + r.overscan, r.count - 1), s = [];
8
+ for (let t = a; t <= e; t++)
9
+ s.push(t);
10
10
  return s;
11
- }, _ = (r, h) => {
12
- const t = r.scrollElement;
13
- if (!t)
11
+ }, A = (r, a) => {
12
+ const e = r.scrollElement;
13
+ if (!e)
14
14
  return;
15
15
  const s = r.targetWindow;
16
16
  if (!s)
17
17
  return;
18
- const e = (n) => {
19
- const { width: o, height: a } = n;
20
- h({ width: Math.round(o), height: Math.round(a) });
18
+ const t = (n) => {
19
+ const { width: o, height: h } = n;
20
+ a({ width: Math.round(o), height: Math.round(h) });
21
21
  };
22
- if (e(b(t)), !s.ResizeObserver)
22
+ if (t(b(e)), !s.ResizeObserver)
23
23
  return () => {
24
24
  };
25
25
  const i = new s.ResizeObserver((n) => {
26
26
  const o = () => {
27
- const a = n[0];
28
- if (a?.borderBoxSize) {
29
- const c = a.borderBoxSize[0];
27
+ const h = n[0];
28
+ if (h?.borderBoxSize) {
29
+ const c = h.borderBoxSize[0];
30
30
  if (c) {
31
- e({ width: c.inlineSize, height: c.blockSize });
31
+ t({ width: c.inlineSize, height: c.blockSize });
32
32
  return;
33
33
  }
34
34
  }
35
- e(b(t));
35
+ t(b(e));
36
36
  };
37
37
  r.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
38
38
  });
39
- return i.observe(t, { box: "border-box" }), () => {
40
- i.unobserve(t);
39
+ return i.observe(e, { box: "border-box" }), () => {
40
+ i.unobserve(e);
41
41
  };
42
- }, x = {
42
+ }, E = {
43
43
  passive: !0
44
- }, E = typeof window > "u" ? !0 : "onscrollend" in window, A = (r, h) => {
45
- const t = r.scrollElement;
46
- if (!t)
44
+ }, S = typeof window > "u" ? !0 : "onscrollend" in window, F = (r, a) => {
45
+ const e = r.scrollElement;
46
+ if (!e)
47
47
  return;
48
48
  const s = r.targetWindow;
49
49
  if (!s)
50
50
  return;
51
- let e = 0;
52
- const i = r.options.useScrollendEvent && E ? () => {
53
- } : y(
51
+ let t = 0;
52
+ const i = r.options.useScrollendEvent && S ? () => {
53
+ } : z(
54
54
  s,
55
55
  () => {
56
- h(e, !1);
56
+ a(t, !1);
57
57
  },
58
58
  r.options.isScrollingResetDelay
59
59
  ), n = (l) => () => {
60
- const { horizontal: u, isRtl: d } = r.options;
61
- e = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, i(), h(e, l);
62
- }, o = n(!0), a = n(!1);
63
- a(), t.addEventListener("scroll", o, x);
64
- const c = r.options.useScrollendEvent && E;
65
- return c && t.addEventListener("scrollend", a, x), () => {
66
- t.removeEventListener("scroll", o), c && t.removeEventListener("scrollend", a);
60
+ const { horizontal: d, isRtl: u } = r.options;
61
+ t = d ? e.scrollLeft * (u && -1 || 1) : e.scrollTop, i(), a(t, l);
62
+ }, o = n(!0), h = n(!1);
63
+ h(), e.addEventListener("scroll", o, E);
64
+ const c = r.options.useScrollendEvent && S;
65
+ return c && e.addEventListener("scrollend", h, E), () => {
66
+ e.removeEventListener("scroll", o), c && e.removeEventListener("scrollend", h);
67
67
  };
68
- }, C = (r, h, t) => {
69
- if (h?.borderBoxSize) {
70
- const s = h.borderBoxSize[0];
68
+ }, C = (r, a, e) => {
69
+ if (a?.borderBoxSize) {
70
+ const s = a.borderBoxSize[0];
71
71
  if (s)
72
72
  return Math.round(
73
- s[t.options.horizontal ? "inlineSize" : "blockSize"]
73
+ s[e.options.horizontal ? "inlineSize" : "blockSize"]
74
74
  );
75
75
  }
76
- return r[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
77
- }, D = (r, {
78
- adjustments: h = 0,
79
- behavior: t
76
+ return r[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
77
+ }, N = (r, {
78
+ adjustments: a = 0,
79
+ behavior: e
80
80
  }, s) => {
81
- var e, i;
82
- const n = r + h;
83
- (i = (e = s.scrollElement) == null ? void 0 : e.scrollTo) == null || i.call(e, {
81
+ var t, i;
82
+ const n = r + a;
83
+ (i = (t = s.scrollElement) == null ? void 0 : t.scrollTo) == null || i.call(t, {
84
84
  [s.options.horizontal ? "left" : "top"]: n,
85
- behavior: t
85
+ behavior: e
86
86
  });
87
87
  };
88
- class N {
89
- constructor(h) {
90
- this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
91
- let t = null;
92
- const s = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((e) => {
93
- e.forEach((i) => {
88
+ class W {
89
+ constructor(a) {
90
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
91
+ let e = null;
92
+ const s = () => e || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : e = new this.targetWindow.ResizeObserver((t) => {
93
+ t.forEach((i) => {
94
94
  const n = () => {
95
95
  this._measureElement(i.target, i);
96
96
  };
@@ -99,21 +99,21 @@ class N {
99
99
  }));
100
100
  return {
101
101
  disconnect: () => {
102
- var e;
103
- (e = s()) == null || e.disconnect(), t = null;
102
+ var t;
103
+ (t = s()) == null || t.disconnect(), e = null;
104
104
  },
105
- observe: (e) => {
105
+ observe: (t) => {
106
106
  var i;
107
- return (i = s()) == null ? void 0 : i.observe(e, { box: "border-box" });
107
+ return (i = s()) == null ? void 0 : i.observe(t, { box: "border-box" });
108
108
  },
109
- unobserve: (e) => {
109
+ unobserve: (t) => {
110
110
  var i;
111
- return (i = s()) == null ? void 0 : i.unobserve(e);
111
+ return (i = s()) == null ? void 0 : i.unobserve(t);
112
112
  }
113
113
  };
114
- })(), this.range = null, this.setOptions = (t) => {
115
- Object.entries(t).forEach(([s, e]) => {
116
- typeof e > "u" && delete t[s];
114
+ })(), this.range = null, this.setOptions = (e) => {
115
+ Object.entries(e).forEach(([s, t]) => {
116
+ typeof t > "u" && delete e[s];
117
117
  }), this.options = {
118
118
  debug: !1,
119
119
  initialOffset: 0,
@@ -123,8 +123,8 @@ class N {
123
123
  scrollPaddingStart: 0,
124
124
  scrollPaddingEnd: 0,
125
125
  horizontal: !1,
126
- getItemKey: z,
127
- rangeExtractor: w,
126
+ getItemKey: w,
127
+ rangeExtractor: I,
128
128
  onChange: () => {
129
129
  },
130
130
  measureElement: C,
@@ -139,19 +139,19 @@ class N {
139
139
  isRtl: !1,
140
140
  useScrollendEvent: !1,
141
141
  useAnimationFrameWithResizeObserver: !1,
142
- ...t
142
+ ...e
143
143
  };
144
- }, this.notify = (t) => {
145
- var s, e;
146
- (e = (s = this.options).onChange) == null || e.call(s, this, t);
144
+ }, this.notify = (e) => {
145
+ var s, t;
146
+ (t = (s = this.options).onChange) == null || t.call(s, this, e);
147
147
  }, this.maybeNotify = f(
148
148
  () => (this.calculateRange(), [
149
149
  this.isScrolling,
150
150
  this.range ? this.range.startIndex : null,
151
151
  this.range ? this.range.endIndex : null
152
152
  ]),
153
- (t) => {
154
- this.notify(t);
153
+ (e) => {
154
+ this.notify(e);
155
155
  },
156
156
  {
157
157
  key: process.env.NODE_ENV !== "production" && "maybeNotify",
@@ -163,42 +163,42 @@ class N {
163
163
  ]
164
164
  }
165
165
  ), this.cleanup = () => {
166
- this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
166
+ this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
167
167
  }, this._didMount = () => () => {
168
168
  this.cleanup();
169
169
  }, this._willUpdate = () => {
170
- var t;
170
+ var e;
171
171
  const s = this.options.enabled ? this.options.getScrollElement() : null;
172
172
  if (this.scrollElement !== s) {
173
173
  if (this.cleanup(), !s) {
174
174
  this.maybeNotify();
175
175
  return;
176
176
  }
177
- this.scrollElement = s, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((e) => {
178
- this.observer.observe(e);
177
+ this.scrollElement = s, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((e = this.scrollElement) == null ? void 0 : e.window) ?? null, this.elementsCache.forEach((t) => {
178
+ this.observer.observe(t);
179
179
  }), this._scrollToOffset(this.getScrollOffset(), {
180
180
  adjustments: void 0,
181
181
  behavior: void 0
182
182
  }), this.unsubs.push(
183
- this.options.observeElementRect(this, (e) => {
184
- this.scrollRect = e, this.maybeNotify();
183
+ this.options.observeElementRect(this, (t) => {
184
+ this.scrollRect = t, this.maybeNotify();
185
185
  })
186
186
  ), this.unsubs.push(
187
- this.options.observeElementOffset(this, (e, i) => {
188
- this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < e ? "forward" : "backward" : null, this.scrollOffset = e, this.isScrolling = i, this.maybeNotify();
187
+ this.options.observeElementOffset(this, (t, i) => {
188
+ this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < t ? "forward" : "backward" : null, this.scrollOffset = t, this.isScrolling = i, this.maybeNotify();
189
189
  })
190
190
  );
191
191
  }
192
- }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, s) => {
193
- const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
192
+ }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (e, s) => {
193
+ const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
194
194
  for (let n = s - 1; n >= 0; n--) {
195
- const o = t[n];
196
- if (e.has(o.lane))
195
+ const o = e[n];
196
+ if (t.has(o.lane))
197
197
  continue;
198
- const a = i.get(
198
+ const h = i.get(
199
199
  o.lane
200
200
  );
201
- if (a == null || o.end > a.end ? i.set(o.lane, o) : o.end < a.end && e.set(o.lane, !0), e.size === this.options.lanes)
201
+ if (h == null || o.end > h.end ? i.set(o.lane, o) : o.end < h.end && t.set(o.lane, !0), t.size === this.options.lanes)
202
202
  break;
203
203
  }
204
204
  return i.size === this.options.lanes ? Array.from(i.values()).sort((n, o) => n.end === o.end ? n.index - o.index : n.end - o.end)[0] : void 0;
@@ -210,10 +210,10 @@ class N {
210
210
  this.options.getItemKey,
211
211
  this.options.enabled
212
212
  ],
213
- (t, s, e, i, n) => (this.pendingMeasuredCacheIndexes = [], {
214
- count: t,
213
+ (e, s, t, i, n) => (this.pendingMeasuredCacheIndexes = [], {
214
+ count: e,
215
215
  paddingStart: s,
216
- scrollMargin: e,
216
+ scrollMargin: t,
217
217
  getItemKey: i,
218
218
  enabled: n
219
219
  }),
@@ -222,24 +222,24 @@ class N {
222
222
  }
223
223
  ), this.getMeasurements = f(
224
224
  () => [this.getMeasurementOptions(), this.itemSizeCache],
225
- ({ count: t, paddingStart: s, scrollMargin: e, getItemKey: i, enabled: n }, o) => {
225
+ ({ count: e, paddingStart: s, scrollMargin: t, getItemKey: i, enabled: n }, o) => {
226
226
  if (!n)
227
227
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
228
228
  this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((l) => {
229
229
  this.itemSizeCache.set(l.key, l.size);
230
230
  }));
231
- const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
231
+ const h = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
232
232
  this.pendingMeasuredCacheIndexes = [];
233
- const c = this.measurementsCache.slice(0, a);
234
- for (let l = a; l < t; l++) {
235
- const u = i(l), d = this.options.lanes === 1 ? c[l - 1] : this.getFurthestMeasurement(c, l), m = d ? d.end + this.options.gap : s + e, g = o.get(u), p = typeof g == "number" ? g : this.options.estimateSize(l), O = m + p, I = d ? d.lane : l % this.options.lanes;
233
+ const c = this.measurementsCache.slice(0, h);
234
+ for (let l = h; l < e; l++) {
235
+ const d = i(l), u = this.options.lanes === 1 ? c[l - 1] : this.getFurthestMeasurement(c, l), g = u ? u.end + this.options.gap : s + t, m = o.get(d), p = typeof m == "number" ? m : this.options.estimateSize(l), O = g + p, y = u ? u.lane : l % this.options.lanes;
236
236
  c[l] = {
237
237
  index: l,
238
- start: m,
238
+ start: g,
239
239
  size: p,
240
240
  end: O,
241
- key: u,
242
- lane: I
241
+ key: d,
242
+ lane: y
243
243
  };
244
244
  }
245
245
  return this.measurementsCache = c, c;
@@ -255,10 +255,10 @@ class N {
255
255
  this.getScrollOffset(),
256
256
  this.options.lanes
257
257
  ],
258
- (t, s, e, i) => this.range = t.length > 0 && s > 0 ? T({
259
- measurements: t,
258
+ (e, s, t, i) => this.range = e.length > 0 && s > 0 ? R({
259
+ measurements: e,
260
260
  outerSize: s,
261
- scrollOffset: e,
261
+ scrollOffset: t,
262
262
  lanes: i
263
263
  }) : null,
264
264
  {
@@ -267,144 +267,151 @@ class N {
267
267
  }
268
268
  ), this.getVirtualIndexes = f(
269
269
  () => {
270
- let t = null, s = null;
271
- const e = this.calculateRange();
272
- return e && (t = e.startIndex, s = e.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, s]), [
270
+ let e = null, s = null;
271
+ const t = this.calculateRange();
272
+ return t && (e = t.startIndex, s = t.endIndex), this.maybeNotify.updateDeps([this.isScrolling, e, s]), [
273
273
  this.options.rangeExtractor,
274
274
  this.options.overscan,
275
275
  this.options.count,
276
- t,
276
+ e,
277
277
  s
278
278
  ];
279
279
  },
280
- (t, s, e, i, n) => i === null || n === null ? [] : t({
280
+ (e, s, t, i, n) => i === null || n === null ? [] : e({
281
281
  startIndex: i,
282
282
  endIndex: n,
283
283
  overscan: s,
284
- count: e
284
+ count: t
285
285
  }),
286
286
  {
287
287
  key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
288
288
  debug: () => this.options.debug
289
289
  }
290
- ), this.indexFromElement = (t) => {
291
- const s = this.options.indexAttribute, e = t.getAttribute(s);
292
- return e ? parseInt(e, 10) : (console.warn(
290
+ ), this.indexFromElement = (e) => {
291
+ const s = this.options.indexAttribute, t = e.getAttribute(s);
292
+ return t ? parseInt(t, 10) : (console.warn(
293
293
  `Missing attribute name '${s}={index}' on measured element.`
294
294
  ), -1);
295
- }, this._measureElement = (t, s) => {
296
- const e = this.indexFromElement(t), i = this.measurementsCache[e];
295
+ }, this._measureElement = (e, s) => {
296
+ const t = this.indexFromElement(e), i = this.measurementsCache[t];
297
297
  if (!i)
298
298
  return;
299
299
  const n = i.key, o = this.elementsCache.get(n);
300
- o !== t && (o && this.observer.unobserve(o), this.observer.observe(t), this.elementsCache.set(n, t)), t.isConnected && this.resizeItem(e, this.options.measureElement(t, s, this));
301
- }, this.resizeItem = (t, s) => {
302
- const e = this.measurementsCache[t];
303
- if (!e)
300
+ o !== e && (o && this.observer.unobserve(o), this.observer.observe(e), this.elementsCache.set(n, e)), e.isConnected && this.resizeItem(t, this.options.measureElement(e, s, this));
301
+ }, this.resizeItem = (e, s) => {
302
+ const t = this.measurementsCache[e];
303
+ if (!t)
304
304
  return;
305
- const i = this.itemSizeCache.get(e.key) ?? e.size, n = s - i;
306
- n !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(e, n, this) : e.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", n), this._scrollToOffset(this.getScrollOffset(), {
305
+ const i = this.itemSizeCache.get(t.key) ?? t.size, n = s - i;
306
+ n !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(t, n, this) : t.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", n), this._scrollToOffset(this.getScrollOffset(), {
307
307
  adjustments: this.scrollAdjustments += n,
308
308
  behavior: void 0
309
- })), this.pendingMeasuredCacheIndexes.push(e.index), this.itemSizeCache = new Map(this.itemSizeCache.set(e.key, s)), this.notify(!1));
310
- }, this.measureElement = (t) => {
311
- if (!t) {
312
- this.elementsCache.forEach((s, e) => {
313
- s.isConnected || (this.observer.unobserve(s), this.elementsCache.delete(e));
309
+ })), this.pendingMeasuredCacheIndexes.push(t.index), this.itemSizeCache = new Map(this.itemSizeCache.set(t.key, s)), this.notify(!1));
310
+ }, this.measureElement = (e) => {
311
+ if (!e) {
312
+ this.elementsCache.forEach((s, t) => {
313
+ s.isConnected || (this.observer.unobserve(s), this.elementsCache.delete(t));
314
314
  });
315
315
  return;
316
316
  }
317
- this._measureElement(t, void 0);
317
+ this._measureElement(e, void 0);
318
318
  }, this.getVirtualItems = f(
319
319
  () => [this.getVirtualIndexes(), this.getMeasurements()],
320
- (t, s) => {
321
- const e = [];
322
- for (let i = 0, n = t.length; i < n; i++) {
323
- const o = t[i], a = s[o];
324
- e.push(a);
320
+ (e, s) => {
321
+ const t = [];
322
+ for (let i = 0, n = e.length; i < n; i++) {
323
+ const o = e[i], h = s[o];
324
+ t.push(h);
325
325
  }
326
- return e;
326
+ return t;
327
327
  },
328
328
  {
329
329
  key: process.env.NODE_ENV !== "production" && "getVirtualItems",
330
330
  debug: () => this.options.debug
331
331
  }
332
- ), this.getVirtualItemForOffset = (t) => {
332
+ ), this.getVirtualItemForOffset = (e) => {
333
333
  const s = this.getMeasurements();
334
334
  if (s.length !== 0)
335
335
  return v(
336
- s[S(
336
+ s[x(
337
337
  0,
338
338
  s.length - 1,
339
- (e) => v(s[e]).start,
340
- t
339
+ (t) => v(s[t]).start,
340
+ e
341
341
  )]
342
342
  );
343
- }, this.getOffsetForAlignment = (t, s, e = 0) => {
343
+ }, this.getOffsetForAlignment = (e, s, t = 0) => {
344
344
  const i = this.getSize(), n = this.getScrollOffset();
345
- s === "auto" && (s = t >= n + i ? "end" : "start"), s === "center" ? t += (e - i) / 2 : s === "end" && (t -= i);
346
- const o = this.getTotalSize() - i;
347
- return Math.max(Math.min(o, t), 0);
348
- }, this.getOffsetForIndex = (t, s = "auto") => {
349
- t = Math.max(0, Math.min(t, this.options.count - 1));
350
- const e = this.measurementsCache[t];
351
- if (!e)
345
+ s === "auto" && (s = e >= n + i ? "end" : "start"), s === "center" ? e += (t - i) / 2 : s === "end" && (e -= i);
346
+ const o = this.getTotalSize() + this.options.scrollMargin - i;
347
+ return Math.max(Math.min(o, e), 0);
348
+ }, this.getOffsetForIndex = (e, s = "auto") => {
349
+ e = Math.max(0, Math.min(e, this.options.count - 1));
350
+ const t = this.measurementsCache[e];
351
+ if (!t)
352
352
  return;
353
353
  const i = this.getSize(), n = this.getScrollOffset();
354
354
  if (s === "auto")
355
- if (e.end >= n + i - this.options.scrollPaddingEnd)
355
+ if (t.end >= n + i - this.options.scrollPaddingEnd)
356
356
  s = "end";
357
- else if (e.start <= n + this.options.scrollPaddingStart)
357
+ else if (t.start <= n + this.options.scrollPaddingStart)
358
358
  s = "start";
359
359
  else
360
360
  return [n, s];
361
- const o = s === "end" ? e.end + this.options.scrollPaddingEnd : e.start - this.options.scrollPaddingStart;
361
+ const o = s === "end" ? t.end + this.options.scrollPaddingEnd : t.start - this.options.scrollPaddingStart;
362
362
  return [
363
- this.getOffsetForAlignment(o, s, e.size),
363
+ this.getOffsetForAlignment(o, s, t.size),
364
364
  s
365
365
  ];
366
- }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
367
- this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
368
- }, this.scrollToOffset = (t, { align: s = "start", behavior: e } = {}) => {
369
- this.cancelScrollToIndex(), e === "smooth" && this.isDynamicMode() && console.warn(
366
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (e, { align: s = "start", behavior: t } = {}) => {
367
+ t === "smooth" && this.isDynamicMode() && console.warn(
370
368
  "The `smooth` scroll behavior is not fully supported with dynamic size."
371
- ), this._scrollToOffset(this.getOffsetForAlignment(t, s), {
369
+ ), this._scrollToOffset(this.getOffsetForAlignment(e, s), {
372
370
  adjustments: void 0,
373
- behavior: e
371
+ behavior: t
374
372
  });
375
- }, this.scrollToIndex = (t, { align: s = "auto", behavior: e } = {}) => {
376
- t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), e === "smooth" && this.isDynamicMode() && console.warn(
373
+ }, this.scrollToIndex = (e, { align: s = "auto", behavior: t } = {}) => {
374
+ t === "smooth" && this.isDynamicMode() && console.warn(
377
375
  "The `smooth` scroll behavior is not fully supported with dynamic size."
378
- );
379
- const i = this.getOffsetForIndex(t, s);
380
- if (!i) return;
381
- const [n, o] = i;
382
- this._scrollToOffset(n, { adjustments: void 0, behavior: e }), e !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
383
- if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
384
- this.options.getItemKey(t)
385
- )) {
386
- const c = this.getOffsetForIndex(t, o);
387
- if (!c) return;
388
- const [l] = c, u = this.getScrollOffset();
389
- M(l, u) || this.scrollToIndex(t, { align: o, behavior: e });
390
- } else
391
- this.scrollToIndex(t, { align: o, behavior: e });
392
- }));
393
- }, this.scrollBy = (t, { behavior: s } = {}) => {
394
- this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
376
+ ), e = Math.max(0, Math.min(e, this.options.count - 1));
377
+ let i = 0;
378
+ const n = 10, o = (c) => {
379
+ if (!this.targetWindow) return;
380
+ const l = this.getOffsetForIndex(e, c);
381
+ if (!l) {
382
+ console.warn("Failed to get offset for index:", e);
383
+ return;
384
+ }
385
+ const [d, u] = l;
386
+ this._scrollToOffset(d, { adjustments: void 0, behavior: t }), this.targetWindow.requestAnimationFrame(() => {
387
+ const g = this.getScrollOffset(), m = this.getOffsetForIndex(e, u);
388
+ if (!m) {
389
+ console.warn("Failed to get offset for index:", e);
390
+ return;
391
+ }
392
+ M(m[0], g) || h(u);
393
+ });
394
+ }, h = (c) => {
395
+ this.targetWindow && (i++, i < n ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", i, n), this.targetWindow.requestAnimationFrame(() => o(c))) : console.warn(
396
+ `Failed to scroll to index ${e} after ${n} attempts.`
397
+ ));
398
+ };
399
+ o(s);
400
+ }, this.scrollBy = (e, { behavior: s } = {}) => {
401
+ s === "smooth" && this.isDynamicMode() && console.warn(
395
402
  "The `smooth` scroll behavior is not fully supported with dynamic size."
396
- ), this._scrollToOffset(this.getScrollOffset() + t, {
403
+ ), this._scrollToOffset(this.getScrollOffset() + e, {
397
404
  adjustments: void 0,
398
405
  behavior: s
399
406
  });
400
407
  }, this.getTotalSize = () => {
401
- var t;
408
+ var e;
402
409
  const s = this.getMeasurements();
403
- let e;
410
+ let t;
404
411
  if (s.length === 0)
405
- e = this.options.paddingStart;
412
+ t = this.options.paddingStart;
406
413
  else if (this.options.lanes === 1)
407
- e = ((t = s[s.length - 1]) == null ? void 0 : t.end) ?? 0;
414
+ t = ((e = s[s.length - 1]) == null ? void 0 : e.end) ?? 0;
408
415
  else {
409
416
  const i = Array(this.options.lanes).fill(null);
410
417
  let n = s.length - 1;
@@ -412,80 +419,80 @@ class N {
412
419
  const o = s[n];
413
420
  i[o.lane] === null && (i[o.lane] = o.end), n--;
414
421
  }
415
- e = Math.max(...i.filter((o) => o !== null));
422
+ t = Math.max(...i.filter((o) => o !== null));
416
423
  }
417
424
  return Math.max(
418
- e - this.options.scrollMargin + this.options.paddingEnd,
425
+ t - this.options.scrollMargin + this.options.paddingEnd,
419
426
  0
420
427
  );
421
- }, this._scrollToOffset = (t, {
428
+ }, this._scrollToOffset = (e, {
422
429
  adjustments: s,
423
- behavior: e
430
+ behavior: t
424
431
  }) => {
425
- this.options.scrollToFn(t, { behavior: e, adjustments: s }, this);
432
+ this.options.scrollToFn(e, { behavior: t, adjustments: s }, this);
426
433
  }, this.measure = () => {
427
434
  this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
428
- }, this.setOptions(h);
435
+ }, this.setOptions(a);
429
436
  }
430
437
  }
431
- const S = (r, h, t, s) => {
432
- for (; r <= h; ) {
433
- const e = (r + h) / 2 | 0, i = t(e);
438
+ const x = (r, a, e, s) => {
439
+ for (; r <= a; ) {
440
+ const t = (r + a) / 2 | 0, i = e(t);
434
441
  if (i < s)
435
- r = e + 1;
442
+ r = t + 1;
436
443
  else if (i > s)
437
- h = e - 1;
444
+ a = t - 1;
438
445
  else
439
- return e;
446
+ return t;
440
447
  }
441
448
  return r > 0 ? r - 1 : 0;
442
449
  };
443
- function T({
450
+ function R({
444
451
  measurements: r,
445
- outerSize: h,
446
- scrollOffset: t,
452
+ outerSize: a,
453
+ scrollOffset: e,
447
454
  lanes: s
448
455
  }) {
449
- const e = r.length - 1, i = (a) => r[a].start;
456
+ const t = r.length - 1, i = (h) => r[h].start;
450
457
  if (r.length <= s)
451
458
  return {
452
459
  startIndex: 0,
453
- endIndex: e
460
+ endIndex: t
454
461
  };
455
- let n = S(
462
+ let n = x(
456
463
  0,
457
- e,
464
+ t,
458
465
  i,
459
- t
466
+ e
460
467
  ), o = n;
461
468
  if (s === 1)
462
- for (; o < e && r[o].end < t + h; )
469
+ for (; o < t && r[o].end < e + a; )
463
470
  o++;
464
471
  else if (s > 1) {
465
- const a = Array(s).fill(0);
466
- for (; o < e && a.some((l) => l < t + h); ) {
472
+ const h = Array(s).fill(0);
473
+ for (; o < t && h.some((l) => l < e + a); ) {
467
474
  const l = r[o];
468
- a[l.lane] = l.end, o++;
475
+ h[l.lane] = l.end, o++;
469
476
  }
470
- const c = Array(s).fill(t + h);
471
- for (; n >= 0 && c.some((l) => l >= t); ) {
477
+ const c = Array(s).fill(e + a);
478
+ for (; n >= 0 && c.some((l) => l >= e); ) {
472
479
  const l = r[n];
473
480
  c[l.lane] = l.start, n--;
474
481
  }
475
- n = Math.max(0, n - n % s), o = Math.min(e, o + (s - 1 - o % s));
482
+ n = Math.max(0, n - n % s), o = Math.min(t, o + (s - 1 - o % s));
476
483
  }
477
484
  return { startIndex: n, endIndex: o };
478
485
  }
479
486
  export {
480
- N as Virtualizer,
487
+ W as Virtualizer,
481
488
  M as approxEqual,
482
- y as debounce,
483
- z as defaultKeyExtractor,
484
- w as defaultRangeExtractor,
485
- D as elementScroll,
489
+ z as debounce,
490
+ w as defaultKeyExtractor,
491
+ I as defaultRangeExtractor,
492
+ N as elementScroll,
486
493
  C as measureElement,
487
494
  f as memo,
488
495
  v as notUndefined,
489
- A as observeElementOffset,
490
- _ as observeElementRect
496
+ F as observeElementOffset,
497
+ A as observeElementRect
491
498
  };